unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Raghav Gururajan via Guix-patches via <guix-patches@gnu.org>
To: 50445@debbugs.gnu.org
Cc: Raghav Gururajan <rg@raghavgururajan.name>
Subject: [bug#50445] [PATCHES wip-gnome v1 3/4] gnu: gtksourceview: Enable documentation.
Date: Mon,  6 Sep 2021 21:02:16 -0400	[thread overview]
Message-ID: <20210907010217.12746-3-rg@raghavgururajan.name> (raw)
In-Reply-To: <20210907010217.12746-1-rg@raghavgururajan.name>

* gnu/packages/gtk.scm (gtksourceview)[outputs]: New output "doc".
[configure-flags](gtk-doc): New flag.
[phases](patch-docbook-xml,move-doc): New phases.
[native-inputs]: Add docbook-xml-4.3, docbook-xsl, gtk-doc and libxslt.
---
 gnu/packages/gtk.scm | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index fa3a69d46d..0a80671629 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -548,9 +548,24 @@ printing and other features typical of a source code editor.")
               (base32
                "1hcswszqnsyqzzf5zk8iflxdvkfvvcg89pf6xsqwbyyabwdxfqyi"))))
    (build-system meson-build-system)
+   (outputs '("out" "doc"))
    (arguments
-    '(#:phases
+    `(#:configure-flags
+      (list
+       ,@(if (%current-target-system)
+       ;; If true, gtkdoc-scangobj will try to execute a
+       ;; cross-compiled binary.
+       '("-Dgtk_doc=false")
+       '("-Dgtk_doc=true")))
+      #:phases
       (modify-phases %standard-phases
+        (add-after 'unpack 'patch-docbook-xml
+          (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
+            (substitute* (find-files "docs" "\\.xml\\.in$")
+              (("http://www.oasis-open.org/docbook/xml/4.3/")
+               (string-append
+                (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+                "/xml/dtd/docbook/")))))
         (add-before
          'check 'pre-check
          (lambda* (#:key inputs #:allow-other-keys)
@@ -560,12 +575,24 @@ printing and other features typical of a source code editor.")
              (setenv "DISPLAY" ":1")
              ;; For the missing /etc/machine-id.
              (setenv "DBUS_FATAL_WARNINGS" "0")
-             #t))))))
+             #t)))
+        (add-after 'install 'move-doc
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out"))
+                   (doc (assoc-ref outputs "doc")))
+              (mkdir-p (string-append doc "/share/gtk-doc"))
+              (rename-file
+               (string-append out "/share/gtk-doc")
+               (string-append doc "/share/gtk-doc"))))))))
    (native-inputs
-    `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
+    `(("docbook-xml-4.3" ,docbook-xml-4.3)
+      ("docbook-xsl" ,docbook-xsl)
+      ("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
+      ("gtk-doc" ,gtk-doc)
       ("intltool" ,intltool)
       ("itstool" ,itstool)
       ("gobject-introspection" ,gobject-introspection)
+      ("libxslt" ,libxslt)
       ("pkg-config" ,pkg-config)
       ("vala" ,vala)
       ;; For testing.
-- 
2.33.0





  parent reply	other threads:[~2021-09-07  1:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07  0:59 [bug#50445] GtkSourceView Raghav Gururajan via Guix-patches via
2021-09-07  1:02 ` [bug#50445] [PATCHES wip-gnome v1 1/4] gnu: gtksourceview: Update to 4.8.1 and change build-system Raghav Gururajan via Guix-patches via
2021-09-07  1:02   ` [bug#50445] [PATCHES wip-gnome v1 2/4] gnu: gtksourceview: Add missing input as per pkg-config file Raghav Gururajan via Guix-patches via
2021-09-07  1:02   ` Raghav Gururajan via Guix-patches via [this message]
2021-09-07 14:05     ` [bug#50445] [PATCHES wip-gnome v1 3/4] gnu: gtksourceview: Enable documentation Maxime Devos
2021-09-07 19:21       ` Raghav Gururajan via Guix-patches via
2021-09-07  1:02   ` [bug#50445] [PATCHES wip-gnome v1 4/4] gnu: gtksourceview@3: Adjust inherited fields and update to 3.24.11 Raghav Gururajan via Guix-patches via
2021-09-07 19:23 ` bug#50445: GtkSourceView Raghav Gururajan via Guix-patches via

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210907010217.12746-3-rg@raghavgururajan.name \
    --to=guix-patches@gnu.org \
    --cc=50445@debbugs.gnu.org \
    --cc=rg@raghavgururajan.name \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).