1 |
commit: 69ff75e390a563e731c8e124d557d1513fba31d1 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 21 11:32:00 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 21 11:35:18 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69ff75e3 |
7 |
|
8 |
dev-libs/icu: Bump to version 64.2 |
9 |
|
10 |
Package-Manager: Portage-2.3.64, Repoman-2.3.12 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
dev-libs/icu/Manifest | 1 + |
14 |
.../files/icu-64.1-data_archive_generation.patch | 14 + |
15 |
dev-libs/icu/files/icu-64.2-darwin.patch | 56 ++ |
16 |
dev-libs/icu/files/icu-64.2-extern_c.patch | 789 +++++++++++++++++++++ |
17 |
dev-libs/icu/icu-64.2.ebuild | 144 ++++ |
18 |
5 files changed, 1004 insertions(+) |
19 |
|
20 |
diff --git a/dev-libs/icu/Manifest b/dev-libs/icu/Manifest |
21 |
index f77c1e6b6c9..8ebb1161a08 100644 |
22 |
--- a/dev-libs/icu/Manifest |
23 |
+++ b/dev-libs/icu/Manifest |
24 |
@@ -1,3 +1,4 @@ |
25 |
DIST icu4c-58_2-src.tgz 23369902 BLAKE2B cdd2e02c3aba050f5b7f8b38c5a3731e3e5f1cc1403ef86a50908b95560ea3cf8a2d47119fa60cf34f22a8b65eaa2392fd5bcbd3bc48b3da541fe3d9bd7392c0 SHA512 5c21af748f48b392e6c0412bd0aee92162ea931820dcbfab4ec6e0299868504b303d88f7586cc95de55c777ac0dca3a29d6c8ca0892c646ebc864c8a5b5a162a |
26 |
DIST icu4c-63_1-src.tgz 23746939 BLAKE2B 5a665554506ff705c83c7a03a1b5598b1a48afbe1c6caaccd5a2d7d5aae16b3e18d7bc65ed552fc4df86248a2f13962438f19bca6c2a579843204c7dc52e6278 SHA512 9ab407ed840a00cdda7470dcc4c40299a125ad246ae4d019c4b1ede54781157fd63af015a8228cd95dbc47e4d15a0932b2c657489046a19788e5e8266eac079c |
27 |
DIST icu4c-64_1-src.tgz 24013136 BLAKE2B e577bd4c9b822e5ef3a101b3ef46b7b42ca18077d6e05fca543ff1eb702261f017981fb22dd3970662397530b390f648d4417c84dcf3d6ed0d298dd7a8c38897 SHA512 5eca8342d8bdf902689243506643e04512744b33962687e118f6810af6f7fd073678f67b991d2ae9139d257713b63abb4222b96687234df01ad5ff62df16ede0 |
28 |
+DIST icu4c-64_2-src.tgz 24013250 BLAKE2B 4a286e7a952f5faa74d942f6b6a73147a46aa10fe6d54d024e2d18d1e01056444d56118ded04b4fe084d6a0f9058d7d9e76973960ac8fe5bd9ee105d9e214318 SHA512 5ecb4c230ba45918747a1cf9aef86f555aa07d5b29b1d07ab674e8013f46dfb907a0e9d6945db41155f9dc3012fd94e1152ffc19f61a68b6dfcbabdcb8ae9d78 |
29 |
|
30 |
diff --git a/dev-libs/icu/files/icu-64.1-data_archive_generation.patch b/dev-libs/icu/files/icu-64.1-data_archive_generation.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..3bb7673f254 |
33 |
--- /dev/null |
34 |
+++ b/dev-libs/icu/files/icu-64.1-data_archive_generation.patch |
35 |
@@ -0,0 +1,14 @@ |
36 |
+https://bugs.gentoo.org/682170 |
37 |
+ |
38 |
+--- a/data/Makefile.in |
39 |
++++ b/data/Makefile.in |
40 |
+@@ -148,7 +148,8 @@ |
41 |
+ # and convert it to the current type. |
42 |
+ ifneq ($(ICUDATA_ARCHIVE),) |
43 |
+ ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat |
44 |
+-$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR) |
45 |
++$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) |
46 |
++ $(MKINSTALLDIRS) $(OUTDIR) |
47 |
+ $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE) |
48 |
+ endif |
49 |
+ else |
50 |
|
51 |
diff --git a/dev-libs/icu/files/icu-64.2-darwin.patch b/dev-libs/icu/files/icu-64.2-darwin.patch |
52 |
new file mode 100644 |
53 |
index 00000000000..e6af282bd0e |
54 |
--- /dev/null |
55 |
+++ b/dev-libs/icu/files/icu-64.2-darwin.patch |
56 |
@@ -0,0 +1,56 @@ |
57 |
+same as 4.7, but retargetted to apply with eapply |
58 |
+ |
59 |
+forward-ported from v58.2 to v64.2 |
60 |
+ |
61 |
+--- a/config/mh-darwin |
62 |
++++ b/config/mh-darwin |
63 |
+@@ -6,6 +6,12 @@ |
64 |
+ ## Copyright (c) 1999-2012 International Business Machines Corporation and |
65 |
+ ## others. All Rights Reserved. |
66 |
+ |
67 |
++SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) |
68 |
++FINAL_SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO_TARGET_VERSION).$(SO) |
69 |
++MIDDLE_SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO_TARGET_VERSION_MAJOR).$(SO) |
70 |
++ |
71 |
++IS_DARWIN = yes |
72 |
++ |
73 |
+ ## Flags for position independent code |
74 |
+ SHAREDLIBCFLAGS = -dynamic |
75 |
+ SHAREDLIBCXXFLAGS = -dynamic |
76 |
+@@ -33,7 +39,7 @@ |
77 |
+ ifeq ($(ENABLE_RPATH),YES) |
78 |
+ LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET)) |
79 |
+ else |
80 |
+-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET)) $(PKGDATA_TRAILING_SPACE) |
81 |
++LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET)) $(PKGDATA_TRAILING_SPACE) |
82 |
+ endif |
83 |
+ |
84 |
+ ## Compiler switch to embed a runtime search path |
85 |
+--- a/stubdata/Makefile.in |
86 |
++++ b/stubdata/Makefile.in |
87 |
+@@ -34,7 +34,11 @@ |
88 |
+ |
89 |
+ |
90 |
+ ifneq ($(ENABLE_SHARED),) |
91 |
++ifeq ($(IS_DARWIN),) |
92 |
+ SO_TARGET = $(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO) |
93 |
++else |
94 |
++SO_TARGET = $(LIBDIR)/$(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO) |
95 |
++endif |
96 |
+ ALL_SO_TARGETS = $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) $(SO_TARGET) $(BATCH_STUB_TARGET) $(SHARED_OBJECT) |
97 |
+ endif |
98 |
+ |
99 |
+--- a/tools/ctestfw/Makefile.in |
100 |
++++ b/tools/ctestfw/Makefile.in |
101 |
+@@ -33,7 +33,11 @@ |
102 |
+ endif |
103 |
+ |
104 |
+ ifneq ($(ENABLE_SHARED),) |
105 |
++ifeq ($(IS_DARWIN),) |
106 |
+ SO_TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) |
107 |
++else |
108 |
++SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) |
109 |
++endif |
110 |
+ ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT) |
111 |
+ endif |
112 |
+ |
113 |
|
114 |
diff --git a/dev-libs/icu/files/icu-64.2-extern_c.patch b/dev-libs/icu/files/icu-64.2-extern_c.patch |
115 |
new file mode 100644 |
116 |
index 00000000000..9a757e12037 |
117 |
--- /dev/null |
118 |
+++ b/dev-libs/icu/files/icu-64.2-extern_c.patch |
119 |
@@ -0,0 +1,789 @@ |
120 |
+From 26bdef634585eb24946dba035611266e9431873b Mon Sep 17 00:00:00 2001 |
121 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
122 |
+Date: Sat, 30 Mar 2019 09:59:46 +0300 |
123 |
+Subject: [PATCH] ICU-20530 Fix header issues based on test/hdrtst |
124 |
+ |
125 |
+Remove explicit extern "C++" scope. |
126 |
+ |
127 |
+Remove C++ macros in C mode. |
128 |
+ |
129 |
+Fix issues detected by make -C test/hdrtst. |
130 |
+ |
131 |
+Run test/hdrtest during CI to detect future breakage. |
132 |
+ |
133 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
134 |
+Closes: https://github.com/unicode-org/icu/pull/613 |
135 |
+Signed-off-by: Lars Wendler <polynomial-c@g.o> |
136 |
+diff --git a/icu4c/source/common/unicode/ucptrie.h b/icu4c/source/common/unicode/ucptrie.h |
137 |
+index 2718c984e4..ce7340b890 100644 |
138 |
+--- a/icu4c/source/common/unicode/ucptrie.h |
139 |
++++ b/icu4c/source/common/unicode/ucptrie.h |
140 |
+@@ -216,25 +216,6 @@ ucptrie_openFromBinary(UCPTrieType type, UCPTrieValueWidth valueWidth, |
141 |
+ U_CAPI void U_EXPORT2 |
142 |
+ ucptrie_close(UCPTrie *trie); |
143 |
+ |
144 |
+-#if U_SHOW_CPLUSPLUS_API |
145 |
+- |
146 |
+-U_NAMESPACE_BEGIN |
147 |
+- |
148 |
+-/** |
149 |
+- * \class LocalUCPTriePointer |
150 |
+- * "Smart pointer" class, closes a UCPTrie via ucptrie_close(). |
151 |
+- * For most methods see the LocalPointerBase base class. |
152 |
+- * |
153 |
+- * @see LocalPointerBase |
154 |
+- * @see LocalPointer |
155 |
+- * @draft ICU 63 |
156 |
+- */ |
157 |
+-U_DEFINE_LOCAL_OPEN_POINTER(LocalUCPTriePointer, UCPTrie, ucptrie_close); |
158 |
+- |
159 |
+-U_NAMESPACE_END |
160 |
+- |
161 |
+-#endif |
162 |
+- |
163 |
+ /** |
164 |
+ * Returns the trie type. |
165 |
+ * |
166 |
+@@ -642,5 +623,25 @@ ucptrie_internalU8PrevIndex(const UCPTrie *trie, UChar32 c, |
167 |
+ U_CDECL_END |
168 |
+ |
169 |
+ #endif // U_IN_DOXYGEN |
170 |
++ |
171 |
++#if U_SHOW_CPLUSPLUS_API |
172 |
++ |
173 |
++U_NAMESPACE_BEGIN |
174 |
++ |
175 |
++/** |
176 |
++ * \class LocalUCPTriePointer |
177 |
++ * "Smart pointer" class, closes a UCPTrie via ucptrie_close(). |
178 |
++ * For most methods see the LocalPointerBase base class. |
179 |
++ * |
180 |
++ * @see LocalPointerBase |
181 |
++ * @see LocalPointer |
182 |
++ * @draft ICU 63 |
183 |
++ */ |
184 |
++U_DEFINE_LOCAL_OPEN_POINTER(LocalUCPTriePointer, UCPTrie, ucptrie_close); |
185 |
++ |
186 |
++U_NAMESPACE_END |
187 |
++ |
188 |
++#endif // U_SHOW_CPLUSPLUS_API |
189 |
++ |
190 |
+ #endif // U_HIDE_DRAFT_API |
191 |
+ #endif |
192 |
+diff --git a/icu4c/source/common/unicode/udata.h b/icu4c/source/common/unicode/udata.h |
193 |
+index a0286e1e42..325ffcf17d 100644 |
194 |
+--- a/icu4c/source/common/unicode/udata.h |
195 |
++++ b/icu4c/source/common/unicode/udata.h |
196 |
+@@ -264,25 +264,6 @@ udata_openChoice(const char *path, const char *type, const char *name, |
197 |
+ U_STABLE void U_EXPORT2 |
198 |
+ udata_close(UDataMemory *pData); |
199 |
+ |
200 |
+-#if U_SHOW_CPLUSPLUS_API |
201 |
+- |
202 |
+-U_NAMESPACE_BEGIN |
203 |
+- |
204 |
+-/** |
205 |
+- * \class LocalUDataMemoryPointer |
206 |
+- * "Smart pointer" class, closes a UDataMemory via udata_close(). |
207 |
+- * For most methods see the LocalPointerBase base class. |
208 |
+- * |
209 |
+- * @see LocalPointerBase |
210 |
+- * @see LocalPointer |
211 |
+- * @stable ICU 4.4 |
212 |
+- */ |
213 |
+-U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close); |
214 |
+- |
215 |
+-U_NAMESPACE_END |
216 |
+- |
217 |
+-#endif |
218 |
+- |
219 |
+ /** |
220 |
+ * Get the pointer to the actual data inside the data memory. |
221 |
+ * The data is read-only. |
222 |
+@@ -434,4 +415,23 @@ udata_setFileAccess(UDataFileAccess access, UErrorCode *status); |
223 |
+ |
224 |
+ U_CDECL_END |
225 |
+ |
226 |
++#if U_SHOW_CPLUSPLUS_API |
227 |
++ |
228 |
++U_NAMESPACE_BEGIN |
229 |
++ |
230 |
++/** |
231 |
++ * \class LocalUDataMemoryPointer |
232 |
++ * "Smart pointer" class, closes a UDataMemory via udata_close(). |
233 |
++ * For most methods see the LocalPointerBase base class. |
234 |
++ * |
235 |
++ * @see LocalPointerBase |
236 |
++ * @see LocalPointer |
237 |
++ * @stable ICU 4.4 |
238 |
++ */ |
239 |
++U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close); |
240 |
++ |
241 |
++U_NAMESPACE_END |
242 |
++ |
243 |
++#endif // U_SHOW_CPLUSPLUS_API |
244 |
++ |
245 |
+ #endif |
246 |
+diff --git a/icu4c/source/common/unicode/uversion.h b/icu4c/source/common/unicode/uversion.h |
247 |
+index 4aaa8b4d60..5700f62cbf 100644 |
248 |
+--- a/icu4c/source/common/unicode/uversion.h |
249 |
++++ b/icu4c/source/common/unicode/uversion.h |
250 |
+@@ -62,26 +62,22 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; |
251 |
+ /* C++ namespace if supported. Versioned unless versioning is disabled. */ |
252 |
+ /*===========================================================================*/ |
253 |
+ |
254 |
++/* Define C++ namespace symbols. */ |
255 |
++#ifdef __cplusplus |
256 |
++ |
257 |
+ /** |
258 |
+ * \def U_NAMESPACE_BEGIN |
259 |
+- * This is used to begin a declaration of a public ICU C++ API. |
260 |
+- * When not compiling for C++, it does nothing. |
261 |
+- * When compiling for C++, it begins an extern "C++" linkage block (to protect |
262 |
+- * against cases in which an external client includes ICU header files inside |
263 |
+- * an extern "C" linkage block). |
264 |
++ * This is used to begin a declaration of a public ICU C++ API within |
265 |
++ * versioned-ICU-namespace block. |
266 |
+ * |
267 |
+- * It also begins a versioned-ICU-namespace block. |
268 |
+ * @stable ICU 2.4 |
269 |
+ */ |
270 |
+ |
271 |
+ /** |
272 |
+ * \def U_NAMESPACE_END |
273 |
+ * This is used to end a declaration of a public ICU C++ API. |
274 |
+- * When not compiling for C++, it does nothing. |
275 |
+- * When compiling for C++, it ends the extern "C++" block begun by |
276 |
+- * U_NAMESPACE_BEGIN. |
277 |
++ * It ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGIN. |
278 |
+ * |
279 |
+- * It also ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGIN. |
280 |
+ * @stable ICU 2.4 |
281 |
+ */ |
282 |
+ |
283 |
+@@ -89,9 +85,6 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; |
284 |
+ * \def U_NAMESPACE_USE |
285 |
+ * This is used to specify that the rest of the code uses the |
286 |
+ * public ICU C++ API namespace. |
287 |
+- * This is invoked by default; we recommend that you turn it off: |
288 |
+- * See the "Recommended Build Options" section of the ICU4C readme |
289 |
+- * (http://source.icu-project.org/repos/icu/icu/trunk/readme.html#RecBuild) |
290 |
+ * @stable ICU 2.4 |
291 |
+ */ |
292 |
+ |
293 |
+@@ -105,8 +98,6 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; |
294 |
+ * @stable ICU 2.4 |
295 |
+ */ |
296 |
+ |
297 |
+-/* Define C++ namespace symbols. */ |
298 |
+-#ifdef __cplusplus |
299 |
+ # if U_DISABLE_RENAMING |
300 |
+ # define U_ICU_NAMESPACE icu |
301 |
+ namespace U_ICU_NAMESPACE { } |
302 |
+@@ -116,8 +107,8 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; |
303 |
+ namespace icu = U_ICU_NAMESPACE; |
304 |
+ # endif |
305 |
+ |
306 |
+-# define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE { |
307 |
+-# define U_NAMESPACE_END } } |
308 |
++# define U_NAMESPACE_BEGIN namespace U_ICU_NAMESPACE { |
309 |
++# define U_NAMESPACE_END } |
310 |
+ # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE; |
311 |
+ # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE:: |
312 |
+ |
313 |
+@@ -133,12 +124,7 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; |
314 |
+ # if U_USING_ICU_NAMESPACE |
315 |
+ U_NAMESPACE_USE |
316 |
+ # endif |
317 |
+-#else |
318 |
+-# define U_NAMESPACE_BEGIN |
319 |
+-# define U_NAMESPACE_END |
320 |
+-# define U_NAMESPACE_USE |
321 |
+-# define U_NAMESPACE_QUALIFIER |
322 |
+-#endif |
323 |
++#endif /* __cplusplus */ |
324 |
+ |
325 |
+ /*===========================================================================*/ |
326 |
+ /* General version helper functions. Definitions in putil.c */ |
327 |
+diff --git a/icu4c/source/i18n/unicode/reldatefmt.h b/icu4c/source/i18n/unicode/reldatefmt.h |
328 |
+index 16ae91ad03..1e164a581a 100644 |
329 |
+--- a/icu4c/source/i18n/unicode/reldatefmt.h |
330 |
++++ b/icu4c/source/i18n/unicode/reldatefmt.h |
331 |
+@@ -246,6 +246,7 @@ class SharedPluralRules; |
332 |
+ class SharedBreakIterator; |
333 |
+ class NumberFormat; |
334 |
+ class UnicodeString; |
335 |
++class FormattedRelativeDateTime; |
336 |
+ class FormattedRelativeDateTimeData; |
337 |
+ |
338 |
+ #ifndef U_HIDE_DRAFT_API |
339 |
+diff --git a/icu4c/source/i18n/unicode/uspoof.h b/icu4c/source/i18n/unicode/uspoof.h |
340 |
+index d15ba4b242..ceb8484b6b 100644 |
341 |
+--- a/icu4c/source/i18n/unicode/uspoof.h |
342 |
++++ b/icu4c/source/i18n/unicode/uspoof.h |
343 |
+@@ -353,6 +353,8 @@ |
344 |
+ * @stable ICU 4.6 |
345 |
+ */ |
346 |
+ |
347 |
++U_CDECL_BEGIN |
348 |
++ |
349 |
+ struct USpoofChecker; |
350 |
+ /** |
351 |
+ * @stable ICU 4.2 |
352 |
+@@ -674,25 +676,6 @@ uspoof_openFromSource(const char *confusables, int32_t confusablesLen, |
353 |
+ U_STABLE void U_EXPORT2 |
354 |
+ uspoof_close(USpoofChecker *sc); |
355 |
+ |
356 |
+-#if U_SHOW_CPLUSPLUS_API |
357 |
+- |
358 |
+-U_NAMESPACE_BEGIN |
359 |
+- |
360 |
+-/** |
361 |
+- * \class LocalUSpoofCheckerPointer |
362 |
+- * "Smart pointer" class, closes a USpoofChecker via uspoof_close(). |
363 |
+- * For most methods see the LocalPointerBase base class. |
364 |
+- * |
365 |
+- * @see LocalPointerBase |
366 |
+- * @see LocalPointer |
367 |
+- * @stable ICU 4.4 |
368 |
+- */ |
369 |
+-U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckerPointer, USpoofChecker, uspoof_close); |
370 |
+- |
371 |
+-U_NAMESPACE_END |
372 |
+- |
373 |
+-#endif |
374 |
+- |
375 |
+ /** |
376 |
+ * Clone a Spoof Checker. The clone will be set to perform the same checks |
377 |
+ * as the original source. |
378 |
+@@ -901,54 +884,6 @@ U_STABLE const USet * U_EXPORT2 |
379 |
+ uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status); |
380 |
+ |
381 |
+ |
382 |
+-#if U_SHOW_CPLUSPLUS_API |
383 |
+-/** |
384 |
+- * Limit the acceptable characters to those specified by a Unicode Set. |
385 |
+- * Any previously specified character limit is |
386 |
+- * is replaced by the new settings. This includes limits on |
387 |
+- * characters that were set with the uspoof_setAllowedLocales() function. |
388 |
+- * |
389 |
+- * The USPOOF_CHAR_LIMIT test is automatically enabled for this |
390 |
+- * USoofChecker by this function. |
391 |
+- * |
392 |
+- * @param sc The USpoofChecker |
393 |
+- * @param chars A Unicode Set containing the list of |
394 |
+- * characters that are permitted. Ownership of the set |
395 |
+- * remains with the caller. The incoming set is cloned by |
396 |
+- * this function, so there are no restrictions on modifying |
397 |
+- * or deleting the UnicodeSet after calling this function. |
398 |
+- * @param status The error code, set if this function encounters a problem. |
399 |
+- * @stable ICU 4.2 |
400 |
+- */ |
401 |
+-U_STABLE void U_EXPORT2 |
402 |
+-uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status); |
403 |
+- |
404 |
+- |
405 |
+-/** |
406 |
+- * Get a UnicodeSet for the characters permitted in an identifier. |
407 |
+- * This corresponds to the limits imposed by the Set Allowed Characters / |
408 |
+- * UnicodeSet functions. Limitations imposed by other checks will not be |
409 |
+- * reflected in the set returned by this function. |
410 |
+- * |
411 |
+- * The returned set will be frozen, meaning that it cannot be modified |
412 |
+- * by the caller. |
413 |
+- * |
414 |
+- * Ownership of the returned set remains with the Spoof Detector. The |
415 |
+- * returned set will become invalid if the spoof detector is closed, |
416 |
+- * or if a new set of allowed characters is specified. |
417 |
+- * |
418 |
+- * |
419 |
+- * @param sc The USpoofChecker |
420 |
+- * @param status The error code, set if this function encounters a problem. |
421 |
+- * @return A UnicodeSet containing the characters that are permitted by |
422 |
+- * the USPOOF_CHAR_LIMIT test. |
423 |
+- * @stable ICU 4.2 |
424 |
+- */ |
425 |
+-U_STABLE const icu::UnicodeSet * U_EXPORT2 |
426 |
+-uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status); |
427 |
+-#endif |
428 |
+- |
429 |
+- |
430 |
+ /** |
431 |
+ * Check the specified string for possible security issues. |
432 |
+ * The text to be checked will typically be an identifier of some sort. |
433 |
+@@ -1027,43 +962,6 @@ uspoof_checkUTF8(const USpoofChecker *sc, |
434 |
+ UErrorCode *status); |
435 |
+ |
436 |
+ |
437 |
+-#if U_SHOW_CPLUSPLUS_API |
438 |
+-/** |
439 |
+- * Check the specified string for possible security issues. |
440 |
+- * The text to be checked will typically be an identifier of some sort. |
441 |
+- * The set of checks to be performed is specified with uspoof_setChecks(). |
442 |
+- * |
443 |
+- * \note |
444 |
+- * Consider using the newer API, {@link uspoof_check2UnicodeString}, instead. |
445 |
+- * The newer API exposes additional information from the check procedure |
446 |
+- * and is otherwise identical to this method. |
447 |
+- * |
448 |
+- * @param sc The USpoofChecker |
449 |
+- * @param id A identifier to be checked for possible security issues. |
450 |
+- * @param position Deprecated in ICU 51. Always returns zero. |
451 |
+- * Originally, an out parameter for the index of the first |
452 |
+- * string position that failed a check. |
453 |
+- * This parameter may be NULL. |
454 |
+- * @param status The error code, set if an error occurred while attempting to |
455 |
+- * perform the check. |
456 |
+- * Spoofing or security issues detected with the input string are |
457 |
+- * not reported here, but through the function's return value. |
458 |
+- * @return An integer value with bits set for any potential security |
459 |
+- * or spoofing issues detected. The bits are defined by |
460 |
+- * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) |
461 |
+- * will be zero if the input string passes all of the |
462 |
+- * enabled checks. |
463 |
+- * @see uspoof_check2UnicodeString |
464 |
+- * @stable ICU 4.2 |
465 |
+- */ |
466 |
+-U_STABLE int32_t U_EXPORT2 |
467 |
+-uspoof_checkUnicodeString(const USpoofChecker *sc, |
468 |
+- const icu::UnicodeString &id, |
469 |
+- int32_t *position, |
470 |
+- UErrorCode *status); |
471 |
+-#endif |
472 |
+- |
473 |
+- |
474 |
+ /** |
475 |
+ * Check the specified string for possible security issues. |
476 |
+ * The text to be checked will typically be an identifier of some sort. |
477 |
+@@ -1135,39 +1033,6 @@ uspoof_check2UTF8(const USpoofChecker *sc, |
478 |
+ USpoofCheckResult* checkResult, |
479 |
+ UErrorCode *status); |
480 |
+ |
481 |
+-#if U_SHOW_CPLUSPLUS_API |
482 |
+-/** |
483 |
+- * Check the specified string for possible security issues. |
484 |
+- * The text to be checked will typically be an identifier of some sort. |
485 |
+- * The set of checks to be performed is specified with uspoof_setChecks(). |
486 |
+- * |
487 |
+- * @param sc The USpoofChecker |
488 |
+- * @param id A identifier to be checked for possible security issues. |
489 |
+- * @param checkResult An instance of USpoofCheckResult to be filled with |
490 |
+- * details about the identifier. Can be NULL. |
491 |
+- * @param status The error code, set if an error occurred while attempting to |
492 |
+- * perform the check. |
493 |
+- * Spoofing or security issues detected with the input string are |
494 |
+- * not reported here, but through the function's return value. |
495 |
+- * @return An integer value with bits set for any potential security |
496 |
+- * or spoofing issues detected. The bits are defined by |
497 |
+- * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) |
498 |
+- * will be zero if the input string passes all of the |
499 |
+- * enabled checks. Any information in this bitmask will be |
500 |
+- * consistent with the information saved in the optional |
501 |
+- * checkResult parameter. |
502 |
+- * @see uspoof_openCheckResult |
503 |
+- * @see uspoof_check2 |
504 |
+- * @see uspoof_check2UTF8 |
505 |
+- * @stable ICU 58 |
506 |
+- */ |
507 |
+-U_STABLE int32_t U_EXPORT2 |
508 |
+-uspoof_check2UnicodeString(const USpoofChecker *sc, |
509 |
+- const icu::UnicodeString &id, |
510 |
+- USpoofCheckResult* checkResult, |
511 |
+- UErrorCode *status); |
512 |
+-#endif |
513 |
+- |
514 |
+ /** |
515 |
+ * Create a USpoofCheckResult, used by the {@link uspoof_check2} class of functions to return |
516 |
+ * information about the identifier. Information includes: |
517 |
+@@ -1199,32 +1064,6 @@ uspoof_openCheckResult(UErrorCode *status); |
518 |
+ U_STABLE void U_EXPORT2 |
519 |
+ uspoof_closeCheckResult(USpoofCheckResult *checkResult); |
520 |
+ |
521 |
+-#if U_SHOW_CPLUSPLUS_API |
522 |
+- |
523 |
+-U_NAMESPACE_BEGIN |
524 |
+- |
525 |
+-/** |
526 |
+- * \class LocalUSpoofCheckResultPointer |
527 |
+- * "Smart pointer" class, closes a USpoofCheckResult via `uspoof_closeCheckResult()`. |
528 |
+- * For most methods see the LocalPointerBase base class. |
529 |
+- * |
530 |
+- * @see LocalPointerBase |
531 |
+- * @see LocalPointer |
532 |
+- * @stable ICU 58 |
533 |
+- */ |
534 |
+- |
535 |
+-/** |
536 |
+- * \cond |
537 |
+- * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER. |
538 |
+- * For now, suppress with a Doxygen cond |
539 |
+- */ |
540 |
+-U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closeCheckResult); |
541 |
+-/** \endcond */ |
542 |
+- |
543 |
+-U_NAMESPACE_END |
544 |
+- |
545 |
+-#endif |
546 |
+- |
547 |
+ /** |
548 |
+ * Indicates which of the spoof check(s) have failed. The value is a bitwise OR of the constants for the tests |
549 |
+ * in question: USPOOF_RESTRICTION_LEVEL, USPOOF_CHAR_LIMIT, and so on. |
550 |
+@@ -1355,36 +1194,6 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc, |
551 |
+ |
552 |
+ |
553 |
+ |
554 |
+-#if U_SHOW_CPLUSPLUS_API |
555 |
+-/** |
556 |
+- * A version of {@link uspoof_areConfusable} accepting UnicodeStrings. |
557 |
+- * |
558 |
+- * @param sc The USpoofChecker |
559 |
+- * @param s1 The first of the two identifiers to be compared for |
560 |
+- * confusability. The strings are in UTF-8 format. |
561 |
+- * @param s2 The second of the two identifiers to be compared for |
562 |
+- * confusability. The strings are in UTF-8 format. |
563 |
+- * @param status The error code, set if an error occurred while attempting to |
564 |
+- * perform the check. |
565 |
+- * Confusability of the identifiers is not reported here, |
566 |
+- * but through this function's return value. |
567 |
+- * @return An integer value with bit(s) set corresponding to |
568 |
+- * the type of confusability found, as defined by |
569 |
+- * enum USpoofChecks. Zero is returned if the identifiers |
570 |
+- * are not confusable. |
571 |
+- * |
572 |
+- * @stable ICU 4.2 |
573 |
+- * |
574 |
+- * @see uspoof_areConfusable |
575 |
+- */ |
576 |
+-U_STABLE int32_t U_EXPORT2 |
577 |
+-uspoof_areConfusableUnicodeString(const USpoofChecker *sc, |
578 |
+- const icu::UnicodeString &s1, |
579 |
+- const icu::UnicodeString &s2, |
580 |
+- UErrorCode *status); |
581 |
+-#endif |
582 |
+- |
583 |
+- |
584 |
+ /** |
585 |
+ * Get the "skeleton" for an identifier. |
586 |
+ * Skeletons are a transformation of the input identifier; |
587 |
+@@ -1463,38 +1272,6 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, |
588 |
+ char *dest, int32_t destCapacity, |
589 |
+ UErrorCode *status); |
590 |
+ |
591 |
+-#if U_SHOW_CPLUSPLUS_API |
592 |
+-/** |
593 |
+- * Get the "skeleton" for an identifier. |
594 |
+- * Skeletons are a transformation of the input identifier; |
595 |
+- * Two identifiers are confusable if their skeletons are identical. |
596 |
+- * See Unicode UAX #39 for additional information. |
597 |
+- * |
598 |
+- * Using skeletons directly makes it possible to quickly check |
599 |
+- * whether an identifier is confusable with any of some large |
600 |
+- * set of existing identifiers, by creating an efficiently |
601 |
+- * searchable collection of the skeletons. |
602 |
+- * |
603 |
+- * @param sc The USpoofChecker. |
604 |
+- * @param type Deprecated in ICU 58. You may pass any number. |
605 |
+- * Originally, controlled which of the Unicode confusable data |
606 |
+- * tables to use. |
607 |
+- * @param id The input identifier whose skeleton will be computed. |
608 |
+- * @param dest The output identifier, to receive the skeleton string. |
609 |
+- * @param status The error code, set if an error occurred while attempting to |
610 |
+- * perform the check. |
611 |
+- * @return A reference to the destination (skeleton) string. |
612 |
+- * |
613 |
+- * @stable ICU 4.2 |
614 |
+- */ |
615 |
+-U_I18N_API icu::UnicodeString & U_EXPORT2 |
616 |
+-uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, |
617 |
+- uint32_t type, |
618 |
+- const icu::UnicodeString &id, |
619 |
+- icu::UnicodeString &dest, |
620 |
+- UErrorCode *status); |
621 |
+-#endif /* U_SHOW_CPLUSPLUS_API */ |
622 |
+- |
623 |
+ /** |
624 |
+ * Get the set of Candidate Characters for Inclusion in Identifiers, as defined |
625 |
+ * in http://unicode.org/Public/security/latest/xidmodifications.txt |
626 |
+@@ -1525,8 +1302,243 @@ uspoof_getInclusionSet(UErrorCode *status); |
627 |
+ U_STABLE const USet * U_EXPORT2 |
628 |
+ uspoof_getRecommendedSet(UErrorCode *status); |
629 |
+ |
630 |
++/** |
631 |
++ * Serialize the data for a spoof detector into a chunk of memory. |
632 |
++ * The flattened spoof detection tables can later be used to efficiently |
633 |
++ * instantiate a new Spoof Detector. |
634 |
++ * |
635 |
++ * The serialized spoof checker includes only the data compiled from the |
636 |
++ * Unicode data tables by uspoof_openFromSource(); it does not include |
637 |
++ * include any other state or configuration that may have been set. |
638 |
++ * |
639 |
++ * @param sc the Spoof Detector whose data is to be serialized. |
640 |
++ * @param data a pointer to 32-bit-aligned memory to be filled with the data, |
641 |
++ * can be NULL if capacity==0 |
642 |
++ * @param capacity the number of bytes available at data, |
643 |
++ * or 0 for preflighting |
644 |
++ * @param status an in/out ICU UErrorCode; possible errors include: |
645 |
++ * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization |
646 |
++ * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad |
647 |
++ * @return the number of bytes written or needed for the spoof data |
648 |
++ * |
649 |
++ * @see utrie2_openFromSerialized() |
650 |
++ * @stable ICU 4.2 |
651 |
++ */ |
652 |
++U_STABLE int32_t U_EXPORT2 |
653 |
++uspoof_serialize(USpoofChecker *sc, |
654 |
++ void *data, int32_t capacity, |
655 |
++ UErrorCode *status); |
656 |
++ |
657 |
++U_CDECL_END |
658 |
++ |
659 |
+ #if U_SHOW_CPLUSPLUS_API |
660 |
+ |
661 |
++U_NAMESPACE_BEGIN |
662 |
++ |
663 |
++/** |
664 |
++ * \class LocalUSpoofCheckerPointer |
665 |
++ * "Smart pointer" class, closes a USpoofChecker via uspoof_close(). |
666 |
++ * For most methods see the LocalPointerBase base class. |
667 |
++ * |
668 |
++ * @see LocalPointerBase |
669 |
++ * @see LocalPointer |
670 |
++ * @stable ICU 4.4 |
671 |
++ */ |
672 |
++/** |
673 |
++ * \cond |
674 |
++ * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER. |
675 |
++ * For now, suppress with a Doxygen cond |
676 |
++ */ |
677 |
++U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckerPointer, USpoofChecker, uspoof_close); |
678 |
++/** \endcond */ |
679 |
++ |
680 |
++/** |
681 |
++ * \class LocalUSpoofCheckResultPointer |
682 |
++ * "Smart pointer" class, closes a USpoofCheckResult via `uspoof_closeCheckResult()`. |
683 |
++ * For most methods see the LocalPointerBase base class. |
684 |
++ * |
685 |
++ * @see LocalPointerBase |
686 |
++ * @see LocalPointer |
687 |
++ * @stable ICU 58 |
688 |
++ */ |
689 |
++ |
690 |
++/** |
691 |
++ * \cond |
692 |
++ * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER. |
693 |
++ * For now, suppress with a Doxygen cond |
694 |
++ */ |
695 |
++U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closeCheckResult); |
696 |
++/** \endcond */ |
697 |
++ |
698 |
++U_NAMESPACE_END |
699 |
++ |
700 |
++/** |
701 |
++ * Limit the acceptable characters to those specified by a Unicode Set. |
702 |
++ * Any previously specified character limit is |
703 |
++ * is replaced by the new settings. This includes limits on |
704 |
++ * characters that were set with the uspoof_setAllowedLocales() function. |
705 |
++ * |
706 |
++ * The USPOOF_CHAR_LIMIT test is automatically enabled for this |
707 |
++ * USoofChecker by this function. |
708 |
++ * |
709 |
++ * @param sc The USpoofChecker |
710 |
++ * @param chars A Unicode Set containing the list of |
711 |
++ * characters that are permitted. Ownership of the set |
712 |
++ * remains with the caller. The incoming set is cloned by |
713 |
++ * this function, so there are no restrictions on modifying |
714 |
++ * or deleting the UnicodeSet after calling this function. |
715 |
++ * @param status The error code, set if this function encounters a problem. |
716 |
++ * @stable ICU 4.2 |
717 |
++ */ |
718 |
++U_STABLE void U_EXPORT2 |
719 |
++uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status); |
720 |
++ |
721 |
++ |
722 |
++/** |
723 |
++ * Get a UnicodeSet for the characters permitted in an identifier. |
724 |
++ * This corresponds to the limits imposed by the Set Allowed Characters / |
725 |
++ * UnicodeSet functions. Limitations imposed by other checks will not be |
726 |
++ * reflected in the set returned by this function. |
727 |
++ * |
728 |
++ * The returned set will be frozen, meaning that it cannot be modified |
729 |
++ * by the caller. |
730 |
++ * |
731 |
++ * Ownership of the returned set remains with the Spoof Detector. The |
732 |
++ * returned set will become invalid if the spoof detector is closed, |
733 |
++ * or if a new set of allowed characters is specified. |
734 |
++ * |
735 |
++ * |
736 |
++ * @param sc The USpoofChecker |
737 |
++ * @param status The error code, set if this function encounters a problem. |
738 |
++ * @return A UnicodeSet containing the characters that are permitted by |
739 |
++ * the USPOOF_CHAR_LIMIT test. |
740 |
++ * @stable ICU 4.2 |
741 |
++ */ |
742 |
++U_STABLE const icu::UnicodeSet * U_EXPORT2 |
743 |
++uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status); |
744 |
++ |
745 |
++/** |
746 |
++ * Check the specified string for possible security issues. |
747 |
++ * The text to be checked will typically be an identifier of some sort. |
748 |
++ * The set of checks to be performed is specified with uspoof_setChecks(). |
749 |
++ * |
750 |
++ * \note |
751 |
++ * Consider using the newer API, {@link uspoof_check2UnicodeString}, instead. |
752 |
++ * The newer API exposes additional information from the check procedure |
753 |
++ * and is otherwise identical to this method. |
754 |
++ * |
755 |
++ * @param sc The USpoofChecker |
756 |
++ * @param id A identifier to be checked for possible security issues. |
757 |
++ * @param position Deprecated in ICU 51. Always returns zero. |
758 |
++ * Originally, an out parameter for the index of the first |
759 |
++ * string position that failed a check. |
760 |
++ * This parameter may be NULL. |
761 |
++ * @param status The error code, set if an error occurred while attempting to |
762 |
++ * perform the check. |
763 |
++ * Spoofing or security issues detected with the input string are |
764 |
++ * not reported here, but through the function's return value. |
765 |
++ * @return An integer value with bits set for any potential security |
766 |
++ * or spoofing issues detected. The bits are defined by |
767 |
++ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) |
768 |
++ * will be zero if the input string passes all of the |
769 |
++ * enabled checks. |
770 |
++ * @see uspoof_check2UnicodeString |
771 |
++ * @stable ICU 4.2 |
772 |
++ */ |
773 |
++U_STABLE int32_t U_EXPORT2 |
774 |
++uspoof_checkUnicodeString(const USpoofChecker *sc, |
775 |
++ const icu::UnicodeString &id, |
776 |
++ int32_t *position, |
777 |
++ UErrorCode *status); |
778 |
++ |
779 |
++/** |
780 |
++ * Check the specified string for possible security issues. |
781 |
++ * The text to be checked will typically be an identifier of some sort. |
782 |
++ * The set of checks to be performed is specified with uspoof_setChecks(). |
783 |
++ * |
784 |
++ * @param sc The USpoofChecker |
785 |
++ * @param id A identifier to be checked for possible security issues. |
786 |
++ * @param checkResult An instance of USpoofCheckResult to be filled with |
787 |
++ * details about the identifier. Can be NULL. |
788 |
++ * @param status The error code, set if an error occurred while attempting to |
789 |
++ * perform the check. |
790 |
++ * Spoofing or security issues detected with the input string are |
791 |
++ * not reported here, but through the function's return value. |
792 |
++ * @return An integer value with bits set for any potential security |
793 |
++ * or spoofing issues detected. The bits are defined by |
794 |
++ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) |
795 |
++ * will be zero if the input string passes all of the |
796 |
++ * enabled checks. Any information in this bitmask will be |
797 |
++ * consistent with the information saved in the optional |
798 |
++ * checkResult parameter. |
799 |
++ * @see uspoof_openCheckResult |
800 |
++ * @see uspoof_check2 |
801 |
++ * @see uspoof_check2UTF8 |
802 |
++ * @stable ICU 58 |
803 |
++ */ |
804 |
++U_STABLE int32_t U_EXPORT2 |
805 |
++uspoof_check2UnicodeString(const USpoofChecker *sc, |
806 |
++ const icu::UnicodeString &id, |
807 |
++ USpoofCheckResult* checkResult, |
808 |
++ UErrorCode *status); |
809 |
++ |
810 |
++/** |
811 |
++ * A version of {@link uspoof_areConfusable} accepting UnicodeStrings. |
812 |
++ * |
813 |
++ * @param sc The USpoofChecker |
814 |
++ * @param s1 The first of the two identifiers to be compared for |
815 |
++ * confusability. The strings are in UTF-8 format. |
816 |
++ * @param s2 The second of the two identifiers to be compared for |
817 |
++ * confusability. The strings are in UTF-8 format. |
818 |
++ * @param status The error code, set if an error occurred while attempting to |
819 |
++ * perform the check. |
820 |
++ * Confusability of the identifiers is not reported here, |
821 |
++ * but through this function's return value. |
822 |
++ * @return An integer value with bit(s) set corresponding to |
823 |
++ * the type of confusability found, as defined by |
824 |
++ * enum USpoofChecks. Zero is returned if the identifiers |
825 |
++ * are not confusable. |
826 |
++ * |
827 |
++ * @stable ICU 4.2 |
828 |
++ * |
829 |
++ * @see uspoof_areConfusable |
830 |
++ */ |
831 |
++U_STABLE int32_t U_EXPORT2 |
832 |
++uspoof_areConfusableUnicodeString(const USpoofChecker *sc, |
833 |
++ const icu::UnicodeString &s1, |
834 |
++ const icu::UnicodeString &s2, |
835 |
++ UErrorCode *status); |
836 |
++ |
837 |
++/** |
838 |
++ * Get the "skeleton" for an identifier. |
839 |
++ * Skeletons are a transformation of the input identifier; |
840 |
++ * Two identifiers are confusable if their skeletons are identical. |
841 |
++ * See Unicode UAX #39 for additional information. |
842 |
++ * |
843 |
++ * Using skeletons directly makes it possible to quickly check |
844 |
++ * whether an identifier is confusable with any of some large |
845 |
++ * set of existing identifiers, by creating an efficiently |
846 |
++ * searchable collection of the skeletons. |
847 |
++ * |
848 |
++ * @param sc The USpoofChecker. |
849 |
++ * @param type Deprecated in ICU 58. You may pass any number. |
850 |
++ * Originally, controlled which of the Unicode confusable data |
851 |
++ * tables to use. |
852 |
++ * @param id The input identifier whose skeleton will be computed. |
853 |
++ * @param dest The output identifier, to receive the skeleton string. |
854 |
++ * @param status The error code, set if an error occurred while attempting to |
855 |
++ * perform the check. |
856 |
++ * @return A reference to the destination (skeleton) string. |
857 |
++ * |
858 |
++ * @stable ICU 4.2 |
859 |
++ */ |
860 |
++U_I18N_API icu::UnicodeString & U_EXPORT2 |
861 |
++uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, |
862 |
++ uint32_t type, |
863 |
++ const icu::UnicodeString &id, |
864 |
++ icu::UnicodeString &dest, |
865 |
++ UErrorCode *status); |
866 |
++ |
867 |
+ /** |
868 |
+ * Get the set of Candidate Characters for Inclusion in Identifiers, as defined |
869 |
+ * in http://unicode.org/Public/security/latest/xidmodifications.txt |
870 |
+@@ -1559,34 +1571,6 @@ uspoof_getRecommendedUnicodeSet(UErrorCode *status); |
871 |
+ |
872 |
+ #endif /* U_SHOW_CPLUSPLUS_API */ |
873 |
+ |
874 |
+-/** |
875 |
+- * Serialize the data for a spoof detector into a chunk of memory. |
876 |
+- * The flattened spoof detection tables can later be used to efficiently |
877 |
+- * instantiate a new Spoof Detector. |
878 |
+- * |
879 |
+- * The serialized spoof checker includes only the data compiled from the |
880 |
+- * Unicode data tables by uspoof_openFromSource(); it does not include |
881 |
+- * include any other state or configuration that may have been set. |
882 |
+- * |
883 |
+- * @param sc the Spoof Detector whose data is to be serialized. |
884 |
+- * @param data a pointer to 32-bit-aligned memory to be filled with the data, |
885 |
+- * can be NULL if capacity==0 |
886 |
+- * @param capacity the number of bytes available at data, |
887 |
+- * or 0 for preflighting |
888 |
+- * @param status an in/out ICU UErrorCode; possible errors include: |
889 |
+- * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization |
890 |
+- * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad |
891 |
+- * @return the number of bytes written or needed for the spoof data |
892 |
+- * |
893 |
+- * @see utrie2_openFromSerialized() |
894 |
+- * @stable ICU 4.2 |
895 |
+- */ |
896 |
+-U_STABLE int32_t U_EXPORT2 |
897 |
+-uspoof_serialize(USpoofChecker *sc, |
898 |
+- void *data, int32_t capacity, |
899 |
+- UErrorCode *status); |
900 |
+- |
901 |
+- |
902 |
+-#endif |
903 |
++#endif /* UCONFIG_NO_NORMALIZATION */ |
904 |
+ |
905 |
+ #endif /* USPOOF_H */ |
906 |
+-- |
907 |
+2.21.0 |
908 |
+ |
909 |
|
910 |
diff --git a/dev-libs/icu/icu-64.2.ebuild b/dev-libs/icu/icu-64.2.ebuild |
911 |
new file mode 100644 |
912 |
index 00000000000..456e444769e |
913 |
--- /dev/null |
914 |
+++ b/dev-libs/icu/icu-64.2.ebuild |
915 |
@@ -0,0 +1,144 @@ |
916 |
+# Copyright 1999-2019 Gentoo Authors |
917 |
+# Distributed under the terms of the GNU General Public License v2 |
918 |
+ |
919 |
+EAPI=7 |
920 |
+ |
921 |
+inherit flag-o-matic toolchain-funcs autotools multilib-minimal |
922 |
+ |
923 |
+DESCRIPTION="International Components for Unicode" |
924 |
+HOMEPAGE="http://www.icu-project.org/" |
925 |
+SRC_URI="http://download.icu-project.org/files/icu4c/${PV/_/}/icu4c-${PV//./_}-src.tgz" |
926 |
+ |
927 |
+LICENSE="BSD" |
928 |
+ |
929 |
+SLOT="0/${PV}" |
930 |
+ |
931 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" |
932 |
+IUSE="debug doc examples static-libs" |
933 |
+ |
934 |
+DEPEND=" |
935 |
+ doc? ( app-doc/doxygen[dot] ) |
936 |
+" |
937 |
+BDEPEND=" |
938 |
+ virtual/pkgconfig |
939 |
+" |
940 |
+ |
941 |
+S="${WORKDIR}/${PN}/source" |
942 |
+ |
943 |
+MULTILIB_CHOST_TOOLS=( |
944 |
+ /usr/bin/icu-config |
945 |
+) |
946 |
+ |
947 |
+PATCHES=( |
948 |
+ "${FILESDIR}/${PN}-58.1-remove-bashisms.patch" |
949 |
+ "${FILESDIR}/${PN}-64.2-darwin.patch" |
950 |
+ "${FILESDIR}/${PN}-64.1-data_archive_generation.patch" |
951 |
+) |
952 |
+ |
953 |
+src_prepare() { |
954 |
+ default |
955 |
+ eapply -p3 "${FILESDIR}/${PN}-64.2-extern_c.patch" |
956 |
+ |
957 |
+ local variable |
958 |
+ |
959 |
+ # Disable renaming as it is stupid thing to do |
960 |
+ sed -i \ |
961 |
+ -e "s/#define U_DISABLE_RENAMING 0/#define U_DISABLE_RENAMING 1/" \ |
962 |
+ common/unicode/uconfig.h || die |
963 |
+ |
964 |
+ # Fix linking of icudata |
965 |
+ sed -i \ |
966 |
+ -e "s:LDFLAGSICUDT=-nodefaultlibs -nostdlib:LDFLAGSICUDT=:" \ |
967 |
+ config/mh-linux || die |
968 |
+ |
969 |
+ # Append doxygen configuration to configure |
970 |
+ sed -i \ |
971 |
+ -e 's:icudefs.mk:icudefs.mk Doxyfile:' \ |
972 |
+ configure.ac || die |
973 |
+ |
974 |
+ eautoreconf |
975 |
+} |
976 |
+ |
977 |
+src_configure() { |
978 |
+ append-cxxflags -std=c++14 |
979 |
+ |
980 |
+ if tc-is-cross-compiler; then |
981 |
+ mkdir "${WORKDIR}"/host || die |
982 |
+ pushd "${WORKDIR}"/host >/dev/null || die |
983 |
+ |
984 |
+ CFLAGS="" CXXFLAGS="" ASFLAGS="" LDFLAGS="" \ |
985 |
+ CC="$(tc-getBUILD_CC)" CXX="$(tc-getBUILD_CXX)" AR="$(tc-getBUILD_AR)" \ |
986 |
+ RANLIB="$(tc-getBUILD_RANLIB)" LD="$(tc-getBUILD_LD)" \ |
987 |
+ "${S}"/configure --disable-renaming --disable-debug \ |
988 |
+ --disable-samples --enable-static || die |
989 |
+ emake |
990 |
+ |
991 |
+ popd >/dev/null || die |
992 |
+ fi |
993 |
+ |
994 |
+ multilib-minimal_src_configure |
995 |
+} |
996 |
+ |
997 |
+multilib_src_configure() { |
998 |
+ local myeconfargs=( |
999 |
+ --disable-renaming |
1000 |
+ --disable-samples |
1001 |
+ --disable-layoutex |
1002 |
+ $(use_enable debug) |
1003 |
+ $(use_enable static-libs static) |
1004 |
+ $(multilib_native_use_enable examples samples) |
1005 |
+ ) |
1006 |
+ |
1007 |
+ tc-is-cross-compiler && myeconfargs+=( |
1008 |
+ --with-cross-build="${WORKDIR}"/host |
1009 |
+ ) |
1010 |
+ |
1011 |
+ # icu tries to use clang by default |
1012 |
+ tc-export CC CXX |
1013 |
+ |
1014 |
+ # make sure we configure with the same shell as we run icu-config |
1015 |
+ # with, or ECHO_N, ECHO_T and ECHO_C will be wrongly defined |
1016 |
+ export CONFIG_SHELL="${EPREFIX}/bin/sh" |
1017 |
+ # probably have no /bin/sh in prefix-chain |
1018 |
+ [[ -x ${CONFIG_SHELL} ]] || CONFIG_SHELL="${BASH}" |
1019 |
+ |
1020 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
1021 |
+} |
1022 |
+ |
1023 |
+multilib_src_compile() { |
1024 |
+ default |
1025 |
+ |
1026 |
+ if multilib_is_native_abi && use doc; then |
1027 |
+ doxygen -u Doxyfile || die |
1028 |
+ doxygen Doxyfile || die |
1029 |
+ fi |
1030 |
+} |
1031 |
+ |
1032 |
+multilib_src_test() { |
1033 |
+ # INTLTEST_OPTS: intltest options |
1034 |
+ # -e: Exhaustive testing |
1035 |
+ # -l: Reporting of memory leaks |
1036 |
+ # -v: Increased verbosity |
1037 |
+ # IOTEST_OPTS: iotest options |
1038 |
+ # -e: Exhaustive testing |
1039 |
+ # -v: Increased verbosity |
1040 |
+ # CINTLTST_OPTS: cintltst options |
1041 |
+ # -e: Exhaustive testing |
1042 |
+ # -v: Increased verbosity |
1043 |
+ emake -j1 VERBOSE="1" check |
1044 |
+} |
1045 |
+ |
1046 |
+multilib_src_install() { |
1047 |
+ default |
1048 |
+ |
1049 |
+ if multilib_is_native_abi && use doc; then |
1050 |
+ docinto html |
1051 |
+ dodoc -r doc/html/* |
1052 |
+ fi |
1053 |
+} |
1054 |
+ |
1055 |
+multilib_src_install_all() { |
1056 |
+ einstalldocs |
1057 |
+ docinto html |
1058 |
+ dodoc ../readme.html |
1059 |
+} |