guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/05: gnu: QtWebKit: Fix building with Bison 3.7.


From: guix-commits
Subject: 04/05: gnu: QtWebKit: Fix building with Bison 3.7.
Date: Sat, 28 Aug 2021 12:17:08 -0400 (EDT)

glv pushed a commit to branch core-updates-frozen
in repository guix.

commit 4c9d8ff14212c7266b80ccd498f96f92eb1a08a0
Author: Leo Famulari <leo@famulari.name>
AuthorDate: Wed Aug 11 11:35:04 2021 -0400

    gnu: QtWebKit: Fix building with Bison 3.7.
    
    * gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/qt.scm (qtwebkit)[source]: Use it.
    
    Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
---
 gnu/local.mk                                       |  1 +
 .../qtwebkit-fix-building-with-bison-3.7.patch     | 54 ++++++++++++++++++++++
 gnu/packages/qt.scm                                |  1 +
 3 files changed, 56 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 7d91538..ad2e4db 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1657,6 +1657,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/quassel-qt-514-compat.patch             \
   %D%/packages/patches/quickswitch-fix-dmenu-check.patch       \
   %D%/packages/patches/qtwebkit-pbutils-include.patch          \
+  %D%/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch \
   %D%/packages/patches/qtwebkit-fix-building-with-python-3.9.patch     \
   %D%/packages/patches/qtwebkit-fix-building-with-icu-68.patch \
   %D%/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch      \
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch 
b/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch
new file mode 100644
index 0000000..ddaf8e2
--- /dev/null
+++ b/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch
@@ -0,0 +1,54 @@
+Fix build with Bison 3.7
+
+https://bugs.gentoo.org/736499
+
+Patch copied from upstream source repository:
+
+https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31
+
+From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+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.
+---
+ 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 5d63b08102eb5..9435701c70612 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 (<HPP>) {
+-    print HEADER;
+-}
+-close HPP;
+-
+-print HEADER "#endif\n";
+-close HEADER;
+-
+-unlink("$fileBase.cpp.h");
+-unlink("$fileBase.hpp");
+-
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index a6b3f65..5c0576c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2625,6 +2625,7 @@ different kinds of sliders, and much more.")
          (base32
           "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
         (patches (search-patches "qtwebkit-pbutils-include.patch"
+                                 "qtwebkit-fix-building-with-bison-3.7.patch"
                                  "qtwebkit-fix-building-with-glib-2.68.patch"
                                  "qtwebkit-fix-building-with-icu-68.patch"
                                  
"qtwebkit-fix-building-with-python-3.9.patch"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]