From 3a8d342cdf5a929be1e6d36204d8f91e5684ce87 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 24 Aug 2021 15:32:49 +0200 Subject: gnu: gamin: Fix 'configure' script when cross-compiling. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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(-) (limited to 'gnu') 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 -- cgit 1.4.1