1 |
commit: 6ea1782b800dc1a0320567860886460dd3857f35 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 1 10:12:56 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 1 10:13:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ea1782b |
7 |
|
8 |
kde-plasma/kwin: Fix build with upcoming mesa version |
9 |
|
10 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
kde-plasma/kwin/files/kwin-5.18.5-mesa-21.patch | 193 ++++++++++++++++++++++++ |
14 |
kde-plasma/kwin/kwin-5.18.5-r2.ebuild | 118 +++++++++++++++ |
15 |
2 files changed, 311 insertions(+) |
16 |
|
17 |
diff --git a/kde-plasma/kwin/files/kwin-5.18.5-mesa-21.patch b/kde-plasma/kwin/files/kwin-5.18.5-mesa-21.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..dc87b404548 |
20 |
--- /dev/null |
21 |
+++ b/kde-plasma/kwin/files/kwin-5.18.5-mesa-21.patch |
22 |
@@ -0,0 +1,193 @@ |
23 |
+From 2c76cc4784382b3df9b5413860d0793ea26cea31 Mon Sep 17 00:00:00 2001 |
24 |
+From: Vlad Zahorodnii <vlad.zahorodnii@×××.org> |
25 |
+Date: Fri, 29 May 2020 16:01:27 +0300 |
26 |
+Subject: [wayland] Fix misuse of EGL/eglmesaext.h |
27 |
+ |
28 |
+The recommended way to get all EGL extension defines is to include |
29 |
+EGL/eglext.h. EGL/eglmesaext.h is a private header that compositors |
30 |
+should not use. |
31 |
+ |
32 |
+BUG: 422131 |
33 |
+--- |
34 |
+ .../scenes/opengl/abstract_egl_backend.cpp | 11 +--- |
35 |
+ platformsupport/scenes/opengl/egl_dmabuf.cpp | 41 +----------- |
36 |
+ platformsupport/scenes/opengl/kwineglext.h | 76 ++++++++++++++++++++++ |
37 |
+ 3 files changed, 78 insertions(+), 50 deletions(-) |
38 |
+ create mode 100644 platformsupport/scenes/opengl/kwineglext.h |
39 |
+ |
40 |
+diff --git a/platformsupport/scenes/opengl/abstract_egl_backend.cpp b/platformsupport/scenes/opengl/abstract_egl_backend.cpp |
41 |
+index 532ec27..e160ef3 100644 |
42 |
+--- a/platformsupport/scenes/opengl/abstract_egl_backend.cpp |
43 |
++++ b/platformsupport/scenes/opengl/abstract_egl_backend.cpp |
44 |
+@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. |
45 |
+ *********************************************************************/ |
46 |
+ #include "abstract_egl_backend.h" |
47 |
+ #include "egl_dmabuf.h" |
48 |
++#include "kwineglext.h" |
49 |
+ #include "texture.h" |
50 |
+ #include "composite.h" |
51 |
+ #include "egl_context_attribute_builder.h" |
52 |
+@@ -49,16 +50,6 @@ eglBindWaylandDisplayWL_func eglBindWaylandDisplayWL = nullptr; |
53 |
+ eglUnbindWaylandDisplayWL_func eglUnbindWaylandDisplayWL = nullptr; |
54 |
+ eglQueryWaylandBufferWL_func eglQueryWaylandBufferWL = nullptr; |
55 |
+ |
56 |
+-#ifndef EGL_WAYLAND_BUFFER_WL |
57 |
+-#define EGL_WAYLAND_BUFFER_WL 0x31D5 |
58 |
+-#endif |
59 |
+-#ifndef EGL_WAYLAND_PLANE_WL |
60 |
+-#define EGL_WAYLAND_PLANE_WL 0x31D6 |
61 |
+-#endif |
62 |
+-#ifndef EGL_WAYLAND_Y_INVERTED_WL |
63 |
+-#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB |
64 |
+-#endif |
65 |
+- |
66 |
+ AbstractEglBackend::AbstractEglBackend() |
67 |
+ : QObject(nullptr) |
68 |
+ , OpenGLBackend() |
69 |
+diff --git a/platformsupport/scenes/opengl/egl_dmabuf.cpp b/platformsupport/scenes/opengl/egl_dmabuf.cpp |
70 |
+index 3f75bc7..753f15e 100644 |
71 |
+--- a/platformsupport/scenes/opengl/egl_dmabuf.cpp |
72 |
++++ b/platformsupport/scenes/opengl/egl_dmabuf.cpp |
73 |
+@@ -21,10 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. |
74 |
+ #include "egl_dmabuf.h" |
75 |
+ |
76 |
+ #include "drm_fourcc.h" |
77 |
++#include "kwineglext.h" |
78 |
+ #include "../../../wayland_server.h" |
79 |
+ |
80 |
+ #include <unistd.h> |
81 |
+-#include <EGL/eglmesaext.h> |
82 |
+ |
83 |
+ namespace KWin |
84 |
+ { |
85 |
+@@ -34,45 +34,6 @@ typedef EGLBoolean (*eglQueryDmaBufModifiersEXT_func) (EGLDisplay dpy, EGLint fo |
86 |
+ eglQueryDmaBufFormatsEXT_func eglQueryDmaBufFormatsEXT = nullptr; |
87 |
+ eglQueryDmaBufModifiersEXT_func eglQueryDmaBufModifiersEXT = nullptr; |
88 |
+ |
89 |
+-#ifndef EGL_EXT_image_dma_buf_import |
90 |
+-#define EGL_LINUX_DMA_BUF_EXT 0x3270 |
91 |
+-#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 |
92 |
+-#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 |
93 |
+-#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 |
94 |
+-#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 |
95 |
+-#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 |
96 |
+-#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 |
97 |
+-#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 |
98 |
+-#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 |
99 |
+-#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 |
100 |
+-#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A |
101 |
+-#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B |
102 |
+-#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C |
103 |
+-#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D |
104 |
+-#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E |
105 |
+-#define EGL_ITU_REC601_EXT 0x327F |
106 |
+-#define EGL_ITU_REC709_EXT 0x3280 |
107 |
+-#define EGL_ITU_REC2020_EXT 0x3281 |
108 |
+-#define EGL_YUV_FULL_RANGE_EXT 0x3282 |
109 |
+-#define EGL_YUV_NARROW_RANGE_EXT 0x3283 |
110 |
+-#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 |
111 |
+-#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 |
112 |
+-#endif // EGL_EXT_image_dma_buf_import |
113 |
+- |
114 |
+-#ifndef EGL_EXT_image_dma_buf_import_modifiers |
115 |
+-#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440 |
116 |
+-#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441 |
117 |
+-#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442 |
118 |
+-#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443 |
119 |
+-#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444 |
120 |
+-#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445 |
121 |
+-#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446 |
122 |
+-#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447 |
123 |
+-#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448 |
124 |
+-#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449 |
125 |
+-#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A |
126 |
+-#endif // EGL_EXT_image_dma_buf_import_modifiers |
127 |
+- |
128 |
+ struct YuvPlane |
129 |
+ { |
130 |
+ int widthDivisor; |
131 |
+diff --git a/platformsupport/scenes/opengl/kwineglext.h b/platformsupport/scenes/opengl/kwineglext.h |
132 |
+new file mode 100644 |
133 |
+index 0000000..834701b |
134 |
+--- /dev/null |
135 |
++++ b/platformsupport/scenes/opengl/kwineglext.h |
136 |
+@@ -0,0 +1,76 @@ |
137 |
++/******************************************************************** |
138 |
++ KWin - the KDE window manager |
139 |
++ This file is part of the KDE project. |
140 |
++ |
141 |
++Copyright (C) 2018 Fredrik Höglund <fredrik@×××.org> |
142 |
++Copyright (C) 2020 Vlad Zahorodnii <vlad.zahorodnii@×××.org> |
143 |
++ |
144 |
++This program is free software; you can redistribute it and/or modify |
145 |
++it under the terms of the GNU General Public License as published by |
146 |
++the Free Software Foundation; either version 2 of the License, or |
147 |
++(at your option) any later version. |
148 |
++ |
149 |
++This program is distributed in the hope that it will be useful, |
150 |
++but WITHOUT ANY WARRANTY; without even the implied warranty of |
151 |
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
152 |
++GNU General Public License for more details. |
153 |
++ |
154 |
++You should have received a copy of the GNU General Public License |
155 |
++along with this program. If not, see <http://www.gnu.org/licenses/>. |
156 |
++*********************************************************************/ |
157 |
++ |
158 |
++#ifndef KWINEGLEXT_H |
159 |
++#define KWINEGLEXT_H |
160 |
++ |
161 |
++#include <EGL/eglext.h> |
162 |
++ |
163 |
++#ifndef EGL_WL_bind_wayland_display |
164 |
++#define EGL_WAYLAND_BUFFER_WL 0x31D5 |
165 |
++#define EGL_WAYLAND_PLANE_WL 0x31D6 |
166 |
++#define EGL_TEXTURE_Y_U_V_WL 0x31D7 |
167 |
++#define EGL_TEXTURE_Y_UV_WL 0x31D8 |
168 |
++#define EGL_TEXTURE_Y_XUXV_WL 0x31D9 |
169 |
++#define EGL_TEXTURE_EXTERNAL_WL 0x31DA |
170 |
++#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB |
171 |
++#endif // EGL_WL_bind_wayland_display |
172 |
++ |
173 |
++#ifndef EGL_EXT_image_dma_buf_import |
174 |
++#define EGL_LINUX_DMA_BUF_EXT 0x3270 |
175 |
++#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 |
176 |
++#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 |
177 |
++#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 |
178 |
++#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 |
179 |
++#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 |
180 |
++#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 |
181 |
++#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 |
182 |
++#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 |
183 |
++#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 |
184 |
++#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A |
185 |
++#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B |
186 |
++#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C |
187 |
++#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D |
188 |
++#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E |
189 |
++#define EGL_ITU_REC601_EXT 0x327F |
190 |
++#define EGL_ITU_REC709_EXT 0x3280 |
191 |
++#define EGL_ITU_REC2020_EXT 0x3281 |
192 |
++#define EGL_YUV_FULL_RANGE_EXT 0x3282 |
193 |
++#define EGL_YUV_NARROW_RANGE_EXT 0x3283 |
194 |
++#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 |
195 |
++#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 |
196 |
++#endif // EGL_EXT_image_dma_buf_import |
197 |
++ |
198 |
++#ifndef EGL_EXT_image_dma_buf_import_modifiers |
199 |
++#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440 |
200 |
++#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441 |
201 |
++#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442 |
202 |
++#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443 |
203 |
++#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444 |
204 |
++#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445 |
205 |
++#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446 |
206 |
++#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447 |
207 |
++#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448 |
208 |
++#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449 |
209 |
++#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A |
210 |
++#endif // EGL_EXT_image_dma_buf_import_modifiers |
211 |
++ |
212 |
++#endif // KWINEGLEXT_H |
213 |
+-- |
214 |
+cgit v1.1 |
215 |
+ |
216 |
|
217 |
diff --git a/kde-plasma/kwin/kwin-5.18.5-r2.ebuild b/kde-plasma/kwin/kwin-5.18.5-r2.ebuild |
218 |
new file mode 100644 |
219 |
index 00000000000..ca3ce65cfd4 |
220 |
--- /dev/null |
221 |
+++ b/kde-plasma/kwin/kwin-5.18.5-r2.ebuild |
222 |
@@ -0,0 +1,118 @@ |
223 |
+# Copyright 1999-2020 Gentoo Authors |
224 |
+# Distributed under the terms of the GNU General Public License v2 |
225 |
+ |
226 |
+EAPI=7 |
227 |
+ |
228 |
+ECM_HANDBOOK="optional" |
229 |
+ECM_TEST="optional" |
230 |
+KFMIN=5.66.0 |
231 |
+PVCUT=$(ver_cut 1-3) |
232 |
+QTMIN=5.12.3 |
233 |
+VIRTUALX_REQUIRED="test" |
234 |
+inherit ecm kde.org |
235 |
+ |
236 |
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux" |
237 |
+ |
238 |
+LICENSE="GPL-2+" |
239 |
+SLOT="5" |
240 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
241 |
+IUSE="caps gles2-only multimedia" |
242 |
+ |
243 |
+COMMON_DEPEND=" |
244 |
+ >=kde-frameworks/kactivities-${KFMIN}:5 |
245 |
+ >=kde-frameworks/kauth-${KFMIN}:5 |
246 |
+ >=kde-frameworks/kcmutils-${KFMIN}:5 |
247 |
+ >=kde-frameworks/kcompletion-${KFMIN}:5 |
248 |
+ >=kde-frameworks/kconfig-${KFMIN}:5 |
249 |
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5 |
250 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
251 |
+ >=kde-frameworks/kcrash-${KFMIN}:5 |
252 |
+ >=kde-frameworks/kdeclarative-${KFMIN}:5 |
253 |
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5= |
254 |
+ >=kde-frameworks/ki18n-${KFMIN}:5 |
255 |
+ >=kde-frameworks/kiconthemes-${KFMIN}:5 |
256 |
+ >=kde-frameworks/kidletime-${KFMIN}:5= |
257 |
+ >=kde-frameworks/kinit-${KFMIN}:5 |
258 |
+ >=kde-frameworks/kio-${KFMIN}:5 |
259 |
+ >=kde-frameworks/knewstuff-${KFMIN}:5 |
260 |
+ >=kde-frameworks/knotifications-${KFMIN}:5 |
261 |
+ >=kde-frameworks/kpackage-${KFMIN}:5 |
262 |
+ >=kde-frameworks/kservice-${KFMIN}:5 |
263 |
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5 |
264 |
+ >=kde-frameworks/kwayland-${KFMIN}:5 |
265 |
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
266 |
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5[X] |
267 |
+ >=kde-frameworks/kxmlgui-${KFMIN}:5 |
268 |
+ >=kde-frameworks/plasma-${KFMIN}:5 |
269 |
+ >=kde-plasma/breeze-${PVCUT}:5 |
270 |
+ >=kde-plasma/kdecoration-${PVCUT}:5 |
271 |
+ >=kde-plasma/kscreenlocker-${PVCUT}:5 |
272 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
273 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
274 |
+ >=dev-qt/qtgui-${QTMIN}:5=[gles2-only=] |
275 |
+ >=dev-qt/qtscript-${QTMIN}:5 |
276 |
+ >=dev-qt/qtsensors-${QTMIN}:5 |
277 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
278 |
+ >=dev-qt/qtx11extras-${QTMIN}:5 |
279 |
+ >=dev-libs/libinput-1.9 |
280 |
+ >=dev-libs/wayland-1.2 |
281 |
+ media-libs/fontconfig |
282 |
+ media-libs/freetype |
283 |
+ media-libs/libepoxy |
284 |
+ media-libs/mesa[egl,gbm,wayland,X(+)] |
285 |
+ virtual/libudev:= |
286 |
+ x11-libs/libICE |
287 |
+ x11-libs/libSM |
288 |
+ x11-libs/libX11 |
289 |
+ x11-libs/libXi |
290 |
+ x11-libs/libdrm |
291 |
+ >=x11-libs/libxcb-1.10 |
292 |
+ >=x11-libs/libxkbcommon-0.7.0 |
293 |
+ x11-libs/xcb-util-cursor |
294 |
+ x11-libs/xcb-util-image |
295 |
+ x11-libs/xcb-util-keysyms |
296 |
+ x11-libs/xcb-util-wm |
297 |
+ caps? ( sys-libs/libcap ) |
298 |
+ gles2-only? ( media-libs/mesa[gles2] ) |
299 |
+" |
300 |
+RDEPEND="${COMMON_DEPEND} |
301 |
+ >=kde-frameworks/kirigami-${KFMIN}:5 |
302 |
+ >=dev-qt/qtquickcontrols-${QTMIN}:5 |
303 |
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5 |
304 |
+ >=dev-qt/qtvirtualkeyboard-${QTMIN}:5 |
305 |
+ multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] ) |
306 |
+" |
307 |
+DEPEND="${COMMON_DEPEND} |
308 |
+ >=dev-qt/designer-${QTMIN}:5 |
309 |
+ >=dev-qt/qtconcurrent-${QTMIN}:5 |
310 |
+ x11-base/xorg-proto |
311 |
+" |
312 |
+PDEPEND=" |
313 |
+ >=kde-plasma/kde-cli-tools-${PVCUT}:5 |
314 |
+" |
315 |
+ |
316 |
+RESTRICT+=" test" |
317 |
+ |
318 |
+PATCHES=( |
319 |
+ # in Plasma/5.18 |
320 |
+ "${FILESDIR}/${P}-dont-exec-QDialog.patch" # KDE-bug 421053 |
321 |
+ "${FILESDIR}/${P}-wayland-lockscreen-greeter.patch" # KDE-bug 420802 |
322 |
+ "${FILESDIR}/${P}-mesa-21.patch" # KDE-bug 422131 |
323 |
+) |
324 |
+ |
325 |
+src_prepare() { |
326 |
+ ecm_src_prepare |
327 |
+ use multimedia || eapply "${FILESDIR}/${PN}-5.16.80-gstreamer-optional.patch" |
328 |
+ |
329 |
+ # Access violations, bug #640432 |
330 |
+ sed -e "s/^ecm_find_qmlmodule.*QtMultimedia/#&/" \ |
331 |
+ -i CMakeLists.txt || die |
332 |
+} |
333 |
+ |
334 |
+src_configure() { |
335 |
+ local mycmakeargs=( |
336 |
+ $(cmake_use_find_package caps Libcap) |
337 |
+ ) |
338 |
+ |
339 |
+ ecm_src_configure |
340 |
+} |