summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2013-07-05 23:49:28 +0000
committerChristoph Junghans <ottxor@gentoo.org>2013-07-05 23:49:28 +0000
commit074faed509942054c0dba4b06eee2c523b3bd683 (patch)
treefb511334fdd8bdd83668d39eb21b020f5567f55c /sci-chemistry
parentbump tex4ht dep (previous revisions will not work with texlive 2013) (diff)
downloadhistorical-074faed509942054c0dba4b06eee2c523b3bd683.tar.gz
historical-074faed509942054c0dba4b06eee2c523b3bd683.tar.bz2
historical-074faed509942054c0dba4b06eee2c523b3bd683.zip
version bump
Package-Manager: portage-2.2.0_alpha186/cvs/Linux x86_64 Manifest-Sign-Key: 0xC2000586
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/gromacs/ChangeLog7
-rw-r--r--sci-chemistry/gromacs/Manifest26
-rw-r--r--sci-chemistry/gromacs/gromacs-4.6.3.ebuild283
3 files changed, 300 insertions, 16 deletions
diff --git a/sci-chemistry/gromacs/ChangeLog b/sci-chemistry/gromacs/ChangeLog
index ff68c8516190..715e44804083 100644
--- a/sci-chemistry/gromacs/ChangeLog
+++ b/sci-chemistry/gromacs/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-chemistry/gromacs
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.128 2013/07/04 13:33:49 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.129 2013/07/05 23:49:14 ottxor Exp $
+
+*gromacs-4.6.3 (05 Jul 2013)
+
+ 05 Jul 2013; Christoph Junghans <ottxor@gentoo.org> +gromacs-4.6.3.ebuild:
+ version bump
04 Jul 2013; Agostino Sarubbo <ago@gentoo.org> gromacs-4.6.2.ebuild:
Stable for ppc64, wrt bug #472124
diff --git a/sci-chemistry/gromacs/Manifest b/sci-chemistry/gromacs/Manifest
index 2d285796870d..4dd14b351ac2 100644
--- a/sci-chemistry/gromacs/Manifest
+++ b/sci-chemistry/gromacs/Manifest
@@ -1,5 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA256
AUX gromacs-4.5.5-cmake-cpp-asm.patch 2051 SHA256 b83f9252187caa3647a44166004191454257d8d187f2a3fb883824814b5379d4 SHA512 dbd48553a374d72fa7372295c264cf1949526b8317cb557b5d16585d1cb31ca728d2ad8e0cd4a82ce490894cc46f3e02d12e8ad69ba762997fcd8aa9cdab960b WHIRLPOOL 82a0177155b5bdb62b24b7cd55df492d0b7ac562f7d653f0626d7b12369877e15d588d2da8c5b8fad8b7e42f8d98647a1ff11dffdadab3c33cf100c9479e9a4f
AUX gromacs-4.5.5-enable-see.patch 1916 SHA256 bd4cbe8b46de33c0a62cd7234265b3e27c6363959f4b97aad447ef18c4e16bb3 SHA512 ff5e29f842eaf8808ed7e00985770c94adfceaf5f0a63bda80d61d09b6ee53a2bfa02cf13b7d0e7a06cc6aa4957bcd24e6e93679673d97116a96726500bbfe86 WHIRLPOOL af6c3b767341762851e1fd356d83f72d936d0f2a2257127053736a552ccbc1e7a06af91ead31ba24b0d03e2a12b5918ac86315478cf2cdbb5fdb5bd7c6f13df1
@@ -10,6 +10,7 @@ DIST gmxtest-4.0.4.tgz 14845017 SHA256 6a7f787f4bb7cbecb688115ff0854a5ffd2ef3348
DIST gromacs-4.5.5.tar.gz 10398178 SHA256 e0605e4810b0d552a8761fef5540c545beeaf85893f4a6e21df9905a33f871ba SHA512 8af0b81261a6b08c461275bccc4e72d23efd664ed5af12e3579956b5822ab6c6eea2ccbfbfe6ea1f4b30403a3c1367f52638e281cd1d7bc49e9220332c3e2b8c WHIRLPOOL 021a07171c3301184c48d31e2ad2068ce54b7746b9b0f9086d34796ddcfe750006e6f23bc0d8c52942fb491bd047411d7f5f21aaa9d7eb8ab9b7485fcb587f8c
DIST gromacs-4.5.7.tar.gz 10668518 SHA256 c344579ace3c35fbae87abdb0aceadaf71b060e10d7aa818ab3dd6f33ec4e903 SHA512 da5f9a702633cdc560ba813e62e80fe6b508903ecf97d611e5c8f58c5bf2961109362ea682a801b6e5f50cfb01bb6f60cdaaf759db928d076b25de72e19eee3b WHIRLPOOL ec17ead4d143abc25716f8f01f31b03fae4039de6145cdee7cada91f892f4c1818c622c513758ee33ab623cc3c354b07c5aef96036f1362591861dac21cdff64
DIST gromacs-4.6.2.tar.gz 10986082 SHA256 7bcccd15f02e7163455e1f342fc13e609e9088735b962d96afe0a79aaad92d4c SHA512 fe5991f66a638edd5af42c226302ccac4968b722df92eaeb8f65536fd5c7eb64cf7f0264bbfaa09998c870e396087f23b91e377d3abcc9a2d9456850b622b371 WHIRLPOOL 6d563046e2f7fc6178b4c94c7bb9a73a19df02a51b53e2556a5141809b6f286cac86c7b04afafab9e6038733c06ee67965a7dbe6db67d44e0363c18c036d3051
+DIST gromacs-4.6.3.tar.gz 10985615 SHA256 b748f912b606032471e7da2db349db44f53d717b2490ad9316eb962bd75eccd4 SHA512 dbb884af718406044cfcd0bf5f65c098435f79dafe4dc23b9bfcab9a8be936ed5e5a50c53afafbc15a1eb0970008cee30757999d09eef4a05b2c905d9a251775 WHIRLPOOL f074df431145e77bcae7ba0142b60c8bd70d73ca2f1fbff8cd3b8c4c4b9fcce6fbdfb044269b6256099d3dd12e344e065ba572f35dca20337a55e307163ba2c0
DIST gromacs-manual-4.5.4.pdf 2463242 SHA256 dc14504a7072b61e7aa576c48f04df03356824f3a9d9e744dfaf51529ab46252 SHA512 957995333163f6f28568a18d5423a75dc6c315215692da94d0916f09b6221e2a875c5ff4b05385ad6604bd8ae38f0cb61c740cd734c76b360aa4b598cd2c3380 WHIRLPOOL 07077d81ea89bc02207e45e56c77a668375a7284bf6f4a3cc7fe637f1f53ce4ab687c722f13f208cdd2c056b9d766ebfcbe5ea9579ce7649ec9e088371e7db8d
DIST gromacs-manual-4.5.6.pdf 2650364 SHA256 5c2a086c9cf1627008e3909b37ea5320eb9eeedf9833147d7b0f4e3688aaf339 SHA512 4035623df74d500abff35c7e08d0dbc8cd80f4fae4f580b6f72939d31a456c02fa00b5b47659767125cdf318db10c0cfac4d3f9584b7b384a48300efbfc590bc WHIRLPOOL 089bb4da2e5f51a0e8dfe4f76195b79daec10f661a48c48e491b9cda711f49e67a7e2d77c5bb884eaf4176ca3b0c20c389fc3a77e719a0870d548c3803929cdc
DIST gromacs-manual-4.6.2.pdf 6208213 SHA256 b95e4681d474caf0596d179a83f3e499b49e8900eb013900027a783a4c16c3d7 SHA512 e61fef9c2f1d978809c47723b48b35eddcfa5e98e573924d4b53d6aa686e893641b44ce07b217b9b3ecb34221f7eab3e7d0d6a8e1ced7f9db1ff478a32864574 WHIRLPOOL cd313c78472614f242e639d40764d3d797f4202bd52f706b4d0f0385b40dd6dac01a1676ec12374a2fb63e4490dc0a9ef39bbbc319d50fa59eaafcc6213df5f1
@@ -17,22 +18,17 @@ DIST regressiontests-4.6.2.tar.gz 43576124 SHA256 6f79d545affa86c027f1e023dee282
EBUILD gromacs-4.5.5-r1.ebuild 7808 SHA256 ffedeea7d72e555a7ee13232b252c536d917ea9f428558386e72ccc010779b01 SHA512 1c21a6b55611c7aff88bf67a5519e5926cb9277bba44db36eebdf4e22f9fcc733a157ae2e2643123f1e38f998fd8d1524a5440b20de5c041d832567e12976497 WHIRLPOOL 7a2664e943bbd2eac9e095a37946794a32f843ec90dcc3c05209a77c454a17c61ea19ed5105bd81ccc1014f500ac434f4a2e73802decbbed0041a298f1c7dc54
EBUILD gromacs-4.5.7.ebuild 7759 SHA256 9e14bea3e2820803197ab478a04af246aa155db5e48a45c883ab5f93bfb98527 SHA512 7d113988e36511008aa5b09e4b5bb6b7011c6b326ac1f3bd6d31565805a836def1aa787d8bd677a383d19719dd97c0da954c2eace4160ad7b088c42d542e58ca WHIRLPOOL d071bfe72e5963b12f8b74c207b50ebc32e43f0f9ecc8c82496345a75033d8485b2b2f9f9a006c5fb3888c367563b9ccdc8e6df18e4a3dfa16402ad5d62d2aeb
EBUILD gromacs-4.6.2.ebuild 9003 SHA256 aa61942a329b17a2d88191bbb53cbf24c961255e045b54ab1f4cf651f10368b0 SHA512 e6aae9da84dd7410754feaf7fe662ef066d9eff6b68c27e54ee5d56aa5e7cac7fcc094e91d7bb98286e2af53a5e12bfc0f8854cac555e1a9bbe4a33bf8df2079 WHIRLPOOL a18484eeea8c8f26609747411137faadc6c187842a60355c0750cbffb0499f0595c9d775271d2a64a55078fbaadd7ccf36ed8a9a48f1ecb719901dde002c8a8c
-MISC ChangeLog 21145 SHA256 aaf82e22545644ef733b74a49617eb8801d5c754aed587bbfead5a981b1f08d1 SHA512 ac30757379302a2124d61b85eec0f0676b766a7083b201fb217cf1503de5a07861a5873dda6d8920b7304927290561557a59e84324716787af1e10416f491ec3 WHIRLPOOL 788f81363bb2756643a06eaef33f0fdb839b479d9d5d513935a18f3336ce7e806c054f999cf209e12928c4dcfdb62b380367929dec988c82562c1bbd26d74345
+EBUILD gromacs-4.6.3.ebuild 9008 SHA256 fd621d6ae8a1a858e96435779502b82131ad8663b3041597d66aa53c04e5ab39 SHA512 747c8d00093133eaf7c2557db5892ba5bef2eb2f108d82a9f9473dfc47bafb28db4b2f7cedf32fed975c70c4691742bb09dcb18c1b32ca55f3620b6fb87f6110 WHIRLPOOL bcc44898f5dfcb76de06c088e60142f51ea42f45a08b12f3ef8766bf22d3e11cf74524f3cdf6a6fa3dcc0dbd2525690716bb66c816cd3bbc3521796078d57083
+MISC ChangeLog 21271 SHA256 3d6f9f80b3f6918e5c2393c55e964571591418ff935a9156772028846f3cde09 SHA512 77fde14220670a024e56f799d959d36f035264d459d365065d893e6b97041aaf7a53896dfaa3ef1f379cc714e3dc5978e4eb94d632cd2686616af3f84c267bcc WHIRLPOOL 6d854ed4d8aba6474ba7865829a221db6a2270f75136337d8a9120ee0f439c343e6f37c1e54c12c8766d4798f09d238def670a0b3840737669a2ff54d732295a
MISC metadata.xml 1111 SHA256 9ac7c2d8dc6b9e6523565bb9d2ba681cd784ce508bbc948f108c54ac554b3d15 SHA512 43365c5266138f79136937fe38d00161b0ac808b2fef1af6bf260ef3043b2d9504e35b83f4ae4564f212b7393e65743e73b123b7c15e989b880a5b266005225e WHIRLPOOL ba60f8ae78266b140b89eab018235475401ae8a9dd7b9333b3fee720081be047db6f5f3f81c63b5289e8a50089ae480883dbc18e1f70bdda4751d51df70f01b9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
-iQIcBAEBCgAGBQJR1XkIAAoJELp701BxlEWfgn4P/RfV/K9BiJLXDAG6Dq3llN5z
-2DN6r34wHd2nm4T1haNjbloybg5H5zwXC43Rri03CBAujjgCb3qALi2hGscCgEzH
-B7rUvt0r5ykuuu5txAndR9cVUo5G0K0nW3XcoJJ/IUj2gJ/Jyq2yspJn1h8S2YPz
-d0RqGFNCQ/gtkjT1sw01ykH2vxcjT+6X/golRfj1fnJecjWQishyx2fOVc8A2KeY
-5qXla5XiQUtOUDyqIIr96YCmtVzbD6V12ElGqPt1FGHJCbGxFfOYABl03U9Qkygy
-1x4ZI4WzS03neFq5NFtuT6HhBDCxTiMB6hj5iXtYDR8l9DxtEcmFH0TN1PdafKGB
-qgNGN5qz1WCdozkcLxqvG/ixPzs/ZQpzRkItT6xAy/j4xdY+djx9NzJS9g8SYw54
-jD1FkNbx4cLe8dgL7xcm/YkXfOvo8dF7bbJBtpYXXoDA5mS2/5pKgz8LUtQse/v/
-RkgjcQEnRyOOIXGi2eMcP92dpDgCyUlEkJtW5+LXnBUKGjDTQRK7ZE+hjQZi4rJo
-R2GR2x9GzGvy8efZUKLwcpt4tNExFOtN1ErU+qRQnqWTyCJtdVKLVlUuBkZeWUdS
-z7Yv7ziJC14ugiAXowlmVs7U3S9+E/e/MuVXMV3tWlxhp1kXeCNlJ98kcKhO6HIa
-ZEsbh1qR46rtIVCKMwYs
-=fs1z
+iQEcBAEBCAAGBQJR11uDAAoJEOeBhlrCAAWGJ7gH/i6/upNwnndP4f7lzop6Z/xR
+OOBCfskqGn8qDg7oNUCbeYnQ87XtUc+CSVpQww0df8yVOzO/4wjW06DivQhFoEAn
+5MQY+FjBBZvfEkz1GVAjXyeoBJQb7UILxqM8Yy9euaw2fpkVyg9VmvW0NS433cBk
+W7RmQpAoFbj1YFVFT42Z24kkq8WUK4tosuo/QJg0TgALRcNBGLcH58l9COfoDBKU
+I+bPRo7ugvBb3h+SISKFIsdvKMwfarlh8zxnOnVV3FCKd5WAOxtaRjzD/9QyxFyd
+4NGV+8H5YldRmPIK38RxOkMfqtWclODY/iJ16bkUJqu6R9dKG/PKan4fbCBG3qI=
+=Sqhs
-----END PGP SIGNATURE-----
diff --git a/sci-chemistry/gromacs/gromacs-4.6.3.ebuild b/sci-chemistry/gromacs/gromacs-4.6.3.ebuild
new file mode 100644
index 000000000000..57ec9f1b3a93
--- /dev/null
+++ b/sci-chemistry/gromacs/gromacs-4.6.3.ebuild
@@ -0,0 +1,283 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6.3.ebuild,v 1.1 2013/07/05 23:49:14 ottxor Exp $
+
+EAPI=5
+
+TEST_PV="4.6.2"
+MANUAL_PV="4.6.2"
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit bash-completion-r1 cmake-utils cuda eutils multilib readme.gentoo toolchain-funcs
+
+if [[ $PV = *9999* ]]; then
+ EGIT_REPO_URI="git://git.gromacs.org/gromacs.git
+ https://gerrit.gromacs.org/gromacs.git
+ git://github.com/gromacs/gromacs.git
+ http://repo.or.cz/r/gromacs.git"
+ EGIT_BRANCH="release-4-6"
+ inherit git-2
+ LIVE_DEPEND="doc? (
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ media-gfx/imagemagick
+ sys-apps/coreutils
+ )"
+else
+ SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz
+ doc? ( ftp://ftp.gromacs.org/pub/manual/manual-${MANUAL_PV}.pdf -> ${PN}-manual-${MANUAL_PV}.pdf )
+ test? ( http://${PN}.googlecode.com/files/regressiontests-${TEST_PV}.tar.gz )"
+ LIVE_DEPEND=""
+fi
+
+ACCE_IUSE="sse2 sse4_1 avx128fma avx256"
+
+DESCRIPTION="The ultimate molecular dynamics simulation package"
+HOMEPAGE="http://www.gromacs.org/"
+
+# see COPYING for details
+# http://repo.or.cz/w/gromacs.git/blob/HEAD:/COPYING
+# base, vmd plugins, fftpack from numpy, blas/lapck from netlib, memtestG80 library, mpi_thread lib
+LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="X blas cuda doc -double-precision +fftw gsl lapack mkl mpi +offensive openmm openmp +single-precision test +threads zsh-completion ${ACCE_IUSE}"
+
+CDEPEND="
+ X? (
+ x11-libs/libX11
+ x11-libs/libSM
+ x11-libs/libICE
+ )
+ blas? ( virtual/blas )
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
+ fftw? ( sci-libs/fftw:3.0 )
+ gsl? ( sci-libs/gsl )
+ lapack? ( virtual/lapack )
+ mkl? ( sci-libs/mkl )
+ mpi? ( virtual/mpi )
+ openmm? (
+ >=dev-util/nvidia-cuda-toolkit-4.2.9-r1
+ sci-libs/openmm[cuda,opencl]
+ )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ ${LIVE_DEPEND}"
+RDEPEND="${CDEPEND}"
+
+REQUIRED_USE="
+ || ( single-precision double-precision )
+ cuda? ( single-precision )
+ openmm? ( single-precision )
+ mkl? ( !blas !fftw !lapack )"
+
+DOCS=( AUTHORS README )
+HTML_DOCS=( "${ED}"/usr/share/gromacs/html/ )
+
+pkg_pretend() {
+ [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
+ use openmp && ! tc-has-openmp && \
+ die "Please switch to an openmp compatible compiler"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ default
+ else
+ git-2_src_unpack
+ if use doc; then
+ EGIT_REPO_URI="git://git.gromacs.org/manual.git" \
+ EGIT_BRANCH="release-4-6" EGIT_NOUNPACK="yes" EGIT_COMMIT="release-4-6" \
+ EGIT_SOURCEDIR="${WORKDIR}/manual"\
+ git-2_src_unpack
+ fi
+ if use test; then
+ EGIT_REPO_URI="git://git.gromacs.org/regressiontests.git" \
+ EGIT_BRANCH="master" EGIT_NOUNPACK="yes" EGIT_COMMIT="master" \
+ EGIT_SOURCEDIR="${WORKDIR}/regressiontests"\
+ git-2_src_unpack
+ fi
+ fi
+}
+
+src_prepare() {
+ #notes/todos
+ # -on apple: there is framework support
+
+ cmake-utils_src_prepare
+
+ use cuda && cuda_src_prepare
+
+ GMX_DIRS=""
+ use single-precision && GMX_DIRS+=" float"
+ use double-precision && GMX_DIRS+=" double"
+
+ if use test; then
+ for x in ${GMX_DIRS}; do
+ mkdir -p "${WORKDIR}/${P}_${x}" || die
+ cp -al "${WORKDIR}/regressiontests"* "${WORKDIR}/${P}_${x}/tests" || die
+ done
+ fi
+
+ DOC_CONTENTS="Gromacs can use sci-chemistry/vmd to read additional file formats"
+}
+
+src_configure() {
+ local mycmakeargs_pre=( ) extra fft_opts=( )
+
+ #go from slowest to fastest acceleration
+ local acce="None"
+ use sse2 && acce="SSE2"
+ use sse4_1 && acce="SSE4.1"
+ use avx128fma && acce="AVX_128_FMA"
+ use avx256 && acce="AVX_256"
+
+ #to create man pages, build tree binaries are executed (bug #398437)
+ [[ ${CHOST} = *-darwin* ]] && \
+ extra+=" -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF"
+
+ if use fftw; then
+ fft_opts=( -DGMX_FFT_LIBRARY=fftw3 )
+ elif use mkl && has_version "=sci-libs/mkl-10*"; then
+ fft_opts=( -DGMX_FFT_LIBRARY=mkl
+ -DMKL_INCLUDE_DIR="${MKLROOT}/include"
+ -DMKL_LIBRARIES="$(echo /opt/intel/mkl/10.0.5.025/lib/*/libmkl.so);$(echo /opt/intel/mkl/10.0.5.025/lib/*/libiomp*.so)"
+ )
+ elif use mkl; then
+ local bits=$(get_libdir)
+ fft_opts=( -DGMX_FFT_LIBRARY=mkl
+ -DMKL_INCLUDE_DIR="$(echo /opt/intel/*/mkl/include)"
+ -DMKL_LIBRARIES="$(echo /opt/intel/*/mkl/lib/*${bits/lib}/libmkl_rt.so)"
+ )
+ else
+ fft_opts=( -DGMX_FFT_LIBRARY=fftpack )
+ fi
+
+ mycmakeargs_pre+=(
+ "${fft_opts[@]}"
+ $(cmake-utils_use X GMX_X11)
+ $(cmake-utils_use blas GMX_EXTERNAL_BLAS)
+ $(cmake-utils_use gsl GMX_GSL)
+ $(cmake-utils_use lapack GMX_EXTERNAL_LAPACK)
+ $(cmake-utils_use openmp GMX_OPENMP)
+ $(cmake-utils_use offensive GMX_COOL_QUOTES)
+ -DGMX_DEFAULT_SUFFIX=off
+ -DGMX_ACCELERATION="$acce"
+ -DGMXLIB="$(get_libdir)"
+ -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
+ -DGMX_PREFIX_LIBMD=ON
+ -DGMX_X86_AVX_GCC_MASKLOAD_BUG=OFF
+ -DGMX_USE_GCC44_BUG_WORKAROUND=OFF
+ ${extra}
+ )
+
+ for x in ${GMX_DIRS}; do
+ einfo "Configuring for ${x} precision"
+ local suffix=""
+ #if we build single and double - double is suffixed
+ use double-precision && use single-precision && \
+ [[ ${x} = "double" ]] && suffix="_d"
+ local p
+ [[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
+ local cuda=( "-DGMX_GPU=OFF" )
+ [[ ${x} = "float" ]] && use cuda && \
+ cuda=( -DGMX_GPU=ON )
+ mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
+ $(cmake-utils_use threads GMX_THREAD_MPI) "${cuda[@]}" -DGMX_OPENMM=OFF
+ "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
+ -DGMX_BINARY_SUFFIX="${suffix}" -DGMX_LIBS_SUFFIX="${suffix}" )
+ BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
+ if [[ ${x} = float ]] && use openmm; then
+ einfo "Configuring for openmm build"
+ mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
+ -DGMX_THREAD_MPI=OFF -DGMX_GPU=OFF -DGMX_OPENMM=ON
+ -DOpenMM_PLUGIN_DIR="${EPREFIX}/usr/$(get_libdir)/plugins"
+ -DGMX_BINARY_SUFFIX="_openmm" -DGMX_LIBS_SUFFIX="_openmm" )
+ BUILD_DIR="${WORKDIR}/${P}_openmm" \
+ OPENMM_ROOT_DIR="${EPREFIX}/usr" cmake-utils_src_configure
+ fi
+ use mpi || continue
+ einfo "Configuring for ${x} precision with mpi"
+ mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_THREAD_MPI=OFF
+ -DGMX_MPI=ON ${cuda} -DGMX_OPENMM=OFF
+ -DGMX_BINARY_SUFFIX="_mpi${suffix}" -DGMX_LIBS_SUFFIX="_mpi${suffix}" )
+ BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" CC="mpicc" cmake-utils_src_configure
+ done
+}
+
+src_compile() {
+ for x in ${GMX_DIRS}; do
+ einfo "Compiling for ${x} precision"
+ BUILD_DIR="${WORKDIR}/${P}_${x}"\
+ cmake-utils_src_compile
+ if [[ ${x} = float ]] && use openmm; then
+ einfo "Compiling for openmm build"
+ BUILD_DIR="${WORKDIR}/${P}_openmm"\
+ cmake-utils_src_compile mdrun
+ fi
+ use mpi || continue
+ einfo "Compiling for ${x} precision with mpi"
+ BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
+ cmake-utils_src_compile mdrun
+ done
+}
+
+src_test() {
+ for x in ${GMX_DIRS}; do
+ BUILD_DIR="${WORKDIR}/${P}_${x}"\
+ cmake-utils_src_make check
+ done
+}
+
+src_install() {
+ for x in ${GMX_DIRS}; do
+ BUILD_DIR="${WORKDIR}/${P}_${x}" \
+ cmake-utils_src_install
+ if [[ ${x} = float ]] && use openmm; then
+ BUILD_DIR="${WORKDIR}/${P}_openmm" \
+ DESTDIR="${D}" cmake-utils_src_make install-mdrun
+ fi
+ #manual can only be build after gromacs was installed once in image
+ if use doc && [[ $PV = *9999* && ! -d ${WORKDIR}/manual_build ]]; then
+ mycmakeargs=( -DGMXBIN="${ED}"/usr/bin -DGMXSRC="${WORKDIR}/${P}" )
+ BUILD_DIR="${WORKDIR}"/manual_build \
+ CMAKE_USE_DIR="${WORKDIR}/manual" cmake-utils_src_configure
+ [[ ${CHOST} = *-darwin* ]] && \
+ export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}${DYLD_LIBRARY_PATH:+:}${ED}/usr/$(get_libdir)"
+ BUILD_DIR="${WORKDIR}"/manual_build cmake-utils_src_make
+ [[ ${CHOST} = *-darwin* ]] && DYLD_LIBRARY_PATH="${ED}/usr/$(get_libdir)"
+ newdoc "${WORKDIR}"/manual_build/gromacs.pdf "${PN}-manual-${PV}.pdf"
+ fi
+ use mpi || continue
+ BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
+ DESTDIR="${D}" cmake-utils_src_make install-mdrun
+ done
+
+ use doc && [[ $PV != *9999* ]] && dodoc "${DISTDIR}/${PN}-manual-${MANUAL_PV}.pdf"
+ newbashcomp "${ED}"/usr/bin/completion.bash ${PN}
+ if use zsh-completion ; then
+ insinto /usr/share/zsh/site-functions
+ newins "${ED}"/usr/bin/completion.zsh _${PN}
+ fi
+ rm -f "${ED}"usr/bin/completion.*
+ rm -rf "${ED}"usr/share/gromacs/html
+ rm -f "${ED}"usr/bin/g_options*
+ rm -f "${ED}"usr/bin/GMXRC*
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please read and cite:"
+ einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
+ einfo "http://dx.doi.org/10.1021/ct700301q"
+ if use offensive; then
+ einfo
+ einfo $(g_luck)
+ einfo "For more Gromacs cool quotes (gcq) add g_luck to your .bashrc"
+ fi
+ einfo
+ readme.gentoo_print_elog
+}