summaryrefslogtreecommitdiff
path: root/gnu/packages/docbook.scm
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2023-10-09 21:06:00 +0100
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:42:08 +0200
commita373462233e8308caaacae4ef5812d0d51857909 (patch)
tree2ea0a1405b093157bf1f339d2be7449cd823c11d /gnu/packages/docbook.scm
parent5b6c9ca5203b5fe675422a6ef8972e5e11b1e140 (diff)
gnu: docbook2x: Import patches from debian.
* gnu/packages/docbook.scm (docbook2x)[source]: Import patches from debian. Prefer patching in source over 'patch-sources phase. Drop docbook-xml workaround. [arguments]<#:phases>: Drop 'patch-sources. [inputs]: Move after arguments. Remove docbook-xml-4.5. [natine-inputs]: Add autoconf, automake and libtool. * gnu/packages/patches/docbook2x-filename-handling.patch: New file. * gnu/packages/patches/docbook2x-fix-synopsis.patch: Ditto. * gnu/packages/patches/docbook2x-manpage-typo.patch: Ditto. * gnu/packages/patches/docbook2x-preprocessor-declaration.patch: Ditto. * gnu/packages/patches/docbook2x-static-datadir-evaluation.patch: Ditto. * gnu/local.mk: Register it. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/docbook.scm')
-rw-r--r--gnu/packages/docbook.scm59
1 files changed, 28 insertions, 31 deletions
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 8f973d08147..26f8499cc81 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -27,6 +27,7 @@
(define-module (gnu packages docbook)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages imagemagick)
@@ -864,42 +865,27 @@ Detect the differences in markup between two SGML files.
version "/docbook2X-" version ".tar.gz"))
(sha256
(base32
- "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))))
+ "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))
+ (patches
+ (search-patches "docbook2x-filename-handling.patch"
+ "docbook2x-fix-synopsis.patch"
+ "docbook2x-manpage-typo.patch"
+ "docbook2x-preprocessor-declaration.patch"
+ "docbook2x-static-datadir-evaluation.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Fix a failing test (maybe it worked with old texinfo?)
+ #~(begin
+ (substitute* "test/complete-manuals/at1.xml"
+ (("<bridgehead>")
+ "<bridgehead renderas=\"sect2\">"))
+ ;; Force a new autoreconf run.
+ (delete-file "configure")))))
(build-system gnu-build-system)
- (inputs
- (list bash-minimal
- docbook-xml-4.5
- perl
- perl-xml-namespacesupport
- perl-xml-parser
- perl-xml-sax
- perl-xml-sax-base
- texinfo
- libxslt))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
- (add-after 'configure 'patch-sources
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Fix failed substitution in config.pl
- (substitute* "perl/config.pl"
- (("\\$\\{prefix\\}")
- #$output))
- ;; Fix a failing test (maybe it worked with old texinfo?)
- (substitute* "test/complete-manuals/at1.xml"
- (("<bridgehead>")
- "<bridgehead renderas=\"sect2\">"))
- ;; Patch all the tests use DocBook 4.5
- (substitute* (find-files "test" "\\.xml$")
- (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
- "\"-//OASIS//DTD DocBook XML V4.5//EN\"")
- (("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"")
- "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""))
- ;; Set XML catalogs for tests to pass
- (setenv "XML_CATALOG_FILES"
- (string-append (assoc-ref inputs "docbook-xml")
- "/xml/dtd/docbook/catalog.xml"))))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((programs
@@ -933,6 +919,17 @@ Detect the differences in markup between two SGML files.
(symlink prog (string-append #$output
"/bin/db2x_" prog)))
'("docbook2man" "docbook2texi")))))))
+ (inputs
+ (list bash-minimal
+ perl
+ perl-xml-namespacesupport
+ perl-xml-parser
+ perl-xml-sax
+ perl-xml-sax-base
+ texinfo
+ libxslt))
+ (native-inputs
+ (list autoconf automake libtool))
(home-page "https://docbook2x.sourceforge.net")
(synopsis "Convert DocBook to man page and Texinfo format")
(description