--- 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.3.ebuild 2008-12-02 07:13:22.000000000 +0000 @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2007 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 $ +# $Header: /var/cvsroot/gentoo-x86/sci-physics/abinit/abinit-5.3.4.ebuild,v 1.1 2007/05/09 06:47:17 dberkholz Exp $ inherit fortran toolchain-funcs @@ -11,10 +11,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 @@ -39,17 +41,6 @@ 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 - # Yea for breaking compatibility with no ChangeLog entry in 2.60 if has_version '>=sys-devel/autoconf-2.60'; then sed -i -e "s:_AC_SRCPATHS:_AC_SRCDIRS:g" config/m4/init.m4 @@ -59,18 +50,26 @@ } src_compile() { + if use mpi; then + MY_FC="mpif90" + MY_CC="mpicc" + else + MY_FC="${FORTRANC}" + MY_CC="$(tc-getCC)" + fi econf \ --with-install-type=debian \ --disable-config-file \ --disable-library-search \ $(use_enable mpi) \ + $(use_enable netcdf) \ --with-blas-prefix=/usr \ --with-lapack-prefix=/usr \ --with-c-optflags="${CFLAGS}" \ --with-fortran-optflags="${FFLAGS}" \ --with-fortran-ldflags='-lpthread' \ - FC="${FORTRANC}" \ - CC="$(tc-getCC)" \ + FC="${MY_FC}" \ + CC="${MY_CC}" \ LD="$(tc-getLD)" \ || die "configure failed"