1 ################################################################################
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
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 \
22 LIBGTK2_CONF_OPTS
= --disable-glibtest
--enable-explicit-deps
=no
24 LIBGTK2_DEPENDENCIES
= host-pkgconf host-libgtk2 libglib2 cairo pango atk gdk-pixbuf
27 LIBGTK2_CONF_OPTS
+= \
29 --x-includes
=$(STAGING_DIR
)/usr
/include/X11 \
30 --x-libraries
=$(STAGING_DIR
)/usr
/lib \
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
39 LIBGTK2_CONF_OPTS
+= --disable-xinerama
42 ifeq ($(BR2_PACKAGE_XLIB_LIBXI
),y
)
43 LIBGTK2_CONF_OPTS
+= --with-xinput
=yes
44 LIBGTK2_DEPENDENCIES
+= xlib_libXi
46 LIBGTK2_CONF_OPTS
+= --with-xinput
=no
49 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR
),y
)
50 LIBGTK2_DEPENDENCIES
+= xlib_libXrandr
53 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR
),y
)
54 LIBGTK2_DEPENDENCIES
+= xlib_libXcursor
57 ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES
),y
)
58 LIBGTK2_DEPENDENCIES
+= xlib_libXfixes
61 ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE
),y
)
62 LIBGTK2_DEPENDENCIES
+= xlib_libXcomposite
65 ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE
),y
)
66 LIBGTK2_DEPENDENCIES
+= xlib_libXdamage
69 ifeq ($(BR2_PACKAGE_LIBPNG
),y
)
70 LIBGTK2_DEPENDENCIES
+= libpng
72 LIBGTK2_CONF_OPTS
+= --without-libpng
75 ifeq ($(BR2_PACKAGE_JPEG
),y
)
76 LIBGTK2_DEPENDENCIES
+= jpeg
78 LIBGTK2_CONF_OPTS
+= --without-libjpeg
81 ifeq ($(BR2_PACKAGE_TIFF
),y
)
82 LIBGTK2_DEPENDENCIES
+= tiff
84 LIBGTK2_CONF_OPTS
+= --without-libtiff
87 ifeq ($(BR2_PACKAGE_CUPS
),y
)
88 LIBGTK2_CONF_OPTS
+= CUPS_CONFIG
="$(STAGING_DIR)/usr/bin/cups-config"
89 LIBGTK2_DEPENDENCIES
+= cups
91 LIBGTK2_CONF_OPTS
+= --disable-cups
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
99 LIBGTK2_POST_INSTALL_TARGET_HOOKS
+= LIBGTK2_POST_INSTALL_TWEAKS
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
109 HOST_LIBGTK2_DEPENDENCIES
= host-libglib2 host-libpng host-gdk-pixbuf
110 HOST_LIBGTK2_CONF_OPTS
= \
115 --with-gdktarget
=none \
118 define HOST_LIBGTK2_BUILD_CMDS
119 $(HOST_MAKE_ENV
) make
-C
$(@D
)/gtk gtk-update-icon-cache
122 define HOST_LIBGTK2_INSTALL_CMDS
123 cp
$(@D
)/gtk
/gtk-update-icon-cache
$(HOST_DIR
)/usr
/bin
126 $(eval
$(autotools-package
))
127 $(eval
$(host-autotools-package
))