diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-03-04 17:37:54 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-03-04 17:37:54 +0000 |
commit | 666b2b04910d77b1383e267358b6d083e85604d5 (patch) | |
tree | bbdd46a2f2644f2620be8f31136f08ccee3c3234 /dev-libs/tre | |
parent | Initial pyzmq ebuild. (diff) | |
download | gentoo-2-666b2b04910d77b1383e267358b6d083e85604d5.tar.gz gentoo-2-666b2b04910d77b1383e267358b6d083e85604d5.tar.bz2 gentoo-2-666b2b04910d77b1383e267358b6d083e85604d5.zip |
Added python support, 357397, thanks Martin for the Patch
(Portage version: 2.2.0_alpha26/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/tre')
-rw-r--r-- | dev-libs/tre/ChangeLog | 6 | ||||
-rw-r--r-- | dev-libs/tre/files/0.8.0-python.patch | 39 | ||||
-rw-r--r-- | dev-libs/tre/tre-0.8.0.ebuild | 25 |
3 files changed, 66 insertions, 4 deletions
diff --git a/dev-libs/tre/ChangeLog b/dev-libs/tre/ChangeLog index 0fad73209dbb..826e4dca742b 100644 --- a/dev-libs/tre/ChangeLog +++ b/dev-libs/tre/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-libs/tre # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/tre/ChangeLog,v 1.49 2011/01/29 17:38:52 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/tre/ChangeLog,v 1.50 2011/03/04 17:37:54 jlec Exp $ + + 04 Mar 2011; Justin Lecher <jlec@gentoo.org> +files/0.8.0-python.patch, + tre-0.8.0.ebuild: + Added python support, 357397, thanks Martin for the Patch 29 Jan 2011; Raúl Porcel <armin76@gentoo.org> tre-0.8.0.ebuild: alpha/ia64/sparc stable wrt #350839 diff --git a/dev-libs/tre/files/0.8.0-python.patch b/dev-libs/tre/files/0.8.0-python.patch new file mode 100644 index 000000000000..f290e0bf5783 --- /dev/null +++ b/dev-libs/tre/files/0.8.0-python.patch @@ -0,0 +1,39 @@ +diff --git a/python/setup.py b/python/setup.py +index b420a4c..b1bca6b 100644 +--- a/python/setup.py ++++ b/python/setup.py +@@ -10,7 +10,8 @@ import shutil + + version = "0.8.0" + data_files = [] +-include_dirs = ["../lib"] ++include_dirs = ["lib"] ++library_dirs = ["lib/.libs"] + libraries = ["tre"] + + if sys.platform == "win32": +@@ -28,9 +29,10 @@ setup(name = "tre", + url = "http://laurikari.net/tre/", + data_files = data_files, + ext_modules = [Extension("tre", +- sources = ["tre-python.c"], ++ sources = ["python/tre-python.c"], + define_macros = [("HAVE_CONFIG_H", None)], + include_dirs = include_dirs, ++ library_dirs = library_dirs, + libraries = libraries + ), + ], +diff --git a/python/tre-python.c b/python/tre-python.c +index bbb24ed..2e35e3a 100644 +--- a/python/tre-python.c ++++ b/python/tre-python.c +@@ -13,7 +13,7 @@ + #include "Python.h" + #include "structmember.h" + +-#include <tre/tre.h> ++#include <tre.h> + + #define TRE_MODULE "tre" + diff --git a/dev-libs/tre/tre-0.8.0.ebuild b/dev-libs/tre/tre-0.8.0.ebuild index 73a55a06bf4d..88d24179725c 100644 --- a/dev-libs/tre/tre-0.8.0.ebuild +++ b/dev-libs/tre/tre-0.8.0.ebuild @@ -1,17 +1,23 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/tre/tre-0.8.0.ebuild,v 1.10 2011/01/29 17:38:52 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/tre/tre-0.8.0.ebuild,v 1.11 2011/03/04 17:37:54 jlec Exp $ EAPI=2 -DESCRIPTION="Lightweight, robust, and efficient POSIX compliant regexp matching library." +PYTHON_DEPEND="2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" + +inherit distutils eutils + +DESCRIPTION="Lightweight, robust, and efficient POSIX compliant regexp matching library" HOMEPAGE="http://laurikari.net/tre/" SRC_URI="http://laurikari.net/tre/${P}.tar.bz2" LICENSE="BSD-2" SLOT="0" KEYWORDS="alpha amd64 hppa ia64 ppc ~ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" -IUSE="nls static-libs" +IUSE="nls python static-libs" RDEPEND=" !app-misc/glimpse @@ -20,6 +26,13 @@ DEPEND="${RDEPEND} dev-util/pkgconfig nls? ( sys-devel/gettext )" +DISTUTILS_SETUP_FILES=("python/setup.py") + +src_prepare() { + epatch "${FILESDIR}"/${PV}-python.patch + python_copy_sources python +} + src_configure() { econf \ --disable-dependency-tracking \ @@ -29,6 +42,11 @@ src_configure() { $(use_enable static-libs static) } +src_compile() { + emake || die + use python && distutils_src_compile +} + src_test() { if $(locale -a | grep -iq en_US.iso88591); then emake -j1 \ @@ -44,6 +62,7 @@ src_install() { emake DESTDIR="${D}" install || die dodoc AUTHORS ChangeLog NEWS README THANKS TODO || die dohtml doc/*.{css,html} || die + use python && distutils_src_install } pkg_postinst() { |