[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch wip-desktop updated: build-system/meson: Only include phases that
From: |
guix-commits |
Subject: |
branch wip-desktop updated: build-system/meson: Only include phases that are enabled. |
Date: |
Sat, 15 Aug 2020 07:10:29 -0400 |
This is an automated email from the git hooks/post-receive script.
dannym pushed a commit to branch wip-desktop
in repository guix.
The following commit(s) were added to refs/heads/wip-desktop by this push:
new 7f6cb89 build-system/meson: Only include phases that are enabled.
7f6cb89 is described below
commit 7f6cb893e77ce85e8eb786cb6b16604b98756bc5
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..abb436d 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"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch wip-desktop updated: build-system/meson: Only include phases that are enabled.,
guix-commits <=