[gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/

2023-01-28 Thread Andreas Sturmlechner
commit: 93ce4f04790e887e14d4176fe1f931e07f9c31aa
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Jan 28 21:45:47 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Jan 28 22:32:26 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93ce4f04

kde-apps/libkgapi: Fix AccountManager promises cache handling

Upstream commits:
b5a581d98d9b57363c44bd98eeab7243fbf13a22
d677a08c21fd99e7e8be0a0899f797f9237207e4

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=406839
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=409122
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=421664
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=456923

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...ager-dont-keep-finished-promises-in-cache.patch | 27 
 ...e-promises-for-AccountManager-findAccount.patch | 75 ++
 kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild   | 49 ++
 3 files changed, 151 insertions(+)

diff --git 
a/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch
 
b/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch
new file mode 100644
index ..485bc7d840f8
--- /dev/null
+++ 
b/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch
@@ -0,0 +1,27 @@
+From b5a581d98d9b57363c44bd98eeab7243fbf13a22 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt 
+Date: Mon, 21 Nov 2022 13:00:41 +0100
+Subject: [PATCH] AccountManager: Don't keep finished promises in the cache
+
+AccountPromises are destroyed one event loop cycle after they finished().
+They won't emit finished() again, so they can't be used.
+---
+ src/core/accountmanager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/accountmanager.cpp b/src/core/accountmanager.cpp
+index 42719c5e..da5c37b6 100644
+--- a/src/core/accountmanager.cpp
 b/src/core/accountmanager.cpp
+@@ -134,7 +134,7 @@ public:
+ auto promise = mPendingPromises.value(key, nullptr);
+ if (!promise) {
+ promise = new AccountPromise(q);
+-QObject::connect(promise, ::destroyed, q, [key, this]() {
++QObject::connect(promise, ::finished, q, [key, 
this]() {
+ mPendingPromises.remove(key);
+ });
+ mPendingPromises.insert(key, promise);
+-- 
+GitLab
+

diff --git 
a/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch
 
b/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch
new file mode 100644
index ..b24b80377686
--- /dev/null
+++ 
b/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch
@@ -0,0 +1,75 @@
+From d677a08c21fd99e7e8be0a0899f797f9237207e4 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt 
+Date: Mon, 21 Nov 2022 13:02:27 +0100
+Subject: [PATCH] Don't cache promises for AccountManager::findAccount
+
+Unlike AccountManager::getAccount and AccountManager::refreshTokens, this
+method does not return an authenticated account. However, the promises are
+cached for all of them in the same store, so it was possible for a call to
+e.g. refreshTokens to get a promise created by findAccount instead, resulting
+in an unexpected result. Just don't cache promises created by findAccount.
+
+BUG: 406839
+BUG: 409122
+BUG: 421664
+BUG: 456923
+---
+ src/core/accountmanager.cpp | 38 ++---
+ 1 file changed, 18 insertions(+), 20 deletions(-)
+
+diff --git a/src/core/accountmanager.cpp b/src/core/accountmanager.cpp
+index da5c37b6..c6b8189d 100644
+--- a/src/core/accountmanager.cpp
 b/src/core/accountmanager.cpp
+@@ -265,30 +265,28 @@ AccountPromise *AccountManager::refreshTokens(const 
QString , const QStri
+ 
+ AccountPromise *AccountManager::findAccount(const QString , const 
QString , const QList )
+ {
+-auto promise = d->createPromise(apiKey, accountName);
+-if (!promise->d->isRunning()) {
+-QTimer::singleShot(0, this, [=]() {
+-d->ensureStore([=](bool storeOpened) {
+-if (!storeOpened) {
+-promise->d->setError(tr("Failed to open account store"));
+-return;
+-}
++auto promise = new AccountPromise(this);
++QTimer::singleShot(0, this, [=]() {
++d->ensureStore([=](bool storeOpened) {
++if (!storeOpened) {
++promise->d->setError(tr("Failed to open account store"));
++return;
++}
+ 
+-const auto account = d->mStore->getAccount(apiKey, 
accountName);
+-if (!account) {
+-promise->d->setAccount({});
++const auto account = d->mStore->getAccount(apiKey, accountName);
++if (!account) {
++promise->d->setAccount({});
++} 

[gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/

2022-07-15 Thread Sam James
commit: 4443c8095edbfbb98ec5cf1c3e6b5c109ae8bed4
Author: Alfred Persson Forsberg  catcream  org>
AuthorDate: Tue Jun 28 16:11:03 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jul 15 07:12:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4443c809

kde-apps/libkgapi: fix build for musl

The issue here is that NI_MAXHOST is used inside
saslplugin/plugin_common.c. That is a GNU extension only defined when
_GNU_SOURCE is defined. Declarning that this is POSIX source
code (_POSIX_SOURCE) is therefore misleading and breaks the build for
musl.

See:
https://invent.kde.org/pim/libkgapi/-/merge_requests/29/diffs?commit_id=1e6a54a9f2d818aa4046e5291702e236a53ba987,
https://invent.kde.org/pim/libkgapi/-/merge_requests/29/

Signed-off-by: Alfred Persson Forsberg  catcream.org>
Closes: https://github.com/gentoo/gentoo/pull/26116
Signed-off-by: Sam James  gentoo.org>

 .../files/libkgapi-22.04.2-gnu_source.patch| 23 ++
 kde-apps/libkgapi/libkgapi-22.04.3.ebuild  |  2 ++
 2 files changed, 25 insertions(+)

diff --git a/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch 
b/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch
new file mode 100644
index ..88e3e2a3ed34
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch
@@ -0,0 +1,23 @@
+https://invent.kde.org/pim/libkgapi/-/merge_requests/29
+https://invent.kde.org/pim/libkgapi/-/merge_requests/29/diffs?commit_id=1e6a54a9f2d818aa4046e5291702e236a53ba987
+
+---
+ src/saslplugin/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/saslplugin/CMakeLists.txt b/src/saslplugin/CMakeLists.txt
+index 61edd04..e8823fb 100644
+--- a/src/saslplugin/CMakeLists.txt
 b/src/saslplugin/CMakeLists.txt
+@@ -2,7 +2,7 @@ include(CheckIncludeFile)
+ include(CheckStructHasMember)
+ 
+ if (NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+-   add_definitions(-D_POSIX_SOURCE)
++  add_definitions(-D_GNU_SOURCE)
+ endif()
+ 
+ if (WIN32)
+-- 
+2.35.1
+

diff --git a/kde-apps/libkgapi/libkgapi-22.04.3.ebuild 
b/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
index 6b4d892a0c6a..2e26e8525db4 100644
--- a/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
+++ b/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
@@ -32,6 +32,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}"/${PN}-22.04.2-gnu_source.patch )
+
 src_test() {
local myctestargs=(
# Both fail for multiple distros, see bug #832709 for more 
discussion



[gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/

2021-02-24 Thread Andreas Sturmlechner
commit: d18944a40e30a4cbc81eabad819c5b91126629ce
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Wed Feb 24 21:18:24 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Wed Feb 24 22:39:43 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d18944a4

kde-apps/libkgapi: drop 20.08.3*

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 kde-apps/libkgapi/Manifest |  1 -
 ...20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch | 31 -
 kde-apps/libkgapi/libkgapi-20.08.3-r1.ebuild   | 40 --
 3 files changed, 72 deletions(-)

diff --git a/kde-apps/libkgapi/Manifest b/kde-apps/libkgapi/Manifest
index 4d783edbb5d..ecf59a49792 100644
--- a/kde-apps/libkgapi/Manifest
+++ b/kde-apps/libkgapi/Manifest
@@ -1,2 +1 @@
-DIST libkgapi-20.08.3.tar.xz 242676 BLAKE2B 
86b04cea376eb46081632fb571bdb3a67f4f44f3dd6c8a3af0144598634417ee39defb445324f33969420718daa999f43c5ea5d9c01634a0ec944bf457219fd7
 SHA512 
de7062632660777074f4d0d8b754b072c7f2b0550260e994d1db3e99d8f258f2507ad605d91cb6c465794ced92b740a742ab99947737edea73fd928c087d4388
 DIST libkgapi-20.12.2.tar.xz 246020 BLAKE2B 
c934898d8832c0264919a313d25d6a74a7a377dbd5575926ea6bc6ebbe8870e37691b307b058b67a5ff09d9bbf2db759b4d98d93d347a239315500e7f95d5bdc
 SHA512 
0350eaff72b192219553047781e1ae79bc794b9519095f812a1c8efe3e9d33c3dbb5d9db07bd28a39132adc4543627e2c46a866aec9f8710ef2d35cfb0a1f697

diff --git 
a/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
 
b/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
deleted file mode 100644
index 42cd78136ad..000
--- 
a/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 570c0fd731af9ca4cead249d1db6133acc21f7c1 Mon Sep 17 00:00:00 2001
-From: David Barchiesi 
-Date: Mon, 24 Aug 2020 12:04:17 +0200
-Subject: [PATCH] Remove duplicate "gContact$groupMembershipInfo" value in mock
- fetch response.
-
-BUG: 419629

- autotests/contacts/data/contact1_fetch_response.txt | 6 --
- 1 file changed, 6 deletions(-)
-
-diff --git a/autotests/contacts/data/contact1_fetch_response.txt 
b/autotests/contacts/data/contact1_fetch_response.txt
-index 7b22c91..89fc0e1 100644
 a/autotests/contacts/data/contact1_fetch_response.txt
-+++ b/autotests/contacts/data/contact1_fetch_response.txt
-@@ -44,12 +44,6 @@ Content-type: application/json; charset=UTF-8
-   "$t": "2018-03-25T16:37:29.565Z"
- }, 
- "xmlns$gd": "http://schemas.google.com/g/2005;, 
--"gContact$groupMembershipInfo": [
--  {
--"deleted": "false", 
--"href": "http://www.google.com/m8/feeds/groups/MockAccount/base/6;
--  }
--], 
- "gd$structuredPostalAddress": [
-   {
- "gd$country": {
--- 
-GitLab
-

diff --git a/kde-apps/libkgapi/libkgapi-20.08.3-r1.ebuild 
b/kde-apps/libkgapi/libkgapi-20.08.3-r1.ebuild
deleted file mode 100644
index 99b60fac04b..000
--- a/kde-apps/libkgapi/libkgapi-20.08.3-r1.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ECM_TEST="true"
-KFMIN=5.74.0
-QTMIN=5.15.1
-VIRTUALX_REQUIRED="test"
-inherit ecm kde.org
-
-DESCRIPTION="Library for accessing Google calendar and contact resources"
-HOMEPAGE="https://api.kde.org/kdepim/libkgapi/html/index.html;
-
-LICENSE="LGPL-2.1+"
-SLOT="5"
-KEYWORDS="amd64 arm64 ~ppc64 x86"
-IUSE="nls"
-
-BDEPEND="
-   nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
-"
-DEPEND="
-   dev-libs/cyrus-sasl:2
-   >=dev-qt/qtgui-${QTMIN}:5
-   >=dev-qt/qtnetwork-${QTMIN}:5
-   >=dev-qt/qtwebengine-${QTMIN}:5[widgets]
-   >=dev-qt/qtwidgets-${QTMIN}:5
-   >=dev-qt/qtxml-${QTMIN}:5
-   >=kde-frameworks/kcalendarcore-${KFMIN}:5
-   >=kde-frameworks/kcontacts-${KFMIN}:5
-   >=kde-frameworks/kio-${KFMIN}:5
-   >=kde-frameworks/kwallet-${KFMIN}:5
-   >=kde-frameworks/kwindowsystem-${KFMIN}:5
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-   "${FILESDIR}/${P}-fix-contactfetchjobtest-w-qt-5.15.patch" # bug 754159
-)



[gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/

2021-01-14 Thread Andreas Sturmlechner
commit: 1ddf70fde01795a6b4ee92321f553fd9dab7ba92
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Jan 14 19:20:33 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Jan 14 19:48:48 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ddf70fd

kde-apps/libkgapi: Remember GMail auth token

See also: https://bugs.kde.org/show_bug.cgi?id=429406

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...ibkgapi-20.12.1-remember-gmail-auth-token.patch | 30 +++
 kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild   | 35 ++
 2 files changed, 65 insertions(+)

diff --git 
a/kde-apps/libkgapi/files/libkgapi-20.12.1-remember-gmail-auth-token.patch 
b/kde-apps/libkgapi/files/libkgapi-20.12.1-remember-gmail-auth-token.patch
new file mode 100644
index 000..4d777f1475f
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-20.12.1-remember-gmail-auth-token.patch
@@ -0,0 +1,30 @@
+From d81d247026ac993ac5717ca471c7fcf1778951f2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas 
+Date: Wed, 6 Jan 2021 15:54:52 +0100
+Subject: [PATCH] Don't reset account scopes if not necessary
+
+This triggers unnecesary authentication prompts
+
+BUG: 429406
+---
+ src/core/accountmanager.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/accountmanager.cpp b/src/core/accountmanager.cpp
+index b9af6c1..f68563e 100644
+--- a/src/core/accountmanager.cpp
 b/src/core/accountmanager.cpp
+@@ -81,7 +81,9 @@ public:
+ currentScopes.push_back(requestedScope);
+ }
+ }
+-account->setScopes(currentScopes);
++if (currentScopes != account->scopes()) {
++account->setScopes(currentScopes);
++}
+ }
+ auto *job = new AuthJob(account, apiKey, apiSecret);
+ job->setUsername(account->accountName());
+-- 
+GitLab
+

diff --git a/kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild 
b/kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild
new file mode 100644
index 000..07016b6b5f8
--- /dev/null
+++ b/kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_TEST="true"
+KFMIN=5.75.0
+QTMIN=5.15.1
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Library for accessing Google calendar and contact resources"
+HOMEPAGE="https://api.kde.org/kdepim/libkgapi/html/index.html;
+
+LICENSE="LGPL-2.1+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="nls"
+
+BDEPEND="
+   nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
+"
+DEPEND="
+   dev-libs/cyrus-sasl:2
+   >=dev-qt/qtgui-${QTMIN}:5
+   >=dev-qt/qtnetwork-${QTMIN}:5
+   >=dev-qt/qtwidgets-${QTMIN}:5
+   >=dev-qt/qtxml-${QTMIN}:5
+   >=kde-frameworks/kcalendarcore-${KFMIN}:5
+   >=kde-frameworks/kcontacts-${KFMIN}:5
+   >=kde-frameworks/kwallet-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-remember-gmail-auth-token.patch" ) # KDE-Bug 429406



[gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/

2020-11-25 Thread Andreas Sturmlechner
commit: 421c9da28628083d6c510eed8c963ed025a1cfbe
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Wed Nov 25 12:22:52 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Wed Nov 25 13:17:42 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=421c9da2

kde-apps/libkgapi: Fix contactfetchjobtest

Upstream commit 570c0fd731af9ca4cead249d1db6133acc21f7c1
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=419629
Reported-by: Paolo Pedroni  iol.it>
Closes: https://bugs.gentoo.org/754159
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch | 31 ++
 kde-apps/libkgapi/libkgapi-20.08.3.ebuild  |  4 +++
 2 files changed, 35 insertions(+)

diff --git 
a/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
 
b/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
new file mode 100644
index 000..42cd78136ad
--- /dev/null
+++ 
b/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
@@ -0,0 +1,31 @@
+From 570c0fd731af9ca4cead249d1db6133acc21f7c1 Mon Sep 17 00:00:00 2001
+From: David Barchiesi 
+Date: Mon, 24 Aug 2020 12:04:17 +0200
+Subject: [PATCH] Remove duplicate "gContact$groupMembershipInfo" value in mock
+ fetch response.
+
+BUG: 419629
+---
+ autotests/contacts/data/contact1_fetch_response.txt | 6 --
+ 1 file changed, 6 deletions(-)
+
+diff --git a/autotests/contacts/data/contact1_fetch_response.txt 
b/autotests/contacts/data/contact1_fetch_response.txt
+index 7b22c91..89fc0e1 100644
+--- a/autotests/contacts/data/contact1_fetch_response.txt
 b/autotests/contacts/data/contact1_fetch_response.txt
+@@ -44,12 +44,6 @@ Content-type: application/json; charset=UTF-8
+   "$t": "2018-03-25T16:37:29.565Z"
+ }, 
+ "xmlns$gd": "http://schemas.google.com/g/2005;, 
+-"gContact$groupMembershipInfo": [
+-  {
+-"deleted": "false", 
+-"href": "http://www.google.com/m8/feeds/groups/MockAccount/base/6;
+-  }
+-], 
+ "gd$structuredPostalAddress": [
+   {
+ "gd$country": {
+-- 
+GitLab
+

diff --git a/kde-apps/libkgapi/libkgapi-20.08.3.ebuild 
b/kde-apps/libkgapi/libkgapi-20.08.3.ebuild
index 20276f79832..9ba86c9d21f 100644
--- a/kde-apps/libkgapi/libkgapi-20.08.3.ebuild
+++ b/kde-apps/libkgapi/libkgapi-20.08.3.ebuild
@@ -35,3 +35,7 @@ DEPEND="
 RDEPEND="${DEPEND}
!