git: 762bf9671351 - main - editors/openoffice-4: Upgrade to 4.1.17 RC1

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Sun, 27 Sep 2026 13:32:50 UTC
The branch main has been updated by truckman:

URL: https://cgit.FreeBSD.org/ports/commit/?id=762bf96713519f7f0ffc35653723203fcd926893

commit 762bf96713519f7f0ffc35653723203fcd926893
Author:     Don Lewis <truckman@FreeBSD.org>
AuthorDate: 2026-09-27 07:09:19 +0000
Commit:     Don Lewis <truckman@FreeBSD.org>
CommitDate: 2026-09-27 13:32:14 +0000

    editors/openoffice-4: Upgrade to 4.1.17 RC1
    
    Upgrade Apache OpenOffice to version 4.1.17 RC1.
    
    Switch from system textproc/libtextcat to bundled libtextcat.
    The system version probably never worked properly because it
    lacks UTF-8 support, whereas the bundled version has been patched
    to support UTF-8.  Regenerate the libtextcat patch from the
    version on the trunk branch which has FreeBSD build fixes.
    Longer term, libtextcat should be replaced by libexttextcat.
    
    Disable WIKI_PUBLISHER and mark BROKEN.  It relies on
    apache-commons-httpclient which has an open MITM CVE.  It should
    be upgraded to Apache HttpComponents, but that requires a newer
    java.
    
    Remove old code optimization tweak that is probably left over
    from when we used the buggy -Os compiler optimization flag.
    
    Remove patches that have been upstreamed.
    
    MFH:            2026Q3
---
 editors/openoffice-4/Makefile                      |  53 +++-----
 editors/openoffice-4/distinfo                      |   8 +-
 ...es_source_cpp__uno_gcc3__freebsd__arm_share.hxx |  11 --
 ...source_cpp__uno_gcc3__freebsd__intel_except.cxx |  15 ---
 ..._source_cpp__uno_gcc3__freebsd__intel_share.hxx |  11 --
 ...ource_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx |  49 -------
 ...ource_cpp__uno_gcc3__freebsd__powerpc_share.hxx |  11 --
 ...source_cpp__uno_gcc3__freebsd__x86-64_share.hxx |  11 --
 ...urce_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx |  36 ------
 .../files/patch-icu_icu-parallel-build.patch       |  23 ----
 editors/openoffice-4/files/patch-icu_makefile.mk   |  10 --
 .../files/patch-libtextcat_libtextcat-2.2.patch    | 144 +++++++++++++++++++++
 12 files changed, 165 insertions(+), 217 deletions(-)

diff --git a/editors/openoffice-4/Makefile b/editors/openoffice-4/Makefile
index f6bf0968ac1a..c4e4c804c545 100644
--- a/editors/openoffice-4/Makefile
+++ b/editors/openoffice-4/Makefile
@@ -1,10 +1,10 @@
 PORTNAME=	apache-openoffice
 PORTVERSION=	${AOOVERSION}${AOORCN:?.p${AOORCN}:}
-PORTREVISION=	4
+PORTREVISION=	0
 CATEGORIES=	editors java
-#MASTER_SITES=	https://dist.apache.org/repos/dist/dev/openoffice/${AOOVERSION}${AOORCN:?-RC${AOORCN}:}/source/
-MASTER_SITES=	https://dlcdn.apache.org/openoffice/${PORTVERSION}/source/ \
-		https://archive.apache.org/dist/openoffice/${PORTVERSION}/source
+MASTER_SITES=	https://dist.apache.org/repos/dist/dev/openoffice/${AOOVERSION}${AOORCN:?-RC${AOORCN}:}/source/
+#MASTER_SITES=	https://dlcdn.apache.org/openoffice/${PORTVERSION}/source/ \
+#1		https://archive.apache.org/dist/openoffice/${PORTVERSION}/source
 MASTER_SITES+=	https://dlcdn.apache.org/openoffice/${PORTVERSION}/source/ \
 		http://tools.openoffice.org/unowinreg_prebuild/680/:unoreg \
 		LOCAL/truckman/openoffice:extsrc \
