1 |
commit: 0f0eddcd7cfb26c8f6c16a3f812400c0a090d899 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 5 22:41:27 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 5 22:42:05 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f0eddcd |
7 |
|
8 |
kde-apps/kblog: Fix build with kde-frameworks/syndication |
9 |
|
10 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.50, Repoman-2.3.11 |
12 |
|
13 |
.../kblog/files/kblog-18.04.3-syndication.patch | 219 +++++++++++++++++++++ |
14 |
kde-apps/kblog/kblog-18.04.3-r1.ebuild | 26 +++ |
15 |
2 files changed, 245 insertions(+) |
16 |
|
17 |
diff --git a/kde-apps/kblog/files/kblog-18.04.3-syndication.patch b/kde-apps/kblog/files/kblog-18.04.3-syndication.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..4771666c0f0 |
20 |
--- /dev/null |
21 |
+++ b/kde-apps/kblog/files/kblog-18.04.3-syndication.patch |
22 |
@@ -0,0 +1,219 @@ |
23 |
+From 85fc601b7c622a04c383331841733d681bfc50f3 Mon Sep 17 00:00:00 2001 |
24 |
+From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@×××.org> |
25 |
+Date: Sun, 22 Apr 2018 15:37:01 +0200 |
26 |
+Subject: Fix build against Syndication |
27 |
+ |
28 |
+--- |
29 |
+ src/CMakeLists.txt | 1 + |
30 |
+ src/feedretriever.cpp | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ |
31 |
+ src/feedretriever.h | 54 ++++++++++++++++++++++++++++++++++++++++ |
32 |
+ src/gdata.cpp | 11 +++++---- |
33 |
+ 4 files changed, 129 insertions(+), 5 deletions(-) |
34 |
+ create mode 100644 src/feedretriever.cpp |
35 |
+ create mode 100644 src/feedretriever.h |
36 |
+ |
37 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
38 |
+index 03cef4e..1742abb 100644 |
39 |
+--- a/src/CMakeLists.txt |
40 |
++++ b/src/CMakeLists.txt |
41 |
+@@ -4,6 +4,7 @@ set(kblog_SRCS |
42 |
+ blogcomment.cpp |
43 |
+ blogmedia.cpp |
44 |
+ blogger1.cpp |
45 |
++ feedretriever.cpp |
46 |
+ gdata.cpp |
47 |
+ # livejournal.cpp |
48 |
+ metaweblog.cpp |
49 |
+diff --git a/src/feedretriever.cpp b/src/feedretriever.cpp |
50 |
+new file mode 100644 |
51 |
+index 0000000..9d481c6 |
52 |
+--- /dev/null |
53 |
++++ b/src/feedretriever.cpp |
54 |
+@@ -0,0 +1,68 @@ |
55 |
++/* |
56 |
++ This file is part of Akregator. |
57 |
++ |
58 |
++ Copyright (C) 2018 Daniel Vrátil <dvratil@×××.org> |
59 |
++ |
60 |
++ This program is free software; you can redistribute it and/or modify |
61 |
++ it under the terms of the GNU General Public License as published by |
62 |
++ the Free Software Foundation; either version 2 of the License, or |
63 |
++ (at your option) any later version. |
64 |
++ |
65 |
++ This program is distributed in the hope that it will be useful, |
66 |
++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
67 |
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
68 |
++ GNU General Public License for more details. |
69 |
++ |
70 |
++ You should have received a copy of the GNU General Public License |
71 |
++ along with this program; if not, write to the Free Software |
72 |
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
73 |
++ |
74 |
++ As a special exception, permission is given to link this program |
75 |
++ with any edition of Qt, and distribute the resulting executable, |
76 |
++ without including the source code for Qt in the source distribution. |
77 |
++*/ |
78 |
++ |
79 |
++#include "feedretriever.h" |
80 |
++ |
81 |
++#include <KIO/StoredTransferJob> |
82 |
++ |
83 |
++#include <QUrl> |
84 |
++ |
85 |
++using namespace KBlog; |
86 |
++ |
87 |
++FeedRetriever::FeedRetriever() |
88 |
++ : Syndication::DataRetriever() |
89 |
++{ |
90 |
++} |
91 |
++ |
92 |
++void FeedRetriever::retrieveData(const QUrl &url) |
93 |
++{ |
94 |
++ auto job = KIO::storedGet(url, KIO::NoReload, KIO::HideProgressInfo); |
95 |
++ connect(job, &KJob::result, this, &FeedRetriever::getFinished); |
96 |
++ mJob = job; |
97 |
++ mJob->start(); |
98 |
++} |
99 |
++ |
100 |
++int FeedRetriever::errorCode() const |
101 |
++{ |
102 |
++ return mError; |
103 |
++} |
104 |
++ |
105 |
++void FeedRetriever::abort() |
106 |
++{ |
107 |
++ if (mJob) { |
108 |
++ mJob->kill(); |
109 |
++ mJob = nullptr; |
110 |
++ } |
111 |
++} |
112 |
++ |
113 |
++void FeedRetriever::getFinished(KJob *job) |
114 |
++{ |
115 |
++ if (job->error()) { |
116 |
++ mError = job->error(); |
117 |
++ Q_EMIT dataRetrieved({}, false); |
118 |
++ return; |
119 |
++ } |
120 |
++ |
121 |
++ Q_EMIT dataRetrieved(static_cast<KIO::StoredTransferJob*>(job)->data(), true); |
122 |
++} |
123 |
+diff --git a/src/feedretriever.h b/src/feedretriever.h |
124 |
+new file mode 100644 |
125 |
+index 0000000..fb28020 |
126 |
+--- /dev/null |
127 |
++++ b/src/feedretriever.h |
128 |
+@@ -0,0 +1,54 @@ |
129 |
++/* |
130 |
++ This file is part of Akregator. |
131 |
++ |
132 |
++ Copyright (C) 2018 Daniel Vrátil <dvratil@×××.org> |
133 |
++ |
134 |
++ This program is free software; you can redistribute it and/or modify |
135 |
++ it under the terms of the GNU General Public License as published by |
136 |
++ the Free Software Foundation; either version 2 of the License, or |
137 |
++ (at your option) any later version. |
138 |
++ |
139 |
++ This program is distributed in the hope that it will be useful, |
140 |
++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
141 |
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
142 |
++ GNU General Public License for more details. |
143 |
++ |
144 |
++ You should have received a copy of the GNU General Public License |
145 |
++ along with this program; if not, write to the Free Software |
146 |
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
147 |
++ |
148 |
++ As a special exception, permission is given to link this program |
149 |
++ with any edition of Qt, and distribute the resulting executable, |
150 |
++ without including the source code for Qt in the source distribution. |
151 |
++*/ |
152 |
++ |
153 |
++#ifndef FEEDRETRIEVER_H_ |
154 |
++#define FEEDRETRIEVER_H_ |
155 |
++ |
156 |
++#include <syndication/dataretriever.h> |
157 |
++ |
158 |
++class KJob; |
159 |
++ |
160 |
++namespace KBlog { |
161 |
++ |
162 |
++class FeedRetriever : public Syndication::DataRetriever |
163 |
++{ |
164 |
++ Q_OBJECT |
165 |
++public: |
166 |
++ explicit FeedRetriever(); |
167 |
++ |
168 |
++ void retrieveData(const QUrl &url) override; |
169 |
++ void abort() override; |
170 |
++ int errorCode() const override; |
171 |
++ |
172 |
++private Q_SLOTS: |
173 |
++ void getFinished(KJob *job); |
174 |
++ |
175 |
++private: |
176 |
++ KJob *mJob = nullptr; |
177 |
++ int mError = 0; |
178 |
++}; |
179 |
++ |
180 |
++} |
181 |
++ |
182 |
++#endif |
183 |
+diff --git a/src/gdata.cpp b/src/gdata.cpp |
184 |
+index 9ca5b84..115e0a0 100644 |
185 |
+--- a/src/gdata.cpp |
186 |
++++ b/src/gdata.cpp |
187 |
+@@ -23,6 +23,7 @@ |
188 |
+ #include "gdata_p.h" |
189 |
+ #include "blogpost.h" |
190 |
+ #include "blogcomment.h" |
191 |
++#include "feedretriever.h" |
192 |
+ |
193 |
+ #include <syndication/loader.h> |
194 |
+ #include <syndication/item.h> |
195 |
+@@ -103,7 +104,7 @@ void GData::listBlogs() |
196 |
+ SIGNAL(loadingComplete(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode)), |
197 |
+ this, |
198 |
+ SLOT(slotListBlogs(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode))); |
199 |
+- loader->loadFrom(QUrl(QStringLiteral("http://www.blogger.com/feeds/%1/blogs").arg(profileId()))); |
200 |
++ loader->loadFrom(QUrl(QStringLiteral("http://www.blogger.com/feeds/%1/blogs").arg(profileId())), new FeedRetriever); |
201 |
+ } |
202 |
+ |
203 |
+ void GData::listRecentPosts(const QStringList &labels, int number, |
204 |
+@@ -145,7 +146,7 @@ void GData::listRecentPosts(const QStringList &labels, int number, |
205 |
+ SIGNAL(loadingComplete(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode)), |
206 |
+ this, |
207 |
+ SLOT(slotListRecentPosts(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode))); |
208 |
+- loader->loadFrom(url); |
209 |
++ loader->loadFrom(url, new FeedRetriever); |
210 |
+ } |
211 |
+ |
212 |
+ void GData::listRecentPosts(int number) |
213 |
+@@ -165,7 +166,7 @@ void GData::listComments(KBlog::BlogPost *post) |
214 |
+ this, |
215 |
+ SLOT(slotListComments(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode))); |
216 |
+ loader->loadFrom(QUrl(QStringLiteral("http://www.blogger.com/feeds/") + blogId() + QLatin1Char('/') + |
217 |
+- post->postId() + QStringLiteral("/comments/default"))); |
218 |
++ post->postId() + QStringLiteral("/comments/default")), new FeedRetriever); |
219 |
+ } |
220 |
+ |
221 |
+ void GData::listAllComments() |
222 |
+@@ -176,7 +177,7 @@ void GData::listAllComments() |
223 |
+ SIGNAL(loadingComplete(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode)), |
224 |
+ this, |
225 |
+ SLOT(slotListAllComments(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode))); |
226 |
+- loader->loadFrom(QUrl(QStringLiteral("http://www.blogger.com/feeds/%1/comments/default").arg(blogId()))); |
227 |
++ loader->loadFrom(QUrl(QStringLiteral("http://www.blogger.com/feeds/%1/comments/default").arg(blogId())), new FeedRetriever); |
228 |
+ } |
229 |
+ |
230 |
+ void GData::fetchPost(KBlog::BlogPost *post) |
231 |
+@@ -196,7 +197,7 @@ void GData::fetchPost(KBlog::BlogPost *post) |
232 |
+ SIGNAL(loadingComplete(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode)), |
233 |
+ this, |
234 |
+ SLOT(slotFetchPost(Syndication::Loader*,Syndication::FeedPtr,Syndication::ErrorCode))); |
235 |
+- loader->loadFrom(QUrl(QStringLiteral("http://www.blogger.com/feeds/%1/posts/default").arg(blogId()))); |
236 |
++ loader->loadFrom(QUrl(QStringLiteral("http://www.blogger.com/feeds/%1/posts/default").arg(blogId())), new FeedRetriever); |
237 |
+ } |
238 |
+ |
239 |
+ void GData::modifyPost(KBlog::BlogPost *post) |
240 |
+-- |
241 |
+cgit v0.11.2 |
242 |
|
243 |
diff --git a/kde-apps/kblog/kblog-18.04.3-r1.ebuild b/kde-apps/kblog/kblog-18.04.3-r1.ebuild |
244 |
new file mode 100644 |
245 |
index 00000000000..1deda67b9ff |
246 |
--- /dev/null |
247 |
+++ b/kde-apps/kblog/kblog-18.04.3-r1.ebuild |
248 |
@@ -0,0 +1,26 @@ |
249 |
+# Copyright 1999-2018 Gentoo Authors |
250 |
+# Distributed under the terms of the GNU General Public License v2 |
251 |
+ |
252 |
+EAPI=6 |
253 |
+ |
254 |
+KDE_TEST="true" |
255 |
+inherit kde5 |
256 |
+ |
257 |
+DESCRIPTION="Library providing client-side support for web application remote blogging APIs" |
258 |
+LICENSE="GPL-2+" |
259 |
+KEYWORDS="~amd64 ~x86" |
260 |
+IUSE="" |
261 |
+ |
262 |
+DEPEND=" |
263 |
+ $(add_frameworks_dep kcoreaddons) |
264 |
+ $(add_frameworks_dep ki18n) |
265 |
+ $(add_frameworks_dep kio) |
266 |
+ $(add_frameworks_dep kxmlrpcclient) |
267 |
+ $(add_frameworks_dep syndication) |
268 |
+ $(add_kdeapps_dep kcalcore) |
269 |
+" |
270 |
+RDEPEND="${DEPEND} |
271 |
+ !kde-apps/kdepim-l10n |
272 |
+" |
273 |
+ |
274 |
+PATCHES=( "${FILESDIR}/${P}-syndication.patch" ) |