1 Commits

Author SHA256 Message Date
Simon Lees
4ea0455b52 Fix build issues
disable LTO (build fails in ctest)
Add some casts to ctest to fix curl related permissive issues
2026-02-18 13:03:57 +10:30
3 changed files with 39 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Feb 18 02:26:33 UTC 2026 - Simon Lees <sflees@suse.de>
- Fix Build for SLFO:Main
* Disable LTO
* fix-build-CURLPROXY.patch - add some casts in ctest
-------------------------------------------------------------------
Wed May 28 18:49:13 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>

View File

@@ -16,6 +16,8 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# cmake doesn't build with lto on all platforms
%define _lto_cflags %{nil}
%global flavor @BUILD_FLAVOR@%{nil}
# Flavor gui
@@ -71,6 +73,7 @@ Patch0: cmake-fix-ruby-test.patch
Patch1: feature-suse-python-interp-search-order.patch
# PATCH-FIX-UPSTREAM cmake-findhdf5-prefer-hl-compilers.patch badshah400@gmail.com -- FindHDF5: Prefer h5hl* compilers for HDF5_FIND_HL; patch submitted upstream [https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10450.patch]
Patch2: cmake-findhdf5-prefer-hl-compilers.patch
Patch3: fix-build-CURLPROXY.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
@@ -163,6 +166,7 @@ export PATH+=":%{_qt6_libexecdir}"
%define _find_debuginfo_dwz_opts %{nil}
%define _lto_cflags %{nil}
%endif
# -Wno-fpermissive required for system curl in ctest
export CFLAGS="%{optflags}"
export CXXFLAGS="$CFLAGS"
%if %{with gui}

28
fix-build-CURLPROXY.patch Normal file
View File

@@ -0,0 +1,28 @@
Index: cmake-3.31.7/Source/CTest/cmCTestCurl.cxx
===================================================================
--- cmake-3.31.7.orig/Source/CTest/cmCTestCurl.cxx
+++ cmake-3.31.7/Source/CTest/cmCTestCurl.cxx
@@ -264,7 +264,7 @@ void cmCTestCurl::SetProxyType()
{
this->HTTPProxy.clear();
// this is the default
- this->HTTPProxyType = CURLPROXY_HTTP;
+ this->HTTPProxyType = (curl_proxytype)CURLPROXY_HTTP;
this->HTTPProxyAuth.clear();
if (cmSystemTools::GetEnv("HTTP_PROXY", this->HTTPProxy)) {
std::string port;
@@ -276,11 +276,11 @@ void cmCTestCurl::SetProxyType()
if (cmSystemTools::GetEnv("HTTP_PROXY_TYPE", type)) {
// HTTP/SOCKS4/SOCKS5
if (type == "HTTP") {
- this->HTTPProxyType = CURLPROXY_HTTP;
+ this->HTTPProxyType = (curl_proxytype)CURLPROXY_HTTP;
} else if (type == "SOCKS4") {
- this->HTTPProxyType = CURLPROXY_SOCKS4;
+ this->HTTPProxyType = (curl_proxytype)CURLPROXY_SOCKS4;
} else if (type == "SOCKS5") {
- this->HTTPProxyType = CURLPROXY_SOCKS5;
+ this->HTTPProxyType = (curl_proxytype)CURLPROXY_SOCKS5;
}
}
cmSystemTools::GetEnv("HTTP_PROXY_USER", this->HTTPProxyAuth);