diff options
author | Justin Lecher <jlec@gentoo.org> | 2014-10-28 09:00:32 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2014-10-28 09:00:32 +0000 |
commit | d46563a929cc76835387656647c73ca43fb91980 (patch) | |
tree | ff1911202376d8609c4cc4ee7a2e399740fa3669 /sci-chemistry/pdb2pqr | |
parent | Stable for x86, wrt bug #527028 (diff) | |
download | gentoo-2-d46563a929cc76835387656647c73ca43fb91980.tar.gz gentoo-2-d46563a929cc76835387656647c73ca43fb91980.tar.bz2 gentoo-2-d46563a929cc76835387656647c73ca43fb91980.zip |
sci-chemistry/pdb2pqr: Allow multi py ABI installations, clean installation
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'sci-chemistry/pdb2pqr')
-rw-r--r-- | sci-chemistry/pdb2pqr/ChangeLog | 8 | ||||
-rw-r--r-- | sci-chemistry/pdb2pqr/files/pdb2pka | 13 | ||||
-rw-r--r-- | sci-chemistry/pdb2pqr/files/pdb2pqr | 13 | ||||
-rw-r--r-- | sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch | 15 | ||||
-rw-r--r-- | sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild | 132 |
5 files changed, 180 insertions, 1 deletions
diff --git a/sci-chemistry/pdb2pqr/ChangeLog b/sci-chemistry/pdb2pqr/ChangeLog index 0cea88aff125..73a419d9d14a 100644 --- a/sci-chemistry/pdb2pqr/ChangeLog +++ b/sci-chemistry/pdb2pqr/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-chemistry/pdb2pqr # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pdb2pqr/ChangeLog,v 1.42 2014/10/27 17:17:03 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pdb2pqr/ChangeLog,v 1.43 2014/10/28 09:00:32 jlec Exp $ + +*pdb2pqr-1.9.0-r1 (28 Oct 2014) + + 28 Oct 2014; Justin Lecher <jlec@gentoo.org> +pdb2pqr-1.9.0-r1.ebuild, + +files/pdb2pka, +files/pdb2pqr-1.9.0-install-py.patch, +files/pdb2pqr: + Allow multi py ABI installations, clean installation 27 Oct 2014; Justin Lecher <jlec@gentoo.org> pdb2pqr-1.9.0.ebuild: Add missing PYTHON_USEDEP diff --git a/sci-chemistry/pdb2pqr/files/pdb2pka b/sci-chemistry/pdb2pqr/files/pdb2pka new file mode 100644 index 000000000000..2406b0c4773f --- /dev/null +++ b/sci-chemistry/pdb2pqr/files/pdb2pka @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +import subprocess +import site +import sys +import os + +sitepackages = site.getsitepackages()[0] + +_cmd=[os.path.join(sitepackages, "pdb2pqr", "pdb2pka", "pka.py")] +_cmd.extend(sys.argv[1:]) + +subprocess.call(_cmd, stdout=sys.stdout, stderr=sys.stderr) diff --git a/sci-chemistry/pdb2pqr/files/pdb2pqr b/sci-chemistry/pdb2pqr/files/pdb2pqr new file mode 100644 index 000000000000..8c0635aea94e --- /dev/null +++ b/sci-chemistry/pdb2pqr/files/pdb2pqr @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +import subprocess +import site +import sys +import os + +sitepackages = site.getsitepackages()[0] + +_cmd=[os.path.join(sitepackages, "pdb2pqr", "pdb2pqr.py")] +_cmd.extend(sys.argv[1:]) + +subprocess.call(_cmd, stdout=sys.stdout, stderr=sys.stderr) diff --git a/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch b/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch new file mode 100644 index 000000000000..2695b013c66a --- /dev/null +++ b/sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch @@ -0,0 +1,15 @@ + SConscript-install.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/SConscript-install.py b/SConscript-install.py +index e2f9f09..1fdf1a8 100644 +--- a/SConscript-install.py ++++ b/SConscript-install.py +@@ -41,6 +41,7 @@ def installFile(file_name, build_target='install'): + if GetOption("clean"):
+ env.Default(result)
+ Alias(build_target, env.Install(env['PREFIX']+dirname(file_name), result))
++ Alias(build_target, env.Install(env['PREFIX']+dirname(file_name), target))
+ else:
+ Alias(build_target, env.Install(env['PREFIX']+dirname(file_name), target))
+
diff --git a/sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild b/sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild new file mode 100644 index 000000000000..8c6e54ee0316 --- /dev/null +++ b/sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild,v 1.1 2014/10/28 09:00:32 jlec Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools scons-utils fortran-2 flag-o-matic python-r1 toolchain-funcs + +DESCRIPTION="An automated pipeline for performing Poisson-Boltzmann electrostatics calculations" +HOMEPAGE="http://www.poissonboltzmann.org/" +SRC_URI="https://github.com/Electrostatics/apbs-${PN}/releases/download/${P}/${PN}-src-${PV}.tar.gz" + +SLOT="0" +LICENSE="BSD" +IUSE="doc examples opal +pdb2pka" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-python/numpy[${PYTHON_USEDEP}] + sci-chemistry/openbabel[python] + sci-chemistry/openbabel-python[${PYTHON_USEDEP}] + opal? ( dev-python/zsi[${PYTHON_USEDEP}] ) + pdb2pka? ( sci-chemistry/apbs[${PYTHON_USEDEP},-mpi] )" +DEPEND="${RDEPEND} + dev-lang/swig:0" + +PATCHES=( + "${FILESDIR}"/${P}-flags.patch + "${FILESDIR}"/${P}-install-py.patch +) + +pkg_setup() { + if [[ -z ${MAXATOMS} ]]; then + einfo "If you like to have support for more then 10000 atoms," + einfo "export MAXATOMS=\"your value\"" + export MAXATOMS=10000 + else + einfo "Allow usage of ${MAXATOMS} during calculations" + fi + fortran-2_pkg_setup +} + +src_prepare() { + find -type f \( -name "*\.pyc" -o -name "*\.pyo" \) -delete || die + + export CXXFLAGS="${CXXFLAGS}" + export LDFLAGS="${LDFLAGS}" + + epatch ${PATCHES[@]} + tc-export CXX + rm -rf scons || die + + python_copy_sources +} + +src_configure() { + python_configure() { + cd "${BUILD_DIR}" || die + + cat > build_config.py <<- EOF + PREFIX="${ED}/$(python_get_sitedir)/${PN}" + #URL="http://<COMPUTER NAME>/pdb2pqr/" + APBS="${EPREFIX}/usr/bin/apbs" + #OPAL="http://nbcr-222.ucsd.edu/opal2/services/pdb2pqr_1.8" + #APBS_OPAL="http://nbcr-222.ucsd.edu/opal2/services/apbs_1.3" + MAX_ATOMS=${MAXATOMS} + BUILD_PDB2PKA=$(usex pdb2pka True False) + REBUILD_SWIG=True + EOF + } + + python_foreach_impl python_configure +} + +src_compile() { + python_compile() { + cd "${BUILD_DIR}" || die + escons + } + python_foreach_impl python_compile +} + +src_test() { + python_test() { + local myesconsargs=( -j1 ) + cd "${BUILD_DIR}" || die + escons test + escons advtest + escons complete-test + } + python_foreach_impl python_test +} + +src_install() { + dodir /usr/share/doc/${PF}/html + python_install() { + local lib + + cd "${BUILD_DIR}" || die + + escons install + + find "${ED}"$(python_get_sitedir)/${PN}/{jmol,examples,doc,contrib} -delete || die + + python_doscript "${FILESDIR}"/{${PN},pdb2pka} + + for lib in apbslib.py{,c,o}; do + dosym ../../apbs/${lib} $(python_get_sitedir)/${PN}/pdb2pka/${lib} + done + dosym ../../_apbslib.so $(python_get_sitedir)/${PN}/pdb2pka/_apbslib.so + python_optimize + } + python_foreach_impl python_install + + if use doc; then + pushd doc > /dev/null + docinto html + dodoc -r *.html images pydoc + popd > /dev/null + fi + + use examples && \ + insinto /usr/share/${PN}/ && \ + doins -r examples + + + dodoc *md NEWS +} |