mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-15 11:25:22 -05:00
20 lines
654 B
Diff
20 lines
654 B
Diff
|
Adapted from <https://bugs.debian.org/801621>.
|
||
|
Make Pod::Man honor the SOURCE_DATE_EPOCH environment variable.
|
||
|
|
||
|
--- perl-5.22.0/cpan/podlators/lib/Pod/Man.pm 2015-12-12 22:33:03.321787590 +0100
|
||
|
+++ perl-5.22.0/cpan/podlators/lib/Pod/Man.pm 2015-12-12 22:36:33.367361338 +0100
|
||
|
@@ -884,7 +884,12 @@ sub devise_date {
|
||
|
my ($self) = @_;
|
||
|
my $input = $self->source_filename;
|
||
|
my $time;
|
||
|
- if ($input) {
|
||
|
+
|
||
|
+ if (defined($ENV{SOURCE_DATE_EPOCH}) &&
|
||
|
+ $ENV{SOURCE_DATE_EPOCH} !~ /\D/) {
|
||
|
+ $time = $ENV{SOURCE_DATE_EPOCH};
|
||
|
+ }
|
||
|
+ elsif ($input) {
|
||
|
$time = (stat $input)[9] || time;
|
||
|
} else {
|
||
|
$time = time;
|