1 |
commit: 064fa6e77515cac191d5b3672ce17447d2c70e40 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 26 22:47:20 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 26 22:47:20 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=064fa6e7 |
7 |
|
8 |
kde-plasma/kdeplasma-addons: backport comic widget metadata parsing fix |
9 |
|
10 |
Backports upstream commit 27710b95a3fd53019b4b053cbdf720354fd939d2 |
11 |
to fix display of comics in widget. |
12 |
|
13 |
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=452596 |
14 |
Closes: https://bugs.gentoo.org/840755 |
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
...addons-5.24.4-fix-comic-widget-dataengine.patch | 61 ++++++++++++++++++ |
18 |
.../kdeplasma-addons-5.24.4-r1.ebuild | 75 ++++++++++++++++++++++ |
19 |
2 files changed, 136 insertions(+) |
20 |
|
21 |
diff --git a/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.24.4-fix-comic-widget-dataengine.patch b/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.24.4-fix-comic-widget-dataengine.patch |
22 |
new file mode 100644 |
23 |
index 000000000000..4cb01a05ba84 |
24 |
--- /dev/null |
25 |
+++ b/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.24.4-fix-comic-widget-dataengine.patch |
26 |
@@ -0,0 +1,61 @@ |
27 |
+https://invent.kde.org/plasma/kdeplasma-addons/-/commit/27710b95a3fd53019b4b053cbdf720354fd939d2 |
28 |
+https://bugs.kde.org/show_bug.cgi?id=452596 |
29 |
+https://bugs.gentoo.org/840755 |
30 |
+ |
31 |
+From: Alexander Lohnau <alexander.lohnau@×××.de> |
32 |
+Date: Sun, 17 Apr 2022 06:26:35 +0200 |
33 |
+Subject: [PATCH] Remove unneeded check for comic Dataengine being valid |
34 |
+ |
35 |
+BUG: 452596 |
36 |
+ |
37 |
+We do not really care, if the metadata of the plugin is valid, as long as we can |
38 |
+properly create the dataengine from it. |
39 |
+ |
40 |
+Test Plan: |
41 |
+With plasma-frameworks master, and this on Plasma/5.24 based revision, the dataengine can properly be loaded. |
42 |
+ |
43 |
+When intenitionally exporting a defunct plugin: |
44 |
+```cpp |
45 |
+class Dummy : public QObject |
46 |
+{ |
47 |
+ Q_OBJECT |
48 |
+ |
49 |
+public: |
50 |
+ Dummy(QObject *parent, const QVariantList &args) { |
51 |
+ } |
52 |
+}; |
53 |
+K_PLUGIN_CLASS_WITH_JSON(Dummy, "plasma-dataengine-comic.json") |
54 |
+``` |
55 |
+The applet does not crash. |
56 |
+--- a/applets/comic/comic.cpp |
57 |
++++ b/applets/comic/comic.cpp |
58 |
+@@ -465,7 +465,7 @@ void ComicApplet::updateComic(const QString &identifierSuffix) |
59 |
+ const QString id = mCurrent.id(); |
60 |
+ setConfigurationRequired(id.isEmpty()); |
61 |
+ |
62 |
+- if (!id.isEmpty() && mEngine && mEngine->isValid()) { |
63 |
++ if (!id.isEmpty() && mEngine) { |
64 |
+ setBusy(true); |
65 |
+ |
66 |
+ const QString identifier = id + QLatin1Char(':') + identifierSuffix; |
67 |
+@@ -485,7 +485,7 @@ void ComicApplet::updateComic(const QString &identifierSuffix) |
68 |
+ slotScaleToContent(); |
69 |
+ } else { |
70 |
+ qWarning() << "Either no identifier was specified or the engine could not be created:" |
71 |
+- << "id" << id << "engine valid:" << (mEngine && mEngine->isValid()); |
72 |
++ << "id" << id << "engine valid:" << mEngine; |
73 |
+ setConfigurationRequired(true); |
74 |
+ } |
75 |
+ updateContextMenu(); |
76 |
+--- a/applets/comic/comicarchivejob.cpp |
77 |
++++ b/applets/comic/comicarchivejob.cpp |
78 |
+@@ -80,7 +80,7 @@ bool ComicArchiveJob::isValid() const |
79 |
+ break; |
80 |
+ } |
81 |
+ |
82 |
+- return mEngine->isValid() && mZip && mZip->isOpen(); |
83 |
++ return mZip && mZip->isOpen(); |
84 |
+ } |
85 |
+ |
86 |
+ void ComicArchiveJob::setToIdentifier(const QString &toIdentifier) |
87 |
+GitLab |
88 |
|
89 |
diff --git a/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.24.4-r1.ebuild b/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.24.4-r1.ebuild |
90 |
new file mode 100644 |
91 |
index 000000000000..ef6ef1fca1bb |
92 |
--- /dev/null |
93 |
+++ b/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.24.4-r1.ebuild |
94 |
@@ -0,0 +1,75 @@ |
95 |
+# Copyright 1999-2022 Gentoo Authors |
96 |
+# Distributed under the terms of the GNU General Public License v2 |
97 |
+ |
98 |
+EAPI=8 |
99 |
+ |
100 |
+ECM_HANDBOOK="forceoptional" |
101 |
+KFMIN=5.90.0 |
102 |
+PVCUT=$(ver_cut 1-3) |
103 |
+QTMIN=5.15.2 |
104 |
+VIRTUALX_REQUIRED="test" |
105 |
+inherit ecm kde.org optfeature |
106 |
+ |
107 |
+DESCRIPTION="Extra Plasma applets and engines" |
108 |
+ |
109 |
+LICENSE="GPL-2 LGPL-2" |
110 |
+SLOT="5" |
111 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
112 |
+IUSE="share webengine" |
113 |
+ |
114 |
+RESTRICT="test" # bug 727846 |
115 |
+ |
116 |
+DEPEND=" |
117 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
118 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
119 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
120 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
121 |
+ >=kde-frameworks/karchive-${KFMIN}:5 |
122 |
+ >=kde-frameworks/kcmutils-${KFMIN}:5 |
123 |
+ >=kde-frameworks/kcompletion-${KFMIN}:5 |
124 |
+ >=kde-frameworks/kconfig-${KFMIN}:5 |
125 |
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5 |
126 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
127 |
+ >=kde-frameworks/kdeclarative-${KFMIN}:5 |
128 |
+ >=kde-frameworks/kholidays-${KFMIN}:5 |
129 |
+ >=kde-frameworks/ki18n-${KFMIN}:5 |
130 |
+ >=kde-frameworks/kio-${KFMIN}:5 |
131 |
+ >=kde-frameworks/knewstuff-${KFMIN}:5 |
132 |
+ >=kde-frameworks/knotifications-${KFMIN}:5 |
133 |
+ >=kde-frameworks/kpackage-${KFMIN}:5 |
134 |
+ >=kde-frameworks/krunner-${KFMIN}:5 |
135 |
+ >=kde-frameworks/kservice-${KFMIN}:5 |
136 |
+ >=kde-frameworks/kunitconversion-${KFMIN}:5 |
137 |
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
138 |
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5 |
139 |
+ >=kde-frameworks/kxmlgui-${KFMIN}:5 |
140 |
+ >=kde-frameworks/plasma-${KFMIN}:5 |
141 |
+ >=kde-frameworks/sonnet-${KFMIN}:5 |
142 |
+ share? ( >=kde-frameworks/purpose-${KFMIN}:5 ) |
143 |
+ webengine? ( >=dev-qt/qtwebengine-${QTMIN}:5 ) |
144 |
+" |
145 |
+RDEPEND="${DEPEND} |
146 |
+ >=dev-qt/qtquickcontrols-${QTMIN}:5 |
147 |
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5 |
148 |
+ >=kde-plasma/plasma-workspace-${PVCUT}:5 |
149 |
+" |
150 |
+ |
151 |
+PATCHES=( |
152 |
+ "${FILESDIR}"/${P}-fix-comic-widget-dataengine.patch |
153 |
+) |
154 |
+ |
155 |
+src_configure() { |
156 |
+ local mycmakeargs=( |
157 |
+ $(cmake_use_find_package share KF5Purpose) |
158 |
+ $(cmake_use_find_package webengine Qt5WebEngine) |
159 |
+ ) |
160 |
+ |
161 |
+ ecm_src_configure |
162 |
+} |
163 |
+ |
164 |
+pkg_postinst() { |
165 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
166 |
+ optfeature "Disk quota applet" sys-fs/quota |
167 |
+ fi |
168 |
+ ecm_pkg_postinst |
169 |
+} |