gnu: glib: Fix build.

* gnu/packages/glib.scm (glib-with-documentation) [native-inputs]: Remove
docbook-xml-4.2, docbook-xml, docbook-xsl, gtk-doc, libxml2, libxslt inputs.
Add gi-docgen and python-docutils.
[arguments] <#:configure-flags> Replace 'gtk_doc' option with 'documentation'.
<#:phases>: Delete patch-docbook-xml phase.  Adjust move-doc phase.

Change-Id: I964a79603ff80ee8a22bb2d9ebe07f05a1f79e57
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Maxim Cournoyer 2024-11-11 15:16:59 +09:00 committed by Liliana Marie Prikler
parent be22bf2097
commit a66878568d
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -552,41 +552,24 @@ functions for strings and common data structures.")
(let ((base glib)) (let ((base glib))
(package/inherit base (package/inherit base
(properties (alist-delete 'hidden? (package-properties base))) (properties (alist-delete 'hidden? (package-properties base)))
(outputs (cons "doc" (package-outputs base))) ; 20 MiB of GTK-Doc reference (outputs (cons "doc" (package-outputs base)))
(native-inputs (native-inputs
`(("docbook-xml-4.2" ,docbook-xml-4.2) (modify-inputs (package-native-inputs base)
("docbook-xml-4.5" ,docbook-xml) (append gi-docgen python-docutils)))
("docbook-xsl" ,docbook-xsl)
("gtk-doc" ,gtk-doc/stable)
("libxml2" ,libxml2)
("xsltproc" ,libxslt)
,@(package-native-inputs base)))
(arguments (arguments
(substitute-keyword-arguments (package-arguments base) (substitute-keyword-arguments (package-arguments base)
((#:configure-flags flags ''()) ((#:configure-flags flags ''())
#~(cons "-Dgtk_doc=true" #~(cons "-Ddocumentation=true"
(delete "-Dman=false" #$flags))) (delete "-Dman=false" #$flags)))
((#:phases phases) ((#:phases phases)
#~(modify-phases #$phases #~(modify-phases #$phases
(add-after 'unpack 'patch-docbook-xml
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "docs"
(substitute* (find-files "." "\\.xml$")
(("http://www.oasis-open.org/docbook/xml/4\\.5/")
(string-append (assoc-ref inputs "docbook-xml-4.5")
"/xml/dtd/docbook/"))
(("http://www.oasis-open.org/docbook/xml/4\\.2/")
(string-append (assoc-ref inputs "docbook-xml-4.2")
"/xml/dtd/docbook/"))))))
(add-after 'install 'move-doc (add-after 'install 'move-doc
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (let ((doc "/share/doc"))
(doc (assoc-ref outputs "doc")) (mkdir-p (string-append #$output:doc "/share"))
(html (string-append "/share/gtk-doc")))
(mkdir-p (string-append doc "/share"))
(rename-file (rename-file
(string-append out html) (string-append #$output doc)
(string-append doc html)))))))))))) (string-append #$output:doc doc))))))))))))
(define (python-extension-suffix python triplet) (define (python-extension-suffix python triplet)
"Determine the suffix for C extensions for PYTHON when compiled "Determine the suffix for C extensions for PYTHON when compiled