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/frameworkintegration/, kde-frameworks/frameworkintegration/files/
Date: Wed, 12 Jan 2022 17:34:02
Message-Id: 1642008829.738abf1a7c0efdf7aa9499c7f29f1c9b0023a625.asturm@gentoo
1 commit: 738abf1a7c0efdf7aa9499c7f29f1c9b0023a625
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 12 17:28:44 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 12 17:33:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=738abf1a
7
8 kde-frameworks/frameworkintegration: Fix installing KNS items w/ deps
9
10 Upstream commit 675802e706a737c008aa74600ac804b06db52140
11
12 See also:
13 https://mail.kde.org/pipermail/distributions/2022-January/001117.html
14
15 Package-Manager: Portage-3.0.30, Repoman-3.0.3
16 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
17
18 ...ation-5.90.0-fix-install-KNS-items-w-deps.patch | 46 ++++++++++++++++++++++
19 .../frameworkintegration-5.90.0-r1.ebuild | 45 +++++++++++++++++++++
20 2 files changed, 91 insertions(+)
21
22 diff --git a/kde-frameworks/frameworkintegration/files/frameworkintegration-5.90.0-fix-install-KNS-items-w-deps.patch b/kde-frameworks/frameworkintegration/files/frameworkintegration-5.90.0-fix-install-KNS-items-w-deps.patch
23 new file mode 100644
24 index 000000000000..fabbee1e1d65
25 --- /dev/null
26 +++ b/kde-frameworks/frameworkintegration/files/frameworkintegration-5.90.0-fix-install-KNS-items-w-deps.patch
27 @@ -0,0 +1,46 @@
28 +From 675802e706a737c008aa74600ac804b06db52140 Mon Sep 17 00:00:00 2001
29 +From: Alexander Lohnau <alexander.lohnau@×××.de>
30 +Date: Tue, 11 Jan 2022 06:42:03 +0100
31 +Subject: [PATCH] Fix wrong porting of KNSCore::Engine::configSearchLocations
32 +
33 +The `KNSCore::Engine::availableConfigFiles` method returns the file names, but
34 +the code still assumed that the directories where the file is contained is returned.
35 +Consequently the knsrc files would never be found.
36 +
37 +BUG: 448237
38 +---
39 + src/kpackage-install-handlers/kns/main.cpp | 15 +++++++--------
40 + 1 file changed, 7 insertions(+), 8 deletions(-)
41 +
42 +diff --git a/src/kpackage-install-handlers/kns/main.cpp b/src/kpackage-install-handlers/kns/main.cpp
43 +index 9978844..a2b530e 100644
44 +--- a/src/kpackage-install-handlers/kns/main.cpp
45 ++++ b/src/kpackage-install-handlers/kns/main.cpp
46 +@@ -70,17 +70,16 @@ int main(int argc, char **argv)
47 + Q_ASSERT(url.scheme() == QLatin1String("kns"));
48 +
49 + QString knsname;
50 +- for (const auto &location : KNSCore::Engine::availableConfigFiles()) {
51 +- QString candidate = location + QLatin1Char('/') + url.host();
52 +- if (QFile::exists(candidate)) {
53 +- knsname = candidate;
54 +- break;
55 +- }
56 +- }
57 ++ const QStringList availableConfigFiles = KNSCore::Engine::availableConfigFiles();
58 ++ auto knsNameIt = std::find_if(availableConfigFiles.begin(), availableConfigFiles.end(), [&url](const QString &availableFile) {
59 ++ return availableFile.endsWith(QLatin1String("/") + url.host());
60 ++ });
61 +
62 +- if (knsname.isEmpty()) {
63 ++ if (knsNameIt == availableConfigFiles.end()) {
64 + qWarning() << "couldn't find knsrc file for" << url.host();
65 + return 1;
66 ++ } else {
67 ++ knsname = *knsNameIt;
68 + }
69 +
70 + const auto pathParts = url.path().split(QLatin1Char('/'), Qt::SkipEmptyParts);
71 +--
72 +GitLab
73 +
74
75 diff --git a/kde-frameworks/frameworkintegration/frameworkintegration-5.90.0-r1.ebuild b/kde-frameworks/frameworkintegration/frameworkintegration-5.90.0-r1.ebuild
76 new file mode 100644
77 index 000000000000..1a00bc011db1
78 --- /dev/null
79 +++ b/kde-frameworks/frameworkintegration/frameworkintegration-5.90.0-r1.ebuild
80 @@ -0,0 +1,45 @@
81 +# Copyright 1999-2022 Gentoo Authors
82 +# Distributed under the terms of the GNU General Public License v2
83 +
84 +EAPI=8
85 +
86 +ECM_QTHELP="false"
87 +PVCUT=$(ver_cut 1-2)
88 +QTMIN=5.15.2
89 +VIRTUALX_REQUIRED="test"
90 +inherit ecm kde.org
91 +
92 +DESCRIPTION="Framework for integrating Qt applications with KDE Plasma workspaces"
93 +
94 +LICENSE="LGPL-2+"
95 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
96 +IUSE=""
97 +
98 +# requires running Plasma environment
99 +RESTRICT="test"
100 +
101 +RDEPEND="
102 + >=dev-qt/qtgui-${QTMIN}:5
103 + >=dev-qt/qtwidgets-${QTMIN}:5
104 + =kde-frameworks/kconfig-${PVCUT}*:5
105 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5
106 + =kde-frameworks/ki18n-${PVCUT}*:5
107 + =kde-frameworks/kiconthemes-${PVCUT}*:5
108 + =kde-frameworks/knewstuff-${PVCUT}*:5
109 + =kde-frameworks/knotifications-${PVCUT}*:5
110 +"
111 +DEPEND="${RDEPEND}
112 + =kde-frameworks/kpackage-${PVCUT}*:5
113 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
114 +"
115 +
116 +PATCHES=( "${FILESDIR}"/${P}-fix-install-KNS-items-w-deps.patch ) # KDE-bug 448237
117 +
118 +src_configure() {
119 + local mycmakeargs=(
120 + -DCMAKE_DISABLE_FIND_PACKAGE_AppStreamQt=ON
121 + -DCMAKE_DISABLE_FIND_PACKAGE_packagekitqt5=ON
122 + )
123 +
124 + ecm_src_configure
125 +}