File qt5-qwebkit-fix-deprecated-grammer.patch of Package mingw32-libqt5-qtwebkit
diff -ur qtwebkit-everywhere-src-5.15.14+kde0.orig/Source/WebCore/css/CSSGrammar.y.in qtwebkit-everywhere-src-5.15.14+kde0/Source/WebCore/css/CSSGrammar.y.in
--- qtwebkit-everywhere-src-5.15.14+kde0.orig/Source/WebCore/css/CSSGrammar.y.in 2020-03-05 03:21:04.000000000 +0100
+++ qtwebkit-everywhere-src-5.15.14+kde0/Source/WebCore/css/CSSGrammar.y.in 2025-06-05 08:46:55.994534162 +0200
@@ -21,7 +21,7 @@
*
*/
-%pure-parser
+%define api.pure
%parse-param { CSSParser* parser }
%lex-param { CSSParser* parser }
diff -ur qtwebkit-everywhere-src-5.15.14+kde0.orig/Source/WebCore/css/makegrammar.pl qtwebkit-everywhere-src-5.15.14+kde0/Source/WebCore/css/makegrammar.pl
--- qtwebkit-everywhere-src-5.15.14+kde0.orig/Source/WebCore/css/makegrammar.pl 2020-03-05 03:21:04.000000000 +0100
+++ qtwebkit-everywhere-src-5.15.14+kde0/Source/WebCore/css/makegrammar.pl 2025-06-05 09:56:08.136929460 +0200
@@ -73,25 +73,8 @@
}
my $fileBase = File::Spec->join($outputDir, $filename);
-my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
+my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "--header=$fileBase.h", "-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.
+print "calling " . join(" ", @bisonCommand) . "\n";
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 -ur qtwebkit-everywhere-src-5.15.14+kde0.orig/Source/WebCore/xml/XPathGrammar.y qtwebkit-everywhere-src-5.15.14+kde0/Source/WebCore/xml/XPathGrammar.y
--- qtwebkit-everywhere-src-5.15.14+kde0.orig/Source/WebCore/xml/XPathGrammar.y 2020-03-05 03:21:04.000000000 +0100
+++ qtwebkit-everywhere-src-5.15.14+kde0/Source/WebCore/xml/XPathGrammar.y 2025-06-05 09:16:18.537672183 +0200
@@ -47,7 +47,7 @@
%}
-%pure-parser
+%define api.pure
%lex-param { parser }
%parse-param { Parser& parser }