gnu: nftables: Update to 0.8.1.
[jackhill/guix/guix.git] / gnu / packages / documentation.scm
index 8302cc4..9c5ca74 100644 (file)
@@ -3,6 +3,8 @@
 ;;; Copyright © 2014, 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
+;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
+;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +28,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages python)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages docbook)
@@ -34,8 +37,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages perl)
-  #:use-module (gnu packages xml)
-  #:autoload   (gnu packages zip) (unzip))
+  #:use-module (gnu packages xml))
 
 (define-public asciidoc
   (package
     (version "8.6.9")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/asciidoc/asciidoc-"
-                                  version ".tar.gz"))
+              (uri (string-append "mirror://sourceforge/asciidoc/asciidoc/"
+                                  version "/asciidoc-" version ".tar.gz"))
               (sha256
                (base32
                 "1w71nk527lq504njmaf0vzr93pgahkgzzxzglrq6bay8cw2rvnvq"))))
     (build-system gnu-build-system)
-    (arguments '(#:tests? #f))                    ; no 'check' target
-    (inputs `(("python" ,python-2)))
+    (arguments
+     `(#:tests? #f                     ; no 'check' target
+       #:phases
+       (modify-phases %standard-phases
+         ;; Some XML-related binaries are required for asciidoc's proper usage.
+         ;; Without these, asciidoc fails when parsing XML documents, either
+         ;; reporting a missing "xmllint" binary or, when passed the
+         ;; "--no-xmllint" option, a missing "xsltproc" binary.
+         ;; The following phase enables asciidoc to find some of them.
+         (add-before 'configure 'set-xml-binary-paths
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (let* ((libxml2 (assoc-ref inputs "libxml2"))
+                              (xmllint (string-append libxml2 "/bin/xmllint"))
+                              (libxslt (assoc-ref inputs "libxslt"))
+                              (xsltproc (string-append libxslt "/bin/xsltproc")))
+                         (substitute* "a2x.py"
+                           (("XMLLINT = 'xmllint'")
+                            (string-append "XMLLINT = '" xmllint "'"))
+                           (("XSLTPROC = 'xsltproc'")
+                            (string-append "XSLTPROC = '" xsltproc "'")))
+                         #t)))
+         ;; Make asciidoc use the local docbook-xsl package instead of fetching
+         ;; it from the internet at run-time.
+         (add-before 'install 'make-local-docbook-xsl
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (substitute* (find-files "docbook-xsl" ".*\\.xsl$")
+                         (("xsl:import href=\"http://docbook.sourceforge.net/\
+release/xsl/current")
+                          (string-append
+                           "xsl:import href=\""
+                           (string-append (assoc-ref inputs "docbook-xsl")
+                                          "/xml/xsl/docbook-xsl-"
+                                          ,(package-version docbook-xsl)))))
+                       #t))
+         ;; Do the same for docbook-xml.
+         (add-before 'install 'make-local-docbook-xml
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (substitute* "docbook45.conf"
+                         (("http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd")
+                          (string-append (assoc-ref inputs "docbook-xml")
+                                         "/xml/dtd/docbook/docbookx.dtd")))
+                       #t)))))
+    (inputs `(("python" ,python-2)
+              ("docbook-xml" ,docbook-xml)
+              ("docbook-xsl" ,docbook-xsl)
+              ("libxml2" ,libxml2)
+              ("libxslt" ,libxslt)))
     (home-page "http://www.methods.co.nz/asciidoc/")
     (synopsis "Text-based document generation system")
     (description
@@ -67,14 +114,14 @@ markup) can be customized and extended by the user.")
 (define-public doxygen
   (package
     (name "doxygen")
-    (version "1.8.11")
+    (version "1.8.13")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://ftp.stack.nl/pub/users/dimitri/"
                                  name "-" version ".src.tar.gz"))
              (sha256
               (base32
-               "0ja02pm3fpfhc5dkry00kq8mn141cqvdqqpmms373ncbwi38pl35"))
+               "0srzawqn3apzrg8hwycwrawdylmmjrndij4spw6xr1vspn3phrmg"))
              (patches (search-patches "doxygen-test.patch"))))
     (build-system cmake-build-system)
     (native-inputs
@@ -82,8 +129,18 @@ markup) can be customized and extended by the user.")
        ("flex" ,flex)
        ("libxml2" ,libxml2) ; provides xmllint for the tests
        ("python" ,python-2))) ; for creating the documentation
+    (inputs
+     `(("bash" ,bash-minimal)))
     (arguments
-     `(#:test-target "tests"))
+     `(#:test-target "tests"
+       #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'patch-sh
+                              (lambda* (#:key inputs #:allow-other-keys)
+                                (substitute* "src/portable.cpp"
+                                  (("/bin/sh")
+                                   (string-append
+                                    (assoc-ref inputs "bash") "/bin/sh")))
+                                #t)))))
     (home-page "http://www.stack.nl/~dimitri/doxygen/")
     (synopsis "Generate documentation from annotated sources")
     (description "Doxygen is the de facto standard tool for generating
@@ -109,7 +166,7 @@ and to some extent D.")
     (build-system gnu-build-system)
     (native-inputs
      `(("flex" ,flex)
-       ("gettext" ,gnu-gettext)))
+       ("gettext" ,gettext-minimal)))
     (home-page "http://docpp.sourceforge.net/")
     (synopsis "Documentation system for C, C++, IDL, and Java")
     (description
@@ -126,8 +183,8 @@ or Java class files.")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper-"
-                           version ".tar.gz"))
+       (uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper/"
+                           version "/scrollkeeper-" version ".tar.gz"))
        (sha256
         (base32 "1bfxwxc1ngh11v36z899sz9qam366r050fhkyb5adv65lb1x62sa"))))
     (build-system gnu-build-system)