diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2020-08-26 16:15:42 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2020-08-26 16:29:30 +0200 |
| commit | 90172afa472ab3604e3ebea85752cad8a19e535c (patch) | |
| tree | 38ca0ae0895d06b5c6ff0e691a827f366581816e | |
| parent | 5144a99a696a8a72c0765ea0e8be8ceafaa78f85 (diff) | |
| download | meta-qt5-upstream/jansa/bison.tar.gz | |
qtwebengine: fix build with bison-3.7upstream/jansa/bison
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch | 52 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtwebengine_git.bb | 1 |
2 files changed, 53 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) | ||
diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index 9b7aa514..9281aeb7 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb | |||
| @@ -172,6 +172,7 @@ SRC_URI += " \ | |||
| 172 | file://chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch;patchdir=src/3rdparty \ | 172 | file://chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch;patchdir=src/3rdparty \ |
| 173 | file://chromium/0011-chromium-Include-cstddef-and-cstdint.patch;patchdir=src/3rdparty \ | 173 | file://chromium/0011-chromium-Include-cstddef-and-cstdint.patch;patchdir=src/3rdparty \ |
| 174 | file://chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch;patchdir=src/3rdparty \ | 174 | file://chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch;patchdir=src/3rdparty \ |
| 175 | file://chromium/0013-chromium-Fix-bison-3.7.patch;patchdir=src/3rdparty \ | ||
| 175 | " | 176 | " |
| 176 | 177 | ||
| 177 | SRC_URI_append_libc-musl = "\ | 178 | SRC_URI_append_libc-musl = "\ |
