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: metadata.xml ChangeLog gromacs-4.0.4.ebuild gromacs-4.0.2.ebuild gromacs-4.0.ebuild
Date: Mon, 20 Apr 2009 13:39:25
Message-Id: E1LvtiK-0002C9-UU@stork.gentoo.org
1 alexxy 09/04/20 13:39:12
2
3 Modified: metadata.xml ChangeLog
4 Added: gromacs-4.0.4.ebuild
5 Removed: gromacs-4.0.2.ebuild gromacs-4.0.ebuild
6 Log:
7 Add new gromacs 4.0.4
8 (Portage version: 2.2_rc30/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.7 sci-chemistry/gromacs/metadata.xml
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/metadata.xml?rev=1.7&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/metadata.xml?rev=1.7&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/metadata.xml?r1=1.6&r2=1.7
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/metadata.xml,v
20 retrieving revision 1.6
21 retrieving revision 1.7
22 diff -u -r1.6 -r1.7
23 --- metadata.xml 6 Oct 2008 02:08:34 -0000 1.6
24 +++ metadata.xml 20 Apr 2009 13:39:12 -0000 1.7
25 @@ -3,8 +3,11 @@
26 <pkgmetadata>
27 <herd>sci-chemistry</herd>
28 <use>
29 - <flag name='double-precision'>More precise calculations at the expense of
30 - speed</flag>
31 - <flag name='single-precision'>Single precision version of gromacs</flag>
32 + <flag name='dmalloc'>Enable use of Debug Malloc</flag>
33 + <flag name='double-precision'>More precise calculations at the expense of speed</flag>
34 + <flag name='fkernels'>Enable building of Fortran Kernels for platforms that
35 + dont have assembly loops</flag>
36 + <flag name='single-precision'>Single precision version of gromacs</flag>
37 + <flag name='zsh-completion'>Enable zsh completion support</flag>
38 </use>
39 </pkgmetadata>
40
41
42
43 1.35 sci-chemistry/gromacs/ChangeLog
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.35&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.35&content-type=text/plain
47 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/ChangeLog?r1=1.34&r2=1.35
48
49 Index: ChangeLog
50 ===================================================================
51 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v
52 retrieving revision 1.34
53 retrieving revision 1.35
54 diff -u -r1.34 -r1.35
55 --- ChangeLog 8 Mar 2009 19:50:46 -0000 1.34
56 +++ ChangeLog 20 Apr 2009 13:39:12 -0000 1.35
57 @@ -1,6 +1,13 @@
58 # ChangeLog for sci-chemistry/gromacs
59 # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
60 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.34 2009/03/08 19:50:46 maekke Exp $
61 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.35 2009/04/20 13:39:12 alexxy Exp $
62 +
63 +*gromacs-4.0.4 (20 Apr 2009)
64 +
65 + 20 Apr 2009; Alexey Shvetsov <alexxy@g.o>
66 + +files/gromacs-4.0.4-configure-gfortran.patch, metadata.xml,
67 + -gromacs-4.0.ebuild, -gromacs-4.0.2.ebuild, +gromacs-4.0.4.ebuild:
68 + Add new gromacs 4.0.4
69
70 08 Mar 2009; Markus Meier <maekke@g.o> gromacs-4.0.3.ebuild:
71 amd64/x86 stable, bug #260995
72
73
74
75 1.1 sci-chemistry/gromacs/gromacs-4.0.4.ebuild
76
77 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.4.ebuild?rev=1.1&view=markup
78 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.4.ebuild?rev=1.1&content-type=text/plain
79
80 Index: gromacs-4.0.4.ebuild
81 ===================================================================
82 # Copyright 1999-2009 Gentoo Foundation
83 # Distributed under the terms of the GNU General Public License v2
84 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.4.ebuild,v 1.1 2009/04/20 13:39:12 alexxy Exp $
85
86 EAPI="2"
87
88 LIBTOOLIZE="true"
89
90 inherit autotools bash-completion eutils fortran multilib
91
92 DESCRIPTION="The ultimate molecular dynamics simulation package"
93 HOMEPAGE="http://www.gromacs.org/"
94 SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz
95 test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${PV}.tgz )
96 doc? ( ftp://ftp.gromacs.org/pub/manual/manual-4.0.pdf )"
97
98 LICENSE="GPL-2"
99 SLOT="0"
100 KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86"
101 IUSE="X blas dmalloc doc -double-precision +fftw fkernels gsl lapack mpi +single-precision static test +xml zsh-completion"
102
103 DEPEND="app-shells/tcsh
104 X? ( x11-libs/libX11 )
105 dmalloc? ( dev-libs/dmalloc )
106 blas? ( virtual/blas )
107 fftw? ( sci-libs/fftw:3.0 )
108 gsl? ( sci-libs/gsl )
109 lapack? ( virtual/lapack )
110 mpi? ( virtual/mpi )
111 xml? ( dev-libs/libxml2 )"
112
113 RDEPEND="${DEPEND}"
114
115 src_prepare() {
116 # Fix typos in a couple of files.
117 sed -e "s:+0f:-f:" -i share/tutor/gmxdemo/demo \
118 || die "Failed to fixup demo script."
119
120 # Fix a sandbox violation that occurs when re-emerging with mpi.
121 sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${D}usr/$( get_libdir )\" ; \\\\" \
122 -i src/tools/Makefile.am \
123 || die "sed tools/Makefile.am failed"
124
125 sed -e "s:\$\$libdir:\$temp_libdir:" \
126 -i src/tools/Makefile.am \
127 || die "sed tools/Makefile.am failed"
128
129 sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${D}usr/$( get_libdir )\" ; \\\\" \
130 -i src/tools/Makefile.am \
131 || die "sed tools/Makefile.am failed"
132
133 sed -e "s:\$\$libdir:\$\$temp_libdir:" \
134 -i src/tools/Makefile.am \
135 || die "sed tools/Makefile.am failed"
136
137 use fkernels && epatch "${FILESDIR}/${P}-configure-gfortran.patch"
138
139 eautoreconf
140
141 cd "${WORKDIR}"
142 mv "${P}" "${P}-single"
143 if ( use double-precision ) ; then
144 einfo "Moving sources for Multiprecision Build"
145 cp -prP "${P}-single" "${P}-double"
146 fi
147 }
148
149 src_configure() {
150 local myconf ;
151 local myconf_s ;
152 local myconf_d ;
153 local suffix_d ;
154
155 #leave all assembly options enabled mdrun is smart enough to deside itself
156 #there so no gentoo on bluegene!
157 myconf="${myconf} --disable-bluegene"
158
159 #from gromacs configure
160 if ! use fftw; then
161 ewarn "WARNING: The built-in FFTPACK routines are slow."
162 ewarn "Are you sure you don\'t want to use FFTW?"
163 ewarn "It is free and much faster..."
164 fi
165
166 if [[ $(gcc-version) == "4.1" ]]; then
167 ewarn "gcc 4.1 is not supported by gromacs"
168 ewarn "please run test suite"
169 fi
170
171 #fortran will gone in gromacs 4.1 anyway
172 #note for gentoo-PREFIX on aix, fortran (xlf) is still much faster
173 if use fkernels; then
174 ewarn "Fortran kernels are usually not faster than C kernels and assembly"
175 ewarn "I hope, you know what are you doing..."
176 FORTRAN="g77 gfortran ifc"
177 myconf="${myconf} --enable-fortran" && fortran_pkg_setup
178 else
179 myconf="${myconf} --disable-fortran"
180 fi
181
182 # if we need external blas
183 if use blas; then
184 export LIBS="${LIBS} -lblas"
185 myconf="${myconf} $(use_with blas external-blas)"
186 fi
187
188 # if we need external lapack
189 if use lapack; then
190 export LIBS="${LIBS} -llapack"
191 myconf="${myconf} $(use_with lapack external-lapack)"
192 fi
193
194 myconf="--datadir=/usr/share \
195 --bindir=/usr/bin \
196 --libdir=/usr/$(get_libdir) \
197 $(use_with dmalloc) \
198 $(use_with fftw fft fftw3) \
199 $(use_with gsl) \
200 $(use_enable mpi) \
201 $(use_with X x) \
202 $(use_with xml) \
203 $(use_enable static all-static) \
204 ${myconf}"
205
206 #if we build both double is suffixed
207 if ( use double-precision && use single-precision ); then
208 suffix_d="_d"
209 else
210 suffix_d=""
211 fi
212
213 if use double-precision ; then
214 #from gromacs manual
215 elog
216 elog "For most simulations single precision is accurate enough. In some"
217 elog "cases double precision is required to get reasonable results:"
218 elog
219 elog "-normal mode analysis, for the conjugate gradient or l-bfgs minimization"
220 elog " and the calculation and diagonalization of the Hessian "
221 elog "-calculation of the constraint force between two large groups of atoms"
222 elog "-energy conservation: this can only be done without temperature coupling and"
223 elog " without cutoffs"
224 elog
225 einfo "Configuring Double Precison Gromacs"
226 cd "${WORKDIR}"/"${P}"-double
227 myconf_d="${myconf} --enable-double --program-suffix='${suffix_d}'"
228 econf ${myconf_d} || die "Double Precision econf failed"
229 fi
230
231 if use single-precision ; then
232 einfo "Configuring Single Precison Gromacs"
233 cd "${WORKDIR}"/"${P}"-single
234 myconf_s="${myconf} --enable-float --program-suffix=''"
235 econf ${myconf_s} || die "configure failed"
236 fi
237 }
238
239 src_compile() {
240 if use double-precision ; then
241 einfo "Building Double Precison Gromacs"
242 cd "${WORKDIR}"/"${P}"-double
243 emake || die "Double Precision emake failed"
244 fi
245
246 if use single-precision ; then
247 einfo "Building Single Precison Gromacs"
248 cd "${WORKDIR}"/"${P}"-single
249 emake || die "Single Precision emake failed"
250 fi
251 }
252
253 src_test() {
254 if use single-precision ; then
255 export PATH="${WORKDIR}/${P}-single/src/kernel:${WORKDIR}/${P}-single/src/tools:$PATH"
256 cd "${WORKDIR}/gmxtest"
257 #test is broken, only do simple tests
258 ./gmxtest.pl simple || die "Single Precision test failed"
259 fi
260
261 if use double-precision ; then
262 export PATH="${WORKDIR}/${P}-double/src/kernel:${WORKDIR}/${P}-double/src/tools:$PATH"
263 cd "${WORKDIR}/gmxtest"
264 use single-precision && ./gmxtest.pl clean
265 #test is broken, only do simple tests
266 ./gmxtest.pl -double simple || die "Double Precision test failed"
267 fi
268 }
269
270 src_install() {
271 if use single-precision ; then
272 einfo "Installing Single Precision"
273 cd "${WORKDIR}"/"${P}"-single
274 emake DESTDIR="${D}" install || die "Installing Single Precision failed"
275 fi
276
277 if use double-precision ; then
278 einfo "Installing Double Precision"
279 cd "${WORKDIR}"/"${P}"-double
280 emake DESTDIR="${D}" install || die "Installing Double Precision failed"
281 fi
282
283 sed -n -e '/^GMXBIN/,/^GMXDATA/p' "${D}"/usr/bin/GMXRC.bash > "${T}/80gromacs"
284 doenvd "${T}/80gromacs"
285 rm -f "${D}"/usr/bin/GMXRC*
286
287 dobashcompletion "${D}"/usr/bin/completion.bash ${PN}
288 if use zsh-completion ; then
289 insinto /usr/share/zsh/site-functions
290 newins "${D}"/usr/bin/completion.zsh _${PN}
291 fi
292 rm -r "${D}"/usr/bin/completion.*
293
294 dodoc AUTHORS INSTALL README
295 if use doc; then
296 # Move html and leave examples and templates under /usr/share/gromacs.
297 mv "${D}"/usr/share/"${PN}"/html "${D}"/usr/share/doc/"${PF}"/
298 dodoc "${DISTDIR}"/manual-4.0.pdf
299 fi
300 }
301
302 pkg_postinst() {
303 env-update && source /etc/profile
304 elog
305 elog "Please read and cite:"
306 elog "Gromacs 4, J. Chem. Theory Comput. 4, 435 \(2008\). "
307 elog "http://dx.doi.org/10.1021/ct700301q"
308 elog
309 bash-completion_pkg_postinst
310 elog
311 elog $(luck)
312 elog "For more Gromacs cool quotes \(gcq\) add luck to your .bashrc"
313 elog
314 }