guix_mirror_bot pushed a commit to branch add-muon
in repository guix.

commit 3972669f7001f2360d2d9524e8af128c9532114e
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Fri May 23 19:50:04 2025 +0900

    build/meson: Adjust compatibility with muon.
    
    * guix/build/meson-build-system.scm (configure): Invoke meson from the 
source
    directory, specifying the build directory following the "setup".
    <args>: Use the array syntax for the complex link directives.
    (install): Run via meson instead of ninja.
    
    Change-Id: Ia5ee98ab0a64bfd6dca98db79ae74468242c9ab8
---
 guix/build/meson-build-system.scm | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/guix/build/meson-build-system.scm 
b/guix/build/meson-build-system.scm
index d11a5d8e18..d032a97211 100644
--- a/guix/build/meson-build-system.scm
+++ b/guix/build/meson-build-system.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2017 Peter Mikkelsen <[email protected]>
 ;;; Copyright © 2018 Ricardo Wurmus <[email protected]>
 ;;; Copyright © 2018 Marius Bakke <[email protected]>
-;;; Copyright © 2021, 2023 Maxim Cournoyer <[email protected]>
+;;; Copyright © 2021, 2023, 2025 Maxim Cournoyer <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,20 +64,23 @@
                                             includedir "/include"))
                        '())
                  ,(string-append "--buildtype=" build-type)
-                 ,(string-append "-Dc_link_args=-Wl,-rpath="
-                                 (assoc-ref outputs "out") "/lib")
-                 ,(string-append "-Dcpp_link_args=-Wl,-rpath="
-                                 (assoc-ref outputs "out") "/lib")
-                 ,@configure-flags
-                 ,source-dir)))
+                 ;; XXX: The arguments containing commas or spaces must be
+                 ;; quoted as if we were using the shell and enclosed in the
+                 ;; array syntax, for compatibility with Muon (see:
+                 ;; https://github.com/muon-build/muon/issues/147).
+                 ,(string-append "-Dc_link_args=['-Wl,-rpath="
+                                 (assoc-ref outputs "out") "/lib']")
+                 ,(string-append "-Dcpp_link_args=['-Wl,-rpath="
+                                 (assoc-ref outputs "out") "/lib']")
+                 ,@configure-flags)))
 
-    (mkdir build-dir)
-    (chdir build-dir)
-    (apply invoke "meson" "setup" args)))
+    (apply invoke "meson" "setup" `(,@args ,build-dir))
+    (chdir build-dir)))
 
-(define* (build #:key parallel-build?
-                #:allow-other-keys)
+(define* (build #:key parallel-build? #:allow-other-keys)
   "Build a given meson package."
+  ;; Note: Do not change to use 'meson compile' until the compile action is
+  ;; implemented in Muon (see: https://github.com/muon-build/muon/issues/148).
   (invoke "ninja" "-j" (if parallel-build?
                            (number->string (parallel-job-count))
                            "1")))
@@ -95,7 +98,7 @@
       (format #t "test suite not run~%")))
 
 (define* (install #:rest args)
-  (invoke "ninja" "install"))
+  (invoke "meson" "install"))
 
 (define* (shrink-runpath #:key (elf-directories '("lib" "lib64" "libexec"
                                                   "bin" "sbin"))

Reply via email to