commit: c77acfef489852261a5ea68d251b384d31d21786
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 09:01:04 2017 +0000
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Sat Dec 16 10:53:08 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c77acfef
dev-perl/Net-SNPP: EAPI6 + tests + Bugfix
- EAPI6ify
- Enable tests
- Add patch for RT#111013 exposed by adding tests
Package-Manager: Portage-2.3.18, Repoman-2.3.6
dev-perl/Net-SNPP/Net-SNPP-1.170.0-r2.ebuild | 19 ++++++++++
.../files/Net-SNPP-1.17-dummy-timeout.patch | 42 ++++++++++++++++++++++
2 files changed, 61 insertions(+)
diff --git a/dev-perl/Net-SNPP/Net-SNPP-1.170.0-r2.ebuild
b/dev-perl/Net-SNPP/Net-SNPP-1.170.0-r2.ebuild
new file mode 100644
index 00000000000..254e516e451
--- /dev/null
+++ b/dev-perl/Net-SNPP/Net-SNPP-1.170.0-r2.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=TOBEYA
+DIST_VERSION=1.17
+DIST_EXAMPLES=( "bin/*" )
+inherit perl-module
+
+DESCRIPTION="libnet SNPP component"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="virtual/perl-libnet"
+DEPEND="${RDEPEND}"
+PATCHES=("${FILESDIR}/${PN}-1.17-dummy-timeout.patch")
diff --git a/dev-perl/Net-SNPP/files/Net-SNPP-1.17-dummy-timeout.patch
b/dev-perl/Net-SNPP/files/Net-SNPP-1.17-dummy-timeout.patch
new file mode 100644
index 00000000000..6b952e6643c
--- /dev/null
+++ b/dev-perl/Net-SNPP/files/Net-SNPP-1.17-dummy-timeout.patch
@@ -0,0 +1,42 @@
+From bf788b84b81d244912c4d729d21fb5fa6b131ecd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
+Date: Mon, 18 Jan 2016 14:33:00 +0100
+Subject: Define dummy Net::SNPP::Server->timeout
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Since libnet-3.08, Net::Cmd subclasses should provide timeout()
+method. Otherwise tests fail like in CPAN RT#111013. See #110978.
+
+This patch returns static 0 value because the first timeout() argument
+is not an object reference. This is probably because Net::SNPP::Server
+does not subclass Net::Cmd properly. See libnet's t/datasend.t for
+example.
+
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=111013
+Signed-off-by: Petr Písař <[email protected]>
+---
+ lib/Net/SNPP/Server.pm | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/lib/Net/SNPP/Server.pm b/lib/Net/SNPP/Server.pm
+index 5cb999f..1482ca7 100644
+--- a/lib/Net/SNPP/Server.pm
++++ b/lib/Net/SNPP/Server.pm
+@@ -129,6 +129,12 @@ sub new {
+ return bless( $self, $class );
+ }
+
++# Required by Net::Cmd, CPAN RT#111013, #110978
++sub timeout {
++ # The $_[0] is not an object reference, cannot use $self->{Timeout}
++ 0;
++}
++
+ =item client()
+
+ Calls accept() for you and returns a client handle. This method
+--
+2.15.1
+