--- /usr/portage/sci-chemistry/gromacs/gromacs-3.3.ebuild 2005-10-14 02:44:11.000000000 +0200 +++ /mnt/zeus/portageoverlay/sci-chemistry/gromacs/gromacs-3.3-r1.ebuild 2006-01-13 18:27:14.000000000 +0100 @@ -4,7 +4,7 @@ inherit eutils -IUSE="altivec mpi xml2" +IUSE="altivec mpi 3dnow sse" DESCRIPTION="The ultimate molecular dynamics simulation package" SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz" @@ -12,52 +12,53 @@ LICENSE="GPL-2" SLOT="0" -KEYWORDS="~x86 ~amd64 ~ppc64" +KEYWORDS="~x86 ~amd64 ~ppc64 ~ia64" #mpi is a local USE flag now #May become official when situation with mpich is cleared (now the only mpi implementation awailable is lam-mpi) -DEPEND="=sci-libs/fftw-2.1* - mpi? ( >=sys-cluster/lam-mpi-6.5.6 ) - >=sys-devel/binutils-2.10.91.0.2 - app-shells/tcsh - xml2? ( dev-libs/libxml2 )" - -pkg_setup() { - # !!!Please note!!! - # for troublesome work gromacs should be compiled with the same mpi setting - # as fftw. - if use mpi; then - if ! built_with_use =sci-libs/fftw-2.1* mpi; then - die "=sci-libs/fftw-2.1* must be built with USE=mpi." - fi - fi -} - -src_unpack() { - unpack ${A} - if use ppc64 && use altivec ; then - epatch ${FILESDIR}/${PN}-ppc64-altivec.patch - fi -} +DEPEND="sci-libs/fftw + mpi? ( sys-cluster/lam-mpi ) + >=sys-devel/binutils-2.12 + app-shells/tcsh" src_compile() { - # static should work but something's broken. - # gcc spec file may be screwed up. - # Static linking should try -lgcc instead of -lgcc_s. - # For more info: - # http://lists.debian.org/debian-gcc/2002/debian-gcc-200201/msg00150.html - econf \ - --enable-fortran \ - --datadir=/usr/share/${P} \ - --bindir=/usr/bin \ - --libdir=/usr/lib \ - $(use_with xml2 xml) \ - $(use_enable mpi) \ - $(use_enable altivec ppc-altivec) \ - $(use_enable alpha axp-asm) || die "configure failed" - -# $(use_enable static all-static) \ - + local flag + flag=`usev x86 amd64 ppc64 ia64` + echo ${flag} + case "${flag}" in + x86) + econf \ + --libdir=/usr/lib \ + $(use_enable mpi) \ + $(use_enable 3dnow ia32-3dnow) \ + $(use_enable sse ia32-sse) || die "configure failed" + ;; + amd64) + econf \ + --libdir=/usr/lib \ + $(use_enable mpi) \ + $(use_enable sse x86-64-sse) || die "configure failed" + ;; + ppc64) + econf \ + --libdir=/usr/lib \ + $(use_enable mpi) \ + $(use_enable altivec ppc-altivec) || die "configure failed" + ;; + ia64) + econf \ + --libdir=/usr/lib \ + --enable-ia64-asm \ + $(use_enable mpi) || die "configure failed" + ;; + *) + econf \ + --enable-fortran + --libdir=/usr/lib \ + $(use_enable mpi) || die "configure failed" + ;; + esac + emake || die } @@ -68,6 +69,5 @@ dodoc AUTHORS COPYING INSTALL README #move html docs under /usr/share/doc - #and leave examples and templates under /usr/gromacs... - mv ${D}/usr/share/${P}/html ${D}/usr/share/doc/${PF} + mv ${D}/usr/share/gromacs/html ${D}/usr/share/doc/${PF}/ }