From 04a6fa63cf3148698a52b207058254b01c6937b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Mon, 7 Sep 2020 22:55:43 +0200 Subject: qtwebkit: Add patch to fix build with bison 3.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: |... /build/DerivedSources/WebCore/XPathGrammar.cpp:120:10: fatal error: XPathGrammar.hpp: No such file or directory | 120 | #include "XPathGrammar.hpp" | | ^~~~~~~~~~~~~~~~~~ | ... | .../build/DerivedSources/WebCore/CSSGrammar.cpp:160:10: fatal error: CSSGrammar.hpp: No such file or directory | 160 | #include "CSSGrammar.hpp" | | ^~~~~~~~~~~~~~~~ Signed-off-by: Andreas Müller --- .../qt5/qtwebkit/0006-Fix-build-with-bison37.patch | 52 ++++++++++++++++++++++ recipes-qt/qt5/qtwebkit_git.bb | 1 + 2 files changed, 53 insertions(+) create mode 100644 recipes-qt/qt5/qtwebkit/0006-Fix-build-with-bison37.patch diff --git a/recipes-qt/qt5/qtwebkit/0006-Fix-build-with-bison37.patch b/recipes-qt/qt5/qtwebkit/0006-Fix-build-with-bison37.patch new file mode 100644 index 00000000..9262f5fe --- /dev/null +++ b/recipes-qt/qt5/qtwebkit/0006-Fix-build-with-bison37.patch @@ -0,0 +1,52 @@ +From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev +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. + +Found at [1] + +[1] https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31 + +Upstream-Status: Pending +--- + 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 () { +- print HEADER; +-} +-close HPP; +- +-print HEADER "#endif\n"; +-close HEADER; +- +-unlink("$fileBase.cpp.h"); +-unlink("$fileBase.hpp"); +- diff --git a/recipes-qt/qt5/qtwebkit_git.bb b/recipes-qt/qt5/qtwebkit_git.bb index a52ae76e..acd97e09 100644 --- a/recipes-qt/qt5/qtwebkit_git.bb +++ b/recipes-qt/qt5/qtwebkit_git.bb @@ -16,6 +16,7 @@ SRC_URI += "\ file://0003-Fix-build-with-non-glibc-libc-on-musl.patch \ file://0004-Fix-build-bug-for-armv32-BE.patch \ file://0005-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch \ + file://0006-Fix-build-with-bison37.patch \ " inherit cmake_qt5 perlnative -- cgit v1.2.3