commit:     c54316bf92e554f1a9dc703ba73a7acca165bff5
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 11 02:15:19 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Thu Sep 11 02:32:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c54316bf

dev-build/cmake: fix build with modern cURL

cURL 8.16.0 has turned more types into Longs, and it turns out that
CMake has been using more cURL internals not documented for
public use.

Also add the 8.13.0 patch where required to ensure that all
CMakes in tree can build against all cURLs.

Closes: https://bugs.gentoo.org/962712
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 dev-build/cmake/cmake-3.28.5.ebuild                |  1 +
 dev-build/cmake/cmake-3.31.5.ebuild                |  2 ++
 dev-build/cmake/cmake-3.31.7-r1.ebuild             |  1 +
 dev-build/cmake/cmake-3.31.8.ebuild                |  1 +
 dev-build/cmake/cmake-4.0.3.ebuild                 |  1 +
 dev-build/cmake/cmake-4.1.0.ebuild                 |  1 +
 dev-build/cmake/cmake-4.1.1.ebuild                 |  1 +
 .../cmake/files/cmake-3.28.5-curl-8.16.0.patch     | 28 ++++++++++++++++++++++
 .../cmake/files/cmake-4.1.1-curl-8.16.0.patch      | 24 +++++++++++++++++++
 9 files changed, 60 insertions(+)

