Patchwork [meta-oe,v2,2/3] cairo: conditionally enable x11 dependencies

login
register
mail settings
Submitter Anders Darander
Date Jan. 10, 2012, 9 a.m.
Message ID <3af96574c31be2c6ebe88463315712febfd621ef.1326185831.git.anders@chargestorm.se>
Download mbox | patch
Permalink /patch/18901/
State Superseded
Headers show

Comments

Anders Darander - Jan. 10, 2012, 9 a.m.
Take the same approach to conditionally enable x11 and x11-dependencies as used in oe-core.

Signed-off-by: Anders Darander <anders@chargestorm.se>
---
 meta-oe/recipes-graphics/cairo/cairo.inc         |    7 ++++++-
 meta-oe/recipes-graphics/cairo/cairo_1.10.2.bb   |    2 ++
 meta-oe/recipes-graphics/cairo/cairomm_1.10.0.bb |    2 ++
 3 files changed, 10 insertions(+), 1 deletions(-)

Patch

diff --git a/meta-oe/recipes-graphics/cairo/cairo.inc b/meta-oe/recipes-graphics/cairo/cairo.inc
index 6157004..bd38233 100644
--- a/meta-oe/recipes-graphics/cairo/cairo.inc
+++ b/meta-oe/recipes-graphics/cairo/cairo.inc
@@ -1,7 +1,12 @@ 
 SECTION = "libs"
-DEPENDS = "virtual/libx11 pixman libsm libpng fontconfig libxrender glib-2.0"
+X11DEPENDS = "virtual/libx11 libsm libxrender"
+DEPENDS = "pixman libpng fontconfig glib-2.0"
 DESCRIPTION = "Cairo graphics library"
 LICENSE = "MPL LGPL"
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+           ${@base_contains('DISTRO_FEATURES', 'gtk-directfb', 'directfb', '', d)}"
+PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}"
+PACKAGECONFIG[gtk-directfb] = "--enable-directfb=yes,,directfb"
 
 #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points 
 require cairo-fpu.inc
diff --git a/meta-oe/recipes-graphics/cairo/cairo_1.10.2.bb b/meta-oe/recipes-graphics/cairo/cairo_1.10.2.bb
index 9de75ed..e7b65af 100644
--- a/meta-oe/recipes-graphics/cairo/cairo_1.10.2.bb
+++ b/meta-oe/recipes-graphics/cairo/cairo_1.10.2.bb
@@ -2,6 +2,8 @@  require cairo.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
 
+PR = "r1"
+
 SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz;name=cairo \
 "
 SRC_URI[cairo.md5sum] = "f101a9e88b783337b20b2e26dfd26d5f"
diff --git a/meta-oe/recipes-graphics/cairo/cairomm_1.10.0.bb b/meta-oe/recipes-graphics/cairo/cairomm_1.10.0.bb
index e4fec3c..496a605 100644
--- a/meta-oe/recipes-graphics/cairo/cairomm_1.10.0.bb
+++ b/meta-oe/recipes-graphics/cairo/cairomm_1.10.0.bb
@@ -5,6 +5,8 @@  DESCRIPTION = "C++ bindings for Cairo graphics library"
 LICENSE = "LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9"
 
+PR = "r1"
+
 DEPENDS = "cairo libsigc++-2.0"
 
 SRC_URI = "http://cairographics.org/releases/cairomm-${PV}.tar.gz;name=archive"