summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2006-09-19 20:58:22 +0000
committerAlastair Tse <liquidx@gentoo.org>2006-09-19 20:58:22 +0000
commit2c59fe6bf6c943d6e278db7819fec05d8a9d2c7e (patch)
tree17e9a20031105d65ba3d32f30d85d99d4a593733 /dev-python/pylibpcap/files
parentAdd new revision with pulseaudio useflag, disable pulseaudio from previous eb... (diff)
downloadgentoo-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/files')
-rw-r--r--dev-python/pylibpcap/files/digest-pylibpcap-0.5.12
-rw-r--r--dev-python/pylibpcap/files/pylibpcap-swig-1.3.29.patch57
2 files changed, 59 insertions, 0 deletions
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,))