summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-01-14 20:20:33 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-01-14 20:48:48 +0100
commit1ddf70fde01795a6b4ee92321f553fd9dab7ba92 (patch)
tree3a1f1b5d364329c3c330a3cb0991aa4137d17e7b /kde-apps
parentapp-misc/geneweb: rename setup to gwsetup (diff)
downloadgentoo-1ddf70fde01795a6b4ee92321f553fd9dab7ba92.tar.gz
gentoo-1ddf70fde01795a6b4ee92321f553fd9dab7ba92.tar.bz2
gentoo-1ddf70fde01795a6b4ee92321f553fd9dab7ba92.zip
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 <asturm@gentoo.org>
Diffstat (limited to 'kde-apps')
-rw-r--r--kde-apps/libkgapi/files/libkgapi-20.12.1-remember-gmail-auth-token.patch30
-rw-r--r--kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild35
2 files changed, 65 insertions, 0 deletions
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 000000000000..4d777f1475f1
--- /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 <arojas@archlinux.org>
+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 000000000000..07016b6b5f89
--- /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