dev-perl/EV: fix build w/ perl-5.42

Closes: https://bugs.gentoo.org/959141
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-06-28 04:04:37 +01:00
parent b4d9f86dd2
commit f8a4d78fc0
2 changed files with 22 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -18,10 +18,13 @@ RDEPEND="
"
BDEPEND="
${RDEPEND}
virtual/perl-ExtUtils-MakeMaker
dev-perl/Canary-Stability
"
PATCHES=(
"${FILESDIR}"/${PN}-4.34-perl-5.42.patch
)
src_compile() {
# See bug #855869 and its large number of dupes in bundled libev copies.
filter-lto

View File

@@ -0,0 +1,17 @@
https://bugs.gentoo.org/959141
https://github.com/Perl/perl5/issues/22353#issuecomment-2907796786
--- a/typemap
+++ b/typemap
@@ -37,9 +37,9 @@ T_LOOP
T_WATCHER
if (!(SvROK ($arg) && SvOBJECT (SvRV ($arg))
- && (SvSTASH (SvRV ($arg)) == stash_" . ($type =~ /ev_(\S+)/, "$1") . "
- || sv_derived_from ($arg, \"EV::" . ($type =~ /ev_(\S+)/, ucfirst "$1") . "\"))))
- croak (\"object is not of type EV::" . ($type =~ /ev_(\S+)/, ucfirst "$1") . "\");
+ && (SvSTASH (SvRV ($arg)) == stash_${ ($type =~ /ev_(\S+)/, \qq{$1}) }
+ || sv_derived_from ($arg, \"EV::${ ($type =~ /ev_(\S+)/, \ucfirst qq{$1}) }\"))))
+ croak (\"object is not of type EV::${ ($type =~ /ev_(\S+)/, \ucfirst qq{$1}) }\");
$var = ($type)SvPVX (SvRV ($arg));
OUTPUT