mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
4de3507483
commit
4187fe750f
5 changed files with 81 additions and 1 deletions
19
gnu/packages/patches/perl-source-date-epoch.patch
Normal file
19
gnu/packages/patches/perl-source-date-epoch.patch
Normal file
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue