diff --git a/Makefile.am b/Makefile.am index 8c505d8cd3..645026a9ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -436,7 +436,8 @@ AUX_FILES = \ gnu/packages/aux-files/python/sanity-check.py \ gnu/packages/aux-files/python/sitecustomize.py \ gnu/packages/aux-files/renpy/renpy.in \ - gnu/packages/aux-files/run-in-namespace.c + gnu/packages/aux-files/run-in-namespace.c \ + gnu/packages/aux-files/xml/patch-catalog-xml.xsl # Templates, examples. EXAMPLES = \ diff --git a/gnu/packages/aux-files/xml/patch-catalog-xml.xsl b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl new file mode 100644 index 0000000000..947517476d --- /dev/null +++ b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl @@ -0,0 +1,24 @@ + + + + + / + + + + + + + + + + + + + + diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 1816b19685..a9c92459c2 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2021 Mark H Weaver ;;; Copyright © 2021 Efraim Flashner ;;; Copyright © 2021 Andrew Whatson +;;; Copyright © 2023 Bruno Victal ;;; ;;; This file is part of GNU Guix. ;;; @@ -71,11 +72,22 @@ (define-public docbook-xml-5 (lambda _ ;; XXX: These files do not need 0755 permission. (for-each (cut chmod <> #o644) (find-files ".")))) + (add-before 'install 'patch-catalog-xml + (lambda* (#:key inputs #:allow-other-keys) + (let ((xsltproc (search-input-file inputs "/bin/xsltproc")) + (dtd-path (string-append #$output "/xml/dtd/docbook"))) + (invoke xsltproc "--nonet" "--noout" + "--stringparam" "prefix" dtd-path + "--output" "catalog.xml.new" + #$(local-file + (search-auxiliary-file "xml/patch-catalog-xml.xsl")) + "catalog.xml") + (rename-file "catalog.xml.new" "catalog.xml")))) (replace 'install (lambda _ (let ((dtd-path (string-append #$output "/xml/dtd/docbook"))) (copy-recursively "." dtd-path))))))) - (native-inputs (list unzip)) + (native-inputs (list libxslt unzip)) (home-page "https://docbook.org") (synopsis "DocBook XML DTDs for document authoring") (description