Gentoo Archives: gentoo-commits

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/gromacs/
Date: Thu, 14 May 2020 14:03:45
Message-Id: 1589465002.d199c2134722aeb381c495e6ddc0f8adee06386f.alexxy@gentoo
1 commit: d199c2134722aeb381c495e6ddc0f8adee06386f
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 14 14:03:22 2020 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Thu May 14 14:03:22 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d199c213
7
8 sci-chemistry/gromacs: drop 2019.9999 and 2018.9999
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
12
13 sci-chemistry/gromacs/gromacs-2018.9999.ebuild | 295 -----------------------
14 sci-chemistry/gromacs/gromacs-2019.9999.ebuild | 316 -------------------------
15 2 files changed, 611 deletions(-)
16
17 diff --git a/sci-chemistry/gromacs/gromacs-2018.9999.ebuild b/sci-chemistry/gromacs/gromacs-2018.9999.ebuild
18 deleted file mode 100644
19 index 4db9e9672b0..00000000000
20 --- a/sci-chemistry/gromacs/gromacs-2018.9999.ebuild
21 +++ /dev/null
22 @@ -1,295 +0,0 @@
23 -# Copyright 1999-2019 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -EAPI=7
27 -
28 -CMAKE_MAKEFILE_GENERATOR="ninja"
29 -
30 -inherit bash-completion-r1 cmake-utils cuda eutils multilib readme.gentoo-r1 toolchain-funcs xdg-utils
31 -
32 -if [[ $PV = *9999* ]]; then
33 - EGIT_REPO_URI="git://git.gromacs.org/gromacs.git
34 - https://gerrit.gromacs.org/gromacs.git
35 - https://github.com/gromacs/gromacs.git
36 - https://repo.or.cz/r/gromacs.git"
37 - [[ $PV = 9999 ]] && EGIT_BRANCH="master" || EGIT_BRANCH="release-${PV:0:4}"
38 - inherit git-r3
39 -else
40 - SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${PN}-${PV/_/-}.tar.gz
41 - test? ( http://gerrit.gromacs.org/download/regressiontests-${PV/_/-}.tar.gz )"
42 - KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
43 -fi
44 -
45 -ACCE_IUSE="cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_fma4 cpu_flags_x86_avx cpu_flags_x86_avx2"
46 -
47 -DESCRIPTION="The ultimate molecular dynamics simulation package"
48 -HOMEPAGE="http://www.gromacs.org/"
49 -
50 -# see COPYING for details
51 -# https://repo.or.cz/w/gromacs.git/blob/HEAD:/COPYING
52 -# base, vmd plugins, fftpack from numpy, blas/lapck from netlib, memtestG80 library, mpi_thread lib
53 -LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )"
54 -SLOT="0/${PV}"
55 -IUSE="X blas cuda +doc -double-precision +fftw +hwloc lapack mkl mpi +offensive opencl openmp +single-precision test +threads +tng ${ACCE_IUSE}"
56 -
57 -CDEPEND="
58 - X? (
59 - x11-libs/libX11
60 - x11-libs/libSM
61 - x11-libs/libICE
62 - )
63 - blas? ( virtual/blas )
64 - cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
65 - opencl? ( virtual/opencl )
66 - fftw? ( sci-libs/fftw:3.0 )
67 - hwloc? ( <sys-apps/hwloc-2 )
68 - lapack? ( virtual/lapack )
69 - mkl? ( sci-libs/mkl )
70 - mpi? ( virtual/mpi )
71 - "
72 -BDEPEND="${CDEPEND}
73 - virtual/pkgconfig
74 - doc? (
75 - app-doc/doxygen
76 - dev-texlive/texlive-latex
77 - dev-texlive/texlive-latexextra
78 - media-gfx/imagemagick
79 - )"
80 -RDEPEND="${CDEPEND}"
81 -
82 -REQUIRED_USE="
83 - || ( single-precision double-precision )
84 - cuda? ( single-precision )
85 - cuda? ( !opencl )
86 - mkl? ( !blas !fftw !lapack )"
87 -
88 -DOCS=( AUTHORS README )
89 -
90 -RESTRICT="!test? ( test )"
91 -
92 -if [[ ${PV} != *9999 ]]; then
93 - S="${WORKDIR}/${PN}-${PV/_/-}"
94 -fi
95 -
96 -pkg_pretend() {
97 - [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
98 - use openmp && ! tc-has-openmp && \
99 - die "Please switch to an openmp compatible compiler"
100 -}
101 -
102 -src_unpack() {
103 - if [[ ${PV} != *9999 ]]; then
104 - default
105 - else
106 - git-r3_src_unpack
107 - if use test; then
108 - EGIT_REPO_URI="git://git.gromacs.org/regressiontests.git" \
109 - EGIT_BRANCH="${EGIT_BRANCH}" \
110 - EGIT_CHECKOUT_DIR="${WORKDIR}/regressiontests"\
111 - git-r3_src_unpack
112 - fi
113 - fi
114 -}
115 -
116 -src_prepare() {
117 - #notes/todos
118 - # -on apple: there is framework support
119 -
120 - xdg_environment_reset #591952
121 -
122 - cmake-utils_src_prepare
123 -
124 - use cuda && cuda_src_prepare
125 -
126 - GMX_DIRS=""
127 - use single-precision && GMX_DIRS+=" float"
128 - use double-precision && GMX_DIRS+=" double"
129 -
130 - if use test; then
131 - for x in ${GMX_DIRS}; do
132 - mkdir -p "${WORKDIR}/${P}_${x}" || die
133 - cp -al "${WORKDIR}/regressiontests"* "${WORKDIR}/${P}_${x}/tests" || die
134 - done
135 - fi
136 -
137 - DOC_CONTENTS="Gromacs can use sci-chemistry/vmd to read additional file formats"
138 - # try to create policy for imagemagik
139 - mkdir -p ${HOME}/.config/ImageMagick
140 - cat >> ${HOME}/.config/ImageMagick/policy.xml <<- EOF
141 - <?xml version="1.0" encoding="UTF-8"?>
142 - <!DOCTYPE policymap [
143 - <!ELEMENT policymap (policy)+>
144 - !ATTLIST policymap xmlns CDATA #FIXED ''>
145 - <!ELEMENT policy EMPTY>
146 - <!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
147 - name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
148 - stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
149 - ]>
150 - <policymap>
151 - <policy domain="coder" rights="read | write" pattern="PS" />
152 - <policy domain="coder" rights="read | write" pattern="PS2" />
153 - <policy domain="coder" rights="read | write" pattern="PS3" />
154 - <policy domain="coder" rights="read | write" pattern="EPS" />
155 - <policy domain="coder" rights="read | write" pattern="PDF" />
156 - <policy domain="coder" rights="read | write" pattern="XPS" />
157 - </policymap>
158 - EOF
159 -}
160 -
161 -src_configure() {
162 - local mycmakeargs_pre=( ) extra fft_opts=( )
163 -
164 - #go from slowest to fastest acceleration
165 - local acce="None"
166 - use cpu_flags_x86_sse2 && acce="SSE2"
167 - use cpu_flags_x86_sse4_1 && acce="SSE4.1"
168 - use cpu_flags_x86_fma4 && acce="AVX_128_FMA"
169 - use cpu_flags_x86_avx && acce="AVX_256"
170 - use cpu_flags_x86_avx2 && acce="AVX2_256"
171 -
172 - #to create man pages, build tree binaries are executed (bug #398437)
173 - [[ ${CHOST} = *-darwin* ]] && \
174 - extra+=" -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF"
175 -
176 - if use fftw; then
177 - fft_opts=( -DGMX_FFT_LIBRARY=fftw3 )
178 - elif use mkl && has_version "=sci-libs/mkl-10*"; then
179 - fft_opts=( -DGMX_FFT_LIBRARY=mkl
180 - -DMKL_INCLUDE_DIR="${MKLROOT}/include"
181 - -DMKL_LIBRARIES="$(echo /opt/intel/mkl/10.0.5.025/lib/*/libmkl.so);$(echo /opt/intel/mkl/10.0.5.025/lib/*/libiomp*.so)"
182 - )
183 - elif use mkl; then
184 - local bits=$(get_libdir)
185 - fft_opts=( -DGMX_FFT_LIBRARY=mkl
186 - -DMKL_INCLUDE_DIR="$(echo /opt/intel/*/mkl/include)"
187 - -DMKL_LIBRARIES="$(echo /opt/intel/*/mkl/lib/*${bits/lib}/libmkl_rt.so)"
188 - )
189 - else
190 - fft_opts=( -DGMX_FFT_LIBRARY=fftpack )
191 - fi
192 -
193 - mycmakeargs_pre+=(
194 - "${fft_opts[@]}"
195 - -DGMX_X11=$(usex X)
196 - -DGMX_EXTERNAL_BLAS=$(usex blas)
197 - -DGMX_EXTERNAL_LAPACK=$(usex lapack)
198 - -DGMX_OPENMP=$(usex openmp)
199 - -DGMX_COOL_QUOTES=$(usex offensive)
200 - -DGMX_USE_TNG=$(usex tng)
201 - -DGMX_BUILD_MANUAL=$(usex doc)
202 - -DGMX_HWLOC=$(usex hwloc)
203 - -DGMX_DEFAULT_SUFFIX=off
204 - -DGMX_SIMD="$acce"
205 - -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
206 - -DBUILD_TESTING=$(usex test)
207 - -DGMX_BUILD_UNITTESTS=$(usex test)
208 - ${extra}
209 - )
210 -
211 - for x in ${GMX_DIRS}; do
212 - einfo "Configuring for ${x} precision"
213 - local suffix=""
214 - #if we build single and double - double is suffixed
215 - use double-precision && use single-precision && \
216 - [[ ${x} = "double" ]] && suffix="_d"
217 - local p
218 - [[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
219 - local cuda=( "-DGMX_GPU=OFF" )
220 - [[ ${x} = "float" ]] && use cuda && \
221 - cuda=( "-DGMX_GPU=ON" )
222 - local opencl=( "-DGMX_USE_OPENCL=OFF" )
223 - use opencl && opencl=( "-DGMX_USE_OPENCL=ON" ) cuda=( "-DGMX_GPU=ON" )
224 - mycmakeargs=(
225 - ${mycmakeargs_pre[@]} ${p}
226 - -DGMX_MPI=OFF
227 - -DGMX_THREAD_MPI=$(usex threads)
228 - "${opencl[@]}"
229 - "${cuda[@]}"
230 - "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
231 - -DGMX_BINARY_SUFFIX="${suffix}"
232 - -DGMX_LIBS_SUFFIX="${suffix}"
233 - )
234 - BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
235 - [[ ${CHOST} != *-darwin* ]] || \
236 - sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}/gentoo_rules.cmake" || die
237 - use mpi || continue
238 - einfo "Configuring for ${x} precision with mpi"
239 - mycmakeargs=(
240 - ${mycmakeargs_pre[@]} ${p}
241 - -DGMX_THREAD_MPI=OFF
242 - -DGMX_MPI=ON
243 - -DGMX_OPENMM=OFF
244 - -DGMX_BUILD_MDRUN_ONLY=ON
245 - -DBUILD_SHARED_LIBS=OFF
246 - -DGMX_BUILD_MANUAL=OFF
247 - "${opencl[@]}"
248 - "${cuda[@]}"
249 - -DGMX_BINARY_SUFFIX="_mpi${suffix}"
250 - -DGMX_LIBS_SUFFIX="_mpi${suffix}"
251 - )
252 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" CC="mpicc" cmake-utils_src_configure
253 - [[ ${CHOST} != *-darwin* ]] || \
254 - sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}_mpi/gentoo_rules.cmake" || die
255 - done
256 -}
257 -
258 -src_compile() {
259 - for x in ${GMX_DIRS}; do
260 - einfo "Compiling for ${x} precision"
261 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
262 - cmake-utils_src_compile
263 - # not 100% necessary for rel ebuilds as available from website
264 - if use doc; then
265 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
266 - cmake-utils_src_compile manual
267 - fi
268 - use mpi || continue
269 - einfo "Compiling for ${x} precision with mpi"
270 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
271 - cmake-utils_src_compile
272 - done
273 -}
274 -
275 -src_test() {
276 - for x in ${GMX_DIRS}; do
277 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
278 - cmake-utils_src_make check
279 - done
280 -}
281 -
282 -src_install() {
283 - for x in ${GMX_DIRS}; do
284 - BUILD_DIR="${WORKDIR}/${P}_${x}" \
285 - cmake-utils_src_install
286 - if use doc; then
287 - newdoc "${WORKDIR}/${P}_${x}"/docs/manual/gromacs.pdf "${PN}-manual-${PV}.pdf"
288 - fi
289 - use mpi || continue
290 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
291 - cmake-utils_src_install
292 - done
293 -
294 - if use tng; then
295 - insinto /usr/include/tng
296 - doins src/external/tng_io/include/tng/*h
297 - fi
298 - # drop unneeded stuff
299 - rm "${ED}"/usr/bin/GMXRC* || die
300 - for x in "${ED}"/usr/bin/gmx-completion-*.bash ; do
301 - local n=${x##*/gmx-completion-}
302 - n="${n%.bash}"
303 - cat "${ED}"/usr/bin/gmx-completion.bash "$x" > "${T}/${n}" || die
304 - newbashcomp "${T}"/"${n}" "${n}"
305 - done
306 - rm "${ED}"/usr/bin/gmx-completion*.bash || die
307 - readme.gentoo_create_doc
308 -}
309 -
310 -pkg_postinst() {
311 - einfo
312 - einfo "Please read and cite:"
313 - einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
314 - einfo "https://dx.doi.org/10.1021/ct700301q"
315 - einfo
316 - readme.gentoo_print_elog
317 -}
318
319 diff --git a/sci-chemistry/gromacs/gromacs-2019.9999.ebuild b/sci-chemistry/gromacs/gromacs-2019.9999.ebuild
320 deleted file mode 100644
321 index b3fc105b550..00000000000
322 --- a/sci-chemistry/gromacs/gromacs-2019.9999.ebuild
323 +++ /dev/null
324 @@ -1,316 +0,0 @@
325 -# Copyright 1999-2020 Gentoo Authors
326 -# Distributed under the terms of the GNU General Public License v2
327 -
328 -EAPI=7
329 -
330 -CMAKE_MAKEFILE_GENERATOR="ninja"
331 -
332 -PYTHON_COMPAT=( python2_7 )
333 -
334 -inherit bash-completion-r1 cmake-utils cuda eutils multilib python-single-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
335 -
336 -if [[ $PV = *9999* ]]; then
337 - EGIT_REPO_URI="git://git.gromacs.org/gromacs.git
338 - https://gerrit.gromacs.org/gromacs.git
339 - https://github.com/gromacs/gromacs.git
340 - https://repo.or.cz/r/gromacs.git"
341 - [[ $PV = 9999 ]] && EGIT_BRANCH="master" || EGIT_BRANCH="release-${PV:0:4}"
342 - inherit git-r3
343 -else
344 - SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${PN}-${PV/_/-}.tar.gz
345 - test? ( http://gerrit.gromacs.org/download/regressiontests-${PV/_/-}.tar.gz )"
346 - KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
347 -fi
348 -
349 -ACCE_IUSE="cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_fma4 cpu_flags_x86_avx cpu_flags_x86_avx2"
350 -
351 -DESCRIPTION="The ultimate molecular dynamics simulation package"
352 -HOMEPAGE="http://www.gromacs.org/"
353 -
354 -# see COPYING for details
355 -# https://repo.or.cz/w/gromacs.git/blob/HEAD:/COPYING
356 -# base, vmd plugins, fftpack from numpy, blas/lapck from netlib, memtestG80 library, mpi_thread lib
357 -LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )"
358 -SLOT="0/${PV}"
359 -IUSE="X blas cuda +doc -double-precision +fftw +gmxapi +hwloc lapack +lmfit mkl mpi +offensive opencl openmp +single-precision test +threads +tng ${ACCE_IUSE}"
360 -
361 -CDEPEND="
362 - X? (
363 - x11-libs/libX11
364 - x11-libs/libSM
365 - x11-libs/libICE
366 - )
367 - blas? ( virtual/blas )
368 - cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.14 )
369 - opencl? ( virtual/opencl )
370 - fftw? ( sci-libs/fftw:3.0 )
371 - hwloc? ( sys-apps/hwloc )
372 - lapack? ( virtual/lapack )
373 - lmfit? ( sci-libs/lmfit )
374 - mkl? ( sci-libs/mkl )
375 - mpi? ( virtual/mpi )
376 - ${PYTHON_DEPS}
377 - "
378 -BDEPEND="${CDEPEND}
379 - virtual/pkgconfig
380 - doc? (
381 - app-doc/doxygen
382 - $(python_gen_cond_dep '
383 - dev-python/sphinx[${PYTHON_MULTI_USEDEP}]
384 - ')
385 - media-gfx/mscgen
386 - media-gfx/graphviz
387 - dev-texlive/texlive-latex
388 - dev-texlive/texlive-latexextra
389 - media-gfx/imagemagick
390 - )"
391 -RDEPEND="${CDEPEND}"
392 -
393 -REQUIRED_USE="
394 - || ( single-precision double-precision )
395 - cuda? ( single-precision )
396 - cuda? ( !opencl )
397 - mkl? ( !blas !fftw !lapack )
398 - ${PYTHON_REQUIRED_USE}"
399 -
400 -DOCS=( AUTHORS README )
401 -
402 -RESTRICT="!test? ( test )"
403 -
404 -if [[ ${PV} != *9999 ]]; then
405 - S="${WORKDIR}/${PN}-${PV/_/-}"
406 -fi
407 -
408 -pkg_pretend() {
409 - [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
410 - use openmp && ! tc-has-openmp && \
411 - die "Please switch to an openmp compatible compiler"
412 -}
413 -
414 -src_unpack() {
415 - if [[ ${PV} != *9999 ]]; then
416 - default
417 - else
418 - git-r3_src_unpack
419 - if use test; then
420 - EGIT_REPO_URI="git://git.gromacs.org/regressiontests.git" \
421 - EGIT_BRANCH="${EGIT_BRANCH}" \
422 - EGIT_CHECKOUT_DIR="${WORKDIR}/regressiontests"\
423 - git-r3_src_unpack
424 - fi
425 - fi
426 -}
427 -
428 -src_prepare() {
429 - #notes/todos
430 - # -on apple: there is framework support
431 -
432 - xdg_environment_reset #591952
433 -
434 - cmake-utils_src_prepare
435 -
436 - use cuda && cuda_src_prepare
437 -
438 - GMX_DIRS=""
439 - use single-precision && GMX_DIRS+=" float"
440 - use double-precision && GMX_DIRS+=" double"
441 -
442 - if use test; then
443 - for x in ${GMX_DIRS}; do
444 - mkdir -p "${WORKDIR}/${P}_${x}" || die
445 - cp -al "${WORKDIR}/regressiontests"* "${WORKDIR}/${P}_${x}/tests" || die
446 - done
447 - fi
448 -
449 - DOC_CONTENTS="Gromacs can use sci-chemistry/vmd to read additional file formats"
450 -
451 - # try to create policy for imagemagik
452 - mkdir -p ${HOME}/.config/ImageMagick
453 - cat >> ${HOME}/.config/ImageMagick/policy.xml <<- EOF
454 - <?xml version="1.0" encoding="UTF-8"?>
455 - <!DOCTYPE policymap [
456 - <!ELEMENT policymap (policy)+>
457 - !ATTLIST policymap xmlns CDATA #FIXED ''>
458 - <!ELEMENT policy EMPTY>
459 - <!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
460 - name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
461 - stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
462 - ]>
463 - <policymap>
464 - <policy domain="coder" rights="read | write" pattern="PS" />
465 - <policy domain="coder" rights="read | write" pattern="PS2" />
466 - <policy domain="coder" rights="read | write" pattern="PS3" />
467 - <policy domain="coder" rights="read | write" pattern="EPS" />
468 - <policy domain="coder" rights="read | write" pattern="PDF" />
469 - <policy domain="coder" rights="read | write" pattern="XPS" />
470 - </policymap>
471 - EOF
472 -}
473 -
474 -src_configure() {
475 - local mycmakeargs_pre=( ) extra fft_opts=( )
476 -
477 - #go from slowest to fastest acceleration
478 - local acce="None"
479 - use cpu_flags_x86_sse2 && acce="SSE2"
480 - use cpu_flags_x86_sse4_1 && acce="SSE4.1"
481 - use cpu_flags_x86_fma4 && acce="AVX_128_FMA"
482 - use cpu_flags_x86_avx && acce="AVX_256"
483 - use cpu_flags_x86_avx2 && acce="AVX2_256"
484 -
485 - #to create man pages, build tree binaries are executed (bug #398437)
486 - [[ ${CHOST} = *-darwin* ]] && \
487 - extra+=" -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF"
488 -
489 - if use fftw; then
490 - fft_opts=( -DGMX_FFT_LIBRARY=fftw3 )
491 - elif use mkl && has_version "=sci-libs/mkl-10*"; then
492 - fft_opts=( -DGMX_FFT_LIBRARY=mkl
493 - -DMKL_INCLUDE_DIR="${MKLROOT}/include"
494 - -DMKL_LIBRARIES="$(echo /opt/intel/mkl/10.0.5.025/lib/*/libmkl.so);$(echo /opt/intel/mkl/10.0.5.025/lib/*/libiomp*.so)"
495 - )
496 - elif use mkl; then
497 - local bits=$(get_libdir)
498 - fft_opts=( -DGMX_FFT_LIBRARY=mkl
499 - -DMKL_INCLUDE_DIR="$(echo /opt/intel/*/mkl/include)"
500 - -DMKL_LIBRARIES="$(echo /opt/intel/*/mkl/lib/*${bits/lib}/libmkl_rt.so)"
501 - )
502 - else
503 - fft_opts=( -DGMX_FFT_LIBRARY=fftpack )
504 - fi
505 -
506 - if use lmfit; then
507 - local lmfit_opts=( -DGMX_USE_LMFIT=EXTERNAL )
508 - else
509 - local lmfit_opts=( -DGMX_USE_LMFIT=INTERNAL )
510 - fi
511 -
512 - mycmakeargs_pre+=(
513 - "${fft_opts[@]}"
514 - "${lmfit_opts[@]}"
515 - -DGMX_X11=$(usex X)
516 - -DGMX_EXTERNAL_BLAS=$(usex blas)
517 - -DGMX_EXTERNAL_LAPACK=$(usex lapack)
518 - -DGMX_OPENMP=$(usex openmp)
519 - -DGMX_COOL_QUOTES=$(usex offensive)
520 - -DGMX_USE_TNG=$(usex tng)
521 - -DGMX_BUILD_MANUAL=$(usex doc)
522 - -DGMX_HWLOC=$(usex hwloc)
523 - -DGMX_DEFAULT_SUFFIX=off
524 - -DGMX_SIMD="$acce"
525 - -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
526 - -DBUILD_TESTING=$(usex test)
527 - -DGMX_BUILD_UNITTESTS=$(usex test)
528 - -DPYTHON_EXECUTABLE="${EPREFIX}/usr/bin/${EPYTHON}"
529 - ${extra}
530 - )
531 -
532 - for x in ${GMX_DIRS}; do
533 - einfo "Configuring for ${x} precision"
534 - local suffix=""
535 - #if we build single and double - double is suffixed
536 - use double-precision && use single-precision && \
537 - [[ ${x} = "double" ]] && suffix="_d"
538 - local p
539 - [[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
540 - local cuda=( "-DGMX_GPU=OFF" )
541 - [[ ${x} = "float" ]] && use cuda && \
542 - cuda=( "-DGMX_GPU=ON" )
543 - local opencl=( "-DGMX_USE_OPENCL=OFF" )
544 - use opencl && opencl=( "-DGMX_USE_OPENCL=ON" ) cuda=( "-DGMX_GPU=ON" )
545 - mycmakeargs=(
546 - ${mycmakeargs_pre[@]} ${p}
547 - -DGMX_MPI=OFF
548 - -DGMX_THREAD_MPI=$(usex threads)
549 - -DGMXAPI=$(usex gmxapi)
550 - "${opencl[@]}"
551 - "${cuda[@]}"
552 - "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
553 - -DGMX_BINARY_SUFFIX="${suffix}"
554 - -DGMX_LIBS_SUFFIX="${suffix}"
555 - )
556 - BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
557 - [[ ${CHOST} != *-darwin* ]] || \
558 - sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}/gentoo_rules.cmake" || die
559 - use mpi || continue
560 - einfo "Configuring for ${x} precision with mpi"
561 - mycmakeargs=(
562 - ${mycmakeargs_pre[@]} ${p}
563 - -DGMX_THREAD_MPI=OFF
564 - -DGMX_MPI=ON
565 - -DGMX_OPENMM=OFF
566 - -DGMXAPI=OFF
567 - "${opencl[@]}"
568 - "${cuda[@]}"
569 - -DGMX_BUILD_MDRUN_ONLY=ON
570 - -DBUILD_SHARED_LIBS=OFF
571 - -DGMX_BUILD_MANUAL=OFF
572 - -DGMX_BINARY_SUFFIX="_mpi${suffix}"
573 - -DGMX_LIBS_SUFFIX="_mpi${suffix}"
574 - )
575 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" CC="mpicc" cmake-utils_src_configure
576 - [[ ${CHOST} != *-darwin* ]] || \
577 - sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}_mpi/gentoo_rules.cmake" || die
578 - done
579 -}
580 -
581 -src_compile() {
582 - for x in ${GMX_DIRS}; do
583 - einfo "Compiling for ${x} precision"
584 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
585 - cmake-utils_src_compile
586 - # not 100% necessary for rel ebuilds as available from website
587 - if use doc; then
588 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
589 - cmake-utils_src_compile manual
590 - fi
591 - use mpi || continue
592 - einfo "Compiling for ${x} precision with mpi"
593 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
594 - cmake-utils_src_compile
595 - done
596 -}
597 -
598 -src_test() {
599 - for x in ${GMX_DIRS}; do
600 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
601 - cmake-utils_src_make check
602 - done
603 -}
604 -
605 -src_install() {
606 - for x in ${GMX_DIRS}; do
607 - BUILD_DIR="${WORKDIR}/${P}_${x}" \
608 - cmake-utils_src_install
609 - if use doc; then
610 - newdoc "${WORKDIR}/${P}_${x}"/docs/manual/gromacs.pdf "${PN}-manual-${PV}.pdf"
611 - fi
612 - use mpi || continue
613 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
614 - cmake-utils_src_install
615 - done
616 -
617 - if use tng; then
618 - insinto /usr/include/tng
619 - doins src/external/tng_io/include/tng/*h
620 - fi
621 - # drop unneeded stuff
622 - rm "${ED}"/usr/bin/GMXRC* || die
623 - for x in "${ED}"/usr/bin/gmx-completion-*.bash ; do
624 - local n=${x##*/gmx-completion-}
625 - n="${n%.bash}"
626 - cat "${ED}"/usr/bin/gmx-completion.bash "$x" > "${T}/${n}" || die
627 - newbashcomp "${T}"/"${n}" "${n}"
628 - done
629 - rm "${ED}"/usr/bin/gmx-completion*.bash || die
630 - readme.gentoo_create_doc
631 -}
632 -
633 -pkg_postinst() {
634 - einfo
635 - einfo "Please read and cite:"
636 - einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
637 - einfo "https://dx.doi.org/10.1021/ct700301q"
638 - einfo
639 - readme.gentoo_print_elog
640 -}