guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates updated: gnu: docbook-xml-4.1.2: Install an XML cata


From: guix-commits
Subject: branch core-updates updated: gnu: docbook-xml-4.1.2: Install an XML catalog file.
Date: Fri, 18 Mar 2022 01:25:52 -0400

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch core-updates
in repository guix.

The following commit(s) were added to refs/heads/core-updates by this push:
     new 806824c2c0 gnu: docbook-xml-4.1.2: Install an XML catalog file.
806824c2c0 is described below

commit 806824c2c0432aa6894f1382951faf507b06d2f4
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Mar 2 23:25:34 2022 -0500

    gnu: docbook-xml-4.1.2: Install an XML catalog file.
    
    * gnu/packages/docbook.scm (docbook-xml-4.1.2)[builder]: Generate a catalog
    file.
    [native-inputs]: Add libxml2.
---
 gnu/packages/docbook.scm | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 41aeed6e27..47426bec0f 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 Andrew Whatson <whatson@gmail.com>
@@ -153,7 +153,8 @@ by no means limited to these applications.)  This package 
provides XML DTDs.")
                 "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c"))))))
 
 (define-public docbook-xml-4.1.2
-  (package (inherit docbook-xml)
+  (package
+    (inherit docbook-xml)
     (version "4.1.2")
     (source (origin
               (method url-fetch)
@@ -167,13 +168,22 @@ by no means limited to these applications.)  This package 
provides XML DTDs.")
        #:builder
        (begin
          (use-modules (guix build utils))
-         (let ((source (assoc-ref %build-inputs "source"))
-               (unzip  (string-append (assoc-ref %build-inputs "unzip")
-                                      "/bin/unzip"))
-               (dtd    (string-append (assoc-ref %outputs "out")
-                                      "/xml/dtd/docbook")))
+         (let* ((source (assoc-ref %build-inputs "source"))
+                (unzip  (string-append (assoc-ref %build-inputs "unzip")
+                                       "/bin/unzip"))
+                (xmlcatalog  (string-append (assoc-ref %build-inputs "libxml2")
+                                            "/bin/xmlcatalog"))
+                (dtd    (string-append (assoc-ref %outputs "out")
+                                       "/xml/dtd/docbook"))
+                (catalog.xml (string-append dtd "/catalog.xml")))
            (mkdir-p dtd)
-           (invoke unzip source "-d" dtd)))))))
+           (invoke unzip source "-d" dtd)
+           ;; Create a minimal XML catalog, to use with libxml2 tools.
+           (invoke xmlcatalog "--noout" "--create" catalog.xml)
+           (invoke xmlcatalog "--noout" "--add" "public"
+                   "-//OASIS//DTD DocBook XML V4.1.2//EN"
+                   (string-append dtd "/docbookx.dtd") catalog.xml)))))
+    (native-inputs (list libxml2 unzip))))
 
 (define-public docbook-xsl
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]