guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

21/52: gnu: gamin: Fix 'configure' script when cross-compiling.


From: guix-commits
Subject: 21/52: gnu: gamin: Fix 'configure' script when cross-compiling.
Date: Mon, 20 Sep 2021 07:19:32 -0400 (EDT)

mothacehe pushed a commit to branch core-updates-frozen
in repository guix.

commit 3a8d342cdf5a929be1e6d36204d8f91e5684ce87
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Tue Aug 24 15:32:49 2021 +0200

    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.
---
 gnu/packages/gnome.scm | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 5e24090..0b2325b 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]