1 |
commit: a78e71aadebf1af2743ca49bfb698fbb3db3a52c |
2 |
Author: Johannes Huber <johu <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 27 12:47:19 2015 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 27 12:47:19 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a78e71aa |
7 |
|
8 |
net-libs/accounts-qt: New package |
9 |
|
10 |
Needed for KDEs Telepathy client based on KF5. Initial ebuild by Karol Herbst |
11 |
<git <AT> karolherbst.de>. Improvements by Michael Palimaka <kensington@g.o>. |
12 |
|
13 |
Package-Manager: portage-2.2.20.1 |
14 |
|
15 |
net-libs/accounts-qt/Manifest | 1 + |
16 |
net-libs/accounts-qt/accounts-qt-1.13.ebuild | 44 ++++ |
17 |
.../files/accounts-qt-1.11-to-1.13.patch | 289 +++++++++++++++++++++ |
18 |
net-libs/accounts-qt/metadata.xml | 5 + |
19 |
4 files changed, 339 insertions(+) |
20 |
|
21 |
diff --git a/net-libs/accounts-qt/Manifest b/net-libs/accounts-qt/Manifest |
22 |
new file mode 100644 |
23 |
index 0000000..bae5628 |
24 |
--- /dev/null |
25 |
+++ b/net-libs/accounts-qt/Manifest |
26 |
@@ -0,0 +1 @@ |
27 |
+DIST accounts-qt-1.13.tar.bz2 544655 SHA256 9033891b7f122f578d0ccf22b0e31fc478e644e97f24e7ad8fb54ef0a5da30f0 SHA512 e39da214bd4aa72ac745fa2b7735de41985f9d854b6278d0c69c4dccb24ff411d20052454854dce423a2e6cb40bb1fd4b1f82328dcf6acd10cb290881e5c8c54 WHIRLPOOL 7bcd8d15fb902cde2d35ed855ecbc26658aaa9ddfd20271af65f5586bbef83dfb3697d69536231cd28efc35ba0c773da364290c7b7faf618b15d33be68fc560d |
28 |
|
29 |
diff --git a/net-libs/accounts-qt/accounts-qt-1.13.ebuild b/net-libs/accounts-qt/accounts-qt-1.13.ebuild |
30 |
new file mode 100644 |
31 |
index 0000000..f5bfac9 |
32 |
--- /dev/null |
33 |
+++ b/net-libs/accounts-qt/accounts-qt-1.13.ebuild |
34 |
@@ -0,0 +1,44 @@ |
35 |
+# Copyright 1999-2015 Gentoo Foundation |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+# $Id$ |
38 |
+ |
39 |
+EAPI=5 |
40 |
+ |
41 |
+inherit qmake-utils |
42 |
+ |
43 |
+DESCRIPTION="Qt5 bindings for libaccounts-glib" |
44 |
+HOMEPAGE="https://01.org/gsso/" |
45 |
+SRC_URI="http://dev.gentoo.org/~kensington/distfiles/${P}.tar.bz2" |
46 |
+ |
47 |
+LICENSE="LGPL-2.1" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~x86" |
50 |
+IUSE="doc test" |
51 |
+ |
52 |
+# killed by stack smashing detector |
53 |
+RESTRICT="test" |
54 |
+ |
55 |
+RDEPEND=" |
56 |
+ net-libs/libaccounts-glib |
57 |
+ dev-libs/glib:2 |
58 |
+ dev-qt/qtcore:5 |
59 |
+ dev-qt/qtxml:5 |
60 |
+" |
61 |
+DEPEND="${RDEPEND} |
62 |
+ doc? ( app-doc/doxygen ) |
63 |
+ test? ( dev-qt/qttest:5 ) |
64 |
+" |
65 |
+ |
66 |
+src_prepare() { |
67 |
+ sed -e "s|share/doc/\$\${PROJECT_NAME}|share/doc/${PF}|" -i doc/doc.pri || die |
68 |
+ use doc || sed -e "/include( doc\/doc.pri )/d" -i ${PN}.pro || die |
69 |
+ use test || sed -i -e '/^SUBDIRS/s/tests//' accounts-qt.pro || die "couldn't disable tests" |
70 |
+} |
71 |
+ |
72 |
+src_configure() { |
73 |
+ eqmake5 |
74 |
+} |
75 |
+ |
76 |
+src_install() { |
77 |
+ emake INSTALL_ROOT="${D}" install |
78 |
+} |
79 |
|
80 |
diff --git a/net-libs/accounts-qt/files/accounts-qt-1.11-to-1.13.patch b/net-libs/accounts-qt/files/accounts-qt-1.11-to-1.13.patch |
81 |
new file mode 100644 |
82 |
index 0000000..28b7db1 |
83 |
--- /dev/null |
84 |
+++ b/net-libs/accounts-qt/files/accounts-qt-1.11-to-1.13.patch |
85 |
@@ -0,0 +1,289 @@ |
86 |
+diff --git a/Accounts/Accounts.pro b/Accounts/Accounts.pro |
87 |
+index b5e77fc..8b3d0d6 100644 |
88 |
+--- a/Accounts/Accounts.pro |
89 |
++++ b/Accounts/Accounts.pro |
90 |
+@@ -44,8 +44,10 @@ QT -= gui |
91 |
+ |
92 |
+ greaterThan(QT_MAJOR_VERSION, 4) { |
93 |
+ TARGET = accounts-qt5 |
94 |
++ CMAKE_BASENAME = AccountsQt5 |
95 |
+ } else { |
96 |
+ TARGET = accounts-qt |
97 |
++ CMAKE_BASENAME = AccountsQt |
98 |
+ } |
99 |
+ |
100 |
+ PKGCONFIG += \ |
101 |
+@@ -65,10 +67,12 @@ pkgconfig.files = $${TARGET}.pc |
102 |
+ include($${TOP_SRC_DIR}/common-pkgconfig.pri) |
103 |
+ INSTALLS += pkgconfig |
104 |
+ |
105 |
+-QMAKE_SUBSTITUTES += AccountsQtConfig.cmake.in \ |
106 |
+- AccountsQtConfigVersion.cmake.in |
107 |
+-cmake_modules.files = AccountsQtConfig.cmake \ |
108 |
+- AccountsQtConfigVersion.cmake |
109 |
+-cmake_modules.path = $${CMAKE_CONFIG_PATH} |
110 |
++QMAKE_SUBSTITUTES += \ |
111 |
++ $${CMAKE_BASENAME}Config.cmake.in \ |
112 |
++ $${CMAKE_BASENAME}ConfigVersion.cmake.in |
113 |
++cmake_modules.files = \ |
114 |
++ $${CMAKE_BASENAME}Config.cmake \ |
115 |
++ $${CMAKE_BASENAME}ConfigVersion.cmake |
116 |
++cmake_modules.path = $${CMAKE_CONFIG_PATH}/$${CMAKE_BASENAME} |
117 |
+ |
118 |
+-INSTALLS += cmake_modules |
119 |
+\ No newline at end of file |
120 |
++INSTALLS += cmake_modules |
121 |
+diff --git a/Accounts/AccountsQt5Config.cmake.in b/Accounts/AccountsQt5Config.cmake.in |
122 |
+new file mode 100644 |
123 |
+index 0000000..55a8964 |
124 |
+--- /dev/null |
125 |
++++ b/Accounts/AccountsQt5Config.cmake.in |
126 |
+@@ -0,0 +1,5 @@ |
127 |
++# ACCOUNTSQT_INCLUDE_DIRS - The libaccounts-qt include directories |
128 |
++# ACCOUNTSQT_LIBRARIES - The libraries needed to use libaccounts-qt |
129 |
++ |
130 |
++set(ACCOUNTSQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so) |
131 |
++set(ACCOUNTSQT_INCLUDE_DIRS $${INSTALL_PREFIX}/include/$${TARGET}/) |
132 |
+\ No newline at end of file |
133 |
+diff --git a/Accounts/AccountsQt5ConfigVersion.cmake.in b/Accounts/AccountsQt5ConfigVersion.cmake.in |
134 |
+new file mode 100644 |
135 |
+index 0000000..d086b47 |
136 |
+--- /dev/null |
137 |
++++ b/Accounts/AccountsQt5ConfigVersion.cmake.in |
138 |
+@@ -0,0 +1,10 @@ |
139 |
++set(PACKAGE_VERSION $${PROJECT_VERSION}) |
140 |
++ |
141 |
++if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) |
142 |
++ set(PACKAGE_VERSION_COMPATIBLE FALSE) |
143 |
++else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) |
144 |
++ set(PACKAGE_VERSION_COMPATIBLE TRUE) |
145 |
++ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") |
146 |
++ set(PACKAGE_VERSION_EXACT TRUE) |
147 |
++ endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") |
148 |
++endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) |
149 |
+\ No newline at end of file |
150 |
+diff --git a/Accounts/manager.cpp b/Accounts/manager.cpp |
151 |
+index fd1821a..2eb077f 100644 |
152 |
+--- a/Accounts/manager.cpp |
153 |
++++ b/Accounts/manager.cpp |
154 |
+@@ -187,6 +187,31 @@ Manager::Manager(const QString &serviceType, QObject *parent): |
155 |
+ } |
156 |
+ |
157 |
+ /*! |
158 |
++ * Constructor, allowing option flags to be specified. |
159 |
++ * Users should check for lastError() to check if manager construction |
160 |
++ * was fully succesful. |
161 |
++ */ |
162 |
++Manager::Manager(Options options, QObject *parent): |
163 |
++ QObject(parent), |
164 |
++ d(new Private) |
165 |
++{ |
166 |
++ bool disableNotifications = options.testFlag(DisableNotifications); |
167 |
++ |
168 |
++ GError *error = NULL; |
169 |
++ AgManager *manager = |
170 |
++ (AgManager *)g_initable_new(AG_TYPE_MANAGER, NULL, &error, |
171 |
++ "use-dbus", !disableNotifications, |
172 |
++ NULL); |
173 |
++ if (Q_LIKELY(manager)) { |
174 |
++ d->init(this, manager); |
175 |
++ } else { |
176 |
++ qWarning() << "Manager could not be created." << error->message; |
177 |
++ d->lastError = Error(error); |
178 |
++ g_error_free(error); |
179 |
++ } |
180 |
++} |
181 |
++ |
182 |
++/*! |
183 |
+ * Destructor. |
184 |
+ */ |
185 |
+ Manager::~Manager() |
186 |
+@@ -501,6 +526,23 @@ bool Manager::abortOnTimeout() const |
187 |
+ } |
188 |
+ |
189 |
+ /*! |
190 |
++ * @return Configuration options for this object. |
191 |
++ */ |
192 |
++Manager::Options Manager::options() const |
193 |
++{ |
194 |
++ bool useDBus = true; |
195 |
++ g_object_get(d->m_manager, |
196 |
++ "use-dbus", &useDBus, |
197 |
++ NULL); |
198 |
++ |
199 |
++ Options opts; |
200 |
++ if (!useDBus) { |
201 |
++ opts |= DisableNotifications; |
202 |
++ } |
203 |
++ return opts; |
204 |
++} |
205 |
++ |
206 |
++/*! |
207 |
+ * Gets the last error. Not all operations set/reset the error; see the |
208 |
+ * individual methods' documentation to see if they set the last error or |
209 |
+ * not. Call this method right after an account operation |
210 |
+diff --git a/Accounts/manager.h b/Accounts/manager.h |
211 |
+index d32c514..c88be2b 100644 |
212 |
+--- a/Accounts/manager.h |
213 |
++++ b/Accounts/manager.h |
214 |
+@@ -53,8 +53,18 @@ class ACCOUNTS_EXPORT Manager: public QObject |
215 |
+ Q_OBJECT |
216 |
+ |
217 |
+ public: |
218 |
++ /*! |
219 |
++ * @enum Option |
220 |
++ * @brief Specifies options for the object. |
221 |
++ */ |
222 |
++ enum Option { |
223 |
++ DisableNotifications = 0x1, /**< Disable all inter-process notifications */ |
224 |
++ }; |
225 |
++ Q_DECLARE_FLAGS(Options, Option) |
226 |
++ |
227 |
+ Manager(QObject *parent = 0); |
228 |
+ Manager(const QString &serviceType, QObject *parent = 0); |
229 |
++ Manager(Options options, QObject *parent = 0); |
230 |
+ ~Manager(); |
231 |
+ |
232 |
+ Account *account(const AccountId &id) const; |
233 |
+@@ -83,6 +93,8 @@ public: |
234 |
+ void setAbortOnTimeout(bool abort); |
235 |
+ bool abortOnTimeout() const; |
236 |
+ |
237 |
++ Options options() const; |
238 |
++ |
239 |
+ Error lastError() const; |
240 |
+ |
241 |
+ Q_SIGNALS: |
242 |
+@@ -105,4 +117,6 @@ private: |
243 |
+ |
244 |
+ } //namespace Accounts |
245 |
+ |
246 |
++Q_DECLARE_OPERATORS_FOR_FLAGS(Accounts::Manager::Options) |
247 |
++ |
248 |
+ #endif // ACCOUNTS_MANAGER_H |
249 |
+diff --git a/Accounts/provider.cpp b/Accounts/provider.cpp |
250 |
+index 7e2941d..93a24c5 100644 |
251 |
+--- a/Accounts/provider.cpp |
252 |
++++ b/Accounts/provider.cpp |
253 |
+@@ -3,7 +3,7 @@ |
254 |
+ * This file is part of libaccounts-qt |
255 |
+ * |
256 |
+ * Copyright (C) 2009-2011 Nokia Corporation. |
257 |
+- * Copyright (C) 2012 Canonical Ltd. |
258 |
++ * Copyright (C) 2012-2014 Canonical Ltd. |
259 |
+ * |
260 |
+ * Contact: Alberto Mardegan <alberto.mardegan@×××××××××.com> |
261 |
+ * |
262 |
+@@ -82,8 +82,10 @@ Provider &Provider::operator=(const Provider &other) |
263 |
+ |
264 |
+ Provider::~Provider() |
265 |
+ { |
266 |
+- ag_provider_unref(m_provider); |
267 |
+- m_provider = 0; |
268 |
++ if (m_provider != 0) { |
269 |
++ ag_provider_unref(m_provider); |
270 |
++ m_provider = 0; |
271 |
++ } |
272 |
+ } |
273 |
+ |
274 |
+ /*! |
275 |
+@@ -153,6 +155,15 @@ QString Provider::iconName() const |
276 |
+ } |
277 |
+ |
278 |
+ /*! |
279 |
++ * @return A regular expression pattern which matches all the internet domains |
280 |
++ * in which this type of account can be used. |
281 |
++ */ |
282 |
++QString Provider::domainsRegExp() const |
283 |
++{ |
284 |
++ return UTF8(ag_provider_get_domains_regex(m_provider)); |
285 |
++} |
286 |
++ |
287 |
++/*! |
288 |
+ * @return Whether the provider supports creating one account at most. |
289 |
+ */ |
290 |
+ bool Provider::isSingleAccount() const |
291 |
+diff --git a/Accounts/provider.h b/Accounts/provider.h |
292 |
+index 27d923d..7c04c3f 100644 |
293 |
+--- a/Accounts/provider.h |
294 |
++++ b/Accounts/provider.h |
295 |
+@@ -3,7 +3,7 @@ |
296 |
+ * This file is part of libaccounts-qt |
297 |
+ * |
298 |
+ * Copyright (C) 2009-2011 Nokia Corporation. |
299 |
+- * Copyright (C) 2012 Canonical Ltd. |
300 |
++ * Copyright (C) 2012-2014 Canonical Ltd. |
301 |
+ * |
302 |
+ * Contact: Alberto Mardegan <alberto.mardegan@×××××××××.com> |
303 |
+ * |
304 |
+@@ -61,6 +61,7 @@ public: |
305 |
+ QString pluginName() const; |
306 |
+ QString trCatalog() const; |
307 |
+ QString iconName() const; |
308 |
++ QString domainsRegExp() const; |
309 |
+ bool isSingleAccount() const; |
310 |
+ const QDomDocument domDocument() const; |
311 |
+ |
312 |
+diff --git a/common-project-config.pri b/common-project-config.pri |
313 |
+index c252e81..de6f0ae 100644 |
314 |
+--- a/common-project-config.pri |
315 |
++++ b/common-project-config.pri |
316 |
+@@ -62,7 +62,7 @@ isEmpty( LIBDIR ) { |
317 |
+ } |
318 |
+ |
319 |
+ isEmpty ( CMAKE_CONFIG_PATH ) { |
320 |
+- CMAKE_CONFIG_PATH = $${INSTALL_LIBDIR}/cmake/AccountsQt/ |
321 |
++ CMAKE_CONFIG_PATH = $${INSTALL_LIBDIR}/cmake |
322 |
+ message("====") |
323 |
+ message("==== NOTE: To override the cmake module installation path run: `qmake CMAKE_CONFIG_PATH=/custom/path'") |
324 |
+ message("==== (current installation path is `$${CMAKE_CONFIG_PATH}')") |
325 |
+diff --git a/common-vars.pri b/common-vars.pri |
326 |
+index 8b2d740..07ffb59 100644 |
327 |
+--- a/common-vars.pri |
328 |
++++ b/common-vars.pri |
329 |
+@@ -13,7 +13,7 @@ PROJECT_NAME = accounts-qt |
330 |
+ #----------------------------------------------------------------------------- |
331 |
+ # Project version |
332 |
+ #----------------------------------------------------------------------------- |
333 |
+-PROJECT_VERSION = 1.11 |
334 |
++PROJECT_VERSION = 1.13 |
335 |
+ |
336 |
+ #----------------------------------------------------------------------------- |
337 |
+ # Library version |
338 |
+diff --git a/tests/MyProvider.provider b/tests/MyProvider.provider |
339 |
+index 1f1dd5c..3ffbbb5 100644 |
340 |
+--- a/tests/MyProvider.provider |
341 |
++++ b/tests/MyProvider.provider |
342 |
+@@ -5,6 +5,7 @@ |
343 |
+ <description>fast & furious</description> |
344 |
+ <translations>accounts</translations> |
345 |
+ <plugin>generic-oauth</plugin> |
346 |
++ <domains>.*example.net</domains> |
347 |
+ <single-account>true</single-account> |
348 |
+ |
349 |
+ <template> |
350 |
+diff --git a/tests/accountstest.cpp b/tests/accountstest.cpp |
351 |
+index b51bcab..beaa006 100644 |
352 |
+--- a/tests/accountstest.cpp |
353 |
++++ b/tests/accountstest.cpp |
354 |
+@@ -72,6 +72,12 @@ void AccountsTest::managerTestCase() |
355 |
+ mgr->setTimeout(123); |
356 |
+ QCOMPARE(mgr->timeout(), quint32(123)); |
357 |
+ |
358 |
++ QCOMPARE(mgr->options().testFlag(Manager::DisableNotifications), false); |
359 |
++ |
360 |
++ delete mgr; |
361 |
++ |
362 |
++ mgr = new Manager(Manager::DisableNotifications); |
363 |
++ QCOMPARE(mgr->options().testFlag(Manager::DisableNotifications), true); |
364 |
+ delete mgr; |
365 |
+ } |
366 |
+ |
367 |
+@@ -210,6 +216,7 @@ void AccountsTest::providerTestCase() |
368 |
+ QCOMPARE(provider.description(), QString("fast & furious")); |
369 |
+ QCOMPARE(provider.trCatalog(), QString("accounts")); |
370 |
+ QCOMPARE(provider.pluginName(), QString("generic-oauth")); |
371 |
++ QCOMPARE(provider.domainsRegExp(), QString(".*example.net")); |
372 |
+ QCOMPARE(provider.isSingleAccount(), true); |
373 |
+ |
374 |
+ QDomDocument dom = provider.domDocument(); |
375 |
|
376 |
diff --git a/net-libs/accounts-qt/metadata.xml b/net-libs/accounts-qt/metadata.xml |
377 |
new file mode 100644 |
378 |
index 0000000..a23f444 |
379 |
--- /dev/null |
380 |
+++ b/net-libs/accounts-qt/metadata.xml |
381 |
@@ -0,0 +1,5 @@ |
382 |
+<?xml version="1.0" encoding="UTF-8"?> |
383 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
384 |
+<pkgmetadata> |
385 |
+ <herd>kde</herd> |
386 |
+</pkgmetadata> |