diff --git a/dev-build/cmake/cmake-3.28.5.ebuild 
b/dev-build/cmake/cmake-3.28.5.ebuild
index 914a5ddf13ee..c5a78f307f46 100644
--- a/dev-build/cmake/cmake-3.28.5.ebuild
+++ b/dev-build/cmake/cmake-3.28.5.ebuild
@@ -98,6 +98,7 @@ PATCHES=(
 
        # Upstream fixes (can usually be removed with a version bump)
        "${FILESDIR}"/${PN}-3.31.6-curl-8.13.0.patch
+       "${FILESDIR}"/${PN}-3.28.5-curl-8.16.0.patch
 )
 
 cmake_src_bootstrap() {

diff --git a/dev-build/cmake/cmake-3.31.5.ebuild 
b/dev-build/cmake/cmake-3.31.5.ebuild
index b5935d5fd95f..edaa056964d8 100644
--- a/dev-build/cmake/cmake-3.31.5.ebuild
+++ b/dev-build/cmake/cmake-3.31.5.ebuild
@@ -98,6 +98,8 @@ PATCHES=(
        "${FILESDIR}/${PN}-3.30.3-cudahostld.patch"
 
        # Upstream fixes (can usually be removed with a version bump)
+       "${FILESDIR}"/${PN}-3.31.6-curl-8.13.0.patch
+       "${FILESDIR}/${PN}-4.1.1-curl-8.16.0.patch"
 )
 
 cmake_src_bootstrap() {

diff --git a/dev-build/cmake/cmake-3.31.7-r1.ebuild 
b/dev-build/cmake/cmake-3.31.7-r1.ebuild
index a59fcb4bde8e..9f0ab88bffc7 100644
--- a/dev-build/cmake/cmake-3.31.7-r1.ebuild
+++ b/dev-build/cmake/cmake-3.31.7-r1.ebuild
@@ -99,6 +99,7 @@ PATCHES=(
 
        # Upstream fixes (can usually be removed with a version bump)
        "${FILESDIR}"/${PN}-3.31.7-hdf5.patch
+       "${FILESDIR}/${PN}-4.1.1-curl-8.16.0.patch"
 )
 
 cmake_src_bootstrap() {

diff --git a/dev-build/cmake/cmake-3.31.8.ebuild 
b/dev-build/cmake/cmake-3.31.8.ebuild
index ea60e33669ae..daa7137f1bcd 100644
--- a/dev-build/cmake/cmake-3.31.8.ebuild
+++ b/dev-build/cmake/cmake-3.31.8.ebuild
@@ -99,6 +99,7 @@ PATCHES=(
 
        # Upstream fixes (can usually be removed with a version bump)
        "${FILESDIR}"/${PN}-3.31.7-hdf5.patch
+       "${FILESDIR}/${PN}-4.1.1-curl-8.16.0.patch"
 )
 
 cmake_src_bootstrap() {

diff --git a/dev-build/cmake/cmake-4.0.3.ebuild 
b/dev-build/cmake/cmake-4.0.3.ebuild
index e1c7d026c0a2..c8af6d4f8bd7 100644
--- a/dev-build/cmake/cmake-4.0.3.ebuild
+++ b/dev-build/cmake/cmake-4.0.3.ebuild
@@ -103,6 +103,7 @@ PATCHES=(
 
        # Upstream fixes (can usually be removed with a version bump)
        "${FILESDIR}"/${PN}-3.31.7-hdf5.patch
+       "${FILESDIR}/${PN}-4.1.1-curl-8.16.0.patch"
 )
 
 cmake_src_bootstrap() {

diff --git a/dev-build/cmake/cmake-4.1.0.ebuild 
b/dev-build/cmake/cmake-4.1.0.ebuild
index d5c57e85205e..b9df90b728ad 100644
--- a/dev-build/cmake/cmake-4.1.0.ebuild
+++ b/dev-build/cmake/cmake-4.1.0.ebuild
@@ -102,6 +102,7 @@ PATCHES=(
        "${FILESDIR}/${PN}-3.30.3-cudahostld.patch"
 
        # Upstream fixes (can usually be removed with a version bump)
+       "${FILESDIR}/${PN}-4.1.1-curl-8.16.0.patch"
 )
 
 cmake_src_bootstrap() {

diff --git a/dev-build/cmake/cmake-4.1.1.ebuild 
b/dev-build/cmake/cmake-4.1.1.ebuild
index b2642fef0776..0ca40735b5ee 100644
--- a/dev-build/cmake/cmake-4.1.1.ebuild
+++ b/dev-build/cmake/cmake-4.1.1.ebuild
@@ -102,6 +102,7 @@ PATCHES=(
        "${FILESDIR}/${PN}-3.30.3-cudahostld.patch"
 
        # Upstream fixes (can usually be removed with a version bump)
+       "${FILESDIR}/${PN}-4.1.1-curl-8.16.0.patch"
 )
 
 cmake_src_bootstrap() {

diff --git a/dev-build/cmake/files/cmake-3.28.5-curl-8.16.0.patch 
b/dev-build/cmake/files/cmake-3.28.5-curl-8.16.0.patch
new file mode 100644
index 000000000000..9a57b28b818a
--- /dev/null
+++ b/dev-build/cmake/files/cmake-3.28.5-curl-8.16.0.patch
@@ -0,0 +1,28 @@
+https://github.com/Kitware/CMake/commit/c92268f91b30e6d52b82d1ffad227cadafcf4dbf
+From: Matt Jolly <[email protected]>
+Date: Thu, 11 Sep 2025 11:20:42 +1000
+Subject: [PATCH] cmCTestCurl: Avoid using undocumented type for
+ CURLOPT_PROXYTYPE values
+
+Since upstream curl commit `1a12663d06` (CURLOPT: bump `CURLPROXY_*`
+enums to `long`, drop casts, 2025-07-28), the `CURLPROXY_*` constants
+are integer literals instead of `enum curl_proxytype`.  It turns out
+that `curl_easy_setopt` has always expected a `long` anyway, and that
+`curl_proxytype` is not documented for public use.
+
+Rebased for 3.28.5
+
+Signed-off-by: Matt Jolly <[email protected]>
+--- a/Source/CTest/cmCTestCurl.h
++++ b/Source/CTest/cmCTestCurl.h
+@@ -44,7 +44,7 @@ private:
+   std::vector<std::string> HttpHeaders;
+   std::string HTTPProxyAuth;
+   std::string HTTPProxy;
+-  curl_proxytype HTTPProxyType;
++  long HTTPProxyType;
+   bool VerifyHostOff;
+   bool VerifyPeerOff;
+   bool UseHttp10;
+-- 
+2.49.1

diff --git a/dev-build/cmake/files/cmake-4.1.1-curl-8.16.0.patch 
b/dev-build/cmake/files/cmake-4.1.1-curl-8.16.0.patch
new file mode 100644
index 000000000000..a2122eb295fb
--- /dev/null
+++ b/dev-build/cmake/files/cmake-4.1.1-curl-8.16.0.patch
@@ -0,0 +1,24 @@
+https://github.com/Kitware/CMake/commit/c92268f91b30e6d52b82d1ffad227cadafcf4dbf
+From: Brad King <[email protected]>
+Date: Tue, 2 Sep 2025 11:41:10 -0400
+Subject: [PATCH] cmCTestCurl: Avoid using undocumented type for
+ CURLOPT_PROXYTYPE values
+
+Since upstream curl commit `1a12663d06` (CURLOPT: bump `CURLPROXY_*`
+enums to `long`, drop casts, 2025-07-28), the `CURLPROXY_*` constants
+are integer literals instead of `enum curl_proxytype`.  It turns out
+that `curl_easy_setopt` has always expected a `long` anyway, and that
+`curl_proxytype` is not documented for public use.
+
+Fixes: #27178
+--- a/Source/CTest/cmCTestCurl.h
++++ b/Source/CTest/cmCTestCurl.h
+@@ -52,7 +52,7 @@ class cmCTestCurl
+   std::vector<std::string> HttpHeaders;
+   std::string HTTPProxyAuth;
+   std::string HTTPProxy;
+-  curl_proxytype HTTPProxyType;
++  long HTTPProxyType;
+   bool UseHttp10 = false;
+   bool Quiet = false;
+   int TimeOutSeconds = 0;

Reply via email to