diff options
author | tobez <tobez@FreeBSD.org> | 2013-01-09 21:30:46 +0800 |
---|---|---|
committer | tobez <tobez@FreeBSD.org> | 2013-01-09 21:30:46 +0800 |
commit | 26c93bbdc1c97ff10ab8ba1a9043188be5e1cad6 (patch) | |
tree | 5a113de82639f3040bb572bb17551fb4fe613404 /net | |
parent | ea388e393eec0a2356406a7755f7819946d78eb0 (diff) | |
download | freebsd-ports-gnome-26c93bbdc1c97ff10ab8ba1a9043188be5e1cad6.tar.gz freebsd-ports-gnome-26c93bbdc1c97ff10ab8ba1a9043188be5e1cad6.tar.zst freebsd-ports-gnome-26c93bbdc1c97ff10ab8ba1a9043188be5e1cad6.zip |
Fix spurious warnings triggered under certain conditions
(see https://rt.cpan.org/Public/Bug/Display.html?id=78828).
PR: 174930
Submitted by: Takefu <takefu at airport.fm>
Diffstat (limited to 'net')
-rw-r--r-- | net/p5-Net-Server/Makefile | 10 | ||||
-rw-r--r-- | net/p5-Net-Server/files/patch-lib-Net-Server.pm | 26 |
2 files changed, 31 insertions, 5 deletions
diff --git a/net/p5-Net-Server/Makefile b/net/p5-Net-Server/Makefile index 30ffd689b236..503b0d931799 100644 --- a/net/p5-Net-Server/Makefile +++ b/net/p5-Net-Server/Makefile @@ -1,12 +1,9 @@ -# New ports collection makefile for: p5-Net-Server -# Date created: 24 Apr 2001 -# Whom: Jesse McConnell <jesse@gallup.com> -# +# Created by: Jesse McConnell <jesse@gallup.com> # $FreeBSD$ -# PORTNAME= Net-Server PORTVERSION= 2.006 +PORTREVISION= 1 CATEGORIES= net perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- @@ -46,6 +43,9 @@ MAN3= Net::Server.3 \ .include <bsd.port.options.mk> +post-patch: + ${RM} ${WRKSRC}/lib/Net/Server.pm.orig + .if ${PORT_OPTIONS:MIPV6} BUILD_DEPENDS+= p5-Socket6>=0.23:${PORTSDIR}/net/p5-Socket6 RUN_DEPENDS+= p5-Socket6>=0.23:${PORTSDIR}/net/p5-Socket6 diff --git a/net/p5-Net-Server/files/patch-lib-Net-Server.pm b/net/p5-Net-Server/files/patch-lib-Net-Server.pm new file mode 100644 index 000000000000..4f3e1742d8f2 --- /dev/null +++ b/net/p5-Net-Server/files/patch-lib-Net-Server.pm @@ -0,0 +1,26 @@ +--- lib/Net/Server.pm.orig 2012-06-21 07:44:58.000000000 +0900 ++++ lib/Net/Server.pm 2013-01-03 16:13:30.000000000 +0900 +@@ -587,7 +587,10 @@ + + # if the addr or host matches a deny, reject it immediately + foreach (@{ $prop->{'deny'} }) { +- return 0 if $prop->{'peerhost'} =~ /^$_$/ && defined $prop->{'reverse_lookups'}; ++ return 0 ++ if defined($prop->{'reverse_lookups'}) ++ && defined($prop->{peerhost}) ++ && $prop->{'peerhost'} =~ /^$_$/; + return 0 if $peeraddr =~ /^$_$/; + } + if (@{ $prop->{'cidr_deny'} }) { +@@ -597,7 +600,10 @@ + + # if the addr or host isn't blocked yet, allow it if it is allowed + foreach (@{ $prop->{'allow'} }) { +- return 1 if $prop->{'peerhost'} =~ /^$_$/ && defined $prop->{'reverse_lookups'}; ++ return 1 ++ if defined($prop->{'reverse_lookups'}) ++ && defined($prop->{peerhost}) ++ && $prop->{'peerhost'} =~ /^$_$/; + return 1 if $peeraddr =~ /^$_$/; + } + if (@{ $prop->{'cidr_allow'} }) { |