Patchwork [meta-fsl-arm,RFC,3/4] amd-gpu-x11-bin-mx51: only enable when x11 is in DISTRO_FEATURES

login
register
mail settings
Submitter Eric BENARD
Date May 28, 2013, 12:02 a.m.
Message ID <1369699372-1398-3-git-send-email-eric@eukrea.com>
Download mbox | patch
Permalink /patch/50595/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Eric BENARD - May 28, 2013, 12:02 a.m.
this prevent warnings and parse errors

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 .../amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb             |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Otavio Salvador - May 28, 2013, 2:30 p.m.
On Mon, May 27, 2013 at 9:02 PM, Eric Bénard <eric@eukrea.com> wrote:

> this prevent warnings and parse errors
>
> Signed-off-by: Eric Bénard <eric@eukrea.com>
>

 -COMPATIBLE_MACHINE = "(mx5)"
+COMPATIBLE_MACHINE = "{@base_contains('DISTRO_FEATURES', 'x11', (mx5), '',
d)}"

Something like:

python __anonymous () {


    distro_features = d.getVar('DISTRO_FEATURES', True).split()


    if 'x11' not in distro_features:


        raise bb.parse.SkipPackage('missing required "x11" distro feature')


}



could be used so I think you don't need to handle distro feature twice
(compat machine and depends).
Eric BENARD - May 28, 2013, 2:34 p.m.
Le Tue, 28 May 2013 11:30:59 -0300,
Otavio Salvador <otavio@ossystems.com.br> a écrit :

> On Mon, May 27, 2013 at 9:02 PM, Eric Bénard <eric@eukrea.com> wrote:
> 
> > this prevent warnings and parse errors
> >
> > Signed-off-by: Eric Bénard <eric@eukrea.com>
> >
> 
>  -COMPATIBLE_MACHINE = "(mx5)"
> +COMPATIBLE_MACHINE = "{@base_contains('DISTRO_FEATURES', 'x11', (mx5), '',
> d)}"
> 
> Something like:
> 
> python __anonymous () {
> 
> 
>     distro_features = d.getVar('DISTRO_FEATURES', True).split()
> 
> 
>     if 'x11' not in distro_features:
> 
> 
>         raise bb.parse.SkipPackage('missing required "x11" distro feature')
> 
> 
> }
> 
> 
> 
> could be used so I think you don't need to handle distro feature twice
> (compat machine and depends).
> 
will try, in fact I think only COMPATIBLE_MACHINE is needed.

Eric

Patch

diff --git a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
index 2dee47a..e50d691 100644
--- a/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
+++ b/recipes-graphics/amd-gpu-x11-bin/amd-gpu-x11-bin-mx51_11.09.01.bb
@@ -6,9 +6,11 @@  LICENSE = "Proprietary"
 SECTION = "libs"
 PR = "r12"
 
+RCONFLICTS_${PN} = "amd-gpu-bin-mx51"
+
 # FIXME: Replace for correct AMD license
 LIC_FILES_CHKSUM = "file://usr/include/VG/openvg.h;endline=30;md5=b0109611dd76961057d4c45ae6519802"
-DEPENDS = "virtual/libx11 libxrender"
+DEPENDS = "${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender', '', d)}"
 
 PROVIDES = "virtual/egl virtual/libgles1 virtual/libgles2"
 
@@ -84,5 +86,5 @@  FILES_lib2dz160-mx51-dbg = "${libdir}/.debug/lib2dz160${SOLIBS}"
 FILES_lib2dz430-mx51 = "${libdir}/lib2dz430${SOLIBS}"
 FILES_lib2dz430-mx51-dbg = "${libdir}/.debug/lib2dz430${SOLIBS}"
 
-COMPATIBLE_MACHINE = "(mx5)"
+COMPATIBLE_MACHINE = "{@base_contains('DISTRO_FEATURES', 'x11', (mx5), '', d)}"
 PACKAGE_ARCH = "${MACHINE_ARCH}"