>From 160c6a756386e0464938e6784f579c156d6e2c2e Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 24 Sep 2020 08:39:00 -0400 Subject: [PATCH 13/13] gnu: glib-with-documentation: Fix documentation. * gnu/packages/glib.scm (glib-with-documentation) [arguments]<#:phases>['patch-docbook-xml]: New phase. ['move-doc]: Modify phase. --- gnu/packages/glib.scm | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 9aebfb7e63..b15c75a740 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -299,14 +299,28 @@ threads, dynamic loading, and an object system.") `(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")) - (doc (assoc-ref outputs "doc")) - (html (string-append "/share/gtk-doc"))) - (copy-recursively (string-append out html) - (string-append doc html)) - (delete-file-recursively (string-append out html)) + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc")) + (html (string-append "/share/gtk-doc"))) + (mkdir-p (string-append doc "/share")) + (rename-file + (string-append out html) + (string-append doc html)) #t))))))) (native-inputs `(("docbook-xml" ,docbook-xml) -- 2.28.0