oom pushed a commit to branch c++-team
in repository guix.

commit ae813bbc3153b8b31e3d27ff5d9b91f3b372082e
Author: Greg Hogan <c...@greghogan.com>
AuthorDate: Tue Oct 22 18:09:29 2024 +0000

    gnu: cmake: Update to 4.0.2.
    
    * gnu/packages/cmake.scm (cmake-bootstrap): Update to 3.31.7.
    [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.2.
    [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
---
 gnu/local.mk                                       |  1 -
 gnu/packages/cmake.scm                             | 63 +++++++++++-----------
 .../patches/cmake-curl-certificates-3.24.patch     | 21 --------
 3 files changed, 33 insertions(+), 52 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index dfafe8b895..81a4a34060 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1130,7 +1130,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/clitest-grep-compat.patch               \
   %D%/packages/patches/clog-fix-shared-build.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 2ce1619bfb..c165e04656 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2024 John Kehayias <john.kehay...@protonmail.com>
 ;;; Copyright © 2024 dan <i@dan.games>
 ;;; Copyright © 2024 Charles <char...@charje.net>
+;;; Copyright © 2024 Greg Hogan <c...@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"
@@ -169,14 +171,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.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://cmake.org/files/v";
@@ -184,8 +188,7 @@ using the CMake build system.")
                                   "/cmake-" version ".tar.gz"))
               (sha256
                (base32
-                "1ny8y2dzc6fww9gzb1ml0vjpx4kclphjihkxagxigprxdzq2140d"))
-              (patches (search-patches "cmake-curl-certificates-3.24.patch"))))
+                "0s7a9j92bh94hlacmmz3rhqi9cgxqd0a7x9ywvgk14drpqgfplm6"))))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -208,7 +211,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
@@ -315,6 +321,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))))
@@ -346,6 +354,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~%"))))))
@@ -358,7 +367,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.2")
     (source (origin
               (inherit (package-source cmake-minimal))
               (method url-fetch)
@@ -373,8 +382,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"))))
+                "0j4dgybz9yw0zpy9h6k5slxpgb7p6869v3qp2w5jxwbwrb484fhw"))))
     (outputs '("out" "doc"))
     (arguments
      (substitute-keyword-arguments (package-arguments cmake-minimal)
@@ -411,33 +419,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-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)) {

Reply via email to