Patchwork [5/7] cogl: add Wayland support

login
register
mail settings
Submitter Ross Burton
Date June 20, 2013, 4:08 p.m.
Message ID <c8d59db6d047aa86dfdb322ef8180b49e5a3c8ff.1371744428.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/52155/
State Accepted
Commit 84ffd212f9ca083301d19b9c7a9720d05c733e5c
Headers show

Comments

Ross Burton - June 20, 2013, 4:08 p.m.
Add PACKAGECONFIG stanzas for Wayland client and server, and respect the x11 and
wayland DISTRO_FEATURES to enable the relevant backends as appropriate by
default.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-graphics/cogl/cogl-1.0.inc |   24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

Patch

diff --git a/meta/recipes-graphics/cogl/cogl-1.0.inc b/meta/recipes-graphics/cogl/cogl-1.0.inc
index c9c6165..55eb003 100644
--- a/meta/recipes-graphics/cogl/cogl-1.0.inc
+++ b/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -13,11 +13,12 @@  PACKAGES =+ "${PN}-examples"
 AUTOTOOLS_AUXDIR = "${S}/build"
 
 # Extra DEPENDS for PACKAGECONFIG
-EDEPENDS_GL    = "virtual/libgl libdrm"
+EDEPENDS_GL = "virtual/libgl libdrm"
 EDEPENDS_GLES2 = "virtual/libgles2"
-EDEPENDS_KMS   = "libdrm virtual/egl"
-EDEPENDS_EGL   = "virtual/egl"
-EDEPENDS_X11   = "virtual/libx11 libxcomposite libxfixes libxi libxrandr"
+EDEPENDS_KMS = "libdrm virtual/egl"
+EDEPENDS_EGL = "virtual/egl"
+EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr"
+EDEPENDS_WAYLAND = "wayland"
 
 # Extra RDEPENDS for PACKAGECONFIG
 # This has to be explictly listed, because cogl dlopens the backends
@@ -34,15 +35,22 @@  EXTRA_OECONF += "--disable-introspection	\
 PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,${EDEPENDS_GL},${ERDEPENDS_GL}"
 PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}"
 
-# egl backends
+# EGL backends
 PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}"
 PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform"
 PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11}"
+PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}"
 
-# glx
+# GLX
 PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11}"
 
-# Default to GLX
-PACKAGECONFIG ??= "gl glx"
+# Wayland server-side
+PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}"
+
+# Respect the DISTRO_FEATURES to pull in GLX or Wayland as appropriate by
+# default.
+PACKAGECONFIG ??= "gl \
+                   ${@base_contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \
+                   ${@base_contains('DISTRO_FEATURES', 'x11', 'glx', '', d)}"
 
 FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"