nco-4.5.1-r2.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. AUTOTOOLS_IN_SOURCE_BUILD=1
  5. inherit autotools-utils eutils flag-o-matic
  6. DESCRIPTION="Command line utilities for operating on netCDF files"
  7. HOMEPAGE="http://nco.sourceforge.net/"
  8. SRC_URI="http://nco.sf.net/src/${P}.tar.gz"
  9. LICENSE="GPL-3"
  10. SLOT="0/${PV}"
  11. KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
  12. IUSE="dap doc gsl ncap2 openmp static-libs test udunits"
  13. RDEPEND="
  14. >=sci-libs/netcdf-4:=[dap=,tools]
  15. gsl? ( sci-libs/gsl:= )
  16. ncap2? ( dev-cpp/antlr-cpp:2= )
  17. udunits? ( >=sci-libs/udunits-2 )"
  18. DEPEND="${RDEPEND}
  19. test? ( >=sci-libs/netcdf-4[tools] )"
  20. src_configure() {
  21. local myeconfargs=(
  22. --disable-udunits
  23. $(use_enable dap dap-netcdf)
  24. $(use_enable gsl)
  25. $(use_enable ncap2)
  26. $(use_enable openmp)
  27. $(use_enable udunits udunits2)
  28. )
  29. if has_version '>=sci-libs/netcdf-4[hdf5]'; then
  30. myeconfargs+=( --enable-netcdf4 )
  31. append-cppflags -DHAVE_NETCDF4_H
  32. else
  33. myeconfargs+=( --disable-netcdf4 )
  34. fi
  35. autotools-utils_src_configure
  36. }
  37. src_install() {
  38. use doc && DOCS=( doc/nco.pdf ) && HTML_DOCS=( doc/nco.html )
  39. autotools-utils_src_install
  40. doinfo doc/*.info*
  41. }