1 ################################################################################
5 ################################################################################
7 LIBGLIB2_VERSION_MAJOR
= 2.50
8 LIBGLIB2_VERSION
= $(LIBGLIB2_VERSION_MAJOR
).3
9 LIBGLIB2_SOURCE
= glib-
$(LIBGLIB2_VERSION
).
tar.xz
10 LIBGLIB2_SITE
= http
://ftp.gnome.org
/pub
/gnome
/sources
/glib
/$(LIBGLIB2_VERSION_MAJOR
)
11 LIBGLIB2_LICENSE
= LGPLv2
+
12 LIBGLIB2_LICENSE_FILES
= COPYING
14 LIBGLIB2_INSTALL_STAGING
= YES
15 LIBGLIB2_INSTALL_STAGING_OPTS
= DESTDIR
=$(STAGING_DIR
) LDFLAGS
=-L
$(STAGING_DIR
)/usr
/lib
install
18 ac_cv_func_posix_getpwuid_r
=yes \
19 glib_cv_stack_grows
=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 \
68 ac_cv_path_GLIB_GENMARSHAL
=$(HOST_DIR
)/usr
/bin
/glib-genmarshal \
70 ac_cv_func_posix_getgrgid_r
=no \
71 glib_cv_long_long_format
=ll \
72 ac_cv_func_printf_unix98
=yes \
73 ac_cv_func_vsnprintf_c99
=yes \
74 ac_cv_func_newlocale
=no \
75 ac_cv_func_uselocale
=no \
76 ac_cv_func_strtod_l
=no \
77 ac_cv_func_strtoll_l
=no \
78 ac_cv_func_strtoull_l
=no \
79 gt_cv_c_wchar_t
=$(if
$(BR2_USE_WCHAR
),yes
,no
)
81 # old uClibc versions don't provide qsort_r
82 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC
),y
)
83 LIBGLIB2_CONF_ENV
+= glib_cv_have_qsort_r
=no
85 LIBGLIB2_CONF_ENV
+= glib_cv_have_qsort_r
=yes
88 # glib/valgrind.h contains inline asm not compatible with thumb1
89 ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB
),y
)
90 LIBGLIB2_CONF_ENV
+= CFLAGS
="$(TARGET_CFLAGS) -marm"
93 HOST_LIBGLIB2_CONF_OPTS
= \
103 LIBGLIB2_DEPENDENCIES
= \
104 host-pkgconf host-libglib2 host-gettext \
105 libffi pcre util-linux zlib
$(if
$(BR2_NEEDS_GETTEXT
),gettext
)
107 HOST_LIBGLIB2_DEPENDENCIES
= \
115 LIBGLIB2_CONF_OPTS
= \
118 ifneq ($(BR2_ENABLE_LOCALE
),y
)
119 LIBGLIB2_DEPENDENCIES
+= libiconv
122 ifeq ($(BR2_PACKAGE_ELFUTILS
),y
)
123 LIBGLIB2_CONF_OPTS
+= --enable-libelf
124 LIBGLIB2_DEPENDENCIES
+= elfutils
126 LIBGLIB2_CONF_OPTS
+= --disable-libelf
129 ifeq ($(BR2_PACKAGE_LIBICONV
),y
)
130 LIBGLIB2_CONF_OPTS
+= --with-libiconv
=gnu
131 LIBGLIB2_DEPENDENCIES
+= libiconv
134 # Purge gdb-related files
135 ifneq ($(BR2_PACKAGE_GDB
),y
)
136 define LIBGLIB2_REMOVE_GDB_FILES
137 rm -rf
$(TARGET_DIR
)/usr
/share
/glib-2.0
/gdb
141 # Purge useless binaries from target
142 define LIBGLIB2_REMOVE_DEV_FILES
143 rm -rf
$(TARGET_DIR
)/usr
/lib
/glib-2.0
144 rm -rf
$(addprefix $(TARGET_DIR
)/usr
/share
/glib-2.0
/,codegen gettext
)
145 rm -f
$(addprefix $(TARGET_DIR
)/usr
/bin
/,gdbus-codegen glib-compile-schemas glib-compile-resources glib-genmarshal glib-gettextize glib-mkenums gobject-query gtester gtester-report
)
146 $(LIBGLIB2_REMOVE_GDB_FILES
)
149 LIBGLIB2_POST_INSTALL_TARGET_HOOKS
+= LIBGLIB2_REMOVE_DEV_FILES
151 # Remove schema sources/DTDs, we use staging ones to compile them.
152 # Do so at target finalization since other packages install additional
153 # ones and we want to deal with it in a single place.
154 define LIBGLIB2_REMOVE_TARGET_SCHEMAS
155 rm -f
$(TARGET_DIR
)/usr
/share
/glib-2.0
/schemas
/*.xml \
156 $(TARGET_DIR
)/usr
/share
/glib-2.0
/schemas
/*.dtd
159 # Compile schemas at target finalization since other packages install
160 # them as well, and better do it in a central place.
161 # It's used at run time so it doesn't matter defering it.
162 define LIBGLIB2_COMPILE_SCHEMAS
163 $(HOST_DIR
)/usr
/bin
/glib-compile-schemas \
164 $(STAGING_DIR
)/usr
/share
/glib-2.0
/schemas \
165 --targetdir
=$(TARGET_DIR
)/usr
/share
/glib-2.0
/schemas
168 LIBGLIB2_TARGET_FINALIZE_HOOKS
+= LIBGLIB2_REMOVE_TARGET_SCHEMAS
169 LIBGLIB2_TARGET_FINALIZE_HOOKS
+= LIBGLIB2_COMPILE_SCHEMAS
171 $(eval
$(autotools-package
))
172 $(eval
$(host-autotools-package
))
174 LIBGLIB2_HOST_BINARY
= $(HOST_DIR
)/usr
/bin
/glib-genmarshal