From 06c952ac3b7005d2e37c8433a5c543797cd2cfe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 8 Aug 2025 22:01:03 +0700 Subject: [PATCH] libcmis: for boost-1.88 --- srcpkgs/libcmis/patches/boost-1.86.patch | 44 ++++++++++++++++++++++++ srcpkgs/libcmis/template | 5 +-- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/libcmis/patches/boost-1.86.patch diff --git a/srcpkgs/libcmis/patches/boost-1.86.patch b/srcpkgs/libcmis/patches/boost-1.86.patch new file mode 100644 index 00000000000..140aecd70b4 --- /dev/null +++ b/srcpkgs/libcmis/patches/boost-1.86.patch @@ -0,0 +1,44 @@ +From dfcb642a491f7ec2ae52e3e83d31bb6cdf3670c2 Mon Sep 17 00:00:00 2001 +From: David Seifert +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( 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( *ptr ); + return out.str(); + } + diff --git a/srcpkgs/libcmis/template b/srcpkgs/libcmis/template index edfa44b6bcb..bc4cb1ff789 100644 --- a/srcpkgs/libcmis/template +++ b/srcpkgs/libcmis/template @@ -1,11 +1,12 @@ # Template file for 'libcmis' pkgname=libcmis version=0.6.2 -revision=1 +revision=2 build_style=gnu-configure configure_args="DOCBOOK2MAN=docbook2man --disable-werror" hostmakedepends="pkg-config docbook2x" -makedepends="libcurl-devel libxml2-devel libcppunit-devel boost-devel" +makedepends="libcurl-devel libxml2-devel libcppunit-devel + boost-devel-minimal libboost_date_time libboost_program_options" short_desc="C/C++ client library for the CMIS protocol" maintainer="Enno Boland " license="GPL-2.0-or-later, LGPL-2.1-or-later, MPL-1.1"