diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-10-09 21:06:08 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-08-31 10:42:09 +0200 |
commit | 1ddb4dde8b1bf2f59c1bfda233bb3606ca062d75 (patch) | |
tree | c70f4a69266224e4a9ab5dd43150b3a39d561383 /gnu | |
parent | 3c68b3847afe733846bc0d41f832dd871bd37912 (diff) | |
download | guix-1ddb4dde8b1bf2f59c1bfda233bb3606ca062d75.tar.gz guix-1ddb4dde8b1bf2f59c1bfda233bb3606ca062d75.zip |
gnu: Add docbook-mathml-1.0.
* gnu/packages/docbook.scm (docbook-mathml-1.0): New variable.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/docbook.scm | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 74dbd02138..6d5f1d34a7 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -279,6 +279,65 @@ downloading from @var{source}, where @var{version} is a string and (modify-inputs (package-native-inputs template) (prepend libxml2)))))) +(define-public docbook-mathml-1.0 + (package + (name "docbook-mathml") + (version "1.0") + (source (origin + (method url-fetch) + (uri + (string-append "https://www.oasis-open.org/docbook/xml/mathml/" + version "/dbmathml.dtd")) + (sha256 + (base32 + "10vmyl29j829w4xn928rznh163pf47gyzbbjjwqrbg2bidfnk7vp")))) + (build-system copy-build-system) + (arguments + (let ((target (format #f "xml/docbook/mathml/~a/" version))) + (list + #:modules '((guix build copy-build-system) + (guix build utils) + (sxml simple) + (srfi srfi-1)) + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'generate-catalog.xml + (lambda _ + (let ((store-uri (string-append "file:" + #$output "/" + #$target "dbmathml.dtd"))) + (call-with-output-file "catalog.xml" + (lambda (port) + (sxml->xml + `(*TOP* + (*PI* xml "version='1.0'") + (catalog (@ (xmlns "urn:oasis:names:tc:entity:xmlns:xml:catalog")) + (public (@ (publicId "-//OASIS//DTD DocBook MathML Module V1.0//EN") + (uri ,store-uri))) + ,@(map + (lambda (scheme) + `(system + (@ (systemId + ,(string-append scheme + "://www.oasis-open.org/docbook/xml/" + "mathml/1.0/dbmathml.dtd")) + (uri ,store-uri)))) + '("http" "https")))) + port))))))) + #:install-plan + #~`(("catalog.xml" #$target) + ("dbmathml.dtd" #$target))))) + (propagated-inputs + ;; These must be propagated for the package to make sense. + ;; TODO: Package MathML2 DTD and propagate it as well. + (list docbook-xml-4.1.2)) + (home-page + "https://www.oasis-open.org/docbook/xml/mathml/1.0/index.1.shtml") + (synopsis "MathML support for DocBook XML V4.1.2.") + (description "The DocBook MathML Module is an extension to DocBook XML +V4.1.2 that adds support for MathML in equation markup.") + (license (license:non-copyleft "" "See file headers.")))) + (define-public docbook-xml docbook-xml-5.1) ;;; There's an issue in docbook-xsl 1.79.2 that causes manpages to be |