qt5-webkit-bison-3.7.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001
  2. From: Dmitry Shachnev <mitya57@gmail.com>
  3. Date: Tue, 4 Aug 2020 21:04:06 +0300
  4. Subject: [PATCH] Let Bison generate the header directly, to fix build with
  5. Bison 3.7
  6. Starting with Bison 3.7, the generated C++ file #include's the header
  7. by default, instead of duplicating it. So we should not delete it.
  8. Remove the code to add #ifdef guards to the header, since Bison adds
  9. them itself since version 2.6.3.
  10. ---
  11. Source/WebCore/css/makegrammar.pl | 21 +--------------------
  12. 1 file changed, 1 insertion(+), 20 deletions(-)
  13. diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl
  14. index 5d63b08102eb5..9435701c70612 100644
  15. --- a/Source/WebCore/css/makegrammar.pl
  16. +++ b/Source/WebCore/css/makegrammar.pl
  17. @@ -73,25 +73,6 @@
  18. }
  19. my $fileBase = File::Spec->join($outputDir, $filename);
  20. -my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
  21. +my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
  22. push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives.
  23. system(@bisonCommand) == 0 or die;
  24. -
  25. -open HEADER, ">$fileBase.h" or die;
  26. -print HEADER << "EOF";
  27. -#ifndef CSSGRAMMAR_H
  28. -#define CSSGRAMMAR_H
  29. -EOF
  30. -
  31. -open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die;
  32. -while (<HPP>) {
  33. - print HEADER;
  34. -}
  35. -close HPP;
  36. -
  37. -print HEADER "#endif\n";
  38. -close HEADER;
  39. -
  40. -unlink("$fileBase.cpp.h");
  41. -unlink("$fileBase.hpp");
  42. -