summaryrefslogtreecommitdiff
path: root/dev-perl/Template-Toolkit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-16 17:34:21 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-16 17:34:21 +0000
commit02e2208f46f4e2c00fb9743cbc47350bdd233bfa (patch)
tree132dd60828854db4f65f30f9230f43d9602507ff /dev-perl/Template-Toolkit
parent8be70107efbb417f839292165ee39d07a062046f (diff)
gentoo resync : 16.01.2018
Diffstat (limited to 'dev-perl/Template-Toolkit')
-rw-r--r--dev-perl/Template-Toolkit/Manifest3
-rw-r--r--dev-perl/Template-Toolkit/Template-Toolkit-2.270.0-r1.ebuild49
-rw-r--r--dev-perl/Template-Toolkit/files/Template-Toolkit-2.27-cgipm.patch66
-rw-r--r--dev-perl/Template-Toolkit/files/Template-Toolkit-2.27-no-dot-inc.patch54
4 files changed, 172 insertions, 0 deletions
diff --git a/dev-perl/Template-Toolkit/Manifest b/dev-perl/Template-Toolkit/Manifest
index bc5ccdd5e44a..36ede4830712 100644
--- a/dev-perl/Template-Toolkit/Manifest
+++ b/dev-perl/Template-Toolkit/Manifest
@@ -1,5 +1,8 @@
+AUX Template-Toolkit-2.27-cgipm.patch 1819 BLAKE2B 06c8fa20721a0d68576b5c8883eb2f0c85af72e84bbdd7bc2deb721576d8ee453dbb0b3ea9e9d770604fb916538b9067f3e3311b176558309160c705068aa305 SHA512 d7927a35a3d287ad2a515cedb01f9f80fa9d23293b694fb03b59b18b159f4c4584b9ce8870d8d4b9c56d9f1c28c624e918332d668c0c375167b44f783229a9e4
+AUX Template-Toolkit-2.27-no-dot-inc.patch 1987 BLAKE2B feaae674dd01ef2d7ae7c1a660c838b69d3b1fcc07b735a66dbab2bb6d27c7ea1916c3bb2855b7f8d566f3516874925ca2a23f20cf2f9258aa1a7bcec8d46f1b SHA512 e7ce9167bc2ecc648efb0e021f1481c63093cb9a8f42492c081200938e075dc272eeaef903e1cd14b4f81407037d8d5dce43f7f04d113dd01c4f24516ce93b19
DIST Template-Toolkit-2.26.tar.gz 503055 BLAKE2B 1d95cb4ab427621e1648df657ea516183650d05dfcd249f23b38aa8964598090b7ff564017694d070622606d883745a44ed7ce7141c99e11ac785e937a7afbb6 SHA512 97e49392542e240840b44f0d78ea601afb26a6675f76faa9765c158820d596308a7f35057bf347d51a86a5f9134dfd4a02ce7a80b47a98b9bdbca68fff9146d6
DIST Template-Toolkit-2.27.tar.gz 511172 BLAKE2B 62ffce1fe5679799afff6b3865882c91e70efeb2ec14474f3b49bdf35bd64f7ce4439d5c58ddd73bad26589816d2f24f4691a02c69405fb6b6b604d28edee4e2 SHA512 17f03a01a3d6ab0ef2247c77da15c46d9bbce3e0158172162da6abe47f53c5e7ca041a7c31506bb3a37f31c476ba747f5111c5b1b1d69614a4ce3352927fd4e6
EBUILD Template-Toolkit-2.260.0.ebuild 809 BLAKE2B d85dcd78014e419981572297a6b79300eab3ff0a1a80bd5d47c7e78a6ac87d4d7f2f670148927bbe7ee2b177b6b61d779ca5f41a9b829e1bd9f5a8bdd96cbc6f SHA512 bbd47bd6183d54dd9437222a235a1ceff4acdbe58c0f90a8afa87a9cf3394ed2c50cb2e7c6ad731dd5872c86a9ade6d77046415e3d50e293b4eaffe963f449e8
+EBUILD Template-Toolkit-2.270.0-r1.ebuild 1047 BLAKE2B 98dd90353748ecb9b3cdf32e65aaf24d5d9b51325423019712cd12ce51e3321141382a0693c9d99ef07108ada932ff70ffbed8a23b418a0c915b4ae4259c1113 SHA512 952147351c2b02b695c4420570fb753d9715c8500a4dd62c0841b28a3118acfbc254df2bbe42f74e511f9815a78b3e14165781279570752705bfc4e2559cfbc3
EBUILD Template-Toolkit-2.270.0.ebuild 927 BLAKE2B 9affb714afc2b63b8d8e36361c0c0c11d07f13794582fb160f865941b0d5f78e180a7549c6576c8ab716c12ceac69b37b84eb29d91192c42ad2b038ecc17f118 SHA512 9fb01cf3500a543e06ee7dac1fd1efe01d651da5d20deb6bd8a2883b8d6d8b9c0087488e985f7725d3102d8fcbf176ab4dc071f584f1efd37c338ad73245eb8e
MISC metadata.xml 3834 BLAKE2B 0d0cd7506fc2864b9e26a1d580c53931016006ed82e6a788a474f80b490e780da32e07855778bad14ff4b8c444d8e79f6a42a71013bed0db95d0ba8a14f395b7 SHA512 34d9afc89acd0a65724c1af1f5720b15665fcaf06e25db62210bf8fe7dc7c6e83009c0ba6c346821d320de5587cc678c921d0982d3ca317633a6c049ffeee1e7
diff --git a/dev-perl/Template-Toolkit/Template-Toolkit-2.270.0-r1.ebuild b/dev-perl/Template-Toolkit/Template-Toolkit-2.270.0-r1.ebuild
new file mode 100644
index 000000000000..5823e2648c95
--- /dev/null
+++ b/dev-perl/Template-Toolkit/Template-Toolkit-2.270.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=ABW
+DIST_VERSION=2.27
+inherit perl-module
+
+DESCRIPTION="The Template Toolkit"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~ppc-aix ~x86-fbsd ~x86-solaris"
+IUSE="xml gd mysql postgres latex vim-syntax test"
+
+RDEPEND="dev-perl/Text-Autoformat
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ >=dev-perl/AppConfig-1.56"
+DEPEND="${RDEPEND}
+ test? ( dev-perl/CGI )
+"
+PDEPEND="dev-perl/Text-Autoformat
+ vim-syntax? ( app-vim/tt2-syntax )
+ xml? ( dev-perl/Template-XML )
+ gd? ( dev-perl/Template-GD )
+ mysql? ( dev-perl/Template-DBI )
+ latex? ( dev-perl/Template-Plugin-Latex )
+ postgres? ( dev-perl/Template-DBI )"
+
+myconf=(
+ TT_XS_ENABLE=y
+ TT_XS_DEFAULT=y
+ TT_QUIET=y
+ TT_ACCEPT=y
+)
+
+PERL_RM_FILES=(
+ t/zz-plugin-leak.t
+ t/zz-pmv.t
+ t/zz-pod-coverage.t
+ t/zz-pod-kwalitee.t
+ t/zz-stash-xs-leak.t
+ t/zz-url2.t
+)
+PATCHES=(
+ "${FILESDIR}/${PN}-2.27-no-dot-inc.patch"
+ "${FILESDIR}/${PN}-2.27-cgipm.patch"
+)
diff --git a/dev-perl/Template-Toolkit/files/Template-Toolkit-2.27-cgipm.patch b/dev-perl/Template-Toolkit/files/Template-Toolkit-2.27-cgipm.patch
new file mode 100644
index 000000000000..422cc851838f
--- /dev/null
+++ b/dev-perl/Template-Toolkit/files/Template-Toolkit-2.27-cgipm.patch
@@ -0,0 +1,66 @@
+From e723aeecf60ece32f6a1381f5c026ae08cae9913 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Sat, 13 Jan 2018 13:48:31 +1300
+Subject: Fix tests warning w/ CGI.pm
+
+This currently seems like an intractable problem with the syntax of
+Template::Toolkit forcing list context by default on called functions.
+
+The only real way around this is to either:
+
+A) always use Template::Plugin::Scalar to enforce scalar context
+B) abuse cgi.multi_param to simply silence the warning and being an
+ adult about the fact "yes, this returns a list, make sure you do the
+ right thing with that"
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=100503
+---
+ t/cgi.t | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/t/cgi.t b/t/cgi.t
+index 023ab5ab..6086e145 100644
+--- a/t/cgi.t
++++ b/t/cgi.t
+@@ -49,28 +49,32 @@ sub barf {
+
+ __END__
+ -- test --
++[% USE scalar -%]
+ [% USE cgi = CGI('id=abw&name=Andy+Wardley'); global.cgi = cgi -%]
+-name: [% global.cgi.param('name') %]
++name: [% global.cgi.scalar.param('name') %]
+ -- expect --
+ name: Andy Wardley
+
+ -- test --
+-name: [% global.cgi.param('name') %]
++[% USE scalar -%]
++name: [% global.cgi.scalar.param('name') %]
+
+ -- expect --
+ name: Andy Wardley
+
+ -- test --
+-[% FOREACH key = global.cgi.param.sort -%]
+- * [% key %] : [% global.cgi.param(key) %]
++[% USE scalar -%]
++[% FOREACH key = global.cgi.multi_param.sort -%]
++ * [% key %] : [% global.cgi.scalar.param(key) %]
+ [% END %]
+ -- expect --
+ * id : abw
+ * name : Andy Wardley
+
+ -- test --
+-[% FOREACH key = global.cgi.param().sort -%]
+- * [% key %] : [% global.cgi.param(key) %]
++[% USE scalar -%]
++[% FOREACH key = global.cgi.multi_param().sort -%]
++ * [% key %] : [% global.cgi.scalar.param(key) %]
+ [% END %]
+ -- expect --
+ * id : abw
+--
+2.15.1
+
diff --git a/dev-perl/Template-Toolkit/files/Template-Toolkit-2.27-no-dot-inc.patch b/dev-perl/Template-Toolkit/files/Template-Toolkit-2.27-no-dot-inc.patch
new file mode 100644
index 000000000000..97decd75cb14
--- /dev/null
+++ b/dev-perl/Template-Toolkit/files/Template-Toolkit-2.27-no-dot-inc.patch
@@ -0,0 +1,54 @@
+From 65e7f0e980e64dd0525eda058330cea06379c332 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Sat, 13 Jan 2018 13:05:52 +1300
+Subject: Fix relative path handling in templates on Perl 5.26+
+
+NB: It doesn't seem like the value of "$compiled" is very useful in the
+failure case, as the expectation is that'd have been a falsey value at
+best, or a literal "undef" at worst, yeilding additional warnings.
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=121171
+Bug: https://bugs.gentoo.org/615704
+---
+ lib/Template/Provider.pm | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Template/Provider.pm b/lib/Template/Provider.pm
+index 6ecb2453..61c3469c 100644
+--- a/lib/Template/Provider.pm
++++ b/lib/Template/Provider.pm
+@@ -562,13 +562,29 @@ sub _compiled_filename {
+
+ sub _load_compiled {
+ my ($self, $file) = @_;
++
++ # Implicitly Relative paths are not supported
++ # by "require" and invoke @INC traversal, where relative
++ # paths only traditionally worked prior to Perl 5.26
++ # due to the presence of '.' in @INC
++ #
++ # Given load_compiled never wants to traverse @INC, forcing
++ # an absolute path for the loaded file and the INC key is
++ # sensible.
++ #
++ # NB: %INC Keys are always identical to their respective
++ # "require" invocations regardless of OS, and the only time
++ # one needs to care about slash direction is when dealing
++ # with Module::Name -> Module/Name.pm translation.
++ my $fpath = File::Spec->rel2abs( $file );
++
+ my $compiled;
+
+ # load compiled template via require(); we zap any
+ # %INC entry to ensure it is reloaded (we don't
+ # want 1 returned by require() to say it's in memory)
+- delete $INC{ $file };
+- eval { $compiled = require $file; };
++ delete $INC{ $fpath };
++ eval { $compiled = require $fpath; };
+ return $@
+ ? $self->error("compiled template $compiled: $@")
+ : $compiled;
+--
+2.15.1
+