Patchwork [3/7] cairo: Fix bug 1674

login
register
mail settings
Submitter Xiaofeng Yan
Date Nov. 8, 2011, 11:15 a.m.
Message ID <a3bc0652da3fe9a2e90444030b4a364871c47549.1320750179.git.xiaofeng.yan@windriver.com>
Download mbox | patch
Permalink /patch/14495/
State New
Headers show

Comments

Xiaofeng Yan - Nov. 8, 2011, 11:15 a.m.
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

[YOCTO #1674]
Image "gtk+ over directfb" doesn't need "x11".
cairo should be compiled without x11 when compiling an image based on directfb.

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-graphics/cairo/cairo.inc |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
Phil Blundell - Nov. 8, 2011, 11:52 a.m.
On Tue, 2011-11-08 at 19:15 +0800, Xiaofeng Yan wrote:
>  #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points 
>  require cairo-fpu.inc
> +CONF_directfb="--with-x=no --enable-xcb=no --enable-directfb=yes"
> +CONF_xorg="--with-x=yes --enable-xcb=no --enable-directfb=no"
> +
>  EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)} ${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
> +EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'directfb', '${CONF_directfb}', '${CONF_xorg}', d)}"

I don't think this can be correct.  That will force X11 on for anybody
who isn't using DirectFB, right?  I think you need to preserve the
previous semantics for building without X.

p.

Patch

diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
index 876acad..d1fc48c 100644
--- a/meta/recipes-graphics/cairo/cairo.inc
+++ b/meta/recipes-graphics/cairo/cairo.inc
@@ -11,13 +11,18 @@  BUGTRACKER = "http://bugs.freedesktop.org"
 SECTION = "libs"
 LICENSE = "MPL-1 & LGPLv2.1"
 X11DEPENDS = "virtual/libx11 libsm libxrender"
-DEPENDS = "libpng fontconfig pixman glib-2.0 ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
+DIRECTFBDEPENDS = "directfb"
+DEPENDS = "libpng fontconfig pixman glib-2.0 ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} ${@base_contains('DISTRO_FEATURES', 'directfb', '${DIRECTFBDEPENDS}', '', d)}"
 
 #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points 
 require cairo-fpu.inc
+CONF_directfb="--with-x=no --enable-xcb=no --enable-directfb=yes"
+CONF_xorg="--with-x=yes --enable-xcb=no --enable-directfb=no"
+
 EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)} ${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'directfb', '${CONF_directfb}', '${CONF_xorg}', d)}"
 
 inherit autotools pkgconfig
 
 # We don't depend on binutils so we need to disable this
-export ac_cv_lib_bfd_bfd_openr=no
\ No newline at end of file
+export ac_cv_lib_bfd_bfd_openr=no