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.1.ebuild ChangeLog gromacs-4.6_beta3-r1.ebuild gromacs-4.6.ebuild
Date: Wed, 06 Mar 2013 02:02:06
Message-Id: 20130306020201.A15542171D@flycatcher.gentoo.org
1 ottxor 13/03/06 02:02:01
2
3 Modified: ChangeLog
4 Added: gromacs-4.6.1.ebuild
5 Removed: gromacs-4.6_beta3-r1.ebuild gromacs-4.6.ebuild
6 Log:
7 version bump
8
9 (Portage version: 2.2.0_alpha165/cvs/Linux x86_64, signed Manifest commit with key C2000586)
10
11 Revision Changes Path
12 1.121 sci-chemistry/gromacs/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.121&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.121&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?r1=1.120&r2=1.121
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v
21 retrieving revision 1.120
22 retrieving revision 1.121
23 diff -u -r1.120 -r1.121
24 --- ChangeLog 12 Feb 2013 04:11:10 -0000 1.120
25 +++ ChangeLog 6 Mar 2013 02:02:01 -0000 1.121
26 @@ -1,6 +1,13 @@
27 # ChangeLog for sci-chemistry/gromacs
28 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.120 2013/02/12 04:11:10 ottxor Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.121 2013/03/06 02:02:01 ottxor Exp $
31 +
32 +*gromacs-4.6.1 (06 Mar 2013)
33 +
34 + 06 Mar 2013; Christoph Junghans <ottxor@g.o>
35 + +files/gromacs-4.6.1-openmm.patch, +gromacs-4.6.1.ebuild, -gromacs-4.6.ebuild,
36 + -gromacs-4.6_beta3-r1.ebuild:
37 + version bump
38
39 12 Feb 2013; Christoph Junghans <ottxor@g.o> gromacs-4.6.ebuild,
40 gromacs-4.6_beta3-r1.ebuild, metadata.xml:
41
42
43
44 1.1 sci-chemistry/gromacs/gromacs-4.6.1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6.1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6.1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: gromacs-4.6.1.ebuild
50 ===================================================================
51 # Copyright 1999-2013 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.6.1.ebuild,v 1.1 2013/03/06 02:02:01 ottxor Exp $
54
55 EAPI=5
56
57 TEST_PV="4.6.1"
58 MANUAL_PV="4.6.1"
59
60 CMAKE_MAKEFILE_GENERATOR="ninja"
61
62 inherit bash-completion-r1 cmake-utils cuda eutils multilib readme.gentoo toolchain-funcs
63
64 if [[ $PV = *9999* ]]; then
65 EGIT_REPO_URI="git://git.gromacs.org/gromacs.git
66 https://gerrit.gromacs.org/gromacs.git
67 git://github.com/gromacs/gromacs.git
68 http://repo.or.cz/r/gromacs.git"
69 EGIT_BRANCH="release-4-6"
70 inherit git-2
71 LIVE_DEPEND="doc? (
72 dev-texlive/texlive-latex
73 media-gfx/imagemagick
74 sys-apps/coreutils
75 )"
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://${PN}.googlecode.com/files/regressiontests-${TEST_PV}.tar.gz )"
80 PATCHES=( "${FILESDIR}/${P}-openmm.patch" )
81 LIVE_DEPEND=""
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 KEYWORDS="~alpha ~amd64 ~arm ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
95 IUSE="X blas cuda doc -double-precision +fftw gsl lapack mkl mpi +offensive openmm openmp +single-precision test +threads zsh-completion ${ACCE_IUSE}"
96
97 CDEPEND="
98 X? (
99 x11-libs/libX11
100 x11-libs/libSM
101 x11-libs/libICE
102 )
103 blas? ( virtual/blas )
104 cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
105 fftw? ( sci-libs/fftw:3.0 )
106 gsl? ( sci-libs/gsl )
107 lapack? ( virtual/lapack )
108 mkl? ( sci-libs/mkl )
109 mpi? ( virtual/mpi )
110 openmm? (
111 >=dev-util/nvidia-cuda-toolkit-4.2.9-r1
112 sci-libs/openmm[cuda,opencl]
113 )"
114 DEPEND="${CDEPEND}
115 virtual/pkgconfig
116 ${LIVE_DEPEND}"
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="master" \
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=$(cmake-utils_use cuda GMX_GPU)
234 [[ ${x} = "double" ]] && use cuda && cuda="-DGMX_GPU=OFF"
235 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
236 $(cmake-utils_use threads GMX_THREAD_MPI) ${cuda} -DGMX_OPENMM=OFF
237 "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
238 -DGMX_BINARY_SUFFIX="${suffix}" -DGMX_LIBS_SUFFIX="${suffix}" )
239 BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
240 if [[ ${x} = float ]] && use openmm; then
241 einfo "Configuring for openmm build"
242 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_MPI=OFF
243 -DGMX_THREAD_MPI=OFF -DGMX_GPU=OFF -DGMX_OPENMM=ON
244 -DOpenMM_PLUGIN_DIR="${EPREFIX}/usr/$(get_libdir)/plugins"
245 -DGMX_BINARY_SUFFIX="_openmm" -DGMX_LIBS_SUFFIX="_openmm" )
246 BUILD_DIR="${WORKDIR}/${P}_openmm" \
247 OPENMM_ROOT_DIR="${EPREFIX}/usr" cmake-utils_src_configure
248 fi
249 use mpi || continue
250 einfo "Configuring for ${x} precision with mpi"
251 mycmakeargs=( ${mycmakeargs_pre[@]} ${p} -DGMX_THREAD_MPI=OFF
252 -DGMX_MPI=ON ${cuda} -DGMX_OPENMM=OFF
253 -DGMX_BINARY_SUFFIX="_mpi${suffix}" -DGMX_LIBS_SUFFIX="_mpi${suffix}" )
254 BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" CC="mpicc" cmake-utils_src_configure
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 if [[ ${x} = float ]] && use openmm; then
264 einfo "Compiling for openmm build"
265 BUILD_DIR="${WORKDIR}/${P}_openmm"\
266 cmake-utils_src_compile mdrun
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 mdrun
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 [[ ${x} = float ]] && use openmm; then
287 BUILD_DIR="${WORKDIR}/${P}_openmm" \
288 DESTDIR="${D}" cmake-utils_src_make install-mdrun
289 fi
290 #manual can only be build after gromacs was installed once in image
291 if use doc && [[ $PV = *9999* && ! -d ${WORKDIR}/manual_build ]]; then
292 mycmakeargs=( -DGMXBIN="${ED}"/usr/bin -DGMXSRC="${WORKDIR}/${P}" )
293 BUILD_DIR="${WORKDIR}"/manual_build \
294 CMAKE_USE_DIR="${WORKDIR}/manual" cmake-utils_src_configure
295 BUILD_DIR="${WORKDIR}"/manual_build cmake-utils_src_make
296 newdoc "${WORKDIR}"/manual_build/gromacs.pdf "${PN}-manual-${PV}.pdf"
297 fi
298 use mpi || continue
299 BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
300 DESTDIR="${D}" cmake-utils_src_make install-mdrun
301 done
302
303 use doc && [[ $PV != *9999* ]] && dodoc "${DISTDIR}/${PN}-manual-${MANUAL_PV}.pdf"
304 newbashcomp "${ED}"/usr/bin/completion.bash ${PN}
305 if use zsh-completion ; then
306 insinto /usr/share/zsh/site-functions
307 newins "${ED}"/usr/bin/completion.zsh _${PN}
308 fi
309 rm -f "${ED}"usr/bin/completion.*
310 rm -rf "${ED}"usr/share/gromacs/html
311 rm -f "${ED}"usr/bin/g_options*
312 rm -f "${ED}"usr/bin/GMXRC*
313
314 readme.gentoo_create_doc
315 }
316
317 pkg_postinst() {
318 einfo
319 einfo "Please read and cite:"
320 einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
321 einfo "http://dx.doi.org/10.1021/ct700301q"
322 if use offensive; then
323 einfo
324 einfo $(g_luck)
325 einfo "For more Gromacs cool quotes (gcq) add g_luck to your .bashrc"
326 fi
327 einfo
328 readme.gentoo_print_elog
329 }