Gentoo Archives: gentoo-commits

From: Viorel Munteanu <ceamac@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/xalan-c/, dev-libs/xalan-c/files/
Date: Tue, 29 Nov 2022 08:09:05
Message-Id: 1669709250.93c6b141a2bbb7a40c30785fc1e4bbc69422fb05.ceamac@gentoo
1 commit: 93c6b141a2bbb7a40c30785fc1e4bbc69422fb05
2 Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 28 09:53:54 2022 +0000
4 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 29 08:07:30 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93c6b141
7
8 dev-libs/xalan-c: fix compilation with lto
9
10 Closes: https://bugs.gentoo.org/856097
11 Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
12
13 dev-libs/xalan-c/files/xalan-c-1.12-fix-lto.patch | 46 ++++++++++++++++++++++
14 ...{xalan-c-9999.ebuild => xalan-c-1.12-r2.ebuild} | 4 ++
15 dev-libs/xalan-c/xalan-c-9999.ebuild | 4 ++
16 3 files changed, 54 insertions(+)
17
18 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
19 new file mode 100644
20 index 000000000000..6b3a46c1342e
21 --- /dev/null
22 +++ b/dev-libs/xalan-c/files/xalan-c-1.12-fix-lto.patch
23 @@ -0,0 +1,46 @@
24 +Fix error: type ‘struct NameCompareFunctor’ violates the C++ One Definition Rule [-Werror=odr]
25 +
26 +Bug: https://bugs.gentoo.org/856097
27 +
28 +--- a/src/xalanc/PlatformSupport/AttributesImpl.cpp
29 ++++ b/src/xalanc/PlatformSupport/AttributesImpl.cpp
30 +@@ -253,6 +253,9 @@
31 +
32 +
33 +
34 ++namespace
35 ++{
36 ++
37 + struct NameCompareFunctor
38 + {
39 + NameCompareFunctor(const XMLCh* theQName) :
40 +@@ -271,6 +274,8 @@
41 + const XMLCh* const m_qname;
42 + };
43 +
44 ++} // --- namespace
45 ++
46 +
47 +
48 + struct URIAndLocalNameCompareFunctor
49 +--- a/src/xalanc/PlatformSupport/AttributeListImpl.cpp
50 ++++ b/src/xalanc/PlatformSupport/AttributeListImpl.cpp
51 +@@ -242,6 +242,9 @@
52 +
53 +
54 +
55 ++namespace
56 ++{
57 ++
58 + struct NameCompareFunctor
59 + {
60 + NameCompareFunctor(const XMLCh* theName) :
61 +@@ -260,6 +263,8 @@
62 + const XMLCh* const m_name;
63 + };
64 +
65 ++} // --- namespace
66 ++
67 +
68 +
69 + const XMLCh*
70
71 diff --git a/dev-libs/xalan-c/xalan-c-9999.ebuild b/dev-libs/xalan-c/xalan-c-1.12-r2.ebuild
72 similarity index 96%
73 copy from dev-libs/xalan-c/xalan-c-9999.ebuild
74 copy to dev-libs/xalan-c/xalan-c-1.12-r2.ebuild
75 index 53dc25c881f6..cd8b913943ee 100644
76 --- a/dev-libs/xalan-c/xalan-c-9999.ebuild
77 +++ b/dev-libs/xalan-c/xalan-c-1.12-r2.ebuild
78 @@ -41,6 +41,10 @@ BDEPEND+="
79 doc? ( app-doc/doxygen[dot] )
80 "
81
82 +PATCHES=(
83 + "${FILESDIR}"/${P}-fix-lto.patch
84 +)
85 +
86 src_configure() {
87 local mycmakeargs=(
88 -Ddoxygen=$(usex doc)
89
90 diff --git a/dev-libs/xalan-c/xalan-c-9999.ebuild b/dev-libs/xalan-c/xalan-c-9999.ebuild
91 index 53dc25c881f6..19e421f40c78 100644
92 --- a/dev-libs/xalan-c/xalan-c-9999.ebuild
93 +++ b/dev-libs/xalan-c/xalan-c-9999.ebuild
94 @@ -41,6 +41,10 @@ BDEPEND+="
95 doc? ( app-doc/doxygen[dot] )
96 "
97
98 +PATCHES=(
99 + "${FILESDIR}"/${PN}-1.12-fix-lto.patch
100 +)
101 +
102 src_configure() {
103 local mycmakeargs=(
104 -Ddoxygen=$(usex doc)