# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-3.3.1.ebuild,v 1.1 2006/08/08 02:54:41 markusle Exp $ inherit eutils fortran IUSE="altivec mpi xml double-precision static fortran blas lapack" 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" # gromacs uses fortran intrinsics such as RSHIFT that # are currently missing from gfortran; hence we need # to require g77 for the time being (see bug #141672). FORTRAN="g77" #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? ( virtual/mpi ) >=sys-devel/binutils-2.15 app-shells/tcsh xml? ( dev-libs/libxml2 ) blas? ( virtual/blas ) lapack? ( virtual/lapack )" pkg_setup() { if use fortran; then fortran_pkg_setup fi } src_unpack() { unpack ${A} if use ppc64 && use altivec ; then epatch ${FILESDIR}/${PN}-ppc64-altivec.patch fi } 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 if use blas; then export LIBS="$LIBS -lblas" fi if use lapack; then export LIBS="$LIBS -llapack" fi econf \ --datadir=/usr/share \ --bindir=/usr/bin \ --libdir=/usr/lib \ --program-suffix= \ $(use_with xml) \ $(use_enable fortran) \ $(use_enable double-precision double) \ $(use_enable mpi) \ $(use_enable altivec ppc-altivec) \ $(use_enable alpha axp-asm) \ $(use_with blas external-blas) \ $(use_with lapack external-lapack) \ $(use_enable static all-static) || die "configure failed" emake || die } src_install () { make DESTDIR=${D} install || die # Install documentation. dodoc AUTHORS COPYING INSTALL README #move html docs under /usr/share/doc #and leave examples and templates under /usr/gromacs... mv ${D}/usr/share/gromacs/html ${D}/usr/share/doc/${PF} }