|
| 1 | +SPDX-FileCopyrightText: 2013 Dan Kogai < [email protected]> |
| 2 | +SPDX-FileCopyrightText: 2025 fosslinux < [email protected]> |
| 3 | + |
| 4 | +SPDX-License-Identifier: Artistic-1.0 |
| 5 | + |
| 6 | +Apply this patch to Encode package to Perl 5.18's import of Encode. |
| 7 | + |
| 8 | +Is necessary for reproducible Encode.a. |
| 9 | + |
| 10 | +From e800b1d3cc678e29ae6e95c3f3916b65439fd99c Mon Sep 17 00:00:00 2001 |
| 11 | +From: Dan Kogai < [email protected]> |
| 12 | +Date: Wed, 17 Jul 2013 03:11:42 +0900 |
| 13 | +Subject: [PATCH] RT #86974: Patch to output #includes in deterministic order |
| 14 | + |
| 15 | +--- |
| 16 | + Byte/Makefile.PL | 4 ++-- |
| 17 | + CN/Makefile.PL | 4 ++-- |
| 18 | + Changes | 7 +++++++ |
| 19 | + EBCDIC/Makefile.PL | 4 ++-- |
| 20 | + Encode/Makefile_PL.e2x | 10 +++++----- |
| 21 | + JP/Makefile.PL | 4 ++-- |
| 22 | + KR/Makefile.PL | 4 ++-- |
| 23 | + Symbol/Makefile.PL | 4 ++-- |
| 24 | + TW/Makefile.PL | 4 ++-- |
| 25 | + 9 files changed, 26 insertions(+), 19 deletions(-) |
| 26 | + |
| 27 | +diff --git perl-5.18.4/cpan/Encode/Byte/Makefile.PL perl-5.18.4/cpan/Encode/Byte/Makefile.PL |
| 28 | +index 60caf38..e368ac8 100644 |
| 29 | +--- perl-5.18.4/cpan/Encode/Byte/Makefile.PL |
| 30 | ++++ perl-5.18.4/cpan/Encode/Byte/Makefile.PL |
| 31 | +@@ -108,7 +108,7 @@ sub post_initialize |
| 32 | + #define U8 U8 |
| 33 | + #include "encode.h" |
| 34 | + END |
| 35 | +- foreach my $table (keys %tables) { |
| 36 | ++ foreach my $table (sort keys %tables) { |
| 37 | + print XS qq[#include "${table}.h"\n]; |
| 38 | + } |
| 39 | + print XS <<"END"; |
| 40 | +@@ -137,7 +137,7 @@ PROTOTYPES: DISABLE |
| 41 | + BOOT: |
| 42 | + { |
| 43 | + END |
| 44 | +- foreach my $table (keys %tables) { |
| 45 | ++ foreach my $table (sort keys %tables) { |
| 46 | + print XS qq[#include "${table}.exh"\n]; |
| 47 | + } |
| 48 | + print XS "}\n"; |
| 49 | +diff --git perl-5.18.4/cpan/Encode/CN/Makefile.PL perl-5.18.4/cpan/Encode/CN/Makefile.PL |
| 50 | +index 6d54404..323b47e 100644 |
| 51 | +--- perl-5.18.4/cpan/Encode/CN/Makefile.PL |
| 52 | ++++ perl-5.18.4/cpan/Encode/CN/Makefile.PL |
| 53 | +@@ -84,7 +84,7 @@ sub post_initialize |
| 54 | + #define U8 U8 |
| 55 | + #include "encode.h" |
| 56 | + END |
| 57 | +- foreach my $table (keys %tables) { |
| 58 | ++ foreach my $table (sort keys %tables) { |
| 59 | + print XS qq[#include "${table}.h"\n]; |
| 60 | + } |
| 61 | + print XS <<"END"; |
| 62 | +@@ -113,7 +113,7 @@ PROTOTYPES: DISABLE |
| 63 | + BOOT: |
| 64 | + { |
| 65 | + END |
| 66 | +- foreach my $table (keys %tables) { |
| 67 | ++ foreach my $table (sort keys %tables) { |
| 68 | + print XS qq[#include "${table}.exh"\n]; |
| 69 | + } |
| 70 | + print XS "}\n"; |
| 71 | +diff --git perl-5.18.4/cpan/Encode/EBCDIC/Makefile.PL perl-5.18.4/cpan/Encode/EBCDIC/Makefile.PL |
| 72 | +index 0e2a13c..1c78c6a 100644 |
| 73 | +--- perl-5.18.4/cpan/Encode/EBCDIC/Makefile.PL |
| 74 | ++++ perl-5.18.4/cpan/Encode/EBCDIC/Makefile.PL |
| 75 | +@@ -65,7 +65,7 @@ sub post_initialize |
| 76 | + #define U8 U8 |
| 77 | + #include "encode.h" |
| 78 | + END |
| 79 | +- foreach my $table (keys %tables) { |
| 80 | ++ foreach my $table (sort keys %tables) { |
| 81 | + print XS qq[#include "${table}.h"\n]; |
| 82 | + } |
| 83 | + print XS <<"END"; |
| 84 | +@@ -94,7 +94,7 @@ PROTOTYPES: DISABLE |
| 85 | + BOOT: |
| 86 | + { |
| 87 | + END |
| 88 | +- foreach my $table (keys %tables) { |
| 89 | ++ foreach my $table (sort keys %tables) { |
| 90 | + print XS qq[#include "${table}.exh"\n]; |
| 91 | + } |
| 92 | + print XS "}\n"; |
| 93 | +diff --git perl-5.18.4/cpan/Encode/Encode/Makefile_PL.e2x perl-5.18.4/cpan/Encode/Encode/Makefile_PL.e2x |
| 94 | +index ece5883..9fe60ef 100644 |
| 95 | +--- perl-5.18.4/cpan/Encode/Encode/Makefile_PL.e2x |
| 96 | ++++ perl-5.18.4/cpan/Encode/Encode/Makefile_PL.e2x |
| 97 | +@@ -83,7 +83,7 @@ sub post_initialize |
| 98 | + if $^O eq 'MacOS' && $self->{SOURCE} !~ /\b$name\.c\b/; |
| 99 | + # $self->{'H'} = [$self->catfile($self->updir,'encode.h')]; |
| 100 | + my %xs; |
| 101 | +- foreach my $table (keys %tables) { |
| 102 | ++ foreach my $table (sort keys %tables) { |
| 103 | + push (@{$self->{'C'}},"$table.c"); |
| 104 | + # Do NOT add $table.h etc. to H_FILES unless we own up as to how they |
| 105 | + # get built. |
| 106 | +@@ -101,7 +101,7 @@ sub post_initialize |
| 107 | + #define U8 U8 |
| 108 | + #include "encode.h" |
| 109 | + END |
| 110 | +- foreach my $table (keys %tables) { |
| 111 | ++ foreach my $table (sort keys %tables) { |
| 112 | + print XS qq[#include "${table}.h"\n]; |
| 113 | + } |
| 114 | + print XS <<"END"; |
| 115 | +@@ -130,7 +130,7 @@ PROTOTYPES: DISABLE |
| 116 | + BOOT: |
| 117 | + { |
| 118 | + END |
| 119 | +- foreach my $table (keys %tables) { |
| 120 | ++ foreach my $table (sort keys %tables) { |
| 121 | + print XS qq[#include "${table}.exh"\n]; |
| 122 | + } |
| 123 | + print XS "}\n"; |
| 124 | +@@ -144,14 +144,14 @@ sub postamble |
| 125 | + my $dir = "."; # $self->catdir('Encode'); |
| 126 | + my $str = "# $name\$(OBJ_EXT) depends on .h and .exh files not .c files - but all written by enc2xs\n"; |
| 127 | + $str .= "$name.c : $name.xs "; |
| 128 | +- foreach my $table (keys %tables) |
| 129 | ++ foreach my $table (sort keys %tables) |
| 130 | + { |
| 131 | + $str .= " $table.c"; |
| 132 | + } |
| 133 | + $str .= "\n\n"; |
| 134 | + $str .= "$name\$(OBJ_EXT) : $name.c\n\n"; |
| 135 | + |
| 136 | +- foreach my $table (keys %tables) |
| 137 | ++ foreach my $table (sort keys %tables) |
| 138 | + { |
| 139 | + my $numlines = 1; |
| 140 | + my $lengthsofar = length($str); |
| 141 | +diff --git perl-5.18.4/cpan/Encode/JP/Makefile.PL perl-5.18.4/cpan/Encode/JP/Makefile.PL |
| 142 | +index a75685e..c6a725f 100644 |
| 143 | +--- perl-5.18.4/cpan/Encode/JP/Makefile.PL |
| 144 | ++++ perl-5.18.4/cpan/Encode/JP/Makefile.PL |
| 145 | +@@ -84,7 +84,7 @@ sub post_initialize |
| 146 | + #define U8 U8 |
| 147 | + #include "encode.h" |
| 148 | + END |
| 149 | +- foreach my $table (keys %tables) { |
| 150 | ++ foreach my $table (sort keys %tables) { |
| 151 | + print XS qq[#include "${table}.h"\n]; |
| 152 | + } |
| 153 | + print XS <<"END"; |
| 154 | +@@ -113,7 +113,7 @@ PROTOTYPES: DISABLE |
| 155 | + BOOT: |
| 156 | + { |
| 157 | + END |
| 158 | +- foreach my $table (keys %tables) { |
| 159 | ++ foreach my $table (sort keys %tables) { |
| 160 | + print XS qq[#include "${table}.exh"\n]; |
| 161 | + } |
| 162 | + print XS "}\n"; |
| 163 | +diff --git perl-5.18.4/cpan/Encode/KR/Makefile.PL perl-5.18.4/cpan/Encode/KR/Makefile.PL |
| 164 | +index e95d039..49c0319 100644 |
| 165 | +--- perl-5.18.4/cpan/Encode/KR/Makefile.PL |
| 166 | ++++ perl-5.18.4/cpan/Encode/KR/Makefile.PL |
| 167 | +@@ -82,7 +82,7 @@ sub post_initialize |
| 168 | + #define U8 U8 |
| 169 | + #include "encode.h" |
| 170 | + END |
| 171 | +- foreach my $table (keys %tables) { |
| 172 | ++ foreach my $table (sort keys %tables) { |
| 173 | + print XS qq[#include "${table}.h"\n]; |
| 174 | + } |
| 175 | + print XS <<"END"; |
| 176 | +@@ -111,7 +111,7 @@ PROTOTYPES: DISABLE |
| 177 | + BOOT: |
| 178 | + { |
| 179 | + END |
| 180 | +- foreach my $table (keys %tables) { |
| 181 | ++ foreach my $table (sort keys %tables) { |
| 182 | + print XS qq[#include "${table}.exh"\n]; |
| 183 | + } |
| 184 | + print XS "}\n"; |
| 185 | +diff --git perl-5.18.4/cpan/Encode/Symbol/Makefile.PL perl-5.18.4/cpan/Encode/Symbol/Makefile.PL |
| 186 | +index 23ca1f4..2c94aab 100644 |
| 187 | +--- perl-5.18.4/cpan/Encode/Symbol/Makefile.PL |
| 188 | ++++ perl-5.18.4/cpan/Encode/Symbol/Makefile.PL |
| 189 | +@@ -70,7 +70,7 @@ sub post_initialize |
| 190 | + #define U8 U8 |
| 191 | + #include "encode.h" |
| 192 | + END |
| 193 | +- foreach my $table (keys %tables) { |
| 194 | ++ foreach my $table (sort keys %tables) { |
| 195 | + print XS qq[#include "${table}.h"\n]; |
| 196 | + } |
| 197 | + print XS <<"END"; |
| 198 | +@@ -99,7 +99,7 @@ PROTOTYPES: DISABLE |
| 199 | + BOOT: |
| 200 | + { |
| 201 | + END |
| 202 | +- foreach my $table (keys %tables) { |
| 203 | ++ foreach my $table (sort keys %tables) { |
| 204 | + print XS qq[#include "${table}.exh"\n]; |
| 205 | + } |
| 206 | + print XS "}\n"; |
| 207 | +diff --git perl-5.18.4/cpan/Encode/TW/Makefile.PL perl-5.18.4/cpan/Encode/TW/Makefile.PL |
| 208 | +index 99c94bf..f90861f 100644 |
| 209 | +--- perl-5.18.4/cpan/Encode/TW/Makefile.PL |
| 210 | ++++ perl-5.18.4/cpan/Encode/TW/Makefile.PL |
| 211 | +@@ -80,7 +80,7 @@ sub post_initialize |
| 212 | + #define U8 U8 |
| 213 | + #include "encode.h" |
| 214 | + END |
| 215 | +- foreach my $table (keys %tables) { |
| 216 | ++ foreach my $table (sort keys %tables) { |
| 217 | + print XS qq[#include "${table}.h"\n]; |
| 218 | + } |
| 219 | + print XS <<"END"; |
| 220 | +@@ -109,7 +109,7 @@ PROTOTYPES: DISABLE |
| 221 | + BOOT: |
| 222 | + { |
| 223 | + END |
| 224 | +- foreach my $table (keys %tables) { |
| 225 | ++ foreach my $table (sort keys %tables) { |
| 226 | + print XS qq[#include "${table}.exh"\n]; |
| 227 | + } |
| 228 | + print XS "}\n"; |
| 229 | +-- |
| 230 | +2.49.1 |
| 231 | + |
0 commit comments