@@ -16,7 +16,7 @@ PKGNAMEPREFIX=		${LANG_PKGNAME}-
 PKGNAMESUFFIX=		-${LANG_SUFFIX}
 .endif
 DISTFILES=	${AOOSRC} ${EXTSRC}:extsrc ${PYTHON_DISTFILE}:sf \
-		${GCC_EXTRA_DISTFILES:C/.*/&:sf/g}
+		${EXTRA_DISTFILES:C/.*/&:sf/g}
 DIST_SUBDIR=	openoffice
 EXTRACT_ONLY=	${AOOSRC}
 
@@ -98,7 +98,6 @@ LIB_DEPENDS=								\
 		libexpat.so:textproc/expat2				\
 		libhunspell-1.7.so:textproc/hunspell			\
 		libhyphen.so:textproc/hyphen				\
-		libtextcat.so:textproc/libtextcat			\
 		libmythes-1.2.so:textproc/mythes			\
 		librdf.so:textproc/redland				\
 		libserf-1.so:www/serf					\
@@ -132,11 +131,11 @@ CONFLICTS_INSTALL=	apache-openoffice-devel
 
 AOOVERSION1=	4
 AOOVERSION2=	1
-AOOVERSION3=	16
-#AOORCN=		3
+AOOVERSION3=	17
+AOORCN=		1
 # From solenv/inc/minor.mk SOURCEREVISION LAST_MINOR BUILD
-AOOTAG=		AOO4116m3\(Build:9816\)
-GITREVISION=	277251aa7e
+AOOTAG=		AOO4117m1\(Build:9817\)
+GITREVISION=	8b0c57b6af
 EXTSRC=		ApacheOpenOffice.ext_sources.${AOOVERSION1}.x.x.20150707.tar.gz
 
 AOOVERSION=	${AOOVERSION1}.${AOOVERSION2}.${AOOVERSION3}
@@ -158,7 +157,7 @@ CPE_VENDOR=	apache
 
 OPTIONS_DEFINE=		CRASHDUMP CUPS DBGUTIL DEBUG GNOME \
 			SDK WIKI_PUBLISHER
-OPTIONS_DEFAULT=	CUPS GNOME WIKI_PUBLISHER
+OPTIONS_DEFAULT=	CUPS GNOME
 CRASHDUMP_DESC=		Enable crashdumps, you also need to set WITH_DEBUG_PORTS+=${PKGORIGIN}
 DBGUTIL_DESC=		Enable assertions, object counting. (non-production)
 DEBUG_DESC=		Compile with -O0, you also need to set WITH_DEBUG_PORTS+=${PKGORIGIN}
@@ -182,6 +181,8 @@ GNOME_LIB_DEPENDS=		libdbus-1.so:devel/dbus \
 SDK_CONFIGURE_ENABLE=		odk
 SDK_DISTFILES=			unowinreg.dll:unoreg
 
+# commons-httpclient replacement by Apache HttpComponents requires new java
+WIKI_PUBLISHER_BROKEN=		CVE-2012-6153 MITM
 WIKI_PUBLISHER_CONFIGURE_ENABLE=	wiki-publisher
 WIKI_PUBLISHER_CONFIGURE_WITH=						\
 	commons-codec-jar=${JAVALIBDIR}/commons-codec.jar		\
@@ -220,8 +221,9 @@ CONFIGURE_ARGS+=	--enable-strip-solver
 .include <${FILESDIR}/Makefile.localized>
 
 PYTHON_DISTFILE=	38c84292658ed4456157195f1c9bcbe1-Python-2.7.18.tgz
-GCC_EXTRA_DISTFILES=	d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2 \
+EXTRA_DISTFILES=	d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2 \
 			e3738abd0d3ce1870dc1fd1f22bba5b1-icu4c-4_2_1-src.tgz \
