Description: Fix convert.pl to allow reproducible build.
 Change convert.pl to use GAP_CONVERT_DATE for generated date manual.
Author: Jerome Benoit
Last-Update: 2016-05-03
Index: gap-4.15.0~beta3/etc/convert.pl
===================================================================
--- gap-4.15.0~beta3.orig/etc/convert.pl
+++ gap-4.15.0~beta3/etc/convert.pl
@@ -409,9 +409,16 @@ sub printchaps {
 
   }
 }
+sub reprodate
+{
+  return "$ENV{GAP_CONVERT_DATE}\n" if (defined($ENV{'GAP_CONVERT_DATE'}));
+  print STDERR "convert.pl: Please set GAP_CONVERT_DATE to the upstream document date\n";
+  return `env LANG=C TZ=UTC date -d "@"$ENV{'SOURCE_DATE_EPOCH'} +"%B %Y"` if (defined($ENV{'SOURCE_DATE_EPOCH'}));
+  return `env LANG=C TZ=UTC date +"%B %Y"`
+}
 
 # Printed at the bottom of every page.
-$footer = "<P>\n" . sansserif( "GAP 4 manual<br>" . `date +"%B %Y"` ) .
+$footer = "<P>\n" . sansserif( "GAP 4 manual<br>" . &reprodate ) .
           "</body></html>";
 
 # Section label ... this is the bit that goes after a # in an HREF link
@@ -2091,7 +2098,7 @@ if ($opt_n) {
   $booktitle_body = booktitle_body($booktitle, ("GAP", $opt_n));
   $mainman=0;
   $footer = "<P>\n<address>$opt_n manual<br>" .
-    `date +"%B %Y"` . "</address></body></html>";
+    &reprodate . "</address></body></html>";
 #print "c: $opt_c \n";
 } else {
   if ($opt_f) {
