1 |
commit: 69e618c88a9134f754264efc11aa0b1fdc028b88 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 18 13:56:16 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 18 17:48:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69e618c8 |
7 |
|
8 |
dev-qt/qtwebkit: Fix build with sys-devel/bison-3.7 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/736499 |
11 |
Package-Manager: Portage-3.0.3, Repoman-3.0.0 |
12 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
13 |
|
14 |
.../qtwebkit-5.212.0_pre20200309-bison-3.7.patch | 46 ++++++++++++++++++++++ |
15 |
.../qtwebkit-5.212.0_pre20200309-r1.ebuild | 2 + |
16 |
2 files changed, 48 insertions(+) |
17 |
|
18 |
diff --git a/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-bison-3.7.patch b/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-bison-3.7.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..de3bbcfc3ef |
21 |
--- /dev/null |
22 |
+++ b/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-bison-3.7.patch |
23 |
@@ -0,0 +1,46 @@ |
24 |
+From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001 |
25 |
+From: Dmitry Shachnev <mitya57@×××××.com> |
26 |
+Date: Tue, 4 Aug 2020 21:04:06 +0300 |
27 |
+Subject: [PATCH] Let Bison generate the header directly, to fix build with |
28 |
+ Bison 3.7 |
29 |
+ |
30 |
+Starting with Bison 3.7, the generated C++ file #include's the header |
31 |
+by default, instead of duplicating it. So we should not delete it. |
32 |
+ |
33 |
+Remove the code to add #ifdef guards to the header, since Bison adds |
34 |
+them itself since version 2.6.3. |
35 |
+--- |
36 |
+ Source/WebCore/css/makegrammar.pl | 21 +-------------------- |
37 |
+ 1 file changed, 1 insertion(+), 20 deletions(-) |
38 |
+ |
39 |
+diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl |
40 |
+index 5d63b08102eb..9435701c7061 100644 |
41 |
+--- a/Source/WebCore/css/makegrammar.pl |
42 |
++++ b/Source/WebCore/css/makegrammar.pl |
43 |
+@@ -73,25 +73,6 @@ |
44 |
+ } |
45 |
+ |
46 |
+ my $fileBase = File::Spec->join($outputDir, $filename); |
47 |
+-my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); |
48 |
++my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); |
49 |
+ push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives. |
50 |
+ system(@bisonCommand) == 0 or die; |
51 |
+- |
52 |
+-open HEADER, ">$fileBase.h" or die; |
53 |
+-print HEADER << "EOF"; |
54 |
+-#ifndef CSSGRAMMAR_H |
55 |
+-#define CSSGRAMMAR_H |
56 |
+-EOF |
57 |
+- |
58 |
+-open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die; |
59 |
+-while (<HPP>) { |
60 |
+- print HEADER; |
61 |
+-} |
62 |
+-close HPP; |
63 |
+- |
64 |
+-print HEADER "#endif\n"; |
65 |
+-close HEADER; |
66 |
+- |
67 |
+-unlink("$fileBase.cpp.h"); |
68 |
+-unlink("$fileBase.hpp"); |
69 |
+- |
70 |
|
71 |
diff --git a/dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild b/dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild |
72 |
index dc07eb1bf74..f7f37face2c 100644 |
73 |
--- a/dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild |
74 |
+++ b/dev-qt/qtwebkit/qtwebkit-5.212.0_pre20200309-r1.ebuild |
75 |
@@ -83,6 +83,8 @@ RDEPEND="${DEPEND}" |
76 |
|
77 |
CHECKREQS_DISK_BUILD="16G" # bug 417307 |
78 |
|
79 |
+PATCHES=( "${FILESDIR}/${P}-bison-3.7.patch" ) # bug 736499 |
80 |
+ |
81 |
_check_reqs() { |
82 |
if [[ ${MERGE_TYPE} != binary ]] && is-flagq "-g*" && ! is-flagq "-g*0"; then |
83 |
einfo "Checking for sufficient disk space to build ${PN} with debugging flags" |