--- usr/portage/sci-physics/abinit/abinit-5.4.4.ebuild 2008-07-05 01:10:36.000000000 +0000 +++ usr/local/portage/sci-physics/abinit/abinit-5.6.5.ebuild 2009-03-09 21:21:27.000000000 +0000 @@ -1,6 +1,5 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-physics/abinit/abinit-5.4.4.ebuild,v 1.1 2008/07/05 01:10:36 dberkholz Exp $ inherit fortran toolchain-funcs @@ -11,10 +10,12 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" -IUSE="mpi test" +IUSE="mpi netcdf test" RDEPEND="virtual/blas - virtual/lapack" + virtual/lapack + mpi? ( virtual/mpi ) + netcdf? ( sci-libs/netcdf )" DEPEND="${RDEPEND}" # F90 code, g77 won't work @@ -37,18 +38,7 @@ unpack ${A} cd "${S}" epatch "${FILESDIR}"/5.3.4-change-default-directories.patch - epatch "${FILESDIR}"/5.2.3-fix-64bit-detection.patch - - # bug #223111: Our eautoreconf directory detection breaks - sed -i -e "s:@abinit_srcdir@/::" Makefile.am - - # bug #223111: libtool 2.2 fix (taken from bug #230271) - if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then - cat "/usr/share/aclocal/ltsugar.m4" >> config/m4/libtool.m4 - cat "/usr/share/aclocal/ltversion.m4" >> config/m4/libtool.m4 - cat "/usr/share/aclocal/lt~obsolete.m4" >> config/m4/libtool.m4 - cat "/usr/share/aclocal/ltoptions.m4" >> config/m4/libtool.m4 - fi + epatch "${FILESDIR}"/5.6.5-etsf_io-netcdf.patch # Yea for breaking compatibility with no ChangeLog entry in 2.60 if has_version '>=sys-devel/autoconf-2.60'; then @@ -60,21 +50,24 @@ src_compile() { econf \ - --with-install-type=debian \ - --disable-config-file \ - --disable-library-search \ $(use_enable mpi) \ - --with-blas-prefix=/usr \ - --with-lapack-prefix=/usr \ - --with-c-optflags="${CFLAGS}" \ - --with-fortran-optflags="${FFLAGS}" \ - --with-fortran-ldflags='-lpthread' \ + $(use_enable netcdf) \ + --with-netcdf-includes="-I/usr/include" \ + --with-netcdf-libs="-L/usr/lib -lnetcdff" \ + --with-linalg-libs="-L/usr/lib -lblas -llapack" \ + --with-cc-optflags="${CFLAGS}" \ + --with-fc-optflags="${FFLAGS}" \ + --with-fc-ld-optlibs='-lpthread' \ FC="${FORTRANC}" \ CC="$(tc-getCC)" \ LD="$(tc-getLD)" \ || die "configure failed" - emake || die "make failed" + if use mpi; then + emake multi || die "make multi failed" + else + emake || die "make failed" + fi } src_test() {