diff options
author | Patrick Lauer <patrick@gentoo.org> | 2009-04-18 14:24:14 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2009-04-18 14:24:14 +0000 |
commit | d31165235b92f5769bb757201276f6c003dd5331 (patch) | |
tree | 5099f741f5e0eb38aa1ab0e9d23ebac86feb21c8 /dev-python/pypcap | |
parent | arm/m68k/s390/sh stable wrt #265376 (diff) | |
download | gentoo-2-d31165235b92f5769bb757201276f6c003dd5331.tar.gz gentoo-2-d31165235b92f5769bb757201276f6c003dd5331.tar.bz2 gentoo-2-d31165235b92f5769bb757201276f6c003dd5331.zip |
Small patch to fix compilation issues, thanks to Mike Kazantsev. Closes #247145
(Portage version: 2.2_rc30/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/pypcap')
-rw-r--r-- | dev-python/pypcap/ChangeLog | 11 | ||||
-rw-r--r-- | dev-python/pypcap/files/include_path.patch | 13 | ||||
-rw-r--r-- | dev-python/pypcap/pypcap-1.1-r1.ebuild | 49 |
3 files changed, 71 insertions, 2 deletions
diff --git a/dev-python/pypcap/ChangeLog b/dev-python/pypcap/ChangeLog index bce6a4239bc6..8cc4c2adc65b 100644 --- a/dev-python/pypcap/ChangeLog +++ b/dev-python/pypcap/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/pypcap -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pypcap/ChangeLog,v 1.3 2007/06/23 07:25:58 lucass Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypcap/ChangeLog,v 1.4 2009/04/18 14:24:14 patrick Exp $ + +*pypcap-1.1-r1 (18 Apr 2009) + + 18 Apr 2009; Patrick Lauer <patrick@gentoo.org> +files/include_path.patch, + +pypcap-1.1-r1.ebuild: + Small patch to fix compilation issues, thanks to Mike Kazantsev. Closes + #247145 23 Jun 2007; Lukasz Strzygowski <lucass@gentoo.org> pypcap-1.1.ebuild: Marked ~amd64. diff --git a/dev-python/pypcap/files/include_path.patch b/dev-python/pypcap/files/include_path.patch new file mode 100644 index 000000000000..a02c82e208c1 --- /dev/null +++ b/dev-python/pypcap/files/include_path.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index 9aada5a..71d0d34 100644 +--- a/setup.py ++++ b/setup.py +@@ -42,7 +42,7 @@ class config_pcap(config.config): + dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \ + glob.glob('../libpcap*') + glob.glob('../wpdpack*') + for d in dirs: +- for sd in ('include', 'include/pcap', ''): ++ for sd in ('include/pcap', 'include', ''): + incdirs = [ os.path.join(d, sd) ] + if os.path.exists(os.path.join(d, sd, 'pcap.h')): + cfg['include_dirs'] = [ os.path.join(d, sd) ] diff --git a/dev-python/pypcap/pypcap-1.1-r1.ebuild b/dev-python/pypcap/pypcap-1.1-r1.ebuild new file mode 100644 index 000000000000..0e830e6d9f3d --- /dev/null +++ b/dev-python/pypcap/pypcap-1.1-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypcap/pypcap-1.1-r1.ebuild,v 1.1 2009/04/18 14:24:14 patrick Exp $ + +NEED_PYTHON=2.3 + +inherit distutils + +DESCRIPTION="Simplified object-oriented Python extension module for libpcap" +HOMEPAGE="http://code.google.com/p/pypcap/" +SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +RDEPEND="virtual/libpcap" +DEPEND="${RDEPEND} + >=dev-python/pyrex-0.9.5.1a" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/include_path.patch" || die +} + +src_compile() { + # pcap.c was generated with pyrex-0.9.3 + # and <=pyrex-0.9.5.1a is incompatible with python-2.5. + # So we regenerate it. Bug #180039 + pyrexc pcap.pyx || die "pyrexc failed" + "${python}" setup.py config || die "config failed" + distutils_src_compile +} + +src_install() { + DOCS="CHANGES" + distutils_src_install + if use examples ; then + insinto /usr/share/doc/${PF} + doins testsniff.py + fi +} + +src_test() { + # PYTHONPATH is set correctly in the test itself + "${python}" test.py || die "tests failed" +} |