summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2011-05-03 11:10:40 +0000
committerJustin Lecher <jlec@gentoo.org>2011-05-03 11:10:40 +0000
commit349125585ce226b301a232e155938787d6d17a29 (patch)
tree5e7e6df08407b2caf24b65318db9b80f1e146687 /sci-biology
parentx86 stable wrt security bug #365751 (diff)
downloadgentoo-2-349125585ce226b301a232e155938787d6d17a29.tar.gz
gentoo-2-349125585ce226b301a232e155938787d6d17a29.tar.bz2
gentoo-2-349125585ce226b301a232e155938787d6d17a29.zip
Added python support, #365793
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/vienna-rna/ChangeLog6
-rw-r--r--sci-biology/vienna-rna/files/vienna-rna-1.8.5-setup.py27
-rw-r--r--sci-biology/vienna-rna/vienna-rna-1.8.5.ebuild21
3 files changed, 49 insertions, 5 deletions
diff --git a/sci-biology/vienna-rna/ChangeLog b/sci-biology/vienna-rna/ChangeLog
index a8f3e2425b32..1e04ac61d6d4 100644
--- a/sci-biology/vienna-rna/ChangeLog
+++ b/sci-biology/vienna-rna/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-biology/vienna-rna
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/vienna-rna/ChangeLog,v 1.36 2011/03/20 20:32:09 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/vienna-rna/ChangeLog,v 1.37 2011/05/03 11:10:40 jlec Exp $
+
+ 03 May 2011; Justin Lecher <jlec@gentoo.org> vienna-rna-1.8.5.ebuild,
+ +files/vienna-rna-1.8.5-setup.py:
+ Added python support, #365793
20 Mar 2011; Justin Lecher <jlec@gentoo.org> vienna-rna-1.8.4-r1.ebuild,
vienna-rna-1.8.4-r2.ebuild, vienna-rna-1.8.5.ebuild:
diff --git a/sci-biology/vienna-rna/files/vienna-rna-1.8.5-setup.py b/sci-biology/vienna-rna/files/vienna-rna-1.8.5-setup.py
new file mode 100644
index 000000000000..0aeaf2a116d3
--- /dev/null
+++ b/sci-biology/vienna-rna/files/vienna-rna-1.8.5-setup.py
@@ -0,0 +1,27 @@
+from distutils.core import setup, Extension
+import os
+import sys
+
+old_filename = os.path.join("Perl", "RNA.py")
+new_filename = os.path.join("Perl", "__init__.py")
+if os.path.exists(old_filename):
+ os.rename(old_filename, new_filename)
+
+extra_link_args = []
+
+extension = Extension("_RNA",
+ ["Perl/RNA_wrap.c"],
+ libraries=['RNA'],
+ library_dirs=['lib'],
+ extra_link_args=extra_link_args
+ )
+
+setup(name="RNA",
+ version="1.8.5",
+ description="Vienna RNA",
+ author="Ivo Hofacker, Institute for Theoretical Chemistry, University of Vienna",
+ url="http://www.tbi.univie.ac.at/RNA/",
+ package_dir = {'RNA':'Perl'},
+ packages = ['RNA'],
+ ext_modules=[extension],
+ )
diff --git a/sci-biology/vienna-rna/vienna-rna-1.8.5.ebuild b/sci-biology/vienna-rna/vienna-rna-1.8.5.ebuild
index b3264d75e9d4..c35237931503 100644
--- a/sci-biology/vienna-rna/vienna-rna-1.8.5.ebuild
+++ b/sci-biology/vienna-rna/vienna-rna-1.8.5.ebuild
@@ -1,10 +1,13 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/vienna-rna/vienna-rna-1.8.5.ebuild,v 1.2 2011/03/20 20:32:09 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/vienna-rna/vienna-rna-1.8.5.ebuild,v 1.3 2011/05/03 11:10:40 jlec Exp $
-EAPI="2"
+EAPI="3"
-inherit toolchain-funcs multilib autotools perl-module
+PYTHON_DEPEND="python? 2"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit distutils toolchain-funcs multilib autotools perl-module
DESCRIPTION="RNA secondary structure prediction and comparison"
HOMEPAGE="http://www.tbi.univie.ac.at/~ivo/RNA/"
@@ -12,7 +15,7 @@ SRC_URI="http://www.tbi.univie.ac.at/~ivo/RNA/ViennaRNA-${PV}.tar.gz"
LICENSE="vienna-rna"
SLOT="0"
-IUSE=""
+IUSE="python"
KEYWORDS="~amd64 ~ppc ~x86"
DEPEND="
@@ -40,6 +43,7 @@ src_prepare() {
eautoreconf
cd RNAforester && eautoreconf
+ use python && cp "${FILESDIR}"/${P}-setup.py "${S}"/setup.py
}
src_configure() {
@@ -57,6 +61,14 @@ src_compile() {
emake || die
emake -C Readseq || die "Failed to compile readseq."
# TODO: Add (optional?) support for the NCBI toolkit.
+ if use python; then
+ pushd Perl > /dev/null
+ mv RNA_wrap.c{,-perl}
+ swig -python RNA.i
+ popd > /dev/null
+ distutils_src_compile
+ mv Perl/RNA_wrap.c{-perl,}
+ fi
}
src_test() {
@@ -74,4 +86,5 @@ src_install() {
# remove perlocal.pod to avoid file collisions (see #240358)
fixlocalpod || die "Failed to remove perlocal.pod"
+ use python && distutils_src_install
}