* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Perl-Critic-Dynamic/files/, dev-perl/Perl-Critic-Dynamic/
@ 2017-12-27 8:10 Kent Fredric
0 siblings, 0 replies; only message in thread
From: Kent Fredric @ 2017-12-27 8:10 UTC (permalink / raw
To: gentoo-commits
commit: 70704a718493665e7734926677b5001d8ee1c446
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 27 04:06:01 2017 +0000
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Wed Dec 27 08:09:55 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70704a71
dev-perl/Perl-Critic-Dynamic: EAPI6 + tests
- EAPI6ify
- Enable tests
- Fix test failures due to newer CGI.pm
Package-Manager: Portage-2.3.18, Repoman-2.3.6
.../Perl-Critic-Dynamic-0.50.0-r2.ebuild | 22 +++++++
.../files/Perl-Critic-Dynamic-0.05-test-cgi.patch | 70 ++++++++++++++++++++++
2 files changed, 92 insertions(+)
diff --git a/dev-perl/Perl-Critic-Dynamic/Perl-Critic-Dynamic-0.50.0-r2.ebuild b/dev-perl/Perl-Critic-Dynamic/Perl-Critic-Dynamic-0.50.0-r2.ebuild
new file mode 100644
index 00000000000..53716cb2478
--- /dev/null
+++ b/dev-perl/Perl-Critic-Dynamic/Perl-Critic-Dynamic-0.50.0-r2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=THALJEF
+DIST_VERSION=0.05
+inherit perl-module
+
+DESCRIPTION="Base class for dynamic Policies"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND="dev-perl/Perl-Critic
+ >=dev-perl/Devel-Symdump-2.08
+ dev-perl/Readonly"
+DEPEND="${RDEPEND}
+ dev-perl/Module-Build"
+
+PATCHES=( "${FILESDIR}/${PN}-0.05-test-cgi.patch" )
diff --git a/dev-perl/Perl-Critic-Dynamic/files/Perl-Critic-Dynamic-0.05-test-cgi.patch b/dev-perl/Perl-Critic-Dynamic/files/Perl-Critic-Dynamic-0.05-test-cgi.patch
new file mode 100644
index 00000000000..28b40ede53c
--- /dev/null
+++ b/dev-perl/Perl-Critic-Dynamic/files/Perl-Critic-Dynamic-0.05-test-cgi.patch
@@ -0,0 +1,70 @@
+From 42cd322ed7cc0b89692352ef5e78023bce71e865 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Thu, 9 Apr 2015 00:46:52 +1200
+Subject: Fix AUTOLOAD test
+
+CGI 4.14 stopped to use AUTOLOAD which caused failing tests. This patch
+provides private module with AUTOLOAD instead of relying on CGI.
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=103382
+---
+ t/Dynamic/ValidateAgainstSymbolTable.run | 11 ++++++-----
+ tlib/TestAutoload.pm | 12 ++++++++++++
+ 2 files changed, 18 insertions(+), 5 deletions(-)
+ create mode 100644 tlib/TestAutoload.pm
+
+diff --git a/t/Dynamic/ValidateAgainstSymbolTable.run b/t/Dynamic/ValidateAgainstSymbolTable.run
+index 493a9dd..5178922 100644
+--- a/t/Dynamic/ValidateAgainstSymbolTable.run
++++ b/t/Dynamic/ValidateAgainstSymbolTable.run
+@@ -336,23 +336,24 @@ use FooBar;
+ #-----------------------------------------------------------------------------
+
+ ## name AUTOLOADers ignored by default
++## parms { at_inc => 'tlib' }
+ ## failures 0
+ ## cut
+
+-use CGI; # Has 'sub AUTOLOAD {...}'
++use TestAutoload; # Has 'sub AUTOLOAD {...}'
+
+-CGI::FooBar();
++TestAutoload::FooBar();
+
+ #-----------------------------------------------------------------------------
+
+ ## name AUTOLOADers inspected on request
+-## parms { inspect_autoloaders => 1 }
++## parms { at_inc => 'tlib', inspect_autoloaders => 1 }
+ ## failures 1
+ ## cut
+
+-use CGI; # Has 'sub AUTOLOAD {...}'
++use TestAutoload; # Has 'sub AUTOLOAD {...}'
+
+-CGI::FooBar();
++TestAutoload::FooBar();
+
+
+ #-----------------------------------------------------------------------------
+diff --git a/tlib/TestAutoload.pm b/tlib/TestAutoload.pm
+new file mode 100644
+index 0000000..939f563
+--- /dev/null
++++ b/tlib/TestAutoload.pm
+@@ -0,0 +1,12 @@
++package TestAutoload;
++
++sub AUTOLOAD {
++ print "Autoloading <$AUTOLOAD>\n";
++ goto &foo;
++}
++
++sub foo {
++ print "foo() called\n";
++}
++
++1;
+--
+2.15.1
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-27 8:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-27 8:10 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Perl-Critic-Dynamic/files/, dev-perl/Perl-Critic-Dynamic/ Kent Fredric
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox