diff options
author | Leo Famulari <leo@famulari.name> | 2021-02-09 15:09:43 -0500 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2021-02-09 15:09:43 -0500 |
commit | 388bd35dd0df2d231bc2cce3746d7d5fd15df23a (patch) | |
tree | 82e7cc45b8279f83439214c7c79dc7161ffda94d /gnu/packages/docbook.scm | |
parent | f1c7c2f697877fcb68b53ea062ff8a88f274a2fe (diff) | |
parent | d00380b0077b0df2a0b790bb115d07c1533b8863 (diff) | |
download | guix-patches-388bd35dd0df2d231bc2cce3746d7d5fd15df23a.tar guix-patches-388bd35dd0df2d231bc2cce3746d7d5fd15df23a.tar.gz |
Merge branch 'master' into staging-next
Diffstat (limited to 'gnu/packages/docbook.scm')
-rw-r--r-- | gnu/packages/docbook.scm | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 236c7e2819..889bb96010 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -4,6 +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> ;;; ;;; This file is part of GNU Guix. ;;; @@ -214,6 +215,168 @@ by no means limited to these applications.) This package provides XML DTDs.") "This package provides XSL style sheets for DocBook.") (license (x11-style "" "See 'COPYING' file.")))) +(define-public docbook-dsssl + (package + (name "docbook-dsssl") + (version "1.79") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/docbook/" + name "/" version "/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig")))) + (build-system trivial-build-system) + (outputs '("out" "doc")) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (dtd (string-append (assoc-ref %outputs "out") + "/sgml/dtd/docbook")) + (docbook-dsssl-doc (assoc-ref %build-inputs "docbook-dsssl-doc")) + (doc (assoc-ref %outputs "doc")) + (tar (assoc-ref %build-inputs "tar")) + (bzip2 (assoc-ref %build-inputs "bzip2"))) + (setenv "PATH" (string-append tar "/bin" ":" bzip2 "/bin")) + (mkdir-p dtd) + (invoke "tar" "-xf" source "-C" dtd) + ;; The doc output contains 1.4 MiB of HTML documentation. + (symlink docbook-dsssl-doc doc))))) + (inputs + `(("docbook-dsssl-doc" ,docbook-dsssl-doc))) + (native-inputs + `(("bzip2", bzip2) + ("tar" ,tar))) + (home-page "https://docbook.org/") + (synopsis "DSSSL style sheets for DocBook") + (description "This package provides DSSSL style sheets for DocBook.") + (license (non-copyleft "file://README")))) + +;;; Private variable, used as the 'doc' output of the docbook-dsssl package. +(define docbook-dsssl-doc + (package + (name "docbook-dsssl-doc") + (version "1.79") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/docbook/" + name "/" version "/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "1plp5ngc96pbna4rwglp9glcadnirbm3hlcjb4gjvq1f8biic9lz")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (docdir (string-append (assoc-ref %outputs "out") + "/share/doc/" "docbook-dsssl-" ,version)) + (tar (assoc-ref %build-inputs "tar")) + (bzip2 (assoc-ref %build-inputs "bzip2"))) + (setenv "PATH" (string-append tar "/bin" ":" bzip2 "/bin")) + (mkdir-p docdir) + ;; Extract the "doc" subdirectory. + (invoke "tar" "-xf" source "--strip-components=2" + "--no-same-owner" "-C" docdir + (string-append "docbook-dsssl-" ,version "/doc")))))) + (native-inputs + `(("bzip2", bzip2) + ("tar" ,tar))) + (home-page "https://docbook.org/") + (synopsis "DocBook DSSSL style sheets documentation") + (description "Documentation for the DocBook DSSSL style sheets.") + (license (non-copyleft "file://doc/LEGALNOTICE.htm")))) + +(define-public docbook-sgml + (package + (name "docbook-sgml") + (version "4.1") + (source (origin + (method url-fetch) + (uri (string-append "https://www.oasis-open.org/docbook/sgml/" + version "/docbk41.zip")) + (sha256 + (base32 + "04b3gp4zkh9c5g9kvnywdkdfkcqx3kjc04j4mpkr4xk7lgqgrany")))) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (iso-entities-dir (string-append + (assoc-ref %build-inputs "iso-8879-entities"))) + (unzip (string-append (assoc-ref %build-inputs "unzip") + "/bin/unzip")) + (dtd (string-append (assoc-ref %outputs "out") + "/sgml/dtd/docbook"))) + ;; Extract the sources. + (mkdir-p dtd) + (chdir dtd) + (invoke unzip source) + ;; Reference the ISO 8879 character entities. + ;; e.g. "iso-lat1.gml" --> "<iso-entities-dir>/ISOlat1" + (substitute* "docbook.cat" + (("(.*ISO 8879.*)\"iso-(.*)\\.gml\"" _ head name) + (string-append head "\"" iso-entities-dir "/ISO" name "\""))))))) + (native-inputs + `(("unzip" ,unzip))) + (inputs + `(("iso-8879-entities" ,iso-8879-entities))) + (home-page "https://docbook.org") + (synopsis "DocBook SGML style sheets for document authoring") + (description "This package provides SGML style sheets for DocBook.") + (license (x11-style "" "See file headers.")))) + +(define-public docbook-sgml-3.1 + (package + (inherit docbook-sgml) + (version "3.1") + (source (origin + (method url-fetch) + (uri (string-append "https://www.oasis-open.org/docbook/sgml/" + version "/docbk31.zip")) + (sha256 + (base32 + "0f25ch7bywwhdxb1qa0hl28mgq1blqdap3rxzamm585rf4kis9i0")))))) + +;;; Private package referenced by docbook-sgml. +(define iso-8879-entities + (package + (name "iso-8879-entities") + (version "0.0") ;no proper version + (source (origin + (method url-fetch) + (uri "http://www.oasis-open.org/cover/ISOEnts.zip") + (sha256 + (base32 + "1clrkaqnvc1ja4lj8blr0rdlphngkcda3snm7b9jzvcn76d3br6w")))) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (unzip (string-append (assoc-ref %build-inputs "unzip") + "/bin/unzip")) + (out (string-append (assoc-ref %outputs "out")))) + (invoke unzip source "-d" out))))) + (native-inputs `(("unzip" ,unzip))) + (home-page "https://www.oasis-open.org/") + (synopsis "ISO 8879 character entities") + (description "ISO 8879 character entities that are typically used in +the in DocBook SGML DTDs.") + (license (x11-style "" "See file headers.")))) + (define-public dblatex (package (name "dblatex") |