guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gnu: Do not skip generation of documentation


From: John Darrington
Subject: [PATCH] gnu: Do not skip generation of documentation
Date: Sat, 12 Jul 2014 17:30:23 +0200

* gnu/packages/docbook.scm (docbook-xml): Substitute remote uris by local ones
* gnu/packages/docbook.scm (docbook-xml-4.4, docbook-xml-4.3): New variables.
* gnu/packages/docbook.scm (docbook-xsl): Update to version 1.78.1, and 
substitute
        remote uris with local ones.
* gnu/packages/gnome.scm (gnome-doc-utils): Do not skip tests.
* gnu/packages/web.scm (tinyproxy): Cleanup XML_CATALOG_FILES workaround.
---
 gnu/packages/docbook.scm |   51 ++++++++++++++++++++++++++++++++++++++--------
 gnu/packages/gnome.scm   |   15 ++++++++++++--
 gnu/packages/web.scm     |   31 +++++++++++-----------------
 3 files changed, 67 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 29fa409..ea413c6 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -50,8 +50,12 @@
                           (dtd    (string-append out "/xml/dtd/docbook")))
                      (mkdir-p dtd)
                      (with-directory-excursion dtd
-                       (system* unzip source))))
-       #:modules ((guix build utils))))
+                       (system* unzip source))
+                     (substitute* (string-append out 
"/xml/dtd/docbook/catalog.xml")
+                       (("uri=\"") 
+                        (string-append 
+                         "uri=\"file://" dtd "/")))))
+                 #:modules ((guix build utils))))
     (native-inputs `(("unzip" ,unzip)))
     (home-page "http://docbook.org";)
     (synopsis "DocBook XML DTDs for document authoring")
@@ -61,20 +65,46 @@ 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-4.4
+  (package (inherit docbook-xml)
+   (version "4.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.docbook.org/xml/"; version
+                                  "/docbook-xml-" version ".zip"))
+              (sha256
+               (base32
+                "141h4zsyc71sfi2zzd89v4bb4qqq9ca1ri9ix2als9f4i3mmkw82"))))))
+
+
+(define-public docbook-xml-4.3
+  (package (inherit docbook-xml)
+   (version "4.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.docbook.org/xml/"; version
+                                  "/docbook-xml-" version ".zip"))
+              (sha256
+               (base32
+                "0r1l2if1z4wm2v664sqdizm4gak6db1kx9y50jq89m3gxaa8l1i3"))))))
+
+
+
 (define-public docbook-xsl
   (package
     (name "docbook-xsl")
-    (version "1.72.0")
+    (version "1.78.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/docbook/docbook-xsl-"
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1cnrfgqz8pc9wnlgqjch2338ad7jki6d4h6b2fhaxn1a2201df5k"))))
+                "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9"))))
     (build-system trivial-build-system)
     (arguments
-     `(#:builder (begin
+     `(#:builder (let ((name-version (string-append ,name "-" ,version)))
                    (use-modules (guix build utils))
 
                    (let* ((bzip2  (assoc-ref %build-inputs "bzip2"))
@@ -86,10 +116,13 @@ by no means limited to these applications.)  This package 
provides XML DTDs.")
                      (system* (string-append tar "/bin/tar") "xvf" source)
 
                      (mkdir-p xsl)
-                     (copy-recursively (string-append ,name "-" ,version)
-                                       (string-append xsl "/" ,name
-                                                      "-" ,version))))
-       #:modules ((guix build utils))))
+                     (copy-recursively name-version
+                                       (string-append xsl "/" name-version))
+
+                     (substitute* (string-append xsl "/" name-version 
"/catalog.xml")
+                       (("rewritePrefix=\"./") 
+                        (string-append "rewritePrefix=\"file://" xsl "/" 
name-version "/")))))
+                 #:modules ((guix build utils))))
     (native-inputs `(("bzip2" ,bzip2)
                      ("tar" ,tar)))
     (home-page "http://docbook.org";)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 6992116..3811fa6 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -26,6 +26,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages flex)  
+  #:use-module (gnu packages docbook)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gstreamer)
@@ -137,14 +138,24 @@ The gnome-about program helps find which version of GNOME 
is installed.")
        (base32
         "19n4x25ndzngaciiyd8dd6s2mf9gv6nv3wv27ggns2smm7zkj1nb"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (alist-cons-before
+        'check 'pre-check
+        (lambda* (#:key inputs #:allow-other-keys #:rest args)
+          ;; This is needed, because without it, xmlint etc tries
+          ;; to download docbookx.dtd from the net
+          (setenv "XML_CATALOG_FILES" 
+                  (string-append (assoc-ref inputs "docbook-xml") 
+                                 "/xml/dtd/docbook/catalog.xml")))
+        %standard-phases)))
     (native-inputs
      `(("intltool" ,intltool)
+       ("docbook-xml" ,docbook-xml-4.4)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
        ("pkg-config" ,pkg-config)
        ("python-2" ,python-2)))
-    (arguments
-     `(#:tests? #f)) ; tries to load 
http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
     (home-page "https://wiki.gnome.org/GnomeDocUtils";)
     (synopsis
      "Documentation utilities for the Gnome project")
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 6e94953..6c8e38a 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -528,26 +528,19 @@ help you implement simple HTTP servers.")
        (alist-cons-before
         'build 'pre-build
         (lambda* (#:key inputs #:allow-other-keys #:rest args)
-          ;; This stuff is needed, because without it, xmlint etc tries
-          ;; to download docbookx.dtd and docbook.xsl from the net
-          (let ((build (assoc-ref %standard-phases 'build))
-                (docbook-xml (assoc-ref inputs "docbook-xml"))
-                (docbook-xsl (assoc-ref inputs "docbook-xsl"))
-                (our-catalog "/tmp/docbook-xml.xml"))
-            (setenv "XML_CATALOG_FILES" our-catalog)
-            (with-output-to-file our-catalog
-              (lambda ()
-                (display (string-append
-                          "<?xml version=\"1.0\"?>
-<!DOCTYPE catalog PUBLIC \"-//OASIS//DTD XML Catalogs V1.0//EN\"
-\"file:///usr/share/xml/schema/xml-core/catalog.dtd\">
-<catalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\">
-<system systemId=\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\";
-uri=\"file://" docbook-xml  "/xml/dtd/docbook/docbookx.dtd\"/>
-<system 
systemId=\"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\";
-uri=\"file://" docbook-xsl  
"/xml/xsl/docbook-xsl-1.72.0/manpages/docbook.xsl\"/>
-</catalog>\n"))))))
+
+          ;; Uncommenting the next two lines may assist in debugging
+          ;; (substitute* "docs/man5/Makefile" (("a2x") "a2x -v"))
+          ;; (setenv "XML_DEBUG_CATALOG" "1")
+
+          (setenv "XML_CATALOG_FILES" 
+                  (string-append
+                   (assoc-ref inputs "docbook-xsl") 
"/xml/xsl/docbook-xsl-1.78.1/catalog.xml"
+                   " "  ; This must be a space, not a : (contrary to the 
documentation)
+                   (assoc-ref inputs "docbook-xml") 
"/xml/dtd/docbook/catalog.xml"
+                   )))
         %standard-phases)))
+
     ;; All of the below are used to generate the documentation
     ;; (Should they be propagated inputs of asciidoc ??)
     (native-inputs `(("asciidoc" ,asciidoc)
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]