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