<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 4b93b71067949cc5efabb9b3d59278a3f362b11c Mon Sep 17 00:00:00 2001
From: Heiko Thiery &lt;heiko.thiery@gmail.com&gt;
Date: Wed, 21 Oct 2020 13:33:25 +0200
Subject: [PATCH] libweston/backend/drm: might need EGL

gbm-drm.c includes gl-renderer.h. When EGL is enabled, that in turns
includes egl.h. As such, dependencies for drm should include EGL if
it is available.

This condition is modelled after a similar one in libweston/meson.build

Reported-by: Gary Bisson &lt;gary.bisson@boundarydevices.com&gt;
Reported-by: Heiko Thiery &lt;heiko.thiery@gmail.com&gt;
Signed-off-by: Yann E. MORIN &lt;yann.morin.1998@free.fr&gt;
Cc: Refik Tuzakli &lt;tuzakli.refik@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Heiko Thiery &lt;heiko.thiery@gmail.com&gt;
---
This patch should be a proper fix for the issue discribed in the patch from
Gary [1].

Since the MR on weston upstream [2] is not merged now I add this patch
to have working weston with imx in buildroot.

[1] https://patchwork.ozlabs.org/project/buildroot/patch/20200402130842.918696-3-gary.bisson@boundarydevices.com/
[2] https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/508
---
 libweston/backend-drm/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libweston/backend-drm/meson.build b/libweston/backend-drm/meson.build
index 484c2702..e3e5b976 100644
--- a/libweston/backend-drm/meson.build
+++ b/libweston/backend-drm/meson.build
@@ -53,6 +53,9 @@ if get_option('renderer-gl')
 		config_h.set('HAVE_GBM_FD_IMPORT', '1')
 	endif
 	deps_drm += dep_gbm
+	if dep_egl.found()
+		deps_drm += dep_egl
+	endif
 	srcs_drm += 'drm-gbm.c'
 	config_h.set('BUILD_DRM_GBM', '1')
 endif
--
2.20.1

</pre></body></html>