Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/knewstuff/files/, kde-frameworks/knewstuff/
Date: Sat, 26 Mar 2022 16:40:15
Message-Id: 1648312795.1a9d2a0cc6f7f17e72357fde5e736c93211718b3.asturm@gentoo
1 commit: 1a9d2a0cc6f7f17e72357fde5e736c93211718b3
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 26 16:29:11 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 26 16:39:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a9d2a0c
7
8 kde-frameworks/knewstuff: Fix "Get new icons..." on non-English lang
9
10 See also:
11 https://mail.kde.org/pipermail/distributions/2022-March/001211.html
12
13 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=451165
14 Package-Manager: Portage-3.0.30, Repoman-3.0.3
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16
17 .../files/knewstuff-5.92.0-KDEBUG-451165.patch | 53 ++++++++++++++++++++++
18 .../knewstuff/knewstuff-5.92.0-r1.ebuild | 51 +++++++++++++++++++++
19 2 files changed, 104 insertions(+)
20
21 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
22 new file mode 100644
23 index 000000000000..07f4170ae0ce
24 --- /dev/null
25 +++ b/kde-frameworks/knewstuff/files/knewstuff-5.92.0-KDEBUG-451165.patch
26 @@ -0,0 +1,53 @@
27 +From 693a2ea3926400b1482888a2df2c532852b8f971 Mon Sep 17 00:00:00 2001
28 +From: Alexander Lohnau <alexander.lohnau@×××.de>
29 +Date: Sun, 20 Mar 2022 20:29:51 +0100
30 +Subject: [PATCH] Do not set user-visible name as additional agent information
31 +
32 +Instead we want the filename, which is more useful as an identifier anyways, because
33 +we would otherwise have to check which user-visible names originate from which knsrc file.
34 +
35 +BUG: 451165
36 +---
37 + src/core/engine.cpp | 5 ++++-
38 + 1 file changed, 4 insertions(+), 1 deletion(-)
39 +
40 +diff --git a/src/core/engine.cpp b/src/core/engine.cpp
41 +index e7abfde8..72af9c83 100644
42 +--- a/src/core/engine.cpp
43 ++++ b/src/core/engine.cpp
44 +@@ -145,6 +145,7 @@ public:
45 + QString busyMessage;
46 + QString useLabel;
47 + bool uploadEnabled = false;
48 ++ QString configFileName;
49 + };
50 +
51 + Engine::Engine(QObject *parent)
52 +@@ -224,6 +225,7 @@ bool Engine::init(const QString &configfile)
53 + conf.reset(new KConfig(configfile));
54 + qCWarning(KNEWSTUFFCORE) << "Using a deprecated location for the knsrc file" << configfile
55 + << " - please contact the author of the software which provides this file to get it updated to use the new location";
56 ++ configFileName = QFileInfo(configfile).baseName();
57 + } else if (isRelativeConfig && actualConfig.isEmpty()) {
58 + configFileName = QFileInfo(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("knsrcfiles/%1").arg(configfile))).baseName();
59 + conf.reset(new KConfig(QStringLiteral("knsrcfiles/%1").arg(configfile), KConfig::FullConfig, QStandardPaths::GenericDataLocation));
60 +@@ -234,6 +236,7 @@ bool Engine::init(const QString &configfile)
61 + configFileName = configFileInfo.baseName();
62 + conf.reset(new KConfig(configfile));
63 + }
64 ++ d->configFileName = configFileName;
65 +
66 + if (conf->accessMode() == KConfig::NoAccess) {
67 + Q_EMIT signalErrorCode(KNSCore::ConfigFileError, i18n("Configuration file exists, but cannot be opened: \"%1\"", configfile), configfile);
68 +@@ -425,7 +428,7 @@ void Engine::slotProviderFileLoaded(const QDomDocument &doc)
69 +
70 + QSharedPointer<KNSCore::Provider> provider;
71 + if (isAtticaProviderFile || n.attribute(QStringLiteral("type")).toLower() == QLatin1String("rest")) {
72 +- provider.reset(new AtticaProvider(m_categories, d->name));
73 ++ provider.reset(new AtticaProvider(m_categories, d->configFileName));
74 + connect(provider.data(), &Provider::categoriesMetadataLoded, this, [this](const QList<Provider::CategoryMetadata> &categories) {
75 + d->categoriesMetadata = categories;
76 + Q_EMIT signalCategoriesMetadataLoded(categories);
77 +--
78 +GitLab
79 +
80
81 diff --git a/kde-frameworks/knewstuff/knewstuff-5.92.0-r1.ebuild b/kde-frameworks/knewstuff/knewstuff-5.92.0-r1.ebuild
82 new file mode 100644
83 index 000000000000..362d3beb80ef
84 --- /dev/null
85 +++ b/kde-frameworks/knewstuff/knewstuff-5.92.0-r1.ebuild
86 @@ -0,0 +1,51 @@
87 +# Copyright 1999-2022 Gentoo Authors
88 +# Distributed under the terms of the GNU General Public License v2
89 +
90 +EAPI=8
91 +
92 +ECM_TEST="false"
93 +PVCUT=$(ver_cut 1-2)
94 +QTMIN=5.15.2
95 +inherit ecm kde.org
96 +
97 +DESCRIPTION="Framework for downloading and sharing additional application data"
98 +
99 +LICENSE="LGPL-2+"
100 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
101 +IUSE="opds"
102 +
103 +DEPEND="
104 + >=dev-qt/qtdeclarative-${QTMIN}:5
105 + >=dev-qt/qtgui-${QTMIN}:5
106 + >=dev-qt/qtnetwork-${QTMIN}:5
107 + >=dev-qt/qtwidgets-${QTMIN}:5
108 + >=dev-qt/qtxml-${QTMIN}:5
109 + =kde-frameworks/attica-${PVCUT}*:5
110 + =kde-frameworks/karchive-${PVCUT}*:5
111 + =kde-frameworks/kcompletion-${PVCUT}*:5
112 + =kde-frameworks/kconfig-${PVCUT}*:5
113 + =kde-frameworks/kcoreaddons-${PVCUT}*:5
114 + =kde-frameworks/ki18n-${PVCUT}*:5
115 + =kde-frameworks/kiconthemes-${PVCUT}*:5
116 + =kde-frameworks/kio-${PVCUT}*:5
117 + =kde-frameworks/kitemviews-${PVCUT}*:5
118 + =kde-frameworks/kpackage-${PVCUT}*:5
119 + =kde-frameworks/kservice-${PVCUT}*:5
120 + =kde-frameworks/ktextwidgets-${PVCUT}*:5
121 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
122 + =kde-frameworks/kxmlgui-${PVCUT}*:5
123 + opds? ( =kde-frameworks/syndication-${PVCUT}*:5 )
124 +"
125 +RDEPEND="${DEPEND}
126 + >=kde-frameworks/kirigami-${PVCUT}:5
127 +"
128 +
129 +PATCHES=( "${FILESDIR}/${P}-KDEBUG-451165.patch" )
130 +
131 +src_configure() {
132 + local mycmakeargs=(
133 + $(cmake_use_find_package opds KF5Syndication)
134 + )
135 +
136 + ecm_src_configure
137 +}