summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/docbook-utils-escape-characters.patch
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2023-10-09 21:05:59 +0100
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:42:08 +0200
commit5b6c9ca5203b5fe675422a6ef8972e5e11b1e140 (patch)
treec5aa948e7b2f6575ed188aed9d32b42ee2828a5d /gnu/packages/patches/docbook-utils-escape-characters.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 <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/patches/docbook-utils-escape-characters.patch')
-rw-r--r--gnu/packages/patches/docbook-utils-escape-characters.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/docbook-utils-escape-characters.patch b/gnu/packages/patches/docbook-utils-escape-characters.patch
new file mode 100644
index 0000000000..3845ee6238
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-escape-characters.patch
@@ -0,0 +1,36 @@
+# Source: <https://sources.debian.org/patches/docbook-utils/0.6.14-4/bug_528334.patch/>
+
+Description: incorrectly strips whitespace (patch included)
+ In the previous upload, docbook2man was patched to escape the special
+ characters . and ' at the beginning of a line (see #399947).
+ Unfortunately that patch was incorrect -- as well as escaping the special
+ characters, it also removes all whitespace from the beginning of
+ affected lines. As a result, if you are in a block where whitespace
+ matters (such as <screen>...</screen>) then the output is now incorrect.
+
+ This is very easy to fix -- just match the whitespace and preserve it,
+ instead of tossing it away. The full patch (just two lines) is included
+ below.
+Author: Ben Burton <bab@debian.org>
+Forwarded: not-needed
+Bug-Debian: http://bugs.debian.org/528334
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Patch was edited so that it could be applied against the original
+ docbook-utils-0.6.14 sources.
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+===================================================================
+--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl 2012-05-09 18:59:42.584774885 +0200
++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl 2012-05-09 19:00:34.788773002 +0200
+@@ -1212,8 +1212,8 @@
+ $_[0] =~ s/\\/\\\\/g;
+
+ # Escape dots and single quotes in column 1
+- $_[0] =~ s/^\./\\\&\./;
+- $_[0] =~ s/^\'/\\\&\'/;
++ $_[0] =~ s/^([ \t]*)\./$1\\\&\./;
++ $_[0] =~ s/^([ \t]*)\'/$1\\\&\'/;
+
+ # In non-'pre'-type elements:
+ if(!$nocollapse_whitespace) {