1 |
je_fro 08/10/06 02:08:34 |
2 |
|
3 |
Modified: metadata.xml |
4 |
Added: gromacs-3.3.3.ebuild |
5 |
Log: |
6 |
Latest stable version, thanks to Alexey Shvetsov, closing bug #193532 |
7 |
(Portage version: 2.2_rc11/cvs/Linux 2.6.26-gentoo-r1 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.6 sci-chemistry/gromacs/metadata.xml |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/metadata.xml?rev=1.6&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/metadata.xml?rev=1.6&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/metadata.xml?r1=1.5&r2=1.6 |
15 |
|
16 |
Index: metadata.xml |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/metadata.xml,v |
19 |
retrieving revision 1.5 |
20 |
retrieving revision 1.6 |
21 |
diff -u -r1.5 -r1.6 |
22 |
--- metadata.xml 6 Aug 2008 15:36:54 -0000 1.5 |
23 |
+++ metadata.xml 6 Oct 2008 02:08:34 -0000 1.6 |
24 |
@@ -5,5 +5,6 @@ |
25 |
<use> |
26 |
<flag name='double-precision'>More precise calculations at the expense of |
27 |
speed</flag> |
28 |
+ <flag name='single-precision'>Single precision version of gromacs</flag> |
29 |
</use> |
30 |
</pkgmetadata> |
31 |
|
32 |
|
33 |
|
34 |
1.1 sci-chemistry/gromacs/gromacs-3.3.3.ebuild |
35 |
|
36 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/gromacs-3.3.3.ebuild?rev=1.1&view=markup |
37 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gromacs/gromacs-3.3.3.ebuild?rev=1.1&content-type=text/plain |
38 |
|
39 |
Index: gromacs-3.3.3.ebuild |
40 |
=================================================================== |
41 |
# Copyright 1999-2008 Gentoo Foundation |
42 |
# Distributed under the terms of the GNU General Public License v2 |
43 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gromacs/gromacs-3.3.3.ebuild,v 1.1 2008/10/06 02:08:34 je_fro Exp $ |
44 |
EAPI="1" |
45 |
LIBTOOLIZE="true" |
46 |
inherit autotools eutils flag-o-matic fortran multilib |
47 |
|
48 |
DESCRIPTION="The ultimate molecular dynamics simulation package" |
49 |
HOMEPAGE="http://www.gromacs.org/" |
50 |
SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz" |
51 |
|
52 |
LICENSE="GPL-2" |
53 |
SLOT="0" |
54 |
KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86" |
55 |
IUSE="3dnow X altivec blas double-precision gsl lapack mpi +single-precision sse sse2 static xml" |
56 |
|
57 |
# mopac7 qm/mm is broken until we can get files from |
58 |
# http://md.chem.rug.nl/~groenhof/qmmm.html |
59 |
# or somewhere else... |
60 |
|
61 |
DEPEND=">=sci-libs/fftw-3.0.1 |
62 |
app-shells/tcsh |
63 |
X? ( x11-libs/libX11 |
64 |
x11-libs/libXt |
65 |
x11-libs/libXp |
66 |
x11-libs/libXext |
67 |
x11-proto/xproto |
68 |
x11-libs/openmotif ) |
69 |
blas? ( virtual/blas ) |
70 |
gsl? ( sci-libs/gsl ) |
71 |
lapack? ( virtual/lapack ) |
72 |
mpi? ( virtual/mpi ) |
73 |
xml? ( dev-libs/libxml2 )" |
74 |
|
75 |
FORTRAN="g77 gfortran ifc" |
76 |
|
77 |
src_unpack() { |
78 |
|
79 |
unpack ${A} |
80 |
cd "${S}" |
81 |
# Fix typos in a couple of files. |
82 |
sed -e "s:+0f:-f:" -i share/tutor/gmxdemo/demo \ |
83 |
|| die "Failed to fixup demo script." |
84 |
|
85 |
# Fix a sandbox violation that occurs when re-emerging with mpi. |
86 |
sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${D}usr/$( get_libdir )\" ; \\\\" \ |
87 |
-i src/tools/Makefile.am \ |
88 |
|| die "sed tools/Makefile.am failed" |
89 |
|
90 |
sed -e "s:\$\$libdir:\$temp_libdir:" \ |
91 |
-i src/tools/Makefile.am \ |
92 |
|| die "sed tools/Makefile.am failed" |
93 |
|
94 |
sed "/libdir=\"\$(libdir)\"/ a\ temp_libdir=\"${D}usr/$( get_libdir )\" ; \\\\" \ |
95 |
-i src/tools/Makefile.am \ |
96 |
|| die "sed tools/Makefile.am failed" |
97 |
|
98 |
sed -e "s:\$\$libdir:\$\$temp_libdir:" \ |
99 |
-i src/tools/Makefile.am \ |
100 |
|| die "sed tools/Makefile.am failed" |
101 |
|
102 |
# Rename disco manpage to fix bug #210083. |
103 |
sed "s:disco.1:g_disco.1:" \ |
104 |
-i "${S}"/man/man1/Makefile.am \ |
105 |
|| die "sed failed to rename disco" |
106 |
|
107 |
mv "${S}"/man/man1/disco.1 "${S}"/man/man1/g_disco.1 |
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 |
} |