[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
334/401: build-system/cmake: Only include phases that are enabled.
From: |
guix-commits |
Subject: |
334/401: build-system/cmake: 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 88ccb03ab962adb18dbd6b64f893e5dcc332f48c
Author: Danny Milosavljevic <dannym@scratchpost.org>
AuthorDate: Sat Aug 15 22:13:24 2020 +0200
build-system/cmake: Only include phases that are enabled.
Follow-up to 5cb203609ad67b3e02cec2bf7f63ba52eabc59fa.
* guix/build-system/cmake.scm (lower): Remove #:glib-or-gtk? and #:python?
from private-keywords.
(cmake-build): Only include phases that are enabled.
Remove #:glib-or-gtk? and #:python? from build-side call.
* guix/build/cmake-build-system.scm (install-glib-or-gtk): Make it
unconditional.
(install-python): Make it unconditional.
---
guix/build-system/cmake.scm | 34 +++++++++++++++++++++++++++++++---
guix/build/cmake-build-system.scm | 15 +++++----------
2 files changed, 36 insertions(+), 13 deletions(-)
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index e861756..7daa88a 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -62,11 +62,13 @@
(define* (lower name
#:key source inputs native-inputs outputs system target
(cmake (default-cmake target))
+ glib-or-gtk?
+ python?
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- `(#:source #:cmake #:inputs #:native-inputs #:outputs #:glib-or-gtk?
#:python?
+ `(#:source #:cmake #:inputs #:native-inputs #:outputs
,@(if target '() '(#:target))))
(bag
@@ -142,7 +144,19 @@ provides a 'CMakeLists.txt' file as its build system."
#:inputs %build-inputs
#:search-paths ',(map search-path-specification->sexp
search-paths)
- #:phases ,phases
+ #: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))))
#:configure-flags ,configure-flags
#:make-flags ,make-flags
#:out-of-source? ,out-of-source?
@@ -194,6 +208,8 @@ provides a 'CMakeLists.txt' file as its build system."
(build-type "RelWithDebInfo")
(tests? #f) ; nothing can be done
(test-target "test")
+ (glib-or-gtk? #f)
+ (python? #f)
(parallel-build? #t) (parallel-tests? #t)
(validate-runpath? #t)
(patch-shebangs? #t)
@@ -255,7 +271,19 @@ build system."
#:native-search-paths ',(map
search-path-specification->sexp
native-search-paths)
- #:phases ,phases
+ #: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))))
#:configure-flags ,configure-flags
#:make-flags ,make-flags
#:out-of-source? ,out-of-source?
diff --git a/guix/build/cmake-build-system.scm
b/guix/build/cmake-build-system.scm
index 82e272e..1a53556 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -86,16 +86,11 @@
(gnu-check #:tests? tests? #:test-target test-target
#:parallel-tests? parallel-tests?)))
-(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-python #:key python? #:allow-other-keys #:rest rest)
- (if python?
- (apply (assoc-ref python:%standard-phases '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 #:rest rest)
+ (apply (assoc-ref python:%standard-phases 'wrap) rest))
(define %standard-phases
;; Everything is as with the GNU Build System except for the `configure'
- 293/401: gnu: gnome-screenshot: Update package definition., (continued)
- 293/401: gnu: gnome-screenshot: Update package definition., guix-commits, 2020/08/18
- 297/401: gnu: gnome-system-monitor: Update package extensions., guix-commits, 2020/08/18
- 266/401: gnu: rust-pin-project-internal@0.4.22: Fix reference to rust-quote., guix-commits, 2020/08/18
- 269/401: gnu: rust-peg@0.5.7: Remove duplicate definition., guix-commits, 2020/08/18
- 276/401: gnu: rust-serial-test-derive@0.4.0: Fix reference to rust-syn., guix-commits, 2020/08/18
- 285/401: gnu: sysprof: Remove duplicate definition., guix-commits, 2020/08/18
- 292/401: gnu: gnome-photos: Update package definition., guix-commits, 2020/08/18
- 296/401: gnu: gnome-shell-extensions: Update package definition., guix-commits, 2020/08/18
- 307/401: gnu: Add libbraille., guix-commits, 2020/08/18
- 313/401: gnu: libmusicbrainz: Propagate inputs., guix-commits, 2020/08/18
- 334/401: build-system/cmake: Only include phases that are enabled.,
guix-commits <=
- 152/401: gnu: glibmm: Update package definition., guix-commits, 2020/08/18
- 183/401: gnu: gom: Update package definition., guix-commits, 2020/08/18
- 185/401: gnu: Add pedansee., guix-commits, 2020/08/18
- 191/401: gnu: gupnp-dlna: Update package definition., guix-commits, 2020/08/18
- 197/401: gnu: Add memphis., guix-commits, 2020/08/18
- 201/401: gnu: libgsf: Update package definition., guix-commits, 2020/08/18
- 210/401: gnu: libpeas: Update package definition., guix-commits, 2020/08/18
- 216/401: gnu: mobile-broadband-provider-info: Update package definition., guix-commits, 2020/08/18
- 220/401: gnu: network-manager: Update package definition., guix-commits, 2020/08/18
- 224/401: Revert "gnu: java-jakarta-oro: Update hash.", guix-commits, 2020/08/18