Gentoo Archives: gentoo-commits

From: "Christoph Junghans (ottxor)" <ottxor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/gromacs: gromacs-4.6.7.ebuild ChangeLog
Date: Fri, 29 Aug 2014 19:29:14
Message-Id: 20140829192911.755554314@oystercatcher.gentoo.org
1 ottxor 14/08/29 19:29:11
2
3 Modified: ChangeLog
4 Added: gromacs-4.6.7.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key C2000586)
9
10 Revision Changes Path
11 1.143 sci-chemistry/gromacs/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.143&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.143&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?r1=1.142&r2=1.143
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v
20 retrieving revision 1.142
21 retrieving revision 1.143
22 diff -u -r1.142 -r1.143
23 --- ChangeLog 7 Jul 2014 17:53:12 -0000 1.142
24 +++ ChangeLog 29 Aug 2014 19:29:11 -0000 1.143
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sci-chemistry/gromacs
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.142 2014/07/07 17:53:12 ottxor Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.143 2014/08/29 19:29:11 ottxor Exp $
30 +
31 +*gromacs-4.6.7 (29 Aug 2014)
32 +
33 + 29 Aug 2014; Christoph Junghans <ottxor@g.o> +gromacs-4.6.7.ebuild:
34 + version bump
35
36 07 Jul 2014; Christoph Junghans <ottxor@g.o> -gromacs-4.6.2.ebuild:
37 remove old
38
39
40
41 1.1 sci-chemistry/gromacs/gromacs-4.6.7.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6.7.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6.7.ebuild?rev=1.1&content-type=text/plain
45
46 Index: gromacs-4.6.7.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6.7.ebuild,v 1.1 2014/08/29 19:29:11 ottxor Exp $
51
52 EAPI=5
53
54 TEST_PV="4.6.7"
55 MANUAL_PV="4.6.7"
56
57 CMAKE_MAKEFILE_GENERATOR="ninja"
58
59 inherit bash-completion-r1 cmake-utils cuda eutils multilib readme.gentoo toolchain-funcs
60
61 if [[ $PV = *9999* ]]; then
62 EGIT_REPO_URI="git://git.gromacs.org/gromacs.git
63 https://gerrit.gromacs.org/gromacs.git
64 git://github.com/gromacs/gromacs.git
65 http://repo.or.cz/r/gromacs.git"
66 EGIT_BRANCH="release-4-6"
67 inherit git-2
68 LIVE_DEPEND="doc? (
69 app-doc/doxygen
70 dev-texlive/texlive-latex
71 dev-texlive/texlive-latexextra
72 media-gfx/imagemagick
73 sys-apps/coreutils
74 )"
75 KEYWORDS=""
76 else
77 SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz
78 doc? ( ftp://ftp.gromacs.org/pub/manual/manual-${MANUAL_PV}.pdf -> ${PN}-manual-${MANUAL_PV}.pdf )
79 test? ( http://gerrit.gromacs.org/download/regressiontests-${TEST_PV}.tar.gz )"
80 LIVE_DEPEND=""
81 KEYWORDS="~alpha ~amd64 ~arm ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
82 fi
83
84 ACCE_IUSE="sse2 sse4_1 avx128fma avx256"
85
86 DESCRIPTION="The ultimate molecular dynamics simulation package"
87 HOMEPAGE="http://www.gromacs.org/"
88
89 # see COPYING for details
90 # http://repo.or.cz/w/gromacs.git/blob/HEAD:/COPYING
91 # base, vmd plugins, fftpack from numpy, blas/lapck from netlib, memtestG80 library, mpi_thread lib
92 LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )"
93 SLOT="0/${PV}"
94 IUSE="X blas cuda doc -double-precision +fftw gsl lapack mkl mpi +offensive openmm openmp +single-precision test +threads zsh-completion ${ACCE_IUSE}"
95
96 CDEPEND="
97 X? (
98 x11-libs/libX11
99 x11-libs/libSM
100 x11-libs/libICE
101 )
102 blas? ( virtual/blas )
103 cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
104 fftw? ( sci-libs/fftw:3.0 )
105 gsl? ( sci-libs/gsl )
106 lapack? ( virtual/lapack )
107 mkl? ( sci-libs/mkl )
108 mpi? ( virtual/mpi )
109 openmm? (
110 >=dev-util/nvidia-cuda-toolkit-4.2.9-r1
111 sci-libs/openmm[cuda,opencl]
112 )"
113 DEPEND="${CDEPEND}
114 virtual/pkgconfig
115 ${LIVE_DEPEND}
116 doc? ( app-doc/doxygen )"
117 RDEPEND="${CDEPEND}"
118
119 REQUIRED_USE="
120 || ( single-precision double-precision )
121 cuda? ( single-precision )
122 openmm? ( single-precision )
123 mkl? ( !blas !fftw !lapack )"
124
125 DOCS=( AUTHORS README )
126 HTML_DOCS=( "${ED}"/usr/share/gromacs/html/ )
127
128 pkg_pretend() {
129 [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
130 use openmp && ! tc-has-openmp && \
131 die "Please switch to an openmp compatible compiler"
132 }
133
134 src_unpack() {
135 if [[ ${PV} != *9999 ]]; then
136 default
137 else
138 git-2_src_unpack
139 if use doc; then
140 EGIT_REPO_URI="git://git.gromacs.org/manual.git" \
141 EGIT_BRANCH="release-4-6" EGIT_NOUNPACK="yes" EGIT_COMMIT="release-4-6" \
142 EGIT_SOURCEDIR="${WORKDIR}/manual"\
143 git-2_src_unpack
144 fi
145 if use test; then
146 EGIT_REPO_URI="git://git.gromacs.org/regressiontests.git" \
147 EGIT_BRANCH="master" EGIT_NOUNPACK="yes" EGIT_COMMIT="release-4-6" \
148 EGIT_SOURCEDIR="${WORKDIR}/regressiontests"\
149 git-2_src_unpack
150 fi
151 fi
152 }
153
154 src_prepare() {
155 #notes/todos
156 # -on apple: there is framework support
157
158 cmake-utils_src_prepare
159
160 use cuda && cuda_src_prepare
161
162 GMX_DIRS=""
163 use single-precision && GMX_DIRS+=" float"
164 use double-precision && GMX_DIRS+=" double"
165
166 if use test; then
167 for x in ${GMX_DIRS}; do
168 mkdir -p "${WORKDIR}/${P}_${x}" || die
169 cp -al "${WORKDIR}/regressiontests"* "${WORKDIR}/${P}_${x}/tests" || die
170 done
171 fi
172
173 DOC_CONTENTS="Gromacs can use sci-chemistry/vmd to read additional file formats"
174 }
175
176 src_configure() {
177 local mycmakeargs_pre=( ) extra fft_opts=( )
178
179 #go from slowest to fastest acceleration
180 local acce="None"
181 use sse2 && acce="SSE2"
182 use sse4_1 && acce="SSE4.1"
183 use avx128fma && acce="AVX_128_FMA"
184 use avx256 && acce="AVX_256"
185
186 #to create man pages, build tree binaries are executed (bug #398437)
187 [[ ${CHOST} = *-darwin* ]] && \
188 extra+=" -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF"
189
190 if use fftw; then
191 fft_opts=( -DGMX_FFT_LIBRARY=fftw3 )
192 elif use mkl && has_version "=sci-libs/mkl-10*"; then
193 fft_opts=( -DGMX_FFT_LIBRARY=mkl
194 -DMKL_INCLUDE_DIR="${MKLROOT}/include"
195 -DMKL_LIBRARIES="$(echo /opt/intel/mkl/10.0.5.025/lib/*/libmkl.so);$(echo /opt/intel/mkl/10.0.5.025/lib/*/libiomp*.so)"
196 )
197 elif use mkl; then
198 local bits=$(get_libdir)
199 fft_opts=( -DGMX_FFT_LIBRARY=mkl
200 -DMKL_INCLUDE_DIR="$(echo /opt/intel/*/mkl/include)"
201 -DMKL_LIBRARIES="$(echo /opt/intel/*/mkl/lib/*${bits/lib}/libmkl_rt.so)"
202 )
203 else
204 fft_opts=( -DGMX_FFT_LIBRARY=fftpack )
205 fi
206
207 mycmakeargs_pre+=(
208 "${fft_opts[@]}"
209 $(cmake-utils_use X GMX_X11)
210 $(cmake-utils_use blas GMX_EXTERNAL_BLAS)
211 $(cmake-utils_use gsl GMX_GSL)
212 $(cmake-utils_use lapack GMX_EXTERNAL_LAPACK)
213 $(cmake-utils_use openmp GMX_OPENMP)
214 $(cmake-utils_use offensive GMX_COOL_QUOTES)
215 -DGMX_DEFAULT_SUFFIX=off
216 -DGMX_ACCELERATION="$acce"
217 -DGMXLIB="$(get_libdir)"
218 -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
219 -DGMX_PREFIX_LIBMD=ON
220 -DGMX_X86_AVX_GCC_MASKLOAD_BUG=OFF
221 -DGMX_USE_GCC44_BUG_WORKAROUND=OFF
222 ${extra}
223 )
224
225 for x in ${GMX_DIRS}; do
226 einfo "Configuring for ${x} precision"
227 local suffix=""
228 #if we build single and double - double is suffixed
229 use double-precision && use single-precision && \
230 [[ ${x} = "double" ]] && suffix="_d"
231 local p
232 [[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
233 local cuda=( "-DGMX_GPU=OFF" )
234 [[ ${x} = "float" ]] && use cuda && \
235 cuda=( -DGMX_GPU=ON )
236 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
237 $(cmake-utils_use threads GMX_THREAD_MPI) "${cuda[@]}" -DGMX_OPENMM=OFF
238 "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
239 -DGMX_BINARY_SUFFIX="${suffix}" -DGMX_LIBS_SUFFIX="${suffix}" )
240 BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
241 if [[ ${x} = float ]] && use openmm; then
242 einfo "Configuring for openmm build"
243 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
244 -DGMX_THREAD_MPI=OFF -DGMX_GPU=OFF -DGMX_OPENMM=ON
245 -DOpenMM_PLUGIN_DIR="${EPREFIX}/usr/$(get_libdir)/plugins"
246 -DGMX_BINARY_SUFFIX="_openmm" -DGMX_LIBS_SUFFIX="_openmm" )
247 BUILD_DIR="${WORKDIR}/${P}_openmm" \
248 OPENMM_ROOT_DIR="${EPREFIX}/usr" cmake-utils_src_configure
249 fi
250 use mpi || continue
251 einfo "Configuring for ${x} precision with mpi"
252 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_THREAD_MPI=OFF
253 -DGMX_MPI=ON ${cuda} -DGMX_OPENMM=OFF
254 -DGMX_BINARY_SUFFIX="_mpi${suffix}" -DGMX_LIBS_SUFFIX="_mpi${suffix}" )
255 BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" CC="mpicc" cmake-utils_src_configure
256 done
257 }
258
259 src_compile() {
260 for x in ${GMX_DIRS}; do
261 einfo "Compiling for ${x} precision"
262 BUILD_DIR="${WORKDIR}/${P}_${x}"\
263 cmake-utils_src_compile
264 if [[ ${x} = float ]] && use openmm; then
265 einfo "Compiling for openmm build"
266 BUILD_DIR="${WORKDIR}/${P}_openmm"\
267 cmake-utils_src_compile mdrun
268 fi
269 use mpi || continue
270 einfo "Compiling for ${x} precision with mpi"
271 BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
272 cmake-utils_src_compile mdrun
273 done
274 }
275
276 src_test() {
277 for x in ${GMX_DIRS}; do
278 BUILD_DIR="${WORKDIR}/${P}_${x}"\
279 cmake-utils_src_make check
280 done
281 }
282
283 src_install() {
284 for x in ${GMX_DIRS}; do
285 BUILD_DIR="${WORKDIR}/${P}_${x}" \
286 cmake-utils_src_install
287 if [[ ${x} = float ]] && use openmm; then
288 BUILD_DIR="${WORKDIR}/${P}_openmm" \
289 DESTDIR="${D}" cmake-utils_src_make install-mdrun
290 fi
291 #manual can only be build after gromacs was installed once in image
292 if use doc && [[ $PV = *9999* && ! -d ${WORKDIR}/manual_build ]]; then
293 mycmakeargs=( -DGMXBIN="${ED}"/usr/bin -DGMXSRC="${WORKDIR}/${P}" )
294 BUILD_DIR="${WORKDIR}"/manual_build \
295 CMAKE_USE_DIR="${WORKDIR}/manual" cmake-utils_src_configure
296 [[ ${CHOST} = *-darwin* ]] && \
297 export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}${DYLD_LIBRARY_PATH:+:}${ED}/usr/$(get_libdir)"
298 BUILD_DIR="${WORKDIR}"/manual_build cmake-utils_src_make
299 [[ ${CHOST} = *-darwin* ]] && DYLD_LIBRARY_PATH="${ED}/usr/$(get_libdir)"
300 newdoc "${WORKDIR}"/manual_build/gromacs.pdf "${PN}-manual-${PV}.pdf"
301 fi
302 use mpi || continue
303 BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
304 DESTDIR="${D}" cmake-utils_src_make install-mdrun
305 done
306
307 use doc && [[ $PV != *9999* ]] && dodoc "${DISTDIR}/${PN}-manual-${MANUAL_PV}.pdf"
308 newbashcomp "${ED}"/usr/bin/completion.bash ${PN}
309 if use zsh-completion ; then
310 insinto /usr/share/zsh/site-functions
311 newins "${ED}"/usr/bin/completion.zsh _${PN}
312 fi
313 rm -f "${ED}"usr/bin/completion.*
314 rm -rf "${ED}"usr/share/gromacs/html
315 rm -f "${ED}"usr/bin/g_options*
316 rm -f "${ED}"usr/bin/GMXRC*
317
318 readme.gentoo_create_doc
319 }
320
321 pkg_postinst() {
322 einfo
323 einfo "Please read and cite:"
324 einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
325 einfo "http://dx.doi.org/10.1021/ct700301q"
326 if use offensive; then
327 einfo
328 einfo $(g_luck)
329 einfo "For more Gromacs cool quotes (gcq) add g_luck to your .bashrc"
330 fi
331 einfo
332 readme.gentoo_print_elog
333 }