From 62afe9ccf83e16f5b028bc6fd417f5d47a2ce56f Mon Sep 17 00:00:00 2001 From: sthen Date: Fri, 26 Feb 2010 23:00:56 +0000 Subject: [PATCH] Don't pull in conflicting functions (which do seem to work, but cause a lot of warning spam on the console e.g. with mrtg). Fedora diff identified by giovanni@ as fixing the problem, further research and diff from okan@. ok jasper@ (reminder, ports is not fully open, do not commit without specific permission) --- net/p5-SNMP_Session/Makefile | 3 ++- .../patches/patch-lib_SNMP_Session_pm | 21 +++++++++++++++++++ net/p5-SNMP_Session/pkg/PLIST | 3 ++- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 net/p5-SNMP_Session/patches/patch-lib_SNMP_Session_pm diff --git a/net/p5-SNMP_Session/Makefile b/net/p5-SNMP_Session/Makefile index b79a68c557a..6b482d7fba8 100644 --- a/net/p5-SNMP_Session/Makefile +++ b/net/p5-SNMP_Session/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.11 2009/12/13 23:47:51 sthen Exp $ +# $OpenBSD: Makefile,v 1.12 2010/02/26 23:00:56 sthen Exp $ COMMENT= provides rudimentary access to remote SNMP agents MODULES= cpan DISTNAME= SNMP_Session-1.13 +PKGNAME= p5-${DISTNAME}p0 CATEGORIES= net HOMEPAGE= http://code.google.com/p/snmp-session/ diff --git a/net/p5-SNMP_Session/patches/patch-lib_SNMP_Session_pm b/net/p5-SNMP_Session/patches/patch-lib_SNMP_Session_pm new file mode 100644 index 00000000000..df782612224 --- /dev/null +++ b/net/p5-SNMP_Session/patches/patch-lib_SNMP_Session_pm @@ -0,0 +1,21 @@ +$OpenBSD: patch-lib_SNMP_Session_pm,v 1.1 2010/02/26 23:00:56 sthen Exp $ +--- lib/SNMP_Session.pm.orig Fri Jan 8 23:23:52 2010 ++++ lib/SNMP_Session.pm Fri Jan 8 23:24:48 2010 +@@ -146,7 +146,7 @@ BEGIN { + + 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)); + $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1"))); + $SNMP_Session::ipv6available = 1; + } +@@ -605,7 +605,7 @@ use Carp; + BEGIN { + if($SNMP_Session::ipv6available) { + import IO::Socket::INET6; +- import Socket6; ++ Socket6->import(qw(pack_sockaddr_in6 inet_pton)); + } + } + diff --git a/net/p5-SNMP_Session/pkg/PLIST b/net/p5-SNMP_Session/pkg/PLIST index 0b78f1bfb65..e06d7942778 100644 --- a/net/p5-SNMP_Session/pkg/PLIST +++ b/net/p5-SNMP_Session/pkg/PLIST @@ -1,4 +1,5 @@ -@comment $OpenBSD: PLIST,v 1.5 2004/09/15 18:17:44 espie Exp $ +@comment $OpenBSD: PLIST,v 1.6 2010/02/26 23:00:56 sthen Exp $ ${P5SITE}/BER.pm ${P5SITE}/SNMP_Session.pm +@comment ${P5SITE}/SNMP_Session.pm.orig ${P5SITE}/SNMP_util.pm