1 |
commit: 9f88b15ff6b650018934340b24e50d10eb15aa58 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 1 14:01:37 2016 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 1 14:02:55 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f88b15f |
7 |
|
8 |
dev-qt/qtwebengine: ensure build against system icu headers |
9 |
|
10 |
Gentoo-bug: 601264 |
11 |
|
12 |
Package-Manager: portage-2.3.2 |
13 |
|
14 |
dev-qt/qtwebengine/files/a.patch | 381 ++++++++++++++++++++++++++++ |
15 |
dev-qt/qtwebengine/files/b.patch | 49 ++++ |
16 |
dev-qt/qtwebengine/qtwebengine-5.6.2.ebuild | 5 + |
17 |
dev-qt/qtwebengine/qtwebengine-5.7.0.ebuild | 5 + |
18 |
4 files changed, 440 insertions(+) |
19 |
|
20 |
diff --git a/dev-qt/qtwebengine/files/a.patch b/dev-qt/qtwebengine/files/a.patch |
21 |
new file mode 100644 |
22 |
index 00000000..a522e8e |
23 |
--- /dev/null |
24 |
+++ b/dev-qt/qtwebengine/files/a.patch |
25 |
@@ -0,0 +1,381 @@ |
26 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/base.gypi |
27 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:01:20.875004550 +0100 |
28 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:04:12.789946122 +0100 |
29 |
+@@ -621,8 +621,6 @@ |
30 |
+ 'third_party/dmg_fp/dmg_fp.h', |
31 |
+ 'third_party/dmg_fp/dtoa_wrapper.cc', |
32 |
+ 'third_party/dmg_fp/g_fmt.cc', |
33 |
+- 'third_party/icu/icu_utf.cc', |
34 |
+- 'third_party/icu/icu_utf.h', |
35 |
+ 'third_party/superfasthash/superfasthash.c', |
36 |
+ 'third_party/xdg_mime/xdgmime.h', |
37 |
+ 'thread_task_runner_handle.cc', |
38 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn |
39 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:03:08.040591492 +0100 |
40 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:04:27.209025094 +0100 |
41 |
+@@ -504,8 +504,6 @@ |
42 |
+ "third_party/dmg_fp/dmg_fp.h", |
43 |
+ "third_party/dmg_fp/dtoa_wrapper.cc", |
44 |
+ "third_party/dmg_fp/g_fmt.cc", |
45 |
+- "third_party/icu/icu_utf.cc", |
46 |
+- "third_party/icu/icu_utf.h", |
47 |
+ "third_party/superfasthash/superfasthash.c", |
48 |
+ "thread_task_runner_handle.cc", |
49 |
+ "thread_task_runner_handle.h", |
50 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc |
51 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2015-12-10 18:17:21.000000000 +0100 |
52 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2016-01-12 03:09:08.430565334 +0100 |
53 |
+@@ -20,7 +20,7 @@ |
54 |
+ |
55 |
+ #if defined(OS_MACOSX) |
56 |
+ #include "base/mac/scoped_cftyperef.h" |
57 |
+-#include "base/third_party/icu/icu_utf.h" |
58 |
++#include <unicode/utf.h> |
59 |
+ #endif |
60 |
+ |
61 |
+ #if defined(OS_WIN) |
62 |
+@@ -1140,9 +1140,9 @@ |
63 |
+ int* index) { |
64 |
+ int codepoint = 0; |
65 |
+ while (*index < length && codepoint == 0) { |
66 |
+- // CBU8_NEXT returns a value < 0 in error cases. For purposes of string |
67 |
++ // U8_NEXT returns a value < 0 in error cases. For purposes of string |
68 |
+ // comparison, we just use that value and flag it with DCHECK. |
69 |
+- CBU8_NEXT(string, *index, length, codepoint); |
70 |
++ U8_NEXT(string, *index, length, codepoint); |
71 |
+ DCHECK_GT(codepoint, 0); |
72 |
+ if (codepoint > 0) { |
73 |
+ // Check if there is a subtable for this upper byte. |
74 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc |
75 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2015-12-10 18:17:21.000000000 +0100 |
76 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2016-01-12 03:12:23.701634827 +0100 |
77 |
+@@ -14,7 +14,7 @@ |
78 |
+ #include "base/strings/stringprintf.h" |
79 |
+ #include "base/strings/utf_string_conversion_utils.h" |
80 |
+ #include "base/strings/utf_string_conversions.h" |
81 |
+-#include "base/third_party/icu/icu_utf.h" |
82 |
++#include <unicode/utf.h> |
83 |
+ #include "base/values.h" |
84 |
+ |
85 |
+ namespace base { |
86 |
+@@ -616,8 +616,8 @@ |
87 |
+ int32 next_char = 0; |
88 |
+ |
89 |
+ while (CanConsume(1)) { |
90 |
+- pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. |
91 |
+- CBU8_NEXT(start_pos_, index_, length, next_char); |
92 |
++ pos_ = start_pos_ + index_; // U8_NEXT is postcrement. |
93 |
++ U8_NEXT(start_pos_, index_, length, next_char); |
94 |
+ if (next_char < 0 || !IsValidCharacter(next_char)) { |
95 |
+ ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); |
96 |
+ return false; |
97 |
+@@ -710,7 +710,7 @@ |
98 |
+ return false; |
99 |
+ } |
100 |
+ } else if (next_char == '"') { |
101 |
+- --index_; // Rewind by one because of CBU8_NEXT. |
102 |
++ --index_; // Rewind by one because of U8_NEXT. |
103 |
+ out->Swap(&string); |
104 |
+ return true; |
105 |
+ } else { |
106 |
+@@ -750,10 +750,10 @@ |
107 |
+ |
108 |
+ // If this is a high surrogate, consume the next code unit to get the |
109 |
+ // low surrogate. |
110 |
+- if (CBU16_IS_SURROGATE(code_unit16_high)) { |
111 |
++ if (U16_IS_SURROGATE(code_unit16_high)) { |
112 |
+ // Make sure this is the high surrogate. If not, it's an encoding |
113 |
+ // error. |
114 |
+- if (!CBU16_IS_SURROGATE_LEAD(code_unit16_high)) |
115 |
++ if (!U16_IS_SURROGATE_LEAD(code_unit16_high)) |
116 |
+ return false; |
117 |
+ |
118 |
+ // Make sure that the token has more characters to consume the |
119 |
+@@ -770,24 +770,24 @@ |
120 |
+ |
121 |
+ NextNChars(3); |
122 |
+ |
123 |
+- if (!CBU16_IS_TRAIL(code_unit16_low)) { |
124 |
++ if (!U16_IS_TRAIL(code_unit16_low)) { |
125 |
+ return false; |
126 |
+ } |
127 |
+ |
128 |
+- uint32 code_point = CBU16_GET_SUPPLEMENTARY(code_unit16_high, |
129 |
+- code_unit16_low); |
130 |
++ uint32 code_point = U16_GET_SUPPLEMENTARY(code_unit16_high, |
131 |
++ code_unit16_low); |
132 |
+ if (!IsValidCharacter(code_point)) |
133 |
+ return false; |
134 |
+ |
135 |
+ offset = 0; |
136 |
+- CBU8_APPEND_UNSAFE(code_unit8, offset, code_point); |
137 |
++ U8_APPEND_UNSAFE(code_unit8, offset, code_point); |
138 |
+ } else { |
139 |
+ // Not a surrogate. |
140 |
+- DCHECK(CBU16_IS_SINGLE(code_unit16_high)); |
141 |
++ DCHECK(U16_IS_SINGLE(code_unit16_high)); |
142 |
+ if (!IsValidCharacter(code_unit16_high)) |
143 |
+ return false; |
144 |
+ |
145 |
+- CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); |
146 |
++ U8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); |
147 |
+ } |
148 |
+ |
149 |
+ dest_string->append(code_unit8); |
150 |
+@@ -804,9 +804,9 @@ |
151 |
+ } else { |
152 |
+ char utf8_units[4] = { 0 }; |
153 |
+ int offset = 0; |
154 |
+- CBU8_APPEND_UNSAFE(utf8_units, offset, point); |
155 |
++ U8_APPEND_UNSAFE(utf8_units, offset, point); |
156 |
+ dest->Convert(); |
157 |
+- // CBU8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be |
158 |
++ // U8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be |
159 |
+ // zero terminated at this point. |offset| contains the correct length. |
160 |
+ dest->AppendString(std::string(utf8_units, offset)); |
161 |
+ } |
162 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc |
163 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2015-12-10 18:17:21.000000000 +0100 |
164 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2016-01-12 03:12:46.093757468 +0100 |
165 |
+@@ -10,7 +10,7 @@ |
166 |
+ #include "base/strings/stringprintf.h" |
167 |
+ #include "base/strings/utf_string_conversion_utils.h" |
168 |
+ #include "base/strings/utf_string_conversions.h" |
169 |
+-#include "base/third_party/icu/icu_utf.h" |
170 |
++#include <unicode/utf.h> |
171 |
+ |
172 |
+ namespace base { |
173 |
+ |
174 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc |
175 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2015-12-10 18:17:21.000000000 +0100 |
176 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2016-01-12 03:14:17.884254687 +0100 |
177 |
+@@ -4,13 +4,13 @@ |
178 |
+ |
179 |
+ #include "base/strings/pattern.h" |
180 |
+ |
181 |
+-#include "base/third_party/icu/icu_utf.h" |
182 |
++#include <unicode/utf.h> |
183 |
+ |
184 |
+ namespace base { |
185 |
+ |
186 |
+ namespace { |
187 |
+ |
188 |
+-static bool IsWildcard(base_icu::UChar32 character) { |
189 |
++static bool IsWildcard(UChar32 character) { |
190 |
+ return character == '*' || character == '?'; |
191 |
+ } |
192 |
+ |
193 |
+@@ -37,9 +37,9 @@ |
194 |
+ // Check if the chars match, if so, increment the ptrs. |
195 |
+ const CHAR* pattern_next = *pattern; |
196 |
+ const CHAR* string_next = *string; |
197 |
+- base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); |
198 |
++ UChar32 pattern_char = next(&pattern_next, pattern_end); |
199 |
+ if (pattern_char == next(&string_next, string_end) && |
200 |
+- pattern_char != CBU_SENTINEL) { |
201 |
++ pattern_char != U_SENTINEL) { |
202 |
+ *pattern = pattern_next; |
203 |
+ *string = string_next; |
204 |
+ } else { |
205 |
+@@ -133,20 +133,20 @@ |
206 |
+ } |
207 |
+ |
208 |
+ struct NextCharUTF8 { |
209 |
+- base_icu::UChar32 operator()(const char** p, const char* end) { |
210 |
+- base_icu::UChar32 c; |
211 |
++ UChar32 operator()(const char** p, const char* end) { |
212 |
++ UChar32 c; |
213 |
+ int offset = 0; |
214 |
+- CBU8_NEXT(*p, offset, end - *p, c); |
215 |
++ U8_NEXT(*p, offset, end - *p, c); |
216 |
+ *p += offset; |
217 |
+ return c; |
218 |
+ } |
219 |
+ }; |
220 |
+ |
221 |
+ struct NextCharUTF16 { |
222 |
+- base_icu::UChar32 operator()(const char16** p, const char16* end) { |
223 |
+- base_icu::UChar32 c; |
224 |
++ UChar32 operator()(const char16** p, const char16* end) { |
225 |
++ UChar32 c; |
226 |
+ int offset = 0; |
227 |
+- CBU16_NEXT(*p, offset, end - *p, c); |
228 |
++ U16_NEXT(*p, offset, end - *p, c); |
229 |
+ *p += offset; |
230 |
+ return c; |
231 |
+ } |
232 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc |
233 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2015-12-10 18:17:21.000000000 +0100 |
234 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2016-01-12 03:14:39.106365912 +0100 |
235 |
+@@ -6,7 +6,7 @@ |
236 |
+ |
237 |
+ #include "base/logging.h" |
238 |
+ #include "base/strings/string_util.h" |
239 |
+-#include "base/third_party/icu/icu_utf.h" |
240 |
++#include <unicode/utf.h> |
241 |
+ |
242 |
+ namespace base { |
243 |
+ |
244 |
+@@ -201,7 +201,7 @@ |
245 |
+ void SplitString(const string16& str, |
246 |
+ char16 c, |
247 |
+ std::vector<string16>* result) { |
248 |
+- DCHECK(CBU16_IS_SINGLE(c)); |
249 |
++ DCHECK(U16_IS_SINGLE(c)); |
250 |
+ *result = SplitStringT<string16, string16, char16>( |
251 |
+ str, c, TRIM_WHITESPACE, SPLIT_WANT_ALL); |
252 |
+ |
253 |
+@@ -274,7 +274,7 @@ |
254 |
+ void SplitStringDontTrim(StringPiece16 str, |
255 |
+ char16 c, |
256 |
+ std::vector<string16>* result) { |
257 |
+- DCHECK(CBU16_IS_SINGLE(c)); |
258 |
++ DCHECK(U16_IS_SINGLE(c)); |
259 |
+ *result = SplitStringT<string16, string16, char16>( |
260 |
+ str, c, KEEP_WHITESPACE, SPLIT_WANT_ALL); |
261 |
+ } |
262 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc |
263 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2015-12-10 18:17:21.000000000 +0100 |
264 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2016-01-12 03:15:00.981480560 +0100 |
265 |
+@@ -24,7 +24,7 @@ |
266 |
+ #include "base/strings/string_split.h" |
267 |
+ #include "base/strings/utf_string_conversion_utils.h" |
268 |
+ #include "base/strings/utf_string_conversions.h" |
269 |
+-#include "base/third_party/icu/icu_utf.h" |
270 |
++#include <unicode/utf.h> |
271 |
+ #include "build/build_config.h" |
272 |
+ |
273 |
+ // Remove when this entire file is in the base namespace. |
274 |
+@@ -274,19 +274,19 @@ |
275 |
+ return; |
276 |
+ } |
277 |
+ DCHECK_LE(byte_size, static_cast<uint32>(kint32max)); |
278 |
+- // Note: This cast is necessary because CBU8_NEXT uses int32s. |
279 |
++ // Note: This cast is necessary because U8_NEXT uses int32s. |
280 |
+ int32 truncation_length = static_cast<int32>(byte_size); |
281 |
+ int32 char_index = truncation_length - 1; |
282 |
+ const char* data = input.data(); |
283 |
+ |
284 |
+- // Using CBU8, we will move backwards from the truncation point |
285 |
++ // Using U8, we will move backwards from the truncation point |
286 |
+ // to the beginning of the string looking for a valid UTF8 |
287 |
+ // character. Once a full UTF8 character is found, we will |
288 |
+ // truncate the string to the end of that character. |
289 |
+ while (char_index >= 0) { |
290 |
+ int32 prev = char_index; |
291 |
+- base_icu::UChar32 code_point = 0; |
292 |
+- CBU8_NEXT(data, char_index, truncation_length, code_point); |
293 |
++ UChar32 code_point = 0; |
294 |
++ U8_NEXT(data, char_index, truncation_length, code_point); |
295 |
+ if (!IsValidCharacter(code_point) || |
296 |
+ !IsValidCodepoint(code_point)) { |
297 |
+ char_index = prev - 1; |
298 |
+@@ -447,7 +447,7 @@ |
299 |
+ |
300 |
+ while (char_index < src_len) { |
301 |
+ int32 code_point; |
302 |
+- CBU8_NEXT(src, char_index, src_len, code_point); |
303 |
++ U8_NEXT(src, char_index, src_len, code_point); |
304 |
+ if (!IsValidCharacter(code_point)) |
305 |
+ return false; |
306 |
+ } |
307 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc |
308 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2015-12-10 18:17:21.000000000 +0100 |
309 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2016-01-12 03:15:27.384618939 +0100 |
310 |
+@@ -4,7 +4,7 @@ |
311 |
+ |
312 |
+ #include "base/strings/utf_string_conversion_utils.h" |
313 |
+ |
314 |
+-#include "base/third_party/icu/icu_utf.h" |
315 |
++#include <unicode/utf.h> |
316 |
+ |
317 |
+ namespace base { |
318 |
+ |
319 |
+@@ -18,7 +18,7 @@ |
320 |
+ // use a signed type for code_point. But this function returns false |
321 |
+ // on error anyway, so code_point_out is unsigned. |
322 |
+ int32 code_point; |
323 |
+- CBU8_NEXT(src, *char_index, src_len, code_point); |
324 |
++ U8_NEXT(src, *char_index, src_len, code_point); |
325 |
+ *code_point_out = static_cast<uint32>(code_point); |
326 |
+ |
327 |
+ // The ICU macro above moves to the next char, we want to point to the last |
328 |
+@@ -33,16 +33,16 @@ |
329 |
+ int32 src_len, |
330 |
+ int32* char_index, |
331 |
+ uint32* code_point) { |
332 |
+- if (CBU16_IS_SURROGATE(src[*char_index])) { |
333 |
+- if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || |
334 |
++ if (U16_IS_SURROGATE(src[*char_index])) { |
335 |
++ if (!U16_IS_SURROGATE_LEAD(src[*char_index]) || |
336 |
+ *char_index + 1 >= src_len || |
337 |
+- !CBU16_IS_TRAIL(src[*char_index + 1])) { |
338 |
++ !U16_IS_TRAIL(src[*char_index + 1])) { |
339 |
+ // Invalid surrogate pair. |
340 |
+ return false; |
341 |
+ } |
342 |
+ |
343 |
+ // Valid surrogate pair. |
344 |
+- *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index], |
345 |
++ *code_point = U16_GET_SUPPLEMENTARY(src[*char_index], |
346 |
+ src[*char_index + 1]); |
347 |
+ (*char_index)++; |
348 |
+ } else { |
349 |
+@@ -76,30 +76,30 @@ |
350 |
+ } |
351 |
+ |
352 |
+ |
353 |
+- // CBU8_APPEND_UNSAFE can append up to 4 bytes. |
354 |
++ // U8_APPEND_UNSAFE can append up to 4 bytes. |
355 |
+ size_t char_offset = output->length(); |
356 |
+ size_t original_char_offset = char_offset; |
357 |
+- output->resize(char_offset + CBU8_MAX_LENGTH); |
358 |
++ output->resize(char_offset + U8_MAX_LENGTH); |
359 |
+ |
360 |
+- CBU8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); |
361 |
++ U8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); |
362 |
+ |
363 |
+- // CBU8_APPEND_UNSAFE will advance our pointer past the inserted character, so |
364 |
++ // U8_APPEND_UNSAFE will advance our pointer past the inserted character, so |
365 |
+ // it will represent the new length of the string. |
366 |
+ output->resize(char_offset); |
367 |
+ return char_offset - original_char_offset; |
368 |
+ } |
369 |
+ |
370 |
+ size_t WriteUnicodeCharacter(uint32 code_point, string16* output) { |
371 |
+- if (CBU16_LENGTH(code_point) == 1) { |
372 |
++ if (U16_LENGTH(code_point) == 1) { |
373 |
+ // Thie code point is in the Basic Multilingual Plane (BMP). |
374 |
+ output->push_back(static_cast<char16>(code_point)); |
375 |
+ return 1; |
376 |
+ } |
377 |
+ // Non-BMP characters use a double-character encoding. |
378 |
+ size_t char_offset = output->length(); |
379 |
+- output->resize(char_offset + CBU16_MAX_LENGTH); |
380 |
+- CBU16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); |
381 |
+- return CBU16_MAX_LENGTH; |
382 |
++ output->resize(char_offset + U16_MAX_LENGTH); |
383 |
++ U16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); |
384 |
++ return U16_MAX_LENGTH; |
385 |
+ } |
386 |
+ |
387 |
+ // Generalized Unicode converter ----------------------------------------------- |
388 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc |
389 |
+--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2015-12-10 18:17:21.000000000 +0100 |
390 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2016-01-12 03:15:51.205743785 +0100 |
391 |
+@@ -5,13 +5,13 @@ |
392 |
+ #include "ui/gfx/utf16_indexing.h" |
393 |
+ |
394 |
+ #include "base/logging.h" |
395 |
+-#include "base/third_party/icu/icu_utf.h" |
396 |
++#include <unicode/utf.h> |
397 |
+ |
398 |
+ namespace gfx { |
399 |
+ |
400 |
+ bool IsValidCodePointIndex(const base::string16& s, size_t index) { |
401 |
+ return index == 0 || index == s.length() || |
402 |
+- !(CBU16_IS_TRAIL(s[index]) && CBU16_IS_LEAD(s[index - 1])); |
403 |
++ !(U16_IS_TRAIL(s[index]) && U16_IS_LEAD(s[index - 1])); |
404 |
+ } |
405 |
+ |
406 |
+ ptrdiff_t UTF16IndexToOffset(const base::string16& s, size_t base, size_t pos) { |
407 |
|
408 |
diff --git a/dev-qt/qtwebengine/files/b.patch b/dev-qt/qtwebengine/files/b.patch |
409 |
new file mode 100644 |
410 |
index 00000000..dffa81e |
411 |
--- /dev/null |
412 |
+++ b/dev-qt/qtwebengine/files/b.patch |
413 |
@@ -0,0 +1,49 @@ |
414 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi |
415 |
+--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/base.gypi 2015-12-10 18:17:21.000000000 +0100 |
416 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:01:20.875004550 +0100 |
417 |
+@@ -623,8 +623,6 @@ |
418 |
+ 'third_party/dmg_fp/g_fmt.cc', |
419 |
+ 'third_party/icu/icu_utf.cc', |
420 |
+ 'third_party/icu/icu_utf.h', |
421 |
+- 'third_party/nspr/prtime.cc', |
422 |
+- 'third_party/nspr/prtime.h', |
423 |
+ 'third_party/superfasthash/superfasthash.c', |
424 |
+ 'third_party/xdg_mime/xdgmime.h', |
425 |
+ 'thread_task_runner_handle.cc', |
426 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn |
427 |
+--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 |
428 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:03:08.040591492 +0100 |
429 |
+@@ -506,8 +506,6 @@ |
430 |
+ "third_party/dmg_fp/g_fmt.cc", |
431 |
+ "third_party/icu/icu_utf.cc", |
432 |
+ "third_party/icu/icu_utf.h", |
433 |
+- "third_party/nspr/prtime.cc", |
434 |
+- "third_party/nspr/prtime.h", |
435 |
+ "third_party/superfasthash/superfasthash.c", |
436 |
+ "thread_task_runner_handle.cc", |
437 |
+ "thread_task_runner_handle.h", |
438 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc |
439 |
+--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2015-12-10 18:17:21.000000000 +0100 |
440 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2016-01-12 03:01:20.876004555 +0100 |
441 |
+@@ -6,7 +6,7 @@ |
442 |
+ #include <time.h> |
443 |
+ |
444 |
+ #include "base/compiler_specific.h" |
445 |
+-#include "base/third_party/nspr/prtime.h" |
446 |
++#include <nspr4/prtime.h> |
447 |
+ #include "base/time/time.h" |
448 |
+ #include "testing/gtest/include/gtest/gtest.h" |
449 |
+ |
450 |
+diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc |
451 |
+--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/time.cc 2015-12-10 18:17:21.000000000 +0100 |
452 |
++++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2016-01-12 03:01:20.877004561 +0100 |
453 |
+@@ -13,7 +13,8 @@ |
454 |
+ #include "base/lazy_instance.h" |
455 |
+ #include "base/logging.h" |
456 |
+ #include "base/strings/stringprintf.h" |
457 |
+-#include "base/third_party/nspr/prtime.h" |
458 |
++ |
459 |
++#include <nspr4/prtime.h> |
460 |
+ |
461 |
+ namespace base { |
462 |
+ |
463 |
|
464 |
diff --git a/dev-qt/qtwebengine/qtwebengine-5.6.2.ebuild b/dev-qt/qtwebengine/qtwebengine-5.6.2.ebuild |
465 |
index 4d718ad..38e8525 100644 |
466 |
--- a/dev-qt/qtwebengine/qtwebengine-5.6.2.ebuild |
467 |
+++ b/dev-qt/qtwebengine/qtwebengine-5.6.2.ebuild |
468 |
@@ -71,6 +71,11 @@ DEPEND="${RDEPEND} |
469 |
" |
470 |
|
471 |
src_prepare() { |
472 |
+ if use system-icu; then |
473 |
+ # ensuire build against system headers - bug #601264 |
474 |
+ rm -r src/3rdparty/chromium/third_party/icu/source || die |
475 |
+ fi |
476 |
+ |
477 |
qt_use_disable_mod geolocation positioning \ |
478 |
src/core/core_common.pri \ |
479 |
src/core/core_gyp_generator.pro |
480 |
|
481 |
diff --git a/dev-qt/qtwebengine/qtwebengine-5.7.0.ebuild b/dev-qt/qtwebengine/qtwebengine-5.7.0.ebuild |
482 |
index cdebff6..cf5d640 100644 |
483 |
--- a/dev-qt/qtwebengine/qtwebengine-5.7.0.ebuild |
484 |
+++ b/dev-qt/qtwebengine/qtwebengine-5.7.0.ebuild |
485 |
@@ -71,6 +71,11 @@ DEPEND="${RDEPEND} |
486 |
" |
487 |
|
488 |
src_prepare() { |
489 |
+ if use system-icu; then |
490 |
+ # ensuire build against system headers - bug #601264 |
491 |
+ rm -r src/3rdparty/chromium/third_party/icu/source || die |
492 |
+ fi |
493 |
+ |
494 |
qt_use_disable_mod geolocation positioning \ |
495 |
src/core/core_common.pri \ |
496 |
src/core/core_gyp_generator.pro |