Skip to contentSkip to conversation

cairo: only use x11 if selected in DISTRO_FEATURES

PATCH Applied Phil Blundell 2 participants 2 messages Aug 12, 2011 – Aug 15, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cairo: only use x11 if selected in DISTRO_FEATURES

This makes it possible to build cairo-using apps without X11.

---
 meta/recipes-graphics/cairo/cairo.inc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
meta/recipes-graphics/cairo/cairo.inc +3 -2
index 72aaa03..c983a89 100644
@@ -10,10 +10,11 @@ HOMEPAGE = "http://cairographics.org"
 BUGTRACKER = "http://bugs.freedesktop.org"
 SECTION = "libs"
 LICENSE = "MPL-1 & LGPLv2.1"
-DEPENDS = "virtual/libx11 libsm libpng fontconfig libxrender pixman glib-2.0"
+X11DEPENDS = "virtual/libx11 libsm libxrender"
+DEPENDS = "libpng fontconfig pixman glib-2.0 ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
 
 #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points 
 require cairo-fpu.inc
-EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)}"
+EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)} ${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
 
 inherit autotools pkgconfig
Signature · 1 line
1.7.4.1
Applied
#1 lore raw
Quoted 15 lines · Phil Blundell

This makes it possible to build cairo-using apps without X11.

---
  meta/recipes-graphics/cairo/cairo.inc |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
meta/recipes-graphics/cairo/cairo.inc +0 -0
index 72aaa03..c983a89 100644
@@ -10,10 +10,11 @@ HOMEPAGE = "http://cairographics.org"
  BUGTRACKER = "http://bugs.freedesktop.org"
  SECTION = "libs"
  LICENSE = "MPL-1&  LGPLv2.1"

meta/recipes-graphics/cairo/cairo.inc HOMEPAGE = "http://cairographics.org" · line 20

Quoted 10 lines
meta/recipes-graphics/cairo/cairo.inc +3 -2
-DEPENDS = "virtual/libx11 libsm libpng fontconfig libxrender pixman glib-2.0"
+X11DEPENDS = "virtual/libx11 libsm libxrender"
+DEPENDS = "libpng fontconfig pixman glib-2.0 ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
 
  #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
  require cairo-fpu.inc
-EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)}"
+EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)} ${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
 
  inherit autotools pkgconfig

Merged into OE Core

Thanks
Sau!