summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-08-25 10:54:19 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-09-20 11:15:07 +0000
commitb67ea49e2c918e712a3c9b215044cd9b830bb849 (patch)
tree90d654be8446bfe2c630a9705dde9784040a8506 /gnu/packages
parentd0cf033661610ee1e8e728dad8710b85a428f2e3 (diff)
downloadguix-b67ea49e2c918e712a3c9b215044cd9b830bb849.tar.gz
gnu: json-glib: Don't build gtk documentation when cross-compiling.
* gnu/packages/gnome.scm
  (json-glib)[arguments]<#:configue-flags>: Set gtk_doc=disables when
  cross-compiling.
  (json-glib)[arguments]<#:phases>{move-docs}: Don't run when cross-compiling
  ...
  (json-glib)[arguments]<#:phases>{stub-docs}: ... instead, create an empty
  directory where the documentation would be.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/gnome.scm31
1 files changed, 21 insertions, 10 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index fbf3677bb6..989d5e75eb 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4595,7 +4595,12 @@ configuration storage systems.")
        #:configure-flags
        (list
         "-Ddocs=true"
-        "-Dman=true")
+        "-Dman=true"
+        ,@(if (%current-target-system)
+              ;; If enabled, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=disabled")
+              '()))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-docbook
@@ -4619,15 +4624,21 @@ configuration storage systems.")
                                                  'inputs) "docbook-xsl")
                                  "/xml/xsl/docbook-xsl-1.79.2/"))))
              #t))
-         (add-after 'install 'move-docs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (doc (assoc-ref outputs "doc")))
-               (mkdir-p (string-append doc "/share"))
-               (rename-file
-                (string-append out "/share/gtk-doc")
-                (string-append doc "/share/gtk-doc"))
-               #t))))))
+         ;; When cross-compiling, there are no docs to move.
+         ,(if (%current-target-system)
+              '(add-after 'install 'stub-docs
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   ;; The daemon doesn't like empty output paths.
+                   (mkdir (assoc-ref outputs "doc"))))
+              '(add-after 'install 'move-docs
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let* ((out (assoc-ref outputs "out"))
+                          (doc (assoc-ref outputs "doc")))
+                     (mkdir-p (string-append doc "/share"))
+                     (rename-file
+                      (string-append out "/share/gtk-doc")
+                      (string-append doc "/share/gtk-doc"))
+                     #t)))))))
     (native-inputs
      `(("docbook-xml" ,docbook-xml-4.3)
        ("docbook-xsl" ,docbook-xsl)