commit:     ab695efb8c213ace58f2b77f3a6f76fee77bb82c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 26 03:16:59 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 26 03:16:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab695efb

dev-perl/Audio-Scan: fix build w/ perl-5.42

Closes: https://bugs.gentoo.org/959573
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-perl/Audio-Scan/Audio-Scan-1.10.0-r4.ebuild    | 33 +++++++++
 .../files/Audio-Scan-1.10.0-perl-5.42.patch        | 80 ++++++++++++++++++++++
 2 files changed, 113 insertions(+)

diff --git a/dev-perl/Audio-Scan/Audio-Scan-1.10.0-r4.ebuild 
b/dev-perl/Audio-Scan/Audio-Scan-1.10.0-r4.ebuild
new file mode 100644
index 000000000000..7ed8ef42e1df
--- /dev/null
+++ b/dev-perl/Audio-Scan/Audio-Scan-1.10.0-r4.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=AGRUNDMA
+DIST_VERSION=1.01
+inherit perl-module
+
+DESCRIPTION="Fast C metadata and tag reader for all common audio file formats"
+
+# License note: ambiguity: https://rt.cpan.org/Ticket/Display.html?id=132450
+# Tagged GPL-2 since this seems to be the smallest common denominator
+# Leaving the rest for upstream to sort out
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="
+       test? (
+               dev-perl/Test-Warn
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.10.0-perl-5.42.patch
+)
+
+PERL_RM_FILES=(
+       "t/02pod.t"
+       "t/03podcoverage.t"
+       "t/04critic.t"
+)

diff --git a/dev-perl/Audio-Scan/files/Audio-Scan-1.10.0-perl-5.42.patch 
b/dev-perl/Audio-Scan/files/Audio-Scan-1.10.0-perl-5.42.patch
new file mode 100644
index 000000000000..1ae4c9c3063f
--- /dev/null
+++ b/dev-perl/Audio-Scan/files/Audio-Scan-1.10.0-perl-5.42.patch
@@ -0,0 +1,80 @@
+https://bugs.gentoo.org/959573
+https://rt.cpan.org/Public/Bug/Display.html?id=167903
+https://rt.cpan.org/Transaction/Display.html?id=3098149
+
+>From ced0f4272dc8f66ae6efa2e84246c00b65409c12 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <[email protected]>
+Date: Sun, 24 Aug 2025 17:10:44 +0100
+Subject: [PATCH] Fix invalid XS syntax that breaks the build with Perl 5.42
+
+Older versions of ExtUtils::ParseXS used to silently ignore parameter
+declarations that it could not parse. Newer ones (starting around Perl
+5.42) issue a syntax error ("Unparseable XSUB parameter") instead.
+
+See https://rt.cpan.org/Public/Bug/Display.html?id=162293 for a similar
+issue in another module (Crypt-SMIME), where Dave Mitchell recommends
+giving the ignored parameter a name but no type.
+---
+ Scan.xs | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Scan.xs b/Scan.xs
+index 96e4f19..b6bfd55 100644
+--- a/Scan.xs
++++ b/Scan.xs
+@@ -214,7 +214,7 @@ _generate_hash(const char *file)
+ MODULE = Audio::Scan          PACKAGE = Audio::Scan
+ 
+ HV *
+-_scan( char *, char *suffix, PerlIO *infile, SV *path, int filter, int 
md5_size, int md5_offset )
++_scan( class, char *suffix, PerlIO *infile, SV *path, int filter, int 
md5_size, int md5_offset )
+ CODE:
+ {
+   taghandler *hdl;
+@@ -266,7 +266,7 @@ OUTPUT:
+   RETVAL
+   
+ int
+-_find_frame( char *, char *suffix, PerlIO *infile, SV *path, int offset )
++_find_frame( class, char *suffix, PerlIO *infile, SV *path, int offset )
+ CODE:
+ {
+   taghandler *hdl;
+@@ -282,7 +282,7 @@ OUTPUT:
+   RETVAL
+ 
+ HV *
+-_find_frame_return_info( char *, char *suffix, PerlIO *infile, SV *path, int 
offset )
++_find_frame_return_info( class, char *suffix, PerlIO *infile, SV *path, int 
offset )
+ CODE:
+ {
+   taghandler *hdl = _get_taghandler(suffix);
+@@ -306,7 +306,7 @@ OUTPUT:
+   RETVAL
+ 
+ int
+-is_supported(char *, SV *path)
++is_supported(class, SV *path)
+ CODE:
+ {
+   char *suffix = strrchr( SvPVX(path), '.' );
+@@ -322,7 +322,7 @@ OUTPUT:
+   RETVAL
+ 
+ SV *
+-type_for(char *, SV *suffix)
++type_for(class, SV *suffix)
+ CODE:
+ {
+   taghandler *hdl = NULL;
+@@ -360,7 +360,7 @@ OUTPUT:
+   RETVAL
+ 
+ AV *
+-extensions_for(char *, SV *type)
++extensions_for(class, SV *type)
+ CODE:
+ {
+   int i, j;
+-- 
+2.49.0

Reply via email to