Subject: [bug#70031] [PATCH v2 39/65] gnu: cmake: Update to 3.30.5.

From: Greg Hogan <[email-masked]>
Date: Tue, 22 Oct 2024 18:09:29 +0000

* gnu/packages/cmake.scm (cmake-bootstrap): Update to 3.30.5.
[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 3.30.5.
[source]: Remove the cmake-curl-certificates-3.24 patch.
[inputs]: Add cppdap.
(cmake-3.30): Remove.
(cmake-3.24): New variable.
(%common-build-phases): Substitute for Ninja build.
---
 gnu/packages/cmake.scm | 40 ++++++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 8310dc55fa..199e0182c6 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2024 John Kehayias <[email-masked]>
 ;;; Copyright © 2024 dan <[email-masked]>
 ;;; Copyright © 2024 Charles <[email-masked]>
+;;; Copyright © 2024 Greg Hogan <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -126,6 +127,7 @@ (define (%common-build-phases)
             '("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"
@@ -171,7 +173,7 @@ (define %preserved-third-party-files
 (define-public cmake-bootstrap
   (package
     (name "cmake-bootstrap")
-    (version "3.24.2")
+    (version "3.30.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://cmake.org/files/v"
@@ -179,8 +181,7 @@ (define-public cmake-bootstrap
                                   "/cmake-" version ".tar.gz"))
               (sha256
                (base32
-                "1ny8y2dzc6fww9gzb1ml0vjpx4kclphjihkxagxigprxdzq2140d"))
-              (patches (search-patches "cmake-curl-certificates-3.24.patch"))))
+                "0vd8ambs4r7yzwwshba0l0pl0b7q566a0pq6gsdz5wh80njf2mcz"))))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -203,7 +204,10 @@ (define-public cmake-bootstrap
 
                 ;; 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
@@ -310,6 +314,8 @@ (define-public cmake-minimal
      (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))))
@@ -341,6 +347,7 @@ (define-public cmake-minimal
                       (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~%"))))))
@@ -353,7 +360,7 @@ (define-public cmake
   (package
     (inherit cmake-minimal)
     (name "cmake")
-    (version "3.25.1")
+    (version "3.30.5")
     (source (origin
               (inherit (package-source cmake-minimal))
               (method url-fetch)
@@ -368,8 +375,7 @@ (define-public cmake
                                   ,@rest))))
               (sha256
                (base32
-                "1n4inb3fvk70sni5gmkljqw3cyllalyg3fnr9rlr7x3aa44isl8w"))
-              (patches (search-patches "cmake-curl-certificates-3.24.patch"))))
+                "0vd8ambs4r7yzwwshba0l0pl0b7q566a0pq6gsdz5wh80njf2mcz"))))
     (outputs '("out" "doc"))
     (arguments
      (substitute-keyword-arguments (package-arguments cmake-minimal)
@@ -406,7 +412,10 @@ (define-public cmake
                   (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)
@@ -414,10 +423,10 @@ (define-public cmake
                texinfo)))
     (properties (alist-delete 'hidden? (package-properties cmake-minimal)))))
 
-(define-public cmake-3.30
+(define-public cmake-3.24
   (package
     (inherit cmake)
-    (version "3.30.3")
+    (version "3.24.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://cmake.org/files/v"
@@ -425,14 +434,9 @@ (define-public cmake-3.30
                                   "/cmake-" version ".tar.gz"))
               (sha256
                (base32
-                "1r48zym4dy4mvwzk704zh1vx9gb4a910f424ypvis28mcxdy2pbd"))))
-    (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))))))
+                "15i2zbxlksqv4czajpwcc1c21smgw2mzpbghsdq71zqfa6cy9j9j"))
+              (patches (search-patches "cmake-curl-certificates-3.24.patch"))))
+    (properties '((hidden? . #t)))))
 
 (define-public cmake-minimal-cross
   (package
-- 
2.46.1