[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
333/402: build-system/meson: Only include phases that are enabled.
From: |
guix-commits |
Subject: |
333/402: build-system/meson: Only include phases that are enabled. |
Date: |
Tue, 18 Aug 2020 16:48:17 -0400 (EDT) |
dannym pushed a commit to branch wip-desktop
in repository guix.
commit ccaa81eb4b7692d29aea7ef4daef78387ee5b60b
Author: Raghav Gururajan <raghavgururajan@disroot.org>
AuthorDate: Sat Aug 15 13:06:33 2020 +0200
build-system/meson: Only include phases that are enabled.
Follow-up to 2b6a10273f2cc7b3bcefd92894f0018d99396077.
* guix/build-system/meson.scm (lower): Remove #:glib-or-gtk? and #:python?
from private-keywords.
(meson-build): Only include phases that are enabled.
Remove #:glib-or-gtk? and #:python? from build-side call.
* guix/build/meson-build-system.scm (install-glib-or-gtk): Make it
unconditional.
(install-python): Make it unconditional.
Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
guix/build-system/meson.scm | 20 ++++++++++++++++----
guix/build/meson-build-system.scm | 15 +++++----------
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index 9a38cdb..db99c45 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -63,11 +63,13 @@
#:key source inputs native-inputs outputs system target
(meson (default-meson))
(ninja (default-ninja))
+ glib-or-gtk?
+ python?
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- `(#:source #:meson #:ninja #:inputs #:native-inputs #:outputs #:target
#:glib-or-gtk? #:python?))
+ `(#:source #:meson #:ninja #:inputs #:native-inputs #:outputs #:target))
(and (not target) ;; TODO: add support for cross-compilation.
(bag
@@ -131,7 +133,19 @@ has a 'meson.build' file."
output)))
(define builder
- `(let ((build-phases ,phases))
+ `(let ((build-phases ,(cond
+ ((and glib-or-gtk? python?)
+ phases)
+ ((and glib-or-gtk? (not python?))
+ `(modify-phases ,phases
+ (delete 'install-python)))
+ ((and (not glib-or-gtk?) python?)
+ `(modify-phases ,phases
+ (delete 'install-glib-or-gtk)))
+ ((and (not glib-or-gtk?) (not python?))
+ `(modify-phases ,phases
+ (delete 'install-python)
+ (delete 'install-glib-or-gtk))))))
(use-modules ,@modules)
(meson-build #:source ,(match (assoc-ref inputs "source")
(((? derivation? source))
@@ -149,8 +163,6 @@ has a 'meson.build' file."
#:configure-flags ,configure-flags
#:build-type ,build-type
#:tests? ,tests?
- #:glib-or-gtk? ,glib-or-gtk?
- #:python? ,python?
#:test-target ,test-target
#:parallel-build? ,parallel-build?
#:parallel-tests? ,parallel-tests?
diff --git a/guix/build/meson-build-system.scm
b/guix/build/meson-build-system.scm
index 01e0b47..4c325ab 100644
--- a/guix/build/meson-build-system.scm
+++ b/guix/build/meson-build-system.scm
@@ -78,17 +78,12 @@
(define* (install #:rest args)
(invoke "ninja" "install"))
-(define* (install-glib-or-gtk #:key glib-or-gtk? #:allow-other-keys #:rest
rest)
- (if glib-or-gtk?
- (and
- (apply (assoc-ref glib-or-gtk:%standard-phases
'glib-or-gtk-compile-schemas) rest)
- (apply (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap) rest))
- #t))
+(define* (install-glib-or-gtk #:rest rest)
+ (and (apply (assoc-ref glib-or-gtk:%standard-phases
'glib-or-gtk-compile-schemas) rest)
+ (apply (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)
rest)))
-(define* (install-python #:key python? #:allow-other-keys #:rest rest)
- (if python?
- (apply (assoc-ref python:%standard-phases 'wrap) rest)
- #t))
+(define* (install-python #:rest rest)
+ (apply (assoc-ref python:%standard-phases 'wrap) rest))
(define* (shrink-runpath #:key (elf-directories '("lib" "lib64" "libexec"
"bin" "sbin"))
- 323/402: gnu: gdm: Update package definition., (continued)
- 323/402: gnu: gdm: Update package definition., guix-commits, 2020/08/18
- 311/402: gnu: rygel: Update package definition., guix-commits, 2020/08/18
- 318/402: gnu: Add eglexternalplatform., guix-commits, 2020/08/18
- 322/402: gnu: mutter: Update package definition., guix-commits, 2020/08/18
- 321/402: gnu: gjs: Update package definition., guix-commits, 2020/08/18
- 314/402: gnu: sushi: Update package definition., guix-commits, 2020/08/18
- 326/402: build-system/glib-or-gtk: Also wrap executables that are in "sbin"., guix-commits, 2020/08/18
- 328/402: build-system/meson: Wrap Python executables, too., guix-commits, 2020/08/18
- 329/402: build-system/cmake: Wrap Python executables, too., guix-commits, 2020/08/18
- 332/402: gnu: opencv: Fix build with new version of jasper., guix-commits, 2020/08/18
- 333/402: build-system/meson: Only include phases that are enabled.,
guix-commits <=
- 341/402: gnu: glib: Include python phases., guix-commits, 2020/08/18
- 345/402: gnu: gst-plugins-bad: Include python phases., guix-commits, 2020/08/18
- 346/402: gnu: gst-plugins-base: Include python phases., guix-commits, 2020/08/18
- 347/402: gnu: gst-plugins-good: Include python phases., guix-commits, 2020/08/18
- 348/402: gnu: libnotify: Include python phases., guix-commits, 2020/08/18
- 351/402: gnu: libwpe: Include python phases., guix-commits, 2020/08/18
- 353/402: gnu: pango: Include python phases., guix-commits, 2020/08/18
- 354/402: gnu: webkitgtk: Include glib-or-gtk and python phases., guix-commits, 2020/08/18
- 360/402: gnu: gexiv2: Include python phases., guix-commits, 2020/08/18
- 364/402: gnu: libchamplain: Include python phases., guix-commits, 2020/08/18