[packages/perl-EV] add typemap patch to fix build with perl 5.42
atler
atler at pld-linux.org
Mon Jul 28 14:53:24 CEST 2025
commit 65dd401b387930fe72b87c8476d1f88b3912a3f5
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Jul 28 14:52:16 2025 +0200
add typemap patch to fix build with perl 5.42
from https://github.com/Perl/perl5/issues/22353#issuecomment-2907796786
perl-EV.spec | 2 ++
typemap.patch | 17 +++++++++++++++++
2 files changed, 19 insertions(+)
---
diff --git a/perl-EV.spec b/perl-EV.spec
index eb2813f..5accf5e 100644
--- a/perl-EV.spec
+++ b/perl-EV.spec
@@ -14,6 +14,7 @@ License: GPL v1+ or Artistic (Perl module), BSD-like (embedded libev)
Group: Development/Languages/Perl
Source0: https://www.cpan.org/modules/by-authors/id/M/ML/MLEHMANN/%{pdir}-%{version}.tar.gz
# Source0-md5: de739e773a995d8ad8602fa4f9f21ff2
+Patch0: typemap.patch
URL: https://metacpan.org/dist/EV
BuildRequires: perl-Canary-Stability
BuildRequires: perl-ExtUtils-MakeMaker >= 6.52
@@ -46,6 +47,7 @@ pętle zdarzeń dostępne z poziomu Perla.
%prep
%setup -q -n %{pdir}-%{version}
+%patch -P0 -p0
%build
%{__perl} Makefile.PL \
diff --git a/typemap.patch b/typemap.patch
new file mode 100644
index 0000000..aa94471
--- /dev/null
+++ b/typemap.patch
@@ -0,0 +1,17 @@
+diff --git typemap.old typemap
+index f30badc..663f769 100644
+--- typemap.old
++++ 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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-EV.git/commitdiff/65dd401b387930fe72b87c8476d1f88b3912a3f5
More information about the pld-cvs-commit
mailing list