dev-perl/Sys-Virt: Patch for '.' in @INC re bug #613584
authorKent Fredric <kentnl@gentoo.org>
Thu, 8 Jun 2017 22:44:58 +0000 (10:44 +1200)
committerKent Fredric <kentnl@gentoo.org>
Thu, 8 Jun 2017 23:11:29 +0000 (11:11 +1200)
This patches configure on all versions so that the "do $file" line
still works as upstream intended on Perl 5.26

Bug: https://bugs.gentoo.org/613584
Package-Manager: Portage-2.3.6, Repoman-2.3.2

dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild
dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild
dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild
dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild
dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild
dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild
dev-perl/Sys-Virt/files/no-dot-inc.patch [new file with mode: 0644]

index edb51e30888f9abf5466914b9a306db39f96f5cc..2bd597183f399e4eee2bc0337690d706aee195f6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -20,7 +20,7 @@ DEPEND="${RDEPEND}
                dev-perl/XML-XPath
                virtual/perl-Time-HiRes
        )"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 SRC_TEST="do"
 
 src_compile() {
index 5f7a4c1f157a7fdc23cf786373ede3f3ea7c85d8..c1ce63b56f79b8d75c228dab202a589087a1d323 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -20,7 +20,7 @@ DEPEND="${RDEPEND}
                dev-perl/XML-XPath
                virtual/perl-Time-HiRes
        )"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 SRC_TEST="do"
 
 src_compile() {
index 2bafb9acf3d9108bfca925f0b2d60c973dff2b9b..e94a68225d52e31bcf246c79b70cd2281819e4e0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -19,7 +19,7 @@ DEPEND="${RDEPEND}
                dev-perl/XML-XPath
                virtual/perl-Time-HiRes
        )"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 src_compile() {
        MAKEOPTS+=" -j1" perl-module_src_compile
 }
index 90d881f1219e2418557a489207c9edce8bb8c029..2b6b7c959e20a58cb66e62b00c99c52a9059d4c6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -20,6 +20,7 @@ DEPEND="${RDEPEND}
                dev-perl/XML-XPath
                virtual/perl-Time-HiRes
        )"
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 
 src_compile() {
        MAKEOPTS+=" -j1" perl-module_src_compile
index 6755aa7e83b8634d45c02559da90f94f06b187e2..7cdc0637c82674d94ac3d326bd98c045b0d82581 100644 (file)
@@ -20,7 +20,7 @@ DEPEND="${RDEPEND}
                dev-perl/XML-XPath
                virtual/perl-Time-HiRes
        )"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 src_compile() {
        MAKEOPTS+=" -j1" perl-module_src_compile
 }
index 6755aa7e83b8634d45c02559da90f94f06b187e2..7cdc0637c82674d94ac3d326bd98c045b0d82581 100644 (file)
@@ -20,7 +20,7 @@ DEPEND="${RDEPEND}
                dev-perl/XML-XPath
                virtual/perl-Time-HiRes
        )"
-
+PATCHES=( "${FILESDIR}/no-dot-inc.patch" )
 src_compile() {
        MAKEOPTS+=" -j1" perl-module_src_compile
 }
diff --git a/dev-perl/Sys-Virt/files/no-dot-inc.patch b/dev-perl/Sys-Virt/files/no-dot-inc.patch
new file mode 100644 (file)
index 0000000..b2b05c3
--- /dev/null
@@ -0,0 +1,40 @@
+From b04fcc43f602d865f9f5d4fdf90de47943e0027b Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentfredric@gmail.com>
+Date: Fri, 9 Jun 2017 10:19:57 +1200
+Subject: [PATCH] Fix spec.PL for Perl 5.26 '.' removal from @INC
+
+Perl 5.26 removes '.' from @INC, and this breaks the semantics
+of <<do $file>> where $file was assumed to be loaded from '.',
+but not explicitly stated, as 'do' is implemented using the same code
+as "require", that is, assuming @INC traversal.
+
+Inserting a leading "./" forces do to use a special-cased path
+where @INC is not consulted.
+
+Fixes RT#120697
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=120697
+---
+ perl-Sys-Virt.spec.PL | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/perl-Sys-Virt.spec.PL b/perl-Sys-Virt.spec.PL
+index aa3f6fc..d2d687c 100644
+--- a/perl-Sys-Virt.spec.PL
++++ b/perl-Sys-Virt.spec.PL
+@@ -6,10 +6,10 @@ use strict;
+ 
+ die unless (scalar @ARGV == 1);
+ 
+-unless (do 'lib/Sys/Virt.pm')
++unless (do './lib/Sys/Virt.pm')
+   {
+     if ($@) { die $@ };
+-    die "lib/Sys/Virt.pm: $!";
++    die "./lib/Sys/Virt.pm: $!";
+   }
+ 
+ local $/ = undef;
+-- 
+2.13.1
+