Debian Codegraph @

debian/patches/convert.pl-repro

raw
1 Description: Fix convert.pl to allow reproducible build.
2 Change convert.pl to use GAP_CONVERT_DATE for generated date manual.
3 Author: Jerome Benoit
4 Last-Update: 2016-05-03
5 Index: gap-4.15.0~beta3/etc/convert.pl
6 ===================================================================
7 --- gap-4.15.0~beta3.orig/etc/convert.pl
8 +++ gap-4.15.0~beta3/etc/convert.pl
9 @@ -409,9 +409,16 @@ sub printchaps {
10
11 }
12 }
13 +sub reprodate
14 +{
15 + return "$ENV{GAP_CONVERT_DATE}\n" if (defined($ENV{'GAP_CONVERT_DATE'}));
16 + print STDERR "convert.pl: Please set GAP_CONVERT_DATE to the upstream document date\n";
17 + return `env LANG=C TZ=UTC date -d "@"$ENV{'SOURCE_DATE_EPOCH'} +"%B %Y"` if (defined($ENV{'SOURCE_DATE_EPOCH'}));
18 + return `env LANG=C TZ=UTC date +"%B %Y"`
19 +}
20
21 # Printed at the bottom of every page.
22 -$footer = "<P>\n" . sansserif( "GAP 4 manual<br>" . `date +"%B %Y"` ) .
23 +$footer = "<P>\n" . sansserif( "GAP 4 manual<br>" . &reprodate ) .
24 "</body></html>";
25
26 # Section label ... this is the bit that goes after a # in an HREF link
27 @@ -2091,7 +2098,7 @@ if ($opt_n) {
28 $booktitle_body = booktitle_body($booktitle, ("GAP", $opt_n));
29 $mainman=0;
30 $footer = "<P>\n<address>$opt_n manual<br>" .
31 - `date +"%B %Y"` . "</address></body></html>";
32 + &reprodate . "</address></body></html>";
33 #print "c: $opt_c \n";
34 } else {
35 if ($opt_f) {