[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
334/402: build-system/cmake: Only include phases that are enabled.
From: |
guix-commits |
Subject: |
334/402: build-system/cmake: 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 993fd144467599e64cdb2bdb27b8fef2ae906bdd
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'
- 316/402: gnu: wayland: Update package definition., (continued)
- 316/402: gnu: wayland: Update package definition., guix-commits, 2020/08/18
- 324/402: gnu: gnome-shell: Update package definition., guix-commits, 2020/08/18
- 320/402: gnu: Add mozjs-68., guix-commits, 2020/08/18
- 312/402: gnu: simple-scan: Update package definition., guix-commits, 2020/08/18
- 319/402: gnu: Add egl-wayland., guix-commits, 2020/08/18
- 317/402: gnu: wayland-protocols: Update package definition., guix-commits, 2020/08/18
- 325/402: build-system/glib-or-gtk: Include GI_TYPELIB_PATH in wrapper., guix-commits, 2020/08/18
- 327/402: build-system/python: Also wrap executables that are in "libexec"., guix-commits, 2020/08/18
- 330/402: gnu: gnome: Revise package definition., guix-commits, 2020/08/18
- 331/402: gnu: Add gnome-minimal., guix-commits, 2020/08/18
- 334/402: build-system/cmake: Only include phases that are enabled.,
guix-commits <=
- 335/402: gnu: gdm: Fix elogind., guix-commits, 2020/08/18
- 336/402: gnu: flatpak: Fix build., guix-commits, 2020/08/18
- 337/402: gnu: at-spi2-core: Include python phases., guix-commits, 2020/08/18
- 338/402: gnu: dconf: Include python phases., guix-commits, 2020/08/18
- 339/402: gnu: fcitx: Include glib-or-gtk and python phases., guix-commits, 2020/08/18
- 340/402: gnu: gcr: Include python phases., guix-commits, 2020/08/18
- 342/402: gnu: gobject-introspection: Include python phases., guix-commits, 2020/08/18
- 343/402: gnu: graphene: Include python phases., guix-commits, 2020/08/18
- 344/402: gnu: gst-libav: Include python phases., guix-commits, 2020/08/18
- 349/402: gnu: libsecret: Include python phases., guix-commits, 2020/08/18