diff --git a/net/libcmis/Makefile b/net/libcmis/Makefile index 68719929d2c2..6d57415a138d 100644 --- a/net/libcmis/Makefile +++ b/net/libcmis/Makefile @@ -1,35 +1,35 @@ PORTNAME= libcmis PORTVERSION= 0.6.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net devel MASTER_SITES= https://github.com/tdf/libcmis/releases/download/v${PORTVERSION}/ \ https://dev-www.libreoffice.org/src/ MAINTAINER= office@FreeBSD.org COMMENT= Client library for the CMIS interface WWW= https://github.com/tdf/libcmis LICENSE= LGPL20 MPL11 GPLv2 LICENSE_COMB= dual BUILD_DEPENDS= cppunit-config:devel/cppunit \ ${LOCALBASE}/lib/libboost_regex.a:devel/boost-libs LIB_DEPENDS= libboost_program_options.so:devel/boost-libs \ libcurl.so:ftp/curl USES= compiler:c++11-lib gmake gnome libtool localbase pathfix \ pkgconfig tar:xz USE_GNOME= libxml2 CONFIGURE_ARGS= --disable-werror --with-boost=${LOCALBASE} --without-man GNU_CONFIGURE= yes INSTALL_TARGET= install-strip USE_LDCONFIG= yes PLIST_SUB= MAJVER=${PORTVERSION:R} SHLIBVER=${PORTVERSION:R:E} post-patch: @${REINPLACE_CMD} -e "s|@WITH_LIBCMIS_MAN_FALSE@|#|g" \ ${WRKSRC}/Makefile.in .include diff --git a/net/libcmis/files/patch-boost-1.86 b/net/libcmis/files/patch-boost-1.86 new file mode 100644 index 000000000000..0f416e5e3fa1 --- /dev/null +++ b/net/libcmis/files/patch-boost-1.86 @@ -0,0 +1,47 @@ +https://github.com/tdf/libcmis/issues/67 +https://github.com/tdf/libcmis/pull/68 + +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 src/libcmis/xml-utils.cxx src/libcmis/xml-utils.cxx +index e487d17..cdf088f 100644 +--- src/libcmis/xml-utils.cxx ++++ 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/net/libcmis/files/patch-libxml2-2.12 b/net/libcmis/files/patch-libxml2-2.12 new file mode 100644 index 000000000000..f59bce10ca4e --- /dev/null +++ b/net/libcmis/files/patch-libxml2-2.12 @@ -0,0 +1,26 @@ +From 72618e63433c7243e4d9e79a638f19a09402eecc Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Tue, 21 Nov 2023 23:10:07 +0100 +Subject: [PATCH] Fix build with libxml2-2.12 (missing include) + +See also: https://github.com/tdf/libcmis/issues/51 +Signed-off-by: Andreas Sturmlechner +--- + inc/libcmis/xml-utils.hxx | 1 + + 1 file changed, 1 insertion(+) + +diff --git inc/libcmis/xml-utils.hxx inc/libcmis/xml-utils.hxx +index 929385e..9bd99ae 100644 +--- inc/libcmis/xml-utils.hxx ++++ inc/libcmis/xml-utils.hxx +@@ -34,6 +34,7 @@ + #include + + #include ++#include + #include + #include + #include +-- +2.43.0 +