diff mbox series

[wrynose,1/2] perl-cross: add patches for perl-5.42.3

Message ID 20261105170249.55552-1-jaipaul.cheernam@est.tech
State Under Review
Delegated to: Yoann Congal
Headers show
Series [wrynose,1/2] perl-cross: add patches for perl-5.42.3 | expand

Commit Message

Jaipaul Cheernam Nov. 5, 2026, 5:02 p.m. UTC
perl-cross 1.6.4 has no patchset for the 5.42.3 point release and aborts
configure on unknown versions. Reuse the 5.42.0 patchset, as its
cnf/diffs/README advises ("Copy the closest available version").

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 ...rl-cross-add-patches-for-perl-5.42.3.patch | 226 ++++++++++++++++++
 .../perl-cross/perlcross_1.6.4.bb             |   1 +
 2 files changed, 227 insertions(+)
 create mode 100644 meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-patches-for-perl-5.42.3.patch
diff mbox series

Patch

diff --git a/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-patches-for-perl-5.42.3.patch b/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-patches-for-perl-5.42.3.patch
new file mode 100644
index 0000000000..a7fbd116f1
--- /dev/null
+++ b/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-patches-for-perl-5.42.3.patch
@@ -0,0 +1,226 @@ 
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+Date: Thu, 5 Nov 2026 14:00:00 +0000
+Subject: [PATCH] perl-cross: add patches for perl-5.42.3
+
+Reuse the perl 5.42.0 patchset for the 5.42.3 point release.
+
+Upstream-Status: Inappropriate [oe-specific; perl-cross goes 5.42.0 -> 5.44.0]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ cnf/diffs/perl5-5.42.3/constant.patch       |  1 +
+ cnf/diffs/perl5-5.42.3/dynaloader.patch     |  1 +
+ cnf/diffs/perl5-5.42.3/findext.patch        |  1 +
+ cnf/diffs/perl5-5.42.3/installscripts.patch |  1 +
+ cnf/diffs/perl5-5.42.3/liblist.patch        | 70 +++++++++++++++++++++
+ cnf/diffs/perl5-5.42.3/makemaker.patch      |  1 +
+ cnf/diffs/perl5-5.42.3/posix-makefile.patch |  1 +
+ cnf/diffs/perl5-5.42.3/test-checkcase.patch |  1 +
+ cnf/diffs/perl5-5.42.3/test-makemaker.patch |  1 +
+ cnf/diffs/perl5-5.42.3/xconfig.patch        | 48 ++++++++++++++
+ 10 files changed, 126 insertions(+)
+ create mode 120000 cnf/diffs/perl5-5.42.3/constant.patch
+ create mode 120000 cnf/diffs/perl5-5.42.3/dynaloader.patch
+ create mode 120000 cnf/diffs/perl5-5.42.3/findext.patch
+ create mode 120000 cnf/diffs/perl5-5.42.3/installscripts.patch
+ create mode 100644 cnf/diffs/perl5-5.42.3/liblist.patch
+ create mode 120000 cnf/diffs/perl5-5.42.3/makemaker.patch
+ create mode 120000 cnf/diffs/perl5-5.42.3/posix-makefile.patch
+ create mode 120000 cnf/diffs/perl5-5.42.3/test-checkcase.patch
+ create mode 120000 cnf/diffs/perl5-5.42.3/test-makemaker.patch
+ create mode 100644 cnf/diffs/perl5-5.42.3/xconfig.patch
+
+diff --git a/cnf/diffs/perl5-5.42.3/constant.patch b/cnf/diffs/perl5-5.42.3/constant.patch
+new file mode 120000
+index 0000000..065e198
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/constant.patch
+@@ -0,0 +1 @@
++../perl5-5.22.3/constant.patch
+\ No newline at end of file
+diff --git a/cnf/diffs/perl5-5.42.3/dynaloader.patch b/cnf/diffs/perl5-5.42.3/dynaloader.patch
+new file mode 120000
+index 0000000..ffb73eb
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/dynaloader.patch
+@@ -0,0 +1 @@
++../perl5-5.22.3/dynaloader.patch
+\ No newline at end of file
+diff --git a/cnf/diffs/perl5-5.42.3/findext.patch b/cnf/diffs/perl5-5.42.3/findext.patch
+new file mode 120000
+index 0000000..9efbe5b
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/findext.patch
+@@ -0,0 +1 @@
++../perl5-5.22.3/findext.patch
+\ No newline at end of file
+diff --git a/cnf/diffs/perl5-5.42.3/installscripts.patch b/cnf/diffs/perl5-5.42.3/installscripts.patch
+new file mode 120000
+index 0000000..1c05e0f
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/installscripts.patch
+@@ -0,0 +1 @@
++../perl5-5.36.0/installscripts.patch
+\ No newline at end of file
+diff --git a/cnf/diffs/perl5-5.42.3/liblist.patch b/cnf/diffs/perl5-5.42.3/liblist.patch
+new file mode 100644
+index 0000000..1dae0bb
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/liblist.patch
+@@ -0,0 +1,70 @@
++diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
++index fbdc79aea2..976fd268aa 100644
++--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+++++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
++@@ -20,9 +20,10 @@ use File::Basename;
++ use File::Spec;
++ 
++ sub ext {
++-    if    ( $^O eq 'VMS' )     { goto &_vms_ext; }
++-    elsif ( $^O eq 'MSWin32' ) { goto &_win32_ext; }
++-    else                       { goto &_unix_os2_ext; }
+++    if    ( $Config{usemmldlt} ){ goto &_ld_ext;       }
+++    elsif ( $^O eq 'VMS' )      { goto &_vms_ext;      }
+++    elsif ( $^O eq 'MSWin32' )  { goto &_win32_ext;    }
+++    else                        { goto &_unix_os2_ext; }
++ }
++ 
++ sub _space_dirs_split {
++@@ -643,4 +644,51 @@ sub _vms_ext {
++     wantarray ? ( $lib, '', $ldlib, '', ( $give_libs ? \@flibs : () ) ) : $lib;
++ }
++ 
+++# A direct test for -l validity.
+++# Because guessing real file names for -llib options when dealing
+++# with a cross compiler is generally a BAD IDEA^tm.
+++sub _ld_ext {
+++    my($self,$potential_libs, $verbose, $give_libs) = @_;
+++    $verbose ||= 0;
+++
+++    if ($^O =~ 'os2' and $Config{perllibs}) { 
+++	# Dynamic libraries are not transitive, so we may need including
+++	# the libraries linked against perl.dll again.
+++
+++	$potential_libs .= " " if $potential_libs;
+++	$potential_libs .= $Config{perllibs};
+++    }
+++    return ("", "", "", "", ($give_libs ? [] : ())) unless $potential_libs;
+++    warn "Potential libraries are '$potential_libs':\n" if $verbose;
+++
+++    my($ld)   = $Config{ld};
+++    my($ldflags)   = $Config{ldflags};
+++    my($libs) = defined $Config{perllibs} ? $Config{perllibs} : $Config{libs};
+++
+++    my $try = 'try_mm.c';
+++    my $tryx = 'try_mm.x';
+++    open(TRY, '>', $try) || die "Can't create MakeMaker test file $try: $!\n";
+++    print TRY "int main(void) { return 0; }\n";
+++    close(TRY);
+++
+++    my $testlibs = '';
+++    my @testlibs = ();
+++    foreach my $thislib (split ' ', $potential_libs) {
+++        $testlibs = join(' ', @testlibs);
+++	if($thislib =~ /^-L/) {
+++		push(@testlibs, $thislib);
+++		next
+++	};
+++	my $cmd = "$ld $ldflags -o $tryx $try $testlibs $thislib >/dev/null 2>&1";
+++	my $ret = system($cmd);
+++	warn "Warning (mostly harmless): " . "No library found for $thislib\n" if $ret;
+++	next if $ret;
+++	push @testlibs, $thislib;
+++    }
+++    unlink($try);
+++    unlink($tryx);
+++
+++    return (join(' ', @testlibs), '', join(' ', @testlibs), '');
+++}
+++
++ 1;
+diff --git a/cnf/diffs/perl5-5.42.3/makemaker.patch b/cnf/diffs/perl5-5.42.3/makemaker.patch
+new file mode 120000
+index 0000000..d7bd609
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/makemaker.patch
+@@ -0,0 +1 @@
++../perl5-5.38.0/makemaker.patch
+\ No newline at end of file
+diff --git a/cnf/diffs/perl5-5.42.3/posix-makefile.patch b/cnf/diffs/perl5-5.42.3/posix-makefile.patch
+new file mode 120000
+index 0000000..29463b7
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/posix-makefile.patch
+@@ -0,0 +1 @@
++../perl5-5.22.3/posix-makefile.patch
+\ No newline at end of file
+diff --git a/cnf/diffs/perl5-5.42.3/test-checkcase.patch b/cnf/diffs/perl5-5.42.3/test-checkcase.patch
+new file mode 120000
+index 0000000..36c5186
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/test-checkcase.patch
+@@ -0,0 +1 @@
++../perl5-5.22.3/test-checkcase.patch
+\ No newline at end of file
+diff --git a/cnf/diffs/perl5-5.42.3/test-makemaker.patch b/cnf/diffs/perl5-5.42.3/test-makemaker.patch
+new file mode 120000
+index 0000000..4e970ff
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/test-makemaker.patch
+@@ -0,0 +1 @@
++../perl5-5.34.0/test-makemaker.patch
+\ No newline at end of file
+diff --git a/cnf/diffs/perl5-5.42.3/xconfig.patch b/cnf/diffs/perl5-5.42.3/xconfig.patch
+new file mode 100644
+index 0000000..a65609b
+--- /dev/null
++++ b/cnf/diffs/perl5-5.42.3/xconfig.patch
+@@ -0,0 +1,48 @@
++perl-cross assumes the sources use xconfig.h with -DUSE_CROSS_COMPILE
++With perl 5.20.0, it's no longer true. Regardless of what mainline perl
++uses, let's stick with the old xconfig.h way for now.
++
++--- a/perl.h
+++++ b/perl.h
++@@ -43,7 +43,11 @@
++  */
++ /* #define PERL_RC_STACK */
++ 
++-#include "config.h"
+++#ifndef USE_CROSS_COMPILE
+++#  include "config.h"
+++#else
+++#  include "xconfig.h"
+++#endif
++ 
++ /* This fakes up using Mingw for locale handling.  In order to not define WIN32
++  * in this file (and hence throughout the code that isn't expecting it), this
++--- a/perl_langinfo.h
+++++ b/perl_langinfo.h
++@@ -4,7 +4,11 @@
++ #ifndef PERL_LANGINFO_H
++ #define PERL_LANGINFO_H 1
++ 
+++#ifdef USE_CROSS_COMPILE
+++#include "xconfig.h"
+++#else
++ #include "config.h"
+++#endif
++ 
++ #if defined(I_LANGINFO)
++ #   include <langinfo.h>
++--- a/locale.c
+++++ b/locale.c
++@@ -327,7 +327,11 @@
++  * initialization.  This is done before option parsing, and before any thread
++  * creation, so can be a file-level static.  (Must come before #including
++  * perl.h) */
++-#include "config.h"
+++#ifndef USE_CROSS_COMPILE
+++#  include "config.h"
+++#else
+++#  include "xconfig.h"
+++#endif
++ 
++ /* Returns the Unix errno portion; ignoring any others.  This is a macro here
++  * instead of putting it into perl.h, because unclear to khw what should be
diff --git a/meta/recipes-devtools/perl-cross/perlcross_1.6.4.bb b/meta/recipes-devtools/perl-cross/perlcross_1.6.4.bb
index 3c544c9746..584c08defa 100644
--- a/meta/recipes-devtools/perl-cross/perlcross_1.6.4.bb
+++ b/meta/recipes-devtools/perl-cross/perlcross_1.6.4.bb
@@ -15,6 +15,7 @@  SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/perl-cross-${PV}.tar.gz;name=perl-c
            file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
            file://determinism.patch \
            file://0001-Makefile-check-the-file-if-patched-or-not.patch \
+           file://0001-perl-cross-add-patches-for-perl-5.42.3.patch \
            "
 GITHUB_BASE_URI = "https://github.com/arsv/perl-cross/releases/"