summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorJimi Huotari <chiitoo@gentoo.org>2020-08-19 15:59:19 +0300
committerAndreas Sturmlechner <asturm@gentoo.org>2020-08-19 21:39:43 +0200
commit43bc7ef7394255dc27b58a6b5e0dab005a8ea89b (patch)
tree950c67e61b2a44850c8f68d47ae5d751784dbdbb /dev-qt
parentdev-python/pyjwt: arm64 stable (bug #738044) (diff)
downloadgentoo-43bc7ef7394255dc27b58a6b5e0dab005a8ea89b.tar.gz
gentoo-43bc7ef7394255dc27b58a6b5e0dab005a8ea89b.tar.bz2
gentoo-43bc7ef7394255dc27b58a6b5e0dab005a8ea89b.zip
dev-qt/qtwebengine: fix build with >=bison-3.7
Backport commit from Qt upstream [1]. 1. https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?h=80-based&id=1a53f599 Reported-by: Toralf Förster <toralf@gentoo.org> Thanks-to: YOSHIOKA Takuma <lo73741824@hard-wi.red> Closes: https://bugs.gentoo.org/734356 Package-Manager: Portage-3.0.3, Repoman-3.0.0 Signed-off-by: Jimi Huotari <chiitoo@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/17171 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.0-bison-3.7-build.patch54
-rw-r--r--dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild1
2 files changed, 55 insertions, 0 deletions
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
new file mode 100644
index 000000000000..da7a997fe965
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.0-bison-3.7-build.patch
@@ -0,0 +1,54 @@
+From 1a53f5995697f5ac6fd501dbdc0ee39c9488ee66 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen@qt.io>
+Date: Fri, 14 Aug 2020 16:38:48 +0200
+Subject: Fix bison 3.7
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Do a replace run inspired by newer versions of the script.
+
+Fixes: QTBUG-86018
+Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1
+Reviewed-by: Michael Brüning <michael.bruning@qt.io>
+---
+ .../blink/renderer/build/scripts/rule_bison.py | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
+index f75e25fd23f..7e0767e951a 100755
+--- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
++++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
+@@ -45,6 +45,19 @@ from utilities import abs
+
+ from blinkbuild.name_style_converter import NameStyleConverter
+
++def modify_file(path, prefix_lines, suffix_lines, replace_list=[]):
++ prefix_lines = map(lambda s: s + '\n', prefix_lines)
++ suffix_lines = map(lambda s: s + '\n', suffix_lines)
++ with open(path, 'r') as f:
++ old_lines = f.readlines()
++ for i in range(len(old_lines)):
++ for src, dest in replace_list:
++ old_lines[i] = old_lines[i].replace(src, dest)
++ new_lines = prefix_lines + old_lines + suffix_lines
++ with open(path, 'w') as f:
++ f.writelines(new_lines)
++
++
+ assert len(sys.argv) == 4 or len(sys.argv) == 5
+
+ inputFile = abs(sys.argv[1])
+@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard
+ print >>outputHFile, outputHContents
+ print >>outputHFile, '#endif // %s' % headerGuard
+ outputHFile.close()
++
++common_replace_list = [(inputRoot + '.hh',
++ inputRoot + '.h')]
++modify_file(
++ outputCpp, [], [],
++ replace_list=common_replace_list)
+--
+cgit v1.2.1
+
diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild
index eb31e0dc68f7..6aa9345fffd0 100644
--- a/dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.0.ebuild
@@ -85,6 +85,7 @@ PATCHES=(
"${FILESDIR}/${P}-disable-fatal-warnings.patch" # bug 695446
"${FILESDIR}/${PN}-5.14.2-icu67.patch" # bug 720054
"${FILESDIR}/${P}-gcc-10.patch" # bug 721876
+ "${FILESDIR}/${P}-bison-3.7-build.patch" # bug 734356
)
src_prepare() {