From d0b5b853638509ddcea79ad8776760fb09a5d5bf Mon Sep 17 00:00:00 2001 From: Justin Lecher Date: Thu, 2 Dec 2010 22:15:39 +0000 Subject: Fixes for upstreams changes (Portage version: 2.2.0_alpha6/cvs/Linux x86_64) --- sci-chemistry/tinker/ChangeLog | 8 ++- sci-chemistry/tinker/files/6-openmp.patch | 15 +++++ sci-chemistry/tinker/tinker-6.0.ebuild | 82 ------------------------ sci-chemistry/tinker/tinker-6.ebuild | 102 ++++++++++++++++++++++++++++++ 4 files changed, 124 insertions(+), 83 deletions(-) create mode 100644 sci-chemistry/tinker/files/6-openmp.patch delete mode 100644 sci-chemistry/tinker/tinker-6.0.ebuild create mode 100644 sci-chemistry/tinker/tinker-6.ebuild (limited to 'sci-chemistry/tinker') 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 +files/6-openmp.patch, + +tinker-6.ebuild, -tinker-6.0.ebuild: + Fixes for upstreams changes 02 Dec 2010; Justin Lecher 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.0.ebuild deleted file mode 100644 index 92d1725a5f44..000000000000 --- a/sci-chemistry/tinker/tinker-6.0.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# 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 $ - -EAPI="2" -FORTRAN="gfortran ifc" - -inherit fortran 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/" -SRC_URI="http://dasher.wustl.edu/${PN}/downloads/${P}.tar.gz" - -SLOT="0" -LICENSE="Tinker" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="examples" - -DEPEND=">=virtual/jdk-1.6" -RDEPEND=" - dev-libs/maloc - !dev-util/diffuse - >=virtual/jre-1.6" -RESTRICT="mirror" - -S="${WORKDIR}"/tinker/source - -pkg_setup() { - fortran_pkg_setup - java-pkg-opt-2_pkg_setup -} - -src_compile() { - local javalib= - for i in $(java-config -g LDPATH | sed 's|:| |g'); do - [[ -f ${i}/libjvm.so ]] && javalib=${i} - done - - emake \ - -f ../make/Makefile \ - F77="${FORTRANC}" \ - CC="$(tc-getCC) -c" \ - F77FLAGS=-c \ - OPTFLAGS="${FFLAGS}" \ - LINKFLAGS="${LDFLAGS} -Wl,-rpath ${javalib}" \ - INCLUDEDIR="$(java-pkg_get-jni-cflags) -I${EPREFIX}/usr/include" \ - LIBS="-lmaloc -L${javalib} -ljvm" \ - || die - - mkdir "${S}"/../bin || die - - emake \ - -f ../make/Makefile \ - BINDIR="${S}"/../bin \ - rename || die -} - -src_test() { - cd "${WORKDIR}"/tinker/test/ - for test in *.run; do - einfo "Testing ${test} ..." - bash ${test} || die - done -} - -src_install() { - dobin "${WORKDIR}"/${PN}/perl/mdavg "${WORKDIR}"/${PN}/bin/* || die - - insinto /usr/share/${PN}/ - doins -r "${WORKDIR}"/${PN}/params || die - - dodoc \ - "${WORKDIR}"/${PN}/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}/test || die - fi - -} diff --git a/sci-chemistry/tinker/tinker-6.ebuild b/sci-chemistry/tinker/tinker-6.ebuild new file mode 100644 index 000000000000..687335483ebc --- /dev/null +++ b/sci-chemistry/tinker/tinker-6.ebuild @@ -0,0 +1,102 @@ +# 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.ebuild,v 1.1 2010/12/02 22:15:39 jlec Exp $ + +EAPI="2" +FORTRAN="gfortran ifc" + +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/" +SRC_URI="http://dasher.wustl.edu/${PN}/downloads/${P}.tar.gz" + +SLOT="0" +LICENSE="Tinker" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +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}"/${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() { + local javalib= + for i in $(java-config -g LDPATH | sed 's|:| |g'); do + [[ -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}" \ + CC="$(tc-getCC) -c" \ + F77FLAGS=-c \ + OPTFLAGS="${FFLAGS}" \ + LINKFLAGS="${LDFLAGS} -Wl,-rpath ${javalib}" \ + INCLUDEDIR="$(java-pkg_get-jni-cflags) -I${EPREFIX}/usr/include" \ + LIBS="-lmaloc -L${javalib} -ljvm ${_omplib} ${_fftwlib}" \ + all || die + + mkdir "${S}"/../bin || die + + emake \ + -f ../make/Makefile \ + BINDIR="${S}"/../bin \ + rename || die +} + +src_test() { + cd "${WORKDIR}"/${PN}${PV}/test/ + for test in *.run; do + einfo "Testing ${test} ..." + bash ${test} || die + done +} + +src_install() { + dobin "${WORKDIR}"/${PN}${PV}/perl/mdavg "${WORKDIR}"/${PN}${PV}/bin/* || die + + insinto /usr/share/${PN}/ + doins -r "${WORKDIR}"/${PN}${PV}/params || die + + dodoc \ + "${WORKDIR}"/${PN}${PV}/doc/{*.txt,announce/release-*,*.pdf,0README} || die + + if use examples; then + insinto /usr/share/${P} + doins -r "${WORKDIR}"/${PN}${PV}/example || die + + doins -r "${WORKDIR}"/${PN}${PV}/test || die + fi + +} -- cgit v1.2.3-65-gdbad