+			128cfc86ed5953e57fe0f5ae98b62c2e-libtextcat-2.2.tar.gz \
 			d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz
 
 .if ${CHOSEN_COMPILER_TYPE} == clang
@@ -287,7 +289,6 @@ CONFIGURE_ARGS+=							\
 			--with-jdk-home=${JAVA_HOME}			\
 			--with-system-jpeg				\
 			--with-junit=${JAVALIBDIR}/junit.jar		\
-			--with-system-libtextcat			\
 			--disable-kde					\
 			--disable-kde4					\
 			--with-system-libxml				\
@@ -344,7 +345,7 @@ do-extract-SDK-on:
 post-extract:
 	${TAR} -C ${WRKSUBDIR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${EXTSRC}
 	${CP} ${DISTDIR}/${DIST_SUBDIR}/${PYTHON_DISTFILE} ${WRKSUBDIR}/ext_sources/${PYTHON_DISTFILE}
-.for f in ${GCC_EXTRA_DISTFILES}
+.for f in ${EXTRA_DISTFILES}
 	${CP} ${DISTDIR}/${DIST_SUBDIR}/${f} ${WRKSUBDIR}/ext_sources/${f}
 .endfor
 	${CP} ${FILESDIR}/freebsd-aoo-intro.png \
@@ -381,7 +382,7 @@ post-extract:
 	${SED}  -e '\|^For main/filter/source/config/tools/merge/pyAltFCFGMerge|,/^__/p'	\
 		-e d  ${WRKSRC}/LICENSE > ${LICENSE_FILE_PSFL}
 	${ECHO} '' >> ${LICENSE_FILE_PSFL}
-	${SED}  -e '\|^For Python|,/^__/p'	\
+	${SED}  -e '\|^For Python|,/^__/p'				\
 		-e d  ${WRKSRC}/LICENSE >> ${LICENSE_FILE_PSFL}
 	${SED}  -e '\|^For main/twain|,/^__/p'				\
 		-e d  ${WRKSRC}/LICENSE > ${LICENSE_FILE_TWAIN}
@@ -394,28 +395,6 @@ post-patch:
 	${REINPLACE_CMD} -e "s|%%JAVA_HOME%%|${JAVA_HOME}|" \
 		${WRKSRC}/desktop/scripts/soffice.sh
 	${REINPLACE_CMD} -e '/^mkdir -p/,$$d' ${CREATE_TREE}
-.if ${CHOSEN_COMPILER_TYPE} == gcc
-	# g++49 -Os sometimes leaves inline class methods undefined,
-	# affects fmgridif.cxx and ColumnControl.cxx
-	# See: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65009>
-	if [ ${CXX} = g++49  ]; then \
-		${REINPLACE_CMD} -e "s/ := -Os/ := -Os -fno-devirtualize -fno-devirtualize-speculatively/" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk; \
-		${REINPLACE_CMD} -e "s/=-Os /=-Os -fno-devirtualize -fno-devirtualize-speculatively /" ${WRKSRC}/solenv/inc/unxfbsdi.mk; \
-	fi
-.elif ${ARCH} == i386 && ${CHOSEN_COMPILER_TYPE} == clang
-	# autodoc and uno (bridgetest) core dump when built with with -Os
-	# on i386, affects file.cxx and bridgetest.cxx (at least).
-	# Using -O2 optimiztion works, and -Os is essentially -O2 with out
-	# loop unrolling.
-	# Changing optimization in just unxfbsdi.mk is sufficient to get
-	# a successful build, but change it in both places to avoid the
-	# possibility of obscure runtime problems, which is likely
-	# since this seems to be a generic bug in code generation for
-	# exception handling.
-	# See: <https://llvm.org/bugs/show_bug.cgi?id=24792>
-	${REINPLACE_CMD} -e "s/=-Os /=-O2 -fno-unroll-loops /" ${WRKSRC}/solenv/inc/unxfbsdi.mk
-	${REINPLACE_CMD} -e "s/ := -Os/ := -O2 -fno-unroll-loops/" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk
-.endif
 
 # Verify that lucene was built with the CONTRIB option instead of
 # failing mysteriously during the build
diff --git a/editors/openoffice-4/distinfo b/editors/openoffice-4/distinfo
index 1a82e6b47ed3..53d3b5d73433 100644
--- a/editors/openoffice-4/distinfo
+++ b/editors/openoffice-4/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1760133426
-SHA256 (openoffice/apache-openoffice-4.1.16-277251aa7e-src.tar.bz2) = 47815c676199c6b0d904f551d0c2ac0d3550e8b59fdfa11341ead3e13f25de61
-SIZE (openoffice/apache-openoffice-4.1.16-277251aa7e-src.tar.bz2) = 244012258
+TIMESTAMP = 1790447112
+SHA256 (openoffice/apache-openoffice-4.1.17-8b0c57b6af-src.tar.bz2) = 0e054e1ae8815dfd6972f76d87f05caac8af8d1e0b589582e055abd2cc02cf16
+SIZE (openoffice/apache-openoffice-4.1.17-8b0c57b6af-src.tar.bz2) = 243946674
 SHA256 (openoffice/ApacheOpenOffice.ext_sources.4.x.x.20150707.tar.gz) = 966a8333c83a18ddd84401389006d6e0b52b8175924b808b54b88211669985fa
 SIZE (openoffice/ApacheOpenOffice.ext_sources.4.x.x.20150707.tar.gz) = 28957004
 SHA256 (openoffice/38c84292658ed4456157195f1c9bcbe1-Python-2.7.18.tgz) = da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814
@@ -9,6 +9,8 @@ SHA256 (openoffice/d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2) = fff0
 SIZE (openoffice/d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2) = 58146647
 SHA256 (openoffice/e3738abd0d3ce1870dc1fd1f22bba5b1-icu4c-4_2_1-src.tgz) = 814de31e1413df945cdd34939b424c4cf7a94d1c481f2d44c99c8ca52b288063
 SIZE (openoffice/e3738abd0d3ce1870dc1fd1f22bba5b1-icu4c-4_2_1-src.tgz) = 13161131
+SHA256 (openoffice/128cfc86ed5953e57fe0f5ae98b62c2e-libtextcat-2.2.tar.gz) = 5677badffc48a8d332e345ea4fe225e3577f53fc95deeec8306000b256829655
+SIZE (openoffice/128cfc86ed5953e57fe0f5ae98b62c2e-libtextcat-2.2.tar.gz) = 540999
 SHA256 (openoffice/d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz) = 1f188ac03a8aa4663223eca8c82f91a55293d066d67127082e29a7dba1a98c9f
 SIZE (openoffice/d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz) = 16525605
 SHA256 (openoffice/unowinreg.dll) = f563e522922133db9340b0306711c2d8767cc3481dd9e7d9b0d059906d12653c
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__arm_share.hxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__arm_share.hxx
deleted file mode 100644
index fae5635bd797..000000000000
--- a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__arm_share.hxx
+++ /dev/null
@@ -1,11 +0,0 @@
---- bridges/source/cpp_uno/gcc3_freebsd_arm/share.hxx.orig	2020-10-06 14:16:16 UTC
-+++ bridges/source/cpp_uno/gcc3_freebsd_arm/share.hxx
-@@ -61,7 +61,7 @@ namespace CPPU_CURRENT_NAMESPACE
-     };    
- 
-     extern "C" void *__cxa_allocate_exception(
--        std::size_t thrown_size ) throw();
-+        size_t thrown_size );
-     extern "C" void __cxa_throw (
-         void *thrown_exception, std::type_info *tinfo, 
-         void (*dest) (void *) ) __attribute__((noreturn));
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx
deleted file mode 100644
index b41a379b409d..000000000000
--- a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx
+++ /dev/null
@@ -1,15 +0,0 @@
---- bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx.orig	2019-09-17 22:55:10 UTC
-+++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
-@@ -220,6 +220,12 @@ static void deleteException( void * pExc )
- static void deleteException( void * pExc )
- {
-     __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
-+    if (header->exceptionDestructor != &deleteException) {
-+        // _Unwind_Exception was made __aligned__ which
-+        // increased its size by 12 bytes
-+        header = reinterpret_cast<__cxa_exception const *>(
-+            reinterpret_cast<char const *>( header ) - 12 );
-+    }
-     typelib_TypeDescription * pTD = 0;
-     OUString unoName( toUNOname( header->exceptionType->name() ) );
-     ::typelib_typedescription_getByName( &pTD, unoName.pData );
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx
deleted file mode 100644
index 0bcac37f3a23..000000000000
--- a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx
+++ /dev/null
@@ -1,11 +0,0 @@
---- bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx.orig	2020-10-06 14:16:16 UTC
-+++ bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx
-@@ -62,7 +62,7 @@ extern "C" void *__cxa_allocate_exception(
- #endif /* __GLIBCXX__ */
- 
- extern "C" void *__cxa_allocate_exception(
--    std::size_t thrown_size ) throw();
-+    size_t thrown_size );
- extern "C" void __cxa_throw (
-     void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
- 
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx
deleted file mode 100644
index 2a336ec5fbc5..000000000000
--- a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx
+++ /dev/null
@@ -1,49 +0,0 @@
---- bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx.orig	2019-09-17 22:55:10 UTC
-+++ bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
-@@ -44,9 +44,12 @@ using namespace ::com::sun::star::uno;
- using namespace ::rtl;
- using namespace ::com::sun::star::uno;
- #ifdef __GLIBCXX__
-+using CPPU_CURRENT_NAMESPACE::__cxa_exception;
- using CPPU_CURRENT_NAMESPACE::__cxa_get_globals;
- #else
--using __cxxabiv1::__cxa_get_globals;
-+using __cxxabiv1::__cxa_exception;
-+using __cxxabiv1::__cxa_current_primary_exception;
-+using __cxxabiv1::__cxa_decrement_exception_refcount;
- #endif
- 
- namespace
-@@ -313,8 +316,31 @@ static void cpp_call(
- 	}
-  	catch (...)
-  	{
-+		__cxa_exception *header;
-+#ifdef __GLIBCXX__
-+		header = __cxa_get_globals()->caughtExceptions;
-+#else
-+		header = reinterpret_cast<__cxa_exception *>( __cxa_current_primary_exception() );
-+		if (header) {
-+			__cxa_decrement_exception_refcount( header );
-+			header--;
-+			uint64_t exc_class = header->unwindHeader.exception_class
-+					   & 0xffffffffffffff00;
-+			if (exc_class != /* "GNUCC++" */ 0x474e5543432b2b00) {
-+				// _Unwind_Exception was made __aligned__ which
-+				// increased its size by 12 bytes.
-+				header = reinterpret_cast<__cxa_exception *>(
-+					reinterpret_cast<char *>( header ) - 12 );
-+				exc_class = header->unwindHeader.exception_class
-+					  & 0xffffffffffffff00;
-+				if (exc_class != /* "GNUCC++" */ 0x474e5543432b2b00) {
-+					header = nullptr;
-+				}
-+			}
-+		}
-+#endif
-   		// fill uno exception
--		CPPU_CURRENT_NAMESPACE::fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-+		CPPU_CURRENT_NAMESPACE::fillUnoException( header, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-         
- 		// temporary params
- 		for ( ; nTempIndizes--; )
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__powerpc_share.hxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__powerpc_share.hxx
deleted file mode 100644
index 3266d04affd6..000000000000
--- a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__powerpc_share.hxx
+++ /dev/null
@@ -1,11 +0,0 @@
---- bridges/source/cpp_uno/gcc3_freebsd_powerpc/share.hxx.orig	2020-10-06 14:16:16 UTC
-+++ bridges/source/cpp_uno/gcc3_freebsd_powerpc/share.hxx
-@@ -65,7 +65,7 @@ extern "C" void *__cxa_allocate_exception(
- };    
- 
- extern "C" void *__cxa_allocate_exception(
--    std::size_t thrown_size ) throw();
-+    size_t thrown_size );
- extern "C" void __cxa_throw (
-     void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
- 
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx
deleted file mode 100644
index 0aec998ac85b..000000000000
--- a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx
+++ /dev/null
@@ -1,11 +0,0 @@
---- bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx.orig	2020-10-06 14:16:16 UTC
-+++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx
-@@ -62,7 +62,7 @@ extern "C" void *__cxa_allocate_exception(
- #endif /* __GLIBCXX__ */
- 
- extern "C" void *__cxa_allocate_exception(
--    std::size_t thrown_size ) throw();
-+    size_t thrown_size );
- extern "C" void __cxa_throw (
-     void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
- 
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx
deleted file mode 100644
index 1a501426d669..000000000000
--- a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx
+++ /dev/null
@@ -1,36 +0,0 @@
---- bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx.orig	2019-09-17 22:55:10 UTC
-+++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
-@@ -50,9 +50,12 @@ using namespace ::com::sun::star::uno;
- using namespace ::rtl;
- using namespace ::com::sun::star::uno;
- #ifdef __GLIBCXX__
-+using CPPU_CURRENT_NAMESPACE::__cxa_exception;
- using CPPU_CURRENT_NAMESPACE::__cxa_get_globals;
- #else
--using __cxxabiv1::__cxa_get_globals;
-+using __cxxabiv1::__cxa_exception;
-+using __cxxabiv1::__cxa_current_primary_exception;
-+using __cxxabiv1::__cxa_decrement_exception_refcount;
- #endif
- 
- //==================================================================================================
-@@ -452,8 +455,18 @@ static void cpp_call(
- 	}
-  	catch (...)
-  	{
-+		__cxa_exception *header;
-+#ifdef __GLIBCXX__
-+		header = __cxa_get_globals()->caughtExceptions;
-+#else
-+		header = reinterpret_cast<__cxa_exception *>( __cxa_current_primary_exception() );
-+		if (header) {
-+			__cxa_decrement_exception_refcount( header );
-+			header--;
-+		}
-+#endif
-   		// fill uno exception
--		CPPU_CURRENT_NAMESPACE::fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-+		CPPU_CURRENT_NAMESPACE::fillUnoException( header, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-         
- 		// temporary params
- 		for ( ; nTempIndizes--; )
diff --git a/editors/openoffice-4/files/patch-icu_icu-parallel-build.patch b/editors/openoffice-4/files/patch-icu_icu-parallel-build.patch
deleted file mode 100644
index c2cddf33eb54..000000000000
--- a/editors/openoffice-4/files/patch-icu_icu-parallel-build.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- icu/icu-parallel-build.patch.orig	2025-12-27 09:03:46 UTC
-+++ icu/icu-parallel-build.patch
-@@ -0,0 +1,20 @@
-+diff -ur misc/icu/source/extra/uconv/Makefile.in misc/build/icu/source/extra/uconv/Makefile.in
-+--- misc/icu/source/extra/uconv/Makefile.in	2009-07-01 11:50:32.000000000 -0700
-++++ misc/build/icu/source/extra/uconv/Makefile.in
-+@@ -140,14 +140,14 @@
-+ 	$(LINK.cc) $(OUTOPT)$@ $(OBJECTS) $(LIBS)
-+ 	$(POST_BUILD_STEP)
-+ 
-+-resfiles: $(RESFILES) package-resfiles
-++resfiles: package-resfiles
-+ 
-+ ifeq ($(UCONVMSG_STATIC),YES)
-+ $(UCONVMSG_LIB): resfiles
-+ endif
-+ 
-+ 
-+-package-resfiles: $(RESDIR)/$(RESDIR).lst pkgdata.inc
-++package-resfiles: $(RESFILES) $(RESDIR)/$(RESDIR).lst pkgdata.inc $(RESFILES)
-+ 	$(INVOKE) $(PKGDATA_INVOKE_OPTS) $(TOOLBINDIR)/pkgdata -p $(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
-+ 
-+ $(RESDIR)/$(RESDIR).lst: Makefile $(srcdir)/resfiles.mk
diff --git a/editors/openoffice-4/files/patch-icu_makefile.mk b/editors/openoffice-4/files/patch-icu_makefile.mk
deleted file mode 100644
index bfb383fe9db3..000000000000
--- a/editors/openoffice-4/files/patch-icu_makefile.mk
+++ /dev/null
@@ -1,10 +0,0 @@
---- icu/makefile.mk.orig	2025-12-27 09:25:15 UTC
-+++ icu/makefile.mk
-@@ -44,6 +44,7 @@ PATCH_FILES=${TARFILE_NAME}.patch icu-win-layout.patch
- 
- # TODO file icu-mp.patch does not seem to be required
- PATCH_FILES=${TARFILE_NAME}.patch icu-win-layout.patch \
-+	icu-parallel-build.patch \
- 	icu-format-security.patch icu-win-icutu-dll-version.patch
- .IF "$(OS)"=="MACOSX"
- PATCH_FILES+=icu-darwin.patch
diff --git a/editors/openoffice-4/files/patch-libtextcat_libtextcat-2.2.patch b/editors/openoffice-4/files/patch-libtextcat_libtextcat-2.2.patch
new file mode 100644
index 000000000000..761f96b89396
--- /dev/null
+++ b/editors/openoffice-4/files/patch-libtextcat_libtextcat-2.2.patch
@@ -0,0 +1,144 @@
+--- libtextcat/libtextcat-2.2.patch.orig	2026-09-19 20:13:03 UTC
++++ libtextcat/libtextcat-2.2.patch
+@@ -1,5 +1,5 @@ --- misc/libtextcat-2.2/configure	Thu May 22 13:39:55 
+ --- misc/libtextcat-2.2/configure	Thu May 22 13:39:55 2003
+-+++ misc/build/libtextcat-2.2/configure	Mon Mar 31 11:29:14 2008
+++++ misc/build/libtextcat-2.2/configure	Fri Sep
+ @@ -3451,7 +3451,7 @@
+    ;;
+  
+@@ -28,16 +28,49 @@ +    archive_cmds='$CC -r -keep_private_externs -nostd
+      # We need to add '_' to the symbols in $export_symbols first
+      #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+      hardcode_direct=yes
+-@@ -6280,7 +6281,7 @@
++@@ -5793,7 +5794,7 @@
++     whole_archive_flag_spec='-all_load $convenience'
++     ;;
++ 
++-  freebsd1*)
+++  freebsd1.*)
++     ld_shlibs=no
++     ;;
++ 
++@@ -5809,7 +5810,7 @@
++     ;;
++ 
++   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
++-  freebsd2*)
+++  freebsd2.*)
++     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++     hardcode_direct=yes
++     hardcode_minus_L=yes
++@@ -6275,12 +6276,12 @@
++   shlibpath_var=DYLD_LIBRARY_PATH
+    ;;
+  
++-freebsd1*)
+++freebsd1.*)
++   dynamic_linker=no
++   ;;
++ 
+  freebsd*)
+ -  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ +  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
+    version_type=freebsd-$objformat
+    case $version_type in
+      freebsd-elf*)
+-@@ -6365,7 +6365,7 @@
++@@ -6295,7 +6296,7 @@
++   esac
++   shlibpath_var=LD_LIBRARY_PATH
++   case $host_os in
++-  freebsd2*)
+++  freebsd2.*)
++     shlibpath_overrides_runpath=yes
++     ;;
++   *)
++@@ -6364,7 +6365,7 @@
+    ;;
+  
+  # This must be Linux ELF.
+@@ -726,7 +759,7 @@ -		const char *q = p;
+ +	while(1) {
+  
+ -		const char *q = p;
+-+     const char *q = &p[pointer];   /*[modified] previously p++ above (for(;;p++)) now, it's pointer wich is increased so we have to get the new pointer on the buffer*/
+++     const char *q = &p[pointer];   /*[modified] previously p++ above (for(;;p++)) now, it's pointer which is increased so we have to get the new pointer on the buffer*/
+  		char *m = n;
+  
+  		/*** First char may be an underscore ***/
+@@ -759,7 +792,7 @@ +
+  			}
+  		}
+ +
+-+  pointer = nextcharstart(p,pointer);   /*[modified] p[pointer] must point on the next start of symbol, but whith utf next start is not surely next char*/
+++  pointer = nextcharstart(p,pointer);   /*[modified] p[pointer] must point on the next start of symbol, but with utf next start is not surely next char*/
+  	}
+  	return;
+  }
+@@ -1088,8 +1121,8 @@ +/**
+ +}
+ +
+ +/**
+-+ * Originaly this function had only one parameter (conffile) it has been modified since OOo use
+-+ * Basicaly prefix is the directory path where fingerprints are stored
+++ * Originally this function had only one parameter (conffile) it has been modified since OOo use
+++ * Basically prefix is the directory path where fingerprints are stored
+ + */
+ +extern void *special_textcat_Init( const char *conffile, const char *prefix )
+  {
+@@ -1208,8 +1241,8 @@ + * see below
+  extern void *textcat_Init( const char *conffile );
+  
+  /**
+-+ * Originaly this function had only one parameter (conffile) it has been modified since OOo must be able to load alternativ DB
+-+ * Basicaly prefix is the directory path where fingerprints are stored
+++ * Originally this function had only one parameter (conffile) it has been modified since OOo must be able to load alternativ DB
+++ * Basically prefix is the directory path where fingerprints are stored
+ + */
+ +extern void *special_textcat_Init( const char *conffile, const char *prefix );
+ +
+@@ -1284,7 +1317,7 @@ +    }
+ +        ++pointer;
+ +    }
+ +    }
+-+    if(str[pointer]){   /*finaly, if we are not on the \0 character, we jump to the next character*/
+++    if(str[pointer]){   /*finally, if we are not on the \0 character, we jump to the next character*/
+ +        ++pointer;
+ +    }
+ +    return pointer;
+@@ -1419,14 +1452,14 @@ + * Is used to jump to the next start of char
+ +
+ +/*
+ + * Is used to jump to the next start of char
+-+ * of course it's only usefull when encoding is utf-8
+++ * of course it's only useful when encoding is utf-8
+ + * This function have been added by Jocelyn Merand to use libtextcat in OOo
+ + */
+ +int nextcharstart(const char *str, int position);
+ +
+ +
+ +/*Copy the char in str to dest
+-+ * of course it's only usefull when encoding is utf8 and the symbol is encoded with more than 1 char
+++ * of course it's only useful when encoding is utf8 and the symbol is encoded with more than 1 char
+ + * return the number of char jumped
+ + * This function have been added by Jocelyn Merand to use libtextcat in OOo
+ + */
+@@ -1434,14 +1467,14 @@ +/* checks if n-gram lex is a prefix of key and of len
+ +
+ +
+ +/* checks if n-gram lex is a prefix of key and of length len
+-+* if _UTF8_ is defined, it uses escap characters and len is not realy the length of lex
+++* if _UTF8_ is defined, it uses escap characters and len is not really the length of lex
+ +* in this case, len is the number of utf-8 char strlen("€") == 3 but len == 1
+ +*/
+ +int issame( char *lex, char *key, int len );
+ +
+ +
+ +/* Counts the number of characters
+-+* if _UTF8_ is defined, it uses escap characters and the result is not realy the length of str
+++* if _UTF8_ is defined, it uses escap characters and the result is not really the length of str
+ +* in this case, the result is the number of utf-8 char strlen("€") == 3 but utfstrlen("€") == 1
+ +*/
+ +#ifdef __cplusplus