gnu: cmake: Update to 3.19.0.

* gnu/packages/cmake.scm (cmake): Update to 3.19.0.
[source]: Modify inherited source to adjust the hash as well as the snippet so
that the "Utilities/cm3p" sub-directory is preserved.
[phases]{patch-bin-sh, check}: Temporarily overrides until the next rebuild
cycle.
This commit is contained in:
Maxim Cournoyer 2020-11-23 21:14:00 -05:00
parent ccfafebc7d
commit 5458648302
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -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 @@ (define-public cmake
(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 @@ (define-public cmake
,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"))