gst1-plugins-base: bump version to 1.6.0
[buildroot-gz.git] / package / libgtk2 / libgtk2.mk
blob0617b9e4b86d2be9f93b95454978ca297d41de89
1 ################################################################################
3 # libgtk2
5 ################################################################################
7 LIBGTK2_VERSION_MAJOR = 2.24
8 LIBGTK2_VERSION = $(LIBGTK2_VERSION_MAJOR).28
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_func_posix_getpwuid_r=yes \
19 glib_cv_stack_grows=no \
20 glib_cv_uscore=no \
21 ac_cv_func_strtod=yes \
22 ac_fsusage_space=yes \
23 fu_cv_sys_stat_statfs2_bsize=yes \
24 ac_cv_func_closedir_void=no \
25 ac_cv_func_getloadavg=no \
26 ac_cv_lib_util_getloadavg=no \
27 ac_cv_lib_getloadavg_getloadavg=no \
28 ac_cv_func_getgroups=yes \
29 ac_cv_func_getgroups_works=yes \
30 ac_cv_func_chown_works=yes \
31 ac_cv_have_decl_euidaccess=no \
32 ac_cv_func_euidaccess=no \
33 ac_cv_have_decl_strnlen=yes \
34 ac_cv_func_strnlen_working=yes \
35 ac_cv_func_lstat_dereferences_slashed_symlink=yes \
36 ac_cv_func_lstat_empty_string_bug=no \
37 ac_cv_func_stat_empty_string_bug=no \
38 vb_cv_func_rename_trailing_slash_bug=no \
39 ac_cv_have_decl_nanosleep=yes \
40 jm_cv_func_nanosleep_works=yes \
41 gl_cv_func_working_utimes=yes \
42 ac_cv_func_utime_null=yes \
43 ac_cv_have_decl_strerror_r=yes \
44 ac_cv_func_strerror_r_char_p=no \
45 jm_cv_func_svid_putenv=yes \
46 ac_cv_func_getcwd_null=yes \
47 ac_cv_func_getdelim=yes \
48 ac_cv_func_mkstemp=yes \
49 utils_cv_func_mkstemp_limitations=no \
50 utils_cv_func_mkdir_trailing_slash_bug=no \
51 jm_cv_func_gettimeofday_clobber=no \
52 gl_cv_func_working_readdir=yes \
53 jm_ac_cv_func_link_follows_symlink=no \
54 utils_cv_localtime_cache=no \
55 ac_cv_struct_st_mtim_nsec=no \
56 gl_cv_func_tzset_clobber=no \
57 gl_cv_func_getcwd_null=yes \
58 gl_cv_func_getcwd_path_max=yes \
59 ac_cv_func_fnmatch_gnu=yes \
60 am_getline_needs_run_time_check=no \
61 am_cv_func_working_getline=yes \
62 gl_cv_func_mkdir_trailing_slash_bug=no \
63 gl_cv_func_mkstemp_limitations=no \
64 ac_cv_func_working_mktime=yes \
65 jm_cv_func_working_re_compile_pattern=yes \
66 ac_use_included_regex=no \
67 gl_cv_c_restrict=no \
68 ac_cv_path_GTK_UPDATE_ICON_CACHE=$(HOST_DIR)/usr/bin/gtk-update-icon-cache \
69 ac_cv_path_GDK_PIXBUF_CSOURCE=$(HOST_DIR)/usr/bin/gdk-pixbuf-csource \
70 ac_cv_prog_F77=no \
71 ac_cv_path_CUPS_CONFIG=no \
72 DB2HTML=false
74 LIBGTK2_CONF_OPTS = --disable-glibtest --enable-explicit-deps=no
76 LIBGTK2_DEPENDENCIES = host-pkgconf host-libgtk2 libglib2 cairo pango atk gdk-pixbuf
78 # Xorg dependencies
79 LIBGTK2_CONF_OPTS += \
80 --with-x \
81 --x-includes=$(STAGING_DIR)/usr/include/X11 \
82 --x-libraries=$(STAGING_DIR)/usr/lib \
83 --with-gdktarget=x11
84 LIBGTK2_DEPENDENCIES += \
85 fontconfig xlib_libX11 xlib_libXext xlib_libXrender
87 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
88 LIBGTK2_CONF_OPTS += --enable-xinerama
89 LIBGTK2_DEPENDENCIES += xlib_libXinerama
90 else
91 LIBGTK2_CONF_OPTS += --disable-xinerama
92 endif
94 ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
95 LIBGTK2_CONF_OPTS += --with-xinput=yes
96 LIBGTK2_DEPENDENCIES += xlib_libXi
97 else
98 LIBGTK2_CONF_OPTS += --with-xinput=no
99 endif
101 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
102 LIBGTK2_DEPENDENCIES += xlib_libXrandr
103 endif
105 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
106 LIBGTK2_DEPENDENCIES += xlib_libXcursor
107 endif
109 ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y)
110 LIBGTK2_DEPENDENCIES += xlib_libXfixes
111 endif
113 ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
114 LIBGTK2_DEPENDENCIES += xlib_libXcomposite
115 endif
117 ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y)
118 LIBGTK2_DEPENDENCIES += xlib_libXdamage
119 endif
121 ifeq ($(BR2_PACKAGE_LIBPNG),y)
122 LIBGTK2_DEPENDENCIES += libpng
123 else
124 LIBGTK2_CONF_OPTS += --without-libpng
125 endif
127 ifeq ($(BR2_PACKAGE_JPEG),y)
128 LIBGTK2_DEPENDENCIES += jpeg
129 else
130 LIBGTK2_CONF_OPTS += --without-libjpeg
131 endif
133 ifeq ($(BR2_PACKAGE_TIFF),y)
134 LIBGTK2_DEPENDENCIES += tiff
135 else
136 LIBGTK2_CONF_OPTS += --without-libtiff
137 endif
139 ifeq ($(BR2_PACKAGE_CUPS),y)
140 LIBGTK2_DEPENDENCIES += cups
141 else
142 LIBGTK2_CONF_OPTS += --disable-cups
143 endif
145 ifeq ($(BR2_PACKAGE_LIBGTK2_DEMO),)
146 define LIBGTK2_POST_INSTALL_TWEAKS
147 rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo
148 endef
150 LIBGTK2_POST_INSTALL_TARGET_HOOKS += LIBGTK2_POST_INSTALL_TWEAKS
151 endif
153 # We do not build a full version of libgtk2 for the host, because that
154 # requires compiling Cairo, Pango, ATK and X.org for the
155 # host. Therefore, we patch it to remove dependencies, and we hack the
156 # build to only build gdk-pixbuf-from-source and
157 # gtk-update-icon-cache, which are the host tools needed to build Gtk
158 # for the target.
160 HOST_LIBGTK2_DEPENDENCIES = host-libglib2 host-libpng host-gdk-pixbuf
161 HOST_LIBGTK2_CONF_OPTS = \
162 --disable-static \
163 --disable-glibtest \
164 --without-libtiff \
165 --without-libjpeg \
166 --with-gdktarget=none \
167 --disable-cups
169 define HOST_LIBGTK2_BUILD_CMDS
170 $(HOST_MAKE_ENV) make -C $(@D)/gtk gtk-update-icon-cache
171 endef
173 define HOST_LIBGTK2_INSTALL_CMDS
174 cp $(@D)/gtk/gtk-update-icon-cache $(HOST_DIR)/usr/bin
175 endef
177 $(eval $(autotools-package))
178 $(eval $(host-autotools-package))