summaryrefslogtreecommitdiff
path: root/package/libgtk2/libgtk2.mk
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-02-21 13:11:00 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-02-23 20:33:44 +0100
commitce1f459b8bb0654a717124a1284b7204616ca199 (patch)
tree5f42ad7d57ddf7b020acc0d12d7a179d32151a08 /package/libgtk2/libgtk2.mk
parenta47ce9d3df148cbfbd38355c80624fb5abc78a77 (diff)
libgtk2: break the dependency of host-libgtk2 on host-cairo
Making a full build of libgtk2 for the host is a pain, since it requires host-cairo, which it turns requires a full X.org stack to be compiled for the host. Moreover, building libgtk2 for the host completely is useless: we only need gdk-pixbuf-csource and gtk-update-icon-cache. In this patch, we add a new host-libgtk2-2.12.12-reduce-dependencies.patch, that is only applied to libgtk2 when being built for the host. This patch removes a lot of dependencies in configure.in, which allows to: * run make and make install in gdk-pixbuf/, which compiles and installs the gdk-pixbuf library and the gdk-pixbuf-csource utility * run make gtk-update-icon-cache in gtk/, which compiles the gtk-update-icon-cache utility, which is then installed manually The compilation and installation steps of libgtk2 for the host are therefore overriden, so as to not use the default behaviour, which would attempt to build the full gtk library. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/libgtk2/libgtk2.mk')
-rw-r--r--package/libgtk2/libgtk2.mk29
1 files changed, 26 insertions, 3 deletions
diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk
index 626b2da3f..cc62c73ca 100644
--- a/package/libgtk2/libgtk2.mk
+++ b/package/libgtk2/libgtk2.mk
@@ -119,17 +119,40 @@ else
LIBGTK2_CONF_OPT += --disable-cups
endif
-HOST_LIBGTK2_DEPENDENCIES = host-cairo host-libglib2 host-pango host-atk
+# We do not build a full version of libgtk2 for the host, because that
+# requires compiling Cairo, Pango, ATK and X.org for the
+# host. Therefore, we patch it to remove dependencies, and we hack the
+# build to only build gdk-pixbuf-from-source and
+# gtk-update-icon-cache, which are the host tools needed to build Gtk
+# for the target.
+
+HOST_LIBGTK2_DEPENDENCIES = host-libglib2
+HOST_LIBGTK2_AUTORECONF = YES
HOST_LIBGTK2_CONF_OPT = \
--disable-static \
--disable-glibtest \
--without-libtiff \
--without-libjpeg \
- --with-x \
- --with-gdktarget=x11 \
+ --with-gdktarget=none \
--disable-cups \
--disable-debug
+define HOST_LIBGTK2_PATCH_REDUCE_DEPENDENCIES_HOOK
+ toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) host-*.patch
+endef
+
+HOST_LIBGTK2_POST_PATCH_HOOKS += HOST_LIBGTK2_PATCH_REDUCE_DEPENDENCIES_HOOK
+
+define HOST_LIBGTK2_BUILD_CMDS
+ $(HOST_MAKE_ENV) make -C $(@D)/gdk-pixbuf
+ $(HOST_MAKE_ENV) make -C $(@D)/gtk gtk-update-icon-cache
+endef
+
+define HOST_LIBGTK2_INSTALL_CMDS
+ $(HOST_MAKE_ENV) make -C $(@D)/gdk-pixbuf install
+ cp $(@D)/gtk/gtk-update-icon-cache $(HOST_DIR)/usr/bin
+endef
+
$(eval $(call AUTOTARGETS,package,libgtk2))
$(eval $(call AUTOTARGETS,package,libgtk2,host))