- fix compilation of compute module (gh#boostorg/uuid#166)

- boost-compute-uuid.patch: added

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/boost?expand=0&rev=331
This commit is contained in:
Dirk Mueller 2024-09-03 09:04:12 +00:00 committed by Git OBS Bridge
parent 6d3dae4db5
commit 52da4a74c5
3 changed files with 42 additions and 0 deletions

34
boost-compute-uuid.patch Normal file
View File

@ -0,0 +1,34 @@
https://github.com/boostorg/uuid/issues/166
https://github.com/boostorg/compute/pull/887
https://github.com/boostorg/compute/pull/893
diff --git a/boost/compute/detail/sha1.hpp b/boost/compute/detail/sha1.hpp
index 5afe5f9c4..3a1820074 100644
--- a/boost/compute/detail/sha1.hpp
+++ b/boost/compute/detail/sha1.hpp
@@ -37,13 +37,22 @@ class sha1 {
}
operator std::string() {
+ #if BOOST_VERSION >= 108600
+ boost::uuids::detail::sha1::digest_type digest;
+ #else
unsigned int digest[5];
+ #endif
+
h.get_digest(digest);
std::ostringstream buf;
+ #if BOOST_VERSION >= 108600
+ for(int i = 0; i < 20; ++i)
+ buf << std::hex << std::setfill('0') << std::setw(2) << +digest[i];
+ #else
for(int i = 0; i < 5; ++i)
buf << std::hex << std::setfill('0') << std::setw(8) << digest[i];
-
+ #endif
return buf.str();
}
private:

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Sep 02 12:53:15 CEST 2024 - aschnell@suse.com
- fix compilation of compute module (gh#boostorg/uuid#166)
- boost-compute-uuid.patch: added
-------------------------------------------------------------------
Fri Aug 30 10:41:54 CEST 2024 - aschnell@suse.com

View File

@ -240,6 +240,7 @@ Patch15: boost-1.57.0-python-abi_letters.patch
Patch16: boost-1.55.0-python-test-PyImport_AppendInittab.patch
Patch17: python_mpi.patch
Patch18: dynamic_linking.patch
Patch19: boost-compute-uuid.patch
Patch20: python_library_name.patch
Patch21: boost-remove-cmakedir.patch
# PATCH-FIX-UPSTREAM boost-1.85.0-python-numpy-2.patch -- gh#boostorg/python/pull/432
@ -1288,6 +1289,7 @@ find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {}
%patch -P 16 -p1
%patch -P 17 -p1
%patch -P 18 -p1
%patch -P 19 -p1
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 24 -p1