1 |
tampakrap 11/02/05 13:28:43 |
2 |
|
3 |
Modified: |
4 |
plasma-workspace-4.6.0-optional_akonadi-server.patch |
5 |
Log: |
6 |
Properly fix bug 350850 in making akonadi optional |
7 |
Should also fix bug 353730 and bug 353744 |
8 |
Patch taken from upstream commit 5d49ab8a005166563e925e0768857517fea9228e |
9 |
|
10 |
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.2 kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch?rev=1.2&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch?rev=1.2&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch?r1=1.1&r2=1.2 |
18 |
|
19 |
Index: plasma-workspace-4.6.0-optional_akonadi-server.patch |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch,v |
22 |
retrieving revision 1.1 |
23 |
retrieving revision 1.2 |
24 |
diff -u -r1.1 -r1.2 |
25 |
--- plasma-workspace-4.6.0-optional_akonadi-server.patch 4 Feb 2011 13:28:34 -0000 1.1 |
26 |
+++ plasma-workspace-4.6.0-optional_akonadi-server.patch 5 Feb 2011 13:28:43 -0000 1.2 |
27 |
@@ -1,16 +1,130 @@ |
28 |
-diff -r -u plasma-workspace-4.6.0-orig/plasma/generic/dataengines/CMakeLists.txt plasma-workspace-4.6.0/plasma/generic/dataengines/CMakeLists.txt |
29 |
---- plasma-workspace-4.6.0-orig/plasma/generic/dataengines/CMakeLists.txt 2011-02-03 18:58:47.884000165 -0500 |
30 |
-+++ plasma-workspace-4.6.0/plasma/generic/dataengines/CMakeLists.txt 2011-02-03 19:24:21.511000165 -0500 |
31 |
-@@ -28,8 +28,10 @@ |
32 |
- macro_log_feature(KDEPIMLIBS_FOUND "kdepimlibs" "KDE PIM libraries" "http://www.kde.org" FALSE "" "Needed for building several plasma dataengines") |
33 |
+diff --git a/plasma/generic/dataengines/CMakeLists.txt b/plasma/generic/dataengines/CMakeLists.txt |
34 |
+index 4664a02..1278224 100644 |
35 |
+--- a/plasma/generic/dataengines/CMakeLists.txt |
36 |
++++ b/plasma/generic/dataengines/CMakeLists.txt |
37 |
+@@ -25,10 +25,15 @@ if (NEPOMUK_FOUND) |
38 |
+ endif (NEPOMUK_FOUND) |
39 |
+ |
40 |
+ macro_optional_find_package(KdepimLibs 4.5.60) |
41 |
+-macro_log_feature(KDEPIMLIBS_FOUND "kdepimlibs" "KDE PIM libraries" "http://www.kde.org" FALSE "" "Needed for building several plasma dataengines") |
42 |
++macro_log_feature(KDEPIMLIBS_FOUND "kdepimlibs" "KDE PIM libraries" "http://www.kde.org" FALSE "" "Needed for building several Plasma DataEngines") |
43 |
++ |
44 |
++macro_optional_find_package(Akonadi) |
45 |
++macro_log_feature(AKONADI_FOUND "Akonadi" "Akonadi libraries" "http://pim.kde.org/akonadi/" FALSE "" "Needed for event support in the calendar DataEngine") |
46 |
|
47 |
if(KDEPIMLIBS_FOUND) |
48 |
- add_subdirectory(akonadi) |
49 |
-- add_subdirectory(calendar) |
50 |
+ if(AKONADI_FOUND) |
51 |
+ add_subdirectory(akonadi) |
52 |
-+ add_subdirectory(calendar) |
53 |
+ endif(AKONADI_FOUND) |
54 |
+ add_subdirectory(calendar) |
55 |
add_subdirectory(rss) |
56 |
endif(KDEPIMLIBS_FOUND) |
57 |
+diff --git a/plasma/generic/dataengines/calendar/CMakeLists.txt b/plasma/generic/dataengines/calendar/CMakeLists.txt |
58 |
+index d3d76e6..a6abcdc 100644 |
59 |
+--- a/plasma/generic/dataengines/calendar/CMakeLists.txt |
60 |
++++ b/plasma/generic/dataengines/calendar/CMakeLists.txt |
61 |
+@@ -1,7 +1,6 @@ |
62 |
+ project(calendar_engine) |
63 |
+ |
64 |
+ find_package(KdepimLibs REQUIRED) |
65 |
+-find_package(Akonadi REQUIRED) |
66 |
+ find_package(Boost REQUIRED) |
67 |
+ |
68 |
+ include_directories( |
69 |
+@@ -14,14 +13,20 @@ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) |
70 |
+ |
71 |
+ set(calendar_engine_srcs |
72 |
+ calendarengine.cpp |
73 |
+- eventdatacontainer.cpp |
74 |
+-# taken from kdepim/akonadi/kcal as long as it's not yet exported: |
75 |
+- akonadi/calendar.cpp |
76 |
+- akonadi/calendarmodel.cpp |
77 |
+- akonadi/calfilterproxymodel.cpp |
78 |
+- akonadi/utils.cpp |
79 |
+ ) |
80 |
+ |
81 |
++if(AKONADI_FOUND) |
82 |
++ ADD_DEFINITIONS(-DAKONADI_FOUND) |
83 |
++ set(calendar_engine_srcs ${calendar_engine_srcs} |
84 |
++ eventdatacontainer.cpp |
85 |
++ # taken from kdepim/akonadi/kcal as long as it's not yet exported: |
86 |
++ akonadi/calendar.cpp |
87 |
++ akonadi/calendarmodel.cpp |
88 |
++ akonadi/calfilterproxymodel.cpp |
89 |
++ akonadi/utils.cpp |
90 |
++ ) |
91 |
++endif(AKONADI_FOUND) |
92 |
++ |
93 |
+ kde4_add_plugin(plasma_engine_calendar ${calendar_engine_srcs}) |
94 |
+ |
95 |
+ target_link_libraries( |
96 |
+@@ -29,13 +34,19 @@ target_link_libraries( |
97 |
+ ${KDEPIMLIBS_KHOLIDAYS_LIBRARY} |
98 |
+ ${KDE4_KDECORE_LIBS} |
99 |
+ ${KDE4_PLASMA_LIBS} |
100 |
+- ${KDE4_AKONADI_LIBS} |
101 |
+ ${KDE4_KMIME_LIBS} |
102 |
+ ${KDE4_KCALCORE_LIBS} |
103 |
+ ${KDE4_KCALUTILS_LIBS} |
104 |
+- ${KDEPIMLIBS_AKONADI_KCAL_LIBS} |
105 |
+ ) |
106 |
+ |
107 |
++if(AKONADI_FOUND) |
108 |
++ target_link_libraries( |
109 |
++ plasma_engine_calendar |
110 |
++ ${KDE4_AKONADI_LIBS} |
111 |
++ ${KDEPIMLIBS_AKONADI_KCAL_LIBS} |
112 |
++ ) |
113 |
++endif(AKONADI_FOUND) |
114 |
++ |
115 |
+ install(TARGETS plasma_engine_calendar DESTINATION ${PLUGIN_INSTALL_DIR}) |
116 |
+ install(FILES plasma-dataengine-calendar.desktop DESTINATION ${SERVICES_INSTALL_DIR}) |
117 |
+ |
118 |
+diff --git a/plasma/generic/dataengines/calendar/calendarengine.cpp b/plasma/generic/dataengines/calendar/calendarengine.cpp |
119 |
+index 0fdd65d..53f98c0 100644 |
120 |
+--- a/plasma/generic/dataengines/calendar/calendarengine.cpp |
121 |
++++ b/plasma/generic/dataengines/calendar/calendarengine.cpp |
122 |
+@@ -32,6 +32,7 @@ |
123 |
+ #include <KCalCore/Todo> |
124 |
+ #include <KCalCore/Journal> |
125 |
+ |
126 |
++#ifdef AKONADI_FOUND |
127 |
+ #include <Akonadi/ChangeRecorder> |
128 |
+ #include <Akonadi/Session> |
129 |
+ #include <Akonadi/Collection> |
130 |
+@@ -41,6 +42,7 @@ |
131 |
+ #include "akonadi/calendar.h" |
132 |
+ #include "akonadi/calendarmodel.h" |
133 |
+ #include "eventdatacontainer.h" |
134 |
++#endif |
135 |
+ |
136 |
+ CalendarEngine::CalendarEngine(QObject* parent, const QVariantList& args) |
137 |
+ : Plasma::DataEngine(parent), |
138 |
+@@ -74,9 +76,11 @@ bool CalendarEngine::sourceRequestEvent(const QString &request) |
139 |
+ return holidayCalendarSourceRequest(requestKey, requestTokens, request); |
140 |
+ } |
141 |
+ |
142 |
++#ifdef AKONADI_FOUND |
143 |
+ if (requestKey == "events" || requestKey == "eventsInMonth") { |
144 |
+ return akonadiCalendarSourceRequest(requestKey, requestTokens, request); |
145 |
+ } |
146 |
++#endif |
147 |
+ |
148 |
+ return false; |
149 |
+ } |
150 |
+@@ -272,6 +276,7 @@ bool CalendarEngine::holidayCalendarSourceRequest(const QString& key, const QStr |
151 |
+ return false; |
152 |
+ } |
153 |
+ |
154 |
++#ifdef AKONADI_FOUND |
155 |
+ bool CalendarEngine::akonadiCalendarSourceRequest(const QString& key, const QStringList& args, const QString& request) |
156 |
+ { |
157 |
+ // figure out what time range was requested from the source string |
158 |
+@@ -339,5 +344,6 @@ void CalendarEngine::initAkonadiCalendar() |
159 |
+ calendarModel->setCollectionFetchStrategy(Akonadi::EntityTreeModel::InvisibleCollectionFetch); |
160 |
+ m_calendar = new CalendarSupport::Calendar(calendarModel, calendarModel, KSystemTimeZones::local()); |
161 |
+ } |
162 |
++#endif |
163 |
|
164 |
+ #include "calendarengine.moc" |