gnu: python-babel: Update to 2.7.0.
[guix.git] / gnu / packages / patches / perl-reproducible-build-date.patch
blobbf0d4b8f6d8585aacac10a42137cab6362f5582f
1 Don't encode the current timestamp.
3 This affects the output of `perl -V`, specifically the message "Compiled
4 at [...]".
6 The 'cf_time' and 'cf_by' values show up in 'config.h' and
7 in 'Config_heavy.pl'.
9 Use the output of 'uname -s' instead of 'uname -a' to avoid recording
10 the kernel version ('uname -o' leads to directory names like
11 'x86_64-gnulinux' instead of 'x86_64-linux', which might cause breakage
12 down the road.)
14 diff --git a/perl.c b/perl.c
15 index 228a0d8..ed38313 100644
16 --- a/perl.c
17 +++ b/perl.c
18 @@ -1825,6 +1825,7 @@ S_Internals_V(pTHX_ CV *cv)
19 PUSHs(Perl_newSVpvn_flags(aTHX_ non_bincompat_options,
20 sizeof(non_bincompat_options) - 1, SVs_TEMP));
22 +#define PERL_BUILD_DATE "Jan 1 1970 00:00:00"
23 #ifndef PERL_BUILD_DATE
24 # ifdef __DATE__
25 # ifdef __TIME__
27 --- a/Configure 1970-01-01 01:00:00.000000000 +0100
28 +++ b/Configure 2016-10-01 14:47:20.017319739 +0200
29 @@ -3276,7 +3276,7 @@ $eunicefix tr
30 : Try to determine whether config.sh was made on this system
31 case "$config_sh" in
32 '')
33 -myuname=`$uname -a 2>/dev/null`
34 +myuname=`$uname -s 2>/dev/null`
35 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
36 # Downcase everything to avoid ambiguity.
37 # Remove slashes and single quotes so we can use parts of this in
38 @@ -3845,10 +3845,10 @@
39 . ./posthint.sh
41 : who configured the system
42 -cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
43 +cf_time="1970-01-01"
44 case "$cf_by" in
45 "")
46 - cf_by=`(logname) 2>/dev/null`
47 + cf_by="guix"
48 case "$cf_by" in
49 "")
50 cf_by=`(whoami) 2>/dev/null`