1 |
commit: 2ee902bc3a015cc4515363c78f584391aa491884 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 31 21:16:25 2021 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 31 21:16:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ee902bc |
7 |
|
8 |
sys-devel/gettext: fix CVE-2020-12825 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/769998 |
11 |
Package-Manager: Portage-3.0.19, Repoman-3.0.3 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
.../files/gettext-0.21-CVE-2020-12825.patch | 335 +++++++++++++++++++++ |
15 |
sys-devel/gettext/gettext-0.21-r1.ebuild | 157 ++++++++++ |
16 |
2 files changed, 492 insertions(+) |
17 |
|
18 |
diff --git a/sys-devel/gettext/files/gettext-0.21-CVE-2020-12825.patch b/sys-devel/gettext/files/gettext-0.21-CVE-2020-12825.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..6b4c463b411 |
21 |
--- /dev/null |
22 |
+++ b/sys-devel/gettext/files/gettext-0.21-CVE-2020-12825.patch |
23 |
@@ -0,0 +1,335 @@ |
24 |
+https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/44cbd1e718d6a08e59b9300280c340218a84e089 |
25 |
+ |
26 |
+--- a/libtextstyle/gnulib-local/lib/libcroco/cr-parser.c |
27 |
++++ b/libtextstyle/gnulib-local/lib/libcroco/cr-parser.c |
28 |
+@@ -146,6 +146,8 @@ struct _CRParserPriv { |
29 |
+ |
30 |
+ #define CHARS_TAB_SIZE 12 |
31 |
+ |
32 |
++#define RECURSIVE_CALLERS_LIMIT 100 |
33 |
++ |
34 |
+ /** |
35 |
+ * IS_NUM: |
36 |
+ *@a_char: the char to test. |
37 |
+@@ -354,9 +356,11 @@ static enum CRStatus cr_parser_parse_selector_core (CRParser * a_this); |
38 |
+ |
39 |
+ static enum CRStatus cr_parser_parse_declaration_core (CRParser * a_this); |
40 |
+ |
41 |
+-static enum CRStatus cr_parser_parse_any_core (CRParser * a_this); |
42 |
++static enum CRStatus cr_parser_parse_any_core (CRParser * a_this, |
43 |
++ guint n_calls); |
44 |
+ |
45 |
+-static enum CRStatus cr_parser_parse_block_core (CRParser * a_this); |
46 |
++static enum CRStatus cr_parser_parse_block_core (CRParser * a_this, |
47 |
++ guint n_calls); |
48 |
+ |
49 |
+ static enum CRStatus cr_parser_parse_value_core (CRParser * a_this); |
50 |
+ |
51 |
+@@ -794,7 +798,7 @@ cr_parser_parse_atrule_core (CRParser * a_this) |
52 |
+ cr_parser_try_to_skip_spaces_and_comments (a_this); |
53 |
+ |
54 |
+ do { |
55 |
+- status = cr_parser_parse_any_core (a_this); |
56 |
++ status = cr_parser_parse_any_core (a_this, 0); |
57 |
+ } while (status == CR_OK); |
58 |
+ |
59 |
+ status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, |
60 |
+@@ -805,7 +809,7 @@ cr_parser_parse_atrule_core (CRParser * a_this) |
61 |
+ cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, |
62 |
+ token); |
63 |
+ token = NULL; |
64 |
+- status = cr_parser_parse_block_core (a_this); |
65 |
++ status = cr_parser_parse_block_core (a_this, 0); |
66 |
+ CHECK_PARSING_STATUS (status, |
67 |
+ FALSE); |
68 |
+ goto done; |
69 |
+@@ -940,11 +944,11 @@ cr_parser_parse_selector_core (CRParser * a_this) |
70 |
+ |
71 |
+ RECORD_INITIAL_POS (a_this, &init_pos); |
72 |
+ |
73 |
+- status = cr_parser_parse_any_core (a_this); |
74 |
++ status = cr_parser_parse_any_core (a_this, 0); |
75 |
+ CHECK_PARSING_STATUS (status, FALSE); |
76 |
+ |
77 |
+ do { |
78 |
+- status = cr_parser_parse_any_core (a_this); |
79 |
++ status = cr_parser_parse_any_core (a_this, 0); |
80 |
+ |
81 |
+ } while (status == CR_OK); |
82 |
+ |
83 |
+@@ -966,10 +970,12 @@ cr_parser_parse_selector_core (CRParser * a_this) |
84 |
+ *in chapter 4.1 of the css2 spec. |
85 |
+ *block ::= '{' S* [ any | block | ATKEYWORD S* | ';' ]* '}' S*; |
86 |
+ *@param a_this the current instance of #CRParser. |
87 |
++ *@param n_calls used to limit recursion depth |
88 |
+ *FIXME: code this function. |
89 |
+ */ |
90 |
+ static enum CRStatus |
91 |
+-cr_parser_parse_block_core (CRParser * a_this) |
92 |
++cr_parser_parse_block_core (CRParser * a_this, |
93 |
++ guint n_calls) |
94 |
+ { |
95 |
+ CRToken *token = NULL; |
96 |
+ CRInputPos init_pos; |
97 |
+@@ -977,6 +983,9 @@ cr_parser_parse_block_core (CRParser * a_this) |
98 |
+ |
99 |
+ g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR); |
100 |
+ |
101 |
++ if (n_calls > RECURSIVE_CALLERS_LIMIT) |
102 |
++ return CR_ERROR; |
103 |
++ |
104 |
+ RECORD_INITIAL_POS (a_this, &init_pos); |
105 |
+ |
106 |
+ status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token); |
107 |
+@@ -1006,13 +1015,13 @@ cr_parser_parse_block_core (CRParser * a_this) |
108 |
+ } else if (token->type == CBO_TK) { |
109 |
+ cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token); |
110 |
+ token = NULL; |
111 |
+- status = cr_parser_parse_block_core (a_this); |
112 |
++ status = cr_parser_parse_block_core (a_this, n_calls + 1); |
113 |
+ CHECK_PARSING_STATUS (status, FALSE); |
114 |
+ goto parse_block_content; |
115 |
+ } else { |
116 |
+ cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token); |
117 |
+ token = NULL; |
118 |
+- status = cr_parser_parse_any_core (a_this); |
119 |
++ status = cr_parser_parse_any_core (a_this, n_calls + 1); |
120 |
+ CHECK_PARSING_STATUS (status, FALSE); |
121 |
+ goto parse_block_content; |
122 |
+ } |
123 |
+@@ -1119,7 +1128,7 @@ cr_parser_parse_value_core (CRParser * a_this) |
124 |
+ status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, |
125 |
+ token); |
126 |
+ token = NULL; |
127 |
+- status = cr_parser_parse_block_core (a_this); |
128 |
++ status = cr_parser_parse_block_core (a_this, 0); |
129 |
+ CHECK_PARSING_STATUS (status, FALSE); |
130 |
+ ref++; |
131 |
+ goto continue_parsing; |
132 |
+@@ -1133,7 +1142,7 @@ cr_parser_parse_value_core (CRParser * a_this) |
133 |
+ status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, |
134 |
+ token); |
135 |
+ token = NULL; |
136 |
+- status = cr_parser_parse_any_core (a_this); |
137 |
++ status = cr_parser_parse_any_core (a_this, 0); |
138 |
+ if (status == CR_OK) { |
139 |
+ ref++; |
140 |
+ goto continue_parsing; |
141 |
+@@ -1172,10 +1181,12 @@ cr_parser_parse_value_core (CRParser * a_this) |
142 |
+ * | FUNCTION | DASHMATCH | '(' any* ')' | '[' any* ']' ] S*; |
143 |
+ * |
144 |
+ *@param a_this the current instance of #CRParser. |
145 |
++ *@param n_calls used to limit recursion depth |
146 |
+ *@return CR_OK upon successfull completion, an error code otherwise. |
147 |
+ */ |
148 |
+ static enum CRStatus |
149 |
+-cr_parser_parse_any_core (CRParser * a_this) |
150 |
++cr_parser_parse_any_core (CRParser * a_this, |
151 |
++ guint n_calls) |
152 |
+ { |
153 |
+ CRToken *token1 = NULL, |
154 |
+ *token2 = NULL; |
155 |
+@@ -1184,6 +1195,9 @@ cr_parser_parse_any_core (CRParser * a_this) |
156 |
+ |
157 |
+ g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR); |
158 |
+ |
159 |
++ if (n_calls > RECURSIVE_CALLERS_LIMIT) |
160 |
++ return CR_ERROR; |
161 |
++ |
162 |
+ RECORD_INITIAL_POS (a_this, &init_pos); |
163 |
+ |
164 |
+ status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token1); |
165 |
+@@ -1222,7 +1236,7 @@ cr_parser_parse_any_core (CRParser * a_this) |
166 |
+ *We consider parameter as being an "any*" production. |
167 |
+ */ |
168 |
+ do { |
169 |
+- status = cr_parser_parse_any_core (a_this); |
170 |
++ status = cr_parser_parse_any_core (a_this, n_calls + 1); |
171 |
+ } while (status == CR_OK); |
172 |
+ |
173 |
+ ENSURE_PARSING_COND (status == CR_PARSING_ERROR); |
174 |
+@@ -1247,7 +1261,7 @@ cr_parser_parse_any_core (CRParser * a_this) |
175 |
+ } |
176 |
+ |
177 |
+ do { |
178 |
+- status = cr_parser_parse_any_core (a_this); |
179 |
++ status = cr_parser_parse_any_core (a_this, n_calls + 1); |
180 |
+ } while (status == CR_OK); |
181 |
+ |
182 |
+ ENSURE_PARSING_COND (status == CR_PARSING_ERROR); |
183 |
+@@ -1275,7 +1289,7 @@ cr_parser_parse_any_core (CRParser * a_this) |
184 |
+ } |
185 |
+ |
186 |
+ do { |
187 |
+- status = cr_parser_parse_any_core (a_this); |
188 |
++ status = cr_parser_parse_any_core (a_this, n_calls + 1); |
189 |
+ } while (status == CR_OK); |
190 |
+ |
191 |
+ ENSURE_PARSING_COND (status == CR_PARSING_ERROR); |
192 |
+--- a/libtextstyle/lib/libcroco/cr-parser.c |
193 |
++++ b/libtextstyle/lib/libcroco/cr-parser.c |
194 |
+@@ -146,6 +146,8 @@ struct _CRParserPriv { |
195 |
+ |
196 |
+ #define CHARS_TAB_SIZE 12 |
197 |
+ |
198 |
++#define RECURSIVE_CALLERS_LIMIT 100 |
199 |
++ |
200 |
+ /** |
201 |
+ * IS_NUM: |
202 |
+ *@a_char: the char to test. |
203 |
+@@ -354,9 +356,11 @@ static enum CRStatus cr_parser_parse_selector_core (CRParser * a_this); |
204 |
+ |
205 |
+ static enum CRStatus cr_parser_parse_declaration_core (CRParser * a_this); |
206 |
+ |
207 |
+-static enum CRStatus cr_parser_parse_any_core (CRParser * a_this); |
208 |
++static enum CRStatus cr_parser_parse_any_core (CRParser * a_this, |
209 |
++ guint n_calls); |
210 |
+ |
211 |
+-static enum CRStatus cr_parser_parse_block_core (CRParser * a_this); |
212 |
++static enum CRStatus cr_parser_parse_block_core (CRParser * a_this, |
213 |
++ guint n_calls); |
214 |
+ |
215 |
+ static enum CRStatus cr_parser_parse_value_core (CRParser * a_this); |
216 |
+ |
217 |
+@@ -794,7 +798,7 @@ cr_parser_parse_atrule_core (CRParser * a_this) |
218 |
+ cr_parser_try_to_skip_spaces_and_comments (a_this); |
219 |
+ |
220 |
+ do { |
221 |
+- status = cr_parser_parse_any_core (a_this); |
222 |
++ status = cr_parser_parse_any_core (a_this, 0); |
223 |
+ } while (status == CR_OK); |
224 |
+ |
225 |
+ status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, |
226 |
+@@ -805,7 +809,7 @@ cr_parser_parse_atrule_core (CRParser * a_this) |
227 |
+ cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, |
228 |
+ token); |
229 |
+ token = NULL; |
230 |
+- status = cr_parser_parse_block_core (a_this); |
231 |
++ status = cr_parser_parse_block_core (a_this, 0); |
232 |
+ CHECK_PARSING_STATUS (status, |
233 |
+ FALSE); |
234 |
+ goto done; |
235 |
+@@ -940,11 +944,11 @@ cr_parser_parse_selector_core (CRParser * a_this) |
236 |
+ |
237 |
+ RECORD_INITIAL_POS (a_this, &init_pos); |
238 |
+ |
239 |
+- status = cr_parser_parse_any_core (a_this); |
240 |
++ status = cr_parser_parse_any_core (a_this, 0); |
241 |
+ CHECK_PARSING_STATUS (status, FALSE); |
242 |
+ |
243 |
+ do { |
244 |
+- status = cr_parser_parse_any_core (a_this); |
245 |
++ status = cr_parser_parse_any_core (a_this, 0); |
246 |
+ |
247 |
+ } while (status == CR_OK); |
248 |
+ |
249 |
+@@ -966,10 +970,12 @@ cr_parser_parse_selector_core (CRParser * a_this) |
250 |
+ *in chapter 4.1 of the css2 spec. |
251 |
+ *block ::= '{' S* [ any | block | ATKEYWORD S* | ';' ]* '}' S*; |
252 |
+ *@param a_this the current instance of #CRParser. |
253 |
++ *@param n_calls used to limit recursion depth |
254 |
+ *FIXME: code this function. |
255 |
+ */ |
256 |
+ static enum CRStatus |
257 |
+-cr_parser_parse_block_core (CRParser * a_this) |
258 |
++cr_parser_parse_block_core (CRParser * a_this, |
259 |
++ guint n_calls) |
260 |
+ { |
261 |
+ CRToken *token = NULL; |
262 |
+ CRInputPos init_pos; |
263 |
+@@ -977,6 +983,9 @@ cr_parser_parse_block_core (CRParser * a_this) |
264 |
+ |
265 |
+ g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR); |
266 |
+ |
267 |
++ if (n_calls > RECURSIVE_CALLERS_LIMIT) |
268 |
++ return CR_ERROR; |
269 |
++ |
270 |
+ RECORD_INITIAL_POS (a_this, &init_pos); |
271 |
+ |
272 |
+ status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token); |
273 |
+@@ -1006,13 +1015,13 @@ cr_parser_parse_block_core (CRParser * a_this) |
274 |
+ } else if (token->type == CBO_TK) { |
275 |
+ cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token); |
276 |
+ token = NULL; |
277 |
+- status = cr_parser_parse_block_core (a_this); |
278 |
++ status = cr_parser_parse_block_core (a_this, n_calls + 1); |
279 |
+ CHECK_PARSING_STATUS (status, FALSE); |
280 |
+ goto parse_block_content; |
281 |
+ } else { |
282 |
+ cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token); |
283 |
+ token = NULL; |
284 |
+- status = cr_parser_parse_any_core (a_this); |
285 |
++ status = cr_parser_parse_any_core (a_this, n_calls + 1); |
286 |
+ CHECK_PARSING_STATUS (status, FALSE); |
287 |
+ goto parse_block_content; |
288 |
+ } |
289 |
+@@ -1119,7 +1128,7 @@ cr_parser_parse_value_core (CRParser * a_this) |
290 |
+ status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, |
291 |
+ token); |
292 |
+ token = NULL; |
293 |
+- status = cr_parser_parse_block_core (a_this); |
294 |
++ status = cr_parser_parse_block_core (a_this, 0); |
295 |
+ CHECK_PARSING_STATUS (status, FALSE); |
296 |
+ ref++; |
297 |
+ goto continue_parsing; |
298 |
+@@ -1133,7 +1142,7 @@ cr_parser_parse_value_core (CRParser * a_this) |
299 |
+ status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, |
300 |
+ token); |
301 |
+ token = NULL; |
302 |
+- status = cr_parser_parse_any_core (a_this); |
303 |
++ status = cr_parser_parse_any_core (a_this, 0); |
304 |
+ if (status == CR_OK) { |
305 |
+ ref++; |
306 |
+ goto continue_parsing; |
307 |
+@@ -1172,10 +1181,12 @@ cr_parser_parse_value_core (CRParser * a_this) |
308 |
+ * | FUNCTION | DASHMATCH | '(' any* ')' | '[' any* ']' ] S*; |
309 |
+ * |
310 |
+ *@param a_this the current instance of #CRParser. |
311 |
++ *@param n_calls used to limit recursion depth |
312 |
+ *@return CR_OK upon successfull completion, an error code otherwise. |
313 |
+ */ |
314 |
+ static enum CRStatus |
315 |
+-cr_parser_parse_any_core (CRParser * a_this) |
316 |
++cr_parser_parse_any_core (CRParser * a_this, |
317 |
++ guint n_calls) |
318 |
+ { |
319 |
+ CRToken *token1 = NULL, |
320 |
+ *token2 = NULL; |
321 |
+@@ -1184,6 +1195,9 @@ cr_parser_parse_any_core (CRParser * a_this) |
322 |
+ |
323 |
+ g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR); |
324 |
+ |
325 |
++ if (n_calls > RECURSIVE_CALLERS_LIMIT) |
326 |
++ return CR_ERROR; |
327 |
++ |
328 |
+ RECORD_INITIAL_POS (a_this, &init_pos); |
329 |
+ |
330 |
+ status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token1); |
331 |
+@@ -1222,7 +1236,7 @@ cr_parser_parse_any_core (CRParser * a_this) |
332 |
+ *We consider parameter as being an "any*" production. |
333 |
+ */ |
334 |
+ do { |
335 |
+- status = cr_parser_parse_any_core (a_this); |
336 |
++ status = cr_parser_parse_any_core (a_this, n_calls + 1); |
337 |
+ } while (status == CR_OK); |
338 |
+ |
339 |
+ ENSURE_PARSING_COND (status == CR_PARSING_ERROR); |
340 |
+@@ -1247,7 +1261,7 @@ cr_parser_parse_any_core (CRParser * a_this) |
341 |
+ } |
342 |
+ |
343 |
+ do { |
344 |
+- status = cr_parser_parse_any_core (a_this); |
345 |
++ status = cr_parser_parse_any_core (a_this, n_calls + 1); |
346 |
+ } while (status == CR_OK); |
347 |
+ |
348 |
+ ENSURE_PARSING_COND (status == CR_PARSING_ERROR); |
349 |
+@@ -1275,7 +1289,7 @@ cr_parser_parse_any_core (CRParser * a_this) |
350 |
+ } |
351 |
+ |
352 |
+ do { |
353 |
+- status = cr_parser_parse_any_core (a_this); |
354 |
++ status = cr_parser_parse_any_core (a_this, n_calls + 1); |
355 |
+ } while (status == CR_OK); |
356 |
+ |
357 |
+ ENSURE_PARSING_COND (status == CR_PARSING_ERROR); |
358 |
+ |
359 |
|
360 |
diff --git a/sys-devel/gettext/gettext-0.21-r1.ebuild b/sys-devel/gettext/gettext-0.21-r1.ebuild |
361 |
new file mode 100644 |
362 |
index 00000000000..f6ce7c38d3e |
363 |
--- /dev/null |
364 |
+++ b/sys-devel/gettext/gettext-0.21-r1.ebuild |
365 |
@@ -0,0 +1,157 @@ |
366 |
+# Copyright 1999-2021 Gentoo Authors |
367 |
+# Distributed under the terms of the GNU General Public License v2 |
368 |
+ |
369 |
+# Note: Keep version bumps in sync with dev-libs/libintl. |
370 |
+ |
371 |
+EAPI=7 |
372 |
+ |
373 |
+inherit mono-env libtool java-pkg-opt-2 multilib-minimal |
374 |
+ |
375 |
+DESCRIPTION="GNU locale utilities" |
376 |
+HOMEPAGE="https://www.gnu.org/software/gettext/" |
377 |
+if [[ "${PV}" == *_rc* ]] ; then |
378 |
+ SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.bz2" |
379 |
+ S="${WORKDIR}/${P/_/-}" |
380 |
+else |
381 |
+ SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" |
382 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" |
383 |
+fi |
384 |
+# Only libasprintf is under the LGPL (and libintl is in a sep package), |
385 |
+# so put that license behind USE=cxx. |
386 |
+LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )" |
387 |
+SLOT="0" |
388 |
+IUSE="acl -cvs +cxx doc emacs git java ncurses nls openmp static-libs" |
389 |
+ |
390 |
+# only runtime goes multilib |
391 |
+# Note: The version of libxml2 corresponds to the version bundled via gnulib. |
392 |
+# If the build detects too old of a system version, it will end up falling back |
393 |
+# to the bundled copy. #596918 |
394 |
+# Note: expat lacks a subslot because it is dynamically loaded at runtime. We |
395 |
+# would depend on older subslots if they were available (based on the ABIs that |
396 |
+# are explicitly handled), but expat doesn't currently use subslots. |
397 |
+DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] |
398 |
+ >=virtual/libintl-0-r2[${MULTILIB_USEDEP}] |
399 |
+ >=dev-libs/libxml2-2.9.3:= |
400 |
+ dev-libs/expat |
401 |
+ acl? ( virtual/acl ) |
402 |
+ ncurses? ( sys-libs/ncurses:0= ) |
403 |
+ java? ( >=virtual/jdk-1.4:= )" |
404 |
+RDEPEND="${DEPEND} |
405 |
+ !git? ( cvs? ( dev-vcs/cvs ) ) |
406 |
+ git? ( dev-vcs/git ) |
407 |
+ java? ( >=virtual/jre-1.4 )" |
408 |
+BDEPEND=" |
409 |
+ git? ( dev-vcs/git ) |
410 |
+" |
411 |
+PDEPEND="emacs? ( app-emacs/po-mode )" |
412 |
+ |
413 |
+MULTILIB_WRAPPED_HEADERS=( |
414 |
+ # only installed for native ABI |
415 |
+ /usr/include/gettext-po.h |
416 |
+ |
417 |
+ /usr/include/autosprintf.h |
418 |
+ /usr/include/textstyle.h |
419 |
+ /usr/include/textstyle/stdbool.h |
420 |
+ /usr/include/textstyle/version.h |
421 |
+ /usr/include/textstyle/woe32dll.h |
422 |
+) |
423 |
+ |
424 |
+PATCHES=( |
425 |
+ "${FILESDIR}"/${PN}-0.19.7-disable-libintl.patch #564168 |
426 |
+ "${FILESDIR}"/${PN}-0.20-parallel_install.patch #685530 |
427 |
+ "${FILESDIR}"/${PN}-0.21_rc1-avoid_eautomake.patch |
428 |
+ "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch |
429 |
+) |
430 |
+ |
431 |
+QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so" |
432 |
+ |
433 |
+pkg_setup() { |
434 |
+ mono-env_pkg_setup |
435 |
+ java-pkg-opt-2_pkg_setup |
436 |
+} |
437 |
+ |
438 |
+src_prepare() { |
439 |
+ java-pkg-opt-2_src_prepare |
440 |
+ |
441 |
+ default |
442 |
+ |
443 |
+ elibtoolize |
444 |
+} |
445 |
+ |
446 |
+multilib_src_configure() { |
447 |
+ local myconf=( |
448 |
+ # switches common to runtime and top-level |
449 |
+ --cache-file="${BUILD_DIR}"/config.cache |
450 |
+ #--docdir="\$(datarootdir)/doc/${PF}" |
451 |
+ |
452 |
+ # Emacs support is now in a separate package |
453 |
+ --without-emacs |
454 |
+ --without-lispdir |
455 |
+ # glib depends on us so avoid circular deps |
456 |
+ --with-included-glib |
457 |
+ # libcroco depends on glib which ... ^^^ |
458 |
+ --with-included-libcroco |
459 |
+ # this will _disable_ libunistring (since it is not bundled), |
460 |
+ # see bug #326477 |
461 |
+ --with-included-libunistring |
462 |
+ # Never build libintl since it's in dev-libs/libintl now. |
463 |
+ --without-included-gettext |
464 |
+ # Never build bundled copy of libxml2. |
465 |
+ --without-included-libxml |
466 |
+ |
467 |
+ $(use_enable acl) |
468 |
+ $(use_enable cxx c++) |
469 |
+ $(use_enable cxx libasprintf) |
470 |
+ $(use_with git) |
471 |
+ $(usex git --without-cvs $(use_with cvs)) |
472 |
+ $(use_enable java) |
473 |
+ $(use_enable ncurses curses) |
474 |
+ $(use_enable nls) |
475 |
+ $(use_enable openmp) |
476 |
+ $(use_enable static-libs static) |
477 |
+ ) |
478 |
+ |
479 |
+ local ECONF_SOURCE="${S}" |
480 |
+ if ! multilib_is_native_abi ; then |
481 |
+ # for non-native ABIs, we build runtime only |
482 |
+ ECONF_SOURCE+=/gettext-runtime |
483 |
+ fi |
484 |
+ |
485 |
+ econf "${myconf[@]}" |
486 |
+} |
487 |
+ |
488 |
+multilib_src_install() { |
489 |
+ emake DESTDIR="${D}" install |
490 |
+ |
491 |
+ if multilib_is_native_abi ; then |
492 |
+ dosym msgfmt /usr/bin/gmsgfmt #43435 |
493 |
+ dobin gettext-tools/misc/gettextize |
494 |
+ fi |
495 |
+} |
496 |
+ |
497 |
+multilib_src_install_all() { |
498 |
+ find "${ED}" -type f -name "*.la" -delete || die |
499 |
+ |
500 |
+ if use java ; then |
501 |
+ java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar |
502 |
+ rm "${ED}"/usr/share/${PN}/*.jar || die |
503 |
+ rm "${ED}"/usr/share/${PN}/*.class || die |
504 |
+ if use doc ; then |
505 |
+ java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2 |
506 |
+ fi |
507 |
+ fi |
508 |
+ |
509 |
+ dodoc AUTHORS ChangeLog NEWS README THANKS |
510 |
+ |
511 |
+ if use doc ; then |
512 |
+ docinto html |
513 |
+ dodoc "${ED}"/usr/share/doc/${PF}/*.html |
514 |
+ else |
515 |
+ rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1} |
516 |
+ fi |
517 |
+ rm "${ED}"/usr/share/doc/${PF}/*.html || die |
518 |
+} |
519 |
+ |
520 |
+pkg_preinst() { |
521 |
+ java-pkg-opt-2_pkg_preinst |
522 |
+} |