summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hogan <code@greghogan.com>2024-10-22 18:09:29 +0000
committerGreg Hogan <code@greghogan.com>2025-07-30 16:28:19 +0000
commit7bceab6d8b3d16258caff6bd52fccb92c57a6eb3 (patch)
tree2b51d54f83db4eefcb050f22c3a9f489cf9cf28c
parent71865c9ebb40555dade67180811d0dc398b4212b (diff)
gnu: cmake: Update to 4.0.3.
* gnu/packages/cmake.scm (cmake-bootstrap): Update to 3.31.8. [source]: Remove the cmake-curl-certificates-3.24 patch. [arguments]<#:configure-flags>: Disable debugger. (cmake-minimal)[arguments] <#:configure-flags>: Disable debugger. <#:phases>: Output on failure in 'check phase. (cmake): Update to 4.0.3. [source]: Remove the cmake-curl-certificates-3.24 patch. [inputs]: Add cppdap. (cmake-3.30): Remove. (cmake-3.25): New variable. (%common-build-phases): Substitute for Ninja build. (%preserved-third-party-files): Add new parser. * gnu/packages/patches/cmake-curl-certificates-3.24.patch: Delete. * gnu/local.mk: Remove it. Change-Id: I8676e80a6cc26242aef4c96360200a1ac646b9fb
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/cmake.scm88
-rw-r--r--gnu/packages/patches/cmake-curl-certificates-3.24.patch21
3 files changed, 33 insertions, 77 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 52a7dc1b00..e0fb2548fb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1145,7 +1145,6 @@ dist_patch_DATA = \
%D%/packages/patches/clog-fix-shared-build.patch \
%D%/packages/patches/clucene-gcc-14.patch \
%D%/packages/patches/clucene-pkgconfig.patch \
- %D%/packages/patches/cmake-curl-certificates-3.24.patch \
%D%/packages/patches/coda-use-system-libs.patch \
%D%/packages/patches/cogl-fix-double-free.patch \
%D%/packages/patches/collectd-5.11.0-noinstallvar.patch \
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 608080954f..cdffa1d3d2 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2024 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2024 dan <i@dan.games>
;;; Copyright © 2024 Charles <charles@charje.net>
+;;; Copyright © 2024 Greg Hogan <code@greghogan.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -131,6 +132,7 @@ using the CMake build system.")
'("Modules/CompilerId/Xcode-3.pbxproj.in"
"Modules/Internal/CPack/CPack.RuntimeScript.in"
"Source/cmGlobalXCodeGenerator.cxx"
+ "Source/cmLocalNinjaGenerator.cxx"
"Source/cmLocalUnixMakefileGenerator3.cxx"
"Source/cmExecProgramCommand.cxx"
"Tests/CMakeLists.txt"
@@ -172,14 +174,16 @@ using the CMake build system.")
;; ELF headers.
"Utilities/cmelf"
;; CMake header wrappers.
- "Utilities/cm3p"))
+ "Utilities/cm3p"
+ ;; Pkg-config file format parser based on llparse.
+ "Utilities/cmllpkgc"))
;;; The "bootstrap" CMake. It is used to build 'cmake-minimal' below, as well
;;; as any dependencies that need cmake-build-system.
(define-public cmake-bootstrap
(package
(name "cmake-bootstrap")
- (version "3.24.2")
+ (version "3.31.8")
(source (origin
(method url-fetch)
(uri (string-append "https://cmake.org/files/v"
@@ -187,8 +191,7 @@ using the CMake build system.")
"/cmake-" version ".tar.gz"))
(sha256
(base32
- "1ny8y2dzc6fww9gzb1ml0vjpx4kclphjihkxagxigprxdzq2140d"))
- (patches (search-patches "cmake-curl-certificates-3.24.patch"))))
+ "1akcmx9w5wbygq088hrr13l6n4b5npqvh9jk20934bfwhg5f7kg3"))))
(build-system gnu-build-system)
(arguments
(list
@@ -211,7 +214,10 @@ using the CMake build system.")
;; By default CMake is built without any optimizations. Use
;; the recommended Release target for a ~2.5x speedup.
- "--" "-DCMAKE_BUILD_TYPE=Release"))
+ "--" "-DCMAKE_BUILD_TYPE=Release"
+
+ ;; The debugger creates a circular dependency on cppdap.
+ "-DCMake_ENABLE_DEBUGGER=OFF"))
#:make-flags
#~(let ((skipped-tests
(list #$@%common-disabled-tests
@@ -318,6 +324,8 @@ and workspaces that can be used in the compiler environment of your choice.")
(list
#:configure-flags
#~(list "-DCMAKE_USE_SYSTEM_LIBRARIES=ON"
+ ;; The debugger creates a circular dependency on cppdap.
+ "-DCMake_ENABLE_DEBUGGER=OFF"
(string-append "-DCMAKE_DOC_DIR=share/doc/cmake-"
#$(version-major+minor (package-version
cmake-bootstrap))))
@@ -349,6 +357,7 @@ and workspaces that can be used in the compiler environment of your choice.")
(invoke "ctest" "-j" (if parallel-tests?
(number->string (parallel-job-count))
"1")
+ "--output-on-failure"
"--exclude-regex"
(string-append "^(" (string-join skipped-tests "|") ")$")))
(format #t "test suite not run~%"))))))
@@ -361,7 +370,7 @@ and workspaces that can be used in the compiler environment of your choice.")
(package
(inherit cmake-minimal)
(name "cmake")
- (version "3.25.1")
+ (version "4.0.3")
(source (origin
(inherit (package-source cmake-minimal))
(method url-fetch)
@@ -376,8 +385,7 @@ and workspaces that can be used in the compiler environment of your choice.")
,@rest))))
(sha256
(base32
- "1n4inb3fvk70sni5gmkljqw3cyllalyg3fnr9rlr7x3aa44isl8w"))
- (patches (search-patches "cmake-curl-certificates-3.24.patch"))))
+ "1yrzkwkr2nxl8hcjkk333l9ycbw9prkg363k4km609kknyvkfdcd"))))
(outputs '("out" "doc"))
(arguments
(substitute-keyword-arguments (package-arguments cmake-minimal)
@@ -414,58 +422,28 @@ and workspaces that can be used in the compiler environment of your choice.")
(delete-file-recursively (string-append #$output html)))))))))
(inputs
(modify-inputs (package-inputs cmake-minimal)
- (prepend ncurses))) ;required for ccmake
+ (prepend ncurses) ;required for ccmake
+ ;; Avoid circular dependency with (gnu packages debug).
+ (prepend (module-ref (resolve-interface '(gnu packages debug))
+ 'cppdap))))
;; Extra inputs required to build the documentation.
(native-inputs
(modify-inputs (package-native-inputs cmake-minimal)
(append python-sphinx
- texinfo)))
- (properties (alist-delete 'hidden? (package-properties cmake-minimal)))))
+ texinfo)))))
-(define-public cmake-next
- (package
- (inherit cmake)
- (version "4.0.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://cmake.org/files/v"
- (version-major+minor version)
- "/cmake-" version ".tar.gz"))
- (sha256
- (base32
- "1q9119wg68vz3ki4g3yw3dkb90zpbr13vy2raar21rb31vhafc6n"))))
- (native-inputs
- (modify-inputs (package-native-inputs cmake)
- ;; Avoid circular dependency with (gnu packages debug). Note: cppdap
- ;; is built with cmake, so when the default cmake is updated to this
- ;; version this circular dependency will need to be worked around.
- (prepend (module-ref (resolve-interface '(gnu packages debug))
- 'cppdap))))))
-
-(define-public cmake-minimal-3.30
- (package
- (inherit cmake-minimal)
- (version "3.30.3")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://cmake.org/files/v"
- (version-major+minor version)
- "/cmake-" version ".tar.gz"))
- (sha256
- (base32
- "1r48zym4dy4mvwzk704zh1vx9gb4a910f424ypvis28mcxdy2pbd"))))
- (arguments
- (substitute-keyword-arguments (package-arguments cmake-minimal)
- ((#:phases phases)
- #~(modify-phases #$phases
- (delete 'delete-help-documentation)))))
- (native-inputs
- (modify-inputs (package-native-inputs cmake-minimal)
- ;; Avoid circular dependency with (gnu packages debug). Note: cppdap
- ;; is built with cmake, so when the default cmake-minimal is updated to
- ;; this version this circular dependency will need to be worked around.
- (prepend (module-ref (resolve-interface '(gnu packages debug))
- 'cppdap))))))
+(define-public cmake-3.25
+ (hidden-package
+ (package/inherit cmake
+ (version "3.25.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://cmake.org/files/v"
+ (version-major+minor version)
+ "/cmake-" version ".tar.gz"))
+ (sha256
+ (base32
+ "074hw6pr7w4j6mfnpm3xh99cm6chjf4rjpi4qkmnvjlhsl0mg6fc")))))))
(define-public cmake-minimal-cross
(package
diff --git a/gnu/packages/patches/cmake-curl-certificates-3.24.patch b/gnu/packages/patches/cmake-curl-certificates-3.24.patch
deleted file mode 100644
index ca29c9001e..0000000000
--- a/gnu/packages/patches/cmake-curl-certificates-3.24.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Submitted upstream at https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7670.
-
-diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx
-index 28ee24dfe9..fc5405213a 100644
---- a/Source/cmCurl.cxx
-+++ b/Source/cmCurl.cxx
-@@ -38,6 +38,14 @@ std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile)
- ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile.c_str());
- check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
- }
-+ /* Honor the user-configurable OpenSSL environment variables. */
-+ else if (cmSystemTools::GetEnv("SSL_CERT_FILE", e)) {
-+ ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, e.c_str());
-+ check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
-+ } else if (cmSystemTools::GetEnv("SSL_CERT_DIR", e)) {
-+ ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAPATH, e.c_str());
-+ check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
-+ }
- #ifdef CMAKE_FIND_CAFILE
- # define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt"
- else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) {