blob: 4b85cbf18ca15c901cf4094132a6e006f41a3f90 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001
2include $(COMMON_BASE_MK)
3
4NAME=glib
5SRC_DIR=glib-2.44.1
6SRC_TAR=glib-2.44.1.tar.xz
7INSTALL_DIR=$(LIB_DIR)/$(NAME)/install
8BUILD_DIR=build
9GEN_MAKEFILE=$(SRC_DIR)/Makefile
10
11CONFIG_OPTS = --target=arm-buildroot-linux --host=arm-buildroot-linux --build=x86_64-unknown-linux-gnu
12#CONFIG_OPTS += --exec-prefix=$(INSTALL_DIR)/usr
13#CONFIG_OPTS += --sysconfdir=$(INSTALL_DIR)/etc
14#CONFIG_OPTS += --localstatedir=/var
15#CONFIG_OPTS += --program-prefix=
16CONFIG_OPTS += --disable-gtk-doc
17CONFIG_OPTS += --disable-gtk-doc-html
18CONFIG_OPTS += --disable-doc
19CONFIG_OPTS += --disable-docs
20CONFIG_OPTS += --disable-documentation
21CONFIG_OPTS += --with-xmlto=no
22CONFIG_OPTS += --with-fop=no
23CONFIG_OPTS += --disable-dependency-tracking
24CONFIG_OPTS += --enable-ipv6
25CONFIG_OPTS += --disable-nls
26CONFIG_OPTS += --enable-static
27CONFIG_OPTS += --enable-shared
28CONFIG_OPTS += --disable-modular-tests
29ifeq ($(LIBC_TYPE),uClibc)
30CONFIG_OPTS += --with-libiconv=gnu
31endif
32CONFIG_OPTS += --with-pcre=internal
33CONFIG_OPTS += --disable-installed-tests
34CONFIG_OPTS += --disable-always-build-tests
35CONFIG_OPTS += --enable-tests=no
36
37export ac_cv_func_posix_getpwuid_r=yes
38export glib_cv_stack_grows=no
39export glib_cv_uscore=no
40export ac_cv_func_strtod=yes
41export ac_fsusage_space=yes
42export fu_cv_sys_stat_statfs2_bsize=yes
43export ac_cv_func_closedir_void=no
44export ac_cv_func_getloadavg=no
45export ac_cv_lib_util_getloadavg=no
46export ac_cv_lib_getloadavg_getloadavg=no
47export ac_cv_func_getgroups=yes
48export ac_cv_func_getgroups_works=yes
49export ac_cv_func_chown_works=yes
50export ac_cv_have_decl_euidaccess=no
51export ac_cv_func_euidaccess=no
52export ac_cv_have_decl_strnlen=yes
53export ac_cv_func_strnlen_working=yes
54export ac_cv_func_lstat_dereferences_slashed_symlink=yes
55export ac_cv_func_lstat_empty_string_bug=no
56export ac_cv_func_stat_empty_string_bug=no
57export vb_cv_func_rename_trailing_slash_bug=no
58export ac_cv_have_decl_nanosleep=yes
59export jm_cv_func_nanosleep_works=yes
60export gl_cv_func_working_utimes=yes
61export ac_cv_func_utime_null=yes
62export ac_cv_have_decl_strerror_r=yes
63export ac_cv_func_strerror_r_char_p=no
64export jm_cv_func_svid_putenv=yes
65export ac_cv_func_getcwd_null=yes
66export ac_cv_func_getdelim=yes
67export ac_cv_func_mkstemp=yes
68export utils_cv_func_mkstemp_limitations=no
69export utils_cv_func_mkdir_trailing_slash_bug=no
70export jm_cv_func_gettimeofday_clobber=no
71export gl_cv_func_working_readdir=yes
72export jm_ac_cv_func_link_follows_symlink=no
73export utils_cv_localtime_cache=no
74export ac_cv_struct_st_mtim_nsec=no
75export gl_cv_func_tzset_clobber=no
76export gl_cv_func_getcwd_null=yes
77export gl_cv_func_getcwd_path_max=yes
78export ac_cv_func_fnmatch_gnu=yes
79export am_getline_needs_run_time_check=no
80export am_cv_func_working_getline=yes
81export gl_cv_func_mkdir_trailing_slash_bug=no
82export gl_cv_func_mkstemp_limitations=no
83export ac_cv_func_working_mktime=yes
84export jm_cv_func_working_re_compile_pattern=yes
85export ac_use_included_regex=no
86export gl_cv_c_restrict=no
87export ac_cv_path_GLIB_GENMARSHAL=$(INSTALL_DIR)/usr/bin/glib-genmarshal
88export ac_cv_prog_F77=no
89export ac_cv_func_posix_getgrgid_r=no
90export glib_cv_long_long_format=ll
91export ac_cv_func_printf_unix98=yes
92export ac_cv_func_vsnprintf_c99=yes
93export ac_cv_func_newlocale=no
94export ac_cv_func_uselocale=no
95export ac_cv_func_strtod_l=no
96export ac_cv_func_strtoll_l=no
97export ac_cv_func_strtoull_l=no
98export gt_cv_c_wchar_t=no
99
100export CFLAGS :=
101export LIBFFI_LIBS = -lffi
102export LDFLAGS :=
103ifeq ($(LIBC_TYPE),uClibc)
104export LIBS := -liconv
105endif
106export PKG_CONFIG_PATH=$(CROSS_COMPILE_SYSROOT)/usr/lib/pkgconfig
107
108all: $(GEN_MAKEFILE)
109 make -C $(SRC_DIR) all
110 make -C $(SRC_DIR) install
111
112$(GEN_MAKEFILE):
113 echo $(CROSS_COMPILE_SYSROOT)
114 echo $(PKG_CONFIG_PATH)
115 mkdir -p $(BUILD_DIR)
116 sha256sum -c $(NAME).sig
117 tar xf $(TOPDIR_AP)/downloads/$(SRC_TAR)
118 cd $(SRC_DIR); ./configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS)
119 cd $(SRC_DIR); sed -i 's/po docs tests/po/g' Makefile
120
121clean:
122 -make -C $(SRC_DIR) distclean
123 -rm -fr $(BUILD_DIR) $(INSTALL_DIR) $(SRC_DIR)
124
125romfs:
126 cd $(INSTALL_DIR)/lib; \
127 for i in *.so*; do \
128 if [ -L $$i ]; then \
129 $(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
130 elif [ -f $$i ]; then \
131 $(ROMFSINST) /lib/$$i; \
132 fi; \
133 done
134
135populate_sdk:
136 cp -afvp $(INSTALL_DIR)/include/* $(CROSS_COMPILE_SYSROOT)/usr/include/
137 cp -afvp $(INSTALL_DIR)/lib/* $(CROSS_COMPILE_SYSROOT)/usr/lib/
138 cp -afvp $(INSTALL_DIR)/bin/* $(CROSS_COMPILE_SYSROOT)/usr/bin/