1 ################################################################################
5 ################################################################################
7 LIBGLIB2_VERSION_MAJOR
= 2.50
8 LIBGLIB2_VERSION
= $(LIBGLIB2_VERSION_MAJOR
).0
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
= \
108 host-gettext host-libffi host-pcre host-pkgconf host-zlib
110 LIBGLIB2_CONF_OPTS
= \
113 ifneq ($(BR2_ENABLE_LOCALE
),y
)
114 LIBGLIB2_DEPENDENCIES
+= libiconv
117 ifeq ($(BR2_PACKAGE_ELFUTILS
),y
)
118 LIBGLIB2_CONF_OPTS
+= --enable-libelf
119 LIBGLIB2_DEPENDENCIES
+= elfutils
121 LIBGLIB2_CONF_OPTS
+= --disable-libelf
124 ifeq ($(BR2_PACKAGE_LIBICONV
),y
)
125 LIBGLIB2_CONF_OPTS
+= --with-libiconv
=gnu
126 LIBGLIB2_DEPENDENCIES
+= libiconv
129 # Purge gdb-related files
130 ifneq ($(BR2_PACKAGE_GDB
),y
)
131 define LIBGLIB2_REMOVE_GDB_FILES
132 rm -rf
$(TARGET_DIR
)/usr
/share
/glib-2.0
/gdb
136 # Purge useless binaries from target
137 define LIBGLIB2_REMOVE_DEV_FILES
138 rm -rf
$(TARGET_DIR
)/usr
/lib
/glib-2.0
139 rm -rf
$(addprefix $(TARGET_DIR
)/usr
/share
/glib-2.0
/,codegen gettext
)
140 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
)
141 $(LIBGLIB2_REMOVE_GDB_FILES
)
144 LIBGLIB2_POST_INSTALL_TARGET_HOOKS
+= LIBGLIB2_REMOVE_DEV_FILES
146 # Remove schema sources/DTDs, we use staging ones to compile them.
147 # Do so at target finalization since other packages install additional
148 # ones and we want to deal with it in a single place.
149 define LIBGLIB2_REMOVE_TARGET_SCHEMAS
150 rm -f
$(TARGET_DIR
)/usr
/share
/glib-2.0
/schemas
/*.xml \
151 $(TARGET_DIR
)/usr
/share
/glib-2.0
/schemas
/*.dtd
154 # Compile schemas at target finalization since other packages install
155 # them as well, and better do it in a central place.
156 # It's used at run time so it doesn't matter defering it.
157 define LIBGLIB2_COMPILE_SCHEMAS
158 $(HOST_DIR
)/usr
/bin
/glib-compile-schemas \
159 $(STAGING_DIR
)/usr
/share
/glib-2.0
/schemas \
160 --targetdir
=$(TARGET_DIR
)/usr
/share
/glib-2.0
/schemas
163 LIBGLIB2_TARGET_FINALIZE_HOOKS
+= LIBGLIB2_REMOVE_TARGET_SCHEMAS
164 LIBGLIB2_TARGET_FINALIZE_HOOKS
+= LIBGLIB2_COMPILE_SCHEMAS
166 $(eval
$(autotools-package
))
167 $(eval
$(host-autotools-package
))
169 LIBGLIB2_HOST_BINARY
= $(HOST_DIR
)/usr
/bin
/glib-genmarshal