librsvg: relax dependency on Gtk, add gdk-pixbuf dependency
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 28 Dec 2012 15:37:36 +0000 (16:37 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 30 Dec 2012 06:21:58 +0000 (07:21 +0100)
librsvg doesn't *require* Gtk, it can optionally build a Gtk theme
engine, but it is not mandatory. Therefore, we make the Gtk dependency
an optional dependency rather than a hard dependency. This will be
useful as librsvg will become a dependency of libevas-generic-loaders,
used in an EFL context in which building libgtk is not really what we
want.

However, gdk-pixbuf is a mandatory dependency to build librsvg, so we
add this one.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/librsvg/Config.in
package/librsvg/librsvg.mk

index fdb7d3109e6b1ea9de7ea117baddb1144cb2cd9c..855b3d643927978e0d2b97074b1c14546c4810fd 100644 (file)
@@ -5,7 +5,7 @@ config BR2_PACKAGE_LIBRSVG
        select BR2_PACKAGE_CAIRO_PNG
        select BR2_PACKAGE_PANGO
        select BR2_PACKAGE_LIBGLIB2
-       depends on BR2_PACKAGE_LIBGTK2
+       select BR2_PACKAGE_GDK_PIXBUF
        depends on BR2_USE_WCHAR # glib2
        help
          The rsvg library is an efficient renderer for Scalable
index e54c06c3732e13961e72cbafcb3df0a6c34b4c1b..745fcfa4575e13d1131ce7a94f52101241f78b4d 100644 (file)
@@ -11,6 +11,12 @@ LIBRSVG_SOURCE:=librsvg-$(LIBRSVG_VERSION).tar.gz
 LIBRSVG_SITE:=http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(LIBRSVG_VERSION_MAJOR)/
 LIBRSVG_INSTALL_STAGING = YES
 LIBRSVG_CONF_OPT = --disable-tools
-LIBRSVG_DEPENDENCIES = libxml2 cairo pango libglib2 libgtk2
+LIBRSVG_DEPENDENCIES = libxml2 cairo pango libglib2 gdk-pixbuf
+
+# If we have Gtk2, let's build it first to benefit from librsvg Gtk
+# support.
+ifeq ($(BR2_PACKAGE_LIBGTK2),y)
+LIBRSVG_DEPENDENCIES += libgtk2
+endif
 
 $(eval $(autotools-package))