public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/calligraplan/files/, app-office/calligraplan/
Date: Fri, 16 Aug 2019 14:40:58 +0000 (UTC)	[thread overview]
Message-ID: <1565966432.76b3807cb00c92d643409640b010b1a542e28574.asturm@gentoo> (raw)

commit:     76b3807cb00c92d643409640b010b1a542e28574
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 16 13:09:41 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Aug 16 14:40:32 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76b3807c

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 <AT> gentoo.org>

 .../calligraplan/calligraplan-3.1.0-r2.ebuild      | 99 ++++++++++++++++++++++
 .../calligraplan-3.1.0-kcalcore-19.08-1.patch      | 46 ++++++++++
 .../calligraplan-3.1.0-kcalcore-19.08-2.patch      | 84 ++++++++++++++++++
 .../calligraplan-3.1.0-kcalcore-19.08-3.patch      | 33 ++++++++
 4 files changed, 262 insertions(+)

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 00000000000..8be9484950d
--- /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 00000000000..cfe8b552d9d
--- /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 00000000000..02c67d5ada7
--- /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 00000000000..14cc70ab1c8
--- /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
+


             reply	other threads:[~2019-08-16 14:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 14:40 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-21 20:50 [gentoo-commits] repo/gentoo:master commit in: app-office/calligraplan/files/, app-office/calligraplan/ Andreas Sturmlechner
2020-10-29 19:41 Andreas Sturmlechner
2020-09-13 11:19 Andreas Sturmlechner
2019-12-03  5:04 Andreas Sturmlechner
2019-08-11  8:19 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1565966432.76b3807cb00c92d643409640b010b1a542e28574.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox