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-plasma/libksysguard/files/, kde-plasma/libksysguard/
Date: Wed, 25 May 2022 21:13:19
Message-Id: 1653513009.dbcebe7e36a1dbcf4215599ac69e93322383a641.asturm@gentoo
1 commit: dbcebe7e36a1dbcf4215599ac69e93322383a641
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 25 19:28:10 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed May 25 21:10:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbcebe7e
7
8 kde-plasma/libksysguard: Backport several 5.24.6 fixes
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 ...bksysguard-5.24.5-fix-missing-gpu-sensors.patch | 32 +++++++++
14 ...ard-5.24.5-fix-missing-selfmade-presets-1.patch | 35 ++++++++++
15 ...ard-5.24.5-fix-missing-selfmade-presets-2.patch | 43 ++++++++++++
16 .../libksysguard/libksysguard-5.24.5-r1.ebuild | 80 ++++++++++++++++++++++
17 4 files changed, 190 insertions(+)
18
19 diff --git a/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-gpu-sensors.patch b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-gpu-sensors.patch
20 new file mode 100644
21 index 000000000000..bf81b8bf68eb
22 --- /dev/null
23 +++ b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-gpu-sensors.patch
24 @@ -0,0 +1,32 @@
25 +From 88722b18c92f3a688a69abef9022cbcdcb5163bb Mon Sep 17 00:00:00 2001
26 +From: David Redondo <kde@×××××××××××××.de>
27 +Date: Fri, 29 Apr 2022 13:59:38 +0200
28 +Subject: [PATCH] Fall back to power average if input is not available
29 +
30 +Some power sensors don't expose a current value most notably amdgpu.
31 +For those fall back to the average reading if available.
32 +BUG:445920
33 +
34 +
35 +(cherry picked from commit 7758d202eed28169c031e099e408ea258469e408)
36 +---
37 + systemstats/SensorsFeatureSensor.cpp | 3 +++
38 + 1 file changed, 3 insertions(+)
39 +
40 +diff --git a/systemstats/SensorsFeatureSensor.cpp b/systemstats/SensorsFeatureSensor.cpp
41 +index 6c8bdb34..3555115f 100644
42 +--- a/systemstats/SensorsFeatureSensor.cpp
43 ++++ b/systemstats/SensorsFeatureSensor.cpp
44 +@@ -95,6 +95,9 @@ makeSensorsFeatureSensor(const QString &id, const sensors_chip_name *const chipN
45 + break;
46 + case SENSORS_FEATURE_POWER:
47 + valueFeature = sensors_get_subfeature(chipName, feature, SENSORS_SUBFEATURE_POWER_INPUT);
48 ++ if (!valueFeature) {
49 ++ valueFeature = sensors_get_subfeature(chipName, feature, SENSORS_SUBFEATURE_POWER_AVERAGE);
50 ++ }
51 + unit = UnitWatt;
52 + maximum = getValueOfFirstExisting({SENSORS_SUBFEATURE_POWER_CRIT, SENSORS_SUBFEATURE_POWER_MAX});
53 + break;
54 +--
55 +GitLab
56 +
57
58 diff --git a/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-1.patch b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-1.patch
59 new file mode 100644
60 index 000000000000..61b981734fa7
61 --- /dev/null
62 +++ b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-1.patch
63 @@ -0,0 +1,35 @@
64 +From b94b0e11f9c0f718f109f37dad8a889301f3a59a Mon Sep 17 00:00:00 2001
65 +From: Arjen Hiemstra <ahiemstra@×××××.nl>
66 +Date: Mon, 9 May 2022 19:05:06 +0200
67 +Subject: [PATCH] Faces: Write preset faceproperties to the right location
68 +
69 +When loading presets we expect the faceproperties file to be located in
70 +"contents/config/" but when writing we are placing it in "contents/"
71 +which means that custom presets are not loaded properly.
72 +
73 +BUG: 450745
74 +
75 +
76 +(cherry picked from commit 05866a594198d8c76814d8cd4eb3e83cc9123c8d)
77 +---
78 + faces/SensorFaceController.cpp | 4 ++--
79 + 1 file changed, 2 insertions(+), 2 deletions(-)
80 +
81 +diff --git a/faces/SensorFaceController.cpp b/faces/SensorFaceController.cpp
82 +index d3daa87d..21fb2954 100644
83 +--- a/faces/SensorFaceController.cpp
84 ++++ b/faces/SensorFaceController.cpp
85 +@@ -938,8 +938,8 @@ void SensorFaceController::savePreset()
86 + cg.sync();
87 +
88 + QDir subDir(dir.path());
89 +- subDir.mkdir(QStringLiteral("contents"));
90 +- KConfig faceConfig(subDir.path() % QStringLiteral("/contents/faceproperties"));
91 ++ subDir.mkpath(QStringLiteral("contents/config"));
92 ++ KConfig faceConfig(subDir.path() % QStringLiteral("/contents/config/faceproperties"));
93 +
94 + KConfigGroup configGroup(&faceConfig, "Config");
95 + configGroup.writeEntry(QStringLiteral("totalSensors"), QJsonDocument(totalSensors()).toJson(QJsonDocument::Compact));
96 +--
97 +GitLab
98 +
99
100 diff --git a/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-2.patch b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-2.patch
101 new file mode 100644
102 index 000000000000..35bf11ee6431
103 --- /dev/null
104 +++ b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-2.patch
105 @@ -0,0 +1,43 @@
106 +From 0d06f3fdda71e87d70a4ca8d45af6badb3ab4ee1 Mon Sep 17 00:00:00 2001
107 +From: Arjen Hiemstra <ahiemstra@×××××.nl>
108 +Date: Mon, 9 May 2022 19:08:10 +0200
109 +Subject: [PATCH] Faces: Do not write resolved sensors to preset file
110 +
111 +The three sensor properties of FaceController contain the resolved
112 +sensors. This means we are not writing group regular expressions to face
113 +presets but are wiriting only the local sensors that were found for that
114 +group, pretty much bypassing why we have the groups in the first place.
115 +The unresolved sensors are only contained in the sensor configuration,
116 +so read them from there and write that to the preset faceproperties.
117 +
118 +
119 +(cherry picked from commit 1ea0671de11ea51aa2e181deafb70d8da588a2af)
120 +---
121 + faces/SensorFaceController.cpp | 11 ++++++++---
122 + 1 file changed, 8 insertions(+), 3 deletions(-)
123 +
124 +diff --git a/faces/SensorFaceController.cpp b/faces/SensorFaceController.cpp
125 +index 21fb2954..632b7dd4 100644
126 +--- a/faces/SensorFaceController.cpp
127 ++++ b/faces/SensorFaceController.cpp
128 +@@ -942,9 +942,14 @@ void SensorFaceController::savePreset()
129 + KConfig faceConfig(subDir.path() % QStringLiteral("/contents/config/faceproperties"));
130 +
131 + KConfigGroup configGroup(&faceConfig, "Config");
132 +- configGroup.writeEntry(QStringLiteral("totalSensors"), QJsonDocument(totalSensors()).toJson(QJsonDocument::Compact));
133 +- configGroup.writeEntry(QStringLiteral("highPrioritySensorIds"), QJsonDocument(highPrioritySensorIds()).toJson(QJsonDocument::Compact));
134 +- configGroup.writeEntry(QStringLiteral("lowPrioritySensorIds"), QJsonDocument(lowPrioritySensorIds()).toJson(QJsonDocument::Compact));
135 ++
136 ++ auto sensors = d->readAndUpdateSensors(d->sensorsGroup, QStringLiteral("totalSensors"));
137 ++ configGroup.writeEntry(QStringLiteral("totalSensors"), QJsonDocument(sensors).toJson(QJsonDocument::Compact));
138 ++ sensors = d->readAndUpdateSensors(d->sensorsGroup, QStringLiteral("highPrioritySensorIds"));
139 ++ configGroup.writeEntry(QStringLiteral("highPrioritySensorIds"), QJsonDocument(sensors).toJson(QJsonDocument::Compact));
140 ++ sensors = d->readAndUpdateSensors(d->sensorsGroup, QStringLiteral("lowPrioritySensorIds"));
141 ++ configGroup.writeEntry(QStringLiteral("lowPrioritySensorIds"), QJsonDocument(sensors).toJson(QJsonDocument::Compact));
142 ++ configGroup.writeEntry(QStringLiteral("chartFace"), faceId());
143 +
144 + KConfigGroup colorsGroup(&faceConfig, "SensorColors");
145 + d->colorsGroup.copyTo(&colorsGroup);
146 +--
147 +GitLab
148 +
149
150 diff --git a/kde-plasma/libksysguard/libksysguard-5.24.5-r1.ebuild b/kde-plasma/libksysguard/libksysguard-5.24.5-r1.ebuild
151 new file mode 100644
152 index 000000000000..5e70bb4448e2
153 --- /dev/null
154 +++ b/kde-plasma/libksysguard/libksysguard-5.24.5-r1.ebuild
155 @@ -0,0 +1,80 @@
156 +# Copyright 1999-2022 Gentoo Authors
157 +# Distributed under the terms of the GNU General Public License v2
158 +
159 +EAPI=8
160 +
161 +ECM_DESIGNERPLUGIN="true"
162 +ECM_TEST="true"
163 +KFMIN=5.90.0
164 +QTMIN=5.15.2
165 +VIRTUALX_REQUIRED="test"
166 +inherit ecm kde.org
167 +
168 +DESCRIPTION="Task management and system monitoring library"
169 +
170 +LICENSE="LGPL-2+"
171 +SLOT="5/9"
172 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
173 +IUSE="webengine X"
174 +
175 +COMMON_DEPEND="
176 + dev-libs/libnl:3
177 + >=dev-qt/qtdbus-${QTMIN}:5
178 + >=dev-qt/qtdeclarative-${QTMIN}:5
179 + >=dev-qt/qtgui-${QTMIN}:5
180 + >=dev-qt/qtnetwork-${QTMIN}:5
181 + >=dev-qt/qtwidgets-${QTMIN}:5
182 + >=kde-frameworks/kauth-${KFMIN}:5
183 + >=kde-frameworks/kcompletion-${KFMIN}:5
184 + >=kde-frameworks/kconfig-${KFMIN}:5
185 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5
186 + >=kde-frameworks/kcoreaddons-${KFMIN}:5
187 + >=kde-frameworks/kdeclarative-${KFMIN}:5
188 + >=kde-frameworks/ki18n-${KFMIN}:5
189 + >=kde-frameworks/kjobwidgets-${KFMIN}:5
190 + >=kde-frameworks/knewstuff-${KFMIN}:5
191 + >=kde-frameworks/kpackage-${KFMIN}:5
192 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
193 + >=kde-frameworks/kwindowsystem-${KFMIN}:5
194 + net-libs/libpcap
195 + sys-apps/lm-sensors:=
196 + sys-libs/libcap
197 + sys-libs/zlib
198 + webengine? (
199 + >=dev-qt/qtwebchannel-${QTMIN}:5
200 + >=dev-qt/qtwebengine-${QTMIN}:5
201 + )
202 + X? (
203 + >=dev-qt/qtx11extras-${QTMIN}:5
204 + x11-libs/libX11
205 + x11-libs/libXres
206 + )
207 +"
208 +DEPEND="${COMMON_DEPEND}
209 + >=kde-frameworks/kiconthemes-${KFMIN}:5
210 + X? ( x11-base/xorg-proto )
211 +"
212 +RDEPEND="${COMMON_DEPEND}
213 + !<kde-plasma/ksysguard-5.21.90:5
214 + !<kde-plasma/plasma-workspace-5.18.80:5
215 +"
216 +
217 +PATCHES=(
218 + "${FILESDIR}"/${PN}-5.22.80-no-detailed-mem-message.patch
219 + "${FILESDIR}"/${P}-fix-missing-gpu-sensors.patch # KDE-bug 445920
220 + "${FILESDIR}"/${P}-fix-missing-selfmade-presets-{1,2}.patch # KDE-bug 450745
221 +)
222 +
223 +src_configure() {
224 + local mycmakeargs=(
225 + $(cmake_use_find_package webengine Qt5WebChannel)
226 + $(cmake_use_find_package webengine Qt5WebEngineWidgets)
227 + $(cmake_use_find_package X X11)
228 + )
229 +
230 + ecm_src_configure
231 +}
232 +
233 +src_test() {
234 + LC_NUMERIC="C" ecm_src_test # bug 695514
235 +}