Subject: [bug#50201] [PATCH 10/52] build-system/meson: Allow 'configure-flags' to be a G-exp.

From: Maxime Devos <[email-masked]>
Date: Wed, 25 Aug 2021 20:02:50 +0200

* guix/build-system/meson.scm
  (meson-build, meson-cross-build): Only call 'sexp->gexp' on
  'configure-flags' when 'configure-flags' is a pair.
---
 guix/build-system/meson.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index dae0abde94..dcad3f322d 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -212,7 +212,10 @@ has a 'meson.build' file."
                                                 (map search-path-specification->sexp
                                                      search-paths))
                              #:phases build-phases
-                             #:configure-flags #$(sexp->gexp configure-flags)
+                             #:configure-flags
+                             #$(if (pair? configure-flags)
+                                   (sexp->gexp configure-flags)
+                                   configure-flags)
                              #:build-type #$build-type
                              #:tests? #$tests?
                              #:test-target #$test-target
@@ -309,7 +312,9 @@ SOURCE has a 'meson.build' file."
                        #:phases build-phases
                        #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
                        #:configure-flags `("--cross-file" #+cross-file
-                                           ,@#$(sexp->gexp configure-flags))
+                                           ,@#$(if (pair? configure-flags)
+                                                   (sexp->gexp configure-flags)
+                                                   configure-flags))
                        #:build-type #$build-type
                        #:tests? #$tests?
                        #:test-target #$test-target
-- 
2.33.0