commit:     995a2cfc7c2db39497993a81e053aaafdf36a21c
Author:     Robert Spillner <trent2 <AT> web <DOT> de>
AuthorDate: Mon Jun  2 05:27:38 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun  4 02:12:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=995a2cfc

dev-libs/xerces-c: add 3.3.0

Use trivial patch from upstream bug tracker 
(https://issues.apache.org/jira/browse/XERCESC-2255)
to fix 3_2/3_3 typo in source.

Closes: https://bugs.gentoo.org/943187
Signed-off-by: Robert Spillner <trent2 <AT> web.de>
Part-of: https://github.com/gentoo/gentoo/pull/42399
Closes: https://github.com/gentoo/gentoo/pull/42399
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/xerces-c/Manifest                         |   1 +
 .../files/xerces-c-3.3.0-symbol-name.patch         |  19 +++
 dev-libs/xerces-c/xerces-c-3.3.0.ebuild            | 127 +++++++++++++++++++++
 3 files changed, 147 insertions(+)

diff --git a/dev-libs/xerces-c/Manifest b/dev-libs/xerces-c/Manifest
index 91f6507b762f..d7aa87ca2157 100644
--- a/dev-libs/xerces-c/Manifest
+++ b/dev-libs/xerces-c/Manifest
@@ -1 +1,2 @@
 DIST xerces-c-3.2.5.tar.xz 4274820 BLAKE2B 
e0926660bf29e35c05843aae683a7a4f2fe5a6f5f68c76ce16fde975a24277c0e50465a02bfa785f96f4ebec3c7d411785793914491f112ce19477b5dd59e351
 SHA512 
77b80148b0a3dbb61af648e2571855d59040512dd0c739a892e8ac6a6d7ddbb43b49850c87c39fcf374f2c7658a9c795b3e3fcd4785efbc6226f831b938d5300
+DIST xerces-c-3.3.0.tar.xz 4311396 BLAKE2B 
bfe1e25c16430714200bdd6a0fe782bd048a3d331fe6f78c34c2d80cea08dfa97d1c68661f94bda71e67e7fd005ce40226c9278fb83c3f28ca400bf23a432737
 SHA512 
8d4dc27a6c97d04703e60a5473163e2616ae68f0917ce11a621a60221970ab599c5f3085eb07a70e545394022ef5029997028e9b5747d4048c541ff75fe92ec1

diff --git a/dev-libs/xerces-c/files/xerces-c-3.3.0-symbol-name.patch 
b/dev-libs/xerces-c/files/xerces-c-3.3.0-symbol-name.patch
new file mode 100644
index 000000000000..37bab63b9e53
--- /dev/null
+++ b/dev-libs/xerces-c/files/xerces-c-3.3.0-symbol-name.patch
@@ -0,0 +1,19 @@
+--- a/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp 2023-12-06 
17:57:34.000000000 +0100
++++ b/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp 2024-10-18 
17:23:09.000000000 +0100
+@@ -48,14 +48,14 @@
+  *  Resource Data Reference.
+  *
+  *  The data is packaged as a dll (or .so or whatever, depending on the 
platform) that exports a data symbol.
+  *  The application (this *.cpp) references that symbol here, and will pass 
the data address to ICU, which
+  *  will then  be able to fetch resources from the data.
+  */
+-#define ENTRY_POINT xercesc_messages_3_2_dat
+-#define BUNDLE_NAME "xercesc_messages_3_2"
++#define ENTRY_POINT xercesc_messages_3_3_dat
++#define BUNDLE_NAME "xercesc_messages_3_3"
+ 
+ extern "C" void U_IMPORT *ENTRY_POINT;
+ 
+ /*
+  *  Tell ICU where our resource data is located in memory. The data lives in 
the xercesc_nessages dll, and we just
+  *  pass the address of an exported symbol from that library to ICU.

diff --git a/dev-libs/xerces-c/xerces-c-3.3.0.ebuild 
b/dev-libs/xerces-c/xerces-c-3.3.0.ebuild
new file mode 100644
index 000000000000..73e0062ce3cf
--- /dev/null
+++ b/dev-libs/xerces-c/xerces-c-3.3.0.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic prefix
+
+DESCRIPTION="Validating XML parser written in a portable subset of C++"
+HOMEPAGE="https://xerces.apache.org/xerces-c/";
+
+if [[ ${PV} == *9999 ]] ; then
+       ESVN_REPO_URI="https://svn.apache.org/repos/asf/xerces/c/trunk";
+       inherit subversion
+else
+       SRC_URI="
+               mirror://apache/xerces/c/3/sources/${P}.tar.xz
+               https://archive.apache.org/dist/xerces/c/3/sources/${P}.tar.xz
+       "
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="cpu_flags_x86_sse2 curl doc examples iconv icu static-libs test threads"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       curl? ( net-misc/curl )
+       icu? ( dev-libs/icu:0= )
+       virtual/libiconv"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       doc? ( app-text/doxygen )
+       test? ( dev-lang/perl )"
+
+DOCS=( CREDITS KEYS NOTICE README )
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.2.4-strict-aliasing.patch
+       "${FILESDIR}"/${PN}-3.2.5-cxx17.patch # bug 931105
+       "${FILESDIR}"/${P}-symbol-name.patch # fixed in 3.3.1, see 
https://issues.apache.org/jira/browse/XERCESC-2255
+)
+
+pkg_setup() {
+       export ICUROOT="${EPREFIX}/usr"
+
+       if use iconv && use icu; then
+               ewarn "This package can use iconv or icu for loading messages"
+               ewarn "and transcoding, but not both. ICU takes precedence."
+       fi
+}
+
+src_configure() {
+       # bug #856100
+       filter-lto
+       append-flags -fno-strict-aliasing
+
+       # 'cfurl' is only available on OSX and 'socket' isn't supposed to work.
+       # But the docs aren't clear about it, so we would need some testing...
+       local netaccessor
+       if use curl; then
+               netaccessor="curl"
+       elif use elibc_Darwin; then
+               netaccessor="cfurl"
+       else
+               netaccessor="socket"
+       fi
+
+       local msgloader
+       if use icu; then
+               msgloader="icu"
+       elif use iconv; then
+               msgloader="iconv"
+       else
+               msgloader="inmemory"
+       fi
+
+       local transcoder
+       if use icu; then
+               transcoder="icu"
+       elif use elibc_Darwin; then
+               transcoder="macosunicodeconverter"
+       else
+               transcoder="gnuiconv"
+       fi
+
+       local mycmakeargs=(
+               -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+               -Dnetwork-accessor="${netaccessor}"
+               -Dmessage-loader="${msgloader}"
+               -Dtranscoder="${transcoder}"
+               -Dthreads:BOOL="$(usex threads)"
+               -Dsse2:BOOL="$(usex cpu_flags_x86_sse2)"
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+
+       use doc && cmake_build doc-style createapidocs doc-xml
+}
+
+src_install() {
+       cmake_src_install
+
+       # package provides .pc files
+       find "${D}" -name '*.la' -delete || die
+
+       if use examples; then
+               # clean out object files, executables, Makefiles
+               # and the like before installing examples
+               find samples/ \( -type f -executable -o -iname 'runConfigure' 
-o -iname '*.o' \
+                       -o -iname '.libs' -o -iname 'Makefile*' \) -exec rm -rf 
'{}' + || die
+               docinto examples
+               dodoc -r samples/.
+               docompress -x /usr/share/doc/${PF}/examples
+       fi
+
+       # To make sure an appropriate NLS msg file is around when using
+       # the iconv msgloader ICU has the messages compiled in.
+       if use iconv && ! use icu; then
+               doenvd "$(prefixify_ro "${FILESDIR}/50xerces-c")"
+       fi
+}

Reply via email to