Gentoo Archives: gentoo-commits

From: Christoph Junghans <ottxor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-chemistry/gromacs/
Date: Wed, 03 Sep 2014 22:53:55
Message-Id: 1409784820.6c21e41bbd14c03b35ff24c4dc253ccedf6173a6.ottxor@gentoo
1 commit: 6c21e41bbd14c03b35ff24c4dc253ccedf6173a6
2 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 3 22:53:28 2014 +0000
4 Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 3 22:53:40 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=6c21e41b
7
8 drop old
9
10 Package-Manager: portage-2.2.8-r1
11
12 ---
13 sci-chemistry/gromacs/ChangeLog | 4 +
14 sci-chemistry/gromacs/gromacs-5.0_rc1.ebuild | 268 ---------------------------
15 2 files changed, 4 insertions(+), 268 deletions(-)
16
17 diff --git a/sci-chemistry/gromacs/ChangeLog b/sci-chemistry/gromacs/ChangeLog
18 index b89772c..2b74e15 100644
19 --- a/sci-chemistry/gromacs/ChangeLog
20 +++ b/sci-chemistry/gromacs/ChangeLog
21 @@ -2,6 +2,10 @@
22 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
23 # $Header: $
24
25 + 03 Sep 2014; Christoph Junghans <ottxor@g.o> -Manifest,
26 + -gromacs-5.0_rc1.ebuild:
27 + drop old
28 +
29 03 Sep 2014; Christoph Junghans <ottxor@g.o> gromacs-5.0.9999.ebuild:
30 live update
31
32
33 diff --git a/sci-chemistry/gromacs/gromacs-5.0_rc1.ebuild b/sci-chemistry/gromacs/gromacs-5.0_rc1.ebuild
34 deleted file mode 100644
35 index 34e34f4..0000000
36 --- a/sci-chemistry/gromacs/gromacs-5.0_rc1.ebuild
37 +++ /dev/null
38 @@ -1,268 +0,0 @@
39 -# Copyright 1999-2014 Gentoo Foundation
40 -# Distributed under the terms of the GNU General Public License v2
41 -# $Header: $
42 -
43 -EAPI=5
44 -
45 -TEST_PV="5.0-rc1"
46 -
47 -CMAKE_MAKEFILE_GENERATOR="ninja"
48 -
49 -inherit bash-completion-r1 cmake-utils cuda eutils multilib readme.gentoo toolchain-funcs
50 -
51 -if [[ $PV = *9999* ]]; then
52 - EGIT_REPO_URI="git://git.gromacs.org/gromacs.git
53 - https://gerrit.gromacs.org/gromacs.git
54 - git://github.com/gromacs/gromacs.git
55 - http://repo.or.cz/r/gromacs.git"
56 - EGIT_BRANCH="release-5-0"
57 - inherit git-r3
58 -else
59 - SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${PN}-${PV/_/-}.tar.gz
60 - test? ( http://gerrit.gromacs.org/download/regressiontests-${TEST_PV}.tar.gz )"
61 -fi
62 -
63 -ACCE_IUSE="sse2 sse4_1 avx_128_fma avx_256 avx2_256"
64 -
65 -DESCRIPTION="The ultimate molecular dynamics simulation package"
66 -HOMEPAGE="http://www.gromacs.org/"
67 -
68 -# see COPYING for details
69 -# http://repo.or.cz/w/gromacs.git/blob/HEAD:/COPYING
70 -# base, vmd plugins, fftpack from numpy, blas/lapck from netlib, memtestG80 library, mpi_thread lib
71 -LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )"
72 -SLOT="0/${PV}"
73 -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
74 -IUSE="X blas boost cuda +doc -double-precision +fftw lapack +make-symlinks mkl mpi +offensive openmp +single-precision test +threads +tng ${ACCE_IUSE}"
75 -
76 -CDEPEND="
77 - X? (
78 - x11-libs/libX11
79 - x11-libs/libSM
80 - x11-libs/libICE
81 - )
82 - blas? ( virtual/blas )
83 - boost? ( >=dev-libs/boost-1.55 )
84 - cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
85 - fftw? ( sci-libs/fftw:3.0 )
86 - lapack? ( virtual/lapack )
87 - mkl? ( sci-libs/mkl )
88 - mpi? ( virtual/mpi )
89 - "
90 -DEPEND="${CDEPEND}
91 - virtual/pkgconfig
92 - doc? (
93 - app-doc/doxygen
94 - dev-texlive/texlive-latex
95 - dev-texlive/texlive-latexextra
96 - media-gfx/imagemagick
97 - )"
98 -RDEPEND="${CDEPEND}"
99 -
100 -REQUIRED_USE="
101 - || ( single-precision double-precision )
102 - cuda? ( single-precision )
103 - mkl? ( !blas !fftw !lapack )"
104 -
105 -DOCS=( AUTHORS README )
106 -
107 -if [[ ${PV} != *9999 ]]; then
108 - S="${WORKDIR}/${PN}-${PV/_/-}"
109 -fi
110 -
111 -pkg_pretend() {
112 - [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
113 - use openmp && ! tc-has-openmp && \
114 - die "Please switch to an openmp compatible compiler"
115 -}
116 -
117 -src_unpack() {
118 - if [[ ${PV} != *9999 ]]; then
119 - default
120 - else
121 - git-r3_src_unpack
122 - if use test; then
123 - EGIT_REPO_URI="git://git.gromacs.org/regressiontests.git" \
124 - EGIT_BRANCH="master" EGIT_NOUNPACK="yes" EGIT_COMMIT="master" \
125 - EGIT_SOURCEDIR="${WORKDIR}/regressiontests"\
126 - git-r3_src_unpack
127 - fi
128 - fi
129 -}
130 -
131 -src_prepare() {
132 - #notes/todos
133 - # -on apple: there is framework support
134 -
135 - cmake-utils_src_prepare
136 -
137 - use cuda && cuda_src_prepare
138 -
139 - GMX_DIRS=""
140 - use single-precision && GMX_DIRS+=" float"
141 - use double-precision && GMX_DIRS+=" double"
142 -
143 - if use test; then
144 - for x in ${GMX_DIRS}; do
145 - mkdir -p "${WORKDIR}/${P}_${x}" || die
146 - cp -al "${WORKDIR}/regressiontests"* "${WORKDIR}/${P}_${x}/tests" || die
147 - done
148 - fi
149 -
150 - DOC_CONTENTS="Gromacs can use sci-chemistry/vmd to read additional file formats"
151 -}
152 -
153 -src_configure() {
154 - local mycmakeargs_pre=( ) extra fft_opts=( )
155 -
156 - #go from slowest to fastest acceleration
157 - local acce="None"
158 - use sse2 && acce="SSE2"
159 - use sse4_1 && acce="SSE4.1"
160 - use avx_128_fma && acce="AVX_128_FMA"
161 - use avx_256 && acce="AVX_256"
162 - use avx2_256 && acee="AVX2_256"
163 -
164 - #to create man pages, build tree binaries are executed (bug #398437)
165 - [[ ${CHOST} = *-darwin* ]] && \
166 - extra+=" -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF"
167 -
168 - if use fftw; then
169 - fft_opts=( -DGMX_FFT_LIBRARY=fftw3 )
170 - elif use mkl && has_version "=sci-libs/mkl-10*"; then
171 - fft_opts=( -DGMX_FFT_LIBRARY=mkl
172 - -DMKL_INCLUDE_DIR="${MKLROOT}/include"
173 - -DMKL_LIBRARIES="$(echo /opt/intel/mkl/10.0.5.025/lib/*/libmkl.so);$(echo /opt/intel/mkl/10.0.5.025/lib/*/libiomp*.so)"
174 - )
175 - elif use mkl; then
176 - local bits=$(get_libdir)
177 - fft_opts=( -DGMX_FFT_LIBRARY=mkl
178 - -DMKL_INCLUDE_DIR="$(echo /opt/intel/*/mkl/include)"
179 - -DMKL_LIBRARIES="$(echo /opt/intel/*/mkl/lib/*${bits/lib}/libmkl_rt.so)"
180 - )
181 - else
182 - fft_opts=( -DGMX_FFT_LIBRARY=fftpack )
183 - fi
184 -
185 - mycmakeargs_pre+=(
186 - "${fft_opts[@]}"
187 - $(cmake-utils_use X GMX_X11)
188 - $(cmake-utils_use blas GMX_EXTERNAL_BLAS)
189 - $(cmake-utils_use lapack GMX_EXTERNAL_LAPACK)
190 - $(cmake-utils_use openmp GMX_OPENMP)
191 - $(cmake-utils_use offensive GMX_COOL_QUOTES)
192 - $(cmake-utils_use boost GMX_EXTERNAL_BOOST)
193 - $(cmake-utils_use tng GMX_USE_TNG)
194 - $(cmake-utils_use doc GMX_BUILD_MANUAL)
195 - $(cmake-utils_use make-symlinks GMX_SYMLINK_OLD_BINARY_NAMES)
196 - -DGMX_DEFAULT_SUFFIX=off
197 - -DGMX_SIMD="$acce"
198 - -DGMX_LIB_INSTALL_DIR="$(get_libdir)"
199 - -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
200 - -DGMX_X86_AVX_GCC_MASKLOAD_BUG=OFF
201 - -DGMX_USE_GCC44_BUG_WORKAROUND=OFF
202 - -DBUILD_TESTING=OFF
203 - -DGMX_BUILD_UNITTESTS=OFF
204 - ${extra}
205 - )
206 -
207 - for x in ${GMX_DIRS}; do
208 - einfo "Configuring for ${x} precision"
209 - local suffix=""
210 - #if we build single and double - double is suffixed
211 - use double-precision && use single-precision && \
212 - [[ ${x} = "double" ]] && suffix="_d"
213 - local p
214 - [[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
215 - local cuda=( "-DGMX_GPU=OFF" )
216 - [[ ${x} = "float" ]] && use cuda && \
217 - cuda=( -DGMX_GPU=ON )
218 - mycmakeargs=(
219 - ${mycmakeargs_pre[@]} ${p}
220 - -DGMX_MPI=OFF
221 - $(cmake-utils_use threads GMX_THREAD_MPI)
222 - "${cuda[@]}"
223 - -DGMX_OPENMM=OFF
224 - "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
225 - -DGMX_BINARY_SUFFIX="${suffix}"
226 - -DGMX_LIBS_SUFFIX="${suffix}"
227 - )
228 - BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
229 - use mpi || continue
230 - einfo "Configuring for ${x} precision with mpi"
231 - mycmakeargs=(
232 - ${mycmakeargs_pre[@]} ${p}
233 - -DGMX_THREAD_MPI=OFF
234 - -DGMX_MPI=ON ${cuda}
235 - -DGMX_OPENMM=OFF
236 - -DGMX_BUILD_MDRUN_ONLY=ON
237 - -DBUILD_SHARED_LIBS=OFF
238 - -DGMX_BUILD_MANUAL=OFF
239 - -DGMX_BINARY_SUFFIX="_mpi${suffix}"
240 - -DGMX_LIBS_SUFFIX="_mpi${suffix}"
241 - )
242 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" CC="mpicc" cmake-utils_src_configure
243 - done
244 -}
245 -
246 -src_compile() {
247 - for x in ${GMX_DIRS}; do
248 - einfo "Compiling for ${x} precision"
249 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
250 - cmake-utils_src_compile
251 - # generate bash completion
252 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
253 - cmake-utils_src_compile completion
254 - if use doc; then
255 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
256 - cmake-utils_src_compile manual
257 - fi
258 - use mpi || continue
259 - einfo "Compiling for ${x} precision with mpi"
260 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
261 - cmake-utils_src_compile
262 - done
263 -}
264 -
265 -src_test() {
266 - for x in ${GMX_DIRS}; do
267 - BUILD_DIR="${WORKDIR}/${P}_${x}"\
268 - cmake-utils_src_make check
269 - done
270 -}
271 -
272 -src_install() {
273 - for x in ${GMX_DIRS}; do
274 - BUILD_DIR="${WORKDIR}/${P}_${x}" \
275 - cmake-utils_src_install
276 - if use doc; then
277 - newdoc "${WORKDIR}/${P}_${x}"/manual/gromacs.pdf "${PN}-manual-${PV}.pdf"
278 - fi
279 - newbashcomp "${WORKDIR}/${P}_${x}"/src/programs/completion/gmx-completion.bash gromacs
280 - use mpi || continue
281 - BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
282 - cmake-utils_src_install
283 - done
284 - # drop unneeded stuff
285 - rm -f "${ED}"usr/bin/gmx-completion*
286 - rm -f "${ED}"usr/bin/g_options*
287 - rm -f "${ED}"usr/bin/GMXRC*
288 - rm -f "${ED}"usr/lib*/libtng*.a
289 -
290 - #workaround for libtng
291 - if [[ $(get_libdir) != lib ]]; then
292 - mv "${ED}"usr/lib/libtng* "${ED}usr/$(get_libdir)" || die
293 - rmdir "${ED}"usr/lib || die
294 - fi
295 -
296 - readme.gentoo_create_doc
297 -}
298 -
299 -pkg_postinst() {
300 - einfo
301 - einfo "Please read and cite:"
302 - einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
303 - einfo "http://dx.doi.org/10.1021/ct700301q"
304 - einfo
305 - readme.gentoo_print_elog
306 -}