2
0
mirror of https://github.com/gentoo-mirror/gentoo.git synced 2026-01-19 00:09:37 +03:00

dev-lang/perl: re-apply right upstream PR for perl-cross vs 5.42.0

Closes: https://bugs.gentoo.org/959686
Signed-off-by: Sungjoon Moon <sumoon@seoulsaram.org>
Part-of: https://github.com/gentoo/gentoo/pull/44119
Closes: https://github.com/gentoo/gentoo/pull/44119
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sungjoon Moon
2025-10-10 01:42:42 +00:00
committed by Sam James
parent 5321dee2b8
commit 38cae27454

View File

@@ -1,22 +1,23 @@
https://github.com/arsv/perl-cross/pull/164
https://github.com/arsv/perl-cross/pull/165
From b47ef629459076a5ccb3d0caf83ccfbb8ba0571b Mon Sep 17 00:00:00 2001
From: Marcus Ramberg <marcus@means.no>
Date: Wed, 3 Sep 2025 10:35:58 +0200
From add39339ed09334e6809b48b3f8474c01a7ea1a1 Mon Sep 17 00:00:00 2001
From: Pavlo Kleymonov <pkleymonov@blackberry.com>
Date: Fri, 5 Sep 2025 17:03:23 +0200
Subject: [PATCH] patches for perl-5.42.0
---
cnf/configure_func.sh | 1 +
cnf/diffs/perl5-5.42.0/constant.patch | 1 +
cnf/diffs/perl5-5.42.0/dynaloader.patch | 1 +
cnf/diffs/perl5-5.42.0/findext.patch | 1 +
cnf/diffs/perl5-5.42.0/installscripts.patch | 1 +
cnf/diffs/perl5-5.42.0/liblist.patch | 80 +++++++++++++++++++++
cnf/diffs/perl5-5.42.0/liblist.patch | 70 +++++++++++++++++++++
cnf/diffs/perl5-5.42.0/makemaker.patch | 1 +
cnf/diffs/perl5-5.42.0/posix-makefile.patch | 1 +
cnf/diffs/perl5-5.42.0/test-checkcase.patch | 1 +
cnf/diffs/perl5-5.42.0/test-makemaker.patch | 1 +
cnf/diffs/perl5-5.42.0/xconfig.patch | 1 +
10 files changed, 89 insertions(+)
11 files changed, 80 insertions(+)
create mode 120000 cnf/diffs/perl5-5.42.0/constant.patch
create mode 120000 cnf/diffs/perl5-5.42.0/dynaloader.patch
create mode 120000 cnf/diffs/perl5-5.42.0/findext.patch
@@ -28,6 +29,18 @@ Subject: [PATCH] patches for perl-5.42.0
create mode 120000 cnf/diffs/perl5-5.42.0/test-makemaker.patch
create mode 120000 cnf/diffs/perl5-5.42.0/xconfig.patch
diff --git a/cnf/configure_func.sh b/cnf/configure_func.sh
index 4c13e4c..20f9cdf 100644
--- a/cnf/configure_func.sh
+++ b/cnf/configure_func.sh
@@ -82,6 +82,7 @@ checkfunc d_fchmod 'fchmod' "0,0" 'unistd.h sys/stat.h'
checkfunc d_fchmodat 'fchmodat' "0,NULL,0,0" 'unistd.h sys/stat.h'
checkfunc d_fchown 'fchown' "0,0,0" 'unistd.h'
checkfunc d_fcntl 'fcntl' "0,0" 'unistd.h fcntl.h'
+checkfunc d_fdopendir 'fdopendir' "0" 'dirent.h sys/types.h'
checkfunc d_fdclose 'fdclose' "NULL,NULL" 'stdio.h'
checkfunc d_ffs 'ffs' "0" 'strings.h'
checkfunc d_ffsl 'ffsl' "0" 'strings.h'
diff --git a/cnf/diffs/perl5-5.42.0/constant.patch b/cnf/diffs/perl5-5.42.0/constant.patch
new file mode 120000
index 0000000..065e198
@@ -62,39 +75,29 @@ index 0000000..1c05e0f
\ No newline at end of file
diff --git a/cnf/diffs/perl5-5.42.0/liblist.patch b/cnf/diffs/perl5-5.42.0/liblist.patch
new file mode 100644
index 0000000..5e6331f
index 0000000..1dae0bb
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/liblist.patch
@@ -0,0 +1,80 @@
+When deciding which libraries are available, the original Configure uses
+shaky heuristics to physically locate library files.
+This is a very very bad thing to do, *especially* when cross-compiling,
+as said heiristics are likely to locate the host libraries, not the target ones.
+
+The only real need for this test is to make sure it's safe to pass -llibrary
+to the compiler. So that's exactly what perl-cross does, pass -llibrary
+and see if it breaks things.
+
+Note this is a part of MakeMaker, and only applies to module Makefiles.
+
+
@@ -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 @@
+@@ -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; }
++ 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 _unix_os2_ext {
+@@ -661,4 +662,51 @@
+ sub _space_dirs_split {
+@@ -643,4 +644,51 @@ sub _vms_ext {
+ wantarray ? ( $lib, '', $ldlib, '', ( $give_libs ? \@flibs : () ) ) : $lib;
+ }
+
@@ -186,4 +189,3 @@ index 0000000..1c22c96
@@ -0,0 +1 @@
+../perl5-5.41.3/xconfig.patch
\ No newline at end of file