All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [oe] [meta-oe][PATCH] apitrace: Conditionally enable X11 support
  2021-10-14 22:41 [meta-oe][PATCH] apitrace: Conditionally enable X11 support Marek Vasut
@ 2021-10-14 21:32 ` Martin Jansa
  2021-10-14 23:41   ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2021-10-14 21:32 UTC (permalink / raw)
  To: Marek Vasut; +Cc: openembedded-devel, Khem Raj

[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]

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).

On Fri, Oct 15, 2021 at 12:41 AM Marek Vasut <marex@denx.de> wrote:

> In case DISTRO_FEATURES contain both x11 and opengl, enable X11 support
> in apitrace, because all the requirements are satisfied.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Khem Raj <raj.khem@gmail.com>
> ---
>  meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
> b/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
> index 57ec1f8e0..f097f78a9 100644
> --- a/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
> +++ b/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
> @@ -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 \
> -    -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: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 3521 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [meta-oe][PATCH] apitrace: Conditionally enable X11 support
@ 2021-10-14 22:41 Marek Vasut
  2021-10-14 21:32 ` [oe] " Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2021-10-14 22:41 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Marek Vasut, Khem Raj

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

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb b/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
index 57ec1f8e0..f097f78a9 100644
--- a/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
+++ b/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
@@ -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 \
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [oe] [meta-oe][PATCH] apitrace: Conditionally enable X11 support
  2021-10-14 21:32 ` [oe] " Martin Jansa
@ 2021-10-14 23:41   ` Marek Vasut
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2021-10-14 23:41 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel, Khem Raj

On 10/14/21 11:32 PM, Martin Jansa wrote:
> 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).
> 
> On Fri, Oct 15, 2021 at 12:41 AM Marek Vasut <marex@denx.de> wrote:
> 
>> In case DISTRO_FEATURES contain both x11 and opengl, enable X11 support
>> in apitrace, because all the requirements are satisfied.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Khem Raj <raj.khem@gmail.com>
>> ---
>>   meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
>> b/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
>> index 57ec1f8e0..f097f78a9 100644
>> --- a/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
>> +++ b/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb
>> @@ -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 \
>> -    -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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-14 23:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 22:41 [meta-oe][PATCH] apitrace: Conditionally enable X11 support Marek Vasut
2021-10-14 21:32 ` [oe] " Martin Jansa
2021-10-14 23:41   ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.