[csw-devel] SF.net SVN: gar:[21960] csw/mgar/pkg/pypcap/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Wed Sep 18 09:49:59 CEST 2013


Revision: 21960
          http://gar.svn.sourceforge.net/gar/?rev=21960&view=rev
Author:   wahwah
Date:     2013-09-18 07:49:58 +0000 (Wed, 18 Sep 2013)
Log Message:
-----------
pypcap/trunk: a few patches to make it build

Modified Paths:
--------------
    csw/mgar/pkg/pypcap/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/pypcap/trunk/files/0001-Strings-must-not-be-thrown-as-exceptions.patch
    csw/mgar/pkg/pypcap/trunk/files/0002-Use-a-shared-object-if-available.patch
    csw/mgar/pkg/pypcap/trunk/files/0003-include-pcap-must-be-first-to-pick-pcap_file.patch

Modified: csw/mgar/pkg/pypcap/trunk/Makefile
===================================================================
--- csw/mgar/pkg/pypcap/trunk/Makefile	2013-09-17 12:33:10 UTC (rev 21959)
+++ csw/mgar/pkg/pypcap/trunk/Makefile	2013-09-18 07:49:58 UTC (rev 21960)
@@ -11,10 +11,23 @@
 MASTER_SITES = $(GOOGLE_MIRROR)
 DISTFILES  = $(DISTNAME).tar.gz
 
-CONFIGURE_ARGS = --with-pcap /opt/csw
+PATCHFILES += 0001-Strings-must-not-be-thrown-as-exceptions.patch
+PATCHFILES += 0002-Use-a-shared-object-if-available.patch
+PATCHFILES += 0003-include-pcap-must-be-first-to-pick-pcap_file.patch
+
+CONFIGURE_ARGS = --with-pcap=/opt/csw
 CONFIGURE_SCRIPTS = $(WORKSRC)/setup.py
 
 PACKAGES = CSWpy-pcap
 
+TEST_SCRIPTS =
+
+LICENSE = LICENSE
+
+RUNTIME_DEP_PKGS_CSWpy-pcap += CSWlibpython2-7-1-0
+RUNTIME_DEP_PKGS_CSWpy-pcap += CSWlibpcap1
+RUNTIME_DEP_PKGS_CSWpy-pcap += CSWlibpython2-6-1-0
+RUNTIME_DEP_PKGS_CSWpy-pcap += CSWlibgcc-s1
+
 include gar/category.mk
 

Added: csw/mgar/pkg/pypcap/trunk/files/0001-Strings-must-not-be-thrown-as-exceptions.patch
===================================================================
--- csw/mgar/pkg/pypcap/trunk/files/0001-Strings-must-not-be-thrown-as-exceptions.patch	                        (rev 0)
+++ csw/mgar/pkg/pypcap/trunk/files/0001-Strings-must-not-be-thrown-as-exceptions.patch	2013-09-18 07:49:58 UTC (rev 21960)
@@ -0,0 +1,25 @@
+From 78ca4ca4eba27103d007b9044efa7ffda49ee949 Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Wed, 18 Sep 2013 09:09:53 +0200
+Subject: [PATCH] Strings must not be thrown as exceptions
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 09f74e4..104ee90 100644
+--- a/setup.py
++++ b/setup.py
+@@ -60,7 +60,7 @@ class config_pcap(config.config):
+                                 print 'found', cfg
+                                 self._write_config_h(cfg)
+                                 return cfg
+-        raise "couldn't find pcap build or installation directory"
++        raise Exception("couldn't find pcap build or installation directory")
+     
+     def run(self):
+         #config.log.set_verbosity(0)
+-- 
+1.8.3.4
+

Added: csw/mgar/pkg/pypcap/trunk/files/0002-Use-a-shared-object-if-available.patch
===================================================================
--- csw/mgar/pkg/pypcap/trunk/files/0002-Use-a-shared-object-if-available.patch	                        (rev 0)
+++ csw/mgar/pkg/pypcap/trunk/files/0002-Use-a-shared-object-if-available.patch	2013-09-18 07:49:58 UTC (rev 21960)
@@ -0,0 +1,24 @@
+From f51d387c2bdb7b4c302d11eff4a49ce32a09a7d9 Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Wed, 18 Sep 2013 09:37:08 +0200
+Subject: [PATCH] Use a shared object if available
+
+---
+ setup.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/setup.py b/setup.py
+index 104ee90..24eaa1e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -48,6 +48,7 @@ class config_pcap(config.config):
+                     cfg['include_dirs'] = [ os.path.join(d, sd) ]
+                     for sd in ('lib', ''):
+                         for lib in (('pcap', 'libpcap.a'),
++                                    ('pcap', 'libpcap.so'),
+                                     ('pcap', 'libpcap.dylib'),
+                                     ('wpcap', 'wpcap.lib')):
+                             if os.path.exists(os.path.join(d, sd, lib[1])):
+-- 
+1.8.3.4
+

Added: csw/mgar/pkg/pypcap/trunk/files/0003-include-pcap-must-be-first-to-pick-pcap_file.patch
===================================================================
--- csw/mgar/pkg/pypcap/trunk/files/0003-include-pcap-must-be-first-to-pick-pcap_file.patch	                        (rev 0)
+++ csw/mgar/pkg/pypcap/trunk/files/0003-include-pcap-must-be-first-to-pick-pcap_file.patch	2013-09-18 07:49:58 UTC (rev 21960)
@@ -0,0 +1,25 @@
+From 39090d39583a80ed4d412bed41e837bed8414afa Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Wed, 18 Sep 2013 09:43:43 +0200
+Subject: [PATCH] include/pcap must be first to pick pcap_file()
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 24eaa1e..7a0728f 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) ]
+-- 
+1.8.3.4
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list