[packages/perl-Gtk2] add patch from fedora to fix compatibility with ExtUtils::ParseXS >= 3.63

atler atler at pld-linux.org
Tue Aug 11 19:53:03 CEST 2026


commit 41724f2463526749621db29dda571627b6274a72
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Aug 11 19:50:38 2026 +0200

    add patch from fedora to fix compatibility with ExtUtils::ParseXS >= 3.63

 Gtk2-1.24993-Adapt-to-EU-ParseXS-3.63.patch | 24 ++++++++++++++++++++++++
 perl-Gtk2.spec                              |  2 ++
 2 files changed, 26 insertions(+)
---
diff --git a/perl-Gtk2.spec b/perl-Gtk2.spec
index 76ffd91..d0a6015 100644
--- a/perl-Gtk2.spec
+++ b/perl-Gtk2.spec
@@ -13,6 +13,7 @@ License:	LGPL v2.1+
 Group:		Development/Languages/Perl
 Source0:	http://downloads.sourceforge.net/gtk2-perl/%{pdir}-%{version}.tar.gz
 # Source0-md5:	4bc5bee6ec7bfbd578ec51f502db2734
+Patch0:		Gtk2-1.24993-Adapt-to-EU-ParseXS-3.63.patch
 URL:		http://gtk2-perl.sourceforge.net/
 BuildRequires:	gtk+2-devel >= 2:2.12.0
 BuildRequires:	pango-devel >= 1:1.18
@@ -58,6 +59,7 @@ Pliki programistyczne wiązań Gtk2 dla Perla.
 
 %prep
 %setup -q -n %{pdir}-%{version}
+%patch -P0 -p1
 
 %build
 %{__perl} Makefile.PL \
diff --git a/Gtk2-1.24993-Adapt-to-EU-ParseXS-3.63.patch b/Gtk2-1.24993-Adapt-to-EU-ParseXS-3.63.patch
new file mode 100644
index 0000000..a27aef4
--- /dev/null
+++ b/Gtk2-1.24993-Adapt-to-EU-ParseXS-3.63.patch
@@ -0,0 +1,24 @@
+Fix compatibility with ExtUtils::ParseXS 3.63
+
+ExtUtils::ParseXS 3.63 introduced a validation rule that prohibits combining
+default parameter values with the length() syntax for the same parameter.
+
+The error was: "default value for initial_chars not allowed when length(initial_chars) also present"
+
+This patch removes the default value (=NULL) from the initial_chars parameter
+signature. The functionality remains unchanged because the CODE block already
+handles the NULL case explicitly with an if statement.
+
+Co-Authored-By: Claude Code <noreply at anthropic.com>
+
+--- Gtk2-1.24993/xs/GtkEntryBuffer.xs.orig	2024-01-01 00:00:00.000000000 +0000
++++ Gtk2-1.24993/xs/GtkEntryBuffer.xs	2026-05-18 00:00:00.000000000 +0000
+@@ -41,7 +41,7 @@
+ =for arg initial_chars (string)
+ =cut
+ GtkEntryBuffer_noinc *
+-gtk_entry_buffer_new (class, const gchar_utf8_length *initial_chars=NULL, gint length(initial_chars))
++gtk_entry_buffer_new (class, const gchar_utf8_length *initial_chars, gint length(initial_chars))
+     CODE:
+         if (initial_chars == NULL) {
+                 RETVAL = gtk_entry_buffer_new (NULL, 0);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Gtk2.git/commitdiff/41724f2463526749621db29dda571627b6274a72



More information about the pld-cvs-commit mailing list