mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
extra/qt5-webengine: fix
This commit is contained in:
parent
872c4fc9f6
commit
360881674c
5 changed files with 171 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
From e4f423721668ce05961348cdaa34dccdbb524b2a Mon Sep 17 00:00:00 2001
|
||||
From 4883849d717b57e37cc3604ea84b05a7c6da61ee Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Tue, 4 Jul 2017 11:54:39 -0600
|
||||
Subject: [PATCH 1/3] ARM toolchain fixes
|
||||
Subject: [PATCH 1/4] ARM toolchain fixes
|
||||
|
||||
---
|
||||
chromium/build/toolchain/linux/BUILD.gn | 24 ++++++++++--------------
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 6782907d020d4c4f279f3d516b5180c10a640d56 Mon Sep 17 00:00:00 2001
|
||||
From 1e418cd6409c847aac319f7fdbeca87d266bf9a8 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Mon, 1 Jul 2019 07:10:36 -0600
|
||||
Subject: [PATCH 2/3] Fix ARM skia ICE
|
||||
Subject: [PATCH 2/4] Fix ARM skia ICE
|
||||
|
||||
---
|
||||
chromium/third_party/skia/third_party/skcms/src/Transform_inl.h | 2 +-
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
From 5135b1ef537028770aa68d70b93d37829dcf8d99 Mon Sep 17 00:00:00 2001
|
||||
From: Yuki Shiino <yukishiino@chromium.org>
|
||||
Date: Mon, 5 Oct 2020 11:01:57 +0000
|
||||
Subject: [PATCH 3/4] bind-gen: Support --single_process flag in
|
||||
generate_bindings.py
|
||||
|
||||
Error messages of generate_bindings.py are often hard to read
|
||||
due to multiprocessing. Supports --single_process flag for
|
||||
debugging purpose.
|
||||
|
||||
Bug: 839389
|
||||
Change-Id: Ibe0d55716cdc9d5db77b0714dd96c11832ab0143
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2447529
|
||||
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
|
||||
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#813675}
|
||||
---
|
||||
.../bindings/scripts/bind_gen/task_queue.py | 74 +++++++++++--------
|
||||
.../bindings/scripts/generate_bindings.py | 8 +-
|
||||
2 files changed, 49 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py
|
||||
index 0d8f4c0f303..0fab5c2813b 100644
|
||||
--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py
|
||||
+++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py
|
||||
@@ -13,10 +13,23 @@ class TaskQueue(object):
|
||||
tasks will be executed in parallel.
|
||||
"""
|
||||
|
||||
- def __init__(self):
|
||||
- self._pool_size = multiprocessing.cpu_count()
|
||||
- self._pool = multiprocessing.Pool(self._pool_size,
|
||||
- package_initializer().init)
|
||||
+ def __init__(self, single_process=False):
|
||||
+ """
|
||||
+ Args:
|
||||
+ single_process: True makes the instance will not create nor use a
|
||||
+ child process so that error messages will be easier to read.
|
||||
+ This is useful for debugging.
|
||||
+ """
|
||||
+ assert isinstance(single_process, bool)
|
||||
+ if single_process:
|
||||
+ self._single_process = True
|
||||
+ self._pool_size = 1
|
||||
+ self._pool = None
|
||||
+ else:
|
||||
+ self._single_process = False
|
||||
+ self._pool_size = multiprocessing.cpu_count()
|
||||
+ self._pool = multiprocessing.Pool(self._pool_size,
|
||||
+ package_initializer().init)
|
||||
self._requested_tasks = [] # List of (func, args, kwargs)
|
||||
self._worker_tasks = [] # List of multiprocessing.pool.AsyncResult
|
||||
self._did_run = False
|
||||
@@ -36,28 +49,42 @@ class TaskQueue(object):
|
||||
Args:
|
||||
report_progress: A callable that takes two arguments, total number
|
||||
of worker tasks and number of completed worker tasks.
|
||||
- Scheduled tasks are reorganized into worker tasks, so the
|
||||
- number of worker tasks may be different from the number of
|
||||
- scheduled tasks.
|
||||
"""
|
||||
assert report_progress is None or callable(report_progress)
|
||||
assert not self._did_run
|
||||
assert not self._worker_tasks
|
||||
self._did_run = True
|
||||
|
||||
- num_of_requested_tasks = len(self._requested_tasks)
|
||||
- chunk_size = 1
|
||||
- i = 0
|
||||
- while i < num_of_requested_tasks:
|
||||
- tasks = self._requested_tasks[i:i + chunk_size]
|
||||
- i += chunk_size
|
||||
+ if self._single_process:
|
||||
+ self._run_in_sequence(report_progress)
|
||||
+ else:
|
||||
+ self._run_in_parallel(report_progress)
|
||||
+
|
||||
+ def _run_in_sequence(self, report_progress):
|
||||
+ for index, task in enumerate(self._requested_tasks):
|
||||
+ func, args, kwargs = task
|
||||
+ report_progress(len(self._requested_tasks), index)
|
||||
+ apply(func, args, kwargs)
|
||||
+ report_progress(len(self._requested_tasks), len(self._requested_tasks))
|
||||
+
|
||||
+ def _run_in_parallel(self, report_progress):
|
||||
+ for task in self._requested_tasks:
|
||||
+ func, args, kwargs = task
|
||||
self._worker_tasks.append(
|
||||
- self._pool.apply_async(_task_queue_run_tasks, [tasks]))
|
||||
+ self._pool.apply_async(func, args, kwargs))
|
||||
self._pool.close()
|
||||
|
||||
+ def report_worker_task_progress():
|
||||
+ if not report_progress:
|
||||
+ return
|
||||
+ done_count = reduce(
|
||||
+ lambda count, worker_task: count + bool(worker_task.ready()),
|
||||
+ self._worker_tasks, 0)
|
||||
+ report_progress(len(self._worker_tasks), done_count)
|
||||
+
|
||||
timeout_in_sec = 1
|
||||
while True:
|
||||
- self._report_worker_task_progress(report_progress)
|
||||
+ report_worker_task_progress()
|
||||
for worker_task in self._worker_tasks:
|
||||
if not worker_task.ready():
|
||||
worker_task.wait(timeout_in_sec)
|
||||
@@ -69,20 +96,3 @@ class TaskQueue(object):
|
||||
break
|
||||
|
||||
self._pool.join()
|
||||
-
|
||||
- def _report_worker_task_progress(self, report_progress):
|
||||
- assert report_progress is None or callable(report_progress)
|
||||
-
|
||||
- if not report_progress:
|
||||
- return
|
||||
-
|
||||
- done_count = reduce(
|
||||
- lambda count, worker_task: count + bool(worker_task.ready()),
|
||||
- self._worker_tasks, 0)
|
||||
- report_progress(len(self._worker_tasks), done_count)
|
||||
-
|
||||
-
|
||||
-def _task_queue_run_tasks(tasks):
|
||||
- for task in tasks:
|
||||
- func, args, kwargs = task
|
||||
- apply(func, args, kwargs)
|
||||
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/generate_bindings.py b/chromium/third_party/blink/renderer/bindings/scripts/generate_bindings.py
|
||||
index 96a9ebccdbf..528d1b2f61d 100644
|
||||
--- a/chromium/third_party/blink/renderer/bindings/scripts/generate_bindings.py
|
||||
+++ b/chromium/third_party/blink/renderer/bindings/scripts/generate_bindings.py
|
||||
@@ -37,6 +37,12 @@ def parse_options():
|
||||
type="string",
|
||||
help='output directory for "modules" component relative '
|
||||
'to root_gen_dir')
|
||||
+ parser.add_option(
|
||||
+ '--single_process',
|
||||
+ action="store_true",
|
||||
+ default=False,
|
||||
+ help=('run everything in a single process, which makes debugging '
|
||||
+ 'easier'))
|
||||
options, args = parser.parse_args()
|
||||
|
||||
required_option_names = ("web_idl_database", "root_src_dir",
|
||||
@@ -76,7 +82,7 @@ def main():
|
||||
root_gen_dir=options.root_gen_dir,
|
||||
component_reldirs=component_reldirs)
|
||||
|
||||
- task_queue = bind_gen.TaskQueue()
|
||||
+ task_queue = bind_gen.TaskQueue(single_process=options.single_process)
|
||||
|
||||
for task in tasks:
|
||||
dispatch_table[task](task_queue)
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From bf530f78deaf4361d46de5060572c9656a174405 Mon Sep 17 00:00:00 2001
|
||||
From 4296fdd6d5d762a4bfcf961522ea64d67cb99eed Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Tue, 2 Feb 2021 13:58:59 -0700
|
||||
Subject: [PATCH 3/3] Run blink bindings generation single threaded
|
||||
Subject: [PATCH 4/4] Run blink bindings generation single threaded
|
||||
|
||||
When not single threaded this process will eat all the RAM.
|
||||
---
|
|
@ -30,13 +30,15 @@ source=(git+https://code.qt.io/qt/qtwebengine.git#commit=$_commit
|
|||
qt5-webengine-glibc-2.33.patch
|
||||
0001-ARM-toolchain-fixes.patch
|
||||
0002-Fix-ARM-skia-ICE.patch
|
||||
0003-Run-blink-bindings-generation-single-threaded.patch)
|
||||
0003-bind-gen-Support-single_process-flag-in-generate_bin.patch
|
||||
0004-Run-blink-bindings-generation-single-threaded.patch)
|
||||
sha256sums=('SKIP'
|
||||
'SKIP'
|
||||
'2294e5390c869963fc58f7bf1ee0a254a3f7fce3ed00c04e34a5f03e2b31b624'
|
||||
'2f9574cad9f26e9efaebdbebec92a7725f83c1f518fd1d61196f283d9b052274'
|
||||
'99e3bb37bd3c3d3c103eeb8301ee9bcc7b2c1a049c2c1936a2c35bfcc0524ed7'
|
||||
'10fd6dd0a27adcd244207c8a56ed1ecd6b7644376ea3e5362b086d587eae2d70')
|
||||
'652d14349df7359c49c7006c4ebbe3ba91f4f5265ff177c02cf82f6b79f505c3'
|
||||
'533a582062a87803354c8f80104cd80e530e73b811fea32221c9102930e933d9'
|
||||
'108fbfee92e1dda80af591b79aef789d22ae3b45e066b271ad3bb44670fc4139'
|
||||
'e6d0eefc96496b4ca299c51d86a4f58b5502e6d661c2acbeb1c8903db12c8fb6')
|
||||
|
||||
prepare() {
|
||||
mkdir -p build
|
||||
|
@ -52,7 +54,8 @@ prepare() {
|
|||
cd "$srcdir/$_pkgfqn/src/3rdparty"
|
||||
patch -p1 -i ${srcdir}/0001-ARM-toolchain-fixes.patch
|
||||
patch -p1 -i ${srcdir}/0002-Fix-ARM-skia-ICE.patch
|
||||
patch -p1 -i ${srcdir}/0003-Run-blink-bindings-generation-single-threaded.patch
|
||||
patch -p1 -i ${srcdir}/0003-bind-gen-Support-single_process-flag-in-generate_bin.patch
|
||||
patch -p1 -i ${srcdir}/0004-Run-blink-bindings-generation-single-threaded.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
Loading…
Reference in a new issue