summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-08-16 15:09:41 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2019-08-16 16:40:32 +0200
commit76b3807cb00c92d643409640b010b1a542e28574 (patch)
treee20e8429386f64d734bdd1549e3d56f719a4bc5b
parentapp-office/calligraplan: Drop 3.1.0 (r0) (diff)
downloadgentoo-76b3807cb00c92d643409640b010b1a542e28574.tar.gz
gentoo-76b3807cb00c92d643409640b010b1a542e28574.tar.bz2
gentoo-76b3807cb00c92d643409640b010b1a542e28574.zip
app-office/calligraplan: Backport KCalCore 19.08.0 API changes
Upstream commits 3a01affd66f8dfdcc124e23595217f3ae5a09723 a9eaf1c98ed408fd6e8897fa9e2f99ed17db1ebc Package-Manager: Portage-2.3.71, Repoman-2.3.17 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--app-office/calligraplan/calligraplan-3.1.0-r2.ebuild99
-rw-r--r--app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-1.patch46
-rw-r--r--app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-2.patch84
-rw-r--r--app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-3.patch33
4 files changed, 262 insertions, 0 deletions
diff --git a/app-office/calligraplan/calligraplan-3.1.0-r2.ebuild b/app-office/calligraplan/calligraplan-3.1.0-r2.ebuild
new file mode 100644
index 000000000000..8be9484950d3
--- /dev/null
+++ b/app-office/calligraplan/calligraplan-3.1.0-r2.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KDE_APPS_MINIMAL="19.08.0"
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="forceoptional"
+inherit kde5
+
+DESCRIPTION="Project management application"
+HOMEPAGE="https://www.calligra.org/"
+SRC_URI="mirror://kde/stable/${PN/plan/}/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="activities +holidays kwallet pim X"
+
+# FIXME: Disabled by upstream for good reason
+# Crashes (https://bugs.kde.org/show_bug.cgi?id=311940)
+# $(add_kdeapps_dep akonadi)
+# $(add_kdeapps_dep akonadi-contacts)
+# Currently upstream-disabled:
+# =dev-libs/kproperty-3.0*:5
+# =dev-libs/kreport-3.0*:5
+DEPEND="
+ $(add_frameworks_dep karchive)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep kglobalaccel)
+ $(add_frameworks_dep kguiaddons)
+ $(add_frameworks_dep khtml)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep kitemviews)
+ $(add_frameworks_dep kjobwidgets)
+ $(add_frameworks_dep knotifications)
+ $(add_frameworks_dep kparts)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep ktextwidgets)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_frameworks_dep kxmlgui)
+ $(add_qt_dep designer)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtprintsupport)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ dev-lang/perl
+ dev-libs/kdiagram:5
+ sys-libs/zlib
+ activities? ( $(add_frameworks_dep kactivities) )
+ holidays? ( $(add_frameworks_dep kholidays) )
+ kwallet? (
+ $(add_frameworks_dep kwallet)
+ app-crypt/qca:2[qt5(+)]
+ )
+ pim? (
+ $(add_kdeapps_dep kcalcore)
+ $(add_kdeapps_dep kcontacts)
+ )
+ X? (
+ $(add_qt_dep qtx11extras)
+ x11-libs/libX11
+ )
+"
+RDEPEND="${DEPEND}
+ !app-office/calligra[calligra_features_plan(-)]
+ !app-office/calligra-l10n:4
+ $(add_qt_dep qtsvg)
+"
+
+RESTRICT+=" test"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-qt-5.11.patch
+ "${FILESDIR}"/${P}-qca.patch
+ "${FILESDIR}"/${P}-missing-header.patch
+ "${FILESDIR}"/${P}-unused-deps.patch
+ "${FILESDIR}"/${P}-kcalcore-19.08-{1,2,3}.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package activities KF5Activities)
+ $(cmake-utils_use_find_package holidays KF5Holidays)
+ $(cmake-utils_use_find_package pim KF5CalendarCore)
+ $(cmake-utils_use_find_package pim KF5Contacts)
+ $(cmake-utils_use_find_package kwallet Qca-qt5)
+ $(cmake-utils_use_find_package kwallet KF5Wallet)
+ )
+ # Qt5DBus can't be disabled because of KF5DBusAddons dependency
+
+ kde5_src_configure
+}
diff --git a/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-1.patch b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-1.patch
new file mode 100644
index 000000000000..cfe8b552d9dc
--- /dev/null
+++ b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-1.patch
@@ -0,0 +1,46 @@
+From 3a01affd66f8dfdcc124e23595217f3ae5a09723 Mon Sep 17 00:00:00 2001
+From: Dag Andersen <danders@get2net.dk>
+Date: Thu, 20 Jun 2019 10:52:00 +0200
+Subject: ICal: Adapt to api changes in KCalCore
+
+---
+ CMakeLists.txt | 37 +++++++++++-----------
+ src/CMakeLists.txt | 4 +++
+ .../filters/icalendar/export/icalendarexport.cpp | 5 +++
+ 3 files changed, 27 insertions(+), 19 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 0dabbaf..49fa642 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -75,6 +75,10 @@ if ("${KF5CalendarCore_VERSION}" VERSION_GREATER 5.6.40)
+ set(HAVE_QDATETIME_KCALCORE TRUE)
+ endif()
+
++if ("${KF5CalendarCore_VERSION}" VERSION_GREATER 5.11.42)
++ set(KCALCORE_HAVE_NO_PERSION_PTR TRUE)
++endif()
++
+ if (PLANCHARTDEBUG)
+ add_definitions(-DPLAN_CHART_DEBUG)
+ endif ()
+diff --git a/src/plugins/filters/icalendar/export/icalendarexport.cpp b/src/plugins/filters/icalendar/export/icalendarexport.cpp
+index cd75598..ce29bfe 100644
+--- a/src/plugins/filters/icalendar/export/icalendarexport.cpp
++++ b/src/plugins/filters/icalendar/export/icalendarexport.cpp
+@@ -141,8 +141,13 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
+ todo->setOrganizer(node->projectNode()->leader());
+ }
+ if ( node->type() != Node::Type_Project && ! node->leader().isEmpty()) {
++#if KCALCORE_HAVE_NO_PERSION_PTR
++ KCalCore::Person p = KCalCore::Person::fromFullName(node->leader());
++ KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p.name(), p.email()));
++#else
+ KCalCore::Person::Ptr p = KCalCore::Person::fromFullName(node->leader());
+ KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p->name(), p->email()));
++#endif
+ a->setRole(KCalCore::Attendee::NonParticipant);
+ todo->addAttendee(a);
+ }
+--
+cgit v1.1
diff --git a/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-2.patch b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-2.patch
new file mode 100644
index 000000000000..02c67d5ada73
--- /dev/null
+++ b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-2.patch
@@ -0,0 +1,84 @@
+From a9eaf1c98ed408fd6e8897fa9e2f99ed17db1ebc Mon Sep 17 00:00:00 2001
+From: David Faure <faure@kde.org>
+Date: Tue, 23 Jul 2019 12:26:17 +0200
+Subject: Port to KCalCore API changes
+
+The code is in #if 0, but I tested compilation of this in the calligra
+stable branch:
+https://commits.kde.org/calligra/2d484fda1b31a72659088a4bfce5c3708e923cb0
+
+So you can use KCalCore again if you want :-)
+It's turning into a KF5 framework so the API will be stable from now on.
+
+CCMAIL: danders@get2net.dk
+---
+ .../filters/icalendar/export/icalendarexport.cpp | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/src/plugins/filters/icalendar/export/icalendarexport.cpp b/src/plugins/filters/icalendar/export/icalendarexport.cpp
+index b21320f..828b641 100644
+--- a/src/plugins/filters/icalendar/export/icalendarexport.cpp
++++ b/src/plugins/filters/icalendar/export/icalendarexport.cpp
+@@ -35,6 +35,7 @@
+ #include <kcalcore/attachment.h>
+ #include <kcalcore/icalformat.h>
+ #include <kcalcore/memorycalendar.h>
++#include <kcalcore_version.h>
+
+ #include <QTextCodec>
+ #include <QByteArray>
+@@ -355,14 +356,15 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
+ todo->setOrganizer(node->projectNode()->leader());
+ }
+ if ( node->type() != Node::Type_Project && ! node->leader().isEmpty()) {
+-#if KCALCORE_HAVE_NO_PERSION_PTR
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 80)
+ KCalCore::Person p = KCalCore::Person::fromFullName(node->leader());
+- KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p.name(), p.email()));
++ KCalCore::Attendee a(p.name(), p.email());
++ a.setRole(KCalCore::Attendee::NonParticipant);
+ #else
+ KCalCore::Person::Ptr p = KCalCore::Person::fromFullName(node->leader());
+ KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p->name(), p->email()));
+-#endif
+ a->setRole(KCalCore::Attendee::NonParticipant);
++#endif
+ todo->addAttendee(a);
+ }
+ DateTime st = node->startTime(id);
+@@ -381,13 +383,21 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
+ const QList<Resource*> lst = task->requestedResources();
+ foreach(const Resource *r, lst) {
+ if (r->type() == Resource::Type_Work) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 80)
++ todo->addAttendee(KCalCore::Attendee(r->name(), r->email()));
++#else
+ todo->addAttendee(KCalCore::Attendee::Ptr(new KCalCore::Attendee(r->name(), r->email())));
++#endif
+ }
+ }
+ } else {
+ foreach(const Resource *r, s->resources()) {
+ if (r->type() == Resource::Type_Work) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 80)
++ todo->addAttendee(KCalCore::Attendee(r->name(), r->email()));
++#else
+ todo->addAttendee(KCalCore::Attendee::Ptr(new KCalCore::Attendee(r->name(), r->email())));
++#endif
+ }
+ }
+
+@@ -398,7 +408,11 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
+ todo->setPercentComplete(task->completion().percentFinished());
+ }
+ foreach(const Document *doc, node->documents().documents()) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 80)
++ todo->addAttachment(KCalCore::Attachment(doc->url().url()));
++#else
+ todo->addAttachment(KCalCore::Attachment::Ptr(new KCalCore::Attachment(doc->url().url())));
++#endif
+ }
+ if (! parent.isNull()) {
+ todo->setRelatedTo(parent->uid(), KCalCore::Incidence::RelTypeParent);
+--
+cgit v1.1
diff --git a/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-3.patch b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-3.patch
new file mode 100644
index 000000000000..14cc70ab1c8e
--- /dev/null
+++ b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-3.patch
@@ -0,0 +1,33 @@
+From 2f5505cf03ff865349d06e1d5c39007c52e7cd10 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Fri, 16 Aug 2019 15:49:09 +0200
+Subject: [PATCH] Fix headers after kcalcore->kcalendercore rename happened
+
+---
+ .../filters/icalendar/export/icalendarexport.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/plugins/filters/icalendar/export/icalendarexport.cpp b/src/plugins/filters/icalendar/export/icalendarexport.cpp
+index bb6b097d..729d6e50 100644
+--- a/src/plugins/filters/icalendar/export/icalendarexport.cpp
++++ b/src/plugins/filters/icalendar/export/icalendarexport.cpp
+@@ -31,11 +31,11 @@
+ #include <kptdocuments.h>
+ #include "kptdebug.h"
+
+-#include <kcalcore/attendee.h>
+-#include <kcalcore/attachment.h>
+-#include <kcalcore/icalformat.h>
+-#include <kcalcore/memorycalendar.h>
+-#include <kcalcore_version.h>
++#include <kcalendarcore/attendee.h>
++#include <kcalendarcore/attachment.h>
++#include <kcalendarcore/icalformat.h>
++#include <kcalendarcore/memorycalendar.h>
++#include <kcalendarcore_version.h>
+
+ #include <QTextCodec>
+ #include <QByteArray>
+--
+2.22.1
+