aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl/fixes/extutils_makemaker_reproducible.diff
blob: 9474a2ab552a551f685e589f91c0d47650304ba8 (plain)
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
From ee45bd25752f7034faf80d968ddf5adfb2694ed8 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Sun, 28 Aug 2016 17:22:10 +0100
Subject: [PATCH] Make perllocal.pod files reproducible

Bug-Debian: https://bugs.debian.org/834190
Bug-Debian: https://bugs.debian.org/835815
Patch-Name: fixes/extutils_makemaker_reproducible.diff

---
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm | 3 ++-
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm    | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
index 69779b2..bf53ad5 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm
@@ -219,7 +219,8 @@ sub perllocal_install {
                            : @ARGV;
 
     my $pod;
-    $pod = sprintf <<'POD', scalar(localtime), $type, $name, $name;
+    my $time = gmtime($ENV{SOURCE_DATE_EPOCH} || time);
+    $pod = sprintf <<'POD', $time, $type, $name, $name;
  =head2 %s: C<%s> L<%s|%s>
 
  =over 4
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index 8ea92e5..0344194 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -3869,7 +3869,7 @@ Obsolete, deprecated method. Not used since Version 5.21.
 sub writedoc {
 # --- perllocal.pod section ---
     my($self,$what,$name,@attribs)=@_;
-    my $time = localtime;
+    my $time = gmtime($ENV{SOURCE_DATE_EPOCH} || time);
     print "=head2 $time: $what C<$name>\n\n=over 4\n\n=item *\n\n";
     print join "\n\n=item *\n\n", map("C<$_>",@attribs);
     print "\n\n=back\n\n";