1 |
commit: 1e28eaa9c45fdfeb0c75271d0cf52e427032dd76 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 22 09:28:29 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 22 09:35:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e28eaa9 |
7 |
|
8 |
dev-qt/qtwebengine: 5.15.2_p20210421 security cleanup |
9 |
|
10 |
Bug: https://bugs.gentoo.org/800181 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
13 |
|
14 |
dev-qt/qtwebengine/Manifest | 1 - |
15 |
.../files/qtwebengine-5.15.2_p20210406-gcc11.patch | 126 ------- |
16 |
.../files/qtwebengine-5.15.2_p20210406-icu69.patch | 92 ----- |
17 |
.../qtwebengine-5.15.2_p20210421-qtbug-91773.patch | 372 --------------------- |
18 |
.../qtwebengine-5.15.2_p20210421.ebuild | 218 ------------ |
19 |
5 files changed, 809 deletions(-) |
20 |
|
21 |
diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest |
22 |
index 7ee8f9bdba7..562f5ae1546 100644 |
23 |
--- a/dev-qt/qtwebengine/Manifest |
24 |
+++ b/dev-qt/qtwebengine/Manifest |
25 |
@@ -1,3 +1,2 @@ |
26 |
DIST qtwebengine-5.15.2-chromium87-ppc64le.tar.xz 28536 BLAKE2B 98f8e01e7026d9df1d30ae453d4394d3c4ad04c0620a2496235d45f5f1080c2280e040826cde7f72d9771bfc80d0c3df56c9dcbe4f763cec432ad56de37d64c5 SHA512 c90a76f44a9d720624016fd082ab3036f12e13b9789e869ebaf5e4774afca7d4187faf187f365f696d1a7eda05ca75516556ee9d291cdb3408d57cc4b23e2654 |
27 |
-DIST qtwebengine-5.15.2_p20210421.tar.xz 320142308 BLAKE2B 1ed6e3daad8e8da7336c1575f524f1474eb043a44a86eebdc2375e9a01dbb21a4bf622b01525c627ff5846bb375b19617ca78f418749d6e4ce53b376da0b8317 SHA512 3a57cc8eb1aab086ae2ef69b1b1eaac47827d1f460ff53d5954b0dcb6753cc0e5fb24db490ea186141e6659e26a59862e8096126450a9fde6ed1230c00e4ceaa |
28 |
DIST qtwebengine-5.15.2_p20210625.tar.xz 320144708 BLAKE2B cd11e69a34ff0fa07d26262906a12304c39a12575024d61db18bc696284e9c5700090e5bfed217c89d2c8eac49b0ccb7d7ee0ba716ec3a81878de1301566884d SHA512 517a8cdaff684894456db8cfb5cfca412b8764e7035623d8190d9a06f6995742097a53eb67329d12bf8dc0a56372f7d09a54532ba804a5bff245ca8ef042a4e1 |
29 |
|
30 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-gcc11.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-gcc11.patch |
31 |
deleted file mode 100644 |
32 |
index 7411567e74f..00000000000 |
33 |
--- a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-gcc11.patch |
34 |
+++ /dev/null |
35 |
@@ -1,126 +0,0 @@ |
36 |
-diff --git a/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp b/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp |
37 |
-index 013f1dfb2..3ce63c192 100644 |
38 |
---- a/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp |
39 |
-+++ b/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp |
40 |
-@@ -9,6 +9,7 @@ |
41 |
- |
42 |
- #include "libANGLE/HandleAllocator.h" |
43 |
- |
44 |
-+#include <limits> |
45 |
- #include <algorithm> |
46 |
- #include <functional> |
47 |
- |
48 |
-diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc |
49 |
-index fd651958f..1e8d0606c 100644 |
50 |
---- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc |
51 |
-+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc |
52 |
-@@ -14,9 +14,9 @@ |
53 |
- * limitations under the License. |
54 |
- */ |
55 |
- |
56 |
-+#include <limits> |
57 |
- #include "src/trace_processor/containers/string_pool.h" |
58 |
- |
59 |
--#include <limits> |
60 |
- |
61 |
- #include "perfetto/base/logging.h" |
62 |
- #include "perfetto/ext/base/utils.h" |
63 |
-diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc |
64 |
-index 00496b335..0dccfeb8a 100644 |
65 |
---- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc |
66 |
-+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc |
67 |
-@@ -14,6 +14,7 @@ |
68 |
- * limitations under the License. |
69 |
- */ |
70 |
- |
71 |
-+#include <limits> |
72 |
- #include "src/trace_processor/db/column.h" |
73 |
- |
74 |
- #include "src/trace_processor/db/compare.h" |
75 |
-diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc |
76 |
-index 837bfeba9..cdd56817d 100644 |
77 |
---- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc |
78 |
-+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc |
79 |
-@@ -14,6 +14,7 @@ |
80 |
- * limitations under the License. |
81 |
- */ |
82 |
- |
83 |
-+#include <limits> |
84 |
- #include "src/trace_processor/types/variadic.h" |
85 |
- |
86 |
- namespace perfetto { |
87 |
-diff --git a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc |
88 |
-index be91def6b..73f202356 100644 |
89 |
---- a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc |
90 |
-+++ b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc |
91 |
-@@ -245,7 +245,7 @@ static void AXPlatformAtkHyperlinkInit(AXPlatformAtkHyperlink* self, gpointer) { |
92 |
- } |
93 |
- |
94 |
- GType ax_platform_atk_hyperlink_get_type() { |
95 |
-- static volatile gsize type_volatile = 0; |
96 |
-+ static gsize type_volatile = 0; |
97 |
- |
98 |
- AXPlatformNodeAuraLinux::EnsureGTypeInit(); |
99 |
- |
100 |
-diff --git a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc |
101 |
-index 04125c6fd..6c64e5d8e 100644 |
102 |
---- a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc |
103 |
-+++ b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc |
104 |
-@@ -2274,7 +2274,7 @@ void ClassInit(gpointer class_pointer, gpointer /* class_data */) { |
105 |
- GType GetType() { |
106 |
- AXPlatformNodeAuraLinux::EnsureGTypeInit(); |
107 |
- |
108 |
-- static volatile gsize type_volatile = 0; |
109 |
-+ static gsize type_volatile = 0; |
110 |
- if (g_once_init_enter(&type_volatile)) { |
111 |
- static const GTypeInfo type_info = { |
112 |
- sizeof(AXPlatformNodeAuraLinuxClass), // class_size |
113 |
-diff --git a/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc b/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc |
114 |
-index c663a2074..38a342484 100644 |
115 |
---- a/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc |
116 |
-+++ b/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc |
117 |
-@@ -141,7 +141,7 @@ void GtkKeyBindingsHandler::HandlerClassInit(HandlerClass* klass) { |
118 |
- } |
119 |
- |
120 |
- GType GtkKeyBindingsHandler::HandlerGetType() { |
121 |
-- static volatile gsize type_id_volatile = 0; |
122 |
-+ static gsize type_id_volatile = 0; |
123 |
- if (g_once_init_enter(&type_id_volatile)) { |
124 |
- GType type_id = g_type_register_static_simple( |
125 |
- GTK_TYPE_TEXT_VIEW, g_intern_static_string("GtkKeyBindingsHandler"), |
126 |
---- a/src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc |
127 |
-+++ b/src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc |
128 |
-@@ -2,6 +2,7 @@ |
129 |
- // Use of this source code is governed by a BSD-style license that can be |
130 |
- // found in the LICENSE file. |
131 |
- |
132 |
-+#include <cstddef> |
133 |
- #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" |
134 |
- |
135 |
- #include <stdint.h> |
136 |
-diff --git a/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc b/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc |
137 |
-index 657a3c96b..ad641a082 100644 |
138 |
---- a/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc |
139 |
-+++ b/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc |
140 |
-@@ -2,6 +2,8 @@ |
141 |
- // Use of this source code is governed by a BSD-style license that can be |
142 |
- // found in the LICENSE file. |
143 |
- |
144 |
-+#include <cstddef> |
145 |
-+ |
146 |
- #include "components/bookmarks/browser/base_bookmark_model_observer.h" |
147 |
- |
148 |
- namespace bookmarks { |
149 |
-diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc b/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc |
150 |
-index 19f9aab5b..27fec2168 100644 |
151 |
---- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc |
152 |
-+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc |
153 |
-@@ -37,6 +37,7 @@ |
154 |
- |
155 |
- #include <algorithm> |
156 |
- #include <array> |
157 |
-+#include <limits> |
158 |
- #include "absl/base/internal/hide_ptr.h" |
159 |
- #include "absl/base/internal/raw_logging.h" |
160 |
- #include "absl/base/internal/spinlock.h" |
161 |
- |
162 |
|
163 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-icu69.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-icu69.patch |
164 |
deleted file mode 100644 |
165 |
index 457953671a4..00000000000 |
166 |
--- a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-icu69.patch |
167 |
+++ /dev/null |
168 |
@@ -1,92 +0,0 @@ |
169 |
-From 035c305ce7761f51328b45f1bd83e26aef267c9d Mon Sep 17 00:00:00 2001 |
170 |
-From: Frank Tang <ftang@××××××××.org> |
171 |
-Date: Thu, 15 Oct 2020 22:44:27 -0700 |
172 |
-Subject: [PATCH] [Intl] call new ListFormatter::createInstance |
173 |
- |
174 |
-The one we currently using is now marked as internal and to be removed |
175 |
-for 68. Migrating to the style which already avaiable in ICU 67-1. |
176 |
- |
177 |
-Bug: v8:11031 |
178 |
-Change-Id: I668382a2e1b8602ddca02bf231c5008a6c92bf2d |
179 |
-Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2477751 |
180 |
-Reviewed-by: Jakob Kummerow <jkummerow@××××××××.org> |
181 |
-Commit-Queue: Frank Tang <ftang@××××××××.org> |
182 |
-Cr-Commit-Position: refs/heads/master@{#70638} |
183 |
---- |
184 |
- |
185 |
-diff --git a/src/3rdparty/chromium/v8/src/objects/js-list-format.cc b/src/3rdparty/chromium/v8/src/objects/js-list-format.cc |
186 |
-index b17d38c..e48a387 100644 |
187 |
---- a/src/3rdparty/chromium/v8/src/objects/js-list-format.cc |
188 |
-+++ b/src/3rdparty/chromium/v8/src/objects/js-list-format.cc |
189 |
-@@ -29,46 +29,27 @@ |
190 |
- namespace internal { |
191 |
- |
192 |
- namespace { |
193 |
--const char* kStandard = "standard"; |
194 |
--const char* kOr = "or"; |
195 |
--const char* kUnit = "unit"; |
196 |
--const char* kStandardShort = "standard-short"; |
197 |
--const char* kOrShort = "or-short"; |
198 |
--const char* kUnitShort = "unit-short"; |
199 |
--const char* kStandardNarrow = "standard-narrow"; |
200 |
--const char* kOrNarrow = "or-narrow"; |
201 |
--const char* kUnitNarrow = "unit-narrow"; |
202 |
- |
203 |
--const char* GetIcuStyleString(JSListFormat::Style style, |
204 |
-- JSListFormat::Type type) { |
205 |
-+UListFormatterWidth GetIcuWidth(JSListFormat::Style style) { |
206 |
-+ switch (style) { |
207 |
-+ case JSListFormat::Style::LONG: |
208 |
-+ return ULISTFMT_WIDTH_WIDE; |
209 |
-+ case JSListFormat::Style::SHORT: |
210 |
-+ return ULISTFMT_WIDTH_SHORT; |
211 |
-+ case JSListFormat::Style::NARROW: |
212 |
-+ return ULISTFMT_WIDTH_NARROW; |
213 |
-+ } |
214 |
-+ UNREACHABLE(); |
215 |
-+} |
216 |
-+ |
217 |
-+UListFormatterType GetIcuType(JSListFormat::Type type) { |
218 |
- switch (type) { |
219 |
- case JSListFormat::Type::CONJUNCTION: |
220 |
-- switch (style) { |
221 |
-- case JSListFormat::Style::LONG: |
222 |
-- return kStandard; |
223 |
-- case JSListFormat::Style::SHORT: |
224 |
-- return kStandardShort; |
225 |
-- case JSListFormat::Style::NARROW: |
226 |
-- return kStandardNarrow; |
227 |
-- } |
228 |
-+ return ULISTFMT_TYPE_AND; |
229 |
- case JSListFormat::Type::DISJUNCTION: |
230 |
-- switch (style) { |
231 |
-- case JSListFormat::Style::LONG: |
232 |
-- return kOr; |
233 |
-- case JSListFormat::Style::SHORT: |
234 |
-- return kOrShort; |
235 |
-- case JSListFormat::Style::NARROW: |
236 |
-- return kOrNarrow; |
237 |
-- } |
238 |
-+ return ULISTFMT_TYPE_OR; |
239 |
- case JSListFormat::Type::UNIT: |
240 |
-- switch (style) { |
241 |
-- case JSListFormat::Style::LONG: |
242 |
-- return kUnit; |
243 |
-- case JSListFormat::Style::SHORT: |
244 |
-- return kUnitShort; |
245 |
-- case JSListFormat::Style::NARROW: |
246 |
-- return kUnitNarrow; |
247 |
-- } |
248 |
-+ return ULISTFMT_TYPE_UNITS; |
249 |
- } |
250 |
- UNREACHABLE(); |
251 |
- } |
252 |
-@@ -143,7 +124,7 @@ |
253 |
- icu::Locale icu_locale = r.icu_locale; |
254 |
- UErrorCode status = U_ZERO_ERROR; |
255 |
- icu::ListFormatter* formatter = icu::ListFormatter::createInstance( |
256 |
-- icu_locale, GetIcuStyleString(style_enum, type_enum), status); |
257 |
-+ icu_locale, GetIcuType(type_enum), GetIcuWidth(style_enum), status); |
258 |
- if (U_FAILURE(status) || formatter == nullptr) { |
259 |
- delete formatter; |
260 |
- THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kIcuError), |
261 |
|
262 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210421-qtbug-91773.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210421-qtbug-91773.patch |
263 |
deleted file mode 100644 |
264 |
index 88e7b893e30..00000000000 |
265 |
--- a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210421-qtbug-91773.patch |
266 |
+++ /dev/null |
267 |
@@ -1,372 +0,0 @@ |
268 |
-diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp |
269 |
-index 5597c69f9..2cd48907b 100644 |
270 |
---- a/src/core/web_contents_adapter.cpp |
271 |
-+++ b/src/core/web_contents_adapter.cpp |
272 |
-@@ -716,8 +716,7 @@ void WebContentsAdapter::load(const QWebEngineHttpRequest &request) |
273 |
- m_adapterClient->loadFinished(false, request.url(), false, |
274 |
- net::ERR_DISALLOWED_URL_SCHEME, |
275 |
- QCoreApplication::translate("WebContentsAdapter", |
276 |
-- "HTTP-POST data can only be sent over HTTP(S) protocol"), |
277 |
-- false); |
278 |
-+ "HTTP-POST data can only be sent over HTTP(S) protocol")); |
279 |
- return; |
280 |
- } |
281 |
- params.post_data = network::ResourceRequestBody::CreateFromBytes( |
282 |
-@@ -773,7 +772,7 @@ void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeT |
283 |
- |
284 |
- GURL dataUrlToLoad(urlString); |
285 |
- if (dataUrlToLoad.spec().size() > url::kMaxURLChars) { |
286 |
-- m_adapterClient->loadFinished(false, baseUrl, false, net::ERR_ABORTED, QString(), false); |
287 |
-+ m_adapterClient->loadFinished(false, baseUrl, false, net::ERR_ABORTED, QString()); |
288 |
- return; |
289 |
- } |
290 |
- content::NavigationController::LoadURLParams params((dataUrlToLoad)); |
291 |
-@@ -1995,6 +1994,7 @@ void WebContentsAdapter::discard() |
292 |
- if (m_webContents->IsLoading()) { |
293 |
- m_webContentsDelegate->didFailLoad(m_webContentsDelegate->url(webContents()), net::Error::ERR_ABORTED, |
294 |
- QStringLiteral("Discarded")); |
295 |
-+ m_webContentsDelegate->DidStopLoading(); |
296 |
- } |
297 |
- |
298 |
- content::WebContents::CreateParams createParams(m_profileAdapter->profile()); |
299 |
-diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h |
300 |
-index 267266d81..afc43806a 100644 |
301 |
---- a/src/core/web_contents_adapter_client.h |
302 |
-+++ b/src/core/web_contents_adapter_client.h |
303 |
-@@ -466,8 +466,7 @@ public: |
304 |
- virtual void loadStarted(const QUrl &provisionalUrl, bool isErrorPage = false) = 0; |
305 |
- virtual void loadCommitted() = 0; |
306 |
- virtual void loadVisuallyCommitted() = 0; |
307 |
-- virtual void loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, |
308 |
-- const QString &errorDescription, bool triggersErrorPage) = 0; |
309 |
-+ virtual void loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, const QString &errorDescription) = 0; |
310 |
- virtual void focusContainer() = 0; |
311 |
- virtual void unhandledKeyEvent(QKeyEvent *event) = 0; |
312 |
- virtual QSharedPointer<WebContentsAdapter> |
313 |
-diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp |
314 |
-index 1e92a46f8..f0e4130e8 100644 |
315 |
---- a/src/core/web_contents_delegate_qt.cpp |
316 |
-+++ b/src/core/web_contents_delegate_qt.cpp |
317 |
-@@ -259,14 +259,12 @@ void WebContentsDelegateQt::CloseContents(content::WebContents *source) |
318 |
- |
319 |
- void WebContentsDelegateQt::LoadProgressChanged(double progress) |
320 |
- { |
321 |
-- QUrl current_url(m_viewClient->webContentsAdapter()->getNavigationEntryOriginalUrl(m_viewClient->webContentsAdapter()->currentNavigationEntryIndex())); |
322 |
-- int p = qMin(qRound(progress * 100), 100); |
323 |
-- |
324 |
-- if (!m_loadingErrorFrameList.isEmpty() || !m_loadProgressMap.contains(current_url) || m_loadProgressMap[current_url] == 100 || p == 100) |
325 |
-+ if (!m_loadingErrorFrameList.isEmpty() || !m_loadingInfo.isLoading()) // suppress signals that aren't between loadStarted and loadFinished |
326 |
- return; |
327 |
- |
328 |
-- if (p > m_loadProgressMap[current_url]) { // ensure strict monotonic increase |
329 |
-- m_loadProgressMap[current_url] = p; |
330 |
-+ int p = qMin(qRound(progress * 100), 100); |
331 |
-+ if (p > m_loadingInfo.progress) { // ensure strict monotonic increase |
332 |
-+ m_loadingInfo.progress = p; |
333 |
- m_viewClient->loadProgressChanged(p); |
334 |
- } |
335 |
- } |
336 |
-@@ -339,35 +337,21 @@ void WebContentsDelegateQt::RenderViewHostChanged(content::RenderViewHost *, con |
337 |
- } |
338 |
- } |
339 |
- |
340 |
--void WebContentsDelegateQt::EmitLoadStarted(const QUrl &url, bool isErrorPage) |
341 |
-+void WebContentsDelegateQt::emitLoadStarted(bool isErrorPage) |
342 |
- { |
343 |
-- m_isDocumentEmpty = true; |
344 |
-- m_viewClient->loadStarted(url, isErrorPage); |
345 |
-- m_viewClient->updateNavigationActions(); |
346 |
-- |
347 |
-- if ((url.hasFragment() || m_lastLoadedUrl.hasFragment()) |
348 |
-- && url.adjusted(QUrl::RemoveFragment) == m_lastLoadedUrl.adjusted(QUrl::RemoveFragment) |
349 |
-- && !m_isNavigationCommitted) { |
350 |
-- m_loadProgressMap.insert(url, 100); |
351 |
-- m_lastLoadedUrl = url; |
352 |
-- m_viewClient->loadProgressChanged(100); |
353 |
-+ // only report first ever load start or separate one for error page only |
354 |
-+ if (!isErrorPage && m_loadingInfo.isLoading()) // already running |
355 |
- return; |
356 |
-- } |
357 |
- |
358 |
-- if (!m_loadProgressMap.isEmpty()) { |
359 |
-- QMap<QUrl, int>::iterator it = m_loadProgressMap.begin(); |
360 |
-- while (it != m_loadProgressMap.end()) { |
361 |
-- if (it.value() == 100) { |
362 |
-- it = m_loadProgressMap.erase(it); |
363 |
-- continue; |
364 |
-- } |
365 |
-- ++it; |
366 |
-- } |
367 |
-+ m_isDocumentEmpty = true; // reset to default which may only be overridden on actual resource load complete |
368 |
-+ if (!isErrorPage) { |
369 |
-+ m_loadingInfo.progress = 0; |
370 |
-+ m_viewClient->loadStarted(m_loadingInfo.url, false); |
371 |
-+ m_viewClient->updateNavigationActions(); |
372 |
-+ m_viewClient->loadProgressChanged(0); |
373 |
-+ } else { |
374 |
-+ m_viewClient->loadStarted(toQt(GURL(content::kUnreachableWebDataURL)), true); |
375 |
- } |
376 |
-- |
377 |
-- m_lastLoadedUrl = url; |
378 |
-- m_loadProgressMap.insert(url, 0); |
379 |
-- m_viewClient->loadProgressChanged(0); |
380 |
- } |
381 |
- |
382 |
- void WebContentsDelegateQt::DidStartNavigation(content::NavigationHandle *navigation_handle) |
383 |
-@@ -375,34 +359,41 @@ void WebContentsDelegateQt::DidStartNavigation(content::NavigationHandle *naviga |
384 |
- if (!webEngineSettings()->testAttribute(WebEngineSettings::ErrorPageEnabled)) |
385 |
- navigation_handle->SetSilentlyIgnoreErrors(); |
386 |
- |
387 |
-- if (!navigation_handle->IsInMainFrame()) |
388 |
-+ if (!navigation_handle->IsInMainFrame() || !web_contents()->IsLoadingToDifferentDocument()) |
389 |
- return; |
390 |
- |
391 |
- |
392 |
- m_loadingErrorFrameList.clear(); |
393 |
- m_faviconManager->resetCandidates(); |
394 |
-- EmitLoadStarted(toQt(navigation_handle->GetURL())); |
395 |
-+ |
396 |
-+ m_loadingInfo.url = toQt(navigation_handle->GetURL()); |
397 |
-+ // IsErrorPage is only set after navigation commit, so check it otherwise: error page shouldn't have navigation entry |
398 |
-+ bool isErrorPage = m_loadingInfo.triggersErrorPage && !navigation_handle->GetNavigationEntry(); |
399 |
-+ emitLoadStarted(isErrorPage); |
400 |
- } |
401 |
- |
402 |
--void WebContentsDelegateQt::EmitLoadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, const QString &errorDescription, bool triggersErrorPage) |
403 |
-+void WebContentsDelegateQt::emitLoadFinished(bool isErrorPage) |
404 |
- { |
405 |
-- Q_ASSERT(!isErrorPage || webEngineSettings()->testAttribute(WebEngineSettings::ErrorPageEnabled)); |
406 |
-- Q_ASSERT((triggersErrorPage && webEngineSettings()->testAttribute(WebEngineSettings::ErrorPageEnabled)) || !triggersErrorPage); |
407 |
-- |
408 |
-- // When error page enabled we don't need to send the error page load finished signal |
409 |
-- if (m_loadProgressMap[url] == 100) |
410 |
-+ if (!m_loadingInfo.isLoading()) // not currently running |
411 |
- return; |
412 |
- |
413 |
-- m_lastLoadedUrl = url; |
414 |
-- m_loadProgressMap[url] = 100; |
415 |
-- m_isNavigationCommitted = false; |
416 |
-- m_viewClient->loadProgressChanged(100); |
417 |
-+ Q_ASSERT(!isErrorPage || webEngineSettings()->testAttribute(WebEngineSettings::ErrorPageEnabled)); |
418 |
-+ Q_ASSERT((m_loadingInfo.triggersErrorPage && webEngineSettings()->testAttribute(WebEngineSettings::ErrorPageEnabled)) || !m_loadingInfo.triggersErrorPage); |
419 |
-+ |
420 |
-+ if (!isErrorPage) { |
421 |
-+ if (m_loadingInfo.progress < 100) { |
422 |
-+ m_loadingInfo.progress = 100; |
423 |
-+ m_viewClient->loadProgressChanged(100); |
424 |
-+ } |
425 |
- |
426 |
-- m_viewClient->loadFinished(success, url, isErrorPage, errorCode, errorDescription, triggersErrorPage); |
427 |
-- m_viewClient->updateNavigationActions(); |
428 |
-+ m_viewClient->loadFinished(m_loadingInfo.success, m_loadingInfo.url, false, m_loadingInfo.errorCode, m_loadingInfo.errorDescription); |
429 |
-+ m_viewClient->updateNavigationActions(); |
430 |
-+ } else { |
431 |
-+ m_viewClient->loadFinished(false, toQt(GURL(content::kUnreachableWebDataURL)), true, 0, QString()); |
432 |
-+ } |
433 |
- } |
434 |
- |
435 |
--void WebContentsDelegateQt::EmitLoadCommitted() |
436 |
-+void WebContentsDelegateQt::emitLoadCommitted() |
437 |
- { |
438 |
- m_findTextHelper->handleLoadCommitted(); |
439 |
- m_viewClient->loadCommitted(); |
440 |
-@@ -422,8 +413,7 @@ void WebContentsDelegateQt::DidFinishNavigation(content::NavigationHandle *navig |
441 |
- profileAdapter->visitedLinksManager()->addUrl(url); |
442 |
- } |
443 |
- |
444 |
-- m_isNavigationCommitted = true; |
445 |
-- EmitLoadCommitted(); |
446 |
-+ emitLoadCommitted(); |
447 |
- } |
448 |
- |
449 |
- // Success is reported by DidFinishLoad, but DidFailLoad is now dead code and needs to be handled below |
450 |
-@@ -440,11 +430,11 @@ void WebContentsDelegateQt::DidFinishNavigation(content::NavigationHandle *navig |
451 |
- // Now report we are starting to load an error-page. |
452 |
- m_loadingErrorFrameList.append(navigation_handle->GetRenderFrameHost()->GetRoutingID()); |
453 |
- m_faviconManager->resetCandidates(); |
454 |
-- EmitLoadStarted(toQt(GURL(content::kUnreachableWebDataURL)), true); |
455 |
-+ emitLoadStarted(true); |
456 |
- |
457 |
- // If it is already committed we will not see another DidFinishNavigation call or a DidFinishLoad call. |
458 |
- if (navigation_handle->HasCommitted()) |
459 |
-- EmitLoadCommitted(); |
460 |
-+ emitLoadCommitted(); |
461 |
- } |
462 |
- } |
463 |
- |
464 |
-@@ -486,6 +476,9 @@ void WebContentsDelegateQt::DidStopLoading() |
465 |
- |
466 |
- if (m_loadingState == LoadingState::Loading) |
467 |
- setLoadingState(LoadingState::Loaded); |
468 |
-+ |
469 |
-+ emitLoadFinished(); |
470 |
-+ m_loadingInfo.clear(); |
471 |
- } |
472 |
- |
473 |
- void WebContentsDelegateQt::didFailLoad(const QUrl &url, int errorCode, const QString &errorDescription) |
474 |
-@@ -495,7 +488,11 @@ void WebContentsDelegateQt::didFailLoad(const QUrl &url, int errorCode, const QS |
475 |
- // Delay notifying failure until the error-page is done loading. |
476 |
- // Error-pages are not loaded on failures due to abort. |
477 |
- bool aborted = (errorCode == -3 /* ERR_ABORTED*/ ); |
478 |
-- EmitLoadFinished(false /* success */ , url, false /* isErrorPage */, errorCode, errorDescription, errorPageEnabled && !aborted); |
479 |
-+ m_loadingInfo.success = false; |
480 |
-+ m_loadingInfo.url = url; |
481 |
-+ m_loadingInfo.errorCode = errorCode; |
482 |
-+ m_loadingInfo.errorDescription = errorDescription; |
483 |
-+ m_loadingInfo.triggersErrorPage = errorPageEnabled && !aborted; |
484 |
- } |
485 |
- |
486 |
- void WebContentsDelegateQt::DidFailLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code) |
487 |
-@@ -511,8 +508,7 @@ void WebContentsDelegateQt::DidFailLoad(content::RenderFrameHost* render_frame_h |
488 |
- Q_ASSERT(error_code == -3 /* ERR_ABORTED */); |
489 |
- m_loadingErrorFrameList.removeOne(render_frame_host->GetRoutingID()); |
490 |
- m_viewClient->iconChanged(QUrl()); |
491 |
-- |
492 |
-- EmitLoadFinished(false /* success */, toQt(validated_url), true /* isErrorPage */); |
493 |
-+ emitLoadFinished(/* isErrorPage = */true); |
494 |
- return; |
495 |
- } |
496 |
- // Qt6: Consider getting rid of the error_description (Chromium already has) |
497 |
-@@ -532,7 +528,7 @@ void WebContentsDelegateQt::DidFinishLoad(content::RenderFrameHost* render_frame |
498 |
- // Trigger LoadFinished signal for main frame's error page only. |
499 |
- if (!render_frame_host->GetParent()) { |
500 |
- m_viewClient->iconChanged(QUrl()); |
501 |
-- EmitLoadFinished(true /* success */, toQt(validated_url), true /* isErrorPage */); |
502 |
-+ emitLoadFinished(/* isErrorPage = */true); |
503 |
- } |
504 |
- |
505 |
- return; |
506 |
-@@ -550,7 +546,11 @@ void WebContentsDelegateQt::DidFinishLoad(content::RenderFrameHost* render_frame |
507 |
- int http_statuscode = entry ? entry->GetHttpStatusCode() : 0; |
508 |
- bool errorPageEnabled = webEngineSettings()->testAttribute(WebEngineSettings::ErrorPageEnabled); |
509 |
- bool triggersErrorPage = errorPageEnabled && (http_statuscode >= 400) && m_isDocumentEmpty; |
510 |
-- EmitLoadFinished(http_statuscode < 400, toQt(validated_url), false /* isErrorPage */, http_statuscode, QString(), triggersErrorPage); |
511 |
-+ |
512 |
-+ m_loadingInfo.success = http_statuscode < 400; |
513 |
-+ m_loadingInfo.url = toQt(validated_url); |
514 |
-+ m_loadingInfo.errorCode = http_statuscode; |
515 |
-+ m_loadingInfo.triggersErrorPage = triggersErrorPage; |
516 |
- } |
517 |
- |
518 |
- void WebContentsDelegateQt::DidUpdateFaviconURL(content::RenderFrameHost *render_frame_host, const std::vector<blink::mojom::FaviconURLPtr> &candidates) |
519 |
-diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h |
520 |
-index 5a3dff6e9..7149f6bff 100644 |
521 |
---- a/src/core/web_contents_delegate_qt.h |
522 |
-+++ b/src/core/web_contents_delegate_qt.h |
523 |
-@@ -216,9 +216,9 @@ private: |
524 |
- WindowOpenDisposition disposition, const gfx::Rect &initial_pos, |
525 |
- const QUrl &url, |
526 |
- bool user_gesture); |
527 |
-- void EmitLoadStarted(const QUrl &url, bool isErrorPage = false); |
528 |
-- void EmitLoadFinished(bool success, const QUrl &url, bool isErrorPage = false, int errorCode = 0, const QString &errorDescription = QString(), bool triggersErrorPage = false); |
529 |
-- void EmitLoadCommitted(); |
530 |
-+ void emitLoadStarted(bool isErrorPage = false); |
531 |
-+ void emitLoadFinished(bool isErrorPage = false); |
532 |
-+ void emitLoadCommitted(); |
533 |
- |
534 |
- LoadingState determineLoadingState(content::WebContents *contents); |
535 |
- void setLoadingState(LoadingState state); |
536 |
-@@ -242,9 +242,17 @@ private: |
537 |
- int m_desktopStreamCount = 0; |
538 |
- mutable bool m_pendingUrlUpdate = false; |
539 |
- |
540 |
-- QMap<QUrl, int> m_loadProgressMap; |
541 |
-- QUrl m_lastLoadedUrl; |
542 |
-- bool m_isNavigationCommitted = false; |
543 |
-+ struct LoadingInfo { |
544 |
-+ bool success = false; |
545 |
-+ int progress = -1; |
546 |
-+ bool isLoading() const { return progress >= 0; } |
547 |
-+ QUrl url; |
548 |
-+ int errorCode = 0; |
549 |
-+ QString errorDescription; |
550 |
-+ bool triggersErrorPage = false; |
551 |
-+ void clear() { *this = LoadingInfo(); } |
552 |
-+ } m_loadingInfo; |
553 |
-+ |
554 |
- bool m_isDocumentEmpty = true; |
555 |
- base::WeakPtrFactory<WebContentsDelegateQt> m_weakPtrFactory { this }; |
556 |
- }; |
557 |
-diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp |
558 |
-index 6ab1c97cb..1de7f1c7f 100644 |
559 |
---- a/src/webengine/api/qquickwebengineview.cpp |
560 |
-+++ b/src/webengine/api/qquickwebengineview.cpp |
561 |
-@@ -496,11 +496,9 @@ Q_STATIC_ASSERT(static_cast<int>(WebEngineError::NoErrorDomain) == static_cast<i |
562 |
- Q_STATIC_ASSERT(static_cast<int>(WebEngineError::CertificateErrorDomain) == static_cast<int>(QQuickWebEngineView::CertificateErrorDomain)); |
563 |
- Q_STATIC_ASSERT(static_cast<int>(WebEngineError::DnsErrorDomain) == static_cast<int>(QQuickWebEngineView::DnsErrorDomain)); |
564 |
- |
565 |
--void QQuickWebEngineViewPrivate::loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, |
566 |
-- const QString &errorDescription, bool triggersErrorPage) |
567 |
-+void QQuickWebEngineViewPrivate::loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, const QString &errorDescription) |
568 |
- { |
569 |
- Q_Q(QQuickWebEngineView); |
570 |
-- Q_UNUSED(triggersErrorPage); |
571 |
- |
572 |
- if (isErrorPage) { |
573 |
- #if QT_CONFIG(webengine_testsupport) |
574 |
-diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h |
575 |
-index ebe55c345..ec535298b 100644 |
576 |
---- a/src/webengine/api/qquickwebengineview_p_p.h |
577 |
-+++ b/src/webengine/api/qquickwebengineview_p_p.h |
578 |
-@@ -116,8 +116,7 @@ public: |
579 |
- void loadStarted(const QUrl &provisionalUrl, bool isErrorPage = false) override; |
580 |
- void loadCommitted() override; |
581 |
- void loadVisuallyCommitted() override; |
582 |
-- void loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, |
583 |
-- const QString &errorDescription, bool triggersErrorPage) override; |
584 |
-+ void loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, const QString &errorDescription) override; |
585 |
- void focusContainer() override; |
586 |
- void unhandledKeyEvent(QKeyEvent *event) override; |
587 |
- QSharedPointer<QtWebEngineCore::WebContentsAdapter> |
588 |
-diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp |
589 |
-index e08afed44..b32c15039 100644 |
590 |
---- a/src/webenginewidgets/api/qwebenginepage.cpp |
591 |
-+++ b/src/webenginewidgets/api/qwebenginepage.cpp |
592 |
-@@ -282,28 +282,20 @@ void QWebEnginePagePrivate::loadStarted(const QUrl &provisionalUrl, bool isError |
593 |
- QTimer::singleShot(0, q, &QWebEnginePage::loadStarted); |
594 |
- } |
595 |
- |
596 |
--void QWebEnginePagePrivate::loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, |
597 |
-- const QString &errorDescription, bool triggersErrorPage) |
598 |
-+void QWebEnginePagePrivate::loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, const QString &errorDescription) |
599 |
- { |
600 |
- Q_Q(QWebEnginePage); |
601 |
- Q_UNUSED(url); |
602 |
- Q_UNUSED(errorCode); |
603 |
- Q_UNUSED(errorDescription); |
604 |
- |
605 |
-- if (isErrorPage) { |
606 |
-- QTimer::singleShot(0, q, [q](){ |
607 |
-- emit q->loadFinished(false); |
608 |
-- }); |
609 |
-+ if (isErrorPage) |
610 |
- return; |
611 |
-- } |
612 |
- |
613 |
- isLoading = false; |
614 |
-- Q_ASSERT((success && !triggersErrorPage) || !success); |
615 |
-- if (!triggersErrorPage) { |
616 |
-- QTimer::singleShot(0, q, [q, success](){ |
617 |
-- emit q->loadFinished(success); |
618 |
-- }); |
619 |
-- } |
620 |
-+ QTimer::singleShot(0, q, [q, success](){ |
621 |
-+ emit q->loadFinished(success); |
622 |
-+ }); |
623 |
- } |
624 |
- |
625 |
- void QWebEnginePagePrivate::didPrintPageToPdf(const QString &filePath, bool success) |
626 |
-diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h |
627 |
-index 82ce99503..ae3ab5d25 100644 |
628 |
---- a/src/webenginewidgets/api/qwebenginepage_p.h |
629 |
-+++ b/src/webenginewidgets/api/qwebenginepage_p.h |
630 |
-@@ -107,8 +107,7 @@ public: |
631 |
- void loadStarted(const QUrl &provisionalUrl, bool isErrorPage = false) override; |
632 |
- void loadCommitted() override { } |
633 |
- void loadVisuallyCommitted() override { } |
634 |
-- void loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, |
635 |
-- const QString &errorDescription, bool triggersErrorPage) override; |
636 |
-+ void loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, const QString &errorDescription) override; |
637 |
- void focusContainer() override; |
638 |
- void unhandledKeyEvent(QKeyEvent *event) override; |
639 |
- QSharedPointer<QtWebEngineCore::WebContentsAdapter> |
640 |
|
641 |
diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210421.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210421.ebuild |
642 |
deleted file mode 100644 |
643 |
index 21f59ef813e..00000000000 |
644 |
--- a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210421.ebuild |
645 |
+++ /dev/null |
646 |
@@ -1,218 +0,0 @@ |
647 |
-# Copyright 1999-2021 Gentoo Authors |
648 |
-# Distributed under the terms of the GNU General Public License v2 |
649 |
- |
650 |
-EAPI=7 |
651 |
- |
652 |
-PYTHON_COMPAT=( python2_7 ) |
653 |
-QTVER=$(ver_cut 1-3) |
654 |
-inherit estack flag-o-matic multiprocessing python-any-r1 qt5-build |
655 |
- |
656 |
-DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications" |
657 |
-HOMEPAGE="https://www.qt.io/" |
658 |
- |
659 |
-if [[ ${QT5_BUILD_TYPE} == release ]]; then |
660 |
- KEYWORDS="amd64 ~arm arm64 ~ppc64 x86" |
661 |
- if [[ ${PV} == ${QTVER}_p* ]]; then |
662 |
- SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz" |
663 |
- S="${WORKDIR}/${P}" |
664 |
- QT5_BUILD_DIR="${S}_build" |
665 |
- fi |
666 |
-else |
667 |
- EGIT_BRANCH="5.15" |
668 |
- EGIT_REPO_URI=( |
669 |
- "https://code.qt.io/qt/${QT5_MODULE}.git" |
670 |
- "https://github.com/qt/${QT5_MODULE}.git" |
671 |
- ) |
672 |
- inherit git-r3 |
673 |
-fi |
674 |
- |
675 |
-# patchset based on https://github.com/chromium-ppc64le releases |
676 |
-SRC_URI+=" ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-5.15.2-chromium87-ppc64le.tar.xz )" |
677 |
- |
678 |
-IUSE="alsa bindist designer geolocation +jumbo-build kerberos pulseaudio +system-ffmpeg +system-icu widgets" |
679 |
-REQUIRED_USE="designer? ( widgets )" |
680 |
- |
681 |
-RDEPEND=" |
682 |
- app-arch/snappy:= |
683 |
- dev-libs/glib:2 |
684 |
- dev-libs/nspr |
685 |
- dev-libs/nss |
686 |
- dev-libs/expat |
687 |
- dev-libs/libevent:= |
688 |
- dev-libs/libxml2[icu] |
689 |
- dev-libs/libxslt |
690 |
- dev-libs/re2:= |
691 |
- ~dev-qt/qtcore-${QTVER} |
692 |
- ~dev-qt/qtdeclarative-${QTVER} |
693 |
- ~dev-qt/qtgui-${QTVER} |
694 |
- ~dev-qt/qtnetwork-${QTVER} |
695 |
- ~dev-qt/qtprintsupport-${QTVER} |
696 |
- ~dev-qt/qtwebchannel-${QTVER}[qml] |
697 |
- media-libs/fontconfig |
698 |
- media-libs/freetype |
699 |
- media-libs/harfbuzz:= |
700 |
- media-libs/lcms:2 |
701 |
- media-libs/libjpeg-turbo:= |
702 |
- media-libs/libpng:0= |
703 |
- >=media-libs/libvpx-1.5:=[svc(+)] |
704 |
- media-libs/libwebp:= |
705 |
- media-libs/mesa[egl,X(+)] |
706 |
- media-libs/opus |
707 |
- sys-apps/dbus |
708 |
- sys-apps/pciutils |
709 |
- sys-libs/zlib[minizip] |
710 |
- virtual/libudev |
711 |
- x11-libs/libdrm |
712 |
- x11-libs/libX11 |
713 |
- x11-libs/libXcomposite |
714 |
- x11-libs/libXcursor |
715 |
- x11-libs/libXdamage |
716 |
- x11-libs/libXext |
717 |
- x11-libs/libXfixes |
718 |
- x11-libs/libXi |
719 |
- x11-libs/libXrandr |
720 |
- x11-libs/libXrender |
721 |
- x11-libs/libXScrnSaver |
722 |
- x11-libs/libXtst |
723 |
- alsa? ( media-libs/alsa-lib ) |
724 |
- designer? ( ~dev-qt/designer-${QTVER} ) |
725 |
- geolocation? ( ~dev-qt/qtpositioning-${QTVER} ) |
726 |
- kerberos? ( virtual/krb5 ) |
727 |
- pulseaudio? ( media-sound/pulseaudio:= ) |
728 |
- system-ffmpeg? ( media-video/ffmpeg:0= ) |
729 |
- system-icu? ( >=dev-libs/icu-68.2:= ) |
730 |
- widgets? ( |
731 |
- ~dev-qt/qtdeclarative-${QTVER}[widgets] |
732 |
- ~dev-qt/qtwidgets-${QTVER} |
733 |
- ) |
734 |
-" |
735 |
-DEPEND="${RDEPEND}" |
736 |
-BDEPEND=" |
737 |
- ${PYTHON_DEPS} |
738 |
- dev-util/gperf |
739 |
- dev-util/ninja |
740 |
- dev-util/re2c |
741 |
- net-libs/nodejs[ssl] |
742 |
- sys-devel/bison |
743 |
- ppc64? ( >=dev-util/gn-0.1807 ) |
744 |
-" |
745 |
- |
746 |
-PATCHES=( |
747 |
- "${FILESDIR}/${PN}-5.15.0-disable-fatal-warnings.patch" # bug 695446 |
748 |
- "${FILESDIR}/${PN}-5.15.2_p20210224-chromium-87-v8-icu68.patch" # downstream, bug 757606 |
749 |
- "${FILESDIR}/${PN}-5.15.2_p20210224-disable-git.patch" # downstream snapshot fix |
750 |
- "${FILESDIR}/${PN}-5.15.2_p20210406-glibc-2.33.patch" # by Fedora, bug 769989 |
751 |
- "${FILESDIR}/${PN}-5.15.2_p20210406-gcc11.patch" # by Fedora, bug 768261 |
752 |
- "${FILESDIR}/${PN}-5.15.2_p20210406-icu69.patch" # bug 781236 |
753 |
- "${FILESDIR}/${P}-qtbug-91773.patch" # in Qt "5.15.5" |
754 |
-) |
755 |
- |
756 |
-src_unpack() { |
757 |
- # bug 307861 |
758 |
- eshopts_push -s extglob |
759 |
- if is-flagq '-g?(gdb)?([1-9])'; then |
760 |
- ewarn |
761 |
- ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." |
762 |
- ewarn "You may experience really long compilation times and/or increased memory usage." |
763 |
- ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug." |
764 |
- ewarn |
765 |
- fi |
766 |
- eshopts_pop |
767 |
- |
768 |
- case ${QT5_BUILD_TYPE} in |
769 |
- live) git-r3_src_unpack ;& |
770 |
- release) default ;; |
771 |
- esac |
772 |
-} |
773 |
- |
774 |
-src_prepare() { |
775 |
- if [[ ${PV} == ${QTVER}_p* ]]; then |
776 |
- # This is made from git, and for some reason will fail w/o .git directories. |
777 |
- mkdir -p .git src/3rdparty/chromium/.git || die |
778 |
- |
779 |
- # We need to make sure this integrates well into Qt 5.15.2 installation. |
780 |
- # Otherwise revdeps fail w/o heavy changes. This is the simplest way to do it. |
781 |
- sed -e "/^MODULE_VERSION/s/5.*/${QTVER}/" -i .qmake.conf || die |
782 |
- fi |
783 |
- |
784 |
- # QTBUG-88657 - jumbo-build could still make trouble |
785 |
- if ! use jumbo-build; then |
786 |
- sed -i -e 's|use_jumbo_build=true|use_jumbo_build=false|' \ |
787 |
- src/buildtools/config/common.pri || die |
788 |
- fi |
789 |
- |
790 |
- # bug 630834 - pass appropriate options to ninja when building GN |
791 |
- sed -e "s/\['ninja'/&, '-j$(makeopts_jobs)', '-l$(makeopts_loadavg "${MAKEOPTS}" 0)', '-v'/" \ |
792 |
- -i src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py || die |
793 |
- |
794 |
- # bug 620444 - ensure local headers are used |
795 |
- find "${S}" -type f -name "*.pr[fio]" | \ |
796 |
- xargs sed -i -e 's|INCLUDEPATH += |&$${QTWEBENGINE_ROOT}_build/include $${QTWEBENGINE_ROOT}/include |' || die |
797 |
- |
798 |
- if use system-icu; then |
799 |
- # Sanity check to ensure that bundled copy of ICU is not used. |
800 |
- # Whole src/3rdparty/chromium/third_party/icu directory cannot be deleted because |
801 |
- # src/3rdparty/chromium/third_party/icu/BUILD.gn is used by build system. |
802 |
- # If usage of headers of bundled copy of ICU occurs, then lists of shim headers in |
803 |
- # shim_headers("icui18n_shim") and shim_headers("icuuc_shim") in |
804 |
- # src/3rdparty/chromium/third_party/icu/BUILD.gn should be updated. |
805 |
- local file |
806 |
- while read file; do |
807 |
- echo "#error This file should not be used!" > "${file}" || die |
808 |
- done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null) |
809 |
- fi |
810 |
- |
811 |
- qt_use_disable_config alsa webengine-alsa src/buildtools/config/linux.pri |
812 |
- qt_use_disable_config pulseaudio webengine-pulseaudio src/buildtools/config/linux.pri |
813 |
- |
814 |
- qt_use_disable_mod designer webenginewidgets src/plugins/plugins.pro |
815 |
- |
816 |
- qt_use_disable_mod widgets widgets src/src.pro |
817 |
- |
818 |
- qt5-build_src_prepare |
819 |
- |
820 |
- # we need to generate ppc64 stuff because upstream does not ship it yet |
821 |
- if use ppc64; then |
822 |
- einfo "Patching for ppc64le and generating build files" |
823 |
- eapply "${FILESDIR}/qtwebengine-5.15.2-enable-ppc64.patch" |
824 |
- pushd src/3rdparty/chromium > /dev/null || die |
825 |
- eapply -p0 "${WORKDIR}/${PN}-ppc64le" |
826 |
- popd > /dev/null || die |
827 |
- pushd src/3rdparty/chromium/third_party/libvpx > /dev/null || die |
828 |
- mkdir -vp source/config/linux/ppc64 || die |
829 |
- mkdir -p source/libvpx/test || die |
830 |
- touch source/libvpx/test/test.mk || die |
831 |
- ./generate_gni.sh || die |
832 |
- popd >/dev/null || die |
833 |
- fi |
834 |
-} |
835 |
- |
836 |
-src_configure() { |
837 |
- export NINJA_PATH=/usr/bin/ninja |
838 |
- export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}" |
839 |
- |
840 |
- local myqmakeargs=( |
841 |
- -- |
842 |
- -no-build-qtpdf |
843 |
- -printing-and-pdf |
844 |
- -system-opus |
845 |
- -system-webp |
846 |
- $(usex alsa '-alsa' '-no-alsa') |
847 |
- $(usex bindist '-no-proprietary-codecs' '-proprietary-codecs') |
848 |
- $(usex geolocation '-webengine-geolocation' '-no-webengine-geolocation') |
849 |
- $(usex kerberos '-webengine-kerberos' '-no-webengine-kerberos') |
850 |
- $(usex pulseaudio '-pulseaudio' '-no-pulseaudio') |
851 |
- $(usex system-ffmpeg '-system-ffmpeg' '-qt-ffmpeg') |
852 |
- $(usex system-icu '-webengine-icu' '-no-webengine-icu') |
853 |
- ) |
854 |
- qt5-build_src_configure |
855 |
-} |
856 |
- |
857 |
-src_install() { |
858 |
- qt5-build_src_install |
859 |
- |
860 |
- # bug 601472 |
861 |
- if [[ ! -f ${D}${QT5_LIBDIR}/libQt5WebEngine.so ]]; then |
862 |
- die "${CATEGORY}/${PF} failed to build anything. Please report to https://bugs.gentoo.org/" |
863 |
- fi |
864 |
-} |