diff options
-rw-r--r-- | sci-chemistry/gromacs/Manifest | 12 | ||||
-rw-r--r-- | sci-chemistry/gromacs/gromacs-4.5.9999.ebuild | 6 | ||||
-rw-r--r-- | sci-chemistry/gromacs/gromacs-9999.ebuild | 172 | ||||
-rw-r--r-- | sci-chemistry/gromacs/metadata.xml | 2 |
4 files changed, 69 insertions, 123 deletions
diff --git a/sci-chemistry/gromacs/Manifest b/sci-chemistry/gromacs/Manifest index e93a66e54..a063c2f16 100644 --- a/sci-chemistry/gromacs/Manifest +++ b/sci-chemistry/gromacs/Manifest @@ -6,14 +6,14 @@ DIST gmxtest-4.0.4.tgz 14845017 RMD160 c7c583415438bdef4c9996da9064254e9460cf16 DIST gromacs-manual-4.0.pdf 2135100 RMD160 b963642f8e1433f11328c3d0c4b1645c9de506da SHA1 8ae951ee15b2a7dc626331fce36511bc8766144c SHA256 646f810477eee2d710de6019c52056550413d0ba77baf9680195c835ddafe80a DIST gromacs-manual-4.5.3.pdf 2438528 RMD160 07f5ec0db1a773e77806c79554e5bb4fa8533dfd SHA1 7c81fc18e426d1090c485968d81957977ff10fc9 SHA256 6794fca3a2125918a03cd6bae3c031ab9b213c42a5f68a720c955b9107508717 EBUILD gromacs-4.0.9999.ebuild 9246 RMD160 95001d304942bd265c0e70427fe63ca49e770a7e SHA1 ad25ea57c49b1128e0cfca42b7b32650fffd38b0 SHA256 440f06529eaf1532846f490da3bf403e6f84dec0a1b81b5e35a121d06dd999e6 -EBUILD gromacs-4.5.9999.ebuild 7137 RMD160 e7d8537a1ea2cfb6aadb891fb814b8fd185daa9b SHA1 bdff4931423d7951964eea99931efe138cebd7d4 SHA256 e115d41c864ae2425a1d22b937366c9308cbcf996cd45ad8e0307774882c6efb -EBUILD gromacs-9999.ebuild 8044 RMD160 4f8d53c0c60e67f1b5e2a352477b89b03fe4687c SHA1 5c4c66baeeb1b8ae0ab320bb4ccd5564f72f93db SHA256 8bd2c6691a8e1d15dfbb77577125e793a7446affb12c1dbc95858f6eb993a004 +EBUILD gromacs-4.5.9999.ebuild 7109 RMD160 477f3140348a54c02e293b6920c587ea76eea64d SHA1 dd2cefe969b8e3a54513f511ca5f59ed4306ff9a SHA256 e947c5af826deb921d11bc7265931fb0450c1863522764d3ad1cbdcd341ea805 +EBUILD gromacs-9999.ebuild 6547 RMD160 a32f28e0bb924ab1530ae67191d0a66677443e26 SHA1 85c471c800bd000cd5fe05336aaaa4e14d2a1cce SHA256 5125d47058c40d1d585f2f6e990c0eb9f6e1359c764f15b39277347c8f56b217 MISC ChangeLog 7122 RMD160 05de63cfa5948ab72896af1c960ab236cf37f63d SHA1 254fc701151ec7f523e3f5bcc1ac2a37c7c83995 SHA256 f7ce1c4e501645935851675fb54c1e85c0e5d43f459bb2238f7d1494b70ed0f1 -MISC metadata.xml 643 RMD160 e9ffc42d792f15f3d4438a0de225277ec4814041 SHA1 c83fd4a32d896b7a2586667bc684d46f9daf8693 SHA256 177885ec674e8630a9c9451a0e0a35fc83615b39b387a67002e27f1b0d6b19b2 +MISC metadata.xml 653 RMD160 7a5806cc6c09d27a08bcde12013178d17e95c24c SHA1 8ef4ee5a4c53e94b7e3b21b67c66b0c88060dca7 SHA256 c90bb30fd31a868972a5254fca17cddd1cab3c7913b98acd355671525eb61fcc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) -iEYEARECAAYFAk0p4soACgkQy0OE/ans1/maTQCcClMnLgUtcn1WRfhSNV1NIOkd -rzsAmwfWD781uLw9ITdMvkUnYexL5Kvq -=X1gb +iEYEARECAAYFAk0qCLUACgkQy0OE/ans1/nGIQCfXnAgz5EtM3jrEIs6c+68hnEK +6iYAoIWX0XeoIVhmra6ZIHnciqMHkUOy +=I3j3 -----END PGP SIGNATURE----- diff --git a/sci-chemistry/gromacs/gromacs-4.5.9999.ebuild b/sci-chemistry/gromacs/gromacs-4.5.9999.ebuild index a46e5dba7..46ee8ab7d 100644 --- a/sci-chemistry/gromacs/gromacs-4.5.9999.ebuild +++ b/sci-chemistry/gromacs/gromacs-4.5.9999.ebuild @@ -63,10 +63,8 @@ src_prepare() { [ -z "$GMX_DIRS" ] && GMX_DIRS+=" float" for x in ${GMX_DIRS}; do - mkdir "${S}-${x}" || die - use test && cp -r "${WORKDIR}"/gmxtest "${S}-${x}" - use mpi || continue - mkdir "${S}-${x}_mpi" || die + mkdir -p "${WORKDIR}/${P}_${x}" || die + use test && cp -r "${WORKDIR}"/gmxtest "${WORKDIR}/${P}_${x}" done } diff --git a/sci-chemistry/gromacs/gromacs-9999.ebuild b/sci-chemistry/gromacs/gromacs-9999.ebuild index 55d0ddc70..8c1da6385 100644 --- a/sci-chemistry/gromacs/gromacs-9999.ebuild +++ b/sci-chemistry/gromacs/gromacs-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ @@ -6,11 +6,12 @@ EAPI="3" LIBTOOLIZE="true" TEST_PV="4.0.4" +MANUAL_PV="4.5.3" EGIT_REPO_URI="git://git.gromacs.org/gromacs" EGIT_BRANCH="master" -inherit autotools bash-completion eutils git multilib toolchain-funcs +inherit bash-completion cmake-utils git multilib toolchain-funcs DESCRIPTION="The ultimate molecular dynamics simulation package" HOMEPAGE="http://www.gromacs.org/" @@ -19,17 +20,15 @@ SRC_URI="test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${TEST_PV}.tgz )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="X blas dmalloc doc -double-precision +fftw fkernels +gsl lapack -mpi +single-precision static static-libs test +threads +xml zsh-completion" +IUSE="X altivec blas doc -double-precision +fftw fkernels lapack +mpi +single-precision sse test +threads +xml zsh-completion" DEPEND="app-shells/tcsh X? ( x11-libs/libX11 x11-libs/libSM x11-libs/libICE ) - dmalloc? ( dev-libs/dmalloc ) blas? ( virtual/blas ) fftw? ( sci-libs/fftw:3.0 ) - gsl? ( sci-libs/gsl ) lapack? ( virtual/lapack ) mpi? ( virtual/mpi ) xml? ( dev-libs/libxml2 )" @@ -38,16 +37,11 @@ RDEPEND="${DEPEND}" RESTRICT="test" +#gromacs has gnu exec stacks for speedup QA_EXECSTACK="usr/lib/libgmx.so.* usr/lib/libgmx_d.so.*" -use static && QA_EXECSTACK="$QA_EXECSTACK usr/bin/*" - src_prepare() { - - ( use single-precision || use double-precision ) || \ - die "Nothing to compile, enable single-precision and/or double-precision" - if use mpi && use threads; then elog "mdrun uses only threads OR mpi, and gromacs favours the" elog "use of mpi over threads, so a mpi-version of mdrun will" @@ -55,39 +49,28 @@ src_prepare() { elog "machines only, you can safely disable mpi" fi - if use static; then - use X && die "You cannot compile a static version with X support, disable X or static" - use xml && die "You cannot compile a static version with xml support - (see bug #306479), disable xml or static" - fi - epatch_user eautoreconf + GMX_DIRS="" - use single-precision && GMX_DIRS+=" single" + use single-precision && GMX_DIRS+=" float" use double-precision && GMX_DIRS+=" double" + #if neither single-precision nor double-precision is enabled + #build at least default (single) + [ -z "$GMX_DIRS" ] && GMX_DIRS+=" float" + for x in ${GMX_DIRS}; do - mkdir "${S}-${x}" || die - use test && cp -r "${WORKDIR}"/gmxtest "${S}-${x}" - use mpi || continue - mkdir "${S}-${x}_mpi" || die + mkdir -p "${WORKDIR}/${P}_${x}" || die + use test && cp -r "${WORKDIR}"/gmxtest "${WORKDIR}/${P}_${x}" done } src_configure() { - local myconf - local myconfsingle - local myconfdouble - local suffixdouble - - #leave all assembly options enabled mdrun is smart enough to deside itself - #there so no gentoo on bluegene! - myconf="${myconf} --disable-bluegene" - - #we have pkg-config files - myconf="${myconf} --disable-la-files" - + local mycmakeargs_pre=( ) #from gromacs configure - if ! use fftw; then + if use fftw; then + mycmakeargs_pre+=("-DGMX_FFT_LIBRARY=fftw3") + else + mycmakeargs_pre+=("-DGMX_FFT_LIBRARY=fftpack") ewarn "WARNING: The built-in FFTPACK routines are slow." ewarn "Are you sure you don\'t want to use FFTW?" ewarn "It is free and much faster..." @@ -101,54 +84,12 @@ src_configure() { #note for gentoo-PREFIX on apple: use --enable-apple-64bit - #fortran will gone in gromacs 4.1 anyway + #fortran will gone in gromacs 5.0 anyway #note for gentoo-PREFIX on aix, fortran (xlf) is still much faster if use fkernels; then - use threads && die "You cannot compile fortran kernel with threads" + use threads && eerror "You cannot compile fortran kernel with threads" ewarn "Fortran kernels are usually not faster than C kernels and assembly" ewarn "I hope, you know what are you doing..." - myconf="${myconf} --enable-fortran" - else - myconf="${myconf} --disable-fortran" - fi - - # if we need external blas - if use blas; then - export LIBS="${LIBS} -lblas" - myconf="${myconf} $(use_with blas external-blas)" - fi - - # if we need external lapack - if use lapack; then - export LIBS="${LIBS} -llapack" - myconf="${myconf} $(use_with lapack external-lapack)" - fi - - # by default its better to have dynamicaly linked binaries - if use static; then - #gmx build static libs by default - myconf="${myconf} --disable-shared $(use_enable static all-static)" - else - myconf="${myconf} --disable-all-static --enable-shared $(use_enable static-libs static)" - fi - - myconf="--datadir="${EPREFIX}"/usr/share \ - --bindir="${EPREFIX}"/usr/bin \ - --libdir="${EPREFIX}"/usr/$(get_libdir) \ - --docdir="${EPREFIX}"/usr/share/doc/"${PF}" \ - $(use_with dmalloc) \ - $(use_with fftw fft fftw3) \ - $(use_with gsl) \ - $(use_with X x) \ - $(use_with xml) \ - $(use_enable threads) \ - ${myconf}" - - #if we build single and double - double is suffixed - if ( use double-precision && use single-precision ); then - suffixdouble="_d" - else - suffixdouble="" fi if use double-precision ; then @@ -172,40 +113,54 @@ src_configure() { elog "libmd with and without mpi support." fi - myconfdouble="${myconf} --enable-double --program-suffix='${suffixdouble}'" - myconfsingle="${myconf} --enable-float --program-suffix=''" + # if we need external blas or lapack + use blas && export LIBS+=" -lblas" + use lapack && export LIBS+=" -llapack" + + #go from slowest to faster acceleration + local acce="none" + use altivec && acce="altivec" + use ia64 && acce="ia64" + use fkernels && acce="fortran" + use sse && acce="sse" + + mycmakeargs_pre+=( + $(cmake-utils_use X GMX_X11) + $(cmake-utils_use threads GMX_THREADS) + $(cmake-utils_use lapack GMX_EXTERNAL_LAPACK) + $(cmake-utils_use blas GMX_EXTERNAL_BLAS) + -DGMX_ACCELERATION="$acce" + ) + for x in ${GMX_DIRS}; do + einfo "Compiling for ${x} precision" einfo "Configuring for ${x} precision" - cd "${S}-${x}" - local p=myconf${x} - ECONF_SOURCE="${S}" econf ${!p} --disable-mpi CC="$(tc-getCC)" F77="$(tc-getFC)" + local p + [ "${x}" = "dobule" ] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF" + mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF ) + CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure use mpi || continue - cd "${S}-${x}_mpi" - ECONF_SOURCE="${S}" econf ${!p} --enable-mpi CC="$(tc-getCC)" F77="$(tc-getFC)" + mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=ON ) + CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure done } src_compile() { for x in ${GMX_DIRS}; do - cd "${S}-${x}" einfo "Compiling for ${x} precision" - emake || die "emake for ${x} precision failed" - if use doc && [ -z "$OPTDIR" ]; then - cd src/contrib - emake options || die "emake options failed" - OPTDIR="${PWD}" - fi + CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}"\ + cmake-utils_src_compile use mpi || continue - cd "${S}-${x}_mpi" - emake mdrun || die "emake mdrun for ${x} precision failed" + CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}"\ + cmake-utils_src_compile mdrun done } src_test() { for x in ${GMX_DIRS}; do local oldpath="${PATH}" - export PATH="${S}-${x}/src/kernel:${S}-{x}/src/tools:${PATH}" - cd "${S}-${x}" + export PATH="${WORKDIR}/${P}_${x}/src/kernel:${S}-{x}/src/tools:${PATH}" + cd "${WORKDIR}/${P}_${x}" emake -j1 tests || die "${x} Precision test failed" export PATH="${oldpath}" done @@ -213,11 +168,13 @@ src_test() { src_install() { for x in ${GMX_DIRS}; do - cd "${S}-${x}" - emake DESTDIR="${D}" install || die "emake install for ${x} failed" + CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}" \ + cmake-utils_src_install use mpi || continue - cd "${S}-${x}_mpi" - emake DESTDIR="${D}" install-mdrun || die "emake install-mdrun for ${x} failed" + #cmake-utils_src_install does not support args + #using cmake-utils_src_compile instead + CMAKE_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \ + cmake-utils_src_make install-mdrun DESTDIR="${D}" done sed -n -e '/^GMXBIN/,/^GMXDATA/p' "${ED}"/usr/bin/GMXRC.bash > "${T}/80gromacs" @@ -240,14 +197,8 @@ src_install() { cd "${S}" dodoc AUTHORS INSTALL* README* if use doc; then + newdoc "${DISTDIR}/gromacs-manual-${MANUAL_PV}.pdf" "manual-${MANUAL_PV}.pdf" dohtml -r "${ED}usr/share/gromacs/html/" - insinto /usr/share/gromacs - doins "admin/programs.txt" - ls -1 "${ED}"/usr/bin | sed -e '/_d$/d' > "${T}"/programs.list - doins "${T}"/programs.list - cd "${OPTDIR}" || die "cd "${OPTDIR}" failed" - ../../libtool --mode=install cp options "${ED}"/usr/bin/g_options \ - || die "install of g_options failed" fi rm -rf "${ED}usr/share/gromacs/html/" } @@ -266,7 +217,4 @@ pkg_postinst() { elog elog "Gromacs can use sci-chemistry/vmd to read additional file formats" elog - if use doc; then - elog "Live Gromacs manual is available from app-doc/gromacs-manual" - fi } diff --git a/sci-chemistry/gromacs/metadata.xml b/sci-chemistry/gromacs/metadata.xml index c0e0dfc97..be7c210bb 100644 --- a/sci-chemistry/gromacs/metadata.xml +++ b/sci-chemistry/gromacs/metadata.xml @@ -8,7 +8,7 @@ <flag name='ffamber'>Enable ffamber ports for gromacs</flag> <flag name='fkernels'>Enable building of Fortran Kernels for platforms that dont have assembly loops</flag> - <flag name='single-precision'>Single precision version of gromacs</flag> + <flag name='single-precision'>Single precision version of gromacs (default)</flag> <flag name='zsh-completion'>Enable zsh completion support</flag> </use> </pkgmetadata> |