mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
5b6c9ca520
* gnu/packages/docbook.scm (docbook-utils)[source]: Import patches from debian. Drop snippet for patching OpenSP and OpenJade. [native-inputs]: Add autoconf, automake and libtool. * gnu/packages/patches/docbook-utils-documentation-edits.patch: New file. * gnu/packages/patches/docbook-utils-escape-characters.patch: Ditto. * gnu/packages/patches/docbook-utils-remove-jade-sp.patch: Ditto. * gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch: Ditto. * gnu/packages/patches/docbook-utils-source-date-epoch.patch: Ditto. * gnu/packages/patches/docbook-utils-use-date-element.patch: Ditto. * gnu/local.mk: Register them. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
# Source: <https://sources.debian.org/patches/docbook-utils/0.6.14-4/support_source_date_epoch.patch/>
|
|
|
|
Author: Reiner Herrmann <reiner@reiner-h.de>
|
|
Description: Support SOURCE_DATE_EPOCH for timestamps
|
|
To allow generating documents in a reproducible way,
|
|
allow overriding the timestamp through the environment.
|
|
.
|
|
See also: https://reproducible-builds.org/specs/source-date-epoch/
|
|
Bug-Debian: https://bugs.debian.org/800797
|
|
|
|
--- a/helpers/docbook2man-spec.pl
|
|
+++ b/helpers/docbook2man-spec.pl
|
|
@@ -57,6 +57,7 @@
|
|
use SGMLS; # Use the SGMLS package.
|
|
use SGMLS::Output; # Use stack-based output.
|
|
use SGMLS::Refs;
|
|
+use POSIX qw(strftime setlocale LC_TIME);
|
|
|
|
########################################################################
|
|
# SGMLSPL script produced automatically by the script sgmlspl.pl
|
|
@@ -279,6 +280,10 @@
|
|
_END_BANNER
|
|
|
|
my $date = `date "+%d %B %Y"`;
|
|
+ if ($ENV{SOURCE_DATE_EPOCH}) {
|
|
+ setlocale(LC_TIME, "C");
|
|
+ $date = strftime("%d %B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time));
|
|
+ }
|
|
my $manpage_date = $manpage_date || $date ;
|
|
|
|
output '.TH "';
|