diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-10-09 21:05:59 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-08-31 10:42:08 +0200 |
commit | 5b6c9ca5203b5fe675422a6ef8972e5e11b1e140 (patch) | |
tree | c5aa948e7b2f6575ed188aed9d32b42ee2828a5d /gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch | |
parent | 7e4ddd2d2e11c3a978a56b20aec6cd2e5935d07a (diff) | |
download | guix-5b6c9ca5203b5fe675422a6ef8972e5e11b1e140.tar guix-5b6c9ca5203b5fe675422a6ef8972e5e11b1e140.tar.gz |
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 <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch')
-rw-r--r-- | gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch new file mode 100644 index 0000000000..1b8ce7a0de --- /dev/null +++ b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch @@ -0,0 +1,36 @@ +# Source: <https://sources.debian.org/patches/docbook-utils/0.6.14-4/bug_394511.patch/> + +Description: docbook2man should translate the NAME section according to the REFENTRY's lang attribute + Currently, docbook2man translates the NAME section according to the lang + attribute provided to the REFNAMEDIV tag. + When a lang attribute is specified in the REFENTRY tag and no lang + attribute is specified with the REFNAMEDIV, the lang attribute of the + REFENTRY should be used. +Author: Nicolas François <nicolas.francois@centraliens.net> +Forwarded: not-needed +Bug-Debian: http://bugs.debian.org/394511 + +Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl +=================================================================== +--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl 2012-05-09 18:55:53.276783163 +0200 ++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl 2012-05-09 18:58:04.792778418 +0200 +@@ -359,11 +359,14 @@ + # NAME section + man_sgml('<REFNAMEDIV>', sub { + my %words = qw( fr NOM es NOMBRE de NAME ); +- if (defined($_[0]->attribute('LANG')->value)) { +- my $id = $_[0]->attribute('LANG')->value; +- my $ad = $words{$id}; +- output("\n.SH $ad\n");} +- else {output("\n.SH NAME\n");} ++ # Use the REFNAMEDIV's lang attribute, and default to the ++ # REFENTRY's lang attribute. ++ my $lang = $_[0]->attribute('LANG')->value; ++ $lang = $manpage_lang unless defined $lang; ++ if (defined($lang) and defined $words{lc($lang)}) { ++ my $ad = $words{lc($lang)}; ++ output("\n.SH $ad\n");} ++ else { output("\n.SH NAME\n");} + }); + + sgml('<REFNAME>', \&save_cdata); |