File bison3_7.patch of Package webkitgtk

diff -ur a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl
--- a/Source/WebCore/css/makegrammar.pl	2016-04-10 09:48:37.000000000 +0300
+++ b/Source/WebCore/css/makegrammar.pl	2020-10-22 13:28:09.382224742 +0300
@@ -73,23 +73,6 @@
 }
 
 my $fileBase = File::Spec->join($outputDir, $filename);
-system("$bison -d -p $symbolsPrefix $grammarFilePath -o $fileBase.cpp");
-
-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");
-
+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;
openSUSE Build Service is sponsored by