aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/cmake.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-11-26 01:08:35 +0100
committerMarius Bakke <marius@gnu.org>2020-11-26 01:08:35 +0100
commitbff94a5a537c2c484f9f6e98cab75195c3dde9e7 (patch)
tree56c58b40471048d57e3d8650967de47e3520418c /gnu/packages/cmake.scm
parentc73a7f7d86c11de6649f12b749c035fd2b6fc1d0 (diff)
parentf36bee1416ffb1ce1111168bca82e7d0313d65dc (diff)
downloadguix-bff94a5a537c2c484f9f6e98cab75195c3dde9e7.tar
guix-bff94a5a537c2c484f9f6e98cab75195c3dde9e7.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/cmake.scm')
-rw-r--r--gnu/packages/cmake.scm71
1 files changed, 70 insertions, 1 deletions
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index bfbedfd984..f4b138ebb3 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
@@ -297,6 +297,39 @@ and workspaces that can be used in the compiler environment of your choice.")
(package
(inherit cmake-minimal)
(name "cmake")
+ (version "3.19.0")
+ ;; TODO: Move the following source field to the cmake-bootstrap package in
+ ;; the next rebuild cycle.
+ (source (origin
+ (inherit (package-source cmake-bootstrap))
+ (uri (string-append "https://cmake.org/files/v"
+ (version-major+minor version)
+ "/cmake-" version ".tar.gz"))
+ (sha256
+ (base32
+ "14zlrb7awiazxc5wlvgah9rw1dm4ziczbxiyqsvp4zmaan0ninpx"))
+ (snippet
+ (match (origin-snippet (package-source cmake-bootstrap))
+ ((_ _ exp ...)
+ ;; Now we can delete the remaining software bundles.
+ (append `(begin
+ (define preserved-files
+ '(,@%preserved-third-party-files
+ ;; TODO: Move this file to the
+ ;; %preserved-third-party-files variable in
+ ;; the next rebuild cycle.
+ "Utilities/cm3p" ;CMake header wrappers
+ ;; Use the bundled JsonCpp during bootstrap
+ ;; to work around a circular dependency.
+ ;; TODO: JsonCpp can be built with Meson
+ ;; instead of CMake, but meson-build-system
+ ;; currently does not support
+ ;; cross-compilation.
+ "Utilities/cmjsoncpp"
+ ;; LibUV is required to bootstrap the initial
+ ;; build system.
+ "Utilities/cmlibuv")))
+ exp))))))
(arguments
(substitute-keyword-arguments (package-arguments cmake-minimal)
;; Use cmake-minimal this time.
@@ -318,6 +351,42 @@ and workspaces that can be used in the compiler environment of your choice.")
,flags))
((#:phases phases)
`(modify-phases ,phases
+ ;; TODO: Remove this override in the next rebuild cycle and adjust
+ ;; the %common-build-phases variable instead: the
+ ;; Utilities/Release/release_cmake.cmake file no longer exists in
+ ;; version 3.19.0.
+ (replace 'patch-bin-sh
+ (lambda _
+ ;; Replace "/bin/sh" by the right path in... a lot of
+ ;; files.
+ (substitute*
+ '("Modules/CompilerId/Xcode-3.pbxproj.in"
+ "Modules/Internal/CPack/CPack.RuntimeScript.in"
+ "Source/cmGlobalXCodeGenerator.cxx"
+ "Source/cmLocalUnixMakefileGenerator3.cxx"
+ "Source/cmExecProgramCommand.cxx"
+ "Tests/CMakeLists.txt"
+ "Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
+ (("/bin/sh") (which "sh")))
+ #t))
+ ;; TODO: Remove this override in the next rebuild cycle and adjust
+ ;; the %common-disabled-tests variable instead.
+ (replace 'check
+ (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
+ (let ((skipped-tests (list ,@%common-disabled-tests
+ ;; This test fails for unknown reason.
+ "RunCMake.file-GET_RUNTIME_DEPENDENCIES"
+ ;; This test requires the bundled libuv.
+ "BootstrapTest")))
+ (if tests?
+ (begin
+ (invoke "ctest" "-j" (if parallel-tests?
+ (number->string (parallel-job-count))
+ "1")
+ "--exclude-regex"
+ (string-append "^(" (string-join skipped-tests "|") ")$")))
+ (format #t "test suite not run~%"))
+ #t)))
(add-after 'install 'move-html-doc
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))