apitrace: Conditionally enable X11 support
PATCH 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.
--- meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb +2 -1
@@ -13,12 +13,13 @@ SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git \ S = "${WORKDIR}/git" DEPENDS += "zlib libpng python3-native" +DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'libx11', '', d)} " inherit cmake EXTRA_OECMAKE += "\ -DENABLE_GUI=OFF \ - -DENABLE_X11=OFF \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', '-DENABLE_X11=ON', '-DENABLE_X11=OFF', d)} \ -DENABLE_STATIC_LIBGCC=OFF \ -DENABLE_STATIC_LIBSTDCXX=OFF \ -DPython3_ROOT_DIR=/usr/bin/python3-native \
Signature · 1 line
2.33.0
Why not use PACKAGECONFIG for this? It won't set the EXTRA_OECMAKE automatically, but will handle the depends correctly (and will be easy to switch of if someone with x1 and opengl in DISTRO_FEATURES still doesn't wan to have X11 enabled here for whatever reason).
Quoted 47 lines · Marek Vasut
In case
DISTRO_FEATUREScontain both x11 and opengl, enable X11 support in apitrace, because all the requirements are satisfied.Signed-off-by Marek Vasut <[email protected]>Cc Khem Raj <[email protected]>--- meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb +1
-0@@ -13,12 +13,13 @@ SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git <http://github.com/$%7BBPN%7D/$%7BBPN%7D.git> \ S = "${WORKDIR}/git" DEPENDS += "zlib libpng python3-native" +DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl','libx11', '', d)} "
inherit cmake
EXTRA_OECMAKE += "\ -DENABLE_GUI=OFF \meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb +1
-1- -DENABLE_X11=OFF \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl','-DENABLE_X11=ON', '-DENABLE_X11=OFF', d)} \ -DENABLE_STATIC_LIBGCC=OFF \ -DENABLE_STATIC_LIBSTDCXX=OFF \ -DPython3_ROOT_DIR=/usr/bin/python3-native \--
2.33.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#93312):
https://lists.openembedded.org/g/openembedded-devel/message/93312
Mute This Topic: https://lists.openembedded.org/mt/86326776/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 31 lines · Martin Jansa
Why not use PACKAGECONFIG for this? It won't set the
EXTRA_OECMAKEautomatically, but will handle the depends correctly (and will be easy to switch of if someone with x1 and opengl inDISTRO_FEATURESstill doesn't wan to have X11 enabled here for whatever reason).Quoted 24 lines · Marek Vasut
In case
DISTRO_FEATUREScontain both x11 and opengl, enable X11 support in apitrace, because all the requirements are satisfied.Signed-off-by Marek Vasut <[email protected]>Cc Khem Raj <[email protected]>--- meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb +1
-0@@ -13,12 +13,13 @@ SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git <http://github.com/$%7BBPN%7D/$%7BBPN%7D.git> \ S = "${WORKDIR}/git" DEPENDS += "zlib libpng python3-native" +DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl','libx11', '', d)} "
inherit cmake
Quoted 10 lines
Quoted 10 lines
EXTRA_OECMAKE += "\ -DENABLE_GUI=OFF \meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb +1
-1- -DENABLE_X11=OFF \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl','-DENABLE_X11=ON', '-DENABLE_X11=OFF', d)} \ -DENABLE_STATIC_LIBGCC=OFF \ -DENABLE_STATIC_LIBSTDCXX=OFF \ -DPython3_ROOT_DIR=/usr/bin/python3-native \--
2.33.0
I would expect that someone who uses apitrace and enables x11 would also want that tracing functionality in by default, which can be handled by default packageconfig , sure. It felt like adding packageconfig with this x11 enabled by default in there (if DISTRO_FEATURES contain opengl and x11) would add extra complexity for little actual gain.