From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 160AD1396D9 for ; Wed, 25 Oct 2017 19:49:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36EBB2BC03A; Wed, 25 Oct 2017 19:49:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 072602BC03A for ; Wed, 25 Oct 2017 19:49:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C26633BF44 for ; Wed, 25 Oct 2017 19:49:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B3B2F31A for ; Wed, 25 Oct 2017 19:49:04 +0000 (UTC) From: "Kent Fredric" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" Message-ID: <1508960935.5607df38997c6992798a115b4aefbcd96cb17b5f.kentnl@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/HTML-Template-JIT/, dev-perl/HTML-Template-JIT/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-perl/HTML-Template-JIT/HTML-Template-JIT-0.50.0-r2.ebuild dev-perl/HTML-Template-JIT/files/HTML-Template-JIT-0.50.0-no-dot-inc.patch X-VCS-Directories: dev-perl/HTML-Template-JIT/ dev-perl/HTML-Template-JIT/files/ X-VCS-Committer: kentnl X-VCS-Committer-Name: Kent Fredric X-VCS-Revision: 5607df38997c6992798a115b4aefbcd96cb17b5f X-VCS-Branch: master Date: Wed, 25 Oct 2017 19:49:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c1dfac88-53f5-4bc0-8e80-b9b667a2db5c X-Archives-Hash: cb1dffab0c3c64f2ca5b09ad79650559 commit: 5607df38997c6992798a115b4aefbcd96cb17b5f Author: Kent Fredric gentoo org> AuthorDate: Wed Oct 25 19:48:35 2017 +0000 Commit: Kent Fredric gentoo org> CommitDate: Wed Oct 25 19:48:55 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5607df38 dev-perl/HTML-Template-JIT: Fix for '.' in @INC bug #635464 - EAPI6 - Enable tests - Add USE=examples - Fix runtime broken due to '.' in @INC exposed by enabling tests Bug: https://bugs.gentoo.org/635464 Package-Manager: Portage-2.3.8, Repoman-2.3.3 .../HTML-Template-JIT-0.50.0-r2.ebuild | 20 +++++++ .../HTML-Template-JIT-0.50.0-no-dot-inc.patch | 61 ++++++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/dev-perl/HTML-Template-JIT/HTML-Template-JIT-0.50.0-r2.ebuild b/dev-perl/HTML-Template-JIT/HTML-Template-JIT-0.50.0-r2.ebuild new file mode 100644 index 00000000000..48f3e10a3e4 --- /dev/null +++ b/dev-perl/HTML-Template-JIT/HTML-Template-JIT-0.50.0-r2.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DIST_AUTHOR=SAMTREGAR +DIST_VERSION=0.05 +DIST_EXAMPLES=("script/benchmark.pl") +inherit perl-module + +DESCRIPTION="a just-in-time compiler for HTML::Template" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=">=dev-perl/HTML-Template-2.8 + dev-perl/Inline" +DEPEND="${RDEPEND}" +PATCHES=("${FILESDIR}/${P}-no-dot-inc.patch") diff --git a/dev-perl/HTML-Template-JIT/files/HTML-Template-JIT-0.50.0-no-dot-inc.patch b/dev-perl/HTML-Template-JIT/files/HTML-Template-JIT-0.50.0-no-dot-inc.patch new file mode 100644 index 00000000000..624e579a618 --- /dev/null +++ b/dev-perl/HTML-Template-JIT/files/HTML-Template-JIT-0.50.0-no-dot-inc.patch @@ -0,0 +1,61 @@ +From efbee2adfeb592240e1c84326ece8c90c239bbee Mon Sep 17 00:00:00 2001 +From: Kent Fredric +Date: Thu, 26 Oct 2017 08:26:53 +1300 +Subject: Fix compiling templates under Perl 5.26 without '.' in @INC + +Perl 5.26 changes the default contents of @INC to no longer include +".", which is required for "require q[foo.tpl]" semantics. + +This breakage is invisible in tests due to a workaround P5P put in +place to avoid breaking tests, by setting PERL_USE_UNSAFE_INC=1 in +Test::Harness and CPAN installers, which makes '.' re-appear in @INC +during installation, while still being silently broken in production. + +This fix works by relying on the mechanic of require() to *NOT* consult +@INC if $path is either an absolute, or a "./" prefixed relative path, +by converting it to an absolute path just before requiring it. + +Bug: https://rt.cpan.org/Ticket/Display.html?id=123380 +Bug: https://bugs.gentoo.org/635464 +--- + JIT.pm | 2 +- + JIT/Compiler.pm | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/JIT.pm b/JIT.pm +index 9e5a6be..1e2afc8 100644 +--- a/JIT.pm ++++ b/JIT.pm +@@ -63,7 +63,7 @@ sub new { + + # try to load the module and return package handle if successful + my $result; +- eval { $result = require $package_path; }; ++ eval { $result = require File::Spec->rel2abs($package_path); }; + if ($result) { + $package->clear_params(); # need to clear out params from prior run + return $package; +diff --git a/JIT/Compiler.pm b/JIT/Compiler.pm +index 6ef3e02..bc1e05f 100644 +--- a/JIT/Compiler.pm ++++ b/JIT/Compiler.pm +@@ -9,6 +9,7 @@ our $VERSION = '0.01'; + use HTML::Template; + use Carp qw(croak confess); + use File::Path qw(mkpath rmtree); ++use File::Spec; + + sub compile { + my %args = @_; +@@ -53,7 +54,7 @@ sub compile { + + # try to load the module and return package handle if successful + my $result; +- eval { $result = require $self->{package_path}; }; ++ eval { $result = require File::Spec->rel2abs($self->{package_path}); }; + return 1 if $result; + + # don't leave failed compiles lying around unless we're debuging +-- +2.14.3 +