Re: [PATCH] wxwidgets: Fix building without x11

Scott Murray

On Fri, 8 Apr 2022, Scott Murray via wrote:

Building with wayland and opengl in DISTRO_FEATURES without x11 as
well was giving the error:

wxwidgets: PACKAGECONFIG[no_gui] Conflict package config 'opengl' set in PACKAGECONFIG.

Upon some investigation, it looks like wxwidgets now supports building
against Gtk's Wayland support, so we can also enable it if wayland is
in DISTRO_FEATURES. For OpenGL, however, wxwidgets seems to have a
dependency on libglu, so the DISTRO_FEATURES check has been changed
to only enable it by default if both x11 and opengl are configured.

Signed-off-by: Scott Murray <scott.murray@...>
meta-oe/recipes-extended/wxwidgets/ | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
I hadn't checked the list before sending this, I'd be okay with Robert's
similar fix instead, though enabling building with wayland support seems
like it potentially could be useful to somebody.

diff --git a/meta-oe/recipes-extended/wxwidgets/ b/meta-oe/recipes-extended/wxwidgets/
index e82143040..e7e89d64a 100644
--- a/meta-oe/recipes-extended/wxwidgets/
+++ b/meta-oe/recipes-extended/wxwidgets/
@@ -43,9 +43,9 @@ EXTRA_OECMAKE:append:libc-musl = " \

-# All toolkit-configs except 'no_gui' require x11 explicitly (see toolkit.cmake)
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', 'no_gui', d)} \
- ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)} \
+# OpenGL support currently seems tied to using libglu, which requires x11
+PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', 'x11 wayland', 'gtk', 'no_gui', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \

PACKAGECONFIG:remove:class-native = "opengl"

Join to automatically receive all group messages.