commit:     1ac951ab7b0ef38f9c851e9588e407c147ef05ff
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri May 17 21:18:05 2019 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri May 17 21:18:30 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ac951ab

dev-perl/Devel-SmallProf: Add perl-5.28 patch from RH

Closes: https://bugs.gentoo.org/661204
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 .../Devel-SmallProf-2.20.0-r4.ebuild               | 23 ++++++++++++
 .../files/Devel-SmallProf-2.20.0-perl528.patch     | 42 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)

diff --git a/dev-perl/Devel-SmallProf/Devel-SmallProf-2.20.0-r4.ebuild 
b/dev-perl/Devel-SmallProf/Devel-SmallProf-2.20.0-r4.ebuild
new file mode 100644
index 00000000000..cf2637c44aa
--- /dev/null
+++ b/dev-perl/Devel-SmallProf/Devel-SmallProf-2.20.0-r4.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=SALVA
+DIST_VERSION=2.02
+inherit perl-module
+
+DESCRIPTION="Per-line Perl profiler"
+
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE=""
+
+PATCHES=(
+       "${FILESDIR}/${P}-defined.patch"
+       "${FILESDIR}/${P}-perl526.patch"
+       "${FILESDIR}/${P}-perl528.patch"
+)
+# note: dont use parallel here
+# tests need each others exit state
+DIST_TEST="do"

diff --git 
a/dev-perl/Devel-SmallProf/files/Devel-SmallProf-2.20.0-perl528.patch 
b/dev-perl/Devel-SmallProf/files/Devel-SmallProf-2.20.0-perl528.patch
new file mode 100644
index 00000000000..3417fa00327
--- /dev/null
+++ b/dev-perl/Devel-SmallProf/files/Devel-SmallProf-2.20.0-perl528.patch
@@ -0,0 +1,42 @@
+From fd31925e40127b2f45518efbcee60ae7f2da30ae Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
+Date: Fri, 29 Jun 2018 13:27:51 +0200
+Subject: [PATCH] Remove DB::sub declaration
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Tests fail with Perl 5.28.0:
+
+t/part1.t .. No DB::sub routine defined at t/part1.t line 1.
+BEGIN failed--compilation aborted at t/part1.t line 2.
+
+SmallProf.pm contains DB::sub declaration without a
+corresponding definition with an exaplanation "even if it
+is not used it has to be declared!"
+
+If I remove the declaration, tests pass. Tests pass even on Perl
+5.26.2. It seems the hack is not needed anymore and it is even
+harmfull to Perl 5.28.0.
+
+Signed-off-by: Petr Písař <[email protected]>
+---
+ lib/Devel/SmallProf.pm | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/lib/Devel/SmallProf.pm b/lib/Devel/SmallProf.pm
+index 4fdd66a..63a94a6 100644
+--- a/lib/Devel/SmallProf.pm
++++ b/lib/Devel/SmallProf.pm
+@@ -16,8 +16,6 @@ our ($profile, $drop_zeros, $grep_format, %packages);
+ my ($cdone, $done, $cstart, $start, $prevf, $prevl, $nulltime,
+     %listings, %profiles, %times, %ctimes);
+ 
+-sub sub; # even if it is not used it has to be declared!
+-
+ sub DB {
+   $profile || return;
+ 
+-- 
+2.14.4
+

Reply via email to