diff options
author | tmclaugh <tmclaugh@FreeBSD.org> | 2010-01-28 11:58:50 +0800 |
---|---|---|
committer | tmclaugh <tmclaugh@FreeBSD.org> | 2010-01-28 11:58:50 +0800 |
commit | 4a79ae10d8b1bcf0aeefa33d715e1ec564548af5 (patch) | |
tree | 519fe4521e3fc0c7f4510a1d1484f6d07490b185 | |
parent | d49922431f45777450b6c0618913107655f7043a (diff) | |
download | freebsd-ports-gnome-4a79ae10d8b1bcf0aeefa33d715e1ec564548af5.tar.gz freebsd-ports-gnome-4a79ae10d8b1bcf0aeefa33d715e1ec564548af5.tar.zst freebsd-ports-gnome-4a79ae10d8b1bcf0aeefa33d715e1ec564548af5.zip |
Fix pcap.h detection on FreeBSD <8.x.
Noticed by: pointyhat
-rw-r--r-- | net/py-pypcap/files/patch-setup.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/py-pypcap/files/patch-setup.py b/net/py-pypcap/files/patch-setup.py index a79f84986b3a..711c375ed5b2 100644 --- a/net/py-pypcap/files/patch-setup.py +++ b/net/py-pypcap/files/patch-setup.py @@ -1,15 +1,18 @@ --- setup.py.orig 2005-10-16 19:07:03.000000000 -0400 -+++ setup.py 2010-01-24 18:26:59.356418232 -0500 -@@ -25,7 +25,7 @@ ++++ setup.py 2010-01-27 22:53:23.749001522 -0500 +@@ -25,7 +25,10 @@ d = {} if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')): d['HAVE_PCAP_INT_H'] = 1 - buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read() -+ buf = open(os.path.join(cfg['include_dirs'][1], 'pcap.h')).read() ++ if os.uname()[2][0] >= '8': ++ buf = open(os.path.join(cfg['include_dirs'][1], 'pcap.h')).read() ++ else: ++ buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read() if buf.find('pcap_file(') != -1: d['HAVE_PCAP_FILE'] = 1 if buf.find('pcap_compile_nopcap(') != -1: -@@ -46,6 +46,7 @@ +@@ -46,6 +49,7 @@ 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) ] |