summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Fredric <kentnl@gentoo.org>2020-07-08 00:00:12 +1200
committerKent Fredric <kentnl@gentoo.org>2020-07-08 00:00:45 +1200
commitb33708c82c512b98ac90631edbc10a4bcb06cce6 (patch)
treed8d6d6d4da2eb329e846791f5be8628f8bb14717 /dev-perl
parentwww-servers/tomcat: bump to 9.0.37 (diff)
downloadgentoo-b33708c82c512b98ac90631edbc10a4bcb06cce6.tar.gz
gentoo-b33708c82c512b98ac90631edbc10a4bcb06cce6.tar.bz2
gentoo-b33708c82c512b98ac90631edbc10a4bcb06cce6.zip
dev-perl/Devel-NYTProf: -r bump fix for bug #724506
- EAPI7 - Add subslot deps for zlib - Ensure CFLAGS passed to make/compiler - Fix problem introduced by -Dcpp=$(tc-getCPP) in dev-lang/perl where Devel-NYTProf incorrectly uses $Config{cpp} instead of $Config{cpprun}, which results in trying to invoke $GCC to pre-process headers for grep-based feature detection, where it *SHOULD* be invoking "$GCC -E", which in turn, leads to trying to compile system headers and in turn, writing precompiled headers to /usr/include, tripping a sandbox violation. Bug: https://bugs.gentoo.org/724506 Bug: https://github.com/timbunce/devel-nytprof/issues/139 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Kent Fredric <kentnl@gentoo.org>
Diffstat (limited to 'dev-perl')
-rw-r--r--dev-perl/Devel-NYTProf/Devel-NYTProf-6.60.0-r1.ebuild56
-rw-r--r--dev-perl/Devel-NYTProf/files/Devel-NYTProf-6.06-cpprun.patch36
-rw-r--r--dev-perl/Devel-NYTProf/metadata.xml1
3 files changed, 93 insertions, 0 deletions
diff --git a/dev-perl/Devel-NYTProf/Devel-NYTProf-6.60.0-r1.ebuild b/dev-perl/Devel-NYTProf/Devel-NYTProf-6.60.0-r1.ebuild
new file mode 100644
index 000000000000..9771cb81e12c
--- /dev/null
+++ b/dev-perl/Devel-NYTProf/Devel-NYTProf-6.60.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DIST_AUTHOR=TIMB
+DIST_VERSION=6.06
+DIST_EXAMPLES=("demo/*")
+inherit perl-module toolchain-funcs
+
+DESCRIPTION="Powerful feature-rich perl source code profiler"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-perl/File-Which-1.90.0
+ virtual/perl-Getopt-Long
+ dev-perl/JSON-MaybeXS
+ virtual/perl-Scalar-List-Utils
+ virtual/perl-XSLoader
+ sys-libs/zlib:0=
+"
+DEPEND="
+ sys-libs/zlib:0=
+"
+BDEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-MakeMaker
+ test? (
+ >=virtual/perl-Test-Simple-0.840.0
+ >=dev-perl/Test-Differences-0.60.0
+ )
+"
+PERL_RM_FILES=(
+ t/68-hashline.t
+ t/71-moose.t
+ t/72-autodie.t
+ t/90-pod.t
+ t/91-pod_coverage.t
+ t/92-file_port.t
+)
+PATCHES=(
+ "${FILESDIR}/${PN}-6.06-cpprun.patch"
+)
+src_configure() {
+ tc-export CPP
+ perl-module_src_configure
+}
+src_compile() {
+ mymake=(
+ "OPTIMIZE=${CFLAGS}"
+ )
+ perl-module_src_compile
+}
diff --git a/dev-perl/Devel-NYTProf/files/Devel-NYTProf-6.06-cpprun.patch b/dev-perl/Devel-NYTProf/files/Devel-NYTProf-6.06-cpprun.patch
new file mode 100644
index 000000000000..786a525a7dcf
--- /dev/null
+++ b/dev-perl/Devel-NYTProf/files/Devel-NYTProf-6.06-cpprun.patch
@@ -0,0 +1,36 @@
+From aaa04b28c99e0d2bf244dbcb274b4df6fe6fa50d Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Tue, 7 Jul 2020 23:08:00 +1200
+Subject: Allow CPP override in ENV
+
+When Perl is built with -Dcpp="$(gc-getCPP)", the end result is:
+
+- $Config{cpp} = "${CHOST}-gcc"
+- $Config{cpprun} = "${CHOST}-gcc -E"
+
+And of course, Devel-NYTProf uses the former, and so it tries to compile
+the damn header instead of just preprocessing it.
+
+This provides a correction, and an override.
+
+Bug: https://github.com/timbunce/devel-nytprof/issues/139
+---
+ Makefile.PL | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 60025de..6786e29 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -59,7 +59,7 @@ utime time(), time(), "t/test40pmc.pmc"
+
+ # --- Discover how much of stdio is implemented
+
+-my $cpp = $Config{cpp} || do {
++my $cpp = $ENV{CPP} || $Config{cpprun} || do {
+ warn "Warning: cpp not found in your perl config. Falling back to 'cat'\n";
+ 'cat';
+ };
+--
+2.27.0
+
diff --git a/dev-perl/Devel-NYTProf/metadata.xml b/dev-perl/Devel-NYTProf/metadata.xml
index c4728df9c2ea..ccc473b06396 100644
--- a/dev-perl/Devel-NYTProf/metadata.xml
+++ b/dev-perl/Devel-NYTProf/metadata.xml
@@ -20,5 +20,6 @@
<remote-id type="cpan-module">Devel::NYTProf::SubCallInfo</remote-id>
<remote-id type="cpan-module">Devel::NYTProf::SubInfo</remote-id>
<remote-id type="cpan-module">Devel::NYTProf::Util</remote-id>
+ <remote-id type="cpan-module">SVG</remote-id>
</upstream>
</pkgmetadata>