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.
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.
9 Add back the wayland-egl-backend header file not to break the build.
13 Upstream-Status: Pending
15 Signed-off-by: Ihor Korynkevych <ihor.korynkevych@opensynergy.com>
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
23 diff --git a/configure.ac b/configure.ac
24 index 97070b8..afc81e6 100644
27 @@ -90,7 +90,6 @@ LIBOMXIL_TIZONIA_REQUIRED=0.10.0
31 -WAYLAND_EGL_BACKEND_REQUIRED=3
32 WAYLAND_PROTOCOLS_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])
42 WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
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
54 + -I$(top_srcdir)/src/egl/wayland/wayland-egl
56 nodist_libEGL_common_la_SOURCES = \
57 $(dri2_backend_GENERATED_FILES)
59 diff --git a/src/egl/wayland/wayland-egl/wayland-egl-backend.h b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
61 index 0000000..869c86f
63 +++ b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
66 + * Copyright © 2011 Benjamin Franzke
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:
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
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.
89 + * Benjamin Franzke <benjaminfranzke@googlemail.com>
92 +#ifndef _WAYLAND_EGL_PRIV_H
93 +#define _WAYLAND_EGL_PRIV_H
102 + * NOTE: This version must be kept in sync with the Version field in the
103 + * wayland-egl-backend.pc.in file.
105 +#define WL_EGL_WINDOW_VERSION 3
109 +struct wl_egl_window {
110 + const intptr_t version;
117 + int attached_width;
118 + int attached_height;
120 + void *driver_private;
121 + void (*resize_callback)(struct wl_egl_window *, void *);
122 + void (*destroy_window_callback)(void *);
124 + struct wl_surface *surface;