summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-08-18 15:56:16 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-08-18 19:48:50 +0200
commit69e618c88a9134f754264efc11aa0b1fdc028b88 (patch)
tree7e97f616c7601e697315767c3b74e869b478d3e0 /dev-qt
parentapp-doc/zeal: Drop 0.6.1 (diff)
downloadgentoo-69e618c88a9134f754264efc11aa0b1fdc028b88.tar.gz
gentoo-69e618c88a9134f754264efc11aa0b1fdc028b88.tar.bz2
gentoo-69e618c88a9134f754264efc11aa0b1fdc028b88.zip
dev-qt/qtwebkit: Fix build with sys-devel/bison-3.7
Closes: https://bugs.gentoo.org/736499 Package-Manager: Portage-3.0.3, Repoman-3.0.0 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-bison-3.7.patch46
-rw-r--r--dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild2
2 files changed, 48 insertions, 0 deletions
diff --git a/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-bison-3.7.patch b/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-bison-3.7.patch
new file mode 100644
index 000000000000..de3bbcfc3ef1
--- /dev/null
+++ b/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-bison-3.7.patch
@@ -0,0 +1,46 @@
+From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Tue, 4 Aug 2020 21:04:06 +0300
+Subject: [PATCH] Let Bison generate the header directly, to fix build with
+ Bison 3.7
+
+Starting with Bison 3.7, the generated C++ file #include's the header
+by default, instead of duplicating it. So we should not delete it.
+
+Remove the code to add #ifdef guards to the header, since Bison adds
+them itself since version 2.6.3.
+---
+ Source/WebCore/css/makegrammar.pl | 21 +--------------------
+ 1 file changed, 1 insertion(+), 20 deletions(-)
+
+diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl
+index 5d63b08102eb..9435701c7061 100644
+--- a/Source/WebCore/css/makegrammar.pl
++++ b/Source/WebCore/css/makegrammar.pl
+@@ -73,25 +73,6 @@
+ }
+
+ my $fileBase = File::Spec->join($outputDir, $filename);
+-my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
++my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
+ push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives.
+ system(@bisonCommand) == 0 or die;
+-
+-open HEADER, ">$fileBase.h" or die;
+-print HEADER << "EOF";
+-#ifndef CSSGRAMMAR_H
+-#define CSSGRAMMAR_H
+-EOF
+-
+-open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die;
+-while (<HPP>) {
+- print HEADER;
+-}
+-close HPP;
+-
+-print HEADER "#endif\n";
+-close HEADER;
+-
+-unlink("$fileBase.cpp.h");
+-unlink("$fileBase.hpp");
+-
diff --git a/dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild b/dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild
index dc07eb1bf74c..f7f37face2cb 100644
--- a/dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild
+++ b/dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild
@@ -83,6 +83,8 @@ RDEPEND="${DEPEND}"
CHECKREQS_DISK_BUILD="16G" # bug 417307
+PATCHES=( "${FILESDIR}/${P}-bison-3.7.patch" ) # bug 736499
+
_check_reqs() {
if [[ ${MERGE_TYPE} != binary ]] && is-flagq "-g*" && ! is-flagq "-g*0"; then
einfo "Checking for sufficient disk space to build ${PN} with debugging flags"