Add reproducible.patch to sort hash keys to fix build-compare OBS-URL: https://build.opensuse.org/request/show/507771 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Encode-JIS2K?expand=0&rev=18
55 lines
1.7 KiB
Diff
55 lines
1.7 KiB
Diff
Sort hash keys list
|
|
|
|
because we want reproducible output
|
|
even though hash order is undeterministic
|
|
|
|
See https://reproducible-builds.org/ for why this is good.
|
|
Index: Encode-JIS2K-0.02/Makefile.PL
|
|
===================================================================
|
|
--- Encode-JIS2K-0.02.orig/Makefile.PL
|
|
+++ Encode-JIS2K-0.02/Makefile.PL
|
|
@@ -73,7 +73,7 @@ sub post_initialize
|
|
$self->{'C'} = ["$name.c"];
|
|
# $self->{'H'} = [$self->catfile($self->updir,'encode.h')];
|
|
my %xs;
|
|
- foreach my $table (keys %tables) {
|
|
+ foreach my $table (sort keys %tables) {
|
|
push (@{$self->{'C'}},"$table.c");
|
|
# Do NOT add $table.h etc. to H_FILES unless we own up as to how they
|
|
# get built.
|
|
@@ -91,7 +91,7 @@ sub post_initialize
|
|
#define U8 U8
|
|
#include "encode.h"
|
|
END
|
|
- foreach my $table (keys %tables) {
|
|
+ foreach my $table (sort keys %tables) {
|
|
print XS qq[#include "${table}.h"\n];
|
|
}
|
|
print XS <<"END";
|
|
@@ -120,7 +120,7 @@ PROTOTYPES: DISABLE
|
|
BOOT:
|
|
{
|
|
END
|
|
- foreach my $table (keys %tables) {
|
|
+ foreach my $table (sort keys %tables) {
|
|
print XS qq[#include "${table}.exh"\n];
|
|
}
|
|
print XS "}\n";
|
|
@@ -134,14 +134,14 @@ sub postamble
|
|
my $dir = "."; # $self->catdir('Encode');
|
|
my $str = "# $name\$(OBJ_EXT) depends on .h and .exh files not .c files - but all written by enc2xs\n";
|
|
$str .= "$name.c : $name.xs ";
|
|
- foreach my $table (keys %tables)
|
|
+ foreach my $table (sort keys %tables)
|
|
{
|
|
$str .= " $table.c";
|
|
}
|
|
$str .= "\n\n";
|
|
$str .= "$name\$(OBJ_EXT) : $name.c\n\n";
|
|
|
|
- foreach my $table (keys %tables)
|
|
+ foreach my $table (sort keys %tables)
|
|
{
|
|
my $numlines = 1;
|
|
my $lengthsofar = length($str);
|