python-pyasn: bump to version 1.6.0b1
[buildroot-gz.git] / package / libgtk2 / libgtk2.mk
blobcf8b2f4eeecc1458d3624aae3c18c470f7f08019
1 ################################################################################
3 # libgtk2
5 ################################################################################
7 LIBGTK2_VERSION_MAJOR = 2.24
8 LIBGTK2_VERSION = $(LIBGTK2_VERSION_MAJOR).31
9 LIBGTK2_SOURCE = gtk+-$(LIBGTK2_VERSION).tar.xz
10 LIBGTK2_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk+/$(LIBGTK2_VERSION_MAJOR)
11 LIBGTK2_INSTALL_STAGING = YES
12 LIBGTK2_LICENSE = LGPLv2+
13 LIBGTK2_LICENSE_FILES = COPYING
14 # For 0001-reduce-dependencies.patch
15 LIBGTK2_AUTORECONF = YES
17 LIBGTK2_CONF_ENV = \
18 ac_cv_path_GTK_UPDATE_ICON_CACHE=$(HOST_DIR)/usr/bin/gtk-update-icon-cache \
19 ac_cv_path_GDK_PIXBUF_CSOURCE=$(HOST_DIR)/usr/bin/gdk-pixbuf-csource \
20 DB2HTML=false
22 LIBGTK2_CONF_OPTS = --disable-glibtest --enable-explicit-deps=no
24 LIBGTK2_DEPENDENCIES = host-pkgconf host-libgtk2 libglib2 cairo pango atk gdk-pixbuf
26 # Xorg dependencies
27 LIBGTK2_CONF_OPTS += \
28 --with-x \
29 --x-includes=$(STAGING_DIR)/usr/include/X11 \
30 --x-libraries=$(STAGING_DIR)/usr/lib \
31 --with-gdktarget=x11
32 LIBGTK2_DEPENDENCIES += \
33 fontconfig xlib_libX11 xlib_libXext xlib_libXrender
35 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
36 LIBGTK2_CONF_OPTS += --enable-xinerama
37 LIBGTK2_DEPENDENCIES += xlib_libXinerama
38 else
39 LIBGTK2_CONF_OPTS += --disable-xinerama
40 endif
42 ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
43 LIBGTK2_CONF_OPTS += --with-xinput=yes
44 LIBGTK2_DEPENDENCIES += xlib_libXi
45 else
46 LIBGTK2_CONF_OPTS += --with-xinput=no
47 endif
49 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
50 LIBGTK2_DEPENDENCIES += xlib_libXrandr
51 endif
53 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
54 LIBGTK2_DEPENDENCIES += xlib_libXcursor
55 endif
57 ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y)
58 LIBGTK2_DEPENDENCIES += xlib_libXfixes
59 endif
61 ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
62 LIBGTK2_DEPENDENCIES += xlib_libXcomposite
63 endif
65 ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y)
66 LIBGTK2_DEPENDENCIES += xlib_libXdamage
67 endif
69 ifeq ($(BR2_PACKAGE_LIBPNG),y)
70 LIBGTK2_DEPENDENCIES += libpng
71 else
72 LIBGTK2_CONF_OPTS += --without-libpng
73 endif
75 ifeq ($(BR2_PACKAGE_JPEG),y)
76 LIBGTK2_DEPENDENCIES += jpeg
77 else
78 LIBGTK2_CONF_OPTS += --without-libjpeg
79 endif
81 ifeq ($(BR2_PACKAGE_TIFF),y)
82 LIBGTK2_DEPENDENCIES += tiff
83 else
84 LIBGTK2_CONF_OPTS += --without-libtiff
85 endif
87 ifeq ($(BR2_PACKAGE_CUPS),y)
88 LIBGTK2_CONF_OPTS += CUPS_CONFIG="$(STAGING_DIR)/usr/bin/cups-config"
89 LIBGTK2_DEPENDENCIES += cups
90 else
91 LIBGTK2_CONF_OPTS += --disable-cups
92 endif
94 ifeq ($(BR2_PACKAGE_LIBGTK2_DEMO),)
95 define LIBGTK2_POST_INSTALL_TWEAKS
96 rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo
97 endef
99 LIBGTK2_POST_INSTALL_TARGET_HOOKS += LIBGTK2_POST_INSTALL_TWEAKS
100 endif
102 # We do not build a full version of libgtk2 for the host, because that
103 # requires compiling Cairo, Pango, ATK and X.org for the
104 # host. Therefore, we patch it to remove dependencies, and we hack the
105 # build to only build gdk-pixbuf-from-source and
106 # gtk-update-icon-cache, which are the host tools needed to build Gtk
107 # for the target.
109 HOST_LIBGTK2_DEPENDENCIES = host-libglib2 host-libpng host-gdk-pixbuf
110 HOST_LIBGTK2_CONF_OPTS = \
111 --disable-static \
112 --disable-glibtest \
113 --without-libtiff \
114 --without-libjpeg \
115 --with-gdktarget=none \
116 --disable-cups
118 define HOST_LIBGTK2_BUILD_CMDS
119 $(HOST_MAKE_ENV) make -C $(@D)/gtk gtk-update-icon-cache
120 endef
122 define HOST_LIBGTK2_INSTALL_CMDS
123 cp $(@D)/gtk/gtk-update-icon-cache $(HOST_DIR)/usr/bin
124 endef
126 $(eval $(autotools-package))
127 $(eval $(host-autotools-package))