1 |
alexxy 11/04/04 21:26:20 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: gromacs-4.5.4-r1.ebuild |
5 |
Log: |
6 |
[sci-chemistry/gromacs] Fix QA execstack bug #361687 |
7 |
|
8 |
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.80 sci-chemistry/gromacs/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.80&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.80&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/ChangeLog?r1=1.79&r2=1.80 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v |
20 |
retrieving revision 1.79 |
21 |
retrieving revision 1.80 |
22 |
diff -u -r1.79 -r1.80 |
23 |
--- ChangeLog 4 Apr 2011 18:56:42 -0000 1.79 |
24 |
+++ ChangeLog 4 Apr 2011 21:26:20 -0000 1.80 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for sci-chemistry/gromacs |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.79 2011/04/04 18:56:42 ottxor Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.80 2011/04/04 21:26:20 alexxy Exp $ |
30 |
+ |
31 |
+*gromacs-4.5.4-r1 (04 Apr 2011) |
32 |
+ |
33 |
+ 04 Apr 2011; Alexey Shvetsov <alexxy@g.o> +gromacs-4.5.4-r1.ebuild: |
34 |
+ Fix QA execstack bug #361687 |
35 |
|
36 |
04 Apr 2011; Christoph Junghans <ottxor@g.o> -gromacs-4.0.7-r5.ebuild, |
37 |
-gromacs-4.5.3.ebuild, -gromacs-4.5.3-r3.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 sci-chemistry/gromacs/gromacs-4.5.4-r1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.5.4-r1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/gromacs/gromacs-4.5.4-r1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: gromacs-4.5.4-r1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2011 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-4.5.4-r1.ebuild,v 1.1 2011/04/04 21:26:20 alexxy Exp $ |
51 |
|
52 |
EAPI="4" |
53 |
|
54 |
LIBTOOLIZE="true" |
55 |
TEST_PV="4.0.4" |
56 |
MANUAL_PV="4.5.4" |
57 |
|
58 |
inherit autotools-utils bash-completion flag-o-matic multilib toolchain-funcs |
59 |
|
60 |
SRC_URI="test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${TEST_PV}.tgz ) |
61 |
doc? ( ftp://ftp.gromacs.org/pub/manual/manual-${MANUAL_PV}.pdf -> gromacs-manual-${MANUAL_PV}.pdf )" |
62 |
|
63 |
if [ "${PV%9999}" != "${PV}" ]; then |
64 |
EGIT_REPO_URI="git://git.gromacs.org/gromacs" |
65 |
EGIT_BRANCH="release-4-5-patches" |
66 |
inherit git |
67 |
else |
68 |
SRC_URI="${SRC_URI} ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz" |
69 |
fi |
70 |
|
71 |
SRC_URI="${SRC_URI} |
72 |
http://dev.gentoo.org/~alexxy/gromacs/0001-Make-stack-non-executable-for-GAS-assembly.patch.gz |
73 |
http://dev.gentoo.org/~alexxy/gromacs/0002-Make-stack-non-executable-for-ATT-assembly.patch.gz |
74 |
" |
75 |
|
76 |
DESCRIPTION="The ultimate molecular dynamics simulation package" |
77 |
HOMEPAGE="http://www.gromacs.org/" |
78 |
|
79 |
LICENSE="GPL-2" |
80 |
SLOT="0" |
81 |
KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
82 |
IUSE="X altivec blas dmalloc doc -double-precision +fftw fkernels +gsl lapack |
83 |
mpi +single-precision sse2 static-libs test +threads +xml zsh-completion" |
84 |
REQUIRED_USE="fkernels? ( !threads )" |
85 |
|
86 |
CDEPEND=" |
87 |
X? ( x11-libs/libX11 |
88 |
x11-libs/libSM |
89 |
x11-libs/libICE ) |
90 |
dmalloc? ( dev-libs/dmalloc ) |
91 |
blas? ( virtual/blas ) |
92 |
fftw? ( sci-libs/fftw:3.0 ) |
93 |
gsl? ( sci-libs/gsl ) |
94 |
lapack? ( virtual/lapack ) |
95 |
mpi? ( virtual/mpi ) |
96 |
xml? ( dev-libs/libxml2:2 )" |
97 |
DEPEND="${CDEPEND} |
98 |
dev-util/pkgconfig" |
99 |
RDEPEND="${CDEPEND} |
100 |
app-shells/tcsh" |
101 |
|
102 |
RESTRICT="test" |
103 |
|
104 |
src_prepare() { |
105 |
if use mpi && use threads; then |
106 |
elog "mdrun uses only threads OR mpi, and gromacs favours the" |
107 |
elog "use of mpi over threads, so a mpi-version of mdrun will" |
108 |
elog "be compiled. If you want to run mdrun on shared memory" |
109 |
elog "machines only, you can safely disable mpi" |
110 |
fi |
111 |
|
112 |
# Add patches for non-exec stack |
113 |
epatch "${WORKDIR}/0001-Make-stack-non-executable-for-GAS-assembly.patch" |
114 |
epatch "${WORKDIR}/0002-Make-stack-non-executable-for-ATT-assembly.patch" |
115 |
|
116 |
autotools-utils_src_prepare || die |
117 |
|
118 |
eautoreconf || die |
119 |
|
120 |
GMX_DIRS="" |
121 |
use single-precision && GMX_DIRS+=" float" |
122 |
use double-precision && GMX_DIRS+=" double" |
123 |
#if neither single-precision nor double-precision is enabled |
124 |
#build at least default (single) |
125 |
[ -z "$GMX_DIRS" ] && GMX_DIRS+=" float" |
126 |
|
127 |
for x in ${GMX_DIRS}; do |
128 |
mkdir -p "${WORKDIR}/${P}_${x}" || die |
129 |
use test && cp -r "${WORKDIR}"/gmxtest "${WORKDIR}/${P}_${x}" |
130 |
done |
131 |
} |
132 |
|
133 |
src_configure() { |
134 |
#from gromacs configure |
135 |
if ! use fftw; then |
136 |
ewarn "WARNING: The built-in FFTPACK routines are slow." |
137 |
ewarn "Are you sure you don\'t want to use FFTW?" |
138 |
ewarn "It is free and much faster..." |
139 |
fi |
140 |
|
141 |
if [[ $(gcc-version) == "4.1" ]]; then |
142 |
eerror "gcc 4.1 is not supported by gromacs" |
143 |
eerror "please run test suite" |
144 |
die |
145 |
fi |
146 |
|
147 |
#note for gentoo-PREFIX on apple: use --enable-apple-64bit |
148 |
|
149 |
#fortran will gone in gromacs 5.0 anyway |
150 |
#note for gentoo-PREFIX on aix, fortran (xlf) is still much faster |
151 |
if use fkernels; then |
152 |
ewarn "Fortran kernels are usually not faster than C kernels and assembly" |
153 |
ewarn "I hope, you know what are you doing..." |
154 |
fi |
155 |
|
156 |
if use double-precision ; then |
157 |
#from gromacs manual |
158 |
elog |
159 |
elog "For most simulations single precision is accurate enough. In some" |
160 |
elog "cases double precision is required to get reasonable results:" |
161 |
elog |
162 |
elog "-normal mode analysis, for the conjugate gradient or l-bfgs minimization" |
163 |
elog " and the calculation and diagonalization of the Hessian " |
164 |
elog "-calculation of the constraint force between two large groups of atoms" |
165 |
elog "-energy conservation: this can only be done without temperature coupling and" |
166 |
elog " without cutoffs" |
167 |
elog |
168 |
fi |
169 |
|
170 |
if use mpi ; then |
171 |
elog "You have enabled mpi, only mdrun will make use of mpi, that is why" |
172 |
elog "we configure/compile gromacs twice (with and without mpi) and only" |
173 |
elog "install mdrun with mpi support. In addtion you will get libgmx and" |
174 |
elog "libmd with and without mpi support." |
175 |
fi |
176 |
|
177 |
# if we need external blas or lapack |
178 |
use blas && export LIBS+=" $(pkg-config blas --libs)" |
179 |
use lapack && export LIBS+=" $(pkg-config lapack --libs)" |
180 |
local sseflag="x86-64-sse" |
181 |
use x86 && sseflag="ia32-sse" |
182 |
|
183 |
#missing flag in autotools (bug #339837) |
184 |
use sse2 && append-flags -msse2 |
185 |
|
186 |
for x in ${GMX_DIRS}; do |
187 |
#if we build single and double - double is suffixed |
188 |
use double-precision && use single-precision && \ |
189 |
[ "${x}" = "double" ] && suffix="_d" |
190 |
myeconfargs=( |
191 |
--bindir="${EPREFIX}"/usr/bin |
192 |
--docdir="${EPREFIX}"/usr/share/doc/"${PF}" |
193 |
--enable-"${x}" |
194 |
$(use_with dmalloc) |
195 |
$(use_with fftw fft fftw3) |
196 |
$(use_with gsl) |
197 |
$(use_with X x) |
198 |
$(use_with xml) |
199 |
$(use_enable threads) |
200 |
$(use_enable altivec ppc-altivec) |
201 |
$(use_enable ia64 ia64-asm) |
202 |
$(use_with lapack external-lapack) |
203 |
$(use_with blas external-blas) |
204 |
$(use_enable fkernels fortran) |
205 |
--disable-bluegene |
206 |
--disable-la-files |
207 |
--disable-power6 |
208 |
--disable-ia32-sse |
209 |
--disable-x86-64-sse |
210 |
$(use_enable sse2 $sseflag) |
211 |
) |
212 |
#disable ia32-sse and x86-64-sse and enable what we really need in last line |
213 |
|
214 |
einfo "Configuring for ${x} precision" |
215 |
AUTOTOOLS_BUILD_DIR="${WORKDIR}/${P}_${x}"\ |
216 |
autotools-utils_src_configure --disable-mpi --program-suffix="${suffix}" \ |
217 |
CC="$(tc-getCC)" F77="$(tc-getFC)" |
218 |
use mpi || continue |
219 |
einfo "Configuring for ${x} precision with mpi" |
220 |
AUTOTOOLS_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\ |
221 |
autotools-utils_src_configure --enable-mpi --program-suffix="_mpi${suffix}" \ |
222 |
CC="$(tc-getCC)" F77="$(tc-getFC)" |
223 |
done |
224 |
} |
225 |
|
226 |
src_compile() { |
227 |
for x in ${GMX_DIRS}; do |
228 |
einfo "Compiling for ${x} precision" |
229 |
AUTOTOOLS_BUILD_DIR="${WORKDIR}/${P}_${x}"\ |
230 |
autotools-utils_src_compile |
231 |
use mpi || continue |
232 |
einfo "Compiling for ${x} precision with mpi" |
233 |
AUTOTOOLS_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi"\ |
234 |
autotools-utils_src_compile mdrun |
235 |
done |
236 |
} |
237 |
|
238 |
src_test() { |
239 |
for x in ${GMX_DIRS}; do |
240 |
local oldpath="${PATH}" |
241 |
export PATH="${WORKDIR}/${P}_${x}/src/kernel:${S}-{x}/src/tools:${PATH}" |
242 |
cd "${WORKDIR}/${P}_${x}" |
243 |
emake -j1 tests || die "${x} Precision test failed" |
244 |
export PATH="${oldpath}" |
245 |
done |
246 |
} |
247 |
|
248 |
src_install() { |
249 |
for x in ${GMX_DIRS}; do |
250 |
AUTOTOOLS_BUILD_DIR="${WORKDIR}/${P}_${x}" \ |
251 |
autotools-utils_src_install |
252 |
use mpi || continue |
253 |
#autotools-utils_src_install does not support args |
254 |
#using autotools-utils_src_compile instead |
255 |
AUTOTOOLS_BUILD_DIR="${WORKDIR}/${P}_${x}_mpi" \ |
256 |
autotools-utils_src_compile install-mdrun DESTDIR="${D}" |
257 |
|
258 |
#stolen from autotools-utils_src_install see comment above |
259 |
local args |
260 |
has static-libs ${IUSE//+} && ! use static-libs || args='none' |
261 |
remove_libtool_files ${args} |
262 |
done |
263 |
|
264 |
sed -n -e '/^GMXBIN/,/^GMXDATA/p' "${ED}"/usr/bin/GMXRC.bash > "${T}/80gromacs" |
265 |
echo "VMD_PLUGIN_PATH=${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/" >> "${T}/80gromacs" |
266 |
|
267 |
doenvd "${T}/80gromacs" |
268 |
rm -f "${ED}"/usr/bin/GMXRC* |
269 |
|
270 |
dobashcompletion "${ED}"/usr/bin/completion.bash ${PN} |
271 |
if use zsh-completion ; then |
272 |
insinto /usr/share/zsh/site-functions |
273 |
newins "${ED}"/usr/bin/completion.zsh _${PN} |
274 |
fi |
275 |
rm -f "${ED}"/usr/bin/completion.* |
276 |
|
277 |
# Fix typos in a couple of files. |
278 |
sed -e "s:+0f:-f:" -i "${ED}"usr/share/gromacs/tutor/gmxdemo/demo \ |
279 |
|| die "Failed to fixup demo script." |
280 |
|
281 |
cd "${S}" |
282 |
dodoc AUTHORS INSTALL* README* |
283 |
if use doc; then |
284 |
newdoc "${DISTDIR}/gromacs-manual-${MANUAL_PV}.pdf" "manual-${MANUAL_PV}.pdf" |
285 |
dohtml -r "${ED}usr/share/gromacs/html/" |
286 |
fi |
287 |
rm -rf "${ED}usr/share/gromacs/html/" |
288 |
} |
289 |
|
290 |
pkg_postinst() { |
291 |
env-update && source /etc/profile |
292 |
elog |
293 |
elog "Please read and cite:" |
294 |
elog "Gromacs 4, J. Chem. Theory Comput. 4, 435 (2008). " |
295 |
elog "http://dx.doi.org/10.1021/ct700301q" |
296 |
elog |
297 |
bash-completion_pkg_postinst |
298 |
elog |
299 |
elog $(g_luck) |
300 |
elog "For more Gromacs cool quotes (gcq) add luck to your .bashrc" |
301 |
elog |
302 |
elog "Gromacs can use sci-chemistry/vmd to read additional file formats" |
303 |
elog |
304 |
} |