diff --git a/qt5-qtwebkit.spec b/qt5-qtwebkit.spec index 64f4fb2..9f53405 100644 --- a/qt5-qtwebkit.spec +++ b/qt5-qtwebkit.spec @@ -26,6 +26,7 @@ Source0: https://github.com/qtwebkit/qtwebkit/releases/download/%{qt_modu # Patch for new CMake policy CMP0071 to explicitly use old behaviour. Patch2: qtwebkit-5.212.0_cmake_cmp0071.patch Patch3: qtwebkit-5.212.0-json.patch +Patch4: qtwebkit-bison37.patch BuildRequires: bison BuildRequires: cmake diff --git a/qtwebkit-bison37.patch b/qtwebkit-bison37.patch new file mode 100644 index 0000000..488dfda --- /dev/null +++ b/qtwebkit-bison37.patch @@ -0,0 +1,39 @@ +Description: let Bison generate the header directly + 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. +Author: Dmitry Shachnev +Forwarded: not-yet +Last-Update: 2020-08-04 + +--- a/Source/WebCore/css/makegrammar.pl ++++ b/Source/WebCore/css/makegrammar.pl +@@ -73,25 +73,6 @@ if ($suffix eq ".y.in") { + } + + 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"); +-