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/packages/docbook.scm | |
| parent | 3c68b3847afe733846bc0d41f832dd871bd37912 (diff) | |
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/packages/docbook.scm')
| -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 74dbd02138a..6d5f1d34a74 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 | |||
| 279 | (modify-inputs (package-native-inputs template) | 279 | (modify-inputs (package-native-inputs template) |
| 280 | (prepend libxml2)))))) | 280 | (prepend libxml2)))))) |
| 281 | 281 | ||
| 282 | (define-public docbook-mathml-1.0 | ||
| 283 | (package | ||
| 284 | (name "docbook-mathml") | ||
| 285 | (version "1.0") | ||
| 286 | (source (origin | ||
| 287 | (method url-fetch) | ||
| 288 | (uri | ||
| 289 | (string-append "https://www.oasis-open.org/docbook/xml/mathml/" | ||
| 290 | version "/dbmathml.dtd")) | ||
| 291 | (sha256 | ||
| 292 | (base32 | ||
| 293 | "10vmyl29j829w4xn928rznh163pf47gyzbbjjwqrbg2bidfnk7vp")))) | ||
| 294 | (build-system copy-build-system) | ||
| 295 | (arguments | ||
| 296 | (let ((target (format #f "xml/docbook/mathml/~a/" version))) | ||
| 297 | (list | ||
| 298 | #:modules '((guix build copy-build-system) | ||
| 299 | (guix build utils) | ||
| 300 | (sxml simple) | ||
| 301 | (srfi srfi-1)) | ||
| 302 | #:phases | ||
| 303 | #~(modify-phases %standard-phases | ||
| 304 | (add-before 'install 'generate-catalog.xml | ||
| 305 | (lambda _ | ||
| 306 | (let ((store-uri (string-append "file:" | ||
| 307 | #$output "/" | ||
| 308 | #$target "dbmathml.dtd"))) | ||
| 309 | (call-with-output-file "catalog.xml" | ||
| 310 | (lambda (port) | ||
| 311 | (sxml->xml | ||
| 312 | `(*TOP* | ||
| 313 | (*PI* xml "version='1.0'") | ||
| 314 | (catalog (@ (xmlns "urn:oasis:names:tc:entity:xmlns:xml:catalog")) | ||
| 315 | (public (@ (publicId "-//OASIS//DTD DocBook MathML Module V1.0//EN") | ||
| 316 | (uri ,store-uri))) | ||
| 317 | ,@(map | ||
| 318 | (lambda (scheme) | ||
| 319 | `(system | ||
| 320 | (@ (systemId | ||
| 321 | ,(string-append scheme | ||
| 322 | "://www.oasis-open.org/docbook/xml/" | ||
| 323 | "mathml/1.0/dbmathml.dtd")) | ||
| 324 | (uri ,store-uri)))) | ||
| 325 | '("http" "https")))) | ||
| 326 | port))))))) | ||
| 327 | #:install-plan | ||
| 328 | #~`(("catalog.xml" #$target) | ||
| 329 | ("dbmathml.dtd" #$target))))) | ||
| 330 | (propagated-inputs | ||
| 331 | ;; These must be propagated for the package to make sense. | ||
| 332 | ;; TODO: Package MathML2 DTD and propagate it as well. | ||
| 333 | (list docbook-xml-4.1.2)) | ||
| 334 | (home-page | ||
| 335 | "https://www.oasis-open.org/docbook/xml/mathml/1.0/index.1.shtml") | ||
| 336 | (synopsis "MathML support for DocBook XML V4.1.2.") | ||
| 337 | (description "The DocBook MathML Module is an extension to DocBook XML | ||
| 338 | V4.1.2 that adds support for MathML in equation markup.") | ||
| 339 | (license (license:non-copyleft "" "See file headers.")))) | ||
| 340 | |||
| 282 | (define-public docbook-xml docbook-xml-5.1) | 341 | (define-public docbook-xml docbook-xml-5.1) |
| 283 | 342 | ||
| 284 | ;;; There's an issue in docbook-xsl 1.79.2 that causes manpages to be | 343 | ;;; There's an issue in docbook-xsl 1.79.2 that causes manpages to be |
