diff options
author | Viorel Munteanu <ceamac@gentoo.org> | 2022-11-28 11:53:54 +0200 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2022-11-29 10:07:30 +0200 |
commit | 93c6b141a2bbb7a40c30785fc1e4bbc69422fb05 (patch) | |
tree | a08ee9224c6d8b05fefab411c8aaa896327bbe21 /dev-libs/xalan-c | |
parent | dev-python/reportlab: Stabilize 3.6.12 sparc, #883539 (diff) | |
download | gentoo-93c6b141a2bbb7a40c30785fc1e4bbc69422fb05.tar.gz gentoo-93c6b141a2bbb7a40c30785fc1e4bbc69422fb05.tar.bz2 gentoo-93c6b141a2bbb7a40c30785fc1e4bbc69422fb05.zip |
dev-libs/xalan-c: fix compilation with lto
Closes: https://bugs.gentoo.org/856097
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'dev-libs/xalan-c')
-rw-r--r-- | dev-libs/xalan-c/files/xalan-c-1.12-fix-lto.patch | 46 | ||||
-rw-r--r-- | dev-libs/xalan-c/xalan-c-1.12-r2.ebuild | 63 | ||||
-rw-r--r-- | dev-libs/xalan-c/xalan-c-9999.ebuild | 4 |
3 files changed, 113 insertions, 0 deletions
diff --git a/dev-libs/xalan-c/files/xalan-c-1.12-fix-lto.patch b/dev-libs/xalan-c/files/xalan-c-1.12-fix-lto.patch new file mode 100644 index 000000000000..6b3a46c1342e --- /dev/null +++ b/dev-libs/xalan-c/files/xalan-c-1.12-fix-lto.patch @@ -0,0 +1,46 @@ +Fix error: type ‘struct NameCompareFunctor’ violates the C++ One Definition Rule [-Werror=odr] + +Bug: https://bugs.gentoo.org/856097 + +--- a/src/xalanc/PlatformSupport/AttributesImpl.cpp ++++ b/src/xalanc/PlatformSupport/AttributesImpl.cpp +@@ -253,6 +253,9 @@ + + + ++namespace ++{ ++ + struct NameCompareFunctor + { + NameCompareFunctor(const XMLCh* theQName) : +@@ -271,6 +274,8 @@ + const XMLCh* const m_qname; + }; + ++} // --- namespace ++ + + + struct URIAndLocalNameCompareFunctor +--- a/src/xalanc/PlatformSupport/AttributeListImpl.cpp ++++ b/src/xalanc/PlatformSupport/AttributeListImpl.cpp +@@ -242,6 +242,9 @@ + + + ++namespace ++{ ++ + struct NameCompareFunctor + { + NameCompareFunctor(const XMLCh* theName) : +@@ -260,6 +263,8 @@ + const XMLCh* const m_name; + }; + ++} // --- namespace ++ + + + const XMLCh* diff --git a/dev-libs/xalan-c/xalan-c-1.12-r2.ebuild b/dev-libs/xalan-c/xalan-c-1.12-r2.ebuild new file mode 100644 index 000000000000..cd8b913943ee --- /dev/null +++ b/dev-libs/xalan-c/xalan-c-1.12-r2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +MY_PN=${PN/-/_} +DESCRIPTION="XSLT processor for transforming XML into HTML, text, or other XML types" +HOMEPAGE="https://apache.github.io/xalan-c/" +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/apache/xalan-c.git" + + SLOT="0" +else + inherit verify-sig + SRC_URI=" + mirror://apache/xalan/xalan-c/sources/${MY_PN}-${PV}.tar.gz + verify-sig? ( https://dlcdn.apache.org/xalan/xalan-c/sources/${MY_PN}-${PV}.tar.gz.asc ) + " + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/apache-xalan-c.asc + + SLOT="0/$(ver_cut 1-2)" + KEYWORDS="~amd64 ~ppc ~x86" + S="${WORKDIR}/${MY_PN}-${PV}" + BDEPEND=" + verify-sig? ( sec-keys/openpgp-keys-apache-xalan-c ) + " +fi + +LICENSE="Apache-2.0" +IUSE="doc" + +RDEPEND=" + dev-libs/icu:= + dev-libs/xerces-c[icu] +" +DEPEND="${RDEPEND}" +BDEPEND+=" + doc? ( app-doc/doxygen[dot] ) +" + +PATCHES=( + "${FILESDIR}"/${P}-fix-lto.patch +) + +src_configure() { + local mycmakeargs=( + -Ddoxygen=$(usex doc) + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use doc; then + docinto examples + dodoc -r samples/*/ + fi +} diff --git a/dev-libs/xalan-c/xalan-c-9999.ebuild b/dev-libs/xalan-c/xalan-c-9999.ebuild index 53dc25c881f6..19e421f40c78 100644 --- a/dev-libs/xalan-c/xalan-c-9999.ebuild +++ b/dev-libs/xalan-c/xalan-c-9999.ebuild @@ -41,6 +41,10 @@ BDEPEND+=" doc? ( app-doc/doxygen[dot] ) " +PATCHES=( + "${FILESDIR}"/${PN}-1.12-fix-lto.patch +) + src_configure() { local mycmakeargs=( -Ddoxygen=$(usex doc) |