Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/calligraplan/files/, app-office/calligraplan/
Date: Fri, 16 Aug 2019 14:41:02
Message-Id: 1565966432.76b3807cb00c92d643409640b010b1a542e28574.asturm@gentoo
1 commit: 76b3807cb00c92d643409640b010b1a542e28574
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 16 13:09:41 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 16 14:40:32 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76b3807c
7
8 app-office/calligraplan: Backport KCalCore 19.08.0 API changes
9
10 Upstream commits
11 3a01affd66f8dfdcc124e23595217f3ae5a09723
12 a9eaf1c98ed408fd6e8897fa9e2f99ed17db1ebc
13
14 Package-Manager: Portage-2.3.71, Repoman-2.3.17
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16
17 .../calligraplan/calligraplan-3.1.0-r2.ebuild | 99 ++++++++++++++++++++++
18 .../calligraplan-3.1.0-kcalcore-19.08-1.patch | 46 ++++++++++
19 .../calligraplan-3.1.0-kcalcore-19.08-2.patch | 84 ++++++++++++++++++
20 .../calligraplan-3.1.0-kcalcore-19.08-3.patch | 33 ++++++++
21 4 files changed, 262 insertions(+)
22
23 diff --git a/app-office/calligraplan/calligraplan-3.1.0-r2.ebuild b/app-office/calligraplan/calligraplan-3.1.0-r2.ebuild
24 new file mode 100644
25 index 00000000000..8be9484950d
26 --- /dev/null
27 +++ b/app-office/calligraplan/calligraplan-3.1.0-r2.ebuild
28 @@ -0,0 +1,99 @@
29 +# Copyright 1999-2019 Gentoo Authors
30 +# Distributed under the terms of the GNU General Public License v2
31 +
32 +EAPI=7
33 +
34 +KDE_APPS_MINIMAL="19.08.0"
35 +KDE_HANDBOOK="forceoptional"
36 +KDE_TEST="forceoptional"
37 +inherit kde5
38 +
39 +DESCRIPTION="Project management application"
40 +HOMEPAGE="https://www.calligra.org/"
41 +SRC_URI="mirror://kde/stable/${PN/plan/}/${PV}/${P}.tar.xz"
42 +
43 +LICENSE="GPL-2"
44 +KEYWORDS="~amd64 ~x86"
45 +IUSE="activities +holidays kwallet pim X"
46 +
47 +# FIXME: Disabled by upstream for good reason
48 +# Crashes (https://bugs.kde.org/show_bug.cgi?id=311940)
49 +# $(add_kdeapps_dep akonadi)
50 +# $(add_kdeapps_dep akonadi-contacts)
51 +# Currently upstream-disabled:
52 +# =dev-libs/kproperty-3.0*:5
53 +# =dev-libs/kreport-3.0*:5
54 +DEPEND="
55 + $(add_frameworks_dep karchive)
56 + $(add_frameworks_dep kconfig)
57 + $(add_frameworks_dep kconfigwidgets)
58 + $(add_frameworks_dep kcoreaddons)
59 + $(add_frameworks_dep kdbusaddons)
60 + $(add_frameworks_dep kglobalaccel)
61 + $(add_frameworks_dep kguiaddons)
62 + $(add_frameworks_dep khtml)
63 + $(add_frameworks_dep ki18n)
64 + $(add_frameworks_dep kiconthemes)
65 + $(add_frameworks_dep kio)
66 + $(add_frameworks_dep kitemviews)
67 + $(add_frameworks_dep kjobwidgets)
68 + $(add_frameworks_dep knotifications)
69 + $(add_frameworks_dep kparts)
70 + $(add_frameworks_dep kservice)
71 + $(add_frameworks_dep ktextwidgets)
72 + $(add_frameworks_dep kwidgetsaddons)
73 + $(add_frameworks_dep kwindowsystem)
74 + $(add_frameworks_dep kxmlgui)
75 + $(add_qt_dep designer)
76 + $(add_qt_dep qtdbus)
77 + $(add_qt_dep qtgui)
78 + $(add_qt_dep qtprintsupport)
79 + $(add_qt_dep qtwidgets)
80 + $(add_qt_dep qtxml)
81 + dev-lang/perl
82 + dev-libs/kdiagram:5
83 + sys-libs/zlib
84 + activities? ( $(add_frameworks_dep kactivities) )
85 + holidays? ( $(add_frameworks_dep kholidays) )
86 + kwallet? (
87 + $(add_frameworks_dep kwallet)
88 + app-crypt/qca:2[qt5(+)]
89 + )
90 + pim? (
91 + $(add_kdeapps_dep kcalcore)
92 + $(add_kdeapps_dep kcontacts)
93 + )
94 + X? (
95 + $(add_qt_dep qtx11extras)
96 + x11-libs/libX11
97 + )
98 +"
99 +RDEPEND="${DEPEND}
100 + !app-office/calligra[calligra_features_plan(-)]
101 + !app-office/calligra-l10n:4
102 + $(add_qt_dep qtsvg)
103 +"
104 +
105 +RESTRICT+=" test"
106 +
107 +PATCHES=(
108 + "${FILESDIR}"/${P}-qt-5.11.patch
109 + "${FILESDIR}"/${P}-qca.patch
110 + "${FILESDIR}"/${P}-missing-header.patch
111 + "${FILESDIR}"/${P}-unused-deps.patch
112 + "${FILESDIR}"/${P}-kcalcore-19.08-{1,2,3}.patch
113 +)
114 +
115 +src_configure() {
116 + local mycmakeargs=(
117 + $(cmake-utils_use_find_package activities KF5Activities)
118 + $(cmake-utils_use_find_package holidays KF5Holidays)
119 + $(cmake-utils_use_find_package pim KF5CalendarCore)
120 + $(cmake-utils_use_find_package pim KF5Contacts)
121 + $(cmake-utils_use_find_package kwallet Qca-qt5)
122 + $(cmake-utils_use_find_package kwallet KF5Wallet)
123 + )
124 + # Qt5DBus can't be disabled because of KF5DBusAddons dependency
125 +
126 + kde5_src_configure
127 +}
128
129 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
130 new file mode 100644
131 index 00000000000..cfe8b552d9d
132 --- /dev/null
133 +++ b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-1.patch
134 @@ -0,0 +1,46 @@
135 +From 3a01affd66f8dfdcc124e23595217f3ae5a09723 Mon Sep 17 00:00:00 2001
136 +From: Dag Andersen <danders@×××××××.dk>
137 +Date: Thu, 20 Jun 2019 10:52:00 +0200
138 +Subject: ICal: Adapt to api changes in KCalCore
139 +
140 +---
141 + CMakeLists.txt | 37 +++++++++++-----------
142 + src/CMakeLists.txt | 4 +++
143 + .../filters/icalendar/export/icalendarexport.cpp | 5 +++
144 + 3 files changed, 27 insertions(+), 19 deletions(-)
145 +
146 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
147 +index 0dabbaf..49fa642 100644
148 +--- a/src/CMakeLists.txt
149 ++++ b/src/CMakeLists.txt
150 +@@ -75,6 +75,10 @@ if ("${KF5CalendarCore_VERSION}" VERSION_GREATER 5.6.40)
151 + set(HAVE_QDATETIME_KCALCORE TRUE)
152 + endif()
153 +
154 ++if ("${KF5CalendarCore_VERSION}" VERSION_GREATER 5.11.42)
155 ++ set(KCALCORE_HAVE_NO_PERSION_PTR TRUE)
156 ++endif()
157 ++
158 + if (PLANCHARTDEBUG)
159 + add_definitions(-DPLAN_CHART_DEBUG)
160 + endif ()
161 +diff --git a/src/plugins/filters/icalendar/export/icalendarexport.cpp b/src/plugins/filters/icalendar/export/icalendarexport.cpp
162 +index cd75598..ce29bfe 100644
163 +--- a/src/plugins/filters/icalendar/export/icalendarexport.cpp
164 ++++ b/src/plugins/filters/icalendar/export/icalendarexport.cpp
165 +@@ -141,8 +141,13 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
166 + todo->setOrganizer(node->projectNode()->leader());
167 + }
168 + if ( node->type() != Node::Type_Project && ! node->leader().isEmpty()) {
169 ++#if KCALCORE_HAVE_NO_PERSION_PTR
170 ++ KCalCore::Person p = KCalCore::Person::fromFullName(node->leader());
171 ++ KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p.name(), p.email()));
172 ++#else
173 + KCalCore::Person::Ptr p = KCalCore::Person::fromFullName(node->leader());
174 + KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p->name(), p->email()));
175 ++#endif
176 + a->setRole(KCalCore::Attendee::NonParticipant);
177 + todo->addAttendee(a);
178 + }
179 +--
180 +cgit v1.1
181
182 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
183 new file mode 100644
184 index 00000000000..02c67d5ada7
185 --- /dev/null
186 +++ b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-2.patch
187 @@ -0,0 +1,84 @@
188 +From a9eaf1c98ed408fd6e8897fa9e2f99ed17db1ebc Mon Sep 17 00:00:00 2001
189 +From: David Faure <faure@×××.org>
190 +Date: Tue, 23 Jul 2019 12:26:17 +0200
191 +Subject: Port to KCalCore API changes
192 +
193 +The code is in #if 0, but I tested compilation of this in the calligra
194 +stable branch:
195 +https://commits.kde.org/calligra/2d484fda1b31a72659088a4bfce5c3708e923cb0
196 +
197 +So you can use KCalCore again if you want :-)
198 +It's turning into a KF5 framework so the API will be stable from now on.
199 +
200 +CCMAIL: danders@×××××××.dk
201 +---
202 + .../filters/icalendar/export/icalendarexport.cpp | 20 +++++++++++++++++---
203 + 1 file changed, 17 insertions(+), 3 deletions(-)
204 +
205 +diff --git a/src/plugins/filters/icalendar/export/icalendarexport.cpp b/src/plugins/filters/icalendar/export/icalendarexport.cpp
206 +index b21320f..828b641 100644
207 +--- a/src/plugins/filters/icalendar/export/icalendarexport.cpp
208 ++++ b/src/plugins/filters/icalendar/export/icalendarexport.cpp
209 +@@ -35,6 +35,7 @@
210 + #include <kcalcore/attachment.h>
211 + #include <kcalcore/icalformat.h>
212 + #include <kcalcore/memorycalendar.h>
213 ++#include <kcalcore_version.h>
214 +
215 + #include <QTextCodec>
216 + #include <QByteArray>
217 +@@ -355,14 +356,15 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
218 + todo->setOrganizer(node->projectNode()->leader());
219 + }
220 + if ( node->type() != Node::Type_Project && ! node->leader().isEmpty()) {
221 +-#if KCALCORE_HAVE_NO_PERSION_PTR
222 ++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 80)
223 + KCalCore::Person p = KCalCore::Person::fromFullName(node->leader());
224 +- KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p.name(), p.email()));
225 ++ KCalCore::Attendee a(p.name(), p.email());
226 ++ a.setRole(KCalCore::Attendee::NonParticipant);
227 + #else
228 + KCalCore::Person::Ptr p = KCalCore::Person::fromFullName(node->leader());
229 + KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p->name(), p->email()));
230 +-#endif
231 + a->setRole(KCalCore::Attendee::NonParticipant);
232 ++#endif
233 + todo->addAttendee(a);
234 + }
235 + DateTime st = node->startTime(id);
236 +@@ -381,13 +383,21 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
237 + const QList<Resource*> lst = task->requestedResources();
238 + foreach(const Resource *r, lst) {
239 + if (r->type() == Resource::Type_Work) {
240 ++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 80)
241 ++ todo->addAttendee(KCalCore::Attendee(r->name(), r->email()));
242 ++#else
243 + todo->addAttendee(KCalCore::Attendee::Ptr(new KCalCore::Attendee(r->name(), r->email())));
244 ++#endif
245 + }
246 + }
247 + } else {
248 + foreach(const Resource *r, s->resources()) {
249 + if (r->type() == Resource::Type_Work) {
250 ++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 80)
251 ++ todo->addAttendee(KCalCore::Attendee(r->name(), r->email()));
252 ++#else
253 + todo->addAttendee(KCalCore::Attendee::Ptr(new KCalCore::Attendee(r->name(), r->email())));
254 ++#endif
255 + }
256 + }
257 +
258 +@@ -398,7 +408,11 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
259 + todo->setPercentComplete(task->completion().percentFinished());
260 + }
261 + foreach(const Document *doc, node->documents().documents()) {
262 ++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 80)
263 ++ todo->addAttachment(KCalCore::Attachment(doc->url().url()));
264 ++#else
265 + todo->addAttachment(KCalCore::Attachment::Ptr(new KCalCore::Attachment(doc->url().url())));
266 ++#endif
267 + }
268 + if (! parent.isNull()) {
269 + todo->setRelatedTo(parent->uid(), KCalCore::Incidence::RelTypeParent);
270 +--
271 +cgit v1.1
272
273 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
274 new file mode 100644
275 index 00000000000..14cc70ab1c8
276 --- /dev/null
277 +++ b/app-office/calligraplan/files/calligraplan-3.1.0-kcalcore-19.08-3.patch
278 @@ -0,0 +1,33 @@
279 +From 2f5505cf03ff865349d06e1d5c39007c52e7cd10 Mon Sep 17 00:00:00 2001
280 +From: Andreas Sturmlechner <asturm@g.o>
281 +Date: Fri, 16 Aug 2019 15:49:09 +0200
282 +Subject: [PATCH] Fix headers after kcalcore->kcalendercore rename happened
283 +
284 +---
285 + .../filters/icalendar/export/icalendarexport.cpp | 10 +++++-----
286 + 1 file changed, 5 insertions(+), 5 deletions(-)
287 +
288 +diff --git a/src/plugins/filters/icalendar/export/icalendarexport.cpp b/src/plugins/filters/icalendar/export/icalendarexport.cpp
289 +index bb6b097d..729d6e50 100644
290 +--- a/src/plugins/filters/icalendar/export/icalendarexport.cpp
291 ++++ b/src/plugins/filters/icalendar/export/icalendarexport.cpp
292 +@@ -31,11 +31,11 @@
293 + #include <kptdocuments.h>
294 + #include "kptdebug.h"
295 +
296 +-#include <kcalcore/attendee.h>
297 +-#include <kcalcore/attachment.h>
298 +-#include <kcalcore/icalformat.h>
299 +-#include <kcalcore/memorycalendar.h>
300 +-#include <kcalcore_version.h>
301 ++#include <kcalendarcore/attendee.h>
302 ++#include <kcalendarcore/attachment.h>
303 ++#include <kcalendarcore/icalformat.h>
304 ++#include <kcalendarcore/memorycalendar.h>
305 ++#include <kcalendarcore_version.h>
306 +
307 + #include <QTextCodec>
308 + #include <QByteArray>
309 +--
310 +2.22.1
311 +