[Buildroot] [PATCH 3/3] cairo: use CONF_ENABLE and CONF_PKG_ENABLE

Arnout Vandecappelle (Essensium/Mind) arnout at mind.be
Sat Apr 28 21:16:21 UTC 2012


From: "Arnout Vandecappelle (Essensium/Mind)" <arnout at mind.be>

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
---
 package/cairo/cairo.mk |   44 ++++++--------------------------------------
 1 file changed, 6 insertions(+), 38 deletions(-)

diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
index 55068dd..5486372 100644
--- a/package/cairo/cairo.mk
+++ b/package/cairo/cairo.mk
@@ -36,45 +36,13 @@ CAIRO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
 
 CAIRO_DEPENDENCIES = host-pkg-config fontconfig pixman
 
-ifeq ($(BR2_PACKAGE_DIRECTFB),y)
-	CAIRO_CONF_OPT += --enable-directfb
-	CAIRO_DEPENDENCIES += directfb
-else
-	CAIRO_CONF_OPT += --disable-directfb
-endif
+$(eval $(call CONF_PKG_ENABLE,CAIRO,directfb))
 
-ifeq ($(BR2_PACKAGE_XORG7),y)
-	CAIRO_CONF_OPT += --enable-xlib --with-x
-	CAIRO_DEPENDENCIES += xserver_xorg-server
-else
-	CAIRO_CONF_OPT += --disable-xlib --without-x
-endif
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_XORG7),xserver_xorg-server,--enable-xlib --with-x,--disable-xlib --without-x))
 
-ifeq ($(BR2_PACKAGE_CAIRO_PS),y)
-	CAIRO_CONF_OPT += --enable-ps
-	CAIRO_DEPENDENCIES += zlib
-else
-	CAIRO_CONF_OPT += --disable-ps
-endif
-
-ifeq ($(BR2_PACKAGE_CAIRO_PDF),y)
-	CAIRO_CONF_OPT += --enable-pdf
-	CAIRO_DEPENDENCIES += zlib
-else
-	CAIRO_CONF_OPT += --disable-pdf
-endif
-
-ifeq ($(BR2_PACKAGE_CAIRO_PNG),y)
-	CAIRO_CONF_OPT += --enable-png
-	CAIRO_DEPENDENCIES += libpng
-else
-	CAIRO_CONF_OPT += --disable-png
-endif
-
-ifeq ($(BR2_PACKAGE_CAIRO_SVG),y)
-	CAIRO_CONF_OPT += --enable-svg
-else
-	CAIRO_CONF_OPT += --disable-svg
-endif
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_CAIRO_PS),zlib,ps))
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_CAIRO_PDF),zlib,pdf))
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_CAIRO_PNG),libpng,png))
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_CAIRO_SVG),,svg))
 
 $(eval $(call AUTOTARGETS))
-- 
1.7.10



More information about the buildroot mailing list