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