1 |
commit: 7530970e4e7a71404b857e654221360fb45dcfc3 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 26 13:35:44 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 30 10:23:49 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=7530970e |
7 |
|
8 |
dev-qt/qtwebengine: Add V8-ICU-68 runtime fix |
9 |
|
10 |
(sync with Gentoo ebuild repository) |
11 |
|
12 |
Thanks-to: Stephan Hartmann <sultan <AT> gentoo.org> |
13 |
Package-Manager: Portage-3.0.15, Repoman-3.0.2 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
...ine-5.15.2_p20210224-chromium-87-v8-icu68.patch | 192 +++++++++++++++++++++ |
17 |
dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild | 3 +- |
18 |
2 files changed, 194 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch |
21 |
new file mode 100644 |
22 |
index 00000000..a6856975 |
23 |
--- /dev/null |
24 |
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch |
25 |
@@ -0,0 +1,192 @@ |
26 |
+From b0a7f5691113534c2cf771f2dd3cece5e93bc7d4 Mon Sep 17 00:00:00 2001 |
27 |
+From: Frank Tang <ftang@××××××××.org> |
28 |
+Date: Tue, 03 Nov 2020 23:20:37 -0800 |
29 |
+Subject: [PATCH] Update to ICU68-1 |
30 |
+ |
31 |
+ICU68-1 change the output skeleton format. So we need to change |
32 |
+resolvedOptions code for 68 migration. |
33 |
+ |
34 |
+Chromium roll |
35 |
+https://chromium-review.googlesource.com/c/chromium/src/+/2474093 |
36 |
+ |
37 |
+Bug: v8:10945 |
38 |
+Change-Id: I3b2c7fbe8abb22df8fa51287c498ca3245b8c55b |
39 |
+Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2477431 |
40 |
+Commit-Queue: Frank Tang <ftang@××××××××.org> |
41 |
+Reviewed-by: Jakob Kummerow <jkummerow@××××××××.org> |
42 |
+Reviewed-by: Shu-yu Guo <syg@××××××××.org> |
43 |
+Cr-Commit-Position: refs/heads/master@{#70972} |
44 |
+ |
45 |
+(ported to work with <ICU-68.1 and rebased chromium) |
46 |
+--- |
47 |
+ |
48 |
+diff --git a/src/3rdparty/chromium/v8/src/objects/js-number-format.cc b/src/3rdparty/chromium/v8/src/objects/js-number-format.cc |
49 |
+index 45b0eab..d18b133 100644 |
50 |
+--- a/src/3rdparty/chromium/v8/src/objects/js-number-format.cc |
51 |
++++ b/src/3rdparty/chromium/v8/src/objects/js-number-format.cc |
52 |
+@@ -389,17 +389,20 @@ Handle<String> CurrencySignString(Isolate* isolate, |
53 |
+ Handle<String> UnitDisplayString(Isolate* isolate, |
54 |
+ const icu::UnicodeString& skeleton) { |
55 |
+ // Ex: skeleton as |
56 |
+- // "measure-unit/length-meter .### rounding-mode-half-up unit-width-full-name" |
57 |
++ // <ICU-68.1: "measure-unit/length-meter .### rounding-mode-half-up unit-width-full-name". |
58 |
++ // >=ICU-68.1: "unit/length-meter .### rounding-mode-half-up unit-width-full-name" |
59 |
+ if (skeleton.indexOf("unit-width-full-name") >= 0) { |
60 |
+ return ReadOnlyRoots(isolate).long_string_handle(); |
61 |
+ } |
62 |
+ // Ex: skeleton as |
63 |
+- // "measure-unit/length-meter .### rounding-mode-half-up unit-width-narrow". |
64 |
++ // <ICU-68.1: "measure-unit/length-meter .### rounding-mode-half-up unit-width-narrow". |
65 |
++ // >=ICU-68.1: "unit/length-meter .### rounding-mode-half-up unit-width-narrow". |
66 |
+ if (skeleton.indexOf("unit-width-narrow") >= 0) { |
67 |
+ return ReadOnlyRoots(isolate).narrow_string_handle(); |
68 |
+ } |
69 |
+ // Ex: skeleton as |
70 |
+- // "measure-unit/length-foot .### rounding-mode-half-up" |
71 |
++ // <ICU-68.1: "measure-unit/length-foot .### rounding-mode-half-up" |
72 |
++ // >=ICU-68.1: "unit/length-foot .### rounding-mode-half-up" |
73 |
+ return ReadOnlyRoots(isolate).short_string_handle(); |
74 |
+ } |
75 |
+ |
76 |
+@@ -422,7 +425,8 @@ Notation NotationFromSkeleton(const icu::UnicodeString& skeleton) { |
77 |
+ return Notation::COMPACT; |
78 |
+ } |
79 |
+ // Ex: skeleton as |
80 |
+- // "measure-unit/length-foot .### rounding-mode-half-up" |
81 |
++ // <ICU-68.1: "measure-unit/length-foot .### rounding-mode-half-up" |
82 |
++ // >=ICU-68.1: "unit/length-foot .### rounding-mode-half-up" |
83 |
+ return Notation::STANDARD; |
84 |
+ } |
85 |
+ |
86 |
+@@ -562,14 +566,23 @@ namespace { |
87 |
+ |
88 |
+ // Ex: percent .### rounding-mode-half-up |
89 |
+ // Special case for "percent" |
90 |
+-// Ex: "measure-unit/length-kilometer per-measure-unit/duration-hour .### |
91 |
+-// rounding-mode-half-up" should return "kilometer-per-unit". |
92 |
+-// Ex: "measure-unit/duration-year .### rounding-mode-half-up" should return |
93 |
+-// "year". |
94 |
++// <ICU-68.1: |
95 |
++// Ex: "measure-unit/length-kilometer per-measure-unit/duration-hour .### |
96 |
++// rounding-mode-half-up" should return "kilometer-per-unit". |
97 |
++// Ex: "measure-unit/duration-year .### rounding-mode-half-up" should return |
98 |
++// >=ICU-68.1: |
99 |
++// Ex: "unit/milliliter-per-acre .### rounding-mode-half-up" |
100 |
++// should return "milliliter-per-acre". |
101 |
++// Ex: "unit/year .### rounding-mode-half-up" should return |
102 |
++// "year". |
103 |
+ std::string UnitFromSkeleton(const icu::UnicodeString& skeleton) { |
104 |
+ std::string str; |
105 |
+ str = skeleton.toUTF8String<std::string>(str); |
106 |
++#if U_ICU_VERSION_MAJOR_NUM < 68 |
107 |
+ std::string search("measure-unit/"); |
108 |
++#else |
109 |
++ std::string search("unit/"); |
110 |
++#endif |
111 |
+ size_t begin = str.find(search); |
112 |
+ if (begin == str.npos) { |
113 |
+ // Special case for "percent". |
114 |
+@@ -578,20 +591,41 @@ std::string UnitFromSkeleton(const icu::UnicodeString& skeleton) { |
115 |
+ } |
116 |
+ return ""; |
117 |
+ } |
118 |
++#if U_ICU_VERSION_MAJOR_NUM < 68 |
119 |
+ // Skip the type (ex: "length"). |
120 |
+ // "measure-unit/length-kilometer per-measure-unit/duration-hour" |
121 |
+ // b |
122 |
+ begin = str.find("-", begin + search.size()); |
123 |
++#else |
124 |
++ // Ex: |
125 |
++ // "unit/acre .### rounding-mode-half-up" |
126 |
++ // b |
127 |
++ // Ex: |
128 |
++ // "unit/milliliter-per-acre .### rounding-mode-half-up" |
129 |
++ // b |
130 |
++ begin += search.size(); |
131 |
++#endif |
132 |
+ if (begin == str.npos) { |
133 |
+ return ""; |
134 |
+ } |
135 |
++#if U_ICU_VERSION_MAJOR_NUM < 68 |
136 |
+ begin++; // Skip the '-'. |
137 |
++#endif |
138 |
+ // Find the end of the subtype. |
139 |
+ size_t end = str.find(" ", begin); |
140 |
+- // "measure-unit/length-kilometer per-measure-unit/duration-hour" |
141 |
+- // b e |
142 |
++ // <ICU-68.1: |
143 |
++ // "measure-unit/length-kilometer per-measure-unit/duration-hour" |
144 |
++ // b e |
145 |
++ // >=ICU-68.1: |
146 |
++ // Ex: |
147 |
++ // "unit/acre .### rounding-mode-half-up" |
148 |
++ // b e |
149 |
++ // Ex: |
150 |
++ // "unit/milliliter-per-acre .### rounding-mode-half-up" |
151 |
++ // b e |
152 |
+ if (end == str.npos) { |
153 |
+ end = str.size(); |
154 |
++#if U_ICU_VERSION_MAJOR_NUM < 68 |
155 |
+ return str.substr(begin, end - begin); |
156 |
+ } |
157 |
+ // "measure-unit/length-kilometer per-measure-unit/duration-hour" |
158 |
+@@ -625,17 +659,36 @@ std::string UnitFromSkeleton(const icu::UnicodeString& skeleton) { |
159 |
+ // "measure-unit/length-kilometer per-measure-unit/duration-hour" |
160 |
+ // [result ] b e |
161 |
+ return result + "-per-" + str.substr(begin, end - begin); |
162 |
++#else |
163 |
++ } |
164 |
++ return str.substr(begin, end - begin); |
165 |
++#endif |
166 |
+ } |
167 |
+ |
168 |
+ Style StyleFromSkeleton(const icu::UnicodeString& skeleton) { |
169 |
+ if (skeleton.indexOf("currency/") >= 0) { |
170 |
+ return Style::CURRENCY; |
171 |
+ } |
172 |
++#if U_ICU_VERSION_MAJOR_NUM < 68 |
173 |
+ if (skeleton.indexOf("measure-unit/") >= 0) { |
174 |
+ if (skeleton.indexOf("scale/100") >= 0 && |
175 |
+ skeleton.indexOf("measure-unit/concentr-percent") >= 0) { |
176 |
++#else |
177 |
++ if (skeleton.indexOf("percent") >= 0) { |
178 |
++ // percent precision-integer rounding-mode-half-up scale/100 |
179 |
++ if (skeleton.indexOf("scale/100") >= 0) { |
180 |
++#endif |
181 |
+ return Style::PERCENT; |
182 |
++#if U_ICU_VERSION_MAJOR_NUM >= 68 |
183 |
++ } else { |
184 |
++ return Style::UNIT; |
185 |
++#endif |
186 |
+ } |
187 |
++#if U_ICU_VERSION_MAJOR_NUM >= 68 |
188 |
++ } |
189 |
++ // Before ICU68: "measure-unit/", since ICU68 "unit/" |
190 |
++ if (skeleton.indexOf("unit/") >= 0) { |
191 |
++#endif |
192 |
+ return Style::UNIT; |
193 |
+ } |
194 |
+ return Style::DECIMAL; |
195 |
+diff --git a/src/3rdparty/chromium/v8/src/objects/js-relative-time-format.cc b/src/3rdparty/chromium/v8/src/objects/js-relative-time-format.cc |
196 |
+index 267343aaae..64d56a1c12 100644 |
197 |
+--- a/src/3rdparty/chromium/v8/src/objects/js-relative-time-format.cc |
198 |
++++ b/src/3rdparty/chromium/v8/src/objects/js-relative-time-format.cc |
199 |
+@@ -195,9 +195,18 @@ MaybeHandle<JSRelativeTimeFormat> JSRelativeTimeFormat::New( |
200 |
+ } |
201 |
+ } |
202 |
+ |
203 |
++#if U_ICU_VERSION_MAJOR_NUM < 68 |
204 |
+ icu::DecimalFormat* decimal_format = |
205 |
+ static_cast<icu::DecimalFormat*>(number_format); |
206 |
+ decimal_format->setMinimumGroupingDigits(-2); |
207 |
++#else |
208 |
++ if (number_format->getDynamicClassID() == |
209 |
++ icu::DecimalFormat::getStaticClassID()) { |
210 |
++ icu::DecimalFormat* decimal_format = |
211 |
++ static_cast<icu::DecimalFormat*>(number_format); |
212 |
++ decimal_format->setMinimumGroupingDigits(-2); |
213 |
++ } |
214 |
++#endif |
215 |
+ |
216 |
+ // Change UDISPCTX_CAPITALIZATION_NONE to other values if |
217 |
+ // ECMA402 later include option to change capitalization. |
218 |
|
219 |
diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild |
220 |
index c81a1a6b..57d3478d 100644 |
221 |
--- a/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild |
222 |
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild |
223 |
@@ -99,7 +99,8 @@ BDEPEND="${PYTHON_DEPS} |
224 |
" |
225 |
|
226 |
PATCHES=( |
227 |
- "${FILESDIR}/${PN}-5.15.0-disable-fatal-warnings.patch" # bug 695446 |
228 |
+ "${FILESDIR}/${PN}-5.15.0-disable-fatal-warnings.patch" # downstream, bug 695446 |
229 |
+ "${FILESDIR}/${PN}-5.15.2_p20210224-chromium-87-v8-icu68.patch" # downstream, bug 757606 |
230 |
"${FILESDIR}/${PN}-5.15.2_p20210224-disable-git.patch" # downstream snapshot fix |
231 |
) |