From 76454d9af373da8b0ca5d47b278d67dc051ec09f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 13 Sep 2022 22:57:06 -0400 Subject: gnu: cmake: Update to 3.24.2. * gnu/packages/cmake.scm (cmake): Update to 3.24.2. [source]: Adjust snippet to preserve "Utilities/cmelf". Override with new patch. [native-inputs]: Use modify-inputs and remove labels. * gnu/packages/patches/cmake-curl-certificates-3.24.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/cmake.scm | 30 +++++++++++++++++----- .../patches/cmake-curl-certificates-3.24.patch | 21 +++++++++++++++ 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/cmake-curl-certificates-3.24.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index 2f65e7ed01..adaa709b3e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -975,6 +975,7 @@ dist_patch_DATA = \ %D%/packages/patches/cling-use-shared-library.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/cmake-curl-certificates.patch \ + %D%/packages/patches/cmake-curl-certificates-3.24.patch \ %D%/packages/patches/coda-use-system-libs.patch \ %D%/packages/patches/collectd-5.11.0-noinstallvar.patch \ %D%/packages/patches/containerd-create-pid-file.patch \ diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index cf930c57fc..87fde01f63 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2017, 2018, 2020, 2021 Marius Bakke ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice -;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer +;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2019 Pierre-Moana Levesque ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Ricardo Wurmus @@ -333,6 +333,24 @@ (define-public cmake (package (inherit cmake-minimal) (name "cmake") + (version "3.24.2") + (source (origin + (inherit (package-source cmake-minimal)) + (method url-fetch) + (uri (string-append "https://cmake.org/files/v" + (version-major+minor version) + "/cmake-" version ".tar.gz")) + (snippet (match (origin-snippet (package-source cmake-minimal)) + (('begin ('define 'preserved-files ('quote x)) + rest ...) + `(begin (define preserved-files + ',(cons "Utilities/cmelf" x)) + ,@rest)))) + (sha256 + (base32 + "1ny8y2dzc6fww9gzb1ml0vjpx4kclphjihkxagxigprxdzq2140d")) + (patches (search-patches "cmake-curl-certificates-3.24.patch")))) + (outputs '("out" "doc")) (arguments (substitute-keyword-arguments (package-arguments cmake-minimal) ;; Use cmake-minimal this time. @@ -368,14 +386,12 @@ (define-public cmake (delete-file-recursively (string-append out html))))))))) (inputs (modify-inputs (package-inputs cmake-minimal) - (prepend ncurses ;required for ccmake - ))) + (prepend ncurses))) ;required for ccmake ;; Extra inputs required to build the documentation. (native-inputs - `(,@(package-native-inputs cmake-minimal) - ("python-sphinx" ,python-sphinx) - ("texinfo" ,texinfo))) - (outputs '("out" "doc")) + (modify-inputs (package-native-inputs cmake-minimal) + (append python-sphinx + texinfo))) (properties (alist-delete 'hidden? (package-properties cmake-minimal))))) (define-public cmake-minimal-cross diff --git a/gnu/packages/patches/cmake-curl-certificates-3.24.patch b/gnu/packages/patches/cmake-curl-certificates-3.24.patch new file mode 100644 index 0000000000..ca29c9001e --- /dev/null +++ b/gnu/packages/patches/cmake-curl-certificates-3.24.patch @@ -0,0 +1,21 @@ +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)) { -- cgit v1.2.3