forked from pool/cmis-client
Accepting request 1200283 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1200283 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmis-client?expand=0&rev=24
This commit is contained in:
commit
095e66b216
44
68.patch
Normal file
44
68.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From dfcb642a491f7ec2ae52e3e83d31bb6cdf3670c2 Mon Sep 17 00:00:00 2001
|
||||
From: David Seifert <soap@gentoo.org>
|
||||
Date: Sat, 31 Aug 2024 12:39:39 +0200
|
||||
Subject: [PATCH] Fix boost 1.86 breakage
|
||||
|
||||
The fix does not break building against <1.86 since we're now accessing the
|
||||
object representation of the return value.
|
||||
|
||||
Fixes #67
|
||||
---
|
||||
src/libcmis/xml-utils.cxx | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/libcmis/xml-utils.cxx b/src/libcmis/xml-utils.cxx
|
||||
index e487d17..cdf088f 100644
|
||||
--- a/src/libcmis/xml-utils.cxx
|
||||
+++ b/src/libcmis/xml-utils.cxx
|
||||
@@ -531,16 +531,22 @@ namespace libcmis
|
||||
boost::uuids::detail::sha1 sha1;
|
||||
sha1.process_bytes( str.c_str(), str.size() );
|
||||
|
||||
- unsigned int digest[5];
|
||||
+ // on boost < 1.86.0, digest_type is typedef'd as unsigned int[5]
|
||||
+ // on boost >= 1.86.0, digest_type is typedef'd as unsigned char[20]
|
||||
+ boost::uuids::detail::sha1::digest_type digest;
|
||||
sha1.get_digest( digest );
|
||||
|
||||
+ // by using a pointer to unsigned char, we can read the
|
||||
+ // object representation of either typedef.
|
||||
+ const unsigned char* ptr = reinterpret_cast<const unsigned char*>( digest );
|
||||
+
|
||||
stringstream out;
|
||||
- // Setup writing mode. Every number must produce eight
|
||||
+ // Setup writing mode. Every number must produce two
|
||||
// hexadecimal digits, including possible leading 0s, or we get
|
||||
// less than 40 digits as result.
|
||||
out << hex << setfill('0') << right;
|
||||
- for ( int i = 0; i < 5; ++i )
|
||||
- out << setw(8) << digest[i];
|
||||
+ for ( int i = 0; i < sizeof( digest ); ++ptr, ++i )
|
||||
+ out << setw(2) << static_cast<int>( *ptr );
|
||||
return out.str();
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 4 14:53:28 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Add 68.patch: fix build against Boost 1.86.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 2 12:28:21 UTC 2024 - pgajdos@suse.com
|
||||
|
||||
|
@ -27,6 +27,8 @@ License: GPL-2.0-or-later OR MPL-1.1 OR LGPL-2.1-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/tdf/libcmis
|
||||
Source0: https://github.com/tdf/%{_name}/releases/download/v%{version}/%{_name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM -- Fux build against boost 1.86
|
||||
Patch0: https://patch-diff.githubusercontent.com/raw/tdf/libcmis/pull/68.patch
|
||||
BuildRequires: docbook2X
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: intltool
|
||||
@ -85,7 +87,7 @@ Development files for libcmis-c. libcmis-c is a C client library for
|
||||
the CMIS interface.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{_name}-%{version}
|
||||
%autosetup -p1 -n %{_name}-%{version}
|
||||
|
||||
%build
|
||||
autoreconf -fvi
|
||||
|
Loading…
Reference in New Issue
Block a user