From: John Darrington <jmd@gnu.org>
To: guix-devel@gnu.org
Cc: John Darrington <jmd@gnu.org>
Subject: [PATCH] gnu: Do not skip generation of documentation
Date: Sat, 12 Jul 2014 17:30:23 +0200 [thread overview]
Message-ID: <1405179023-5601-1-git-send-email-jmd@gnu.org> (raw)
* 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
next reply other threads:[~2014-07-12 15:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-12 15:30 John Darrington [this message]
2014-07-13 13:33 ` [PATCH] gnu: Do not skip generation of documentation Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405179023-5601-1-git-send-email-jmd@gnu.org \
--to=jmd@gnu.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.