diff options
author | Steve Wills <swills@FreeBSD.org> | 2012-05-09 11:22:20 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2012-05-09 11:22:20 +0000 |
commit | a543cedb7c53bdd978767c030e71a79206020920 (patch) | |
tree | f4ad1eb70888f6f2491a5d1e1fc635b8ca3f5005 /net | |
parent | ad8705da01739bfd3a9f1127f6b62db8442fb569 (diff) | |
download | ports-a543cedb7c53bdd978767c030e71a79206020920.tar.gz ports-a543cedb7c53bdd978767c030e71a79206020920.zip |
Notes
Diffstat (limited to 'net')
-rw-r--r-- | net/p5-Net-Pcap/Makefile | 10 | ||||
-rw-r--r-- | net/p5-Net-Pcap/files/extra-patch-t__03-openlive.t | 14 | ||||
-rw-r--r-- | net/p5-Net-Pcap/files/patch-t__Utils.pm | 11 |
3 files changed, 34 insertions, 1 deletions
diff --git a/net/p5-Net-Pcap/Makefile b/net/p5-Net-Pcap/Makefile index 49e7d1af9870..21b30754f79f 100644 --- a/net/p5-Net-Pcap/Makefile +++ b/net/p5-Net-Pcap/Makefile @@ -15,10 +15,18 @@ MAINTAINER= perl@FreeBSD.org COMMENT= Interface to pcap(3) LBL packet capture library RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/IO/Interface.pm:${PORTSDIR}/net/p5-IO-Interface +TEST_DEPENDS= p5-Socket>=0:${PORTSDIR}/net/p5-Socket \ + p5-Test-Exception>=0:${PORTSDIR}/devel/p5-Test-Exception PERL_CONFIGURE= yes MAN1= pcapinfo.1 MAN3= Net::Pcap.3 -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 800000 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-t__03-openlive.t +.endif + +.include <bsd.port.post.mk> diff --git a/net/p5-Net-Pcap/files/extra-patch-t__03-openlive.t b/net/p5-Net-Pcap/files/extra-patch-t__03-openlive.t new file mode 100644 index 000000000000..05d5559e2f83 --- /dev/null +++ b/net/p5-Net-Pcap/files/extra-patch-t__03-openlive.t @@ -0,0 +1,14 @@ +--- t/03-openlive.t.orig 2007-12-22 10:46:39.000000000 -0900 ++++ t/03-openlive.t 2012-04-05 16:45:58.000000000 -0800 +@@ -64,8 +64,10 @@ + is( $@, '', "open_live()" ); + if($^O eq 'MSWin32' or $^O eq 'cygwin') { + like( $err, '/^Error opening adapter:/', " - \$err must be set: $err" ); +-} elsif($^O eq 'darwin' or $^O eq 'freebsd' or $^O eq 'openbsd') { ++} elsif($^O eq 'darwin' or $^O eq 'openbsd') { + like( $err, "/^(?:BIOCSETIF: )?$fakedev: Device not configured/", " - \$err must be set: $err" ); ++} elsif($^O eq 'freebsd') { ++ is( $err, ''); # Since pcap 1.0.0 nonexisting gives empty string. + } else { + like( $err, '/^(?:bind|ioctl|SIOCGIFHWADDR): (?:No such device)/', " - \$err must be set: $err" ); + } diff --git a/net/p5-Net-Pcap/files/patch-t__Utils.pm b/net/p5-Net-Pcap/files/patch-t__Utils.pm new file mode 100644 index 000000000000..43a1068a3cdf --- /dev/null +++ b/net/p5-Net-Pcap/files/patch-t__Utils.pm @@ -0,0 +1,11 @@ +--- t/Utils.pm.orig 2012-04-05 17:39:45.000000000 -0800 ++++ t/Utils.pm 2012-04-05 17:41:15.000000000 -0800 +@@ -73,7 +73,7 @@ + my @devs = Net::Pcap::findalldevs(\%devs, \$err); + + # filter out unusable devices +-@devs = grep { $_ ne "lo" and $_ ne "lo0" and $_ !~ /GenericDialupAdapter/ } @devs; ++@devs = grep { $_ ne "lo" and $_ ne "lo0" and $_ !~ /GenericDialupAdapter/ and $_ !~ /^usbus/ } @devs; + + # check if the user has specified a prefered device to use for tests + if (open(PREF, "device.txt")) { |