sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (89e9c2523ed9f2711487967b5f47c85caf38b8c3)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (89e9c2523ed9f2711487967b5f47c85caf38b8c3)
- Date: Wed, 22 Jan 2025 21:10:47 +0000
GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:
libs/libcmis/DETAILS
| 5 -
libs/libcmis/HISTORY
| 7 +
libs/libcmis/PRE_BUILD
| 3
libs/libcmis/patches/0001-Fix-boost-1.86-breakage.patch
| 47 +++++++++
libs/libcmis/patches/0002-sha1-test-fails-with-older-boost.patch
| 45 +++++++++
libs/libcmis/patches/0003-Fix-build-with-boost-1.66-and-simplify-a-bit.patch
| 48 ++++++++++
6 files changed, 153 insertions(+), 2 deletions(-)
New commits:
commit 89e9c2523ed9f2711487967b5f47c85caf38b8c3
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
libcmis: Add Watch line
commit f56da6f652c422c8528005881cbe1421b05cff35
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
libcmis 0.6.2
diff --git a/libs/libcmis/DETAILS b/libs/libcmis/DETAILS
index 6db8146..ee02f47 100755
--- a/libs/libcmis/DETAILS
+++ b/libs/libcmis/DETAILS
@@ -1,8 +1,9 @@
+# Watch: https://github.com/tdf/libcmis/tags
SPELL=libcmis
- VERSION=0.5.2
+ VERSION=0.6.2
SOURCE="$SPELL-$VERSION.tar.xz"
SOURCE_URL[0]=https://github.com/tdf/$SPELL/releases/download/v$VERSION/$SOURCE
-
SOURCE_HASH=sha512:295ab15115e75b1f6074f17d3538afe0de9b2b77ab454f5c63cb05e8df11886d82942fbf21ba01486052e3f6c75b0636b99d8e660cd3472dc4b87c31d3cd557b
+
SOURCE_HASH=sha512:950c2a506db33249251304b038d4389d230fb707d17866322533c8f9261e0fac864bc901163697e712d5f620e19f26b456d896c9ad45362b8acd1d5cbae5f831
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
WEB_SITE="https://github.com/tdf/libcmis"
LICENSE[0]="MPL-1.1 GPL-2.0-or-later GPL-2.0-or-later
LGPL-2.1-or-later"
diff --git a/libs/libcmis/HISTORY b/libs/libcmis/HISTORY
index 22af236..2907837 100644
--- a/libs/libcmis/HISTORY
+++ b/libs/libcmis/HISTORY
@@ -1,2 +1,9 @@
+2025-01-22 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 0.6.2
+ * PRE_BUILD, patches/0001-Fix-boost-1.86-breakage.patch,
+ patches/0002-sha1-test-fails-with-older-boost.patch,
+ patches/0003-Fix-build-with-boost-1.66-and-simplify-a-bit.patch:
+ fixed build against boost 1.86+
+
2021-12-25 Ismael Luceno <ismael AT sourcemage.org>
* DEPENDS, DETAILS: spell created
diff --git a/libs/libcmis/PRE_BUILD b/libs/libcmis/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/libs/libcmis/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/libs/libcmis/patches/0001-Fix-boost-1.86-breakage.patch
b/libs/libcmis/patches/0001-Fix-boost-1.86-breakage.patch
new file mode 100644
index 0000000..b4125d1
--- /dev/null
+++ b/libs/libcmis/patches/0001-Fix-boost-1.86-breakage.patch
@@ -0,0 +1,47 @@
+From dfcb642a491f7ec2ae52e3e83d31bb6cdf3670c2 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap AT gentoo.org>
+Date: Sat, 31 Aug 2024 12:39:39 +0200
+Subject: [PATCH 1/3] 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
+
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ 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();
+ }
+
diff --git a/libs/libcmis/patches/0002-sha1-test-fails-with-older-boost.patch
b/libs/libcmis/patches/0002-sha1-test-fails-with-older-boost.patch
new file mode 100644
index 0000000..e84bb97
--- /dev/null
+++ b/libs/libcmis/patches/0002-sha1-test-fails-with-older-boost.patch
@@ -0,0 +1,45 @@
+From 0753091be57edae28655e43a9bae9e4c4e414117 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara AT collabora.com>
+Date: Fri, 13 Sep 2024 16:02:13 +0100
+Subject: [PATCH 2/3] sha1 test fails with older boost
+
+<fridrich> 1) test: XmlTest::sha1Test (F) line: 588 test-xmlutils.cxx
+<fridrich> equality assertion failed
+<fridrich> - Expected: f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0
+<fridrich> - Actual : 8b9efff79be0b27b5d5a9370c50c5e78f0abd0d9
+
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/libcmis/xml-utils.cxx | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/libcmis/xml-utils.cxx b/src/libcmis/xml-utils.cxx
+index cdf088f..3568ec6 100644
+--- a/src/libcmis/xml-utils.cxx
++++ b/src/libcmis/xml-utils.cxx
+@@ -536,17 +536,19 @@ namespace libcmis
+ 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 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 < sizeof( digest ); ++ptr, ++i )
++#if BOOST_VERSION < 108600
++ for ( int i = 0; i < 5; ++i )
++ out << setw(8) << digest[i];
++#else
++ const unsigned char* ptr = reinterpret_cast<const unsigned char*>(
digest );
++ for ( size_t i = 0; i < sizeof( digest ); ++ptr, ++i )
+ out << setw(2) << static_cast<int>( *ptr );
++#endif
+ return out.str();
+ }
+
diff --git
a/libs/libcmis/patches/0003-Fix-build-with-boost-1.66-and-simplify-a-bit.patch
b/libs/libcmis/patches/0003-Fix-build-with-boost-1.66-and-simplify-a-bit.patch
new file mode 100644
index 0000000..d10f4dc
--- /dev/null
+++
b/libs/libcmis/patches/0003-Fix-build-with-boost-1.66-and-simplify-a-bit.patch
@@ -0,0 +1,48 @@
+From 8cf58e67c8a77a81bb8392886468e12c0f96d9ef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba AT bluewin.ch>
+Date: Mon, 16 Sep 2024 10:21:42 +0200
+Subject: [PATCH 3/3] Fix build with boost < 1.66 and simplify a bit
+
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/libcmis/xml-utils.cxx | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/src/libcmis/xml-utils.cxx b/src/libcmis/xml-utils.cxx
+index 3568ec6..20c671e 100644
+--- a/src/libcmis/xml-utils.cxx
++++ b/src/libcmis/xml-utils.cxx
+@@ -531,9 +531,14 @@ namespace libcmis
+ boost::uuids::detail::sha1 sha1;
+ sha1.process_bytes( str.c_str(), str.size() );
+
+- // on boost < 1.86.0, digest_type is typedef'd as unsigned int[5]
++ // on boost < 1.66.0, digest_type is typedef'd as reference to
unsigned int[5]
++ // on boost >= 1.66.0 and < 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]
++#if BOOST_VERSION < 106600
++ unsigned int digest[5];
++#else
+ boost::uuids::detail::sha1::digest_type digest;
++#endif
+ sha1.get_digest( digest );
+
+ stringstream out;
+@@ -541,14 +546,8 @@ namespace libcmis
+ // hexadecimal digits, including possible leading 0s, or we get
+ // less than 40 digits as result.
+ out << hex << setfill('0') << right;
+-#if BOOST_VERSION < 108600
+- for ( int i = 0; i < 5; ++i )
+- out << setw(8) << digest[i];
+-#else
+- const unsigned char* ptr = reinterpret_cast<const unsigned char*>(
digest );
+- for ( size_t i = 0; i < sizeof( digest ); ++ptr, ++i )
+- out << setw(2) << static_cast<int>( *ptr );
+-#endif
++ for ( size_t i = 0; i < sizeof( digest ) / sizeof( digest[0] ); ++i
)
++ out << setw(2 * sizeof( digest[0] )) << static_cast<int>(
digest[i] );
+ return out.str();
+ }
+
- [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (89e9c2523ed9f2711487967b5f47c85caf38b8c3), Ismael Luceno, 01/22/2025
Archive powered by MHonArc 2.6.24.