1 |
commit: ac659d07d5effc2fbda8e6dc91dd9f19e9bfd449 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 25 09:23:26 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 30 01:43:05 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac659d07 |
7 |
|
8 |
kde-plasma/plasma-desktop: backport upstream fixes for 5.25.5 |
9 |
|
10 |
Upstream commit: 234cd860532449f017ecbbca6a8caad5473fcf8b |
11 |
Upstream commit: 7e1dec42ba12cdbf768ba7fba613e837d645b02c |
12 |
|
13 |
KDE-bug: https://bugs.kde.org/413645 |
14 |
Bug: https://bugs.gentoo.org/883289 |
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
.../plasma-desktop-5.25.5-lock-layout-check.patch | 23 +++ |
18 |
.../files/plasma-desktop-5.25.5-lock-layout.patch | 48 ++++++ |
19 |
.../plasma-desktop/plasma-desktop-5.25.5-r2.ebuild | 182 +++++++++++++++++++++ |
20 |
3 files changed, 253 insertions(+) |
21 |
|
22 |
diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-lock-layout-check.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-lock-layout-check.patch |
23 |
new file mode 100644 |
24 |
index 000000000000..c476090ed1ea |
25 |
--- /dev/null |
26 |
+++ b/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-lock-layout-check.patch |
27 |
@@ -0,0 +1,23 @@ |
28 |
+https://invent.kde.org/plasma/plasma-desktop/-/commit/7e1dec42ba12cdbf768ba7fba613e837d645b02c |
29 |
+ |
30 |
+From 7e1dec42ba12cdbf768ba7fba613e837d645b02c Mon Sep 17 00:00:00 2001 |
31 |
+From: Marco Martin <notmart@×××××.com> |
32 |
+Date: Sun, 25 Sep 2022 16:28:59 -0500 |
33 |
+Subject: [PATCH] remove the check for > 0 |
34 |
+ |
35 |
+--- a/containments/desktop/package/contents/ui/main.qml |
36 |
++++ b/containments/desktop/package/contents/ui/main.qml |
37 |
+@@ -85,10 +85,10 @@ FolderViewDropArea { |
38 |
+ topMargin: (isContainment && plasmoid.availableScreenRect) ? plasmoid.availableScreenRect.y : 0 |
39 |
+ |
40 |
+ rightMargin: (isContainment && plasmoid.availableScreenRect) && parent |
41 |
+- ? Math.max(0, parent.width - (plasmoid.availableScreenRect.x + plasmoid.availableScreenRect.width)) : 0 |
42 |
++ ? parent.width - (plasmoid.availableScreenRect.x + plasmoid.availableScreenRect.width) : 0 |
43 |
+ |
44 |
+ bottomMargin: (isContainment && plasmoid.availableScreenRect) && parent |
45 |
+- ? Math.max(0, parent.height - (plasmoid.availableScreenRect.y + plasmoid.availableScreenRect.height)) : 0 |
46 |
++ ? parent.height - (plasmoid.availableScreenRect.y + plasmoid.availableScreenRect.height) : 0 |
47 |
+ } |
48 |
+ |
49 |
+ Behavior on anchors.topMargin { |
50 |
+GitLab |
51 |
|
52 |
diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-lock-layout.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-lock-layout.patch |
53 |
new file mode 100644 |
54 |
index 000000000000..292712a8060e |
55 |
--- /dev/null |
56 |
+++ b/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-lock-layout.patch |
57 |
@@ -0,0 +1,48 @@ |
58 |
+https://invent.kde.org/plasma/plasma-desktop/-/commit/234cd860532449f017ecbbca6a8caad5473fcf8b |
59 |
+ |
60 |
+From 234cd860532449f017ecbbca6a8caad5473fcf8b Mon Sep 17 00:00:00 2001 |
61 |
+From: Marco Martin <notmart@×××××.com> |
62 |
+Date: Sun, 25 Sep 2022 16:27:13 -0500 |
63 |
+Subject: [PATCH] Use relayout locking |
64 |
+ |
65 |
+This makes use of the layout locking freature introduced in |
66 |
+ |
67 |
+The resize of the layout area can happen either by screen resolution |
68 |
+change or available screen area change (a panel appears or is resized) |
69 |
+This is not an atomic operation, as width and height are usually set in |
70 |
+2 different operations, and even worse the layout area is resized to |
71 |
+ match the available one with an animation, so many intermediate resizes |
72 |
+that should never cause a relayout happen. |
73 |
+A compression timer limits the actual relayouts to hopefully one, |
74 |
+ but if the system is really slowed down |
75 |
+(for instance, startup) the timer may expire and cause relayouts in |
76 |
+non useful sizes, losing the needed configuration |
77 |
+The lock blocks all relayout and config writes when the size of the |
78 |
+layout area doesn't correspond to corona availablescreenrect, which are |
79 |
+the only "settled" cases. |
80 |
+ |
81 |
+BUG:413645 |
82 |
+--- a/containments/desktop/package/contents/ui/main.qml |
83 |
++++ b/containments/desktop/package/contents/ui/main.qml |
84 |
+@@ -85,10 +85,10 @@ FolderViewDropArea { |
85 |
+ topMargin: (isContainment && plasmoid.availableScreenRect) ? plasmoid.availableScreenRect.y : 0 |
86 |
+ |
87 |
+ rightMargin: (isContainment && plasmoid.availableScreenRect) && parent |
88 |
+- ? parent.width - (plasmoid.availableScreenRect.x + plasmoid.availableScreenRect.width) : 0 |
89 |
++ ? Math.max(0, parent.width - (plasmoid.availableScreenRect.x + plasmoid.availableScreenRect.width)) : 0 |
90 |
+ |
91 |
+ bottomMargin: (isContainment && plasmoid.availableScreenRect) && parent |
92 |
+- ? parent.height - (plasmoid.availableScreenRect.y + plasmoid.availableScreenRect.height) : 0 |
93 |
++ ? Math.max(0, parent.height - (plasmoid.availableScreenRect.y + plasmoid.availableScreenRect.height)) : 0 |
94 |
+ } |
95 |
+ |
96 |
+ Behavior on anchors.topMargin { |
97 |
+@@ -263,6 +263,7 @@ FolderViewDropArea { |
98 |
+ ContainmentLayoutManager.AppletsLayout { |
99 |
+ id: appletsLayout |
100 |
+ anchors.fill: parent |
101 |
++ relayoutLock: width != plasmoid.availableScreenRect.width || height != plasmoid.availableScreenRect.height |
102 |
+ // NOTE: use plasmoid.availableScreenRect and not own width and height as they are updated not atomically |
103 |
+ configKey: "ItemGeometries-" + Math.round(plasmoid.screenGeometry.width) + "x" + Math.round(plasmoid.screenGeometry.height) |
104 |
+ fallbackConfigKey: plasmoid.availableScreenRect.width > plasmoid.availableScreenRect.height ? "ItemGeometriesHorizontal" : "ItemGeometriesVertical" |
105 |
+GitLab |
106 |
|
107 |
diff --git a/kde-plasma/plasma-desktop/plasma-desktop-5.25.5-r2.ebuild b/kde-plasma/plasma-desktop/plasma-desktop-5.25.5-r2.ebuild |
108 |
new file mode 100644 |
109 |
index 000000000000..355edbd21e9f |
110 |
--- /dev/null |
111 |
+++ b/kde-plasma/plasma-desktop/plasma-desktop-5.25.5-r2.ebuild |
112 |
@@ -0,0 +1,182 @@ |
113 |
+# Copyright 1999-2022 Gentoo Authors |
114 |
+# Distributed under the terms of the GNU General Public License v2 |
115 |
+ |
116 |
+EAPI=8 |
117 |
+ |
118 |
+ECM_HANDBOOK="forceoptional" |
119 |
+ECM_TEST="true" |
120 |
+KFMIN=5.99.0 |
121 |
+PVCUT=$(ver_cut 1-3) |
122 |
+QTMIN=5.15.5 |
123 |
+VIRTUALX_REQUIRED="test" |
124 |
+inherit ecm plasma.kde.org optfeature |
125 |
+ |
126 |
+DESCRIPTION="KDE Plasma desktop" |
127 |
+XORGHDRS="${PN}-override-include-dirs-2" |
128 |
+SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${XORGHDRS}.tar.xz" |
129 |
+ |
130 |
+LICENSE="GPL-2" # TODO: CHECK |
131 |
+SLOT="5" |
132 |
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" |
133 |
+IUSE="emoji ibus +kaccounts scim +semantic-desktop telemetry" |
134 |
+ |
135 |
+COMMON_DEPEND=" |
136 |
+ >=dev-qt/qtconcurrent-${QTMIN}:5 |
137 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
138 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
139 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
140 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
141 |
+ >=dev-qt/qtprintsupport-${QTMIN}:5 |
142 |
+ >=dev-qt/qtsql-${QTMIN}:5 |
143 |
+ >=dev-qt/qtsvg-${QTMIN}:5 |
144 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
145 |
+ >=dev-qt/qtx11extras-${QTMIN}:5 |
146 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
147 |
+ >=kde-frameworks/attica-${KFMIN}:5 |
148 |
+ >=kde-frameworks/kactivities-${KFMIN}:5 |
149 |
+ >=kde-frameworks/kactivities-stats-${KFMIN}:5 |
150 |
+ >=kde-frameworks/karchive-${KFMIN}:5 |
151 |
+ >=kde-frameworks/kauth-${KFMIN}:5 |
152 |
+ >=kde-frameworks/kbookmarks-${KFMIN}:5 |
153 |
+ >=kde-frameworks/kcmutils-${KFMIN}:5 |
154 |
+ >=kde-frameworks/kcodecs-${KFMIN}:5 |
155 |
+ >=kde-frameworks/kcompletion-${KFMIN}:5 |
156 |
+ >=kde-frameworks/kconfig-${KFMIN}:5 |
157 |
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5 |
158 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
159 |
+ >=kde-frameworks/kcrash-${KFMIN}:5 |
160 |
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5 |
161 |
+ >=kde-frameworks/kdeclarative-${KFMIN}:5 |
162 |
+ >=kde-frameworks/kded-${KFMIN}:5 |
163 |
+ >=kde-frameworks/kdelibs4support-${KFMIN}:5 |
164 |
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5 |
165 |
+ >=kde-frameworks/kguiaddons-${KFMIN}:5 |
166 |
+ >=kde-frameworks/ki18n-${KFMIN}:5 |
167 |
+ >=kde-frameworks/kiconthemes-${KFMIN}:5 |
168 |
+ >=kde-frameworks/kio-${KFMIN}:5 |
169 |
+ >=kde-frameworks/kitemmodels-${KFMIN}:5 |
170 |
+ >=kde-frameworks/kitemviews-${KFMIN}:5 |
171 |
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5 |
172 |
+ >=kde-frameworks/knewstuff-${KFMIN}:5 |
173 |
+ >=kde-frameworks/knotifications-${KFMIN}:5 |
174 |
+ >=kde-frameworks/knotifyconfig-${KFMIN}:5 |
175 |
+ >=kde-frameworks/kparts-${KFMIN}:5 |
176 |
+ >=kde-frameworks/krunner-${KFMIN}:5 |
177 |
+ >=kde-frameworks/kservice-${KFMIN}:5 |
178 |
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
179 |
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5 |
180 |
+ >=kde-frameworks/kxmlgui-${KFMIN}:5 |
181 |
+ >=kde-frameworks/plasma-${KFMIN}:5 |
182 |
+ >=kde-frameworks/solid-${KFMIN}:5 |
183 |
+ >=kde-frameworks/sonnet-${KFMIN}:5 |
184 |
+ >=kde-plasma/kwin-${PVCUT}:5 |
185 |
+ >=kde-plasma/libksysguard-${PVCUT}:5 |
186 |
+ >=kde-plasma/libkworkspace-${PVCUT}:5 |
187 |
+ >=kde-plasma/plasma-workspace-${PVCUT}:5 |
188 |
+ >=media-libs/phonon-4.11.0 |
189 |
+ x11-libs/libX11 |
190 |
+ x11-libs/libXfixes |
191 |
+ x11-libs/libXi |
192 |
+ x11-libs/libxcb |
193 |
+ x11-libs/libxkbfile |
194 |
+ emoji? ( |
195 |
+ app-i18n/ibus[emoji] |
196 |
+ dev-libs/glib:2 |
197 |
+ media-fonts/noto-emoji |
198 |
+ ) |
199 |
+ ibus? ( |
200 |
+ app-i18n/ibus |
201 |
+ dev-libs/glib:2 |
202 |
+ >=dev-qt/qtx11extras-${QTMIN}:5 |
203 |
+ x11-libs/libxcb |
204 |
+ x11-libs/xcb-util-keysyms |
205 |
+ ) |
206 |
+ kaccounts? ( |
207 |
+ kde-apps/kaccounts-integration:5 |
208 |
+ net-libs/accounts-qt |
209 |
+ ) |
210 |
+ scim? ( app-i18n/scim ) |
211 |
+ semantic-desktop? ( >=kde-frameworks/baloo-${KFMIN}:5 ) |
212 |
+ telemetry? ( dev-libs/kuserfeedback:5 ) |
213 |
+" |
214 |
+DEPEND="${COMMON_DEPEND} |
215 |
+ dev-libs/boost |
216 |
+ x11-base/xorg-proto |
217 |
+" |
218 |
+RDEPEND="${COMMON_DEPEND} |
219 |
+ !kde-plasma/user-manager |
220 |
+ >=dev-qt/qtgraphicaleffects-${QTMIN}:5 |
221 |
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5 |
222 |
+ >=kde-frameworks/kirigami-${KFMIN}:5 |
223 |
+ >=kde-frameworks/qqc2-desktop-style-${KFMIN}:5 |
224 |
+ >=kde-plasma/kde-cli-tools-${PVCUT}:5 |
225 |
+ >=kde-plasma/oxygen-${PVCUT}:5 |
226 |
+ sys-apps/util-linux |
227 |
+ x11-apps/setxkbmap |
228 |
+ x11-misc/xdg-user-dirs |
229 |
+ kaccounts? ( net-libs/signon-oauth2 ) |
230 |
+" |
231 |
+BDEPEND="virtual/pkgconfig" |
232 |
+ |
233 |
+PATCHES=( |
234 |
+ "${WORKDIR}/${XORGHDRS}/${PN}-5.24.6-override-include-dirs.patch" # downstream patch |
235 |
+ "${FILESDIR}/${P}-desktoptoolbox-fix-flickering-on-close.patch" # KDE-bug 417849 |
236 |
+ "${FILESDIR}/${P}-folderview-fix-grid-overflow-property.patch" # KDE-bug 419878 |
237 |
+ "${FILESDIR}/${P}-lock-layout.patch" # KDE-bug 413645 |
238 |
+ "${FILESDIR}/${P}-lock-layout-check.patch" |
239 |
+) |
240 |
+ |
241 |
+src_prepare() { |
242 |
+ ecm_src_prepare |
243 |
+ |
244 |
+ if ! use ibus; then |
245 |
+ sed -e "s/Qt5X11Extras_FOUND AND XCB_XCB_FOUND AND XCB_KEYSYMS_FOUND/false/" \ |
246 |
+ -i applets/kimpanel/backend/ibus/CMakeLists.txt || die |
247 |
+ fi |
248 |
+ |
249 |
+ use emoji || cmake_run_in applets/kimpanel/backend/ibus \ |
250 |
+ cmake_comment_add_subdirectory emojier |
251 |
+ |
252 |
+ # TODO: try to get a build switch upstreamed |
253 |
+ if ! use scim; then |
254 |
+ sed -e "s/^pkg_check_modules.*SCIM/#&/" -i CMakeLists.txt || die |
255 |
+ fi |
256 |
+} |
257 |
+ |
258 |
+src_configure() { |
259 |
+ local mycmakeargs=( |
260 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON # not packaged |
261 |
+ -DEVDEV_INCLUDE_DIRS="${WORKDIR}/${XORGHDRS}"/include |
262 |
+ -DXORGLIBINPUT_INCLUDE_DIRS="${WORKDIR}/${XORGHDRS}"/include |
263 |
+ -DXORGSERVER_INCLUDE_DIRS="${WORKDIR}/${XORGHDRS}"/include |
264 |
+ -DSYNAPTICS_INCLUDE_DIRS="${WORKDIR}/${XORGHDRS}"/include |
265 |
+ $(cmake_use_find_package kaccounts AccountsQt5) |
266 |
+ $(cmake_use_find_package kaccounts KAccounts) |
267 |
+ $(cmake_use_find_package semantic-desktop KF5Baloo) |
268 |
+ $(cmake_use_find_package telemetry KUserFeedback) |
269 |
+ ) |
270 |
+ if ! use emoji && ! use ibus; then |
271 |
+ mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_GLIB2=ON ) |
272 |
+ fi |
273 |
+ |
274 |
+ ecm_src_configure |
275 |
+} |
276 |
+ |
277 |
+src_test() { |
278 |
+ # parallel tests fail, foldermodeltest,positionertest hang, bug #646890 |
279 |
+ # test_kio_fonts needs D-Bus, bug #634166 |
280 |
+ # lookandfeel-kcmTest is unreliable for a long time, bug #607918 |
281 |
+ local myctestargs=( |
282 |
+ -j1 |
283 |
+ -E "(foldermodeltest|positionertest|test_kio_fonts|lookandfeel-kcmTest)" |
284 |
+ ) |
285 |
+ |
286 |
+ ecm_src_test |
287 |
+} |
288 |
+ |
289 |
+pkg_postinst() { |
290 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
291 |
+ optfeature "screen reader support" app-accessibility/orca |
292 |
+ fi |
293 |
+ ecm_pkg_postinst |
294 |
+} |