Patchwork [04/10] gtk.inc: add feature based on directfb

login
register
mail settings
Submitter Xiaofeng Yan
Date Dec. 7, 2011, 8:58 a.m.
Message ID <7ceb01f6db6edfad6c78c5a7ebc685c23bb11358.1323246565.git.xiaofeng.yan@windriver.com>
Download mbox | patch
Permalink /patch/16359/
State New
Headers show

Comments

Xiaofeng Yan - Dec. 7, 2011, 8:58 a.m.
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

gtk run over x11 at current OE-core. If gtk want to run over directfb, then \
the configuration related to x11 should be disabled and directfb should be enabled.

[YOCTO #1674]

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-gnome/gtk+/gtk+.inc |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
Koen Kooi - Dec. 7, 2011, 9:04 a.m.
Op 7 dec. 2011, om 09:58 heeft Xiaofeng Yan het volgende geschreven:

> From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> 
> gtk run over x11 at current OE-core. If gtk want to run over directfb, then \
> the configuration related to x11 should be disabled and directfb should be enabled.

So what happens when I put both directfb and x11 in DISTRO_FEATURES?

Patch

diff --git a/meta/recipes-gnome/gtk+/gtk+.inc b/meta/recipes-gnome/gtk+/gtk+.inc
index 1d8f4a6..0319916 100644
--- a/meta/recipes-gnome/gtk+/gtk+.inc
+++ b/meta/recipes-gnome/gtk+/gtk+.inc
@@ -9,9 +9,16 @@  LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
 
 SECTION = "libs"
-DEPENDS = "glib-2.0 pango atk jpeg libpng libxext libxcursor \
-           gtk-doc-native docbook-utils-native libxrandr libgcrypt \
-           libxdamage libxrender libxcomposite cairo gdk-pixbuf"
+
+X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
+DEPENDS = "glib-2.0 pango atk jpeg libpng gtk-doc-native gdk-pixbuf-native docbook-utils-native \
+ libgcrypt cairo gdk-pixbuf"
+
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
+
+PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
+PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb"
 
 inherit autotools pkgconfig