From 5458648302ca3ae4a60cde3ac3f94691d3afa039 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 23 Nov 2020 21:14:00 -0500 Subject: 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. --- gnu/packages/cmake.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) (limited to 'gnu/packages/cmake.scm') 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 ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; Copyright © 2019 Maxim Cournoyer +;;; Copyright © 2019, 2020 Maxim Cournoyer ;;; Copyright © 2019 Pierre-Moana Levesque ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; @@ -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")) -- cgit v1.2.3