From: Quentin Schulz Date: Thu, 4 Sep 2025 14:03:38 +0000 (+0200) Subject: mesa: allow to disable xmlconfig support X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1fae868569cabfef6c2160c7a3cfe0c13421bbc;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git mesa: allow to disable xmlconfig support >From my understanding, xmlconfig is useful for "dynamic" driconf support, i.e. driconf the user specifies at runtime. According to the wiki[1], driconf is useful for OpenGL drivers. I wager we mostly don't need xmlconfig at all which may allow us to also get rid (in most cases) of the expat dependency. But that is an optimization to investigate later, so let's keep xmlconfig enabled for now as it is the default whenever the meson feature is not disabled (defaults to auto) and expat is found (currently part of DEPENDS in mesa.inc). This will be useful for mesa-tools-native which isn't meant to compile drivers and thus shouldn't try to compile driconf support and install driconf example files. Technically, xmlconfig depends on the expat meson feature (and the presence of the expat build dependency) but the feature is default auto so having expat dependency in xmlconfig PACKAGECONFIG seems enough instead of having one PACKAGECONFIG depend on another PACKAGECONFIG's presence. [1] https://dri.freedesktop.org/wiki/DriConf/ Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Signed-off-by: Quentin Schulz Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-graphics/mesa/mesa-gl.bb b/meta/recipes-graphics/mesa/mesa-gl.bb index 832137c8188..3b55d2b77e5 100644 --- a/meta/recipes-graphics/mesa/mesa-gl.bb +++ b/meta/recipes-graphics/mesa/mesa-gl.bb @@ -7,7 +7,7 @@ PROVIDES = "virtual/libgl virtual/mesa" TARGET_CFLAGS = "-I${STAGING_INCDIR}/drm" # At least one DRI rendering engine is required to build mesa. -PACKAGECONFIG = "opengl gallium ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG = "opengl gallium ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} xmlconfig" PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd nouveau svga" PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm intel amd nouveau svga" diff --git a/meta/recipes-graphics/mesa/mesa.bb b/meta/recipes-graphics/mesa/mesa.bb index db5eab5fb27..49e077b20cd 100644 --- a/meta/recipes-graphics/mesa/mesa.bb +++ b/meta/recipes-graphics/mesa/mesa.bb @@ -6,6 +6,7 @@ PACKAGECONFIG = " \ ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland glvnd', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \ + xmlconfig \ " PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd nouveau svga" diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 81b099bf6e5..4b1c11be55f 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -115,6 +115,7 @@ TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurse PACKAGECONFIG[freedreno-fdperf] = ",,libconfig" PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}" +PACKAGECONFIG[xmlconfig] = "-Dxmlconfig=enabled, -Dxmlconfig=disabled, expat" PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" PACKAGECONFIG[glvnd] = "-Dglvnd=enabled, -Dglvnd=disabled, libglvnd"