diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2020-08-26 16:15:42 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2020-09-02 15:16:33 +0200 |
commit | 5352180eda5c0eb1a010974b79b9f045959f4c9b (patch) | |
tree | 77f4897c459f611f3431c1b296427e0bb4126a74 /recipes-qt/qt5/qtwebengine | |
parent | c8d191d19dda5ec126630c6c91ea46b00a83fe29 (diff) | |
download | meta-qt5-5352180eda5c0eb1a010974b79b9f045959f4c9b.tar.gz |
qtwebengine: fix build with bison-3.7
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtwebengine')
-rw-r--r-- | recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch new file mode 100644 index 00000000..3272b727 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 3ccc10f378ca26c35104e39e08771c053ae5b19e Mon Sep 17 00:00:00 2001 | ||
2 | From: Allan Sandfeld Jensen <allan.jensen@qt.io> | ||
3 | Date: Fri, 14 Aug 2020 16:38:48 +0200 | ||
4 | Subject: [PATCH] chromium: Fix bison 3.7 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Do a replace run inspired by newer versions of the script. | ||
10 | |||
11 | Fixes: QTBUG-86018 | ||
12 | Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1 | ||
13 | Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> | ||
14 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
15 | --- | ||
16 | .../renderer/build/scripts/rule_bison.py | 19 +++++++++++++++++++ | ||
17 | 1 file changed, 19 insertions(+) | ||
18 | |||
19 | diff --git a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py | ||
20 | index f75e25fd23f..7e0767e951a 100755 | ||
21 | --- a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py | ||
22 | +++ b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py | ||
23 | @@ -45,6 +45,19 @@ from utilities import abs | ||
24 | |||
25 | from blinkbuild.name_style_converter import NameStyleConverter | ||
26 | |||
27 | +def modify_file(path, prefix_lines, suffix_lines, replace_list=[]): | ||
28 | + prefix_lines = map(lambda s: s + '\n', prefix_lines) | ||
29 | + suffix_lines = map(lambda s: s + '\n', suffix_lines) | ||
30 | + with open(path, 'r') as f: | ||
31 | + old_lines = f.readlines() | ||
32 | + for i in range(len(old_lines)): | ||
33 | + for src, dest in replace_list: | ||
34 | + old_lines[i] = old_lines[i].replace(src, dest) | ||
35 | + new_lines = prefix_lines + old_lines + suffix_lines | ||
36 | + with open(path, 'w') as f: | ||
37 | + f.writelines(new_lines) | ||
38 | + | ||
39 | + | ||
40 | assert len(sys.argv) == 4 or len(sys.argv) == 5 | ||
41 | |||
42 | inputFile = abs(sys.argv[1]) | ||
43 | @@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard | ||
44 | print >>outputHFile, outputHContents | ||
45 | print >>outputHFile, '#endif // %s' % headerGuard | ||
46 | outputHFile.close() | ||
47 | + | ||
48 | +common_replace_list = [(inputRoot + '.hh', | ||
49 | + inputRoot + '.h')] | ||
50 | +modify_file( | ||
51 | + outputCpp, [], [], | ||
52 | + replace_list=common_replace_list) | ||