summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-08-24 15:32:49 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-09-20 11:15:06 +0000
commit3a8d342cdf5a929be1e6d36204d8f91e5684ce87 (patch)
tree9b8920d87b66aa65b6199def6011d37870c1e9c4 /gnu
parentc3a3a4a7619456a60caf4e2dc3be91dc6adc3a2e (diff)
downloadguix-3a8d342cdf5a929be1e6d36204d8f91e5684ce87.tar.gz
gnu: gamin: Fix 'configure' script when cross-compiling.
* gnu/packages/gnome.scm
  (gamin)[arguments]<#:phases>{set-have-abstract-sockets}: Override
  test for ‘abstract sockets’ when cross-compiling.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/gnome.scm26
1 files changed, 25 insertions, 1 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 5e24090b64..0b2325bc44 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -11259,7 +11259,31 @@ repository and commit your work.")
                             "server/gam_node.h"
                             "server/gam_subscription.c")
                (("G_CONST_RETURN") "const"))
-             #t)))))
+             #t))
+         ;; The configure script runs a test program unconditionally,
+         ;; without an option to manually set the test result.
+         ;; Override this test anyway.
+         ,@(if (%current-target-system)
+               `((add-after 'bootstrap 'set-have-abstract-sockets
+                   (lambda _
+                     (define in-abstract-sockets-test? #f)
+                     (substitute* "configure"
+                       (("^#### Abstract sockets\n$")
+                        (set! in-abstract-sockets-test? #t)
+                        "#### Abstract sockets\n")
+                       (("^have_abstract_sockets=no\n$")
+                        (set! in-abstract-sockets-test? #f)
+                        ;; ‘Abstract sockets’ appear to be Linux-only.
+                        (string-append "have_abstract_sockets="
+                                       ,(if (target-linux?)
+                                            "yes"
+                                            "no")
+                                       "\nif false; then\nif false; then :\n"))
+                       (("^(.*\n)$" line)
+                        (if in-abstract-sockets-test?
+                            "" ; delete
+                            line))))))
+               '()))))
     (inputs
      `(("glib" ,glib)))
     (native-inputs