netcdf-4.4.0-r1.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils
  5. DESCRIPTION="Scientific library and interface for array oriented data access"
  6. HOMEPAGE="http://www.unidata.ucar.edu/software/netcdf/"
  7. SRC_URI="https://github.com/Unidata/netcdf-c/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="UCAR-Unidata"
  9. SLOT="0/11"
  10. KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
  11. IUSE="+dap examples hdf +hdf5 mpi static-libs szip test tools"
  12. RDEPEND="
  13. dap? ( net-misc/curl:0= )
  14. hdf? ( sci-libs/hdf:0= sci-libs/hdf5:0= )
  15. hdf5? ( sci-libs/hdf5:0=[hl(+),mpi=,szip=,zlib] )"
  16. DEPEND="${RDEPEND}"
  17. # doc generation is missing many doxygen files in tar ball
  18. # doc? ( app-doc/doxygen[dot] )"
  19. REQUIRED_USE="test? ( tools ) szip? ( hdf5 ) mpi? ( hdf5 )"
  20. S="${WORKDIR}/${PN}-c-${PV}"
  21. src_configure() {
  22. local myconf
  23. if use mpi; then
  24. export CC=mpicc
  25. myconf="--enable-parallel"
  26. use test && myconf+=" --enable-parallel-tests"
  27. fi
  28. econf "${myconf}" \
  29. --disable-examples \
  30. --disable-dap-remote-tests \
  31. $(use_enable dap) \
  32. $(use_enable hdf hdf4) \
  33. $(use_enable hdf5 netcdf-4) \
  34. $(use_enable static-libs static) \
  35. $(use_enable tools utilities)
  36. }
  37. src_install() {
  38. default
  39. use examples && dodoc -r examples
  40. prune_libtool_files
  41. }