[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36477] [PATCH v4 02/23] gnu: cmake: Fix cross-compilation.
From: |
Mathieu Othacehe |
Subject: |
[bug#36477] [PATCH v4 02/23] gnu: cmake: Fix cross-compilation. |
Date: |
Wed, 2 Oct 2019 11:58:43 +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 64349be444..13252a9486 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -219,6 +219,14 @@ and workspaces that can be used in the compiler
environment of your choice.")
(append (search-patches "cmake-curl-certificates.patch")
(origin-patches (package-source cmake))))))))
+(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.23.0
- [bug#36477] [PATCH v4 00/23] System cross-compilation, Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 01/23] gnu: openssl: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 02/23] gnu: cmake: Fix cross-compilation.,
Mathieu Othacehe <=
- [bug#36477] [PATCH v4 03/23] gnu: groff: Fix cross compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 04/23] gnu: cyrus-sasl: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 07/23] gnu: eudev: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 05/23] gnu: icu4c: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 08/23] gnu: bdb: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 06/23] gnu: boost: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 11/23] gnu: git: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 10/23] gnu: swig: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 09/23] gnu: openldap: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 16/23] gnu: crda: Fix cross-compilation, Mathieu Othacehe, 2019/10/02