# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-3.3.ebuild,v 1.1 2005/10/14 00:44:11 spyderous Exp $ inherit eutils IUSE="altivec mpi 3dnow sse double-precision threads" DESCRIPTION="The ultimate molecular dynamics simulation package" SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz" HOMEPAGE="http://www.gromacs.org/" LICENSE="GPL-2" SLOT="0" 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 mpi? ( sys-cluster/lam-mpi ) >=sys-devel/binutils-2.12 app-shells/tcsh" src_compile() { local flag flag=`usev x86 amd64 ppc64 ia64` case "${flag}" in x86) econf \ --libdir=/usr/lib \ $(use_enable mpi) \ $(use_enable double-precision double) \ $(use_enable threads) \ $(use_enable 3dnow ia32-3dnow) \ $(use_enable sse ia32-sse) || die "configure failed" ;; amd64) econf \ --libdir=/usr/lib \ $(use_enable mpi) \ $(use_enable double-precision double) \ $(use_enable threads) \ $(use_enable sse x86-64-sse) || die "configure failed" ;; ppc64) econf \ --libdir=/usr/lib \ $(use_enable mpi) \ $(use_enable double-precision double) \ $(use_enable threads) \ $(use_enable altivec ppc-altivec) || die "configure failed" ;; ia64) econf \ --libdir=/usr/lib \ --enable-ia64-asm \ $(use_enable double-precision double) \ $(use_enable threads) \ $(use_enable mpi) || die "configure failed" ;; *) econf \ --enable-fortran --libdir=/usr/lib \ $(use_enable double-precision double) \ $(use_enable threads) \ $(use_enable mpi) || die "configure failed" ;; esac emake || die } src_install () { make DESTDIR=${D} install || die # Install documentation. dodoc AUTHORS COPYING INSTALL README #move html docs under /usr/share/doc mv ${D}/usr/share/gromacs/html ${D}/usr/share/doc/${PF}/ }