diff options
author | Kent Fredric <kentnl@gentoo.org> | 2017-12-27 17:06:01 +1300 |
---|---|---|
committer | Kent Fredric <kentnl@gentoo.org> | 2017-12-27 21:09:55 +1300 |
commit | 70704a718493665e7734926677b5001d8ee1c446 (patch) | |
tree | 97321c77379c5a40caa52ef71449462bb94c10b5 /dev-perl/Perl-Critic-Dynamic | |
parent | dev-perl/ParaDNS: EAPI6 + tests (diff) | |
download | gentoo-70704a718493665e7734926677b5001d8ee1c446.tar.gz gentoo-70704a718493665e7734926677b5001d8ee1c446.tar.bz2 gentoo-70704a718493665e7734926677b5001d8ee1c446.zip |
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
Diffstat (limited to 'dev-perl/Perl-Critic-Dynamic')
-rw-r--r-- | dev-perl/Perl-Critic-Dynamic/Perl-Critic-Dynamic-0.50.0-r2.ebuild | 22 | ||||
-rw-r--r-- | dev-perl/Perl-Critic-Dynamic/files/Perl-Critic-Dynamic-0.05-test-cgi.patch | 70 |
2 files changed, 92 insertions, 0 deletions
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 000000000000..53716cb24782 --- /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 000000000000..28b40ede53cc --- /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 + |