summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-06-28 22:55:39 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-06-28 23:55:22 +0200
commit79f45c1d2526dd37f1bc7a25b8f7feb13ad4575c (patch)
tree93e319943bc4440e5f432e1ec11778b110a1ff68 /mail-client/trojita/files
parentmail-client/trojita: Fix CVE-2019-10734 (diff)
downloadgentoo-79f45c1d2526dd37f1bc7a25b8f7feb13ad4575c.tar.gz
gentoo-79f45c1d2526dd37f1bc7a25b8f7feb13ad4575c.tar.bz2
gentoo-79f45c1d2526dd37f1bc7a25b8f7feb13ad4575c.zip
mail-client/trojita: Fix build with IUSE=test and >=Qt-5.13
Closes: https://bugs.gentoo.org/730058 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'mail-client/trojita/files')
-rw-r--r--mail-client/trojita/files/trojita-0.7-cmake-cxx11.patch66
-rw-r--r--mail-client/trojita/files/trojita-0.7-qt-5.13.patch37
2 files changed, 103 insertions, 0 deletions
diff --git a/mail-client/trojita/files/trojita-0.7-cmake-cxx11.patch b/mail-client/trojita/files/trojita-0.7-cmake-cxx11.patch
new file mode 100644
index 000000000000..71ab15950b83
--- /dev/null
+++ b/mail-client/trojita/files/trojita-0.7-cmake-cxx11.patch
@@ -0,0 +1,66 @@
+From e2e35bfda75a2f4950408c93ede72fabfe86360e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jkt@kde.org>
+Date: Wed, 19 Oct 2016 22:15:16 +0200
+Subject: [PATCH] cmake: Speed up cmake by using native features for enforcing
+ C++11
+
+This saves about 8 seconds in my (limited) testing with a 2016-era
+laptop with plenty of RAM and a fast SSD.
+
+We still attempt to support ancient pre-3.1 CMake by adding that blurb
+into CXXFLAGS, maybe it even works.
+
+I should probably start tracking time I spend supporting old
+environments and evaluate whether this is worth the effort. Once we are
+ready to distribute flatpaks/appimages/whatevers, I suspect that my life
+will become much easier.
+
+Change-Id: Ibbbe3d8440a7d29ef27440a99938d313bfe9699f
+---
+ CMakeLists.txt | 26 ++--
+ 24 files changed, 8 insertions(+), 468 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9393b19c..92a682f7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,6 +18,14 @@ if(POLICY CMP0043)
+ cmake_policy(SET CMP0043 OLD)
+ endif()
+
++if(CMAKE_VERSION VERSION_LESS "3.1")
++ # If you aren't using and old Linux with an old GCC and old CMake, please just upgrade.
++ set(CMAKE_CXX_FLAGS "--std=c++11 ${CMAKE_CXX_FLAGS}")
++else()
++ set(CMAKE_CXX_STANDARD 11)
++ set(CMAKE_CXX_STANDARD_REQUIRED ON)
++endif()
++
+ # Set a default build type if none was specified. This was shamelessly stolen
+ # from VTK's cmake setup because these guys produce both CMake and a project that
+ # manipulates this variable, and the web is full of posts where people say that
+@@ -34,24 +42,6 @@ endif()
+
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+-include(FindCXXFeatures)
+-if(NOT CXXFeatures_auto_FOUND)
+- message(SEND_ERROR "Your compiler doesn't support C++11's auto")
+-endif()
+-if(NOT CXXFeatures_static_assert_FOUND)
+- message(SEND_ERROR "Your compiler doesn't support C++11's static_assert")
+-endif()
+-if(NOT CXXFeatures_alignof_FOUND)
+- message(SEND_ERROR "Your compiler doesn't support C++11's alignof")
+-endif()
+-if(NOT CXXFeatures_nullptr_FOUND)
+- message(SEND_ERROR "Your compiler doesn't support C++11's nullptr")
+-endif()
+-if(NOT CXXFeatures_lambda_FOUND)
+- message(SEND_ERROR "Your compiler doesn't support C++11's lambda functions")
+-endif()
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_COMPILER_FLAGS}")
+-
+ include(TrojitaOption)
+
+ trojita_option(WITH_DESKTOP "Build desktop version" ON)
diff --git a/mail-client/trojita/files/trojita-0.7-qt-5.13.patch b/mail-client/trojita/files/trojita-0.7-qt-5.13.patch
new file mode 100644
index 000000000000..9f1ab3e7e887
--- /dev/null
+++ b/mail-client/trojita/files/trojita-0.7-qt-5.13.patch
@@ -0,0 +1,37 @@
+From 39772585033c1c0aff96f297e93de7be53f9b114 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Sat, 23 Mar 2019 01:17:11 +0100
+Subject: [PATCH] tests: Fix build with Qt 5.13
+
+QTest::toString(QModelIndex) was added in
+7ef0b575b38d267bd3dc14ff46935d556562ff00 and thus causes a build
+error with Qt 5.13 because it's redefined here.
+
+Change-Id: I015800e49cf8d0e87f3541642406396f150d0eeb
+---
+ tests/Imap/test_Imap_BodyParts.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/Imap/test_Imap_BodyParts.cpp b/tests/Imap/test_Imap_BodyParts.cpp
+index f1c577fa..b6e0421d 100644
+--- a/tests/Imap/test_Imap_BodyParts.cpp
++++ b/tests/Imap/test_Imap_BodyParts.cpp
+@@ -51,6 +51,7 @@ struct Data {
+
+ Q_DECLARE_METATYPE(QList<Data>)
+
++#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
+ namespace QTest {
+ template <>
+ char *toString(const QModelIndex &index)
+@@ -60,6 +61,7 @@ char *toString(const QModelIndex &index)
+ return qstrdup(buf.toUtf8().constData());
+ }
+ }
++#endif
+
+ using namespace Imap::Mailbox;
+
+--
+GitLab
+