# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ IUSE="doc" DESCRIPTION="C and Fortran library for manipulating FITS files" HOMEPAGE="http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html" SRC_URI="ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/${PN}${PV//.}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" DEPEND="virtual/libc" S=${WORKDIR}/${PN} src_compile() { econf || die "./configure failed" emake || die "make failed" emake shared fitscopy imcopy listhead } src_install () { dodir /usr/lib /usr/include sed -i -e "s:CFITSIO_LIB = /usr/lib:CFITSIO_LIB = ${D}/usr/lib:g" \ -e "s:CFITSIO_INCLUDE = /usr/include:CFITSIO_INCLUDE = ${D}/usr/include:g" \ Makefile make \ prefix=${D}/usr \ mandir=${D}/usr/share/man \ infodir=${D}/usr/share/info \ install || die dobin fitscopy imcopy listhead dodoc changes.txt README Licence.txt if use doc; then dodoc *.ps cookbook.* fi }