diff mbox series

[bug#74306,gnome-team,16/44] gnu: glib: Fix build.

Message ID 542c1fbab63036afb8bbdf38e4669a3bee9f2517.1731303037.git.maxim.cournoyer@gmail.com
State New
Headers show
Series gstreamer, GTK, fontmanager updates | expand

Commit Message

Maxim Cournoyer Nov. 11, 2024, 6:16 a.m. UTC
* 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
---
 gnu/packages/glib.scm | 35 +++++++++--------------------------
 1 file changed, 9 insertions(+), 26 deletions(-)

Comments

Liliana Marie Prikler Nov. 11, 2024, 6:17 p.m. UTC | #1
Am Montag, dem 11.11.2024 um 15:16 +0900 schrieb Maxim Cournoyer:
> * 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
> ---
Nitpick: Should be #:configure-flags and #:phases.

Visually LGTM, haven't built yet.
diff mbox series

Patch

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 1a8ecdad35..2732d739bf 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -545,41 +545,24 @@  (define-public glib-with-documentation
   (let ((base glib))
     (package/inherit 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
-       `(("docbook-xml-4.2" ,docbook-xml-4.2)
-         ("docbook-xml-4.5" ,docbook-xml)
-         ("docbook-xsl" ,docbook-xsl)
-         ("gtk-doc" ,gtk-doc/stable)
-         ("libxml2" ,libxml2)
-         ("xsltproc" ,libxslt)
-         ,@(package-native-inputs base)))
+       (modify-inputs (package-native-inputs base)
+         (append gi-docgen python-docutils)))
       (arguments
        (substitute-keyword-arguments (package-arguments base)
          ((#:configure-flags flags ''())
-          #~(cons "-Dgtk_doc=true"
+          #~(cons "-Ddocumentation=true"
                   (delete "-Dman=false" #$flags)))
          ((#: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
-                (lambda* (#:key outputs #:allow-other-keys)
-                  (let* ((out (assoc-ref outputs "out"))
-                         (doc (assoc-ref outputs "doc"))
-                         (html (string-append "/share/gtk-doc")))
-                    (mkdir-p (string-append doc "/share"))
+                (lambda _
+                  (let ((doc "/share/doc"))
+                    (mkdir-p (string-append #$output:doc "/share"))
                     (rename-file
-                     (string-append out html)
-                     (string-append doc html))))))))))))
+                     (string-append #$output doc)
+                     (string-append #$output:doc doc))))))))))))
 
 (define (python-extension-suffix python triplet)
   "Determine the suffix for C extensions for PYTHON when compiled