Lines 8-23
Link Here
|
8 |
|
8 |
|
9 |
inherit autotools bash-completion eutils fortran multilib |
9 |
inherit autotools bash-completion eutils fortran multilib |
10 |
|
10 |
|
|
|
11 |
TEST_PV="4.0.4" |
11 |
DESCRIPTION="The ultimate molecular dynamics simulation package" |
12 |
DESCRIPTION="The ultimate molecular dynamics simulation package" |
12 |
HOMEPAGE="http://www.gromacs.org/" |
13 |
HOMEPAGE="http://www.gromacs.org/" |
13 |
SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz |
14 |
SRC_URI="ftp://ftp.gromacs.org/pub/${PN}/${P}.tar.gz |
14 |
test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${PV}.tgz ) |
15 |
test? ( ftp://ftp.gromacs.org/pub/tests/gmxtest-${TEST_PV}.tgz ) |
15 |
doc? ( ftp://ftp.gromacs.org/pub/manual/manual-4.0.pdf )" |
16 |
doc? ( ftp://ftp.gromacs.org/pub/manual/manual-4.0.pdf )" |
16 |
|
17 |
|
17 |
LICENSE="GPL-2" |
18 |
LICENSE="GPL-2" |
18 |
SLOT="0" |
19 |
SLOT="0" |
19 |
KEYWORDS="~alpha ~amd64 ~ppc64 sparc ~x86" |
20 |
KEYWORDS="~alpha ~amd64 ~ppc64 sparc ~x86" |
20 |
IUSE="X blas dmalloc doc -double-precision +fftw fkernels gsl lapack mpi +single-precision static test +xml zsh-completion" |
21 |
IUSE="X blas dmalloc doc -double-precision +fftw fkernels gsl lapack mpi +single-precision static test +xml zsh-completion" |
|
|
22 |
RESTRICT="test" |
21 |
|
23 |
|
22 |
DEPEND="app-shells/tcsh |
24 |
DEPEND="app-shells/tcsh |
23 |
X? ( x11-libs/libX11 ) |
25 |
X? ( x11-libs/libX11 ) |
Lines 33-39
Link Here
|
33 |
|
35 |
|
34 |
src_prepare() { |
36 |
src_prepare() { |
35 |
|
37 |
|
36 |
epatch "${FILESDIR}/${P}-sparc-cyclecounter.patch" |
38 |
epatch "${FILESDIR}/${PN}-4.0.4-sparc-cyclecounter.patch" |
37 |
# Fix typos in a couple of files. |
39 |
# Fix typos in a couple of files. |
38 |
sed -e "s:+0f:-f:" -i share/tutor/gmxdemo/demo \ |
40 |
sed -e "s:+0f:-f:" -i share/tutor/gmxdemo/demo \ |
39 |
|| die "Failed to fixup demo script." |
41 |
|| die "Failed to fixup demo script." |
Lines 55-65
Link Here
|
55 |
-i src/tools/Makefile.am \ |
57 |
-i src/tools/Makefile.am \ |
56 |
|| die "sed tools/Makefile.am failed" |
58 |
|| die "sed tools/Makefile.am failed" |
57 |
|
59 |
|
58 |
use fkernels && epatch "${FILESDIR}/${P}-configure-gfortran.patch" |
60 |
use fkernels && epatch "${FILESDIR}/${PN}-4.0.4-configure-gfortran.patch" |
59 |
|
61 |
|
60 |
eautoreconf |
62 |
eautoreconf |
61 |
|
63 |
|
62 |
cd "${WORKDIR}" |
64 |
cd "${WORKDIR}" |
|
|
65 |
|
66 |
use test && mv gmxtest "${P}" |
63 |
mv "${P}" "${P}-single" |
67 |
mv "${P}" "${P}-single" |
64 |
if ( use double-precision ) ; then |
68 |
if ( use double-precision ) ; then |
65 |
einfo "Moving sources for Multiprecision Build" |
69 |
einfo "Moving sources for Multiprecision Build" |
Lines 115-120
Link Here
|
115 |
myconf="--datadir=/usr/share \ |
119 |
myconf="--datadir=/usr/share \ |
116 |
--bindir=/usr/bin \ |
120 |
--bindir=/usr/bin \ |
117 |
--libdir=/usr/$(get_libdir) \ |
121 |
--libdir=/usr/$(get_libdir) \ |
|
|
122 |
--docdir=/usr/share/doc/"${PF}" \ |
118 |
$(use_with dmalloc) \ |
123 |
$(use_with dmalloc) \ |
119 |
$(use_with fftw fft fftw3) \ |
124 |
$(use_with fftw fft fftw3) \ |
120 |
$(use_with gsl) \ |
125 |
$(use_with gsl) \ |
Lines 174-190
Link Here
|
174 |
src_test() { |
179 |
src_test() { |
175 |
if use single-precision ; then |
180 |
if use single-precision ; then |
176 |
export PATH="${WORKDIR}/${P}-single/src/kernel:${WORKDIR}/${P}-single/src/tools:$PATH" |
181 |
export PATH="${WORKDIR}/${P}-single/src/kernel:${WORKDIR}/${P}-single/src/tools:$PATH" |
177 |
cd "${WORKDIR}/gmxtest" |
182 |
cd "${WORKDIR}"/"${P}"-single |
178 |
#test is broken, only do simple tests |
183 |
emake -j1 tests || die "Single Precision test failed" |
179 |
./gmxtest.pl simple || die "Single Precision test failed" |
|
|
180 |
fi |
184 |
fi |
181 |
|
185 |
|
182 |
if use double-precision ; then |
186 |
if use double-precision ; then |
183 |
export PATH="${WORKDIR}/${P}-double/src/kernel:${WORKDIR}/${P}-double/src/tools:$PATH" |
187 |
export PATH="${WORKDIR}/${P}-double/src/kernel:${WORKDIR}/${P}-double/src/tools:$PATH" |
184 |
cd "${WORKDIR}/gmxtest" |
188 |
cd "${WORKDIR}"/"${P}"-double |
185 |
use single-precision && ./gmxtest.pl clean |
189 |
emake -j1 tests || die "Double Precision test failed" |
186 |
#test is broken, only do simple tests |
|
|
187 |
./gmxtest.pl -double simple || die "Double Precision test failed" |
188 |
fi |
190 |
fi |
189 |
} |
191 |
} |
190 |
|
192 |
|
Lines 213-223
Link Here
|
213 |
rm -r "${D}"/usr/bin/completion.* |
215 |
rm -r "${D}"/usr/bin/completion.* |
214 |
|
216 |
|
215 |
dodoc AUTHORS INSTALL README |
217 |
dodoc AUTHORS INSTALL README |
216 |
if use doc; then |
218 |
use doc && dodoc "${DISTDIR}"/manual-4.0.pdf |
217 |
# Move html and leave examples and templates under /usr/share/gromacs. |
|
|
218 |
mv "${D}"/usr/share/"${PN}"/html "${D}"/usr/share/doc/"${PF}"/ |
219 |
dodoc "${DISTDIR}"/manual-4.0.pdf |
220 |
fi |
221 |
} |
219 |
} |
222 |
|
220 |
|
223 |
pkg_postinst() { |
221 |
pkg_postinst() { |