summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/docbook-utils-use-date-element.patch
diff options
context:
space:
mode:
authorBruno Victal <[email protected]>2023-10-09 21:05:59 +0100
committerLudovic Courtès <[email protected]>2024-08-31 10:42:08 +0200
commit5b6c9ca5203b5fe675422a6ef8972e5e11b1e140 (patch)
treec5aa948e7b2f6575ed188aed9d32b42ee2828a5d /gnu/packages/patches/docbook-utils-use-date-element.patch
parent7e4ddd2d2e11c3a978a56b20aec6cd2e5935d07a (diff)
gnu: docbook-utils: Import patches from debian.
* 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 <[email protected]>
Diffstat (limited to 'gnu/packages/patches/docbook-utils-use-date-element.patch')
-rw-r--r--gnu/packages/patches/docbook-utils-use-date-element.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/gnu/packages/patches/docbook-utils-use-date-element.patch b/gnu/packages/patches/docbook-utils-use-date-element.patch
new file mode 100644
index 0000000000..106707f7d4
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-use-date-element.patch
@@ -0,0 +1,63 @@
+# Source: <https://sources.debian.org/patches/docbook-utils/0.6.14-4/bug_214982.patch/>
+
+Description: patch to get the <date> from the sgml file
+ For the moment, docbook2man doesn't use the tag date in <date> </date>
+ to but `date "+%d %B %Y"`, and thus depend on the current locale.
+
+ <refentry>
+ <docinfo>
+ <date>06 September 2003</>
+ </docinfo>
+ </refentry>
+
+ A patch against /usr/share/perl5/sgmlspl-specs/docbook2man-spec.pl
+ allows to use the date written in the source SGML file (which can be
+ localized) instead of the current date.
+
+ However, if no correct date tag is present in the SGML file, the date
+ written in the manpage will depend on the current locale.
+Author: Simon Paillard <[email protected]>
+Forwarded: not-needed
+Bug-Debian: http://bugs.debian.org/214982
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+===================================================================
+--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl 2012-05-09 18:27:28.000000000 +0200
++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl 2012-05-09 18:55:53.276783163 +0200
+@@ -278,8 +278,9 @@
+ .\\" etc. to Steve Cheng <steve\@ggi-project.org>.
+ _END_BANNER
+
+- my $manpage_date = `date "+%d %B %Y"`;
+-
++ my $date = `date "+%d %B %Y"`;
++ my $manpage_date = $manpage_date || $date ;
++
+ output '.TH "';
+
+ # If the title is not mixed-case, convention says to
+@@ -292,7 +293,7 @@
+ }
+
+ output '" "', fold_string($manpage_sect),
+- '" "', fold_string(`date "+%d %B %Y"`),
++ '" "', fold_string($manpage_date),
+ '" "', $manpage_misc,
+ '" "', $manpage_manual,
+ "\"\n";
+@@ -568,6 +569,15 @@
+ sgml('</ATTRIBUTION>', sub { $_[0]->parent->ext->{'attribution'} = pop_output(); });
+
+
++sgml('<DATE>', sub {
++ save_cdata();
++});
++sgml('</DATE>', sub {
++ $manpage_date = fold_string(pop_output());
++ $raw_cdata--;
++});
++
++
+ # IGNORE.
+ sgml('<DOCINFO>', sub { push_output('nul'); });
+ sgml('</DOCINFO>', sub { pop_output(); });