Annotation of /trunk/libkolab/patches/libkolab-0.6.0-check-for-generic-tag.patch
Parent Directory | Revision Log
Revision 2606 -
(hide annotations)
(download)
Wed Jul 8 07:10:28 2015 UTC (9 years, 2 months ago) by niro
File size: 1933 byte(s)
Wed Jul 8 07:10:28 2015 UTC (9 years, 2 months ago) by niro
File size: 1933 byte(s)
-fixed build against kdepimlibs-4.14
1 | niro | 2606 | From 34edc0a846b87570c06a5942b458adb720a34a9b Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Sandro=20Knau=C3=9F?= <mail@sandroknauss.de> | ||
3 | Date: Tue, 10 Feb 2015 10:59:18 +0100 | ||
4 | Subject: Make libkolab compile with upstream kdepimlibs | ||
5 | |||
6 | Because GENERIC tags have not entered upstream, we have to test for | ||
7 | support. Our integration branch not supports a feature flag to indicate | ||
8 | the availability of that feature. | ||
9 | |||
10 | KOLAB: #4448 | ||
11 | |||
12 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
13 | index 365edac..bd53e27 100644 | ||
14 | --- a/CMakeLists.txt | ||
15 | +++ b/CMakeLists.txt | ||
16 | @@ -78,6 +78,11 @@ add_definitions( -DKDEPIMLIBS_VERSION_MAJOR=${KdepimLibs_VERSION_MAJOR} ) | ||
17 | add_definitions( -DKDEPIMLIBS_VERSION_MINOR=${KdepimLibs_VERSION_MINOR} ) | ||
18 | add_definitions( -DKDEPIMLIBS_VERSION_PATCH=${KdepimLibs_VERSION_PATCH} ) | ||
19 | |||
20 | +#Tag::GENERIC is only available at the moment at the kolab/integration branches | ||
21 | +if (KDEPIMLIBS_HAS_GENERIC_TAG) | ||
22 | + add_definitions( -DKDEPIMLIBS_HAS_GENERIC_TAG) | ||
23 | +endif() | ||
24 | + | ||
25 | if("${KdepimLibs_VERSION}" VERSION_GREATER "4.8.40" OR USE_LIBCALENDARING) | ||
26 | add_definitions(-DKDEPIMLIBS_VERSION_DEVEL) | ||
27 | endif() | ||
28 | diff --git a/kolabformat/kolabobject.cpp b/kolabformat/kolabobject.cpp | ||
29 | index 681b4a5..e5c404d 100644 | ||
30 | --- a/kolabformat/kolabobject.cpp | ||
31 | +++ b/kolabformat/kolabobject.cpp | ||
32 | @@ -435,8 +435,11 @@ ObjectType KolabObjectReader::Private::readKolabV3(const KMime::Message::Ptr &ms | ||
33 | mTag = Akonadi::Tag(); | ||
34 | mTag.setName(Conversion::fromStdString(relation.name())); | ||
35 | mTag.setGid(Conversion::fromStdString(configuration.uid()).toLatin1()); | ||
36 | +#ifdef KDEPIMLIBS_HAS_GENERIC_TAG | ||
37 | mTag.setType(Akonadi::Tag::GENERIC); | ||
38 | - | ||
39 | +#else | ||
40 | + mTag.setType(Akonadi::Tag::PLAIN); | ||
41 | +#endif | ||
42 | mTagMembers.reserve(relation.members().size()); | ||
43 | foreach (const std::string &member, relation.members()) { | ||
44 | mTagMembers << Conversion::fromStdString(member); |