af2e8c3615af8beb366146e8ccb681f6cc54aaa2
[AGL/meta-agl-devel.git] / meta-uhmi / meta-rvgpu / recipes-graphics / mesa-virtio / files / 0002-mesa-virtio-Fix-missing-wayland-egl-backend-build-error.patch
1 From d676753e3089c5bccb73750fba0f14d287f8add9 Mon Sep 17 00:00:00 2001
2 From: Ihor Korynkevych <Ihor.Korynkevych@opensynergy.com>
3 Date: Mon, 20 May 2019 15:44:30 +0300
4 Subject: [PATCH] mesa-virtio: Fix missing wayland-egl-backend build error.
5
6 From the mesa 18.2.8 release notes: libwayland-egl is now distributed by Wayland
7 (since 1.15, see announcement), and has been removed from Mesa in this release.
8
9 Add back the wayland-egl-backend header file not to break the build.
10
11 Issue: EXDCLXXII-59
12
13 Upstream-Status: Pending
14
15 Signed-off-by: Ihor Korynkevych <ihor.korynkevych@opensynergy.com>
16 ---
17  configure.ac                                      |  4 --
18  src/egl/Makefile.am                               |  3 +
19  src/egl/wayland/wayland-egl/wayland-egl-backend.h | 67 +++++++++++++++++++++++
20  3 files changed, 70 insertions(+), 4 deletions(-)
21  create mode 100644 src/egl/wayland/wayland-egl/wayland-egl-backend.h
22
23 diff --git a/configure.ac b/configure.ac
24 index 97070b8..afc81e6 100644
25 --- a/configure.ac
26 +++ b/configure.ac
27 @@ -90,7 +90,6 @@ LIBOMXIL_TIZONIA_REQUIRED=0.10.0
28  LIBVA_REQUIRED=0.39.0
29  VDPAU_REQUIRED=1.1
30  WAYLAND_REQUIRED=1.11
31 -WAYLAND_EGL_BACKEND_REQUIRED=3
32  WAYLAND_PROTOCOLS_REQUIRED=1.8
33  XCB_REQUIRED=1.9.3
34  XCBDRI2_REQUIRED=1.8
35 @@ -1818,9 +1817,6 @@ for plat in $platforms; do
36          PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED])
37          PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
38          PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
39 -        if test "x$enable_egl" = xyes; then
40 -          PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
41 -        fi
42          WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
43  
44          AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
45 diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
46 index b43805d..0fcc24a 100644
47 --- a/src/egl/Makefile.am
48 +++ b/src/egl/Makefile.am
49 @@ -123,6 +123,9 @@ AM_CFLAGS += \
50         -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
51         -D_EGL_BUILT_IN_DRIVER_DRI2
52  
53 +AM_CFLAGS += \
54 +       -I$(top_srcdir)/src/egl/wayland/wayland-egl
55 +
56  nodist_libEGL_common_la_SOURCES = \
57         $(dri2_backend_GENERATED_FILES)
58  
59 diff --git a/src/egl/wayland/wayland-egl/wayland-egl-backend.h b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
60 new file mode 100644
61 index 0000000..869c86f
62 --- /dev/null
63 +++ b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
64 @@ -0,0 +1,67 @@
65 +/*
66 + * Copyright © 2011 Benjamin Franzke
67 + *
68 + * Permission is hereby granted, free of charge, to any person obtaining a
69 + * copy of this software and associated documentation files (the "Software"),
70 + * to deal in the Software without restriction, including without limitation
71 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
72 + * and/or sell copies of the Software, and to permit persons to whom the
73 + * Software is furnished to do so, subject to the following conditions:
74 + *
75 + * The above copyright notice and this permission notice (including the next
76 + * paragraph) shall be included in all copies or substantial portions of the
77 + * Software.
78 + *
79 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
80 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
81 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
82 + * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
83 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
84 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
85 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
86 + * DEALINGS IN THE SOFTWARE.
87 + *
88 + * Authors:
89 + *    Benjamin Franzke <benjaminfranzke@googlemail.com>
90 + */
91 +
92 +#ifndef _WAYLAND_EGL_PRIV_H
93 +#define _WAYLAND_EGL_PRIV_H
94 +
95 +#include <stdint.h>
96 +
97 +#ifdef  __cplusplus
98 +extern "C" {
99 +#endif
100 +
101 +/*
102 + * NOTE: This version must be kept in sync with the Version field in the
103 + * wayland-egl-backend.pc.in file.
104 + */
105 +#define WL_EGL_WINDOW_VERSION 3
106 +
107 +struct wl_surface;
108 +
109 +struct wl_egl_window {
110 +       const intptr_t version;
111 +
112 +       int width;
113 +       int height;
114 +       int dx;
115 +       int dy;
116 +
117 +       int attached_width;
118 +       int attached_height;
119 +
120 +       void *driver_private;
121 +       void (*resize_callback)(struct wl_egl_window *, void *);
122 +       void (*destroy_window_callback)(void *);
123 +
124 +       struct wl_surface *surface;
125 +};
126 +
127 +#ifdef  __cplusplus
128 +}
129 +#endif
130 +
131 +#endif
132 -- 
133 2.7.4
134