Skip to contentSkip to conversation

apitrace: Conditionally enable X11 support

PATCH New Marek Vasut 1 participant 1 message Oct 15, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 apitrace: Conditionally enable X11 support

In case DISTRO_FEATURES contain both x11 and opengl, enable X11 support in apitrace, because all the requirements are satisfied.

---
V2: Switch to PACKAGECONFIG and make x11 support configurable that way

---
 meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb +3 -1
index 57ec1f8e0..eb8e0318e 100644
@@ -16,9 +16,11 @@ DEPENDS += "zlib libpng python3-native"
 
 inherit cmake
 
+PACKAGECONFIG ??= " ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} "
+PACKAGECONFIG[x11] = "-DENABLE_X11=ON,-DENABLE_X11=OFF,libx11"
+
 EXTRA_OECMAKE += "\
     -DENABLE_GUI=OFF \
-    -DENABLE_X11=OFF \
     -DENABLE_STATIC_LIBGCC=OFF \
     -DENABLE_STATIC_LIBSTDCXX=OFF \
     -DPython3_ROOT_DIR=/usr/bin/python3-native \
Signature · 1 line
2.33.0