Patchwork mesa-demos: Use PACKAGECONFIG to enable/disable features

login
register
mail settings
Submitter Otavio Salvador
Date May 2, 2013, 3:28 p.m.
Message ID <1367508484-19933-1-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/49259/
State Accepted
Commit 140ba6247905094a0288d816b5085b6564c884c4
Headers show

Comments

Otavio Salvador - May 2, 2013, 3:28 p.m.
This allow selection of following features:

 drm, egl, freetype2, gbm, gles1, gles2, glut, osmesa, vg, wayland, x11

The x11 features is enabled depending on distro features but the
wayland has not been enabled as it does not work with Wayland
1.0. Rest were enabled for a sane default.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
Ross Burton - May 2, 2013, 3:34 p.m.
On 2 May 2013 16:28, Otavio Salvador <otavio@ossystems.com.br> wrote:
> This allow selection of following features:
>
>  drm, egl, freetype2, gbm, gles1, gles2, glut, osmesa, vg, wayland, x11
>
> The x11 features is enabled depending on distro features but the
> wayland has not been enabled as it does not work with Wayland
> 1.0. Rest were enabled for a sane default.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

Otavio sent me this patch earlier in the week and I worked with him on
this, and tested on atom-pc, so:

Signed-off-by: Ross Burton <ross.burton@intel.com>.

Ross

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
index 055f73d..3ac81ef 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
@@ -9,7 +9,7 @@  LICENSE = "MIT & PD"
 LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
                     file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
 
-DEPENDS = "virtual/libx11 virtual/libgl glew"
+DEPENDS = "virtual/libgl glew"
 
 SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
         file://glut.patch \
@@ -21,4 +21,20 @@  SRC_URI[sha256sum] = "9703fa0646b32a1e68d2abf5628f936f77bf97c69ffcaac90de380820a
 
 inherit autotools pkgconfig
 
-EXTRA_OECONF = "--without-glut"
+PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
+                  ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+
+# The Wayland code doesn't work with Wayland 1.0, so disable it for now
+#${@base_contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
+
+PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm"
+PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
+PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype"
+PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
+PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
+PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
+PACKAGECONFIG[glut] = "--with-glut,--without-glut,"
+PACKAGECONFIG[osmesa] = "--enable-libosmesa,--disable-libosmesa,"
+PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libvg"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
+PACKAGECONFIG[x11] = "--enable-libx11,--disable-libx11,virtual/libx11"