[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
333/401: build-system/meson: Only include phases that are enabled.
From: |
guix-commits |
Subject: |
333/401: build-system/meson: Only include phases that are enabled. |
Date: |
Tue, 18 Aug 2020 16:22:12 -0400 (EDT) |
dannym pushed a commit to branch wip-desktop
in repository guix.
commit 2952046db685f1f10f0c489f57b1864f52602516
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"))
- 383/401: gnu: eog: Remove custom typelib wrap., (continued)
- 383/401: gnu: eog: Remove custom typelib wrap., guix-commits, 2020/08/18
- 398/401: Revert "gnu: libpeas: Include python phases.", guix-commits, 2020/08/18
- 399/401: Revert "gnu: gexiv2: Include python phases.", guix-commits, 2020/08/18
- 401/401: gnu: Add gnome desktop services., guix-commits, 2020/08/18
- 236/401: gnu: opencv: Disable structured_light test., guix-commits, 2020/08/18
- 316/401: gnu: wayland: Update package definition., guix-commits, 2020/08/18
- 318/401: gnu: Add eglexternalplatform., guix-commits, 2020/08/18
- 320/401: gnu: Add mozjs-68., guix-commits, 2020/08/18
- 325/401: build-system/glib-or-gtk: Include GI_TYPELIB_PATH in wrapper., guix-commits, 2020/08/18
- 329/401: build-system/cmake: Wrap Python executables, too., guix-commits, 2020/08/18
- 333/401: build-system/meson: Only include phases that are enabled.,
guix-commits <=
- 343/401: gnu: graphene: Include python phases., guix-commits, 2020/08/18
- 361/401: gnu: gom: Include python phases., guix-commits, 2020/08/18
- 364/401: gnu: libchamplain: Include python phases., guix-commits, 2020/08/18
- 365/401: gnu: libpeas: Include python phases., guix-commits, 2020/08/18
- 378/401: gnu: mediasdk: Include python phases., guix-commits, 2020/08/18
- 389/401: gnu: gedit: Replace custom typelib and python wraps., guix-commits, 2020/08/18
- 394/401: gnu: seed: Disable tests., guix-commits, 2020/08/18
- 298/401: gnu: gnome-terminal: Update package definition., guix-commits, 2020/08/18
- 308/401: gnu: Add brltty., guix-commits, 2020/08/18
- 319/401: gnu: Add egl-wayland., guix-commits, 2020/08/18