summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Chatzimichos <tampakrap@gentoo.org>2011-02-05 13:28:43 +0000
committerTheo Chatzimichos <tampakrap@gentoo.org>2011-02-05 13:28:43 +0000
commit83c3ed0afab90c469025657d2aa76d25228ce5fb (patch)
tree7af3fa9a1e1d7c7a31670d96535774592a53398e
parentFix building with x11-libs/libnotify >= 0.7. (diff)
downloadgentoo-2-83c3ed0afab90c469025657d2aa76d25228ce5fb.tar.gz
gentoo-2-83c3ed0afab90c469025657d2aa76d25228ce5fb.tar.bz2
gentoo-2-83c3ed0afab90c469025657d2aa76d25228ce5fb.zip
Properly fix bug 350850 in making akonadi optional
Should also fix bug 353730 and bug 353744 Patch taken from upstream commit 5d49ab8a005166563e925e0768857517fea9228e (Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
-rw-r--r--kde-base/plasma-workspace/ChangeLog8
-rw-r--r--kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch128
2 files changed, 128 insertions, 8 deletions
diff --git a/kde-base/plasma-workspace/ChangeLog b/kde-base/plasma-workspace/ChangeLog
index 8320dee766bb..7f4b9bd11997 100644
--- a/kde-base/plasma-workspace/ChangeLog
+++ b/kde-base/plasma-workspace/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for kde-base/plasma-workspace
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/plasma-workspace/ChangeLog,v 1.90 2011/02/04 13:28:34 tampakrap Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/plasma-workspace/ChangeLog,v 1.91 2011/02/05 13:28:43 tampakrap Exp $
+
+ 05 Feb 2011; Theo Chatzimichos <tampakrap@gentoo.org>
+ files/plasma-workspace-4.6.0-optional_akonadi-server.patch:
+ Properly fix bug 350850 in making akonadi optional
+ Should also fix bug 353730 and bug 353744
+ Patch taken from upstream commit 5d49ab8a005166563e925e0768857517fea9228e
04 Feb 2011; Theo Chatzimichos <tampakrap@gentoo.org>
plasma-workspace-4.6.0.ebuild,
diff --git a/kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch b/kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch
index de333bca99a2..839734d6f59f 100644
--- a/kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch
+++ b/kde-base/plasma-workspace/files/plasma-workspace-4.6.0-optional_akonadi-server.patch
@@ -1,16 +1,130 @@
-diff -r -u plasma-workspace-4.6.0-orig/plasma/generic/dataengines/CMakeLists.txt plasma-workspace-4.6.0/plasma/generic/dataengines/CMakeLists.txt
---- plasma-workspace-4.6.0-orig/plasma/generic/dataengines/CMakeLists.txt 2011-02-03 18:58:47.884000165 -0500
-+++ plasma-workspace-4.6.0/plasma/generic/dataengines/CMakeLists.txt 2011-02-03 19:24:21.511000165 -0500
-@@ -28,8 +28,10 @@
- macro_log_feature(KDEPIMLIBS_FOUND "kdepimlibs" "KDE PIM libraries" "http://www.kde.org" FALSE "" "Needed for building several plasma dataengines")
+diff --git a/plasma/generic/dataengines/CMakeLists.txt b/plasma/generic/dataengines/CMakeLists.txt
+index 4664a02..1278224 100644
+--- a/plasma/generic/dataengines/CMakeLists.txt
++++ b/plasma/generic/dataengines/CMakeLists.txt
+@@ -25,10 +25,15 @@ if (NEPOMUK_FOUND)
+ endif (NEPOMUK_FOUND)
+
+ macro_optional_find_package(KdepimLibs 4.5.60)
+-macro_log_feature(KDEPIMLIBS_FOUND "kdepimlibs" "KDE PIM libraries" "http://www.kde.org" FALSE "" "Needed for building several plasma dataengines")
++macro_log_feature(KDEPIMLIBS_FOUND "kdepimlibs" "KDE PIM libraries" "http://www.kde.org" FALSE "" "Needed for building several Plasma DataEngines")
++
++macro_optional_find_package(Akonadi)
++macro_log_feature(AKONADI_FOUND "Akonadi" "Akonadi libraries" "http://pim.kde.org/akonadi/" FALSE "" "Needed for event support in the calendar DataEngine")
if(KDEPIMLIBS_FOUND)
- add_subdirectory(akonadi)
-- add_subdirectory(calendar)
+ if(AKONADI_FOUND)
+ add_subdirectory(akonadi)
-+ add_subdirectory(calendar)
+ endif(AKONADI_FOUND)
+ add_subdirectory(calendar)
add_subdirectory(rss)
endif(KDEPIMLIBS_FOUND)
+diff --git a/plasma/generic/dataengines/calendar/CMakeLists.txt b/plasma/generic/dataengines/calendar/CMakeLists.txt
+index d3d76e6..a6abcdc 100644
+--- a/plasma/generic/dataengines/calendar/CMakeLists.txt
++++ b/plasma/generic/dataengines/calendar/CMakeLists.txt
+@@ -1,7 +1,6 @@
+ project(calendar_engine)
+
+ find_package(KdepimLibs REQUIRED)
+-find_package(Akonadi REQUIRED)
+ find_package(Boost REQUIRED)
+
+ include_directories(
+@@ -14,14 +13,20 @@ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
+
+ set(calendar_engine_srcs
+ calendarengine.cpp
+- eventdatacontainer.cpp
+-# taken from kdepim/akonadi/kcal as long as it's not yet exported:
+- akonadi/calendar.cpp
+- akonadi/calendarmodel.cpp
+- akonadi/calfilterproxymodel.cpp
+- akonadi/utils.cpp
+ )
+
++if(AKONADI_FOUND)
++ ADD_DEFINITIONS(-DAKONADI_FOUND)
++ set(calendar_engine_srcs ${calendar_engine_srcs}
++ eventdatacontainer.cpp
++ # taken from kdepim/akonadi/kcal as long as it's not yet exported:
++ akonadi/calendar.cpp
++ akonadi/calendarmodel.cpp
++ akonadi/calfilterproxymodel.cpp
++ akonadi/utils.cpp
++ )
++endif(AKONADI_FOUND)
++
+ kde4_add_plugin(plasma_engine_calendar ${calendar_engine_srcs})
+
+ target_link_libraries(
+@@ -29,13 +34,19 @@ target_link_libraries(
+ ${KDEPIMLIBS_KHOLIDAYS_LIBRARY}
+ ${KDE4_KDECORE_LIBS}
+ ${KDE4_PLASMA_LIBS}
+- ${KDE4_AKONADI_LIBS}
+ ${KDE4_KMIME_LIBS}
+ ${KDE4_KCALCORE_LIBS}
+ ${KDE4_KCALUTILS_LIBS}
+- ${KDEPIMLIBS_AKONADI_KCAL_LIBS}
+ )
+
++if(AKONADI_FOUND)
++ target_link_libraries(
++ plasma_engine_calendar
++ ${KDE4_AKONADI_LIBS}
++ ${KDEPIMLIBS_AKONADI_KCAL_LIBS}
++ )
++endif(AKONADI_FOUND)
++
+ install(TARGETS plasma_engine_calendar DESTINATION ${PLUGIN_INSTALL_DIR})
+ install(FILES plasma-dataengine-calendar.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+
+diff --git a/plasma/generic/dataengines/calendar/calendarengine.cpp b/plasma/generic/dataengines/calendar/calendarengine.cpp
+index 0fdd65d..53f98c0 100644
+--- a/plasma/generic/dataengines/calendar/calendarengine.cpp
++++ b/plasma/generic/dataengines/calendar/calendarengine.cpp
+@@ -32,6 +32,7 @@
+ #include <KCalCore/Todo>
+ #include <KCalCore/Journal>
+
++#ifdef AKONADI_FOUND
+ #include <Akonadi/ChangeRecorder>
+ #include <Akonadi/Session>
+ #include <Akonadi/Collection>
+@@ -41,6 +42,7 @@
+ #include "akonadi/calendar.h"
+ #include "akonadi/calendarmodel.h"
+ #include "eventdatacontainer.h"
++#endif
+
+ CalendarEngine::CalendarEngine(QObject* parent, const QVariantList& args)
+ : Plasma::DataEngine(parent),
+@@ -74,9 +76,11 @@ bool CalendarEngine::sourceRequestEvent(const QString &request)
+ return holidayCalendarSourceRequest(requestKey, requestTokens, request);
+ }
+
++#ifdef AKONADI_FOUND
+ if (requestKey == "events" || requestKey == "eventsInMonth") {
+ return akonadiCalendarSourceRequest(requestKey, requestTokens, request);
+ }
++#endif
+
+ return false;
+ }
+@@ -272,6 +276,7 @@ bool CalendarEngine::holidayCalendarSourceRequest(const QString& key, const QStr
+ return false;
+ }
+
++#ifdef AKONADI_FOUND
+ bool CalendarEngine::akonadiCalendarSourceRequest(const QString& key, const QStringList& args, const QString& request)
+ {
+ // figure out what time range was requested from the source string
+@@ -339,5 +344,6 @@ void CalendarEngine::initAkonadiCalendar()
+ calendarModel->setCollectionFetchStrategy(Akonadi::EntityTreeModel::InvisibleCollectionFetch);
+ m_calendar = new CalendarSupport::Calendar(calendarModel, calendarModel, KSystemTimeZones::local());
+ }
++#endif
+ #include "calendarengine.moc"