libgtk: don't list cups/png/jpeg/tiff as hard dependencies
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 26 Dec 2008 15:36:12 +0000 (15:36 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 26 Dec 2008 15:36:12 +0000 (15:36 -0000)
GTK can be compiled without the above, so don't list them as hard
dependencies, and simply adjust the build depending on what the user
has enabled.

package/libgtk2/Config.in
package/libgtk2/libgtk2.mk

index 6871aef206507c196fefca376043f74598e9cac3..9dcf5d53a7e47c1c00184497f9c0d47109c307e8 100644 (file)
@@ -2,13 +2,9 @@ config BR2_PACKAGE_LIBGTK2
        bool "libgtk2"
        select BR2_PACKAGE_ATK
        select BR2_PACKAGE_CAIRO
-       select BR2_PACKAGE_CUPS if BR2_PACKAGE_XORG||BR2_PACKAGE_XORG7||BR2_PACKAGE_TINYX
-       select BR2_PACKAGE_JPEG
        select BR2_PACKAGE_LIBGLIB2
-       select BR2_PACKAGE_LIBPNG
        select BR2_PACKAGE_PANGO
        select BR2_PACKAGE_PKGCONFIG
-       select BR2_PACKAGE_TIFF
        depends on BR2_PACKAGE_XORG||BR2_PACKAGE_XORG7||BR2_PACKAGE_TINYX||BR2_PACKAGE_DIRECTFB
        help
          The GTK+ version 2 graphical user interface library
index a521a687d62986c5d6ac6aaac7a89906bfab7ee1..38926455f4f4ca70059c43103d59a91b6eaeccc8 100644 (file)
@@ -79,10 +79,11 @@ LIBGTK2_CONF_OPT = --enable-shared \
                $(LIBGTK2_CONF_OPT_X)  \
                $(LIBGTK2_CONF_OPT_DFB)
 
+LIBGTK2_DEPENDENCIES = pkgconfig libglib2 cairo pango atk
 
 ifeq ($(BR2_PACKAGE_DIRECTFB),y)
        LIBGTK2_CONF_OPT += --with-gdktarget=directfb
-       LIBGTK2_DEPENDENCIES_EXTRA = directfb
+       LIBGTK2_DEPENDENCIES += directfb
 endif
 
 ifneq ($(BR2_PACKAGE_XSERVER_none),y)
@@ -91,11 +92,34 @@ ifneq ($(BR2_PACKAGE_XSERVER_none),y)
                --x-includes=$(STAGING_DIR)/usr/include/X11 \
                --x-libraries=$(STAGING_DIR)/usr/lib \
                --with-gdktarget=x11
-       LIBGTK2_DEPENDENCIES_EXTRA = xlib_libXcomposite $(XSERVER) cups
+       LIBGTK2_DEPENDENCIES += xlib_libXcomposite $(XSERVER)
 else
        LIBGTK2_CONF_OPT += --without-x
 endif
 
-LIBGTK2_DEPENDENCIES = uclibc pkgconfig libpng jpeg tiff $(LIBGTK2_DEPENDENCIES_EXTRA) libglib2 cairo pango atk
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+LIBGTK2_DEPENDENCIES += libpng
+else
+LIBGTK2_CONF_OPT += --without-libpng
+endif
+
+ifeq ($(BR2_PACKAGE_JPEG),y)
+LIBGTK2_DEPENDENCIES += jpeg
+else
+LIBGTK2_CONF_OPT += --without-libjpeg
+endif
+
+ifeq ($(BR2_PACKAGE_TIFF),y)
+LIBGTK2_DEPENDENCIES += tiff
+else
+LIBGTK2_CONF_OPT += --without-libtiff
+endif
+
+ifeq ($(BR2_PACKAGE_CUPS),y)
+LIBGTK2_DEPENDENCIES += cups
+else
+LIBGTK2_CONF_OPT += --disable-cups
+endif
 
 $(eval $(call AUTOTARGETS,package,libgtk2))