cfitsio-3.360.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. FORTRAN_NEEDED=fortran
  5. inherit autotools-utils fortran-2
  6. DESCRIPTION="C and Fortran library for manipulating FITS files"
  7. HOMEPAGE="http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html"
  8. SRC_URI="https://dev.gentoo.org/~bicatali/distfiles/${P}.tar.gz"
  9. LICENSE="MIT"
  10. SLOT="0/1"
  11. KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris"
  12. IUSE="doc examples fortran static-libs +tools threads"
  13. RDEPEND="sys-libs/zlib"
  14. DEPEND="${RDEPEND}
  15. fortran? ( dev-lang/cfortran )"
  16. pkg_setup() {
  17. use fortran && fortran-2_pkg_setup
  18. }
  19. src_prepare() {
  20. # avoid internal cfortran
  21. if use fortran; then
  22. mv cfortran.h cfortran.h.disabled
  23. ln -s "${EPREFIX}"/usr/include/cfortran.h . || die
  24. fi
  25. autotools-utils_src_prepare
  26. }
  27. src_configure() {
  28. local myeconfargs=(
  29. $(use_enable fortran)
  30. $(use_enable threads)
  31. $(use_enable tools)
  32. )
  33. autotools-utils_src_configure
  34. }
  35. src_install () {
  36. autotools-utils_src_install
  37. dodoc README* Changes* docs/changes.txt docs/cfitsio.doc
  38. use fortran && dodoc docs/fitsio.doc
  39. use doc && dodoc docs/{quick,cfitsio,fpackguide}.pdf
  40. use doc && use fortran && dodoc docs/fitsio.pdf
  41. if use examples; then
  42. insinto /usr/share/doc/${PF}/examples
  43. doins cookbook.c testprog.c speed.c smem.c
  44. use fortran && doins cookbook.f testf77.f
  45. fi
  46. }