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-text/kjots/, app-text/kjots/files/
Date: Sun, 20 Sep 2020 08:42:23 +0000 (UTC)	[thread overview]
Message-ID: <1600591334.dd612ec49fd15ed7986e5c74a36f44fdf97cc2a9.asturm@gentoo> (raw)

commit:     dd612ec49fd15ed7986e5c74a36f44fdf97cc2a9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 08:16:15 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 08:42:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd612ec4

app-text/kjots: Fix build with >=kde-apps/kontactinterface-20.08

- Raise minimum KDE PIM dependency to 20.08
- Raise minimum KDE Frameworks dependency to 5.70 and drop obsolete slot op
- Drop obsolete blocker

Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kjots-5.0.2-kontactinterface-20.08.patch | 148 +++++++++++++++++++++
 app-text/kjots/kjots-5.0.2-r2.ebuild               |  49 +++++++
 2 files changed, 197 insertions(+)

diff --git a/app-text/kjots/files/kjots-5.0.2-kontactinterface-20.08.patch b/app-text/kjots/files/kjots-5.0.2-kontactinterface-20.08.patch
new file mode 100644
index 00000000000..608a50d9856
--- /dev/null
+++ b/app-text/kjots/files/kjots-5.0.2-kontactinterface-20.08.patch
@@ -0,0 +1,148 @@
+From bcf49fb95bee12bbc4bef0578285ad296deafcae Mon Sep 17 00:00:00 2001
+From: David Faure <faure@kde.org>
+Date: Fri, 24 Apr 2020 01:25:43 +0200
+Subject: [PATCH] Install the kontact plugin into kontact5, with JSON metadata.
+
+Summary: This will allow kontact to use KPluginLoader one day.
+
+It also fixes compilation with current kontactinterface API.
+
+Test Plan:
+rm $prefix/lib64/plugins/kontact_zanshinplugin.so ; make install
+kontact still finds the zanshin plugin
+
+The same steps (other than old-kontact-interface compatibility) were already
+pushed to all other kontact plugins.
+
+This commit is very similar to https://phabricator.kde.org/D28847
+and its predecessor commit, in zanshin.
+---
+ src/kontact_plugin/CMakeLists.txt      | 11 ++++++++-
+ src/kontact_plugin/kjots_plugin.cpp    | 34 ++++++++++++++++++++------
+ src/kontact_plugin/kjots_plugin.h      |  5 ++++
+ src/kontact_plugin/kjotsplugin.desktop |  2 +-
+ 4 files changed, 43 insertions(+), 9 deletions(-)
+
+diff --git a/src/kontact_plugin/CMakeLists.txt b/src/kontact_plugin/CMakeLists.txt
+index 8a6b5e1..dec4b8b 100644
+--- a/src/kontact_plugin/CMakeLists.txt
++++ b/src/kontact_plugin/CMakeLists.txt
+@@ -1,13 +1,22 @@
+ include_directories(${kjots_SOURCE_DIR}/src)
+ 
++# TODO: remove once kontactinterface 5.14.42 is required
++if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
++  # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros.
++  # 3.10+ lets us provide more macro names that require automoc.
++  # KF5 >= 5.42 takes care itself of adding its macros in its cmake config files
++  list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "EXPORT_KONTACT_PLUGIN_WITH_JSON")
++endif()
++
+ set(kontact_kjots_PART_SRCS
+     kjots_plugin.cpp
+ )
+ 
+ add_library(kontact_kjotsplugin MODULE ${kontact_kjots_PART_SRCS})
+ target_link_libraries(kontact_kjotsplugin KF5::KontactInterface)
++kcoreaddons_desktop_to_json(kontact_kjotsplugin kjotsplugin.desktop)
+ 
+-install(TARGETS kontact_kjotsplugin DESTINATION ${KDE_INSTALL_PLUGINDIR})
++install(TARGETS kontact_kjotsplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/kontact5)
+ install(FILES kjotsplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}/kontact)
+ install(FILES kjots.setdlg DESTINATION ${KDE_INSTALL_DATADIR}/kontact/ksettingsdialog)
+ 
+diff --git a/src/kontact_plugin/kjots_plugin.cpp b/src/kontact_plugin/kjots_plugin.cpp
+index 66e7ed5..b74d601 100644
+--- a/src/kontact_plugin/kjots_plugin.cpp
++++ b/src/kontact_plugin/kjots_plugin.cpp
+@@ -33,7 +33,25 @@
+ #include <QIcon>
+ #include <QStandardPaths>
+ 
+-EXPORT_KONTACT_PLUGIN(KJotsPlugin, kjots)
++#if KONTACTINTERFACE_VERSION < QT_VERSION_CHECK(5, 14, 42)
++/**
++  Exports Kontact plugin.
++  @param pluginclass the class to instanciate (must derive from KontactInterface::Plugin
++  @param jsonFile filename of the JSON file, generated from a .desktop file
++ */
++#define EXPORT_KONTACT_PLUGIN_WITH_JSON( pluginclass, jsonFile ) \
++    class Instance                                           \
++    {                                                        \
++    public:                                                \
++        static QObject *createInstance( QWidget *, QObject *parent, const QVariantList &list ) \
++        { return new pluginclass( static_cast<KontactInterface::Core*>( parent ), list ); } \
++    };                                                                    \
++    K_PLUGIN_FACTORY_WITH_JSON( KontactPluginFactory, jsonFile, registerPlugin< pluginclass >   \
++                              ( QString(), Instance::createInstance ); ) \
++    K_EXPORT_PLUGIN_VERSION(KONTACT_PLUGIN_VERSION)
++#endif
++
++EXPORT_KONTACT_PLUGIN_WITH_JSON(KJotsPlugin, "kjotsplugin.json")
+ 
+ KJotsPlugin::KJotsPlugin(KontactInterface::Core *core, const QVariantList &)
+     : KontactInterface::Plugin(core, core, "kjots")
+@@ -63,15 +81,17 @@ QStringList KJotsPlugin::invisibleToolbarActions() const
+     return { QStringLiteral("new_page"), QStringLiteral("new_book") };
+ }
+ 
++#if KONTACTINTERFACE_VERSION >= QT_VERSION_CHECK(5, 14, 42)
++KParts::Part *KJotsPlugin::createPart()
++{
++    return loadPart();
++}
++#else
+ KParts::ReadOnlyPart *KJotsPlugin::createPart()
+ {
+-    KParts::ReadOnlyPart *part = loadPart();
+-    if (!part) {
+-        return Q_NULLPTR;
+-    }
+-
+-    return part;
++    return loadPart();
+ }
++#endif
+ 
+ QStringList KJotsPlugin::configModules() const
+ {
+diff --git a/src/kontact_plugin/kjots_plugin.h b/src/kontact_plugin/kjots_plugin.h
+index cd62373..4945d25 100644
+--- a/src/kontact_plugin/kjots_plugin.h
++++ b/src/kontact_plugin/kjots_plugin.h
+@@ -24,6 +24,7 @@
+ #define KJOTS_PLUGIN_H
+ 
+ #include <KontactInterface/UniqueAppHandler>
++#include <kontactinterface_version.h>
+ 
+ namespace KontactInterface
+ {
+@@ -62,7 +63,11 @@ public:
+     QStringList invisibleToolbarActions() const Q_DECL_OVERRIDE;
+ 
+ protected:
++#if KONTACTINTERFACE_VERSION >= QT_VERSION_CHECK(5, 14, 42)
++    KParts::Part *createPart() override;
++#else
+     KParts::ReadOnlyPart *createPart() Q_DECL_OVERRIDE;
++#endif
+     KontactInterface::UniqueAppWatcher *mUniqueAppWatcher;
+ 
+ private:
+diff --git a/src/kontact_plugin/kjotsplugin.desktop b/src/kontact_plugin/kjotsplugin.desktop
+index 1339753..d5a198f 100644
+--- a/src/kontact_plugin/kjotsplugin.desktop
++++ b/src/kontact_plugin/kjotsplugin.desktop
+@@ -3,7 +3,7 @@ Type=Service
+ Icon=kjots
+ X-KDE-ServiceTypes=Kontact/Plugin,KPluginInfo
+ 
+-X-KDE-Library=kontact_kjotsplugin
++X-KDE-Library=kontact5/kontact_kjotsplugin
+ X-KDE-KontactPluginVersion=10
+ X-KDE-KontactPartLibraryName=kjotspart
+ X-KDE-KontactPartExecutableName=kjots
+-- 
+GitLab
+

diff --git a/app-text/kjots/kjots-5.0.2-r2.ebuild b/app-text/kjots/kjots-5.0.2-r2.ebuild
new file mode 100644
index 00000000000..07aaf94d7b1
--- /dev/null
+++ b/app-text/kjots/kjots-5.0.2-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KFMIN=5.70.0
+QTMIN=5.12.3
+inherit ecm kde.org
+
+DESCRIPTION="Note taking utility by KDE"
+HOMEPAGE="https://userbase.kde.org/KJots https://community.kde.org/PIM/KJots"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="5"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+	dev-libs/grantlee:5
+	dev-libs/libxslt
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtprintsupport-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=kde-apps/akonadi-20.08.1:5
+	>=kde-apps/akonadi-notes-20.08.1:5
+	>=kde-apps/kmime-20.08.1:5
+	>=kde-apps/kontactinterface-20.08.1:5
+	>=kde-apps/kpimtextedit-20.08.1:5
+	>=kde-frameworks/kbookmarks-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kio-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5
+	>=kde-frameworks/kparts-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES+=(
+	"${FILESDIR}/${P}-kf5bookmarks-5.69.patch" # KDE-Bug 384000
+	"${FILESDIR}/${P}-kontactinterface-20.08.patch"
+)


             reply	other threads:[~2020-09-20  8:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-20  8:42 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-04-30 14:04 [gentoo-commits] repo/gentoo:master commit in: app-text/kjots/, app-text/kjots/files/ Andreas Sturmlechner
2022-08-28 13:05 Andreas Sturmlechner
2022-05-09  0:34 Andreas Sturmlechner
2022-03-20 13:53 Andreas Sturmlechner
2020-04-21 14:41 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=1600591334.dd612ec49fd15ed7986e5c74a36f44fdf97cc2a9.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