From 4feb6e480ae3641ae0bc6207f5e398fdf460d220 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 13 Dec 2024 13:55:13 -0500 Subject: [PATCH 1/9] Build as C++17 instead of C++14 - This is needed for ICU 75 compatibility; it fixes RHBZ#2332317. --- xalan-c-1.12-icu-75.patch | 15 +++++++++++++++ xalan-c.spec | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 xalan-c-1.12-icu-75.patch diff --git a/xalan-c-1.12-icu-75.patch b/xalan-c-1.12-icu-75.patch new file mode 100644 index 0000000..0e27218 --- /dev/null +++ b/xalan-c-1.12-icu-75.patch @@ -0,0 +1,15 @@ +>= ICU 75 needs C++17, see https://bugs.gentoo.org/934471. +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,9 +32,9 @@ if (POLICY CMP0067) + cmake_policy(SET CMP0067 NEW) + endif(POLICY CMP0067) + +-# Try C++14, then fall back to C++11 and C++98. Used for feature tests ++# Try C++17, then fall back to C++14, then C++11, and C++98. Used for feature tests + # for optional features. +-set(CMAKE_CXX_STANDARD 14) ++set(CMAKE_CXX_STANDARD 17) + + # Use folders (for IDE project grouping) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/xalan-c.spec b/xalan-c.spec index 193b364..06aff3e 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -27,6 +27,19 @@ Source2: %{releaseurl}/KEYS # Man page hand-written for Fedora in groff_man(7) format based on Xalan -? Source3: Xalan.1 +# ICU 75 needs C++17 +# https://bugs.gentoo.org/934471 +# +# Fixes: +# +# [FTBFS] with icu-76.1 +# https://bugzilla.redhat.com/show_bug.cgi?id=2332317 +# +# Note that this patch is too trivial for there to be any need to associate a +# license with it; the patch merely adjusts the value of CMAKE_CXX_STANDARD +# from 14 to 17. +Patch: https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/xalan-c/files/xalan-c-1.12-icu-75.patch + BuildRequires: gnupg2 BuildRequires: cmake # Either make or ninja is supported. From d75ac1f2c3e3892db48e29d28f140b3090485624 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 15:23:42 +0000 Subject: [PATCH 2/9] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 5146b0b2cd86d0380ff5ad881a3d70b5265b580a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:36:44 +0000 Subject: [PATCH 3/9] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 0e6a5472ca0b07cb9442bb9b3548efd5f8eefb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Wed, 6 Aug 2025 09:58:42 +0200 Subject: [PATCH 4/9] Rebuilt for icu 77.1 From d090728567c3d42625f8a1eac91f0add8d8c34e1 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 26 Nov 2025 10:17:49 +0100 Subject: [PATCH 5/9] Fix build with GCC 15. Patch taken from the Debian project. Signed-off-by: Marcin Juszkiewicz --- gcc_15_fixes.patch | 20 ++++++++++++++++++++ xalan-c.spec | 4 +++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gcc_15_fixes.patch diff --git a/gcc_15_fixes.patch b/gcc_15_fixes.patch new file mode 100644 index 0000000..0d954b0 --- /dev/null +++ b/gcc_15_fixes.patch @@ -0,0 +1,20 @@ +Index: xalan/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp +=================================================================== +--- xalan.orig/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp 2025-10-22 08:05:45.403631397 -0400 ++++ xalan/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp 2025-10-22 08:18:14.821542155 -0400 +@@ -320,13 +320,13 @@ + { + XalanUnicodeChar value = decodeUTF16SurrogatePair(ch, theChars[i+1], getMemoryManager()); + +- if (this->m_isPresentable(value)) ++ if (m_predicate(value)) + { + write(value); + } + else + { +- this->writeNumberedEntityReference(value); ++ writeNumericCharacterReference(value); + } + + ++i; diff --git a/xalan-c.spec b/xalan-c.spec index 06aff3e..0d3632e 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -40,6 +40,8 @@ Source3: Xalan.1 # from 14 to 17. Patch: https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/xalan-c/files/xalan-c-1.12-icu-75.patch +Patch: gcc_15_fixes.patch + BuildRequires: gnupg2 BuildRequires: cmake # Either make or ninja is supported. @@ -104,7 +106,7 @@ documentation. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -n %{tar_name} +%autosetup -n %{tar_name} -p 1 # https://github.com/apache/xalan-c/pull/35 chmod -v a-x NOTICE From 4a34ca4c7b23b715a1afa1633f8e931044737e33 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:26:25 +0000 Subject: [PATCH 6/9] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 69abae99b713794a6686901d50e9cce9aefe7e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Mon, 8 Jun 2026 09:53:33 +0200 Subject: [PATCH 7/9] Rebuilt for icu 78.3 From 4c6e69918839e87f1b2c0456e58de6f5b727b61d Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Thu, 12 Feb 2026 15:46:11 +0100 Subject: [PATCH 8/9] Allow to build with CMake 4.0 (rhbz#2381639) --- xalan-c.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xalan-c.spec b/xalan-c.spec index 0d3632e..5507f12 100644 --- a/xalan-c.spec +++ b/xalan-c.spec @@ -125,6 +125,7 @@ find docs samples src -type f -exec file '{}' '+' | %conf +export CMAKE_POLICY_VERSION_MINIMUM=3.5 %cmake %{?with_icu:-Dtranscoder=icu} -GNinja From aad66176c976255d0555e43f4947a42117111284 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:59:57 +0000 Subject: [PATCH 9/9] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild