diff options
author | Alastair Tse <liquidx@gentoo.org> | 2006-09-19 20:58:22 +0000 |
---|---|---|
committer | Alastair Tse <liquidx@gentoo.org> | 2006-09-19 20:58:22 +0000 |
commit | 2c59fe6bf6c943d6e278db7819fec05d8a9d2c7e (patch) | |
tree | 17e9a20031105d65ba3d32f30d85d99d4a593733 /dev-python/pylibpcap | |
parent | Add new revision with pulseaudio useflag, disable pulseaudio from previous eb... (diff) | |
download | gentoo-2-2c59fe6bf6c943d6e278db7819fec05d8a9d2c7e.tar.gz gentoo-2-2c59fe6bf6c943d6e278db7819fec05d8a9d2c7e.tar.bz2 gentoo-2-2c59fe6bf6c943d6e278db7819fec05d8a9d2c7e.zip |
add a conditional patch for swig-1.3.29. thanks to Ali Polatel. (#134343)
(Portage version: 2.1.1)
Diffstat (limited to 'dev-python/pylibpcap')
-rw-r--r-- | dev-python/pylibpcap/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/pylibpcap/files/digest-pylibpcap-0.5.1 | 2 | ||||
-rw-r--r-- | dev-python/pylibpcap/files/pylibpcap-swig-1.3.29.patch | 57 | ||||
-rw-r--r-- | dev-python/pylibpcap/pylibpcap-0.5.1.ebuild | 15 |
4 files changed, 76 insertions, 4 deletions
diff --git a/dev-python/pylibpcap/ChangeLog b/dev-python/pylibpcap/ChangeLog index 79adbf172e06..b2dae6c96306 100644 --- a/dev-python/pylibpcap/ChangeLog +++ b/dev-python/pylibpcap/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/pylibpcap # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pylibpcap/ChangeLog,v 1.10 2006/04/01 15:24:10 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pylibpcap/ChangeLog,v 1.11 2006/09/19 20:58:21 liquidx Exp $ + + 19 Sep 2006; Alastair Tse <liquidx@gentoo.org> + +files/pylibpcap-swig-1.3.29.patch, pylibpcap-0.5.1.ebuild: + add a conditional patch for swig-1.3.29. thanks to Ali Polatel. (#134343) 01 Apr 2006; Aron Griffis <agriffis@gentoo.org> pylibpcap-0.5.1.ebuild: Mark 0.5.1 ~ia64 diff --git a/dev-python/pylibpcap/files/digest-pylibpcap-0.5.1 b/dev-python/pylibpcap/files/digest-pylibpcap-0.5.1 index 99bd21d6c5f8..d411232aa66e 100644 --- a/dev-python/pylibpcap/files/digest-pylibpcap-0.5.1 +++ b/dev-python/pylibpcap/files/digest-pylibpcap-0.5.1 @@ -1 +1,3 @@ MD5 85adbefd87be3a3a32bed899974fe3dc pylibpcap-0.5.1.tar.gz 25171 +RMD160 f1e2309fbaf0878e6b4fb87b626686377c6c105a pylibpcap-0.5.1.tar.gz 25171 +SHA256 4b7eb79d5e476cc0e03bcdb13c4a874cf7edac650ef55a21fde385d676e3a7dd pylibpcap-0.5.1.tar.gz 25171 diff --git a/dev-python/pylibpcap/files/pylibpcap-swig-1.3.29.patch b/dev-python/pylibpcap/files/pylibpcap-swig-1.3.29.patch new file mode 100644 index 000000000000..aaec422c5c80 --- /dev/null +++ b/dev-python/pylibpcap/files/pylibpcap-swig-1.3.29.patch @@ -0,0 +1,57 @@ +diff -ur pylibpcap-0.5.1/build-tools/docify-shadow.py pylibpcap-0.5.1-fixed/build-tools/docify-shadow.py +--- pylibpcap-0.5.1/build-tools/docify-shadow.py 2005-11-18 08:38:13.000000000 +0200 ++++ pylibpcap-0.5.1-fixed/build-tools/docify-shadow.py 2006-09-14 02:03:41.000000000 +0300 +@@ -20,7 +20,7 @@ + data=f.readlines() + + for i in xrange(0,len(data)): +- match=re.search('^.*def __del__',data[i]) ++ match=re.search('^.*__repr__ =',data[i]) # Changed from '^.*def __del__' to '__repr__ =' + if match: + #print match.group(0) + i=i+1 +@@ -36,7 +36,7 @@ + + pymeths=[] + for i in xrange (i,len(data)): +- if re.search('^.*def __repr__', data[i]): ++ if re.search('^.__del__ =', data[i]): # changed from ^.*def __repr__ to '^.*__del =' + break + pymeths.append(data[i]) + +@@ -67,10 +67,16 @@ + break + + # spit out the next 2 lines verbatim ++# that's three lines: ++# this = _pcap.new_pcapObject(*args) ++# try: self.this.append(this) ++# except: self.this = this + outfile.write(data[i]) +-i=i+1 ++i+=1 + outfile.write(data[i]) +-i=i+1 ++i+=1 ++outfile.write(data[i]) ++i+=1 + + outfile.write(' import sys\n') + outfile.write(' if sys.version[0]==\'2\':\n') +diff -ur pylibpcap-0.5.1/mk-constants.py pylibpcap-0.5.1-fixed/mk-constants.py +--- pylibpcap-0.5.1/mk-constants.py 2004-06-07 08:34:49.000000000 +0300 ++++ pylibpcap-0.5.1-fixed/mk-constants.py 2006-09-14 01:55:14.000000000 +0300 +@@ -79,6 +79,13 @@ + rcs = ' $Id: pylibpcap-swig-1.3.29.patch,v 1.1 2006/09/19 20:58:22 liquidx Exp $\n' + fp.write(string.replace(rcs, '$', '')) + fp.write(' Do not edit this file directly, it will be overwritten \n*/\n\n') ++fp.write('// Adding statements taken from pylibpcap-0.4 source\n') ++fp.write('#define SWIG_PY_INT\t1\n') ++fp.write('#define SWIG_PY_FLOAT\t2\n') ++fp.write('#define SWIG_PY_STRING\t3\n') ++fp.write('#define SWIG_PY_POINTER\t4\n') ++fp.write('#define SWIG_PY_BINARY\t5\n') ++fp.write('//\n') + fp.write('static struct swig_const_info const pcapmodule_DLT[] = {\n') + for dlt in linktypes: + fp.write('#ifdef %s\n' % (dlt,)) diff --git a/dev-python/pylibpcap/pylibpcap-0.5.1.ebuild b/dev-python/pylibpcap/pylibpcap-0.5.1.ebuild index 75ec79ff0a35..b259fd858955 100644 --- a/dev-python/pylibpcap/pylibpcap-0.5.1.ebuild +++ b/dev-python/pylibpcap/pylibpcap-0.5.1.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pylibpcap/pylibpcap-0.5.1.ebuild,v 1.2 2006/04/01 15:24:10 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pylibpcap/pylibpcap-0.5.1.ebuild,v 1.3 2006/09/19 20:58:21 liquidx Exp $ -inherit distutils +inherit distutils eutils DESCRIPTION="Python interface to libpcap" HOMEPAGE="http://sourceforge.net/projects/${PN}/" @@ -14,7 +14,16 @@ KEYWORDS="~amd64 ~ia64 ~x86" IUSE="" DEPEND="virtual/python - virtual/libpcap" + virtual/libpcap + dev-lang/swig" + +src_unpack() { + unpack ${A} + cd ${S} + if $(has_version \>=dev-lang/swig-1.3.29); then + epatch ${FILESDIR}/${PN}-swig-1.3.29.patch + fi +} src_install() { distutils_src_install |