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.
This commit is contained in:
Maxime Devos 2021-08-24 15:32:49 +02:00 committed by Mathieu Othacehe
parent c3a3a4a761
commit 3a8d342cdf
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -11259,7 +11259,31 @@ (define-public gamin
"server/gam_node.h" "server/gam_node.h"
"server/gam_subscription.c") "server/gam_subscription.c")
(("G_CONST_RETURN") "const")) (("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 (inputs
`(("glib" ,glib))) `(("glib" ,glib)))
(native-inputs (native-inputs