diff options
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/chromium')
| -rw-r--r-- | recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Allow-to-build-with-python3.patch | 229 |
1 files changed, 229 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Allow-to-build-with-python3.patch b/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Allow-to-build-with-python3.patch new file mode 100644 index 00000000..bd5b471c --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Allow-to-build-with-python3.patch | |||
| @@ -0,0 +1,229 @@ | |||
| 1 | From db207d9e3a0c0354f91ab753246916623312c06b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Thu, 23 Jan 2020 18:04:09 +0100 | ||
| 4 | Subject: [PATCH] chromium: Allow to build with python3 | ||
| 5 | |||
| 6 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 7 | --- | ||
| 8 | chromium/build/config/linux/pkg-config.py | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/chromium/build/config/linux/pkg-config.py b/chromium/build/config/linux/pkg-config.py | ||
| 12 | index 930810b008a..ea9bf155409 100755 | ||
| 13 | --- a/chromium/build/config/linux/pkg-config.py | ||
| 14 | +++ b/chromium/build/config/linux/pkg-config.py | ||
| 15 | @@ -195,7 +195,7 @@ def main(): | ||
| 16 | sys.stderr.write('Running: %s\n' % ' '.join(cmd)) | ||
| 17 | |||
| 18 | try: | ||
| 19 | - flag_string = subprocess.check_output(cmd) | ||
| 20 | + flag_string = subprocess.check_output(cmd).decode('utf8') | ||
| 21 | except: | ||
| 22 | sys.stderr.write('Could not run pkg-config.\n') | ||
| 23 | return 1 | ||
| 24 | diff --git a/chromium/build/config/posix/sysroot_ld_path.py b/chromium/build/config/posix/sysroot_ld_path.py | ||
| 25 | index 5fe5623711c..39d019482fe 100644 | ||
| 26 | --- a/chromium/build/config/posix/sysroot_ld_path.py | ||
| 27 | +++ b/chromium/build/config/posix/sysroot_ld_path.py | ||
| 28 | @@ -17,7 +17,7 @@ if len(sys.argv) != 3: | ||
| 29 | print("Need two arguments") | ||
| 30 | sys.exit(1) | ||
| 31 | |||
| 32 | -result = subprocess.check_output([sys.argv[1], sys.argv[2]]).strip() | ||
| 33 | +result = subprocess.check_output([sys.argv[1], sys.argv[2]]).strip().decode('utf8') | ||
| 34 | result = result.replace(" ", "\n") | ||
| 35 | if result != "": | ||
| 36 | print(result) | ||
| 37 | diff --git a/chromium/mojo/public/tools/bindings/mojom_bindings_generator.py b/chromium/mojo/public/tools/bindings/mojom_bindings_generator.py | ||
| 38 | index f28fb90a1d6..c5a959b2936 100755 | ||
| 39 | --- a/chromium/mojo/public/tools/bindings/mojom_bindings_generator.py | ||
| 40 | +++ b/chromium/mojo/public/tools/bindings/mojom_bindings_generator.py | ||
| 41 | @@ -139,7 +139,7 @@ def ScrambleMethodOrdinals(interfaces, salt): | ||
| 42 | |||
| 43 | |||
| 44 | def ReadFileContents(filename): | ||
| 45 | - with open(filename, 'rb') as f: | ||
| 46 | + with open(filename, 'r') as f: | ||
| 47 | return f.read() | ||
| 48 | |||
| 49 | |||
| 50 | diff --git a/chromium/third_party/blink/renderer/bindings/scripts/utilities.py b/chromium/third_party/blink/renderer/bindings/scripts/utilities.py | ||
| 51 | index ff1bab337ea..4df72b72a92 100644 | ||
| 52 | --- a/chromium/third_party/blink/renderer/bindings/scripts/utilities.py | ||
| 53 | +++ b/chromium/third_party/blink/renderer/bindings/scripts/utilities.py | ||
| 54 | @@ -8,7 +8,10 @@ Design doc: http://www.chromium.org/developers/design-documents/idl-build | ||
| 55 | """ | ||
| 56 | |||
| 57 | import os | ||
| 58 | -import cPickle as pickle | ||
| 59 | +try: | ||
| 60 | + import cPickle as pickle | ||
| 61 | +except ImportError: | ||
| 62 | + import pickle | ||
| 63 | import re | ||
| 64 | import shlex | ||
| 65 | import string | ||
| 66 | diff --git a/chromium/third_party/blink/renderer/build/scripts/json5_generator.py b/chromium/third_party/blink/renderer/build/scripts/json5_generator.py | ||
| 67 | index 8bd0c7ab8f9..014b08e330c 100644 | ||
| 68 | --- a/chromium/third_party/blink/renderer/build/scripts/json5_generator.py | ||
| 69 | +++ b/chromium/third_party/blink/renderer/build/scripts/json5_generator.py | ||
| 70 | @@ -103,7 +103,7 @@ def _is_valid(valid_values, value, valid_keys=None): | ||
| 71 | assert valid_keys, "'valid_keys' must be declared when using a dict value" | ||
| 72 | return all([(key in valid_keys or key == "default") | ||
| 73 | and (val in valid_values or val == "") | ||
| 74 | - for key, val in value.iteritems()]) | ||
| 75 | + for key, val in value.items()]) | ||
| 76 | else: | ||
| 77 | return value in valid_values | ||
| 78 | |||
| 79 | diff --git a/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py b/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py | ||
| 80 | index b5fb70f72e2..e74aa7ef4a4 100755 | ||
| 81 | --- a/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py | ||
| 82 | +++ b/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py | ||
| 83 | @@ -28,7 +28,10 @@ | ||
| 84 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 85 | |||
| 86 | import copy | ||
| 87 | -import cPickle as pickle | ||
| 88 | +try: | ||
| 89 | + import cPickle as pickle | ||
| 90 | +except ImportError: | ||
| 91 | + import pickle | ||
| 92 | import os | ||
| 93 | import sys | ||
| 94 | |||
| 95 | diff --git a/chromium/third_party/blink/renderer/build/scripts/template_expander.py b/chromium/third_party/blink/renderer/build/scripts/template_expander.py | ||
| 96 | index 2cf3ad6a098..722d3dfe96e 100644 | ||
| 97 | --- a/chromium/third_party/blink/renderer/build/scripts/template_expander.py | ||
| 98 | +++ b/chromium/third_party/blink/renderer/build/scripts/template_expander.py | ||
| 99 | @@ -64,6 +64,6 @@ def use_jinja(template_path, filters=None, tests=None, template_cache=None): | ||
| 100 | parameters = generator(*args, **kwargs) | ||
| 101 | return apply_template(template_path, parameters, filters=filters, | ||
| 102 | tests=tests, template_cache=template_cache) | ||
| 103 | - generator_internal.func_name = generator.func_name | ||
| 104 | + generator_internal.__name__ = generator.__name__ | ||
| 105 | return generator_internal | ||
| 106 | return real_decorator | ||
| 107 | diff --git a/chromium/third_party/blink/tools/blinkpy/common/message_pool.py b/chromium/third_party/blink/tools/blinkpy/common/message_pool.py | ||
| 108 | index 15ba177b7f9..ff709af50f7 100644 | ||
| 109 | --- a/chromium/third_party/blink/tools/blinkpy/common/message_pool.py | ||
| 110 | +++ b/chromium/third_party/blink/tools/blinkpy/common/message_pool.py | ||
| 111 | @@ -40,7 +40,10 @@ If you don't need these features, use multiprocessing.Pool or concurrency.future | ||
| 112 | instead. | ||
| 113 | """ | ||
| 114 | |||
| 115 | -import cPickle | ||
| 116 | +try: | ||
| 117 | + import cPickle as pickle | ||
| 118 | +except ImportError: | ||
| 119 | + import pickle | ||
| 120 | import logging | ||
| 121 | import multiprocessing | ||
| 122 | import Queue | ||
| 123 | @@ -160,7 +163,7 @@ class _MessagePool(object): | ||
| 124 | |||
| 125 | def _can_pickle(self, host): | ||
| 126 | try: | ||
| 127 | - cPickle.dumps(host) | ||
| 128 | + pickle.dumps(host) | ||
| 129 | return True | ||
| 130 | except TypeError: | ||
| 131 | return False | ||
| 132 | diff --git a/chromium/third_party/blink/tools/blinkpy/web_tests/models/test_failures.py b/chromium/third_party/blink/tools/blinkpy/web_tests/models/test_failures.py | ||
| 133 | index ade2f8ec5d2..bd3b4c84a26 100644 | ||
| 134 | --- a/chromium/third_party/blink/tools/blinkpy/web_tests/models/test_failures.py | ||
| 135 | +++ b/chromium/third_party/blink/tools/blinkpy/web_tests/models/test_failures.py | ||
| 136 | @@ -26,7 +26,10 @@ | ||
| 137 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 138 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 139 | |||
| 140 | -import cPickle | ||
| 141 | +try: | ||
| 142 | + import cPickle as pickle | ||
| 143 | +except ImportError: | ||
| 144 | + import pickle | ||
| 145 | |||
| 146 | from blinkpy.web_tests.models import test_expectations | ||
| 147 | |||
| 148 | @@ -102,7 +105,7 @@ class TestFailure(object): | ||
| 149 | @staticmethod | ||
| 150 | def loads(s): | ||
| 151 | """Creates a TestFailure object from the specified string.""" | ||
| 152 | - return cPickle.loads(s) | ||
| 153 | + return pickle.loads(s) | ||
| 154 | |||
| 155 | def message(self): | ||
| 156 | """Returns a string describing the failure in more detail.""" | ||
| 157 | @@ -119,7 +122,7 @@ class TestFailure(object): | ||
| 158 | |||
| 159 | def dumps(self): | ||
| 160 | """Returns the string/JSON representation of a TestFailure.""" | ||
| 161 | - return cPickle.dumps(self) | ||
| 162 | + return pickle.dumps(self) | ||
| 163 | |||
| 164 | def driver_needs_restart(self): | ||
| 165 | """Returns True if we should kill the driver before the next test.""" | ||
| 166 | diff --git a/chromium/third_party/blink/tools/blinkpy/web_tests/models/test_results.py b/chromium/third_party/blink/tools/blinkpy/web_tests/models/test_results.py | ||
| 167 | index 8c83576888e..ad6cfc86ac3 100644 | ||
| 168 | --- a/chromium/third_party/blink/tools/blinkpy/web_tests/models/test_results.py | ||
| 169 | +++ b/chromium/third_party/blink/tools/blinkpy/web_tests/models/test_results.py | ||
| 170 | @@ -26,7 +26,10 @@ | ||
| 171 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 172 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 173 | |||
| 174 | -import cPickle | ||
| 175 | +try: | ||
| 176 | + import cPickle as pickle | ||
| 177 | +except ImportError: | ||
| 178 | + import pickle | ||
| 179 | |||
| 180 | from blinkpy.web_tests.models import test_failures | ||
| 181 | |||
| 182 | @@ -36,7 +39,7 @@ class TestResult(object): | ||
| 183 | |||
| 184 | @staticmethod | ||
| 185 | def loads(string): | ||
| 186 | - return cPickle.loads(string) | ||
| 187 | + return pickle.loads(string) | ||
| 188 | |||
| 189 | def __init__(self, test_name, failures=None, test_run_time=None, has_stderr=False, reftest_type=None, | ||
| 190 | pid=None, references=None, device_failed=False, has_repaint_overlay=False, crash_site=None): | ||
| 191 | @@ -69,4 +72,4 @@ class TestResult(object): | ||
| 192 | return not (self == other) | ||
| 193 | |||
| 194 | def dumps(self): | ||
| 195 | - return cPickle.dumps(self) | ||
| 196 | + return pickle.dumps(self) | ||
| 197 | diff --git a/chromium/third_party/jinja2/_compat.py b/chromium/third_party/jinja2/_compat.py | ||
| 198 | index 61d85301a4a..4e8aebf380f 100644 | ||
| 199 | --- a/chromium/third_party/jinja2/_compat.py | ||
| 200 | +++ b/chromium/third_party/jinja2/_compat.py | ||
| 201 | @@ -57,7 +57,10 @@ else: | ||
| 202 | itervalues = lambda d: d.itervalues() | ||
| 203 | iteritems = lambda d: d.iteritems() | ||
| 204 | |||
| 205 | - import cPickle as pickle | ||
| 206 | + try: | ||
| 207 | + import cPickle as pickle | ||
| 208 | + except ImportError: | ||
| 209 | + import pickle | ||
| 210 | from cStringIO import StringIO as BytesIO, StringIO | ||
| 211 | NativeStringIO = BytesIO | ||
| 212 | |||
| 213 | diff --git a/chromium/third_party/yasm/source/patched-yasm/tools/python-yasm/pyxelator/ir.py b/chromium/third_party/yasm/source/patched-yasm/tools/python-yasm/pyxelator/ir.py | ||
| 214 | index cfa9c02ead1..df088214b48 100755 | ||
| 215 | --- a/chromium/third_party/yasm/source/patched-yasm/tools/python-yasm/pyxelator/ir.py | ||
| 216 | +++ b/chromium/third_party/yasm/source/patched-yasm/tools/python-yasm/pyxelator/ir.py | ||
| 217 | @@ -9,8 +9,10 @@ version 0.xx | ||
| 218 | """ | ||
| 219 | |||
| 220 | import sys | ||
| 221 | -#import cPickle as pickle | ||
| 222 | -import pickle | ||
| 223 | +try: | ||
| 224 | + import cPickle as pickle | ||
| 225 | +except ImportError: | ||
| 226 | + import pickle | ||
| 227 | |||
| 228 | #from lexer import Lexer | ||
| 229 | from parse_core import Symbols #, Parser | ||
