Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jan 2020 13:03:30 +0000 (UTC)
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r522684 - in head/deskutils: . zanshin zanshin/files
Message-ID:  <202001111303.00BD3UPR033024@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adridg
Date: Sat Jan 11 13:03:30 2020
New Revision: 522684
URL: https://svnweb.freebsd.org/changeset/ports/522684

Log:
  Restore deskutils/zanshin after it was deleted in r522617.
  
  (I hope I got the repocopy right; I don't really know how kde@ missed
  the pending deprecation and removal of this port, we should have been
  on top of it much earlier.)
  
  Add patches obtained from Debian (which has some own work, and
  some patches pulled from upstream git) to make it build with current
  ports (Boost, KDE Frameworks, and KDE PIM). Tested with a poudriere
  build on amd64.
  
  The Debian patches are at
  	https://salsa.debian.org/qt-kde-team/extras/zanshin/tree/master/debian/patches
  There's a similar set of openSUSE patches at
  	https://build.opensuse.org/package/show/KDE:Extra/zanshin
  We'll prod upstream about a new release.
  
  Reported by:	rene
  Obtained from:	Debian

Added:
  head/deskutils/zanshin/
     - copied from r522616, head/deskutils/zanshin/
  head/deskutils/zanshin/files/
  head/deskutils/zanshin/files/patch-CMakeLists.txt   (contents, props changed)
  head/deskutils/zanshin/files/patch-git-0d1e500a88998e3419b3605ddc6435f5be22b056   (contents, props changed)
  head/deskutils/zanshin/files/patch-git-0d3760b646d15e66f43a6a48546eae11cbf84497   (contents, props changed)
  head/deskutils/zanshin/files/patch-git-3d73d1733190245c23b921c0da11aac0d783345d   (contents, props changed)
  head/deskutils/zanshin/files/patch-git-b41538f15c792e2106d6ce266568f9aae12e09c5   (contents, props changed)
  head/deskutils/zanshin/files/patch-src_akonadi_akonadiserializer.cpp   (contents, props changed)
Modified:
  head/deskutils/Makefile
  head/deskutils/zanshin/Makefile

Modified: head/deskutils/Makefile
==============================================================================
--- head/deskutils/Makefile	Sat Jan 11 12:48:14 2020	(r522683)
+++ head/deskutils/Makefile	Sat Jan 11 13:03:30 2020	(r522684)
@@ -277,6 +277,7 @@
     SUBDIR += xpostitPlus
     SUBDIR += xrolo
     SUBDIR += xwrits
+    SUBDIR += zanshin
     SUBDIR += zim
     SUBDIR += znotes
     SUBDIR += zorro

Modified: head/deskutils/zanshin/Makefile
==============================================================================
--- head/deskutils/zanshin/Makefile	Fri Jan 10 20:38:25 2020	(r522616)
+++ head/deskutils/zanshin/Makefile	Sat Jan 11 13:03:30 2020	(r522684)
@@ -2,16 +2,12 @@
 
 PORTNAME=	zanshin
 DISTVERSION=	0.5.0
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	deskutils kde
 MASTER_SITES=	KDE/stable/${PORTNAME}/
 
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Daily organizer for KDE
-
-BROKEN=		Broken by update to appliations 19.04.2
-DEPRECATED=	Broken for more than 5 months
-EXPIRATION_DATE=	2020-01-10
 
 LIB_DEPENDS=	libical.so:devel/libical
 

