commit:     158d589c8aa05a7f1695fa6b39c94e285ccca927
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 17 21:54:09 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Nov 17 21:54:09 2019 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=158d589c

kde-apps/akonadi: Fix build with Qt 5.14

Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-apps/akonadi/akonadi-19.11.80.ebuild           |  6 ++-
 .../akonadi/files/akonadi-19.11.80-qt-5.14.patch   | 46 ++++++++++++++++++++++
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/kde-apps/akonadi/akonadi-19.11.80.ebuild 
b/kde-apps/akonadi/akonadi-19.11.80.ebuild
index 886147b825..41ff83a435 100644
--- a/kde-apps/akonadi/akonadi-19.11.80.ebuild
+++ b/kde-apps/akonadi/akonadi-19.11.80.ebuild
@@ -37,6 +37,7 @@ COMMON_DEPEND="
        >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
        >=kde-frameworks/kwindowsystem-${KFMIN}:5
        >=kde-frameworks/kxmlgui-${KFMIN}:5
+       >=dev-qt/qtcore-${QTMIN}:5=
        >=dev-qt/qtdbus-${QTMIN}:5
        >=dev-qt/qtgui-${QTMIN}:5
        >=dev-qt/qtnetwork-${QTMIN}:5
@@ -69,7 +70,10 @@ RDEPEND="${COMMON_DEPEND}
 # some akonadi tests time out, that probably needs more work as it's ~700 tests
 RESTRICT+=" test"
 
-PATCHES=( "${FILESDIR}/${PN}-18.12.2-mysql56-crash.patch" )
+PATCHES=(
+       "${FILESDIR}/${PN}-18.12.2-mysql56-crash.patch"
+       "${FILESDIR}/${P}-qt-5.14.patch"
+)
 
 pkg_setup() {
        # Set default storage backend in order: MySQL, PostgreSQL, SQLite

diff --git a/kde-apps/akonadi/files/akonadi-19.11.80-qt-5.14.patch 
b/kde-apps/akonadi/files/akonadi-19.11.80-qt-5.14.patch
new file mode 100644
index 0000000000..c3165698b2
--- /dev/null
+++ b/kde-apps/akonadi/files/akonadi-19.11.80-qt-5.14.patch
@@ -0,0 +1,46 @@
+From 1d4bb01a60548ae9a5439186fbe155f9f7d492e4 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <[email protected]>
+Date: Sun, 17 Nov 2019 18:45:49 +0100
+Subject: Fix build with Qt 5.14
+
+Summary:
+std::hash<QString> is already specialized in Qt 5.14 [1], so we need
+to avoid redifining it with this version.
+
+[1] 4469e36d7203a55a4e158a50f0e9effc3f2fa3c2 in qtbase.git
+
+Test Plan: Builds fine with Qt 5.14.0-beta3
+
+Reviewers: #kde_pim
+
+Subscribers: kde-pim
+
+Tags: #kde_pim
+
+Differential Revision: https://phabricator.kde.org/D25356
+---
+ src/shared/akstd.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/shared/akstd.h b/src/shared/akstd.h
+index 4078ee4..774c432 100644
+--- a/src/shared/akstd.h
++++ b/src/shared/akstd.h
+@@ -29,6 +29,7 @@
+ 
+ namespace std {
+ 
++#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
+ template<>
+ struct hash<QString> {
+     using argument_type = QString;
+@@ -39,6 +40,7 @@ struct hash<QString> {
+         return qHash(s);
+     }
+ };
++#endif
+ 
+ }
+ 
+-- 
+cgit v1.1

Reply via email to