# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 DESCRIPTION="CDO is a tool set for working on climate and NWP model data" HOMEPAGE="https://code.zmaw.de/projects/cdo/" SRC_URI="https://code.zmaw.de/attachments/download/13772/$P.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="netcdf hdf5 udunits threads proj curl fftw grib" DEPEND="netcdf? ( sci-libs/netcdf ) grib? ( sci-libs/grib_api ) hdf5? ( sci-libs/hdf5 ) udunits? ( sci-libs/udunits ) proj? ( sci-libs/proj ) curl? ( net-misc/curl ) fftw? ( sci-libs/fftw:3.0 ) " RDEPEND="${DEPEND}" REQUIRED_USE="netcdf? ( hdf5 )" src_configure() { use hdf5 && CFLAGS="$CFLAGS -lhdf5" use netcdf && CFLAGS="$CFLAGS -lnetcdf" econf \ $(use_with hdf5) \ $(use_with netcdf) \ $(use_with udunits udunits2) \ $(use_with threads) \ $(use_with proj) \ $(use_with curl) \ $(use_with fftw) \ $(use_with grib grib_api) \ CFLAGS="$CFLAGS" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc AUTHORS ChangeLog README NEWS OPERATORS || die "dodoc failed" }