libgtk2: add option to install the gtk-demo program
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 18 May 2011 10:00:16 +0000 (12:00 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 18 May 2011 16:22:42 +0000 (18:22 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libgtk2/Config.in
package/libgtk2/libgtk2.mk

index 38b0b47e0d365110db21c89c327f3a9cbdfc5142..efaf12f334cc649fbd3762c4206e65020efc9e1c 100644 (file)
@@ -16,5 +16,12 @@ config BR2_PACKAGE_LIBGTK2
 
          http://www.gtk.org/
 
+config BR2_PACKAGE_LIBGTK2_DEMO
+       bool "Install libgtk2 demo program"
+       depends on BR2_PACKAGE_LIBGTK2
+       help
+         The GTK+ source base contains a gtk-demo program. This
+         option allows to install this program to the target.
+
 comment "libgtk2 requires a toolchain with WCHAR and C++ support"
        depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP
index 3586c86b216d83371fd7b01890b2756940df5d65..169ef9745398da0216ef7dc413b279b7154ecd1c 100644 (file)
@@ -114,11 +114,13 @@ else
 LIBGTK2_CONF_OPT += --disable-cups
 endif
 
+ifeq ($(BR2_PACKAGE_LIBGTK2_DEMO),)
 define LIBGTK2_POST_INSTALL_TWEAKS
        rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo
 endef
 
 LIBGTK2_POST_INSTALL_TARGET_HOOKS += LIBGTK2_POST_INSTALL_TWEAKS
+endif
 
 # We do not build a full version of libgtk2 for the host, because that
 # requires compiling Cairo, Pango, ATK and X.org for the