gnu: r-fields: Update to 11.4.
[jackhill/guix/guix.git] / gnu / packages / docbook.scm
index 1c00e56..ee09b9d 100644 (file)
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system python))
 
+(define-public docbook-xml-5
+  (package
+    (name "docbook-xml")
+    (version "5.0.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.docbook.org/xml/" version
+                                  "/docbook-" version ".zip"))
+              (sha256
+               (base32
+                "1iz3hq1lqgnshvlz4j9gvh4jy1ml74qf90vqf2ikbq0h4i2xzybs"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let* ((unzip
+                 (string-append (assoc-ref %build-inputs "unzip")
+                                "/bin/unzip"))
+                (source (assoc-ref %build-inputs "source"))
+                (out    (assoc-ref %outputs "out"))
+                (dtd    (string-append out "/xml/dtd/docbook")))
+           (invoke unzip source)
+           (mkdir-p dtd)
+           (copy-recursively (string-append "docbook-" ,version) dtd)
+           (with-directory-excursion dtd
+             (substitute* (string-append out "/xml/dtd/docbook/catalog.xml")
+               (("uri=\"")
+                (string-append
+                 "uri=\"file://" dtd "/")))
+             #t)))))
+    (native-inputs `(("unzip" ,unzip)))
+    (home-page "https://docbook.org")
+    (synopsis "DocBook XML DTDs for document authoring")
+    (description
+     "DocBook is general purpose XML and SGML document type particularly well
+suited to books and papers about computer hardware and software (though it is
+by no means limited to these applications.)  This package provides XML DTDs.")
+    (license (x11-style "" "See file headers."))))
+
 (define-public docbook-xml
   (package
+    (inherit docbook-xml-5)
     (name "docbook-xml")
     (version "4.5")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://www.docbook.org/xml/" version
+              (uri (string-append "https://www.docbook.org/xml/" version
                                   "/docbook-xml-" version ".zip"))
               (sha256
                (base32
                 "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf"))))
-    (build-system trivial-build-system)
     (arguments
      '(#:builder (begin
                    (use-modules (guix build utils))
                      (with-directory-excursion dtd
                        (invoke unzip source))
                      (substitute* (string-append out "/xml/dtd/docbook/catalog.xml")
-                       (("uri=\"") 
-                        (string-append 
+                       (("uri=\"")
+                        (string-append
                          "uri=\"file://" dtd "/")))
                      #t))
-                 #:modules ((guix build utils))))
-    (native-inputs `(("unzip" ,unzip)))
-    (home-page "http://docbook.org")
-    (synopsis "DocBook XML DTDs for document authoring")
-    (description
-     "DocBook is general purpose XML and SGML document type particularly well
-suited to books and papers about computer hardware and software (though it is
-by no means limited to these applications.)  This package provides XML DTDs.")
-    (license (x11-style "" "See file headers."))))
+                 #:modules ((guix build utils))))))
 
 (define-public docbook-xml-4.4
   (package (inherit docbook-xml)
     (version "4.4")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://www.docbook.org/xml/" version
+              (uri (string-append "https://www.docbook.org/xml/" version
                                   "/docbook-xml-" version ".zip"))
               (sha256
                (base32
@@ -90,7 +124,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
     (version "4.3")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://www.docbook.org/xml/" version
+              (uri (string-append "https://www.docbook.org/xml/" version
                                   "/docbook-xml-" version ".zip"))
               (sha256
                (base32
@@ -101,7 +135,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
     (version "4.2")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://www.docbook.org/xml/" version
+              (uri (string-append "https://www.docbook.org/xml/" version
                                   "/docbook-xml-" version ".zip"))
               (sha256
                (base32
@@ -112,7 +146,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
     (version "4.1.2")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://www.docbook.org/xml/" version
+              (uri (string-append "https://www.docbook.org/xml/" version
                                   "/docbkx412.zip"))
               (sha256
                (base32
@@ -138,11 +172,15 @@ by no means limited to these applications.)  This package provides XML DTDs.")
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/docbook/docbook-xsl/"
                                   version "/docbook-xsl-" version ".tar.bz2"))
-              ;; Note: If removing all patches, the XZ dependency is no longer needed.
               (patches (search-patches "docbook-xsl-nonrecursive-string-subst.patch"))
               (sha256
                (base32
-                "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj"))))
+                "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (for-each delete-file (find-files "." "\\.jar$"))
+                  #t))))
     (build-system trivial-build-system)
     (arguments
      `(#:builder (let ((name-version (string-append ,name "-" ,version)))
@@ -168,9 +206,9 @@ by no means limited to these applications.)  This package provides XML DTDs.")
                      #t))
        #:modules ((guix build utils))))
     (native-inputs `(("bzip2" ,bzip2)
-                     ("xz" ,xz)
+                     ("xz" ,xz)         ;needed for repacked tarballs
                      ("tar" ,tar)))
-    (home-page "http://docbook.org")
+    (home-page "https://docbook.org")
     (synopsis "DocBook XSL style sheets for document authoring")
     (description
      "This package provides XSL style sheets for DocBook.")
@@ -179,7 +217,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
 (define-public dblatex
   (package
     (name "dblatex")
-    (version "0.3.10")
+    (version "0.3.11")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/dblatex/dblatex/"
@@ -187,11 +225,11 @@ by no means limited to these applications.)  This package provides XML DTDs.")
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1yicd861rqz78i2khl35j7nvc0ccv4jx4hzqrbhll17082vrdmkg"))))
+                "0rp1bc2lgisigscq1i7zxfd2qdaxxxld6khbcxss4pq7fpi9fzkv"))))
     (build-system python-build-system)
     ;; TODO: Add xfig/transfig for fig2dev utility
     (inputs
-     `(("texlive" ,(texlive-union (list texlive-latex-amsfonts
+     `(("texlive" ,(texlive-union (list texlive-amsfonts
                                         texlive-latex-anysize
                                         texlive-latex-appendix
                                         texlive-latex-changebar
@@ -215,7 +253,6 @@ by no means limited to these applications.)  This package provides XML DTDs.")
                                         texlive-latex-url
                                         texlive-latex-wasysym
 
-                                        texlive-fonts-amsfonts
                                         texlive-fonts-ec
                                         texlive-fonts-rsfs
                                         texlive-fonts-stmaryrd