1 |
je_fro 08/10/12 18:55:36 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: gromacs-4.0.ebuild |
5 |
Log: |
6 |
Latest version, closing bug #241474 thanks to Alexey Shvetsov |
7 |
(Portage version: 2.2_rc12/cvs/Linux 2.6.26-gentoo-r1 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.31 sci-chemistry/gromacs/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.31&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/ChangeLog?rev=1.31&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/ChangeLog?r1=1.30&r2=1.31 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v |
19 |
retrieving revision 1.30 |
20 |
retrieving revision 1.31 |
21 |
diff -u -r1.30 -r1.31 |
22 |
--- ChangeLog 6 Oct 2008 02:32:20 -0000 1.30 |
23 |
+++ ChangeLog 12 Oct 2008 18:55:36 -0000 1.31 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for sci-chemistry/gromacs |
26 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.30 2008/10/06 02:32:20 je_fro Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/ChangeLog,v 1.31 2008/10/12 18:55:36 je_fro Exp $ |
29 |
+ |
30 |
+*gromacs-4.0 (12 Oct 2008) |
31 |
+ |
32 |
+ 12 Oct 2008; Jeff Gardner <je_fro@g.o> +gromacs-4.0.ebuild: |
33 |
+ Latest version, closing bug #241474 thanks to Alexey Shvetsov |
34 |
|
35 |
06 Oct 2008; Jeff Gardner <je_fro@g.o> ChangeLog, Manifest: |
36 |
Fixing changelog to reflect addition of gromacs-3.3.3.ebuild |
37 |
|
38 |
|
39 |
|
40 |
1.1 sci-chemistry/gromacs/gromacs-4.0.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/gromacs-4.0.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: gromacs-4.0.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2008 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.ebuild,v 1.1 2008/10/12 18:55:36 je_fro Exp $ |
50 |
|
51 |
EAPI="1" |
52 |
|
53 |
inherit autotools eutils flag-o-matic fortran multilib |
54 |
|
55 |
DESCRIPTION="The ultimate molecular dynamics simulation package" |
56 |
HOMEPAGE="http://www.gromacs.org/" |
57 |
SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz" |
58 |
|
59 |
LICENSE="GPL-2" |
60 |
SLOT="0" |
61 |
KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86" |
62 |
IUSE="3dnow X altivec blas double-precision gsl lapack mpi +single-precision sse sse2 static xml" |
63 |
|
64 |
# mopac7 qm/mm is broken until we can get files from |
65 |
# http://md.chem.rug.nl/~groenhof/qmmm.html |
66 |
# or somewhere else... |
67 |
|
68 |
DEPEND=">=sci-libs/fftw-3.0.1 |
69 |
app-shells/tcsh |
70 |
X? ( x11-libs/libX11 |
71 |
x11-libs/libXt |
72 |
x11-libs/libXp |
73 |
x11-libs/libXext |
74 |
x11-proto/xproto |
75 |
x11-libs/openmotif ) |
76 |
blas? ( virtual/blas ) |
77 |
gsl? ( sci-libs/gsl ) |
78 |
lapack? ( virtual/lapack ) |
79 |
mpi? ( virtual/mpi ) |
80 |
xml? ( dev-libs/libxml2 )" |
81 |
|
82 |
FORTRAN="g77 gfortran ifc" |
83 |
|
84 |
src_unpack() { |
85 |
|
86 |
unpack ${A} |
87 |
cd "${S}" |
88 |
# Fix typos in a couple of files. |
89 |
sed -e "s:+0f:-f:" -i share/tutor/gmxdemo/demo \ |
90 |
|| die "Failed to fixup demo script." |
91 |
|
92 |
# Fix a sandbox violation that occurs when re-emerging with mpi. |
93 |
sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${D}usr/$( get_libdir )\" ; \\\\" \ |
94 |
-i src/tools/Makefile.am \ |
95 |
|| die "sed tools/Makefile.am failed" |
96 |
|
97 |
sed -e "s:\$\$libdir:\$temp_libdir:" \ |
98 |
-i src/tools/Makefile.am \ |
99 |
|| die "sed tools/Makefile.am failed" |
100 |
|
101 |
sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${D}usr/$( get_libdir )\" ; \\\\" \ |
102 |
-i src/tools/Makefile.am \ |
103 |
|| die "sed tools/Makefile.am failed" |
104 |
|
105 |
sed -e "s:\$\$libdir:\$\$temp_libdir:" \ |
106 |
-i src/tools/Makefile.am \ |
107 |
|| die "sed tools/Makefile.am failed" |
108 |
|
109 |
eautoreconf |
110 |
|
111 |
cd "${WORKDIR}" |
112 |
mv "${P}" "${P}-single" |
113 |
if ( use double-precision ) ; then |
114 |
einfo "Moving sources for Multiprecision Build" |
115 |
cp -prP "${P}-single" "${P}-double" |
116 |
fi |
117 |
} |
118 |
|
119 |
src_compile() { |
120 |
|
121 |
# static should work but something's broken. |
122 |
# gcc spec file may be screwed up. |
123 |
# Static linking should try -lgcc instead of -lgcc_s. |
124 |
# For more info: |
125 |
# http://lists.debian.org/debian-gcc/2002/debian-gcc-200201/msg00150.html |
126 |
|
127 |
# We will compile single precision by default, and suffix double-precision with _d. |
128 |
# Sparc is the only arch I can test on that needs to use fortran. |
129 |
local myconf ; |
130 |
local myconf_s ; |
131 |
local myconf_d ; |
132 |
|
133 |
case "${ARCH}" in |
134 |
|
135 |
x86) |
136 |
if ( use sse || use sse2 ) ; then |
137 |
myconf="${myconf} --enable-ia32-sse" |
138 |
fi |
139 |
myconf="$myconf $(use_enable 3dnow ia32-3dnow)" |
140 |
|
141 |
if ( ! use sse && ! use sse2 && ! use 3dnow ) ; then |
142 |
if ! has_version "=sys-devel/gcc-3*" ; then |
143 |
die "If you must run gromacs without sse (not recommended) gfortran will not work." |
144 |
else |
145 |
myconf="${myconf} --enable-fortran" && fortran_pkg_setup |
146 |
fi |
147 |
else |
148 |
myconf="${myconf} --disable-fortran" |
149 |
fi |
150 |
;; |
151 |
|
152 |
amd64) |
153 |
myconf="$myconf --enable-x86-64-sse --disable-fortran" |
154 |
;; |
155 |
|
156 |
ppc*) |
157 |
if use altivec ; then |
158 |
myconf="${myconf} --enable-ppc-altivec --disable-fortran" |
159 |
else |
160 |
if ! has_version "=sys-devel/gcc-3*" ; then |
161 |
die "If you must run gromacs without sse (not recommended) gfortran will not work." |
162 |
else |
163 |
myconf="${myconf} --enable-fortran" && fortran_pkg_setup |
164 |
fi |
165 |
fi |
166 |
;; |
167 |
|
168 |
ia64) |
169 |
myconf="$myconf --enable-ia64-asm --disable-fortran" |
170 |
;; |
171 |
|
172 |
alpha) |
173 |
if ! has_version "=sys-devel/gcc-3*" ; then |
174 |
die "If you must run gromacs without sse (not recommended) gfortran will not work." |
175 |
else |
176 |
myconf="$myconf --enable-fortran" && fortran_pkg_setup |
177 |
fi |
178 |
;; |
179 |
|
180 |
sparc) |
181 |
if ! has_version "=sys-devel/gcc-3*" ; then |
182 |
die "If you must run gromacs without sse (not recommended) gfortran will not work." |
183 |
else |
184 |
myconf="${myconf} --enable-fortran" && fortran_pkg_setup |
185 |
fi |
186 |
;; |
187 |
esac |
188 |
|
189 |
# if we need external blas |
190 |
if use blas; then |
191 |
export LIBS="${LIBS} -lblas" |
192 |
myconf="${myconf} $(use_with blas external-blas)" |
193 |
fi |
194 |
|
195 |
# if we need external lapack |
196 |
if use lapack; then |
197 |
export LIBS="${LIBS} -llapack" |
198 |
myconf="${myconf} $(use_with lapack external-lapack)" |
199 |
fi |
200 |
|
201 |
myconf="--datadir=/usr/share \ |
202 |
--bindir=/usr/bin \ |
203 |
--libdir=/usr/$(get_libdir) \ |
204 |
--with-fft=fftw3 \ |
205 |
$(use_with gsl) \ |
206 |
$(use_enable mpi) \ |
207 |
$(use_with X x) \ |
208 |
$(use_with xml) \ |
209 |
$(use_enable static all-static) \ |
210 |
${myconf}" |
211 |
|
212 |
if ( use double-precision && use single-precision ); then |
213 |
einfo "Building Single Precison Gromacs" |
214 |
cd "${WORKDIR}"/"${P}"-single |
215 |
myconf_s="${myconf} --enable-float --disable-double --program-suffix=''" |
216 |
econf ${myconf_s} || die "Single Precision econf failed" |
217 |
emake || die "Single Precision emake failed" |
218 |
|
219 |
einfo "Building Double Precision Gromacs" |
220 |
cd "${WORKDIR}"/"${P}"-double |
221 |
myconf_d="${myconf} --enable-double --disable-float --program-suffix=_d" |
222 |
econf ${myconf_d} || die "Double Precision econf failed" |
223 |
emake || die "Double Precision emake failed" |
224 |
|
225 |
elif use double-precision ; then |
226 |
einfo "Building Double Precison Gromacs" |
227 |
cd "${WORKDIR}"/"${P}"-double |
228 |
myconf_d="${myconf} --enable-double --disable-float --program-suffix=''" |
229 |
econf ${myconf_d} || die "Double Precision econf failed" |
230 |
emake || die "Double Precision emake failed" |
231 |
|
232 |
elif use single-precision ; then |
233 |
einfo "Building Single Precison Gromacs" |
234 |
cd "${WORKDIR}"/"${P}"-single |
235 |
myconf_s="${myconf} --enable-float --disable-double --program-suffix=''" |
236 |
econf ${myconf_s} || die "configure failed" |
237 |
emake || die "Single Precision emake failed" |
238 |
fi |
239 |
} |
240 |
|
241 |
src_install() { |
242 |
if use single-precision ; then |
243 |
einfo "Installing Single Precision" |
244 |
cd "${WORKDIR}"/"${P}"-single |
245 |
emake DESTDIR="${D}" install || die "Installing Single Precision failed" |
246 |
fi |
247 |
|
248 |
if use double-precision ; then |
249 |
einfo "Installing Double Precision" |
250 |
cd "${WORKDIR}"/"${P}"-double |
251 |
emake DESTDIR="${D}" install || die "Installing Double Precision failed" |
252 |
fi |
253 |
|
254 |
dodoc AUTHORS INSTALL README |
255 |
# Move html and leave examples and templates under /usr/share/gromacs. |
256 |
mv "${D}"/usr/share/"${PN}"/html "${D}"/usr/share/doc/"${PF}"/ |
257 |
} |