diff options
author | Tom McLaughlin <tmclaugh@FreeBSD.org> | 2010-01-28 03:58:50 +0000 |
---|---|---|
committer | Tom McLaughlin <tmclaugh@FreeBSD.org> | 2010-01-28 03:58:50 +0000 |
commit | 5188bc763c8fff9f110867b7c5bdd6032ceddfa7 (patch) | |
tree | c377a58715f017b736cfa98af67893cfa22be63e /net/py-pypcap/files/patch-setup.py | |
parent | - Remove unneeded dependencies which is in perl-5.8.9 dist (diff) |
Fix pcap.h detection on FreeBSD <8.x.
Noticed by: pointyhat
Notes
Notes:
svn path=/head/; revision=248741
Diffstat (limited to 'net/py-pypcap/files/patch-setup.py')
-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) ] |