Added: head/deskutils/zanshin/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/zanshin/files/patch-CMakeLists.txt	Sat Jan 11 13:03:30 2020	(r522684)
@@ -0,0 +1,21 @@
+Description: KDEPIM 19.08 does not add AkonadiContacts indirectly
+  previous versions add the depdendency to AkonadiContacts indirectly,
+  and we didn't need to search for AkonadiContact on our own. That chagned with
+  19.08. Upstream has refactored a lot of code, so this depdendency isn't
+  needed anymore.
+Author: Hefee <hefee@debian.org>
+Origin: debian
+Forwarded: not-needed
+Last-Update: 2014-02-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -66,6 +66,7 @@ include_directories (
+ )
+ 
+ find_package(KF5 REQUIRED COMPONENTS
++    AkonadiContact
+     AkonadiCalendar
+     AkonadiNotes
+     AkonadiSearch

Added: head/deskutils/zanshin/files/patch-git-0d1e500a88998e3419b3605ddc6435f5be22b056
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/zanshin/files/patch-git-0d1e500a88998e3419b3605ddc6435f5be22b056	Sat Jan 11 13:03:30 2020	(r522684)
@@ -0,0 +1,37 @@
+From 0d1e500a88998e3419b3605ddc6435f5be22b056 Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter@kde.org>
+Date: Mon, 12 Mar 2018 14:31:59 +0100
+Subject: [PATCH] don't set a zanshin screenshot for renku
+
+Summary:
+I also couldn't find a screenshot of renku, so kill the screenshot
+definition entirely in the absence of one.
+
+Reviewers: ervin
+
+Reviewed By: ervin
+
+Differential Revision: https://phabricator.kde.org/D11264
+---
+ src/renku/app/org.kde.renku.appdata.xml | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/renku/app/org.kde.renku.appdata.xml b/src/renku/app/org.kde.renku.appdata.xml
+index 82479cee..e1f1062e 100644
+--- src/renku/app/org.kde.renku.appdata.xml
++++ src/renku/app/org.kde.renku.appdata.xml
+@@ -150,11 +150,6 @@
+   </description>
+   <url type="homepage">http://zanshin.kde.org</url>;
+   <url type="bugtracker">https://bugs.kde.org/enter_bug.cgi?format=guided&amp;product=zanshin</url>;
+-  <screenshots>
+-    <screenshot type="default">
+-      <image>http://kde.org/images/screenshots/zanshin.png</image>;
+-    </screenshot>
+-  </screenshots>
+   <project_group>KDE</project_group>
+   <provides>
+     <binary>renku</binary>
+-- 
+2.19.1
+

Added: head/deskutils/zanshin/files/patch-git-0d3760b646d15e66f43a6a48546eae11cbf84497
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/zanshin/files/patch-git-0d3760b646d15e66f43a6a48546eae11cbf84497	Sat Jan 11 13:03:30 2020	(r522684)
@@ -0,0 +1,103 @@
+From 0d3760b646d15e66f43a6a48546eae11cbf84497 Mon Sep 17 00:00:00 2001
+From: Kevin Ottens <ervin@kde.org>
+Date: Sun, 25 Aug 2019 15:38:49 +0200
+Subject: [PATCH] Make it build both with pre and post 19.08.0 KCalCore
+
+Summary:
+Obviously this assumes a compiler supporting __has_include in C++14
+mode, but that should be the case in most target platforms nowadays.
+Beside this is hopefully temporary measure.
+
+Reviewers: dfaure
+
+Differential Revision: https://phabricator.kde.org/D23443
+---
+ src/akonadi/akonadiserializer.cpp             | 4 ++++
+ tests/units/akonadi/akonadiserializertest.cpp | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+--- src/akonadi/akonadiserializer.cpp
++++ src/akonadi/akonadiserializer.cpp
+@@ -30,7 +30,11 @@
+ #include <AkonadiCore/Item>
+ #include <Akonadi/Notes/NoteUtils>
+ #include <KCalCore/Todo>
++#if __has_include(<kcalcore_version.h>)
+ #include <kcalcore_version.h>
++#else
++#include <kcalendarcore_version.h>
++#endif
+ #include <KMime/Message>
+ #include <QMimeDatabase>
+ #if KCALCORE_VERSION < QT_VERSION_CHECK(5, 6, 80)
+--- tests/units/akonadi/akonadiserializertest.cpp
++++ tests/units/akonadi/akonadiserializertest.cpp
+@@ -34,7 +34,11 @@
+ #include <Akonadi/Notes/NoteUtils>
+ #include <AkonadiCore/Tag>
+ #include <KCalCore/Todo>
++#if __has_include(<kcalcore_version.h>)
+ #include <kcalcore_version.h>
++#else
++#include <kcalendarcore_version.h>
++#endif
+ #include <KMime/Message>
+ 
+ Q_DECLARE_METATYPE(Akonadi::Item*)
+--- tests/benchmarks/serializerTest.cpp
++++ tests/benchmarks/serializerTest.cpp
+@@ -24,7 +24,11 @@
+ #include <testlib/qtest_zanshin.h>
+ #include <AkonadiCore/Item>
+ #include <KCalCore/Todo>
++#if __has_include(<kcalcore_version.h>)
+ #include <kcalcore_version.h>
++#else
++#include <kcalendarcore_version.h>
++#endif
+ #include "domain/task.h"
+ #include "akonadi/akonadiserializer.h"
+ 
+--- tests/testlib/akonadistoragetestbase.cpp
++++ tests/testlib/akonadistoragetestbase.cpp
+@@ -31,7 +31,11 @@
+ 
+ #include <KCalCore/Todo>
+ #include <KCalCore/ICalFormat>
++#if __has_include(<kcalcore_version.h>)
+ #include <kcalcore_version.h>
++#else
++#include <kcalendarcore_version.h>
++#endif
+ #if KCALCORE_VERSION < QT_VERSION_CHECK(5, 6, 80)
+ #include <KDateTime>
+ #endif
+--- tests/testlib/gentodo.cpp
++++ tests/testlib/gentodo.cpp
+@@ -25,7 +25,11 @@
+ 
+ #include <KCalCore/Todo>
+ #include <QDate>
++#if __has_include(<kcalcore_version.h>)
+ #include <kcalcore_version.h>
++#else
++#include <kcalendarcore_version.h>
++#endif
+ #if KCALCORE_VERSION < QT_VERSION_CHECK(5, 6, 80)
+ #include <KDateTime>
+ #endif
+--- tests/units/testlib/gentodotest.cpp
++++ tests/units/testlib/gentodotest.cpp
+@@ -24,8 +24,11 @@
+ #include "testlib/gentodo.h"
+ 
+ #include <KCalCore/Todo>
++#if __has_include(<kcalcore_version.h>)
+ #include <kcalcore_version.h>
+-
++#else
++#include <kcalendarcore_version.h>
++#endif
+ #include <testlib/qtest_zanshin.h>
+ 
+ using namespace Testlib;

Added: head/deskutils/zanshin/files/patch-git-3d73d1733190245c23b921c0da11aac0d783345d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/zanshin/files/patch-git-3d73d1733190245c23b921c0da11aac0d783345d	Sat Jan 11 13:03:30 2020	(r522684)
@@ -0,0 +1,162 @@
+From 3d73d1733190245c23b921c0da11aac0d783345d Mon Sep 17 00:00:00 2001
+From: David Faure <faure@kde.org>
+Date: Sat, 27 Jul 2019 19:31:42 +0200
+Subject: [PATCH] Fix compilation with latest KCalCore API changes (Attachment
+ now a value class)
+
+---
+ src/akonadi/akonadiserializer.cpp             | 25 ++++++++++++++++++
+ tests/units/akonadi/akonadiserializertest.cpp | 26 +++++++++++++++++++
+ 2 files changed, 51 insertions(+)
+
+--- src/akonadi/akonadiserializer.cpp
++++ src/akonadi/akonadiserializer.cpp
+@@ -243,6 +243,19 @@ void Serializer::updateTaskFromItem(Doma
+     attachments.reserve(attachmentsInput.size());
+     std::transform(attachmentsInput.cbegin(), attachmentsInput.cend(),
+                    std::back_inserter(attachments),
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++                   [&mimeDb] (const KCalCore::Attachment &attach) {
++                       Domain::Task::Attachment attachment;
++                       if (attach.isUri())
++                           attachment.setUri(QUrl(attach.uri()));
++                       else
++                           attachment.setData(attach.decodedData());
++                       attachment.setLabel(attach.label());
++                       attachment.setMimeType(attach.mimeType());
++                       attachment.setIconName(mimeDb.mimeTypeForName(attach.mimeType()).iconName());
++                       return attachment;
++                   });
++#else
+                    [&mimeDb] (const KCalCore::Attachment::Ptr &attach) {
+                        Domain::Task::Attachment attachment;
+                        if (attach->isUri())
+@@ -254,6 +267,7 @@ void Serializer::updateTaskFromItem(Doma
+                        attachment.setIconName(mimeDb.mimeTypeForName(attach->mimeType()).iconName());
+                        return attachment;
+                    });
++#endif
+     task->setAttachments(attachments);
+ 
+     if (todo->attendeeCount() > 0) {
+@@ -328,6 +342,15 @@ Akonadi::Item Serializer::createItemFrom
+     }
+ 
+     for (const auto &attachment : task->attachments()) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++        KCalCore::Attachment attach(QByteArray{});
++        if (attachment.isUri())
++            attach.setUri(attachment.uri().toString());
++        else
++            attach.setDecodedData(attachment.data());
++        attach.setMimeType(attachment.mimeType());
++        attach.setLabel(attachment.label());
++#else
+         KCalCore::Attachment::Ptr attach(new KCalCore::Attachment(QByteArray()));
+         if (attachment.isUri())
+             attach->setUri(attachment.uri().toString());
+@@ -335,6 +358,7 @@ Akonadi::Item Serializer::createItemFrom
+             attach->setDecodedData(attachment.data());
+         attach->setMimeType(attachment.mimeType());
+         attach->setLabel(attachment.label());
++#endif
+         todo->addAttachment(attach);
+     }
+ 
+--- tests/units/akonadi/akonadiserializertest.cpp
++++ tests/units/akonadi/akonadiserializertest.cpp
+@@ -574,10 +574,17 @@ private slots:
+         setTodoDates(todo, startDate, dueDate);
+         todo->setRelatedTo(QStringLiteral("my-uid"));
+         if (!delegateName.isEmpty() || !delegateEmail.isEmpty()) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++            KCalCore::Attendee attendee(delegateName,
++                                        delegateEmail,
++                                        true,
++                                        KCalCore::Attendee::Accepted);
++#else
+             KCalCore::Attendee::Ptr attendee(new KCalCore::Attendee(delegateName,
+                                                                     delegateEmail,
+                                                                     true,
+                                                                     KCalCore::Attendee::Accepted));
++#endif
+             todo->addAttendee(attendee);
+         }
+ 
+@@ -700,10 +707,17 @@ private slots:
+         setTodoDates(originalTodo, QDateTime(QDate(2013, 11, 24)), QDateTime(QDate(2014, 03, 01)));
+ 
+         originalTodo->setRelatedTo(QStringLiteral("my-uid"));
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++        KCalCore::Attendee originalAttendee(QStringLiteral("John Doe"),
++                                            QStringLiteral("j@d.com"),
++                                            true,
++                                            KCalCore::Attendee::Accepted);
++#else
+         KCalCore::Attendee::Ptr originalAttendee(new KCalCore::Attendee(QStringLiteral("John Doe"),
+                                                                         QStringLiteral("j@d.com"),
+                                                                         true,
+                                                                         KCalCore::Attendee::Accepted));
++#endif
+         originalTodo->addAttendee(originalAttendee);
+ 
+         // ... as payload of an item...
+@@ -762,6 +776,15 @@ private slots:
+             updatedTodo->recurrence()->setDaily(1);
+ 
+         for (int i = 0; i < updatedAttachmentData.size(); i++) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++            KCalCore::Attachment attachment(QByteArray{});
++            if (!updatedAttachmentData.at(i).isEmpty())
++                attachment.setDecodedData(updatedAttachmentData.at(i));
++            else
++                attachment.setUri(updatedAttachmentUris.at(i));
++            attachment.setMimeType(updatedAttachmentMimeTypes.at(i));
++            attachment.setLabel(updatedAttachmentLabels.at(i));
++#else
+             KCalCore::Attachment::Ptr attachment(new KCalCore::Attachment(QByteArray()));
+             if (!updatedAttachmentData.at(i).isEmpty())
+                 attachment->setDecodedData(updatedAttachmentData.at(i));
+@@ -769,14 +792,22 @@ private slots:
+                 attachment->setUri(updatedAttachmentUris.at(i));
+             attachment->setMimeType(updatedAttachmentMimeTypes.at(i));
+             attachment->setLabel(updatedAttachmentLabels.at(i));
++#endif
+             updatedTodo->addAttachment(attachment);
+         }
+ 
+         if (!updatedDelegateName.isEmpty() || !updatedDelegateEmail.isEmpty()) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++            KCalCore::Attendee::Ptr updatedAttendee(updatedDelegateName,
++                                                    updatedDelegateEmail,
++                                                    true,
++                                                    KCalCore::Attendee::Accepted);
++#else
+             KCalCore::Attendee::Ptr updatedAttendee(new KCalCore::Attendee(updatedDelegateName,
+                                                                            updatedDelegateEmail,
+                                                                            true,
+                                                                            KCalCore::Attendee::Accepted));
++#endif
+             updatedTodo->addAttendee(updatedAttendee);
+         }
+         if (updatedRunning) {
+@@ -1293,11 +1324,19 @@ private slots:
+         QCOMPARE(todo->attachments().size(), attachments.size());
+         for (int i = 0; i < attachments.size(); i++) {
+             auto attachment = todo->attachments().at(i);
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++            QCOMPARE(attachment.isUri(), attachments.at(i).isUri());
++            QCOMPARE(QUrl(attachment.uri()), attachments.at(i).uri());
++            QCOMPARE(attachment.decodedData(), attachments.at(i).data());
++            QCOMPARE(attachment.label(), attachments.at(i).label());
++            QCOMPARE(attachment.mimeType(), attachments.at(i).mimeType());
++#else
+             QCOMPARE(attachment->isUri(), attachments.at(i).isUri());
+             QCOMPARE(QUrl(attachment->uri()), attachments.at(i).uri());
+             QCOMPARE(attachment->decodedData(), attachments.at(i).data());
+             QCOMPARE(attachment->label(), attachments.at(i).label());
+             QCOMPARE(attachment->mimeType(), attachments.at(i).mimeType());
++#endif
+         }
+ 
+         if (delegate.isValid()) {

Added: head/deskutils/zanshin/files/patch-git-b41538f15c792e2106d6ce266568f9aae12e09c5
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/zanshin/files/patch-git-b41538f15c792e2106d6ce266568f9aae12e09c5	Sat Jan 11 13:03:30 2020	(r522684)
@@ -0,0 +1,30 @@
+From b41538f15c792e2106d6ce266568f9aae12e09c5 Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter@kde.org>
+Date: Fri, 9 Mar 2018 17:18:01 +0100
+Subject: [PATCH] fix appdata to use new (working) screenshot location
+
+Reviewers: ervin
+
+Reviewed By: ervin
+
+Differential Revision: https://phabricator.kde.org/D11178
+---
+ src/zanshin/app/org.kde.zanshin.appdata.xml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/zanshin/app/org.kde.zanshin.appdata.xml b/src/zanshin/app/org.kde.zanshin.appdata.xml
+index 9273ed36..c2b8cfa1 100644
+--- src/zanshin/app/org.kde.zanshin.appdata.xml
++++ src/zanshin/app/org.kde.zanshin.appdata.xml
+@@ -157,7 +157,7 @@
+   <url type="bugtracker">https://bugs.kde.org/enter_bug.cgi?format=guided&amp;product=zanshin</url>;
+   <screenshots>
+     <screenshot type="default">
+-      <image>http://kde.org/images/screenshots/zanshin.png</image>;
++      <image>https://cdn.kde.org/screenshots/zanshin/zanshin.png</image>;
+     </screenshot>
+   </screenshots>
+   <project_group>KDE</project_group>
+-- 
+2.19.1
+

Added: head/deskutils/zanshin/files/patch-src_akonadi_akonadiserializer.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/zanshin/files/patch-src_akonadi_akonadiserializer.cpp	Sat Jan 11 13:03:30 2020	(r522684)
@@ -0,0 +1,56 @@
+Description: KCalendarCore 19.08 API changes.
+  There is no KCalCore::Attendee::Ptr anymore instead the API returns
+  KCalCore::Attendee items. Like done in 
+  upstream_Make-it-build-both-with-pre-and-post-19.08.0-KCalCor.patch
+  make it possible to build with a wide range of KCalCore versions.
+  This is not needed to get upstream as master has removed this part of code.
+Author: Hefee <hefee@debian.org>
+Origin: debian
+Forwarded: not-needed
+Last-Update: 2014-02-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- src/akonadi/akonadiserializer.cpp
++++ src/akonadi/akonadiserializer.cpp
+@@ -272,6 +272,15 @@ void Serializer::updateTaskFromItem(Doma
+ 
+     if (todo->attendeeCount() > 0) {
+         const auto attendees = todo->attendees();
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++        const auto delegate = std::find_if(attendees.begin(), attendees.end(),
++                                           [] (const KCalCore::Attendee &attendee) {
++                                               return attendee.status() == KCalCore::Attendee::Accepted;
++                                           });
++        if (delegate != attendees.end()) {
++            task->setDelegate(Domain::Task::Delegate((*delegate).name(), (*delegate).email()));
++        }
++#else
+         const auto delegate = std::find_if(attendees.begin(), attendees.end(),
+                                            [] (const KCalCore::Attendee::Ptr &attendee) {
+                                                return attendee->status() == KCalCore::Attendee::Accepted;
+@@ -279,6 +288,7 @@ void Serializer::updateTaskFromItem(Doma
+         if (delegate != attendees.end()) {
+             task->setDelegate(Domain::Task::Delegate((*delegate)->name(), (*delegate)->email()));
+         }
++#endif
+     }
+ }
+ 
+@@ -363,10 +373,17 @@ Akonadi::Item Serializer::createItemFrom
+     }
+ 
+     if (task->delegate().isValid()) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++        KCalCore::Attendee attendee(task->delegate().name(),
++                                    task->delegate().email(),
++                                    true,
++                                    KCalCore::Attendee::Accepted);
++#else
+         KCalCore::Attendee::Ptr attendee(new KCalCore::Attendee(task->delegate().name(),
+                                                                 task->delegate().email(),
+                                                                 true,
+                                                                 KCalCore::Attendee::Accepted));
++#endif
+         todo->addAttendee(attendee);
+     }
+     if (task->isRunning()) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001111303.00BD3UPR033024>