diff options
author | Chris Rees <crees@FreeBSD.org> | 2013-07-14 15:14:19 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2013-07-14 15:14:19 +0000 |
commit | bf415be74fa3c18d4c519b14419601d2c95d1636 (patch) | |
tree | 62d48a7761baca8760c0af441f97c21c253929f0 /net-mgmt | |
parent | 60d99ecafe31dc52000f3673b3c55bc6d2ec071b (diff) | |
download | ports-bf415be74fa3c18d4c519b14419601d2c95d1636.tar.gz ports-bf415be74fa3c18d4c519b14419601d2c95d1636.zip |
Fix some warnings when using mrtg_daemon.
PR: ports/166777
Submitted by: Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
Approved by: demon (maintainer)
Notes
Notes:
svn path=/head/; revision=322986
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/p5-SNMP_Session/Makefile | 11 | ||||
-rw-r--r-- | net-mgmt/p5-SNMP_Session/files/patch-SNMP_Session.pm | 45 |
2 files changed, 46 insertions, 10 deletions
diff --git a/net-mgmt/p5-SNMP_Session/Makefile b/net-mgmt/p5-SNMP_Session/Makefile index 848283366e49..2b1cea51df62 100644 --- a/net-mgmt/p5-SNMP_Session/Makefile +++ b/net-mgmt/p5-SNMP_Session/Makefile @@ -1,12 +1,9 @@ -# New ports collection makefile for: p5-SNMP_Session -# Date created: 13 June 1999 -# Whom: Stephen J. Roznowski <sjr@home.net> -# +# Created by: Stephen J. Roznowski <sjr@home.net> # $FreeBSD$ -# PORTNAME= SNMP_Session PORTVERSION= 1.13 +PORTREVISION= 1 CATEGORIES= net-mgmt perl5 MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} PROJECTHOST= snmp-session @@ -19,11 +16,13 @@ PERL_CONFIGURE= yes DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} +.include <bsd.port.options.mk> + post-patch: ${RM} ${WRKSRC}/lib/SNMP_Session.pm.orig post-install: -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${DOCSDIR} .for file in README README.SNMP_util index.html ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} diff --git a/net-mgmt/p5-SNMP_Session/files/patch-SNMP_Session.pm b/net-mgmt/p5-SNMP_Session/files/patch-SNMP_Session.pm index 22ae5b69c035..1405beccfe19 100644 --- a/net-mgmt/p5-SNMP_Session/files/patch-SNMP_Session.pm +++ b/net-mgmt/p5-SNMP_Session/files/patch-SNMP_Session.pm @@ -5,17 +5,54 @@ if (eval {local $SIG{__DIE__};require Socket6;} && eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) { - import Socket6; -+ Socket6->import(qw(pack_sockaddr_in6 inet_pton inet_ntop unpack_sockaddr_in6 getaddrinfo)); ++ Socket6->import(qw(inet_pton inet_ntop getaddrinfo)); $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1"))); $SNMP_Session::ipv6available = 1; } -@@ -601,7 +601,7 @@ +@@ -549,7 +549,7 @@ + # complaining about AF_INET6 when Socket6 is not available + + if( (defined $ipv6_addr_len) && (length $addr == $ipv6_addr_len)) { +- ($port,$addrunpack) = unpack_sockaddr_in6 ($addr); ++ ($port,$addrunpack) = Socket6::unpack_sockaddr_in6 ($addr); + $addrstr = inet_ntop (AF_INET6(), $addrunpack); + } else { + ($port,$addrunpack) = unpack_sockaddr_in ($addr); +@@ -605,7 +605,7 @@ BEGIN { if($SNMP_Session::ipv6available) { import IO::Socket::INET6; - import Socket6; -+ Socket6->import(qw(pack_sockaddr_in6 inet_pton inet_ntop unpack_sockaddr_in6 getaddrinfo)); ++ Socket6->import(qw(inet_pton inet_ntop getaddrinfo)); } } - +@@ -825,8 +825,8 @@ + ($p2,$a2) = unpack_sockaddr_in ($sa2); + } elsif($this->{'sockfamily'} == AF_INET6()) { + # IPv6 addresses +- ($p1,$a1) = unpack_sockaddr_in6 ($sa1); +- ($p2,$a2) = unpack_sockaddr_in6 ($sa2); ++ ($p1,$a1) = Socket6::unpack_sockaddr_in6 ($sa1); ++ ($p2,$a2) = Socket6::unpack_sockaddr_in6 ($sa2); + } else { + return 0; + } +@@ -899,7 +899,7 @@ + return undef unless $remote_addr; + + if( (defined $ipv6_addr_len) && (length $remote_addr == $ipv6_addr_len)) { +- ($port,$iaddr) = unpack_sockaddr_in6($remote_addr); ++ ($port,$iaddr) = Socket6::unpack_sockaddr_in6($remote_addr); + } else { + ($port,$iaddr) = unpack_sockaddr_in($remote_addr); + } +@@ -948,7 +948,7 @@ + return undef unless $remote_addr; + + if( (defined $ipv6_addr_len) && (length $remote_addr == $ipv6_addr_len)) { +- ($port,$iaddr) = unpack_sockaddr_in6($remote_addr); ++ ($port,$iaddr) = Socket6::unpack_sockaddr_in6($remote_addr); + } else { + ($port,$iaddr) = unpack_sockaddr_in($remote_addr); + } |