summaryrefslogtreecommitdiffstats
path: root/meta-uhmi/meta-rvgpu/recipes-graphics/mesa-virtio/files/0002-mesa-virtio-Fix-missing-wayland-egl-backend-build-error.patch
blob: af2e8c3615af8beb366146e8ccb681f6cc54aaa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
From d676753e3089c5bccb73750fba0f14d287f8add9 Mon Sep 17 00:00:00 2001
From: Ihor Korynkevych <Ihor.Korynkevych@opensynergy.com>
Date: Mon, 20 May 2019 15:44:30 +0300
Subject: [PATCH] mesa-virtio: Fix missing wayland-egl-backend build error.

From the mesa 18.2.8 release notes: libwayland-egl is now distributed by Wayland
(since 1.15, see announcement), and has been removed from Mesa in this release.

Add back the wayland-egl-backend header file not to break the build.

Issue: EXDCLXXII-59

Upstream-Status: Pending

Signed-off-by: Ihor Korynkevych <ihor.korynkevych@opensynergy.com>
---
 configure.ac                                      |  4 --
 src/egl/Makefile.am                               |  3 +
 src/egl/wayland/wayland-egl/wayland-egl-backend.h | 67 +++++++++++++++++++++++
 3 files changed, 70 insertions(+), 4 deletions(-)
 create mode 100644 src/egl/wayland/wayland-egl/wayland-egl-backend.h

diff --git a/configure.ac b/configure.ac
index 97070b8..afc81e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,7 +90,6 @@ LIBOMXIL_TIZONIA_REQUIRED=0.10.0
 LIBVA_REQUIRED=0.39.0
 VDPAU_REQUIRED=1.1
 WAYLAND_REQUIRED=1.11
-WAYLAND_EGL_BACKEND_REQUIRED=3
 WAYLAND_PROTOCOLS_REQUIRED=1.8
 XCB_REQUIRED=1.9.3
 XCBDRI2_REQUIRED=1.8
@@ -1818,9 +1817,6 @@ for plat in $platforms; do
         PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED])
         PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
         PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
-        if test "x$enable_egl" = xyes; then
-          PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
-        fi
         WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
 
         AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index b43805d..0fcc24a 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -123,6 +123,9 @@ AM_CFLAGS += \
 	-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
 	-D_EGL_BUILT_IN_DRIVER_DRI2
 
+AM_CFLAGS += \
+	-I$(top_srcdir)/src/egl/wayland/wayland-egl
+
 nodist_libEGL_common_la_SOURCES = \
 	$(dri2_backend_GENERATED_FILES)
 
diff --git a/src/egl/wayland/wayland-egl/wayland-egl-backend.h b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
new file mode 100644
index 0000000..869c86f
--- /dev/null
+++ b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright © 2011 Benjamin Franzke
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *    Benjamin Franzke <benjaminfranzke@googlemail.com>
+ */
+
+#ifndef _WAYLAND_EGL_PRIV_H
+#define _WAYLAND_EGL_PRIV_H
+
+#include <stdint.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+/*
+ * NOTE: This version must be kept in sync with the Version field in the
+ * wayland-egl-backend.pc.in file.
+ */
+#define WL_EGL_WINDOW_VERSION 3
+
+struct wl_surface;
+
+struct wl_egl_window {
+	const intptr_t version;
+
+	int width;
+	int height;
+	int dx;
+	int dy;
+
+	int attached_width;
+	int attached_height;
+
+	void *driver_private;
+	void (*resize_callback)(struct wl_egl_window *, void *);
+	void (*destroy_window_callback)(void *);
+
+	struct wl_surface *surface;
+};
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
-- 
2.7.4