Hello community, here is the log from the commit of package calligra for openSUSE:Factory checked in at 2017-11-23 09:45:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/calligra (Old) and /work/SRC/openSUSE:Factory/.calligra.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "calligra" Thu Nov 23 09:45:19 2017 rev:68 rq:544530 version:3.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/calligra/calligra.changes 2017-07-26 13:06:24.044737164 +0200 +++ /work/SRC/openSUSE:Factory/.calligra.new/calligra.changes 2017-11-23 09:45:30.982100736 +0100 @@ -1,0 +2,6 @@ +Wed Nov 22 11:44:30 UTC 2017 - wba...@tmo.at + +- Add fix-build-with-newer-kcalcore.patch to make it build with + KDE Applications 17.12 + +------------------------------------------------------------------- New: ---- fix-build-with-newer-kcalcore.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ calligra.spec ++++++ --- /var/tmp/diff_new_pack.EAq1NM/_old 2017-11-23 09:45:33.126022500 +0100 +++ /var/tmp/diff_new_pack.EAq1NM/_new 2017-11-23 09:45:33.130022354 +0100 @@ -24,6 +24,8 @@ Group: Productivity/Office/Suite Url: http://www.calligra.org/ Source0: http://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM +Patch: fix-build-with-newer-kcalcore.patch BuildRequires: Mesa-devel BuildRequires: OpenColorIO-devel BuildRequires: OpenEXR-devel @@ -338,6 +340,7 @@ %prep %setup -q +%patch -p1 %build %cmake_kf5 -d build -- -DAPP_ACTIVE=FALSE ++++++ fix-build-with-newer-kcalcore.patch ++++++ >From 9a02a545e8606aa91aff2038da137226a9432e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvra...@kde.org> Date: Mon, 18 Sep 2017 21:56:07 +0200 Subject: Make iCal export compile with newer KCalCore KCalCore API has been ported to QDateTime, this change makes the iCalendar export plugin to compile against the new API. Since Calligra has different release cycle than KCalCore, this change is backwards compatible with older versions of KCalCore. Differential Revision: https://phabricator.kde.org/D7873 --- CMakeLists.txt | 5 +++++ KoConfig.h.cmake | 3 +++ plan/plugins/filters/icalendar/export/icalendarexport.cpp | 13 ++++++++++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 281f764..8cc8c97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -430,6 +430,11 @@ set_package_properties(KF5CalendarCore PROPERTIES TYPE OPTIONAL ) +if ("${KF5CalendarCore_VERSION}" VERSION_GREATER 5.6.40) + set(HAVE_QDATETIME_KCALCORE TRUE) +endif() + + ## ## Test for KF5Contacts ## diff --git a/KoConfig.h.cmake b/KoConfig.h.cmake index 735e2e3..7e86479 100644 --- a/KoConfig.h.cmake +++ b/KoConfig.h.cmake @@ -56,3 +56,6 @@ /* Defines if the old plugin metadata for mimetypes is used */ #cmakedefine CALLIGRA_OLD_PLUGIN_METADATA 1 + +/* Defines if KCalCore version with QDateTime-based API is available */ +#cmakedefine HAVE_QDATETIME_KCALCORE 1 diff --git a/plan/plugins/filters/icalendar/export/icalendarexport.cpp b/plan/plugins/filters/icalendar/export/icalendarexport.cpp index 5f04ed5..afeb5e4 100644 --- a/plan/plugins/filters/icalendar/export/icalendarexport.cpp +++ b/plan/plugins/filters/icalendar/export/icalendarexport.cpp @@ -18,6 +18,7 @@ */ #include "icalendarexport.h" +#include "KoConfig.h" #include <kptmaindocument.h> #include <kpttask.h> @@ -49,6 +50,12 @@ using namespace KPlato; K_PLUGIN_FACTORY_WITH_JSON(ICalendarExportFactory, "plan_icalendar_export.json", registerPlugin<ICalendarExport>();) +#ifdef HAVE_QDATETIME_KCALCORE +#define KQDT QDateTime +#else +#define KQDT KDateTime +#endif + ICalendarExport::ICalendarExport(QObject* parent, const QVariantList &) : KoFilter(parent) { @@ -141,10 +148,10 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node, DateTime st = node->startTime(id); DateTime et = node->endTime(id); if (st.isValid()) { - todo->setDtStart( KDateTime( st ) ); + todo->setDtStart( KQDT( st ) ); } if (et.isValid()) { - todo->setDtDue( KDateTime( et ) ); + todo->setDtDue( KQDT( et ) ); } if (node->type() == Node::Type_Task) { const Task *task = qobject_cast<Task*>(const_cast<Node*>(node)); @@ -167,7 +174,7 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node, } } else if (node->type() == Node::Type_Milestone) { const Task *task = qobject_cast<Task*>(const_cast<Node*>(node)); - todo->setDtStart(KDateTime()); + todo->setDtStart(KQDT()); todo->setPercentComplete(task->completion().percentFinished()); } foreach(const Document *doc, node->documents().documents()) { -- cgit v0.11.2