Gentoo Archives: gentoo-commits

From: "Alexey Shvetsov (alexxy)" <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/gromacs: gromacs-5.0.2.ebuild ChangeLog
Date: Thu, 02 Oct 2014 15:35:05
Message-Id: 20141002153459.585806C5F@oystercatcher.gentoo.org
1 alexxy 14/10/02 15:34:59
2
3 Modified: ChangeLog
4 Added: gromacs-5.0.2.ebuild
5 Log:
6 Version bump =D
7
8 (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key F82F92E6)
9
10 Revision Changes Path
11 1.146 sci-chemistry/gromacs/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.146&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.146&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?r1=1.145&r2=1.146
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v
20 retrieving revision 1.145
21 retrieving revision 1.146
22 diff -u -r1.145 -r1.146
23 --- ChangeLog 6 Sep 2014 18:44:08 -0000 1.145
24 +++ ChangeLog 2 Oct 2014 15:34:59 -0000 1.146
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.145 2014/09/06 18:44:08 ottxor Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.146 2014/10/02 15:34:59 alexxy Exp $
30 +
31 +*gromacs-5.0.2 (02 Oct 2014)
32 +
33 + 02 Oct 2014; Alexey Shvetsov <alexxy@g.o> +gromacs-5.0.2.ebuild:
34 + Version bump =D
35
36 *gromacs-5.0.1 (06 Sep 2014)
37
38
39
40
41 1.1 sci-chemistry/gromacs/gromacs-5.0.2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-5.0.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-5.0.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: gromacs-5.0.2.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-5.0.2.ebuild,v 1.1 2014/10/02 15:34:59 alexxy Exp $
51
52 EAPI=5
53
54 CMAKE_MAKEFILE_GENERATOR="ninja"
55
56 inherit bash-completion-r1 cmake-utils cuda eutils multilib readme.gentoo toolchain-funcs
57
58 if [[ $PV = *9999* ]]; then
59 EGIT_REPO_URI="git://git.gromacs.org/gromacs.git
60 https://gerrit.gromacs.org/gromacs.git
61 git://github.com/gromacs/gromacs.git
62 http://repo.or.cz/r/gromacs.git"
63 EGIT_BRANCH="release-5-0"
64 inherit git-r3
65 KEYWORDS=""
66 else
67 SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${PN}-${PV/_/-}.tar.gz
68 test? ( http://gerrit.gromacs.org/download/regressiontests-${PV}.tar.gz )"
69 KEYWORDS="~alpha ~amd64 ~arm ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
70 fi
71
72 ACCE_IUSE="sse2 sse4_1 avx_128_fma avx_256 avx2_256"
73
74 DESCRIPTION="The ultimate molecular dynamics simulation package"
75 HOMEPAGE="http://www.gromacs.org/"
76
77 # see COPYING for details
78 # http://repo.or.cz/w/gromacs.git/blob/HEAD:/COPYING
79 # base, vmd plugins, fftpack from numpy, blas/lapck from netlib, memtestG80 library, mpi_thread lib
80 LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )"
81 SLOT="0/${PV}"
82 IUSE="X blas boost cuda +doc -double-precision +fftw lapack +make-symlinks mkl mpi +offensive openmp +single-precision test +threads +tng ${ACCE_IUSE}"
83
84 CDEPEND="
85 X? (
86 x11-libs/libX11
87 x11-libs/libSM
88 x11-libs/libICE
89 )
90 blas? ( virtual/blas )
91 boost? ( >=dev-libs/boost-1.55 )
92 cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
93 fftw? ( sci-libs/fftw:3.0 )
94 lapack? ( virtual/lapack )
95 mkl? ( sci-libs/mkl )
96 mpi? ( virtual/mpi )
97 "
98 DEPEND="${CDEPEND}
99 virtual/pkgconfig
100 doc? (
101 app-doc/doxygen
102 dev-texlive/texlive-latex
103 dev-texlive/texlive-latexextra
104 media-gfx/imagemagick
105 )"
106 RDEPEND="${CDEPEND}"
107
108 REQUIRED_USE="
109 || ( single-precision double-precision )
110 cuda? ( single-precision )
111 mkl? ( !blas !fftw !lapack )"
112
113 DOCS=( AUTHORS README )
114
115 if [[ ${PV} != *9999 ]]; then
116 S="${WORKDIR}/${PN}-${PV/_/-}"
117 fi
118
119 pkg_pretend() {
120 [[ $(gcc-version) == "4.1" ]] && die "gcc 4.1 is not supported by gromacs"
121 use openmp && ! tc-has-openmp && \
122 die "Please switch to an openmp compatible compiler"
123 }
124
125 src_unpack() {
126 if [[ ${PV} != *9999 ]]; then
127 default
128 else
129 git-r3_src_unpack
130 if use test; then
131 EGIT_REPO_URI="git://git.gromacs.org/regressiontests.git" \
132 EGIT_BRANCH="master" EGIT_COMMIT="master" \
133 EGIT_CHECKOUT_DIR="${WORKDIR}/regressiontests"\
134 git-r3_src_unpack
135 fi
136 fi
137 }
138
139 src_prepare() {
140 #notes/todos
141 # -on apple: there is framework support
142
143 cmake-utils_src_prepare
144
145 use cuda && cuda_src_prepare
146
147 GMX_DIRS=""
148 use single-precision && GMX_DIRS+=" float"
149 use double-precision && GMX_DIRS+=" double"
150
151 if use test; then
152 for x in ${GMX_DIRS}; do
153 mkdir -p "${WORKDIR}/${P}_${x}" || die
154 cp -al "${WORKDIR}/regressiontests"* "${WORKDIR}/${P}_${x}/tests" || die
155 done
156 fi
157
158 DOC_CONTENTS="Gromacs can use sci-chemistry/vmd to read additional file formats"
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 sse2 && acce="SSE2"
167 use sse4_1 && acce="SSE4.1"
168 use avx_128_fma && acce="AVX_128_FMA"
169 use avx_256 && acce="AVX_256"
170 use avx2_256 && acee="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 $(cmake-utils_use X GMX_X11)
196 $(cmake-utils_use blas GMX_EXTERNAL_BLAS)
197 $(cmake-utils_use lapack GMX_EXTERNAL_LAPACK)
198 $(cmake-utils_use openmp GMX_OPENMP)
199 $(cmake-utils_use offensive GMX_COOL_QUOTES)
200 $(cmake-utils_use boost GMX_EXTERNAL_BOOST)
201 $(cmake-utils_use tng GMX_USE_TNG)
202 $(cmake-utils_use doc GMX_BUILD_MANUAL)
203 $(cmake-utils_use make-symlinks GMX_SYMLINK_OLD_BINARY_NAMES)
204 -DGMX_DEFAULT_SUFFIX=off
205 -DGMX_SIMD="$acce"
206 -DGMX_LIB_INSTALL_DIR="$(get_libdir)"
207 -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
208 -DGMX_X86_AVX_GCC_MASKLOAD_BUG=OFF
209 -DGMX_USE_GCC44_BUG_WORKAROUND=OFF
210 -DBUILD_TESTING=OFF
211 -DGMX_BUILD_UNITTESTS=OFF
212 ${extra}
213 )
214
215 for x in ${GMX_DIRS}; do
216 einfo "Configuring for ${x} precision"
217 local suffix=""
218 #if we build single and double - double is suffixed
219 use double-precision && use single-precision && \
220 [[ ${x} = "double" ]] && suffix="_d"
221 local p
222 [[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
223 local cuda=( "-DGMX_GPU=OFF" )
224 [[ ${x} = "float" ]] && use cuda && \
225 cuda=( -DGMX_GPU=ON )
226 mycmakeargs=(
227 ${mycmakeargs_pre[@]} ${p}
228 -DGMX_MPI=OFF
229 $(cmake-utils_use threads GMX_THREAD_MPI)
230 "${cuda[@]}"
231 -DGMX_OPENMM=OFF
232 "$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
233 -DGMX_BINARY_SUFFIX="${suffix}"
234 -DGMX_LIBS_SUFFIX="${suffix}"
235 )
236 BUILD_DIR="${WORKDIR}/${P}_${x}" cmake-utils_src_configure
237 [[ ${CHOST} != *-darwin* ]] || \
238 sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}/gentoo_rules.cmake" || die
239 use mpi || continue
240 einfo "Configuring for ${x} precision with mpi"
241 mycmakeargs=(
242 ${mycmakeargs_pre[@]} ${p}
243 -DGMX_THREAD_MPI=OFF
244 -DGMX_MPI=ON ${cuda}
245 -DGMX_OPENMM=OFF
246 -DGMX_BUILD_MDRUN_ONLY=ON
247 -DBUILD_SHARED_LIBS=OFF
248 -DGMX_BUILD_MANUAL=OFF
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 # generate bash completion
264 BUILD_DIR="${WORKDIR}/${P}_${x}"\
265 cmake-utils_src_compile completion
266 if use doc; then
267 BUILD_DIR="${WORKDIR}/${P}_${x}"\
268 cmake-utils_src_compile manual
269 fi
270 use mpi || continue
271 einfo "Compiling for ${x} precision with mpi"
272 BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\
273 cmake-utils_src_compile
274 done
275 }
276
277 src_test() {
278 for x in ${GMX_DIRS}; do
279 BUILD_DIR="${WORKDIR}/${P}_${x}"\
280 cmake-utils_src_make check
281 done
282 }
283
284 src_install() {
285 for x in ${GMX_DIRS}; do
286 BUILD_DIR="${WORKDIR}/${P}_${x}" \
287 cmake-utils_src_install
288 if use doc; then
289 newdoc "${WORKDIR}/${P}_${x}"/docs/manual/gromacs.pdf "${PN}-manual-${PV}.pdf"
290 fi
291 newbashcomp "${WORKDIR}/${P}_${x}"/src/programs/completion/gmx-completion.bash gromacs
292 use mpi || continue
293 BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \
294 cmake-utils_src_install
295 done
296 # drop unneeded stuff
297 rm "${ED}"usr/bin/GMXRC* || die
298
299 readme.gentoo_create_doc
300 }
301
302 pkg_postinst() {
303 einfo
304 einfo "Please read and cite:"
305 einfo "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). "
306 einfo "http://dx.doi.org/10.1021/ct700301q"
307 einfo
308 readme.gentoo_print_elog
309 }