1 |
alexxy 10/06/27 19:06:33 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: gromacs-4.0.7-r3.ebuild |
5 |
Removed: gromacs-4.0.7-r1.ebuild gromacs-4.0.7.ebuild |
6 |
Log: |
7 |
[sci-chemistry/gromacs] Update ebuild to eapi3+prefix support. add amberports and latest upstream patches |
8 |
(Portage version: 2.2_rc67_p177/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.10 sci-chemistry/gromacs/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/metadata.xml?rev=1.10&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/metadata.xml?rev=1.10&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/metadata.xml?r1=1.9&r2=1.10 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/metadata.xml,v |
20 |
retrieving revision 1.9 |
21 |
retrieving revision 1.10 |
22 |
diff -u -r1.9 -r1.10 |
23 |
--- metadata.xml 21 Jun 2010 15:33:27 -0000 1.9 |
24 |
+++ metadata.xml 27 Jun 2010 19:06:33 -0000 1.10 |
25 |
@@ -3,10 +3,12 @@ |
26 |
<pkgmetadata> |
27 |
<herd>sci-chemistry</herd> |
28 |
<use> |
29 |
- <flag name='dmalloc'>Enable debugging with the dmalloc library</flag> |
30 |
- <flag name='double-precision'>More precise calculations at the expense of speed</flag> |
31 |
- <flag name='fkernels'>Enable building of Fortran Kernels for platforms that |
32 |
- dont have assembly loops</flag> |
33 |
- <flag name='single-precision'>Single precision version of gromacs</flag> |
34 |
+ <flag name='dmalloc'>Enable use of Debug Malloc</flag> |
35 |
+ <flag name='double-precision'>More precise calculations at the expense of speed</flag> |
36 |
+ <flag name='ffamber'>Enable ffamber ports for gromacs</flag> |
37 |
+ <flag name='fkernels'>Enable building of Fortran Kernels for platforms |
38 |
+ that dont have assembly loops</flag> |
39 |
+ <flag name='single-precision'>Single precision version of gromacs</flag> |
40 |
+ <flag name='zsh-completion'>Enable zsh completion support</flag> |
41 |
</use> |
42 |
</pkgmetadata> |
43 |
|
44 |
|
45 |
|
46 |
1.51 sci-chemistry/gromacs/ChangeLog |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.51&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.51&content-type=text/plain |
50 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?r1=1.50&r2=1.51 |
51 |
|
52 |
Index: ChangeLog |
53 |
=================================================================== |
54 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v |
55 |
retrieving revision 1.50 |
56 |
retrieving revision 1.51 |
57 |
diff -u -r1.50 -r1.51 |
58 |
--- ChangeLog 24 Jun 2010 13:08:43 -0000 1.50 |
59 |
+++ ChangeLog 27 Jun 2010 19:06:33 -0000 1.51 |
60 |
@@ -1,6 +1,15 @@ |
61 |
# ChangeLog for sci-chemistry/gromacs |
62 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
63 |
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.50 2010/06/24 13:08:43 jlec Exp $ |
64 |
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.51 2010/06/27 19:06:33 alexxy Exp $ |
65 |
+ |
66 |
+*gromacs-4.0.7-r3 (27 Jun 2010) |
67 |
+ |
68 |
+ 27 Jun 2010; Alexey Shvetsov <alexxy@g.o> -gromacs-4.0.7.ebuild, |
69 |
+ -gromacs-4.0.7-r1.ebuild, +gromacs-4.0.7-r3.ebuild, |
70 |
+ -files/gromacs-4.0.7-docdir.patch, |
71 |
+ +files/gromacs-4.0.7_upstream2010-06-08.patch: |
72 |
+ Added patches from upstream stable branch. Added ffamber ports. Also fixed |
73 |
+ bugs #301854 and #284431. Big thank to Christoph Junghans |
74 |
|
75 |
24 Jun 2010; Justin Lecher <jlec@g.o> gromacs-3.3.1-r1.ebuild, |
76 |
gromacs-3.3.3.ebuild: |
77 |
|
78 |
|
79 |
|
80 |
1.1 sci-chemistry/gromacs/gromacs-4.0.7-r3.ebuild |
81 |
|
82 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.7-r3.ebuild?rev=1.1&view=markup |
83 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.7-r3.ebuild?rev=1.1&content-type=text/plain |
84 |
|
85 |
Index: gromacs-4.0.7-r3.ebuild |
86 |
=================================================================== |
87 |
# Copyright 1999-2010 Gentoo Foundation |
88 |
# Distributed under the terms of the GNU General Public License v2 |
89 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.7-r3.ebuild,v 1.1 2010/06/27 19:06:33 alexxy Exp $ |
90 |
|
91 |
EAPI="3" |
92 |
|
93 |
LIBTOOLIZE="true" |
94 |
TEST_PV="4.0.4" |
95 |
|
96 |
inherit autotools bash-completion eutils fortran multilib |
97 |
|
98 |
DESCRIPTION="The ultimate molecular dynamics simulation package" |
99 |
HOMEPAGE="http://www.gromacs.org/" |
100 |
SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz |
101 |
test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${TEST_PV}.tgz ) |
102 |
doc? ( ftp://ftp.gromacs.org/pub/manual/manual-4.0.pdf ) |
103 |
ffamber? ( http://ffamber.cnsm.csulb.edu/ffamber_v4.0-doc.tar.gz )" |
104 |
|
105 |
LICENSE="GPL-2" |
106 |
SLOT="0" |
107 |
KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
108 |
IUSE="X blas dmalloc doc -double-precision ffamber +fftw fkernels +gsl lapack |
109 |
mpi +single-precision static static-libs test +xml zsh-completion" |
110 |
|
111 |
DEPEND="app-shells/tcsh |
112 |
X? ( x11-libs/libX11 |
113 |
x11-libs/libSM |
114 |
x11-libs/libICE ) |
115 |
dmalloc? ( dev-libs/dmalloc ) |
116 |
blas? ( virtual/blas ) |
117 |
fftw? ( sci-libs/fftw:3.0 ) |
118 |
gsl? ( sci-libs/gsl ) |
119 |
lapack? ( virtual/lapack ) |
120 |
mpi? ( virtual/mpi ) |
121 |
xml? ( dev-libs/libxml2 )" |
122 |
|
123 |
RDEPEND="${DEPEND}" |
124 |
|
125 |
RESTRICT="test" |
126 |
|
127 |
src_prepare() { |
128 |
|
129 |
epatch "${FILESDIR}/${P}_upstream2010-06-08.patch.gz" |
130 |
sed -e '/AC_INIT/s/4\.0\.7/&-2010-06-08/' -i configure.ac \ |
131 |
|| die "Failed to change version in configure.ac" |
132 |
epatch "${FILESDIR}/${PN}-4.0.9999-docdir.patch" |
133 |
epatch "${FILESDIR}/${PN}-4.0.9999-ccache.patch" |
134 |
# Fix typos in a couple of files. |
135 |
sed -e "s:+0f:-f:" -i share/tutor/gmxdemo/demo \ |
136 |
|| die "Failed to fixup demo script." |
137 |
|
138 |
# Fix a sandbox violation that occurs when re-emerging with mpi. |
139 |
sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${ED}usr/$( get_libdir )\" ; \\\\" \ |
140 |
-i src/tools/Makefile.am \ |
141 |
|| die "sed tools/Makefile.am failed" |
142 |
|
143 |
sed -e "s:\$\$libdir:\$temp_libdir:" \ |
144 |
-i src/tools/Makefile.am \ |
145 |
|| die "sed tools/Makefile.am failed" |
146 |
|
147 |
sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${ED}usr/$( get_libdir )\" ; \\\\" \ |
148 |
-i src/tools/Makefile.am \ |
149 |
|| die "sed tools/Makefile.am failed" |
150 |
|
151 |
sed -e "s:\$\$libdir:\$\$temp_libdir:" \ |
152 |
-i src/tools/Makefile.am \ |
153 |
|| die "sed tools/Makefile.am failed" |
154 |
|
155 |
use fkernels && epatch "${FILESDIR}/${PN}-4.0.9999-configure-gfortran.patch" |
156 |
|
157 |
eautoreconf |
158 |
GMX_DIRS="" |
159 |
use single-precision && GMX_DIRS+=" single" |
160 |
use double-precision && GMX_DIRS+=" double" |
161 |
for x in ${GMX_DIRS}; do |
162 |
mkdir "${S}-${x}" || die |
163 |
use test && cp -r "${WORKDIR}"/gmxtest "${S}-${x}" |
164 |
use mpi || continue |
165 |
mkdir "${S}-${x}_mpi" || die |
166 |
done |
167 |
} |
168 |
|
169 |
src_configure() { |
170 |
local myconf |
171 |
local myconfsingle |
172 |
local myconfdouble |
173 |
local suffixdouble |
174 |
|
175 |
#leave all assembly options enabled mdrun is smart enough to deside itself |
176 |
#there so no gentoo on bluegene! |
177 |
myconf="${myconf} --disable-bluegene" |
178 |
|
179 |
#from gromacs configure |
180 |
if ! use fftw; then |
181 |
ewarn "WARNING: The built-in FFTPACK routines are slow." |
182 |
ewarn "Are you sure you don\'t want to use FFTW?" |
183 |
ewarn "It is free and much faster..." |
184 |
fi |
185 |
|
186 |
if [[ $(gcc-version) == "4.1" ]]; then |
187 |
eerror "gcc 4.1 is not supported by gromacs" |
188 |
eerror "please run test suite" |
189 |
die |
190 |
fi |
191 |
|
192 |
#note for gentoo-PREFIX on apple: use --enable-apple-64bit |
193 |
|
194 |
#fortran will gone in gromacs 4.1 anyway |
195 |
#note for gentoo-PREFIX on aix, fortran (xlf) is still much faster |
196 |
if use fkernels; then |
197 |
ewarn "Fortran kernels are usually not faster than C kernels and assembly" |
198 |
ewarn "I hope, you know what are you doing..." |
199 |
FORTRAN="g77 gfortran ifc" |
200 |
myconf="${myconf} --enable-fortran" && fortran_pkg_setup |
201 |
else |
202 |
myconf="${myconf} --disable-fortran" |
203 |
fi |
204 |
|
205 |
# if we need external blas |
206 |
if use blas; then |
207 |
export LIBS="${LIBS} -lblas" |
208 |
myconf="${myconf} $(use_with blas external-blas)" |
209 |
fi |
210 |
|
211 |
# if we need external lapack |
212 |
if use lapack; then |
213 |
export LIBS="${LIBS} -llapack" |
214 |
myconf="${myconf} $(use_with lapack external-lapack)" |
215 |
fi |
216 |
|
217 |
# by default its better to have dynamicaly linked binaries |
218 |
if use static; then |
219 |
#gmx build static libs by default |
220 |
myconf="${myconf} $(use_enable static all-static)" |
221 |
else |
222 |
myconf="${myconf} --enable-shared $(use_enable static-libs static)" |
223 |
fi |
224 |
|
225 |
myconf="--datadir="${EPREFIX}"/usr/share \ |
226 |
--bindir="${EPREFIX}"/usr/bin \ |
227 |
--libdir="${EPREFIX}"/usr/$(get_libdir) \ |
228 |
--docdir="${EPREFIX}"/usr/share/doc/"${PF}" \ |
229 |
$(use_with dmalloc) \ |
230 |
$(use_with fftw fft fftw3) \ |
231 |
$(use_with gsl) \ |
232 |
$(use_with X x) \ |
233 |
$(use_with xml) \ |
234 |
${myconf}" |
235 |
|
236 |
#if we build single and double - double is suffixed |
237 |
if ( use double-precision && use single-precision ); then |
238 |
suffixdouble="_d" |
239 |
else |
240 |
suffixdouble="" |
241 |
fi |
242 |
|
243 |
if use double-precision ; then |
244 |
#from gromacs manual |
245 |
elog |
246 |
elog "For most simulations single precision is accurate enough. In some" |
247 |
elog "cases double precision is required to get reasonable results:" |
248 |
elog |
249 |
elog "-normal mode analysis, for the conjugate gradient or l-bfgs minimization" |
250 |
elog " and the calculation and diagonalization of the Hessian " |
251 |
elog "-calculation of the constraint force between two large groups of atoms" |
252 |
elog "-energy conservation: this can only be done without temperature coupling and" |
253 |
elog " without cutoffs" |
254 |
elog |
255 |
fi |
256 |
|
257 |
if use mpi ; then |
258 |
elog "You have enabled mpi, only mdrun will make use of mpi, that is why" |
259 |
elog "we configure/compile gromacs twice (with and without mpi) and only" |
260 |
elog "install mdrun with mpi support. In addtion you will get libgmx and" |
261 |
elog "libmd with and without mpi support." |
262 |
fi |
263 |
|
264 |
myconfdouble="${myconf} --enable-double --program-suffix='${suffixdouble}'" |
265 |
myconfsingle="${myconf} --enable-float --program-suffix=''" |
266 |
for x in ${GMX_DIRS}; do |
267 |
einfo "Configuring for ${x} precision" |
268 |
cd "${S}-${x}" |
269 |
local p=myconf${x} |
270 |
ECONF_SOURCE="${S}" econf ${!p} --disable-mpi |
271 |
use mpi || continue |
272 |
cd "${S}-${x}_mpi" |
273 |
ECONF_SOURCE="${S}" econf ${!p} --enable-mpi |
274 |
done |
275 |
} |
276 |
|
277 |
src_compile() { |
278 |
for x in ${GMX_DIRS}; do |
279 |
cd "${S}-${x}" |
280 |
einfo "Compiling for ${x} precision" |
281 |
emake || die "emake for ${x} precision failed" |
282 |
use mpi || continue |
283 |
cd "${S}-${x}_mpi" |
284 |
emake mdrun || die "emake mdrun for ${x} precision failed" |
285 |
done |
286 |
} |
287 |
|
288 |
src_test() { |
289 |
for x in ${GMX_DIRS}; do |
290 |
local oldpath="${PATH}" |
291 |
export PATH="${S}-${x}/src/kernel:${S}-{x}/src/tools:${PATH}" |
292 |
cd "${S}-${x}" |
293 |
emake -j1 tests || die "${x} Precision test failed" |
294 |
export PATH="${oldpath}" |
295 |
done |
296 |
} |
297 |
|
298 |
src_install() { |
299 |
for x in ${GMX_DIRS}; do |
300 |
cd "${S}-${x}" |
301 |
emake DESTDIR="${ED}" install || die "emake install for ${x} failed" |
302 |
use mpi || continue |
303 |
cd "${S}-${x}_mpi" |
304 |
emake DESTDIR="${ED}" install-mdrun || die "emake install-mdrun for ${x} failed" |
305 |
done |
306 |
|
307 |
sed -n -e '/^GMXBIN/,/^GMXDATA/p' "${ED}"/usr/bin/GMXRC.bash > "${T}/80gromacs" |
308 |
doenvd "${T}/80gromacs" |
309 |
rm -f "${ED}"/usr/bin/GMXRC* |
310 |
|
311 |
dobashcompletion "${ED}"/usr/bin/completion.bash ${PN} |
312 |
if use zsh-completion ; then |
313 |
insinto /usr/share/zsh/site-functions |
314 |
newins "${ED}"/usr/bin/completion.zsh _${PN} |
315 |
fi |
316 |
rm -r "${ED}"/usr/bin/completion.* |
317 |
|
318 |
cd "${S}" |
319 |
dodoc AUTHORS INSTALL README |
320 |
use doc && dodoc "${DISTDIR}/manual-4.0.pdf" |
321 |
|
322 |
if use ffamber; then |
323 |
use doc && dodoc "${WORKDIR}/ffamber_v4.0/README/pdfs/*.pdf" |
324 |
# prepare vdwradii.dat |
325 |
cat >>"${ED}"/usr/share/gromacs/top/vdwradii.dat <<-EOF |
326 |
SOL MW 0 |
327 |
SOL LP 0 |
328 |
EOF |
329 |
# regenerate aminoacids.dat |
330 |
cat "${WORKDIR}"/ffamber_v4.0/aminoacids*.dat \ |
331 |
"${ED}"/usr/share/gromacs/top/aminoacids.dat \ |
332 |
| awk '{print $1}' | sort -u | tail -n+4 | wc -l \ |
333 |
>> "${ED}"/usr/share/gromacs/top/aminoacids.dat.new |
334 |
cat "${WORKDIR}"/ffamber_v4.0/aminoacids*.dat \ |
335 |
"${ED}"/usr/share/gromacs/top/aminoacids.dat \ |
336 |
| awk '{print $1}' | sort -u | tail -n+4 \ |
337 |
>> "${ED}"/usr/share/gromacs/top/aminoacids.dat.new |
338 |
mv -f "${ED}"/usr/share/gromacs/top/aminoacids.dat.new \ |
339 |
"${ED}"/usr/share/gromacs/top/aminoacids.dat |
340 |
# copy ff files |
341 |
for x in ffamber94 ffamber96 ffamber99 ffamber99p ffamber99sb \ |
342 |
ffamberGS ffamberGSs ffamber03 ; do |
343 |
einfo "Adding ${x} to gromacs" |
344 |
cp "${WORKDIR}"/ffamber_v4.0/${x}/* "${ED}"/usr/share/gromacs/top |
345 |
done |
346 |
# copy suplementary files |
347 |
cp "${WORKDIR}"/ffamber_v4.0/*.gro "${ED}"/usr/share/gromacs/top |
348 |
cp "${WORKDIR}"/ffamber_v4.0/*.itp "${ED}"/usr/share/gromacs/top |
349 |
# actualy add records to FF.dat |
350 |
cat >>"${ED}"/usr/share/gromacs/top/FF.dat.new <<-EOF |
351 |
ffamber94 AMBER94 Cornell protein/nucleic forcefield |
352 |
ffamber96 AMBER96 Kollman protein/nucleic forcefield |
353 |
ffamberGS AMBER-GS Garcia & Sanbonmatsu forcefield |
354 |
ffamberGSs AMBER-GSs Nymeyer & Garcia forcefield |
355 |
ffamber99 AMBER99 Wang protein/nucleic acid forcefield |
356 |
ffamber99p AMBER99p protein/nucleic forcefield |
357 |
ffamber99sb AMBER99sb Hornak protein/nucleic forcefield |
358 |
ffamber03 AMBER03 Duan protein/nucleic forcefield |
359 |
EOF |
360 |
cat "${ED}"/usr/share/gromacs/top/FF.dat \ |
361 |
"${ED}"/usr/share/gromacs/top/FF.dat.new \ |
362 |
| tail -n+2 > "${ED}"/usr/share/gromacs/top/FF.dat.new2 |
363 |
cat "${ED}"/usr/share/gromacs/top/FF.dat.new2 | wc -l > \ |
364 |
"${ED}"/usr/share/gromacs/top/FF.dat |
365 |
cat "${ED}"/usr/share/gromacs/top/FF.dat.new2 >> \ |
366 |
"${ED}"/usr/share/gromacs/top/FF.dat |
367 |
rm -f "${ED}"/usr/share/gromacs/top/FF.dat.new* |
368 |
fi |
369 |
} |
370 |
|
371 |
pkg_postinst() { |
372 |
env-update && source /etc/profile |
373 |
elog |
374 |
elog "Please read and cite:" |
375 |
elog "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). " |
376 |
elog "http://dx.doi.org/10.1021/ct700301q" |
377 |
elog |
378 |
bash-completion_pkg_postinst |
379 |
elog |
380 |
elog $(luck) |
381 |
elog "For more Gromacs cool quotes (gcq) add luck to your .bashrc" |
382 |
elog |
383 |
} |