summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/gromacs/Manifest3
-rw-r--r--sci-chemistry/gromacs/gromacs-2021.6.ebuild355
2 files changed, 358 insertions, 0 deletions
diff --git a/sci-chemistry/gromacs/Manifest b/sci-chemistry/gromacs/Manifest
index 6b31f7f7e8cb..f999c8f5def4 100644
--- a/sci-chemistry/gromacs/Manifest
+++ b/sci-chemistry/gromacs/Manifest
@@ -4,6 +4,7 @@ DIST gromacs-2020.4.tar.gz 29149899 BLAKE2B a07c8efd96137d58c1edf4ac9b5aafeb16d9
DIST gromacs-2020.7.tar.gz 29175554 BLAKE2B 98f1aa415946f8eb113febc81105f0c1b0919b96fc3c55a0ab83bf3950ff509b81eade92e645adb0bc2b407df239e20cf3f19828b6e08616437c8693c1fddcc8 SHA512 1d375c44cec38445e56cea252623b5b6c565680268999d4b6c14d6dc38759a27227655b2d29efaab9f9115d3677b446cb555e11cddafa0dc10c4827caaa2477b
DIST gromacs-2021.3.tar.gz 37987972 BLAKE2B d71995c7d5a34978246e33dc637ac3d273e547afcf72d1a107026650f03286ecdf27e4b9a70113b3c3a01af59ad49ac5c813aa6e5d2e8eb29fd05582a7a28d34 SHA512 da420917d06de2e192dfbb4e1b9f46989ed05b5c7e641c657104ed8f2bd8b22509bffd1ecfd7c965c80544eafa6af12d6d0aba7e1e7d9d14a4a88fb3fbf394a5
DIST gromacs-2021.5.tar.gz 38023772 BLAKE2B 45e1f080b86626423e471f06b48b615db1913048f9f6998da8ce45408339b32f829d33dd2af57297a7d307fcffd556c333a58c309ee0f2adb021ca3755619b05 SHA512 56c1b312fc8e52ec6f86e445d2fa2d07107c461b35d4dc8cdf95580f05fd8e6c5fd671d0e72b2b9e74e3232bc8c41db496fe4bcaf2b9a3ae3c2cfa93489a31c5
+DIST gromacs-2021.6.tar.gz 38012702 BLAKE2B 023ae37dc53643758afa050fd179cd66f3c6d6266f6afceee5eb35c890a3ae284956f2bc2409156d6e1fa03a7f23f7b04c27e1820547fd5f147b344d94da7d40 SHA512 65d7874e5cd838ce4f29d033c66304738ccc30f1987f9f8541725058b2fc4551302a399f6ce773e81ac9485963187c48feaf92c71789f4c345c82bd335f806a7
DIST gromacs-2022.2.tar.gz 40350604 BLAKE2B 789c8abc13b5c64af6b9d66efcf70449330b7e6a4bc127ba299e36eea925e9485809c11480ffd857805d9b453df363ce9bb05bc54b439801334767651defc0ef SHA512 9f33518d2035afb37fc40377e575d497ff32bef2adb702669b35b1b51b1694b1113c5634fa6febd41955b6dfbfd055e7d523e1919bda1bf169a6d0c25700cef7
DIST gromacs-2022.3.tar.gz 40359623 BLAKE2B 23beacf7208df89aea6c3effe483361451a9ff20428fe79ec163a5eee4dc0db0bb00a2bee84bc9377ad272f216fd372eab1b77e8542ce231ac785b41b582fa15 SHA512 1a6a1674ed17dfd93dcd51537cd13c9df5bb9bd91c3a26601032f83b788a93689bac8070eb8e495a786d41cc9d474885538cbaffa4229da70dfa640ee42b7c60
DIST manual-2018.8.pdf 10025023 BLAKE2B afb0a6e6a72d78df743fcb57e7c1716848589e571dd35167b957a9b407ca27978ccfb6cb9e0df9c9439b888f352501a00ba32281ed1e0b4193bd606f1d77152e SHA512 b1972f7ce965bfc9377542993c5943ea4868a8ed23a969d4203264746d6bea3a7a65c6379196ece37fd6d68ec7ec80f827bde87d1049284af7082759a124f1d5
@@ -12,6 +13,7 @@ DIST manual-2020.4.pdf 11851608 BLAKE2B 7b7bdf08e8946fcc448543b08391b94a67fee60a
DIST manual-2020.7.pdf 11850780 BLAKE2B 38594e87993badfbbcf47d6010a7f67d3c3426dab85e1462916b4d62be27b5764953f912cf2b71ee24877e0bfa27b3f74431da2da81b4977d58cb66b2cc795a3 SHA512 4f184f2c90e0bac01a48069cc546cd5b04fa5f543f90dd2d68c6d17be278152fd09456b6a6c5c8236f8fb85a174d6ec7a1c7b44d437b4e6fea5d0ada73cec0f6
DIST manual-2021.3.pdf 12255076 BLAKE2B 6ca516b6832507c9d4100679d1f9bc9e3ab17d226849b050764b0d0626247dc57ce49985f9a7fc0061f3df278923a83faa367ca8ab91c37e5624dc584a51a822 SHA512 5d53798f30ea00fcb4e1b35f7eaa4bebfc05dafa4f2d0c197dcf2b57a624ad3a98b74fd90722e40d0ac13a6fff4ca231f9d6340f52ba94659c827c53c2f1cb16
DIST manual-2021.5.pdf 12253641 BLAKE2B 8850715a2bb21345e1c9735aca1a5dd2ad916e5a18881e7c9f3dda6f055ca12d9d379b74218138999ce50769efd8b9dd6447afbf70bbbefa2564dfb9fb276b91 SHA512 7635108c935e4953d722df6a16ee43edf97eef7e49f047218728f68f61f8f185192ff1d8b13a573b643b040955af211355a7b560c8a894c858d7f71249d41296
+DIST manual-2021.6.pdf 12256595 BLAKE2B 5d808e38571b38c1f6e0d115f6e604238206cc001f59d05ed855e80c324c0e6fd7767adb723b3d0edd1267ae5973a3b83b76bd04d2dc99769e6440600d8e2146 SHA512 64fe56422d7417f6f61b10346c99e24c3f423f0cedc3794e0809250282bc87ef692b47ae6c3f95ad7994aa3860ed82035cbacc76eb78a2f54a29052a05260af2
DIST manual-2022.2.pdf 13075063 BLAKE2B 1c9e525d45f1b9955f1aa2c4afa8c958b8ea62c51c28fafdebe302e3e5f6e04c97d1852e4ab2ba18149778d62959d9e7e42be9e4cd98f8187029cc590b1dfd9a SHA512 9b4d9b13547e0210b633394e0c9cba183a827409b08d3b2995a4b64df7b7e7aef0441af240bf4cfcb2e24594ade27c25fee454b9fcf4bb5df0ded464c4f6368d
DIST manual-2022.3.pdf 13080874 BLAKE2B 3e70da8f70281c78084f5f9af86cdcda187c7b3085f08d95487992a65e31b7dae0b3e66d914dc0bccaf1bfe4c672d2018f38d0bde679759545aca55d1df1f554 SHA512 f634eac722d4a6f77820ef46024d9209de97fb6afb52333f200c2717049d8d09e31f0ef7bac8f154d79ae43fa31541ed6c3d839dd088433222ebdace298b5fae
DIST regressiontests-2018.8.tar.gz 67855469 BLAKE2B 34c9b339f6229f483afbb5192ee6ba8b8f72d5c26907a853af9c53dfece0d88739e48f6b44b78d1c010f988f9385d077285300522164f533a5861e9dda879275 SHA512 3642389d27bd1942cd0f091c940ae97b197b94856a387fe581dc516b0d4169480f16551d4ba357f9282b3337d605c286d51dd38112ac87c826dda634904836bb
@@ -20,5 +22,6 @@ DIST regressiontests-2020.4.tar.gz 48542144 BLAKE2B 1dcde67525d40ababa74d9e8ba2d
DIST regressiontests-2020.7.tar.gz 48541487 BLAKE2B 255608b52158c6c01e7c7c4dcf075128ecf22b2f26d32e8c203de8a4bc69c60ec95f49cf8ccd64abc3073c5e8dca9d6b01daed9dfb8f67bce2dd068ed01acd05 SHA512 2458582f94f3c9f4e1454824ce3940b4f5b6cb2151d06846c42e7a9448296fd2a6df4f53be9624e0d3317d2b59f89bb5348eb8b2970d7b46ac22ca989ef3458a
DIST regressiontests-2021.3.tar.gz 48515038 BLAKE2B ee79d8adddc9c68f7d59d9e568b12bf4d1fe0e44c2810fee846ad6f689bbcacf60f5c266433946329e64e3127bc2d37a3f81f69c070c636b411b38067650c2cf SHA512 e14baa22ef2902a23125bbd9143ae7a9a4810498b321794ff1989f8d044d47db5db41d5225798fda08016c05e5f7f315178b5a6e35cdf01e3b6604670a8ce7a2
DIST regressiontests-2021.5.tar.gz 48537298 BLAKE2B 860ac34aa8706ecdafab4472162775ce12726d93839079ebf9b7df8c2c6a1b47baa8a635c24cf4cb4551a32237c3de7da3197ec136b5bbf48663edc3943720ad SHA512 3605d04b2602339fb7d33e2776da2ada337ca58a3802472d47f490d4e8dd04249a950bf34608a498eedebf69f344c0311bac8f7fcb58ce0ebbb6d608ee39aa2e
+DIST regressiontests-2021.6.tar.gz 48537070 BLAKE2B 982fad6b23da5c1e6d32009f9f08772419c08f15549aea85ec0cd144c7faf5b48ed9b49a2cae662c28008514911cc18e0b39b994854d95f4f206e728b76f3fe5 SHA512 9c0ca29df822bc13005fd35bdb85cc075ea667112ae1670af0d8306cdd2bd348a9f9904bd10da6db458d9c11f4d44860e1fc62e9686d2c6e396e265d18768ba4
DIST regressiontests-2022.2.tar.gz 48614810 BLAKE2B d39a9b29a023fa2462918206457bb222bf56f0c530b311a1e5572e8af6c561a9ba5cf7a445425a36f89804d120a5d05cb778998818ba11357ec67bfb05297de3 SHA512 6cd4b59515648aa5f9deec130454b4d667cce20a95d389b46883865d39a164ec23da303a52afb4459dda3c6b6a7804d0763c05424ea512e6c0725ce1ca684dc2
DIST regressiontests-2022.3.tar.gz 48615675 BLAKE2B 731d9a210dcd481df937182a9a8239087549abd118d1386175ef68979e139ae33089cfc304e0389670ad15a196008c282ddf62968a7e8bfccac22c0a96add276 SHA512 98888ad908705ac29ae958591368e994b091a1619782b49601e41f576c821eb3c96a713449151b8db59d46bc6dd3bcb363f5d0cda354ce6b39a9bb93ba31f913
diff --git a/sci-chemistry/gromacs/gromacs-2021.6.ebuild b/sci-chemistry/gromacs/gromacs-2021.6.ebuild
new file mode 100644
index 000000000000..2f7f4f77115a
--- /dev/null
+++ b/sci-chemistry/gromacs/gromacs-2021.6.ebuild
@@ -0,0 +1,355 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+DISTUTILS_USE_SETUPTOOLS=no
+DISTUTILS_SINGLE_IMPL=1
+
+inherit bash-completion-r1 cmake cuda distutils-r1 flag-o-matic readme.gentoo-r1 toolchain-funcs xdg-utils
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="
+ https://gitlab.com/gromacs/gromacs.git
+ https://github.com/gromacs/gromacs.git
+ git://git.gromacs.org/gromacs.git"
+ [[ ${PV} = 9999 ]] && EGIT_BRANCH="master" || EGIT_BRANCH="release-${PV:0:4}"
+ inherit git-r3
+else
+ SRC_URI="
+ http://ftp.gromacs.org/gromacs/${PN}-${PV/_/-}.tar.gz
+ doc? ( https://ftp.gromacs.org/manual/manual-${PV/_/-}.pdf )
+ test? ( http://ftp.gromacs.org/regressiontests/regressiontests-${PV/_/-}.tar.gz )"
+ KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+fi
+
+ACCE_IUSE="cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_fma4 cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_avx512f cpu_flags_arm_neon"
+
+DESCRIPTION="The ultimate molecular dynamics simulation package"
+HOMEPAGE="http://www.gromacs.org/"
+
+# see COPYING for details
+# https://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}"
+IUSE="X blas cuda +custom-cflags +doc build-manual double-precision +fftw +gmxapi +gmxapi-legacy +hwloc lapack +lmfit mkl mpi +offensive opencl openmp +python +single-precision test +threads +tng ${ACCE_IUSE}"
+
+CDEPEND="
+ X? (
+ x11-libs/libX11
+ x11-libs/libSM
+ x11-libs/libICE
+ )
+ blas? ( virtual/blas )
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.14[profiler] )
+ opencl? ( virtual/opencl )
+ fftw? ( sci-libs/fftw:3.0= )
+ hwloc? ( sys-apps/hwloc:= )
+ lapack? ( virtual/lapack )
+ lmfit? ( sci-libs/lmfit:= )
+ mkl? ( sci-libs/mkl )
+ mpi? ( virtual/mpi )
+ ${PYTHON_DEPS}
+ "
+BDEPEND="${CDEPEND}
+ virtual/pkgconfig
+ build-manual? (
+ app-doc/doxygen
+ $(python_gen_cond_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ ')
+ media-gfx/mscgen
+ media-gfx/graphviz
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ media-gfx/imagemagick
+ )"
+RDEPEND="${CDEPEND}"
+
+REQUIRED_USE="
+ || ( single-precision double-precision )
+ doc? ( !build-manual )
+ cuda? ( single-precision )
+ cuda? ( !opencl )
+ mkl? ( !blas !fftw !lapack )
+ ${PYTHON_REQUIRED_USE}"
+
+DOCS=( AUTHORS README )
+
+RESTRICT="!test? ( test )"
+
+PATCHES=( "${FILESDIR}/${PN}-2021-musl-stdint.patch" )
+
+if [[ ${PV} != *9999 ]]; then
+ S="${WORKDIR}/${PN}-${PV/_/-}"
+fi
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+ python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ default
+ else
+ git-r3_src_unpack
+ if use test; then
+ EGIT_REPO_URI="git://git.gromacs.org/regressiontests.git" \
+ EGIT_BRANCH="${EGIT_BRANCH}" \
+ EGIT_CHECKOUT_DIR="${WORKDIR}/regressiontests"\
+ git-r3_src_unpack
+ fi
+ fi
+}
+
+src_prepare() {
+ #notes/todos
+ # -on apple: there is framework support
+
+ xdg_environment_reset #591952
+
+ cmake_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"
+ if use build-manual; then
+ # try to create policy for imagemagik
+ mkdir -p ${HOME}/.config/ImageMagick
+ cat >> ${HOME}/.config/ImageMagick/policy.xml <<- EOF
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE policymap [
+ <!ELEMENT policymap (policy)+>
+ !ATTLIST policymap xmlns CDATA #FIXED ''>
+ <!ELEMENT policy EMPTY>
+ <!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
+ name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
+ stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
+ ]>
+ <policymap>
+ <policy domain="coder" rights="read | write" pattern="PS" />
+ <policy domain="coder" rights="read | write" pattern="PS2" />
+ <policy domain="coder" rights="read | write" pattern="PS3" />
+ <policy domain="coder" rights="read | write" pattern="EPS" />
+ <policy domain="coder" rights="read | write" pattern="PDF" />
+ <policy domain="coder" rights="read | write" pattern="XPS" />
+ </policymap>
+ EOF
+ fi
+}
+
+src_configure() {
+ local mycmakeargs_pre=( ) extra fft_opts=( )
+ local acce="AUTO"
+
+ if use custom-cflags; then
+ #go from slowest to fastest acceleration
+ acce="None"
+ if (use amd64 || use x86); then
+ use cpu_flags_x86_sse2 && acce="SSE2"
+ use cpu_flags_x86_sse4_1 && acce="SSE4.1"
+ use cpu_flags_x86_fma4 && acce="AVX_128_FMA"
+ use cpu_flags_x86_avx && acce="AVX_256"
+ use cpu_flags_x86_avx2 && acce="AVX2_256"
+ use cpu_flags_x86_avx512f && acce="AVX_512"
+ elif (use arm); then
+ use cpu_flags_arm_neon && acce="ARM_NEON"
+ elif (use arm64); then
+ use cpu_flags_arm_neon && acce="ARM_NEON_ASIMD"
+ fi
+ else
+ strip-flags
+ fi
+
+ #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
+
+ if use lmfit; then
+ local lmfit_opts=( -DGMX_USE_LMFIT=EXTERNAL )
+ else
+ local lmfit_opts=( -DGMX_USE_LMFIT=INTERNAL )
+ fi
+
+ mycmakeargs_pre+=(
+ "${fft_opts[@]}"
+ "${lmfit_opts[@]}"
+ -DGMX_X11=$(usex X)
+ -DGMX_EXTERNAL_BLAS=$(usex blas)
+ -DGMX_EXTERNAL_LAPACK=$(usex lapack)
+ -DGMX_OPENMP=$(usex openmp)
+ -DGMX_COOL_QUOTES=$(usex offensive)
+ -DGMX_USE_TNG=$(usex tng)
+ -DGMX_BUILD_MANUAL=$(usex build-manual)
+ -DGMX_HWLOC=$(usex hwloc)
+ -DGMX_DEFAULT_SUFFIX=off
+ -DGMX_SIMD="$acce"
+ -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
+ -DBUILD_TESTING=$(usex test)
+ -DGMX_BUILD_UNITTESTS=$(usex test)
+ -DPYTHON_EXECUTABLE="${EPREFIX}/usr/bin/${EPYTHON}"
+ ${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 gpu=( "-DGMX_GPU=OFF" )
+ [[ ${x} = "float" ]] && use cuda && gpu=( "-DGMX_GPU=CUDA" )
+ use opencl && gpu=( "-DGMX_GPU=OPENCL" )
+ mycmakeargs=(
+ ${mycmakeargs_pre[@]} ${p}
+ -DGMX_MPI=OFF
+ -DGMX_THREAD_MPI=$(usex threads)
+ -DGMXAPI=$(usex gmxapi)
+ -DGMX_INSTALL_LEGACY_API=$(usex gmxapi-legacy)
+ "${gpu[@]}"
+ "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
+ -DGMX_BINARY_SUFFIX="${suffix}"
+ -DGMX_LIBS_SUFFIX="${suffix}"
+ -DGMX_PYTHON_PACKAGE=$(usex python)
+ )
+ BUILD_DIR="${WORKDIR}/${P}_${x}" cmake_src_configure
+ [[ ${CHOST} != *-darwin* ]] || \
+ sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}/gentoo_rules.cmake" || die
+ use mpi || continue
+ einfo "Configuring for ${x} precision with mpi"
+ mycmakeargs=(
+ ${mycmakeargs_pre[@]} ${p}
+ -DGMX_THREAD_MPI=OFF
+ -DGMX_MPI=ON
+ -DGMX_OPENMM=OFF
+ -DGMXAPI=OFF
+ "${opencl[@]}"
+ "${cuda[@]}"
+ -DGMX_BUILD_MDRUN_ONLY=ON
+ -DBUILD_SHARED_LIBS=OFF
+ -DGMX_BUILD_MANUAL=OFF
+ -DGMX_BINARY_SUFFIX="_mpi${suffix}"
+ -DGMX_LIBS_SUFFIX="_mpi${suffix}"
+ )
+ BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" CC="mpicc" cmake_src_configure
+ [[ ${CHOST} != *-darwin* ]] || \
+ sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}_mpi/gentoo_rules.cmake" || die
+ done
+}
+
+src_compile() {
+ for x in ${GMX_DIRS}; do
+ einfo "Compiling for ${x} precision"
+ BUILD_DIR="${WORKDIR}/${P}_${x}"\
+ cmake_src_compile
+ if use python; then
+ BUILD_DIR="${WORKDIR}/${P}_${x}"\
+ cmake_src_compile python_packaging/all
+ BUILD_DIR="${WORKDIR}/${P}" \
+ distutils-r1_src_compile
+ fi
+ # not 100% necessary for rel ebuilds as available from website
+ if use build-manual; then
+ BUILD_DIR="${WORKDIR}/${P}_${x}"\
+ cmake_src_compile manual
+ fi
+ use mpi || continue
+ einfo "Compiling for ${x} precision with mpi"
+ BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
+ cmake_src_compile
+ done
+}
+
+src_test() {
+ for x in ${GMX_DIRS}; do
+ BUILD_DIR="${WORKDIR}/${P}_${x}"\
+ cmake_src_compile check
+ done
+}
+
+src_install() {
+ for x in ${GMX_DIRS}; do
+ BUILD_DIR="${WORKDIR}/${P}_${x}" \
+ cmake_src_install
+ if use python; then
+ BUILD_DIR="${WORKDIR}/${P}_${x}" \
+ cmake_src_install python_packaging/install
+ fi
+ if use build-manual; then
+ newdoc "${WORKDIR}/${P}_${x}"/docs/manual/gromacs.pdf "${PN}-manual-${PV}.pdf"
+ fi
+
+ if use doc; then
+ if [[ ${PV} != *9999* ]]; then
+ newdoc "${DISTDIR}/manual-${PV}.pdf" "${PN}-manual-${PV}.pdf"
+ fi
+ fi
+
+ use mpi || continue
+ BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
+ cmake_src_install
+ done
+
+ if use tng; then
+ insinto /usr/include/tng
+ doins src/external/tng_io/include/tng/*h
+ fi
+ # drop unneeded stuff
+ rm "${ED}"/usr/bin/GMXRC* || die
+ for x in "${ED}"/usr/bin/gmx-completion-*.bash ; do
+ local n=${x##*/gmx-completion-}
+ n="${n%.bash}"
+ cat "${ED}"/usr/bin/gmx-completion.bash "$x" > "${T}/${n}" || die
+ newbashcomp "${T}"/"${n}" "${n}"
+ done
+ rm "${ED}"/usr/bin/gmx-completion*.bash || die
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please read and cite gromacs related papers from list:"
+ einfo "https://www.gromacs.org/Gromacs_papers"
+ einfo
+ readme.gentoo_print_elog
+}