--- gromacs-4.0.4.ebuild 2009-05-13 22:29:41.000000000 +0200 +++ gromacs-4.0.5.ebuild 2009-05-13 22:45:53.000000000 +0200 @@ -8,16 +8,18 @@ inherit autotools bash-completion eutils fortran multilib +TEST_PV="4.0.4" DESCRIPTION="The ultimate molecular dynamics simulation package" HOMEPAGE="http://www.gromacs.org/" SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz - test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${PV}.tgz ) + test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${TEST_PV}.tgz ) doc? ( ftp://ftp.gromacs.org/pub/manual/manual-4.0.pdf )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~ppc64 sparc ~x86" IUSE="X blas dmalloc doc -double-precision +fftw fkernels gsl lapack mpi +single-precision static test +xml zsh-completion" +RESTRICT="test" DEPEND="app-shells/tcsh X? ( x11-libs/libX11 ) @@ -33,7 +35,7 @@ src_prepare() { - epatch "${FILESDIR}/${P}-sparc-cyclecounter.patch" + epatch "${FILESDIR}/${PN}-4.0.4-sparc-cyclecounter.patch" # Fix typos in a couple of files. sed -e "s:+0f:-f:" -i share/tutor/gmxdemo/demo \ || die "Failed to fixup demo script." @@ -55,11 +57,13 @@ -i src/tools/Makefile.am \ || die "sed tools/Makefile.am failed" - use fkernels && epatch "${FILESDIR}/${P}-configure-gfortran.patch" + use fkernels && epatch "${FILESDIR}/${PN}-4.0.4-configure-gfortran.patch" eautoreconf cd "${WORKDIR}" + + use test && mv gmxtest "${P}" mv "${P}" "${P}-single" if ( use double-precision ) ; then einfo "Moving sources for Multiprecision Build" @@ -115,6 +119,7 @@ myconf="--datadir=/usr/share \ --bindir=/usr/bin \ --libdir=/usr/$(get_libdir) \ + --docdir=/usr/share/doc/"${PF}" \ $(use_with dmalloc) \ $(use_with fftw fft fftw3) \ $(use_with gsl) \ @@ -174,17 +179,14 @@ src_test() { if use single-precision ; then export PATH="${WORKDIR}/${P}-single/src/kernel:${WORKDIR}/${P}-single/src/tools:$PATH" - cd "${WORKDIR}/gmxtest" - #test is broken, only do simple tests - ./gmxtest.pl simple || die "Single Precision test failed" + cd "${WORKDIR}"/"${P}"-single + emake -j1 tests || die "Single Precision test failed" fi if use double-precision ; then export PATH="${WORKDIR}/${P}-double/src/kernel:${WORKDIR}/${P}-double/src/tools:$PATH" - cd "${WORKDIR}/gmxtest" - use single-precision && ./gmxtest.pl clean - #test is broken, only do simple tests - ./gmxtest.pl -double simple || die "Double Precision test failed" + cd "${WORKDIR}"/"${P}"-double + emake -j1 tests || die "Double Precision test failed" fi } @@ -213,11 +215,7 @@ rm -r "${D}"/usr/bin/completion.* dodoc AUTHORS INSTALL README - if use doc; then - # Move html and leave examples and templates under /usr/share/gromacs. - mv "${D}"/usr/share/"${PN}"/html "${D}"/usr/share/doc/"${PF}"/ - dodoc "${DISTDIR}"/manual-4.0.pdf - fi + use doc && dodoc "${DISTDIR}"/manual-4.0.pdf } pkg_postinst() {