commit: df397e61bfc2cb913c6a570bb6563cc2fb40a427
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 27 03:29:07 2017 +0000
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Wed Dec 27 08:09:54 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df397e61
dev-perl/ParaDNS: EAPI6 + tests
- EAPI6ify
- Enable tests
- Fix compatibility with newer Net-DNS
- Fence tests under networkless environments
Package-Manager: Portage-2.3.18, Repoman-2.3.6
dev-perl/ParaDNS/ParaDNS-2.0.0-r2.ebuild | 23 ++++++++++++
.../ParaDNS/files/ParaDNS-2.0-net-dns-compat.patch | 42 ++++++++++++++++++++++
.../ParaDNS/files/ParaDNS-2.0-no-network.patch | 38 ++++++++++++++++++++
3 files changed, 103 insertions(+)
diff --git a/dev-perl/ParaDNS/ParaDNS-2.0.0-r2.ebuild
b/dev-perl/ParaDNS/ParaDNS-2.0.0-r2.ebuild
new file mode 100644
index 00000000000..f3972769635
--- /dev/null
+++ b/dev-perl/ParaDNS/ParaDNS-2.0.0-r2.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=MSERGEANT
+DIST_VERSION=2.0
+inherit perl-module
+
+DESCRIPTION="a DNS lookup class for the Danga::Socket framework"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-perl/Net-DNS
+ >=dev-perl/Danga-Socket-1.61"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0-net-dns-compat.patch"
+ "${FILESDIR}/${PN}-2.0-no-network.patch"
+)
diff --git a/dev-perl/ParaDNS/files/ParaDNS-2.0-net-dns-compat.patch
b/dev-perl/ParaDNS/files/ParaDNS-2.0-net-dns-compat.patch
new file mode 100644
index 00000000000..9e35d75e375
--- /dev/null
+++ b/dev-perl/ParaDNS/files/ParaDNS-2.0-net-dns-compat.patch
@@ -0,0 +1,42 @@
+From 0edb7527fb17c313c17c1c2572d9c454040677a2 Mon Sep 17 00:00:00 2001
+From: Andy Jones <[email protected]>
+Date: Thu, 28 Aug 2014 15:37:01 +0100
+Subject: Support newer Net::DNS::Resolver
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=98386
+---
+ lib/ParaDNS/Resolver.pm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/ParaDNS/Resolver.pm b/lib/ParaDNS/Resolver.pm
+index e147602..1a3f5dd 100644
+--- a/lib/ParaDNS/Resolver.pm
++++ b/lib/ParaDNS/Resolver.pm
+@@ -40,7 +40,7 @@ sub new {
+ }
+ }
+ else {
+- foreach my $ns (@{ $res->{nameservers} }) {
++ foreach my $ns ( $res->nameservers ) {
+ trace(2, "Using nameserver $ns:$res->{port}\n");
+ my $dst_sockaddr = sockaddr_in($res->{'port'}, inet_aton($ns));
+ push @{$self->{dst}}, $dst_sockaddr;
+@@ -216,7 +216,6 @@ sub event_read {
+ my $res = $self->{res};
+
+ while (my $packet = $res->bgread($sock)) {
+- my $err = $res->errorstring;
+ my $answers = 0;
+ my $header = $packet->header;
+ my $id = $header->id;
+@@ -278,6 +277,7 @@ sub event_read {
+ $answers++;
+ }
+ if (!$answers) {
++ my $err = $res->errorstring || $packet->header->rcode;
+ if ($err eq "NXDOMAIN") {
+ # trace("found => NXDOMAIN\n");
+ $qobj->run_callback("NXDOMAIN");
+--
+2.15.1
+
diff --git a/dev-perl/ParaDNS/files/ParaDNS-2.0-no-network.patch
b/dev-perl/ParaDNS/files/ParaDNS-2.0-no-network.patch
new file mode 100644
index 00000000000..5103230cc53
--- /dev/null
+++ b/dev-perl/ParaDNS/files/ParaDNS-2.0-no-network.patch
@@ -0,0 +1,38 @@
+From 257b6b9764858cdbca2e0d6b95e688bb92ae0b05 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <[email protected]>
+Date: Wed, 27 Dec 2017 16:19:05 +1300
+Subject: Fence for NO_NETWORK_TESTING
+
+---
+ t/00basic.t | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/t/00basic.t b/t/00basic.t
+index e9ceaf5..108e0ec 100644
+--- a/t/00basic.t
++++ b/t/00basic.t
+@@ -1,10 +1,15 @@
+ #!/usr/bin/perl -w
+
+-use Test::More tests => 5;
++
++use Test::More tests => 6;
+
+ $|++;
+
+ use_ok('ParaDNS');
++use_ok('ParaDNS::Resolver');
++
++SKIP: {
++ skip "NO_NETWORK_TESTING set", 4 if $ENV{NO_NETWORK_TESTING};
+
+ my $done = 0;
+
+@@ -59,3 +64,4 @@ ParaDNS->new(
+
+ Danga::Socket->EventLoop;
+
++}
+--
+2.15.1
+