commit:     2b1fb180623644ac8747e08e5255840f672d65c9
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  8 22:44:58 2017 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Thu Jun  8 23:11:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b1fb180

dev-perl/Sys-Virt: Patch for '.' in @INC re bug #613584

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  |  4 ++--
 dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild  |  4 ++--
 dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild  |  4 ++--
 dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild  |  3 ++-
 dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild  |  2 +-
 dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild  |  2 +-
 dev-perl/Sys-Virt/files/no-dot-inc.patch | 40 ++++++++++++++++++++++++++++++++
 7 files changed, 50 insertions(+), 9 deletions(-)

diff --git a/dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild 
b/dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild
index edb51e30888..2bd597183f3 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-1.1.2.ebuild
@@ -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() {

diff --git a/dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild 
b/dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild
index 5f7a4c1f157..c1ce63b56f7 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-1.2.9.ebuild
@@ -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() {

diff --git a/dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild 
b/dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild
index 2bafb9acf3d..e94a68225d5 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-1.3.2.ebuild
@@ -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
 }

diff --git a/dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild 
b/dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild
index 90d881f1219..2b6b7c959e2 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-2.4.0.ebuild
@@ -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

diff --git a/dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild 
b/dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild
index 6755aa7e83b..7cdc0637c82 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-2.5.0.ebuild
@@ -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/Sys-Virt-3.1.0.ebuild 
b/dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild
index 6755aa7e83b..7cdc0637c82 100644
--- a/dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild
+++ b/dev-perl/Sys-Virt/Sys-Virt-3.1.0.ebuild
@@ -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
index 00000000000..b2b05c3e711
--- /dev/null
+++ b/dev-perl/Sys-Virt/files/no-dot-inc.patch
@@ -0,0 +1,40 @@
+From b04fcc43f602d865f9f5d4fdf90de47943e0027b Mon Sep 17 00:00:00 2001
+From: Kent Fredric <[email protected]>
+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
+

Reply via email to