forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kmymoney-4.8.0-gpgmepp.patch
77 lines (68 loc) · 2.39 KB
/
kmymoney-4.8.0-gpgmepp.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From cddb71b5bbe0c7d73877f0308ad0ac64d9f99c20 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <[email protected]>
Date: Thu, 10 Nov 2016 15:53:32 +0100
Subject: [PATCH 1/2] Use GpgME++ if possible, QGpgme from kdepimlibs-4 as
fallback
Remove bogus qgpgme include.
REVIEW: 129371
---
CMakeLists.txt | 9 ++++++++-
libkdchart/kdablibfakes/src/KDABLibFakes.h | 3 +++
libkgpgfile/CMakeLists.txt | 2 +-
libkgpgfile/kgpgfile.cpp | 1 -
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2251518..5a01673 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,7 +76,14 @@ else (WIN32)
find_package(Boost "1.33.1" COMPONENTS graph)
endif (WIN32)
# needed by libkgpgfile
-find_package(QGpgme REQUIRED)
+find_package(Gpgmepp 1.7.0)
+set(GPGMEPP_LIBS Gpgmepp)
+if (NOT Gpgmepp_FOUND)
+ find_package(QGpgme REQUIRED)
+ set(GPGMEPP_LIBS ${QGPGME_LIBRARIES})
+else (NOT Gpgmepp_FOUND)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+endif (NOT Gpgmepp_FOUND)
find_package(KdepimLibs REQUIRED)
find_package(SharedMimeInfo REQUIRED)
diff --git a/libkdchart/kdablibfakes/src/KDABLibFakes.h b/libkdchart/kdablibfakes/src/KDABLibFakes.h
index f47ec24..b998723 100644
--- a/libkdchart/kdablibfakes/src/KDABLibFakes.h
+++ b/libkdchart/kdablibfakes/src/KDABLibFakes.h
@@ -59,6 +59,9 @@
#elif defined (Q_OS_DARWIN) || defined (Q_OS_CYGWIN)
#define ISNAN(x) std::isnan(x)
#define ISINF(x) std::isinf(x)
+#elif defined (__GXX_EXPERIMENTAL_CXX0X) || __cplusplus >= 201103L
+#define ISNAN(x) std::isnan(x)
+#define ISINF(x) std::isinf(x)
#else
#define ISNAN(x) isnan(x)
#define ISINF(x) isinf(x)
diff --git a/libkgpgfile/CMakeLists.txt b/libkgpgfile/CMakeLists.txt
index a41a6a4..a7c982e 100644
--- a/libkgpgfile/CMakeLists.txt
+++ b/libkgpgfile/CMakeLists.txt
@@ -7,6 +7,6 @@ set(kgpgfile_STAT_SRCS
)
kde4_add_library(kgpgfile STATIC ${kgpgfile_STAT_SRCS})
-target_link_libraries(kgpgfile ${QGPGME_LIBRARIES})
+target_link_libraries(kgpgfile ${GPGMEPP_LIBS})
diff --git a/libkgpgfile/kgpgfile.cpp b/libkgpgfile/kgpgfile.cpp
index b1870be..a5d3d4e 100644
--- a/libkgpgfile/kgpgfile.cpp
+++ b/libkgpgfile/kgpgfile.cpp
@@ -47,7 +47,6 @@
#include <gpgme++/keylistresult.h>
#include <gpgme++/key.h>
#include <gpgme++/data.h>
-#include <qgpgme/dataprovider.h>
class KGPGFile::Private
{
--
2.7.3