# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="2" inherit autotools eutils fortran flag-o-matic multilib DESCRIPTION="A library of Fortran90 routines to read/write the ETSF file format" HOMEPAGE="http://www.etsf.eu/resources/software/libraries_and_tools" SRC_URI="http://www.etsf.eu/sites/default/files/${P}.tar_.gz -> ${P}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug examples" RDEPEND="sci-libs/netcdf[fortran]" DEPEND="${RDEPEND} >=sys-devel/autoconf-2.59" FORTRAN="gfortran ifc pgf90" src_prepare() { epatch "${FILESDIR}"/${PV}-as-needed.patch eautoreconf } src_configure() { use debug || append-cppflags -DNDEBUG econf \ $(use_enable examples build-tutorials) \ --with-netcdf-ldflags="-L/usr/$(get_libdir)" \ --with-netcdf-libs="-lnetcdff" \ --with-moduledir=/usr/$(get_libdir)/finclude \ FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}" } src_test() { emake check || die } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc README NEWS AUTHORS INSTALL ChangeLog || die "dodoc failed" }