mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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>
This commit is contained in:
56
dev-perl/Devel-NYTProf/Devel-NYTProf-6.60.0-r1.ebuild
Normal file
56
dev-perl/Devel-NYTProf/Devel-NYTProf-6.60.0-r1.ebuild
Normal file
@@ -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
|
||||
}
|
||||
36
dev-perl/Devel-NYTProf/files/Devel-NYTProf-6.06-cpprun.patch
Normal file
36
dev-perl/Devel-NYTProf/files/Devel-NYTProf-6.06-cpprun.patch
Normal file
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user