1 |
commit: 43bc7ef7394255dc27b58a6b5e0dab005a8ea89b |
2 |
Author: Jimi Huotari <chiitoo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 19 12:59:19 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 19 19:39:43 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43bc7ef7 |
7 |
|
8 |
dev-qt/qtwebengine: fix build with >=bison-3.7 |
9 |
|
10 |
Backport commit from Qt upstream [1]. |
11 |
|
12 |
1. https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?h=80-based&id=1a53f599 |
13 |
|
14 |
Reported-by: Toralf Förster <toralf <AT> gentoo.org> |
15 |
Thanks-to: YOSHIOKA Takuma <lo73741824 <AT> hard-wi.red> |
16 |
Closes: https://bugs.gentoo.org/734356 |
17 |
Package-Manager: Portage-3.0.3, Repoman-3.0.0 |
18 |
Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org> |
19 |
Closes: https://github.com/gentoo/gentoo/pull/17171 |
20 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
21 |
|
22 |
.../files/qtwebengine-5.15.0-bison-3.7-build.patch | 54 ++++++++++++++++++++++ |
23 |
dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild | 1 + |
24 |
2 files changed, 55 insertions(+) |
25 |
|
26 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.0-bison-3.7-build.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.0-bison-3.7-build.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..da7a997fe96 |
29 |
--- /dev/null |
30 |
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.0-bison-3.7-build.patch |
31 |
@@ -0,0 +1,54 @@ |
32 |
+From 1a53f5995697f5ac6fd501dbdc0ee39c9488ee66 Mon Sep 17 00:00:00 2001 |
33 |
+From: Allan Sandfeld Jensen <allan.jensen@××.io> |
34 |
+Date: Fri, 14 Aug 2020 16:38:48 +0200 |
35 |
+Subject: Fix bison 3.7 |
36 |
+MIME-Version: 1.0 |
37 |
+Content-Type: text/plain; charset=UTF-8 |
38 |
+Content-Transfer-Encoding: 8bit |
39 |
+ |
40 |
+Do a replace run inspired by newer versions of the script. |
41 |
+ |
42 |
+Fixes: QTBUG-86018 |
43 |
+Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1 |
44 |
+Reviewed-by: Michael Brüning <michael.bruning@××.io> |
45 |
+--- |
46 |
+ .../blink/renderer/build/scripts/rule_bison.py | 19 +++++++++++++++++++ |
47 |
+ 1 file changed, 19 insertions(+) |
48 |
+ |
49 |
+diff --git a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py |
50 |
+index f75e25fd23f..7e0767e951a 100755 |
51 |
+--- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py |
52 |
++++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py |
53 |
+@@ -45,6 +45,19 @@ from utilities import abs |
54 |
+ |
55 |
+ from blinkbuild.name_style_converter import NameStyleConverter |
56 |
+ |
57 |
++def modify_file(path, prefix_lines, suffix_lines, replace_list=[]): |
58 |
++ prefix_lines = map(lambda s: s + '\n', prefix_lines) |
59 |
++ suffix_lines = map(lambda s: s + '\n', suffix_lines) |
60 |
++ with open(path, 'r') as f: |
61 |
++ old_lines = f.readlines() |
62 |
++ for i in range(len(old_lines)): |
63 |
++ for src, dest in replace_list: |
64 |
++ old_lines[i] = old_lines[i].replace(src, dest) |
65 |
++ new_lines = prefix_lines + old_lines + suffix_lines |
66 |
++ with open(path, 'w') as f: |
67 |
++ f.writelines(new_lines) |
68 |
++ |
69 |
++ |
70 |
+ assert len(sys.argv) == 4 or len(sys.argv) == 5 |
71 |
+ |
72 |
+ inputFile = abs(sys.argv[1]) |
73 |
+@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard |
74 |
+ print >>outputHFile, outputHContents |
75 |
+ print >>outputHFile, '#endif // %s' % headerGuard |
76 |
+ outputHFile.close() |
77 |
++ |
78 |
++common_replace_list = [(inputRoot + '.hh', |
79 |
++ inputRoot + '.h')] |
80 |
++modify_file( |
81 |
++ outputCpp, [], [], |
82 |
++ replace_list=common_replace_list) |
83 |
+-- |
84 |
+cgit v1.2.1 |
85 |
+ |
86 |
|
87 |
diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild |
88 |
index eb31e0dc68f..6aa9345fffd 100644 |
89 |
--- a/dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild |
90 |
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild |
91 |
@@ -85,6 +85,7 @@ PATCHES=( |
92 |
"${FILESDIR}/${P}-disable-fatal-warnings.patch" # bug 695446 |
93 |
"${FILESDIR}/${PN}-5.14.2-icu67.patch" # bug 720054 |
94 |
"${FILESDIR}/${P}-gcc-10.patch" # bug 721876 |
95 |
+ "${FILESDIR}/${P}-bison-3.7-build.patch" # bug 734356 |
96 |
) |
97 |
|
98 |
src_prepare() { |