[packages/cmake] debugger adapter needs 64-bit atomics

atler atler at pld-linux.org
Wed Aug 23 23:28:49 CEST 2023


commit f81aa116d5a44905c252ea1d5d52b177957c0f71
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Aug 23 23:24:22 2023 +0200

    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

 atomic.patch | 11 +++++++++++
 cmake.spec   |  7 ++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
---
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
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)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cmake.git/commitdiff/f81aa116d5a44905c252ea1d5d52b177957c0f71



More information about the pld-cvs-commit mailing list