[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36477] [PATCH v2 12/61] gnu: cmake: Fix cross-compilation.
From: |
Mathieu Othacehe |
Subject: |
[bug#36477] [PATCH v2 12/61] gnu: cmake: Fix cross-compilation. |
Date: |
Wed, 21 Aug 2019 10:54:06 +0200 |
* gnu/packages/cmake.scm (cmake-minimal-cross): New package.
* guix/build-system/cmake.scm (default-cmake): Add new target argument and use
it to select cmake-minimal or cmake-minimal-cross.
(lower): Pass target to default-cmake.
---
gnu/packages/cmake.scm | 8 ++++++++
guix/build-system/cmake.scm | 9 ++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 1d8d829ec5..9bf0273f00 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -207,6 +207,14 @@ and workspaces that can be used in the compiler
environment of your choice.")
(outputs '("out" "doc"))
(properties (alist-delete 'hidden? (package-properties cmake-minimal)))))
+(define-public cmake-minimal-cross
+ (package
+ (inherit cmake-minimal)
+ (name "cmake-minimal-cross")
+ (native-search-paths '())
+ (search-paths
+ (package-native-search-paths cmake-minimal))))
+
(define-public emacs-cmake-mode
(package
(inherit cmake)
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index ca88fadddf..aa0f4187ec 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -43,16 +43,19 @@
`((guix build cmake-build-system)
,@%gnu-build-system-modules))
-(define (default-cmake)
+(define (default-cmake target)
"Return the default CMake package."
;; Do not use `@' to avoid introducing circular dependencies.
(let ((module (resolve-interface '(gnu packages cmake))))
- (module-ref module 'cmake-minimal)))
+ (module-ref module
+ (if target
+ 'cmake-minimal-cross
+ 'cmake-minimal))))
(define* (lower name
#:key source inputs native-inputs outputs system target
- (cmake (default-cmake))
+ (cmake (default-cmake target))
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
--
2.17.1
- [bug#36477] [PATCH v2 01/61] gnu: perl: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 02/61] gnu: python: Fix cross compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 04/61] gnu: tk: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 05/61] gnu: libxslt: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 07/61] gnu: libgpg-error: Fix cross compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 03/61] gnu: tcl: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 06/61] gnu: xorg: Fix cross-compilation of multiple packages., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 08/61] gnu: python: Further cross-compilation fixes., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 11/61] gnu: texinfo: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 09/61] gnu: http-parser: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 12/61] gnu: cmake: Fix cross-compilation.,
Mathieu Othacehe <=
- [bug#36477] [PATCH v2 13/61] gnu: libgit2: Fix cross compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 10/61] gnu: openssl: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 14/61] gnu: ath9k-htc-firmware: Fix cross compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 15/61] gnu: libpaper: Fix aarch64 cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 16/61] gnu: groff: Fix cross compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 19/61] gnu: indent: Fix aarch64 cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 21/61] gnu: mit-krb5: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 17/61] gnu: texinfo-5: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 22/61] gnu: cyrus-sasl: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 23/61] gnu: help2man: Fix cross-compilation., Mathieu Othacehe, 2019/08/21