diff options
author | Christoph Junghans <kleiner_otti@gmx.de> | 2010-06-22 22:59:17 +0200 |
---|---|---|
committer | Christoph Junghans <kleiner_otti@gmx.de> | 2010-06-22 23:00:53 +0200 |
commit | e676795c5ca87548bbd8ed7d0a6a19a9b412fc35 (patch) | |
tree | 6ec2609874b7e7fb3935b3cc65b8bffa9e2e08c1 | |
parent | condor: more config fixes (diff) | |
download | sci-e676795c5ca87548bbd8ed7d0a6a19a9b412fc35.tar.gz sci-e676795c5ca87548bbd8ed7d0a6a19a9b412fc35.tar.bz2 sci-e676795c5ca87548bbd8ed7d0a6a19a9b412fc35.zip |
sci-chemistry/gromacs: added stable patch + prefix
(Portage version: 2.1.8.3/git/Linux i686)
(Signed Manifest commit)
-rw-r--r-- | sci-chemistry/gromacs/ChangeLog | 6 | ||||
-rw-r--r-- | sci-chemistry/gromacs/Manifest | 10 | ||||
-rw-r--r-- | sci-chemistry/gromacs/files/gromacs-4.0.7to2010-06-08.patch.gz | bin | 0 -> 11869 bytes | |||
-rw-r--r-- | sci-chemistry/gromacs/gromacs-4.0.7-r3.ebuild | 297 |
4 files changed, 309 insertions, 4 deletions
diff --git a/sci-chemistry/gromacs/ChangeLog b/sci-chemistry/gromacs/ChangeLog index 48046093e..341f7bbc8 100644 --- a/sci-chemistry/gromacs/ChangeLog +++ b/sci-chemistry/gromacs/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*gromacs-4.0.7-r3 (22 Jun 2010) + + 22 Jun 2010; Christoph Junghans <kleiner_otti@gmx.de> + +gromacs-4.0.7-r3.ebuild, +files/gromacs-4.0.7to2010-06-08.patch.gz: + added patches from stable branch + *gromacs-4.0.7-r2 (26 Feb 2010) 26 Feb 2010; Alexey Shvetsov <alexxy@gentoo.org> +gromacs-4.0.7-r2.ebuild: diff --git a/sci-chemistry/gromacs/Manifest b/sci-chemistry/gromacs/Manifest index 073271aee..d2006acf2 100644 --- a/sci-chemistry/gromacs/Manifest +++ b/sci-chemistry/gromacs/Manifest @@ -1,6 +1,7 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX gromacs-4.0.7to2010-06-08.patch.gz 11869 RMD160 131579a5f0e03b3193b65013060cb6a2cbbaa1f9 SHA1 8009e50241ab79994fb450f409b0bbf7f39267e5 SHA256 c71f29372492c44f5b14b3ea2fa6ee5fbdad25c98b7ba53d722b9f516a3e7136 AUX gromacs-4.0.9999-ccache.patch 678 RMD160 043d0e207e04a275fe00a3bd2b28f8dc0dfd4b7f SHA1 08bc5ac8bc0b28f68e1ede994d49616dd920af5d SHA256 ca477d54351c418f1d39dda29373a1426c9403ec0d2f21c28fc7568227d47632 AUX gromacs-4.0.9999-configure-gfortran.patch 760 RMD160 1700579b0c2dfb8cbb743d795aa9f0f9f467c06b SHA1 e6924d3598b20195fcb6809e64f333def5b0f919 SHA256 1a59dfde8a3db8db729bd19691a5945e02be2725fa66ec0b125ab3b931518761 AUX gromacs-4.0.9999-docdir.patch 1352 RMD160 336ab23b4b65430caf3205650a8787e8e33d2137 SHA1 77e0cc966c4d755f603b2d0ab9a075c0ee6b7361 SHA256 8ead457b06f7f943455a95494be4648e539934699d29e955d2e05ac02f1ca4ef @@ -9,14 +10,15 @@ DIST gmxtest-4.0.4.tgz 14845017 RMD160 c7c583415438bdef4c9996da9064254e9460cf16 DIST gromacs-4.0.7.tar.gz 8404518 RMD160 4fa8e5c90f549ef627a98a907a166676692a4c4b SHA1 8519bef2fa989fb487d54612b0a2d0228f228b30 SHA256 048f8ece2829f01d99f7e04e1d6e8f88d3a32273192274f2e9fcf71f41f212c1 DIST manual-4.0.pdf 2135100 RMD160 b963642f8e1433f11328c3d0c4b1645c9de506da SHA1 8ae951ee15b2a7dc626331fce36511bc8766144c SHA256 646f810477eee2d710de6019c52056550413d0ba77baf9680195c835ddafe80a EBUILD gromacs-4.0.7-r2.ebuild 9140 RMD160 b82dadb42718e908dc185126e509a85e5535b924 SHA1 125a64f4a703ae31e83900d880a16933a3b0f7a4 SHA256 d9e77d56b79382ab1922cef41b679e58a2b9498755791f7d349c69022503d20b +EBUILD gromacs-4.0.7-r3.ebuild 9467 RMD160 b61e85fdb4cd533ca86079b9cdd37440a978d47c SHA1 3cbf238ac7bb014f7d4925f953ccc50d2d085a39 SHA256 0bb6fe54603d1633ef47797215ac32c167f687a14ba9fe49f32d5bb548fc4960 EBUILD gromacs-4.0.9999.ebuild 6857 RMD160 727af5d38f52f5db01f6185c7ca0a7c05191be21 SHA1 2d1988574567e9c19af1d5624e51055a6b39d199 SHA256 b2304948a62c4e42c048e7912b24354265901ce6d9e7ac260ee65fa5ed7f56f5 EBUILD gromacs-9999.ebuild 6447 RMD160 40392fd740056f9a533d2126ab374964d048f496 SHA1 b6bb1fa00d20b8e13455984e5e2ed661eff0f678 SHA256 07c745f4cb7563911a313b572af25eba4f613f3aeb733f8e80dd6b4df7f79a5e -MISC ChangeLog 3857 RMD160 fd386421d92203a76537e5be2139ab8b45963e1b SHA1 97697fab3f3a5e3094a7fef94492ac6c65baa885 SHA256 5417e5d00d84f1526a7d733f6063a388ec180d5f18895919cec3092526570931 +MISC ChangeLog 4053 RMD160 6f4f1e612ae4596b4ba09a7b781111816df5bde6 SHA1 16fe830d0e94f2fdce671a9c66e3e8470633549e SHA256 b873ec88874222a9d51a78a4838bf57a1fe623ede273746d13f924a4f78dde4b MISC metadata.xml 643 RMD160 e9ffc42d792f15f3d4438a0de225277ec4814041 SHA1 c83fd4a32d896b7a2586667bc684d46f9daf8693 SHA256 177885ec674e8630a9c9451a0e0a35fc83615b39b387a67002e27f1b0d6b19b2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) -iEYEARECAAYFAkuJmq8ACgkQ5BmOA85PVLgyHQCfbhMOuMoFbV9Gg2A9673jvmb9 -kz8Anj+gnYlcCEabKK3cRIoHW1F4GCma -=QEMr +iEUEARECAAYFAkwhJCUACgkQy0OE/ans1/mfwgCY9ZLTZtxbOaEYWAI7iAdCvOR5 +fACfYjPPpjaM48MvQl1gH7qhzgNtJ8s= +=4CKc -----END PGP SIGNATURE----- diff --git a/sci-chemistry/gromacs/files/gromacs-4.0.7to2010-06-08.patch.gz b/sci-chemistry/gromacs/files/gromacs-4.0.7to2010-06-08.patch.gz Binary files differnew file mode 100644 index 000000000..b3a36d0d1 --- /dev/null +++ b/sci-chemistry/gromacs/files/gromacs-4.0.7to2010-06-08.patch.gz diff --git a/sci-chemistry/gromacs/gromacs-4.0.7-r3.ebuild b/sci-chemistry/gromacs/gromacs-4.0.7-r3.ebuild new file mode 100644 index 000000000..68ad9fbea --- /dev/null +++ b/sci-chemistry/gromacs/gromacs-4.0.7-r3.ebuild @@ -0,0 +1,297 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.7-r1.ebuild,v 1.1 2010/01/24 19:39:09 alexxy Exp $ + +EAPI="3" + +LIBTOOLIZE="true" +TEST_PV="4.0.4" + +inherit autotools bash-completion eutils fortran multilib + +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-${TEST_PV}.tgz ) + doc? ( ftp://ftp.gromacs.org/pub/manual/manual-4.0.pdf ) + ffamber? ( http://ffamber.cnsm.csulb.edu/ffamber_v4.0-doc.tar.gz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="X blas dmalloc doc -double-precision ffamber +fftw fkernels +gsl lapack +mpi +single-precision static static-libs test +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 )" + +RDEPEND="${DEPEND}" + +RESTRICT="test" + +src_prepare() { + + epatch "${FILESDIR}/${P}to2010-06-08.patch.gz" + sed -e '/AC_INIT/s/4\.0\.7/&-2010-06-08/' -i configure.ac \ + || die "Failed to change version in configure.ac" + epatch "${FILESDIR}/${PN}-4.0.9999-docdir.patch" + epatch "${FILESDIR}/${PN}-4.0.9999-ccache.patch" + # Fix typos in a couple of files. + sed -e "s:+0f:-f:" -i share/tutor/gmxdemo/demo \ + || die "Failed to fixup demo script." + + # Fix a sandbox violation that occurs when re-emerging with mpi. + sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${ED}usr/$( get_libdir )\" ; \\\\" \ + -i src/tools/Makefile.am \ + || die "sed tools/Makefile.am failed" + + sed -e "s:\$\$libdir:\$temp_libdir:" \ + -i src/tools/Makefile.am \ + || die "sed tools/Makefile.am failed" + + sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${ED}usr/$( get_libdir )\" ; \\\\" \ + -i src/tools/Makefile.am \ + || die "sed tools/Makefile.am failed" + + sed -e "s:\$\$libdir:\$\$temp_libdir:" \ + -i src/tools/Makefile.am \ + || die "sed tools/Makefile.am failed" + + use fkernels && epatch "${FILESDIR}/${PN}-4.0.9999-configure-gfortran.patch" + + eautoreconf + GMX_DIRS="" + use single-precision && GMX_DIRS+=" single" + use double-precision && GMX_DIRS+=" double" + 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 + 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" + + #from gromacs configure + if ! use fftw; then + 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..." + fi + + if [[ $(gcc-version) == "4.1" ]]; then + eerror "gcc 4.1 is not supported by gromacs" + eerror "please run test suite" + die + fi + + #note for gentoo-PREFIX on apple: use --enable-apple-64bit + + #fortran will gone in gromacs 4.1 anyway + #note for gentoo-PREFIX on aix, fortran (xlf) is still much faster + if use fkernels; then + ewarn "Fortran kernels are usually not faster than C kernels and assembly" + ewarn "I hope, you know what are you doing..." + FORTRAN="g77 gfortran ifc" + myconf="${myconf} --enable-fortran" && fortran_pkg_setup + 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} $(use_enable static all-static)" + else + myconf="${myconf} --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) \ + ${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 + #from gromacs manual + elog + elog "For most simulations single precision is accurate enough. In some" + elog "cases double precision is required to get reasonable results:" + elog + elog "-normal mode analysis, for the conjugate gradient or l-bfgs minimization" + elog " and the calculation and diagonalization of the Hessian " + elog "-calculation of the constraint force between two large groups of atoms" + elog "-energy conservation: this can only be done without temperature coupling and" + elog " without cutoffs" + elog + fi + + if use mpi ; then + elog "You have enabled mpi, only mdrun will make use of mpi, that is why" + elog "we configure/compile gromacs twice (with and without mpi) and only" + elog "install mdrun with mpi support. In addtion you will get libgmx and" + elog "libmd with and without mpi support." + fi + + myconfdouble="${myconf} --enable-double --program-suffix='${suffixdouble}'" + myconfsingle="${myconf} --enable-float --program-suffix=''" + for x in ${GMX_DIRS}; do + einfo "Configuring for ${x} precision" + cd "${S}-${x}" + local p=myconf${x} + ECONF_SOURCE="${S}" econf ${!p} --disable-mpi + use mpi || continue + cd "${S}-${x}_mpi" + ECONF_SOURCE="${S}" econf ${!p} --enable-mpi + done +} + +src_compile() { + for x in ${GMX_DIRS}; do + cd "${S}-${x}" + einfo "Compiling for ${x} precision" + emake || die "emake for ${x} precision failed" + use mpi || continue + cd "${S}-${x}_mpi" + emake mdrun || die "emake mdrun for ${x} precision failed" + 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}" + emake -j1 tests || die "${x} Precision test failed" + export PATH="${oldpath}" + done +} + +src_install() { + for x in ${GMX_DIRS}; do + cd "${S}-${x}" + emake DESTDIR="${ED}" install || die "emake install for ${x} failed" + use mpi || continue + cd "${S}-${x}_mpi" + emake DESTDIR="${ED}" install-mdrun || die "emake install-mdrun for ${x} failed" + done + + sed -n -e '/^GMXBIN/,/^GMXDATA/p' "${ED}"/usr/bin/GMXRC.bash > "${T}/80gromacs" + doenvd "${T}/80gromacs" + rm -f "${ED}"/usr/bin/GMXRC* + + dobashcompletion "${ED}"/usr/bin/completion.bash ${PN} + if use zsh-completion ; then + insinto "${EPREFIX}"/usr/share/zsh/site-functions + newins "${ED}"/usr/bin/completion.zsh _${PN} + fi + rm -r "${ED}"/usr/bin/completion.* + + cd "${S}" + dodoc AUTHORS INSTALL README + use doc && dodoc "${DISTDIR}/manual-4.0.pdf" + + if use ffamber; then + use doc && dodoc "${WORKDIR}/ffamber_v4.0/README/pdfs/*.pdf" + # prepare vdwradii.dat + cat >>"${D}"/usr/share/gromacs/top/vdwradii.dat <<-EOF + SOL MW 0 + SOL LP 0 + EOF + # regenerate aminoacids.dat + cat "${WORKDIR}"/ffamber_v4.0/aminoacids*.dat \ + "${D}"/usr/share/gromacs/top/aminoacids.dat \ + | awk '{print $1}' | sort -u | tail -n+4 | wc -l \ + >> "${D}"/usr/share/gromacs/top/aminoacids.dat.new + cat "${WORKDIR}"/ffamber_v4.0/aminoacids*.dat \ + "${D}"/usr/share/gromacs/top/aminoacids.dat \ + | awk '{print $1}' | sort -u | tail -n+4 \ + >> "${D}"/usr/share/gromacs/top/aminoacids.dat.new + mv -f "${D}"/usr/share/gromacs/top/aminoacids.dat.new \ + "${D}"/usr/share/gromacs/top/aminoacids.dat + # copy ff files + for x in ffamber94 ffamber96 ffamber99 ffamber99p ffamber99sb \ + ffamberGS ffamberGSs ffamber03 ; do + einfo "Adding ${x} to gromacs" + cp "${WORKDIR}"/ffamber_v4.0/${x}/* "${D}"/usr/share/gromacs/top + done + # copy suplementary files + cp "${WORKDIR}"/ffamber_v4.0/*.gro "${D}"/usr/share/gromacs/top + cp "${WORKDIR}"/ffamber_v4.0/*.itp "${D}"/usr/share/gromacs/top + # actualy add records to FF.dat + cat >>"${D}"/usr/share/gromacs/top/FF.dat.new <<-EOF + ffamber94 AMBER94 Cornell protein/nucleic forcefield + ffamber96 AMBER96 Kollman protein/nucleic forcefield + ffamberGS AMBER-GS Garcia & Sanbonmatsu forcefield + ffamberGSs AMBER-GSs Nymeyer & Garcia forcefield + ffamber99 AMBER99 Wang protein/nucleic acid forcefield + ffamber99p AMBER99p protein/nucleic forcefield + ffamber99sb AMBER99sb Hornak protein/nucleic forcefield + ffamber03 AMBER03 Duan protein/nucleic forcefield + EOF + cat "${D}"/usr/share/gromacs/top/FF.dat \ + "${D}"/usr/share/gromacs/top/FF.dat.new \ + | tail -n+2 > "${D}"/usr/share/gromacs/top/FF.dat.new2 + cat "${D}"/usr/share/gromacs/top/FF.dat.new2 | wc -l > \ + "${D}"/usr/share/gromacs/top/FF.dat + cat "${D}"/usr/share/gromacs/top/FF.dat.new2 >> \ + "${D}"/usr/share/gromacs/top/FF.dat + rm -f "${D}"/usr/share/gromacs/top/FF.dat.new* + fi +} + +pkg_postinst() { + env-update && source /etc/profile + elog + elog "Please read and cite:" + elog "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). " + elog "http://dx.doi.org/10.1021/ct700301q" + elog + bash-completion_pkg_postinst + elog + elog $(luck) + elog "For more Gromacs cool quotes (gcq) add luck to your .bashrc" + elog +} |