guix_mirror_bot pushed a commit to branch add-muon
in repository guix.
commit 9388a9fe26464819eac85af145f0d4a913eed816
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 | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/guix/build/meson-build-system.scm
b/guix/build/meson-build-system.scm
index d11a5d8e18..bce2a03c85 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,24 @@
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: 'meson compile' is not recommended by at least one Meson
+ ;; maintainer; it's also not compatible with Muon, so stick to invoke ninja
+ ;; directly.
(invoke "ninja" "-j" (if parallel-build?
(number->string (parallel-job-count))
"1")))
@@ -95,7 +99,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"))