summaryrefslogtreecommitdiff
path: root/dev-lang/perl/files/perl-5.42.0-cross-rebase.patch
blob: 7b0b0184a6bd3d606e016ebbba8c7522aa312d62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
https://github.com/arsv/perl-cross/pull/165

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        | 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 +
 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
 create mode 120000 cnf/diffs/perl5-5.42.0/installscripts.patch
 create mode 100644 cnf/diffs/perl5-5.42.0/liblist.patch
 create mode 120000 cnf/diffs/perl5-5.42.0/makemaker.patch
 create mode 120000 cnf/diffs/perl5-5.42.0/posix-makefile.patch
 create mode 120000 cnf/diffs/perl5-5.42.0/test-checkcase.patch
 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
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/dynaloader.patch b/cnf/diffs/perl5-5.42.0/dynaloader.patch
new file mode 120000
index 0000000..ffb73eb
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/findext.patch b/cnf/diffs/perl5-5.42.0/findext.patch
new file mode 120000
index 0000000..9efbe5b
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/installscripts.patch b/cnf/diffs/perl5-5.42.0/installscripts.patch
new file mode 120000
index 0000000..1c05e0f
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/liblist.patch b/cnf/diffs/perl5-5.42.0/liblist.patch
new file mode 100644
index 0000000..1dae0bb
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/makemaker.patch b/cnf/diffs/perl5-5.42.0/makemaker.patch
new file mode 120000
index 0000000..d7bd609
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/posix-makefile.patch b/cnf/diffs/perl5-5.42.0/posix-makefile.patch
new file mode 120000
index 0000000..29463b7
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/test-checkcase.patch b/cnf/diffs/perl5-5.42.0/test-checkcase.patch
new file mode 120000
index 0000000..36c5186
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/test-makemaker.patch b/cnf/diffs/perl5-5.42.0/test-makemaker.patch
new file mode 120000
index 0000000..4e970ff
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/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.0/xconfig.patch b/cnf/diffs/perl5-5.42.0/xconfig.patch
new file mode 120000
index 0000000..1c22c96
--- /dev/null
+++ b/cnf/diffs/perl5-5.42.0/xconfig.patch
@@ -0,0 +1 @@
+../perl5-5.41.3/xconfig.patch
\ No newline at end of file