summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/perl-source-date-epoch.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-13 11:25:24 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-13 11:28:54 +0100
commit4187fe750f128f934bd6030912133d13d19baafd (patch)
tree3d02f64726542f54c55be0a1869efe0534a3ba47 /gnu/packages/patches/perl-source-date-epoch.patch
parent4de35074833742e45237464bb1727ce1a55f3336 (diff)
downloadguix-patches-4187fe750f128f934bd6030912133d13d19baafd.tar
guix-patches-4187fe750f128f934bd6030912133d13d19baafd.tar.gz
gnu: perl: Build deterministically, and make byproducts deterministic.
With this, a --rounds=2 build passes, and timestamps in POD files can be controlled with 'SOURCE_DATE_EPOCH'. * gnu/packages/patches/perl-deterministic-ordering.patch, gnu/packages/patches/perl-no-build-time.patch, gnu/packages/patches/perl-source-date-epoch.patch: New files. * gnu/packages/perl.scm (perl)[source]: Use them. * gnu-system.am (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches/perl-source-date-epoch.patch')
-rw-r--r--gnu/packages/patches/perl-source-date-epoch.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/packages/patches/perl-source-date-epoch.patch b/gnu/packages/patches/perl-source-date-epoch.patch
new file mode 100644
index 0000000000..37330c9537
--- /dev/null
+++ b/gnu/packages/patches/perl-source-date-epoch.patch
@@ -0,0 +1,19 @@
+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;