Skip to contentSkip to conversation

mesa: add PACKAGECONFIG_DISTRO variable for distro specific options

PATCH In review Simon Busch 3 participants 5 messages Aug 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mesa: add PACKAGECONFIG_DISTRO variable for distro specific options

In some cases as distribution just wants to extend the default PACKAGECONFIG instead of rewriting it completely. Therefor having a PACKAGECONFIG_DISTRO variable which is empty by default and included in PACKAGECONFIG helps a lot.

---
 meta/recipes-graphics/mesa/mesa.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-graphics/mesa/mesa.inc +2 -0
index 447e186..2875158 100644
@@ -23,9 +23,11 @@ inherit autotools pkgconfig pythonnative gettext
 
 EXTRA_OECONF = "--enable-shared-glapi"
 
+PACKAGECONFIG_DISTRO ??= ""
 PACKAGECONFIG ??= "egl gles dri \
 		${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\
 		${@base_contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\
+		${PACKAGECONFIG_DISTRO} \
 		"
 
 X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes"
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 3 lines · Simon Busch

In some cases as distribution just wants to extend the default PACKAGECONFIG instead of rewriting it completely. Therefor having a PACKAGECONFIG_DISTRO variable which is empty by default and included in PACKAGECONFIG helps a lot.

Can't those distros just use PACKAGECONFIG_append?

p.

#2 lore raw

Am 19.08.2013 18:09, schrieb Phil Blundell:

Quoted 6 lines · Simon Busch
Quoted 3 lines

In some cases as distribution just wants to extend the default PACKAGECONFIG instead of rewriting it completely. Therefor having a PACKAGECONFIG_DISTRO variable which is empty by default and included in PACKAGECONFIG helps a lot.

Can't those distros just use PACKAGECONFIG_append?

They can. I tried with PACKAGECONFIG += which didn't worked and I thought it would be the same with PACKAGECONFIG_append cause of PACKAGECONFIG being weak assignment in mesa.inc. But as it seems += takes higher than the weak assignment and overrides PACKAGECONFIG where _append only appends.

regards,
Simon

Signature · 1 line
Simon Busch - http://mm.gravedo.de/blog/
#3 lore raw
Quoted 7 lines · On Monday 19 August 2013 18:28:02 Simon Busch wrote:

Am 19.08.2013 18:09, schrieb Phil Blundell:

Quoted 6 lines · Simon Busch
Quoted 4 lines

In some cases as distribution just wants to extend the default PACKAGECONFIG instead of rewriting it completely. Therefor having a PACKAGECONFIG_DISTRO variable which is empty by default and included in PACKAGECONFIG helps a lot.

Quoted 7 lines
Quoted 1 line

Can't those distros just use PACKAGECONFIG_append?

They can. I tried with PACKAGECONFIG += which didn't worked and I thought it would be the same with PACKAGECONFIG_append cause of PACKAGECONFIG being weak assignment in mesa.inc. But as it seems += takes higher than the weak assignment and overrides PACKAGECONFIG where _append only appends.

It's being set in the recipe with ??= which is the weakest form of assignment, so this behaviour is expected. I just tested this in local.conf and it works:

PACKAGECONFIG_append_pn-mesa = " something"

BTW, outside of a recipe (or bbappend) you should always use a pn- override with PACKAGECONFIG or you'll be affecting more than just the recipe you intend to.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw

Am 19.08.2013 18:58, schrieb Paul Eggleton:

Quoted 16 lines · On Monday 19 August 2013 18:28:02 Simon Busch wrote:
Quoted 7 lines

Am 19.08.2013 18:09, schrieb Phil Blundell:

Quoted 6 lines · Simon Busch
Quoted 4 lines

In some cases as distribution just wants to extend the default PACKAGECONFIG instead of rewriting it completely. Therefor having a PACKAGECONFIG_DISTRO variable which is empty by default and included in PACKAGECONFIG helps a lot.

Quoted 7 lines
Quoted 1 line

Can't those distros just use PACKAGECONFIG_append?

They can. I tried with PACKAGECONFIG += which didn't worked and I thought it would be the same with PACKAGECONFIG_append cause of PACKAGECONFIG being weak assignment in mesa.inc. But as it seems += takes higher than the weak assignment and overrides PACKAGECONFIG where _append only appends.

Quoted 8 lines

It's being set in the recipe with ??= which is the weakest form of assignment, so this behaviour is expected. I just tested this in local.conf and it works:

PACKAGECONFIG_append_pn-mesa = " something"

BTW, outside of a recipe (or bbappend) you should always use a pn- override with PACKAGECONFIG or you'll be affecting more than just the recipe you intend to.

Thank you very much for the good explanation.

regards,
Simon

Signature · 1 line
Simon Busch - http://mm.gravedo.de/blog/