From a4ee35143ba9e8a9c84d4649a18503a473779f22 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 11 Mar 2021 09:39:52 -0500 Subject: [PATCH 06/11] gnu: glib-with-documentation: Fix documentation build. * gnu/packages/glib.scm (glib-with-documentation) [native-inputs]: Add docbook-4.2. Remove libxml2. [arguments]<#:phases>['patch-docbook-xml]: New phase. --- gnu/packages/glib.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index f8d23e5802..07e65e49f5 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -307,7 +307,8 @@ functions for strings and common data structures.") (properties (alist-delete 'hidden? (package-properties glib))) (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference (native-inputs - `(("docbook-xml" ,docbook-xml) + `(("docbook-xml-4.2" ,docbook-xml-4.2) + ("docbook-xml-4.5" ,docbook-xml) ("gtk-doc" ,gtk-doc) ; for the doc ("libxml2" ,libxml2) ,@(package-native-inputs glib))) @@ -317,6 +318,19 @@ functions for strings and common data structures.") `(cons "-Dgtk_doc=true" ,flags)) ((#:phases phases) `(modify-phases ,phases + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs/reference" + (substitute* '("gio/gdbus-object-manager-example/.*\\.xml" + "gio/.*\\.xml" "glib/.*\\.xml" "gobject/.*\\.xml") + (("http://www.oasis-open.org/docbook/xml/4.5/") + (string-append (assoc-ref inputs "docbook-xml-4.5") + "/xml/dtd/docbook/"))) + (substitute* "gio/gio.xml" + (("http://www.oasis-open.org/docbook/xml/4.2/") + (string-append (assoc-ref inputs "docbook-xml-4.2") + "/xml/dtd/docbook/")))) + #t)) (add-after 'install 'move-doc (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -- 2.30.1