summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-12-02 22:15:39 +0000
committerJustin Lecher <jlec@gentoo.org>2010-12-02 22:15:39 +0000
commitd0b5b853638509ddcea79ad8776760fb09a5d5bf (patch)
treef7849ab135baaa49ec87ce145493f94bcce2ff2f /sci-chemistry/tinker
parentCreate /var/run/fail2ban on runtime and remove stalled sock file in case of s... (diff)
downloadgentoo-2-d0b5b853638509ddcea79ad8776760fb09a5d5bf.tar.gz
gentoo-2-d0b5b853638509ddcea79ad8776760fb09a5d5bf.tar.bz2
gentoo-2-d0b5b853638509ddcea79ad8776760fb09a5d5bf.zip
Fixes for upstreams changes
(Portage version: 2.2.0_alpha6/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/tinker')
-rw-r--r--sci-chemistry/tinker/ChangeLog8
-rw-r--r--sci-chemistry/tinker/files/6-openmp.patch15
-rw-r--r--sci-chemistry/tinker/tinker-6.ebuild (renamed from sci-chemistry/tinker/tinker-6.0.ebuild)42
3 files changed, 53 insertions, 12 deletions
diff --git a/sci-chemistry/tinker/ChangeLog b/sci-chemistry/tinker/ChangeLog
index 2d762b973d8c..cb98628bbdbf 100644
--- a/sci-chemistry/tinker/ChangeLog
+++ b/sci-chemistry/tinker/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-chemistry/tinker
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/tinker/ChangeLog,v 1.27 2010/12/02 10:51:37 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/tinker/ChangeLog,v 1.28 2010/12/02 22:15:37 jlec Exp $
+
+*tinker-6 (02 Dec 2010)
+
+ 02 Dec 2010; Justin Lecher <jlec@gentoo.org> +files/6-openmp.patch,
+ +tinker-6.ebuild, -tinker-6.0.ebuild:
+ Fixes for upstreams changes
02 Dec 2010; Justin Lecher <jlec@gentoo.org> tinker-5.1.09.ebuild,
tinker-6.0.ebuild:
diff --git a/sci-chemistry/tinker/files/6-openmp.patch b/sci-chemistry/tinker/files/6-openmp.patch
new file mode 100644
index 000000000000..3666fbd0bfc4
--- /dev/null
+++ b/sci-chemistry/tinker/files/6-openmp.patch
@@ -0,0 +1,15 @@
+diff --git a/source/initial.f b/source/initial.f
+index 835f228..4099c74 100644
+--- a/source/initial.f
++++ b/source/initial.f
+@@ -73,8 +73,8 @@ c
+ c
+ c Intel compiler extensions to OpenMP standard
+ c
+-!$ call kmp_set_stacksize (2**30)
+-!$ call kmp_set_blocktime (0)
++! call kmp_set_stacksize (2**30)
++! call kmp_set_blocktime (0)
+ c
+ c values of machine precision constants
+ c
diff --git a/sci-chemistry/tinker/tinker-6.0.ebuild b/sci-chemistry/tinker/tinker-6.ebuild
index 92d1725a5f44..687335483ebc 100644
--- a/sci-chemistry/tinker/tinker-6.0.ebuild
+++ b/sci-chemistry/tinker/tinker-6.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/tinker/tinker-6.0.ebuild,v 1.5 2010/12/02 10:51:39 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/tinker/tinker-6.ebuild,v 1.1 2010/12/02 22:15:39 jlec Exp $
EAPI="2"
FORTRAN="gfortran ifc"
-inherit fortran java-pkg-opt-2 toolchain-funcs
+inherit fortran flag-o-matic java-pkg-opt-2 toolchain-funcs
DESCRIPTION="Molecular modeling package that includes force fields, such as AMBER and CHARMM"
HOMEPAGE="http://dasher.wustl.edu/tinker/"
@@ -18,16 +18,23 @@ IUSE="examples"
DEPEND=">=virtual/jdk-1.6"
RDEPEND="
+ >=sci-libs/fftw-3.2.2-r1[fortran,threads]
dev-libs/maloc
!dev-util/diffuse
>=virtual/jre-1.6"
RESTRICT="mirror"
-S="${WORKDIR}"/tinker/source
+S="${WORKDIR}"/${PN}${PV}/source
pkg_setup() {
fortran_pkg_setup
java-pkg-opt-2_pkg_setup
+ tc-has-openmp || die "Please use an openmp capable compiler like gcc[openmp]"
+}
+
+src_prepare() {
+ sed 's:strip:true:g' -i ../make/Makefile
+ [[ ${FORTRANC} == "ifc" ]] || epatch "${FILESDIR}"/${PV}-openmp.patch
}
src_compile() {
@@ -36,6 +43,19 @@ src_compile() {
[[ -f ${i}/libjvm.so ]] && javalib=${i}
done
+ # use dummy routines in pmpb.f instead of apbs calls
+ rm pmpb.c || die
+
+ if [[ ${FORTRANC} == "gfortran" ]]; then
+ append-flags -fopenmp
+ _omplib="-lgomp"
+ else
+ append-flags -openmp
+ _omplib="-liomp5"
+ fi
+
+ _fftwlib="$(pkg-config --libs fftw3 fftw3_threads)"
+
emake \
-f ../make/Makefile \
F77="${FORTRANC}" \
@@ -44,8 +64,8 @@ src_compile() {
OPTFLAGS="${FFLAGS}" \
LINKFLAGS="${LDFLAGS} -Wl,-rpath ${javalib}" \
INCLUDEDIR="$(java-pkg_get-jni-cflags) -I${EPREFIX}/usr/include" \
- LIBS="-lmaloc -L${javalib} -ljvm" \
- || die
+ LIBS="-lmaloc -L${javalib} -ljvm ${_omplib} ${_fftwlib}" \
+ all || die
mkdir "${S}"/../bin || die
@@ -56,7 +76,7 @@ src_compile() {
}
src_test() {
- cd "${WORKDIR}"/tinker/test/
+ cd "${WORKDIR}"/${PN}${PV}/test/
for test in *.run; do
einfo "Testing ${test} ..."
bash ${test} || die
@@ -64,19 +84,19 @@ src_test() {
}
src_install() {
- dobin "${WORKDIR}"/${PN}/perl/mdavg "${WORKDIR}"/${PN}/bin/* || die
+ dobin "${WORKDIR}"/${PN}${PV}/perl/mdavg "${WORKDIR}"/${PN}${PV}/bin/* || die
insinto /usr/share/${PN}/
- doins -r "${WORKDIR}"/${PN}/params || die
+ doins -r "${WORKDIR}"/${PN}${PV}/params || die
dodoc \
- "${WORKDIR}"/${PN}/doc/{*.txt,announce/release-*,*.pdf,0README} || die
+ "${WORKDIR}"/${PN}${PV}/doc/{*.txt,announce/release-*,*.pdf,0README} || die
if use examples; then
insinto /usr/share/${P}
- doins -r "${WORKDIR}"/${PN}/example || die
+ doins -r "${WORKDIR}"/${PN}${PV}/example || die
- doins -r "${WORKDIR}"/${PN}/test || die
+ doins -r "${WORKDIR}"/${PN}${PV}/test || die
fi
}