directfb: allow SVG support
authorJérôme Pouiller <jezz@sysmic.org>
Fri, 12 Sep 2014 15:50:10 +0000 (17:50 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 13 Sep 2014 07:22:27 +0000 (09:22 +0200)
DirectFB SVG support rely on Cairo and Cairo depends on DirectFB.

Since Cairo DirectFB backend is marked as experimental, this patch choose to
disable this backend when DirectFB SVG support is enable.

In add, this patch may solve some tricky situations between DirectFB and Cairo
(see http://sysmic.org/~jezz/results/c2f11fc0) and improve build reproducibility.

[Peter: propagate atomics dependency, needs libsvg-cairo, add cairo includes]
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/cairo/cairo.mk
package/directfb/Config.in
package/directfb/directfb.mk

index a4c71b6816e06244844869a8684127eb93c2bd7f..bcc0c262fde84b3dd47188006734fb7eeadf42f1 100644 (file)
@@ -48,7 +48,10 @@ CAIRO_CONF_OPT = \
 
 CAIRO_DEPENDENCIES = host-pkgconf fontconfig pixman
 
-ifeq ($(BR2_PACKAGE_DIRECTFB),y)
+# DirectFB svg support rely on Cairo and Cairo DirectFB support depends on
+# DirectFB. Break circular dependency by disabling DirectFB support in Cairo
+# (which is experimental)
+ifeq ($(BR2_PACKAGE_DIRECTFB)x$(BR2_PACKAGE_DIRECTFB_SVG),yx)
        CAIRO_CONF_OPT += --enable-directfb
        CAIRO_DEPENDENCIES += directfb
 else
index e3c93a12ef1225bbc3609522ffe24a7265cb7f9c..d53f7567e17f585d995fe548ab838b57bf42bbf4 100644 (file)
@@ -125,6 +125,12 @@ config BR2_PACKAGE_DIRECTFB_PNG
        default y
        select BR2_PACKAGE_LIBPNG
 
+config BR2_PACKAGE_DIRECTFB_SVG
+       bool "enable SVG support"
+       depends on BR2_ARCH_HAS_ATOMICS # cairo
+       default y
+       select BR2_PACKAGE_LIBSVG_CAIRO
+
 config BR2_PACKAGE_DIRECTFB_DITHER_RGB16
        bool "enable advanced dithering of RGB16 surfaces"
        help
index 3ae7f3e9f2a71358c3167585190dc21a5556b666..32144ec2991e7824abb1a345fe0019d21775841f 100644 (file)
@@ -116,6 +116,15 @@ else
 DIRECTFB_CONF_OPT += --disable-jpeg
 endif
 
+ifeq ($(BR2_PACKAGE_DIRECTFB_SVG),y)
+DIRECTFB_CONF_OPT += --enable-svg
+# needs some help to find cairo includes
+DIRECTFB_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/cairo"
+DIRECTFB_DEPENDENCIES += libsvg-cairo
+else
+DIRECTFB_CONF_OPT += --disable-svg
+endif
+
 ifeq ($(BR2_PACKAGE_DIRECTFB_IMLIB2),y)
 DIRECTFB_CONF_OPT += --enable-imlib2
 DIRECTFB_DEPENDENCIES += imlib2