commit:     1a9d2a0cc6f7f17e72357fde5e736c93211718b3
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 26 16:29:11 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 26 16:39:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a9d2a0c

kde-frameworks/knewstuff: Fix "Get new icons..." on non-English lang

See also:
https://mail.kde.org/pipermail/distributions/2022-March/001211.html

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=451165
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/knewstuff-5.92.0-KDEBUG-451165.patch     | 53 ++++++++++++++++++++++
 .../knewstuff/knewstuff-5.92.0-r1.ebuild           | 51 +++++++++++++++++++++
 2 files changed, 104 insertions(+)

diff --git 
a/kde-frameworks/knewstuff/files/knewstuff-5.92.0-KDEBUG-451165.patch 
b/kde-frameworks/knewstuff/files/knewstuff-5.92.0-KDEBUG-451165.patch
new file mode 100644
index 000000000000..07f4170ae0ce
--- /dev/null
+++ b/kde-frameworks/knewstuff/files/knewstuff-5.92.0-KDEBUG-451165.patch
@@ -0,0 +1,53 @@
+From 693a2ea3926400b1482888a2df2c532852b8f971 Mon Sep 17 00:00:00 2001
+From: Alexander Lohnau <[email protected]>
+Date: Sun, 20 Mar 2022 20:29:51 +0100
+Subject: [PATCH] Do not set user-visible name as additional agent information
+
+Instead we want the filename, which is more useful as an identifier anyways, 
because
+we would otherwise have to check which user-visible names originate from which 
knsrc file.
+
+BUG: 451165
+---
+ src/core/engine.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/engine.cpp b/src/core/engine.cpp
+index e7abfde8..72af9c83 100644
+--- a/src/core/engine.cpp
++++ b/src/core/engine.cpp
+@@ -145,6 +145,7 @@ public:
+     QString busyMessage;
+     QString useLabel;
+     bool uploadEnabled = false;
++    QString configFileName;
+ };
+ 
+ Engine::Engine(QObject *parent)
+@@ -224,6 +225,7 @@ bool Engine::init(const QString &configfile)
+         conf.reset(new KConfig(configfile));
+         qCWarning(KNEWSTUFFCORE) << "Using a deprecated location for the 
knsrc file" << configfile
+                                  << " - please contact the author of the 
software which provides this file to get it updated to use the new location";
++        configFileName = QFileInfo(configfile).baseName();
+     } else if (isRelativeConfig && actualConfig.isEmpty()) {
+         configFileName = 
QFileInfo(QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
QStringLiteral("knsrcfiles/%1").arg(configfile))).baseName();
+         conf.reset(new 
KConfig(QStringLiteral("knsrcfiles/%1").arg(configfile), KConfig::FullConfig, 
QStandardPaths::GenericDataLocation));
+@@ -234,6 +236,7 @@ bool Engine::init(const QString &configfile)
+         configFileName = configFileInfo.baseName();
+         conf.reset(new KConfig(configfile));
+     }
++    d->configFileName = configFileName;
+ 
+     if (conf->accessMode() == KConfig::NoAccess) {
+         Q_EMIT signalErrorCode(KNSCore::ConfigFileError, i18n("Configuration 
file exists, but cannot be opened: \"%1\"", configfile), configfile);
+@@ -425,7 +428,7 @@ void Engine::slotProviderFileLoaded(const QDomDocument 
&doc)
+ 
+         QSharedPointer<KNSCore::Provider> provider;
+         if (isAtticaProviderFile || 
n.attribute(QStringLiteral("type")).toLower() == QLatin1String("rest")) {
+-            provider.reset(new AtticaProvider(m_categories, d->name));
++            provider.reset(new AtticaProvider(m_categories, 
d->configFileName));
+             connect(provider.data(), &Provider::categoriesMetadataLoded, 
this, [this](const QList<Provider::CategoryMetadata> &categories) {
+                 d->categoriesMetadata = categories;
+                 Q_EMIT signalCategoriesMetadataLoded(categories);
+-- 
+GitLab
+

diff --git a/kde-frameworks/knewstuff/knewstuff-5.92.0-r1.ebuild 
b/kde-frameworks/knewstuff/knewstuff-5.92.0-r1.ebuild
new file mode 100644
index 000000000000..362d3beb80ef
--- /dev/null
+++ b/kde-frameworks/knewstuff/knewstuff-5.92.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="false"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Framework for downloading and sharing additional application data"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="opds"
+
+DEPEND="
+       >=dev-qt/qtdeclarative-${QTMIN}:5
+       >=dev-qt/qtgui-${QTMIN}:5
+       >=dev-qt/qtnetwork-${QTMIN}:5
+       >=dev-qt/qtwidgets-${QTMIN}:5
+       >=dev-qt/qtxml-${QTMIN}:5
+       =kde-frameworks/attica-${PVCUT}*:5
+       =kde-frameworks/karchive-${PVCUT}*:5
+       =kde-frameworks/kcompletion-${PVCUT}*:5
+       =kde-frameworks/kconfig-${PVCUT}*:5
+       =kde-frameworks/kcoreaddons-${PVCUT}*:5
+       =kde-frameworks/ki18n-${PVCUT}*:5
+       =kde-frameworks/kiconthemes-${PVCUT}*:5
+       =kde-frameworks/kio-${PVCUT}*:5
+       =kde-frameworks/kitemviews-${PVCUT}*:5
+       =kde-frameworks/kpackage-${PVCUT}*:5
+       =kde-frameworks/kservice-${PVCUT}*:5
+       =kde-frameworks/ktextwidgets-${PVCUT}*:5
+       =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+       =kde-frameworks/kxmlgui-${PVCUT}*:5
+       opds? ( =kde-frameworks/syndication-${PVCUT}*:5 )
+"
+RDEPEND="${DEPEND}
+       >=kde-frameworks/kirigami-${PVCUT}:5
+"
+
+PATCHES=( "${FILESDIR}/${P}-KDEBUG-451165.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake_use_find_package opds KF5Syndication)
+       )
+
+       ecm_src_configure
+}

Reply via email to