summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Palus2023-08-23 21:24:22 (GMT)
committerJan Palus2023-08-23 21:24:22 (GMT)
commitf81aa116d5a44905c252ea1d5d52b177957c0f71 (patch)
tree90b7a21b47cd06e7c0fe9ac8b4204ceb59d3e0ce
parent3287d08ca5d1fc259d8be0976da5c686baa07deb (diff)
downloadcmake-f81aa116d5a44905c252ea1d5d52b177957c0f71.zip
cmake-f81aa116d5a44905c252ea1d5d52b177957c0f71.tar.gz
debugger adapter needs 64-bit atomics
add libatomic-devel BR on archs that don't support it and drop bogus cpu check from verification whether libatomic is required
-rw-r--r--atomic.patch11
-rw-r--r--cmake.spec7
2 files changed, 17 insertions, 1 deletions
diff --git a/atomic.patch b/atomic.patch
new file mode 100644
index 0000000..0bb0f3a
--- /dev/null
+++ b/atomic.patch
@@ -0,0 +1,11 @@
+--- cmake-3.27.3.orig/Source/Checks/cm_cxx_features.cmake 2023-08-16 19:46:35.000000000 +0200
++++ cmake-3.27.3/Source/Checks/cm_cxx_features.cmake 2023-08-23 23:10:16.079757726 +0200
+@@ -96,7 +96,7 @@
+ set(CMake_HAVE_CXX_FILESYSTEM FALSE)
+ endif()
+
+-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l|sparc")
++if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ cm_check_cxx_feature(atomic_builtin)
+ if(NOT CMake_HAVE_CXX_ATOMIC_BUILTIN)
+ set(cm_check_cxx_feature_LINK_LIBRARIES atomic)
diff --git a/cmake.spec b/cmake.spec
index 4059442..17610bd 100644
--- a/cmake.spec
+++ b/cmake.spec
@@ -30,6 +30,7 @@ Patch3: %{name}-findruby.patch
Patch4: %{name}-findruby2.patch
Patch5: disable-completness-check.patch
Patch6: %{name}-zlib.patch
+Patch7: atomic.patch
URL: https://cmake.org/
# system zlib,bzip2,xz,zstd used only when without system libarchive
%if %{with gui}
@@ -43,6 +44,9 @@ BuildRequires: curl-devel
BuildRequires: expat-devel
BuildRequires: jsoncpp-devel >= 1.6.2-2
BuildRequires: libarchive-devel >= 3.3.3
+%ifnarch %arch_with_atomics64
+BuildRequires: libatomic-devel
+%endif
BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: libuv-devel >= 1.28.0
BuildRequires: ncurses-devel > 5.9-3
@@ -52,7 +56,7 @@ BuildRequires: nghttp2-devel
%{?with_gui:BuildRequires: qt5-qmake >= 5.0}
BuildRequires: rhash-devel
BuildRequires: rpm-build >= 4.6
-BuildRequires: rpmbuild(macros) >= 1.167
+BuildRequires: rpmbuild(macros) >= 2.025
%{?with_doc:BuildRequires: sphinx-pdg}
BuildRequires: xz-devel
BuildRequires: zlib-devel
@@ -145,6 +149,7 @@ Bashowe dopełnianie parametrów dla cmake'a.
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
%{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' \
Modules/Compiler/XL-Fortran/cpp