Package: magics++ / 4.5.3-1

reproducibility.patch Patch series | download
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
Author: Alastair McKinstry <mckinstry@debian.org>
Description: Bit-identical reproducibility fixes:
 * Don't put timestamps into header files.
 * Don't include random build path in config file.
 * 2016-01-07: Include LC_ALL=C when sorting
Bugs-Debian: https://bugs.debian.org/792824
Last-Updated: 2016-01-07
Forwarded: no

Index: magics++-4.5.0/tools/xml2cc.pl
===================================================================
--- magics++-4.5.0.orig/tools/xml2cc.pl
+++ magics++-4.5.0/tools/xml2cc.pl
@@ -10,6 +10,11 @@
 
 use XML::Parser;
 use Time::localtime;
+use POSIX qw(locale_h);
+use locale;
+
+# To ensure sorting is reproducible
+setlocale(LC_ALL, "C.UTF-8");
 
 my $file  = shift;
 my $dir   = shift;
@@ -196,7 +201,7 @@ EOF
    
     my @interfaces = (split(/\//, $current->{attributes}->{interface}), @impl);
     
-    foreach $i (@impl) 
+    foreach $i (sort(@impl))
     {
         print "#include \"$i.h\"\n";
     }
Index: magics++-4.5.0/tools/xml2mv.pl
===================================================================
--- magics++-4.5.0.orig/tools/xml2mv.pl
+++ magics++-4.5.0/tools/xml2mv.pl
@@ -11,9 +11,12 @@
 
 use XML::Parser;
 use Data::Dumper;
-
+use POSIX qw(locale_h);
+use locale; 
 use Time::localtime;
 
+setlocale(LC_ALL, 'C.UTF-8');
+
 my $file = shift;
 my $dir = shift;
 my $Author="MagicsTeam";
@@ -190,7 +193,7 @@ my $includes = {};
        $includes->{$to} = "find" unless $basetype{$to} || $to eq 'Colour' ;
     }
     
-    foreach my $include (keys %{$includes} ) 
+    foreach my $include (sort(keys %{$includes} ))
     {
           print "#include \"$include\Wrapper.h\"\n"; 
     }