From: Bruno Victal <mirai@makinata.eu>
To: 61015@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#61015] [PATCH v2 4/4] gnu: docbook-xml-4.1.2: Add missing catalog.xml.
Date: Sat, 11 Mar 2023 17:54:13 +0000 [thread overview]
Message-ID: <b4c64e4751ac44d248675e9acddb274aab163352.1678557210.git.mirai@makinata.eu> (raw)
In-Reply-To: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu>
* gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml: New file.
* Makefile.am: Register it.
* gnu/packages/docbook.scm (docbook-xml-4.1.2)[arguments]: Use prebuilt catalog.xml.
[native-inputs]: Add libxml2.
---
Makefile.am | 3 +-
.../xml/docbook-xml/catalog-4.1.2.xml | 31 ++++++++++++++++
gnu/packages/docbook.scm | 36 ++++++++++++++++++-
3 files changed, 68 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml
diff --git a/Makefile.am b/Makefile.am
index 73369c746c..310bbe1494 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -437,7 +437,8 @@ AUX_FILES = \
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/xml/patch-catalog-xml.xsl
+ gnu/packages/aux-files/xml/patch-catalog-xml.xsl \
+ gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml
# Templates, examples.
EXAMPLES = \
diff --git a/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml b/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml
new file mode 100644
index 0000000000..cfb1849202
--- /dev/null
+++ b/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+ <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" uri="docbookx.dtd"/>
+ <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" uri="calstblx.dtd"/>
+ <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN" uri="soextblx.dtd"/>
+ <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" uri="dbpoolx.mod"/>
+ <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" uri="dbhierx.mod"/>
+ <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" uri="dbgenent.mod"/>
+ <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" uri="dbnotnx.mod"/>
+ <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" uri="dbcentx.mod"/>
+ <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN" uri="ent/iso-dia.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" uri="ent/iso-num.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Publishing//EN" uri="ent/iso-pub.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES General Technical//EN" uri="ent/iso-tech.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN" uri="ent/iso-lat1.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN" uri="ent/iso-lat2.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN" uri="ent/iso-grk1.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN" uri="ent/iso-grk2.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN" uri="ent/iso-grk3.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" uri="ent/iso-grk4.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" uri="ent/iso-amsa.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" uri="ent/iso-amsb.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" uri="ent/iso-amsc.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" uri="ent/iso-amsn.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" uri="ent/iso-amso.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" uri="ent/iso-amsr.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN" uri="ent/iso-box.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN" uri="ent/iso-cyr1.ent"/>
+ <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" uri="ent/iso-cyr2.ent"/>
+</catalog>
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 2d11333608..902e418b17 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -39,6 +39,7 @@ (define-module (gnu packages docbook)
#:use-module (gnu packages web-browsers)
#:use-module (gnu packages xml)
#:use-module (guix gexp)
+ #:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
@@ -151,7 +152,40 @@ (define-public docbook-xml-4.1.2
"/docbkx412.zip"))
(sha256
(base32
- "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h"))))))
+ "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments docbook-xml)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'copy-catalog-file
+ ;; docbook-xml-4.1.2 is unique in the fact that it doesn't come
+ ;; with a catalog.xml file, requiring it to be generated by hand
+ ;; from the docbook.cat SGML catalog. We could automatically
+ ;; generate it here at the cost of enlarging the package
+ ;; definition with a rudimentary (PEG) parser for the SGML
+ ;; catalog but this is overkill since this file is unlikely to
+ ;; change, therefore we ship a pre-generated catalog.xml.
+ (lambda _
+ (copy-file
+ #$(local-file
+ (search-auxiliary-file
+ "xml/docbook-xml/catalog-4.1.2.xml"))
+ "catalog.xml")))
+ (add-after 'patch-catalog-xml 'add-rewrite-entries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((xmlcatalog (search-input-file inputs "/bin/xmlcatalog"))
+ (dtd-path (string-append #$output "/xml/dtd/docbook")))
+ (for-each
+ (lambda (type)
+ (invoke xmlcatalog "--noout"
+ "--add" type
+ "http://www.oasis-open.org/docbook/xml/4.1.2/"
+ (string-append "file://" dtd-path "/")
+ "catalog.xml"))
+ (list "rewriteSystem" "rewriteURI")))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs docbook-xml)
+ (prepend libxml2)))))
(define-public docbook-xsl
(package
--
2.39.1
next prev parent reply other threads:[~2023-03-11 17:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 3:31 [bug#61015] [PATCH core-updates 0/9] Modernize and fix docbook-xml Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 1/9] gnu: docbook-xml: Use copy-build-system Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 2/9] gnu: docbook-xml-4.1.2: Adapt to copy-build-system Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 3/9] gnu: docbook-xml: " Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 4/9] gnu: docbook-xml-4.4: " Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 5/9] gnu: docbook-xml-4.3: " Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 6/9] gnu: docbook-xml-4.2: " Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 7/9] gnu: docbook-xml: Fix permissions Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 8/9] gnu: docbook-xml: Use XSLT to patch catalog.xml Bruno Victal
2023-01-23 3:32 ` [bug#61015] [PATCH core-updates 9/9] gnu: docbook-xml-4.1.2: Add missing catalog.xml Bruno Victal
2023-03-06 15:22 ` [bug#61015] [PATCH core-updates 0/9] Modernize and fix docbook-xml Bruno Victal
2023-03-11 17:54 ` [bug#61015] [PATCH v2 1/4] gnu: docbook-xml: Use copy-build-system Bruno Victal
2023-03-11 17:54 ` [bug#61015] [PATCH v2 2/4] gnu: docbook-xml: Fix permissions Bruno Victal
2023-03-11 17:54 ` [bug#61015] [PATCH v2 3/4] gnu: docbook-xml: Use XSLT to patch catalog.xml Bruno Victal
2023-03-11 17:54 ` Bruno Victal [this message]
2023-04-21 4:45 ` bug#61015: [PATCH core-updates 0/9] Modernize and fix docbook-xml Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4c64e4751ac44d248675e9acddb274aab163352.1678557210.git.mirai@makinata.eu \
--to=mirai@makinata.eu \
--cc=61015@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.