1 |
commit: 1e51a6db7655c2933200fd427dd4c364b358291d |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 26 12:15:57 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 26 12:41:23 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e51a6db |
7 |
|
8 |
dev-util/kdevelop-pg-qt: Fix build against Qt 5.14.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
.../files/kdevelop-pg-qt-2.2.0-qt-5.14.patch | 60 ++++++++++++++++++++++ |
14 |
.../kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild | 2 + |
15 |
2 files changed, 62 insertions(+) |
16 |
|
17 |
diff --git a/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.0-qt-5.14.patch b/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.0-qt-5.14.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..5a4dec36d88 |
20 |
--- /dev/null |
21 |
+++ b/dev-util/kdevelop-pg-qt/files/kdevelop-pg-qt-2.2.0-qt-5.14.patch |
22 |
@@ -0,0 +1,60 @@ |
23 |
+From d05d0b19e9d6f47fee3e11d837c2c21125589763 Mon Sep 17 00:00:00 2001 |
24 |
+From: Alexey Min <alexey.min@×××××.com> |
25 |
+Date: Thu, 24 Oct 2019 14:34:45 +0300 |
26 |
+Subject: Fix build with Qt 5.14 |
27 |
+MIME-Version: 1.0 |
28 |
+Content-Type: text/plain; charset=UTF-8 |
29 |
+Content-Transfer-Encoding: 8bit |
30 |
+ |
31 |
+Summary: |
32 |
+Trying to build kdevelop-pg-qt with Qt 5.14 results in an error: |
33 |
+``` |
34 |
+.../kdev-pg/kdev-pg-regexp.cpp:44:23: error: redefinition of ‘struct std::hash<QBitArray>’ |
35 |
+ template<> struct hash< type > \ |
36 |
+ ^~~~~~~~~~~~ |
37 |
+.../kdev-pg/kdev-pg-regexp.cpp:53:1: note: in expansion of macro ‘q_Hash_to_tr1_hash’ |
38 |
+ q_Hash_to_tr1_hash(QBitArray) |
39 |
+ ^~~~~~~~~~~~~~~~~~ |
40 |
+In file included from .../prefix514/include/QtCore/qvector.h:47:0, |
41 |
+ from .../prefix514/include/QtCore/QVector:1, |
42 |
+ from .../kdevelop-pg-qt/include/kdev-pg-char-sets.h:36, |
43 |
+ from .../kdevelop-pg-qt/kdev-pg/kdev-pg-regexp.cpp:20: |
44 |
+.../prefix514/include/QtCore/qhashfunctions.h:209:1: note: previous definition of ‘struct std::hash<QBitArray>’ |
45 |
+ QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_CREF(QBitArray) |
46 |
+ ^ |
47 |
+``` |
48 |
+ |
49 |
+std::hash<QBitArray> is already specialized in Qt 5.14, so avoid redefinition with conditional compilation |
50 |
+ |
51 |
+Test Plan: try to build with Qt 5.14 |
52 |
+ |
53 |
+Reviewers: apol |
54 |
+ |
55 |
+Reviewed By: apol |
56 |
+ |
57 |
+Subscribers: kdevelop-devel |
58 |
+ |
59 |
+Tags: #kdevelop |
60 |
+ |
61 |
+Differential Revision: https://phabricator.kde.org/D24914 |
62 |
+--- |
63 |
+ kdev-pg/kdev-pg-regexp.cpp | 3 +++ |
64 |
+ 1 file changed, 3 insertions(+) |
65 |
+ |
66 |
+diff --git a/kdev-pg/kdev-pg-regexp.cpp b/kdev-pg/kdev-pg-regexp.cpp |
67 |
+index 8cc0b95..9fee81c 100644 |
68 |
+--- a/kdev-pg/kdev-pg-regexp.cpp |
69 |
++++ b/kdev-pg/kdev-pg-regexp.cpp |
70 |
+@@ -50,7 +50,10 @@ namespace std \ |
71 |
+ }; \ |
72 |
+ } |
73 |
+ |
74 |
++#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) |
75 |
++// Qt >= 5.14 already has std::hash for QBitArray |
76 |
+ q_Hash_to_tr1_hash(QBitArray) |
77 |
++#endif |
78 |
+ |
79 |
+ namespace KDevPG |
80 |
+ { |
81 |
+-- |
82 |
+cgit v1.1 |
83 |
|
84 |
diff --git a/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild b/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild |
85 |
index 05aa96fc8af..4fac1ce848d 100644 |
86 |
--- a/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild |
87 |
+++ b/dev-util/kdevelop-pg-qt/kdevelop-pg-qt-2.2.0.ebuild |
88 |
@@ -16,6 +16,8 @@ HOMEPAGE="https://www.kdevelop.org/" |
89 |
LICENSE="LGPL-2+ LGPL-2.1+" |
90 |
IUSE="" |
91 |
|
92 |
+PATCHES=( "${FILESDIR}/${P}-qt-5.14.patch" ) |
93 |
+ |
94 |
BDEPEND=" |
95 |
sys-devel/bison |
96 |
sys-devel/flex |