1 |
commit: 76cb1c9b4b513143c25e1bf7d0ab9034ec0f9682 |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 2 20:16:21 2019 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 2 20:16:51 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76cb1c9b |
7 |
|
8 |
dev-libs/xerces-c: use ninja, fix XercesMessages_en_US.cat path |
9 |
|
10 |
Closes: https://bugs.gentoo.org/673548 |
11 |
Package-Manager: Portage-2.3.53, Repoman-2.3.12 |
12 |
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org> |
13 |
|
14 |
.../files/xerces-c-3.2.2-fix-XERCESC-2163.patch | 24 +++++ |
15 |
dev-libs/xerces-c/xerces-c-3.2.2-r1.ebuild | 118 +++++++++++++++++++++ |
16 |
2 files changed, 142 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/xerces-c/files/xerces-c-3.2.2-fix-XERCESC-2163.patch b/dev-libs/xerces-c/files/xerces-c-3.2.2-fix-XERCESC-2163.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..57dde722098 |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/xerces-c/files/xerces-c-3.2.2-fix-XERCESC-2163.patch |
23 |
@@ -0,0 +1,24 @@ |
24 |
+From db7a8b0cd2a163de1e3ef8c950cf9e708b0b5f98 Mon Sep 17 00:00:00 2001 |
25 |
+From: Craig Andrews <candrews@××××××××××××.com> |
26 |
+Date: Wed, 2 Jan 2019 15:01:21 -0500 |
27 |
+Subject: [PATCH] build: Install XercesMessages_en_US.cat to |
28 |
+ /usr/share/xerces-c/msg |
29 |
+ |
30 |
+Fixes XERCESC-2163 |
31 |
+--- |
32 |
+ src/CMakeLists.txt | 2 +- |
33 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
34 |
+ |
35 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
36 |
+index c29aa257b..6f1929d99 100644 |
37 |
+--- a/src/CMakeLists.txt |
38 |
++++ b/src/CMakeLists.txt |
39 |
+@@ -1198,7 +1198,7 @@ if(XERCES_USE_MSGLOADER_ICONV) |
40 |
+ |
41 |
+ install( |
42 |
+ FILES "${RESTARGET}" |
43 |
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/msg" |
44 |
++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/xerces-c/msg" |
45 |
+ COMPONENT "runtime") |
46 |
+ endif() |
47 |
+ |
48 |
|
49 |
diff --git a/dev-libs/xerces-c/xerces-c-3.2.2-r1.ebuild b/dev-libs/xerces-c/xerces-c-3.2.2-r1.ebuild |
50 |
new file mode 100644 |
51 |
index 00000000000..2c447d12051 |
52 |
--- /dev/null |
53 |
+++ b/dev-libs/xerces-c/xerces-c-3.2.2-r1.ebuild |
54 |
@@ -0,0 +1,118 @@ |
55 |
+# Copyright 1999-2019 Gentoo Authors |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+ |
58 |
+EAPI=6 |
59 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
60 |
+ |
61 |
+inherit cmake-utils prefix |
62 |
+ |
63 |
+DESCRIPTION="A validating XML parser written in a portable subset of C++" |
64 |
+HOMEPAGE="https://xerces.apache.org/xerces-c/" |
65 |
+ |
66 |
+if [[ ${PV} == *9999 ]] ; then |
67 |
+ ESVN_REPO_URI="https://svn.apache.org/repos/asf/xerces/c/trunk" |
68 |
+ inherit subversion |
69 |
+else |
70 |
+ SRC_URI="mirror://apache/xerces/c/3/sources/${P}.tar.gz" |
71 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos" |
72 |
+fi |
73 |
+ |
74 |
+LICENSE="Apache-2.0" |
75 |
+SLOT="0" |
76 |
+ |
77 |
+IUSE="cpu_flags_x86_sse2 curl doc elibc_Darwin elibc_FreeBSD examples iconv icu static-libs test threads" |
78 |
+ |
79 |
+RDEPEND="icu? ( dev-libs/icu:0= ) |
80 |
+ curl? ( net-misc/curl ) |
81 |
+ virtual/libiconv" |
82 |
+DEPEND="${RDEPEND} |
83 |
+ doc? ( app-doc/doxygen ) |
84 |
+ test? ( dev-lang/perl )" |
85 |
+ |
86 |
+DOCS=( CREDITS KEYS NOTICE README ) |
87 |
+PATCHES=( |
88 |
+ "${FILESDIR}/${P}-fix-XERCESC-2161.patch" |
89 |
+ "${FILESDIR}/${P}-fix-XERCESC-2163.patch" |
90 |
+) |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ export ICUROOT="${EPREFIX}/usr" |
94 |
+ |
95 |
+ if use iconv && use icu; then |
96 |
+ ewarn "This package can use iconv or icu for loading messages" |
97 |
+ ewarn "and transcoding, but not both. ICU takes precedence." |
98 |
+ fi |
99 |
+} |
100 |
+ |
101 |
+src_configure() { |
102 |
+ # 'cfurl' is only available on OSX and 'socket' isn't supposed to work. |
103 |
+ # But the docs aren't clear about it, so we would need some testing... |
104 |
+ local netaccessor |
105 |
+ if use curl; then |
106 |
+ netaccessor="curl" |
107 |
+ elif use elibc_Darwin; then |
108 |
+ netaccessor="cfurl" |
109 |
+ else |
110 |
+ netaccessor="socket" |
111 |
+ fi |
112 |
+ |
113 |
+ local msgloader |
114 |
+ if use icu; then |
115 |
+ msgloader="icu" |
116 |
+ elif use iconv; then |
117 |
+ msgloader="iconv" |
118 |
+ else |
119 |
+ msgloader="inmemory" |
120 |
+ fi |
121 |
+ |
122 |
+ local transcoder |
123 |
+ if use icu; then |
124 |
+ transcoder="icu" |
125 |
+ elif use elibc_Darwin; then |
126 |
+ transcoder="macosunicodeconverter" |
127 |
+ elif use elibc_FreeBSD; then |
128 |
+ transcoder="iconv" |
129 |
+ else |
130 |
+ transcoder="gnuiconv" |
131 |
+ fi |
132 |
+ # for interix maybe: transcoder="windows" |
133 |
+ |
134 |
+ local mycmakeargs=( |
135 |
+ -Dnetwork-accessor="${netaccessor}" |
136 |
+ -Dmessage-loader="${msgloader}" |
137 |
+ -Dtranscoder="${transcoder}" |
138 |
+ -Dthreads:BOOL="$(usex threads)" |
139 |
+ -Dsse2:BOOL="$(usex cpu_flags_x86_sse2)" |
140 |
+ ) |
141 |
+ |
142 |
+ cmake-utils_src_configure |
143 |
+} |
144 |
+ |
145 |
+src_compile() { |
146 |
+ cmake-utils_src_compile |
147 |
+ |
148 |
+ use doc && cmake-utils_src_compile doc-style createapidocs doc-xml |
149 |
+} |
150 |
+ |
151 |
+src_install () { |
152 |
+ cmake-utils_src_install |
153 |
+ |
154 |
+ # package provides .pc files |
155 |
+ find "${D}" -name '*.la' -delete || die |
156 |
+ |
157 |
+ if use examples; then |
158 |
+ # clean out object files, executables, Makefiles |
159 |
+ # and the like before installing examples |
160 |
+ find samples/ \( -type f -executable -o -iname 'runConfigure' -o -iname '*.o' \ |
161 |
+ -o -iname '.libs' -o -iname 'Makefile*' \) -exec rm -rf '{}' + || die |
162 |
+ docinto examples |
163 |
+ dodoc -r samples/. |
164 |
+ docompress -x /usr/share/doc/${PF}/examples |
165 |
+ fi |
166 |
+ |
167 |
+ # To make sure an appropriate NLS msg file is around when using |
168 |
+ # the iconv msgloader ICU has the messages compiled in. |
169 |
+ if use iconv && ! use icu; then |
170 |
+ doenvd "$(prefixify_ro "${FILESDIR}/50xerces-c")" |
171 |
+ fi |
172 |
+} |