lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | |
| 2 | include $(COMMON_BASE_MK) |
| 3 | |
| 4 | NAME=glib |
| 5 | SRC_DIR=glib-2.44.1 |
| 6 | SRC_TAR=glib-2.44.1.tar.xz |
| 7 | INSTALL_DIR=$(LIB_DIR)/$(NAME)/install |
| 8 | BUILD_DIR=build |
| 9 | GEN_MAKEFILE=$(SRC_DIR)/Makefile |
| 10 | |
| 11 | CONFIG_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= |
| 16 | CONFIG_OPTS += --disable-gtk-doc |
| 17 | CONFIG_OPTS += --disable-gtk-doc-html |
| 18 | CONFIG_OPTS += --disable-doc |
| 19 | CONFIG_OPTS += --disable-docs |
| 20 | CONFIG_OPTS += --disable-documentation |
| 21 | CONFIG_OPTS += --with-xmlto=no |
| 22 | CONFIG_OPTS += --with-fop=no |
| 23 | CONFIG_OPTS += --disable-dependency-tracking |
| 24 | CONFIG_OPTS += --enable-ipv6 |
| 25 | CONFIG_OPTS += --disable-nls |
| 26 | CONFIG_OPTS += --enable-static |
| 27 | CONFIG_OPTS += --enable-shared |
| 28 | CONFIG_OPTS += --disable-modular-tests |
| 29 | ifeq ($(LIBC_TYPE),uClibc) |
| 30 | CONFIG_OPTS += --with-libiconv=gnu |
| 31 | endif |
| 32 | CONFIG_OPTS += --with-pcre=internal |
| 33 | CONFIG_OPTS += --disable-installed-tests |
| 34 | CONFIG_OPTS += --disable-always-build-tests |
| 35 | CONFIG_OPTS += --enable-tests=no |
| 36 | |
| 37 | export ac_cv_func_posix_getpwuid_r=yes |
| 38 | export glib_cv_stack_grows=no |
| 39 | export glib_cv_uscore=no |
| 40 | export ac_cv_func_strtod=yes |
| 41 | export ac_fsusage_space=yes |
| 42 | export fu_cv_sys_stat_statfs2_bsize=yes |
| 43 | export ac_cv_func_closedir_void=no |
| 44 | export ac_cv_func_getloadavg=no |
| 45 | export ac_cv_lib_util_getloadavg=no |
| 46 | export ac_cv_lib_getloadavg_getloadavg=no |
| 47 | export ac_cv_func_getgroups=yes |
| 48 | export ac_cv_func_getgroups_works=yes |
| 49 | export ac_cv_func_chown_works=yes |
| 50 | export ac_cv_have_decl_euidaccess=no |
| 51 | export ac_cv_func_euidaccess=no |
| 52 | export ac_cv_have_decl_strnlen=yes |
| 53 | export ac_cv_func_strnlen_working=yes |
| 54 | export ac_cv_func_lstat_dereferences_slashed_symlink=yes |
| 55 | export ac_cv_func_lstat_empty_string_bug=no |
| 56 | export ac_cv_func_stat_empty_string_bug=no |
| 57 | export vb_cv_func_rename_trailing_slash_bug=no |
| 58 | export ac_cv_have_decl_nanosleep=yes |
| 59 | export jm_cv_func_nanosleep_works=yes |
| 60 | export gl_cv_func_working_utimes=yes |
| 61 | export ac_cv_func_utime_null=yes |
| 62 | export ac_cv_have_decl_strerror_r=yes |
| 63 | export ac_cv_func_strerror_r_char_p=no |
| 64 | export jm_cv_func_svid_putenv=yes |
| 65 | export ac_cv_func_getcwd_null=yes |
| 66 | export ac_cv_func_getdelim=yes |
| 67 | export ac_cv_func_mkstemp=yes |
| 68 | export utils_cv_func_mkstemp_limitations=no |
| 69 | export utils_cv_func_mkdir_trailing_slash_bug=no |
| 70 | export jm_cv_func_gettimeofday_clobber=no |
| 71 | export gl_cv_func_working_readdir=yes |
| 72 | export jm_ac_cv_func_link_follows_symlink=no |
| 73 | export utils_cv_localtime_cache=no |
| 74 | export ac_cv_struct_st_mtim_nsec=no |
| 75 | export gl_cv_func_tzset_clobber=no |
| 76 | export gl_cv_func_getcwd_null=yes |
| 77 | export gl_cv_func_getcwd_path_max=yes |
| 78 | export ac_cv_func_fnmatch_gnu=yes |
| 79 | export am_getline_needs_run_time_check=no |
| 80 | export am_cv_func_working_getline=yes |
| 81 | export gl_cv_func_mkdir_trailing_slash_bug=no |
| 82 | export gl_cv_func_mkstemp_limitations=no |
| 83 | export ac_cv_func_working_mktime=yes |
| 84 | export jm_cv_func_working_re_compile_pattern=yes |
| 85 | export ac_use_included_regex=no |
| 86 | export gl_cv_c_restrict=no |
| 87 | export ac_cv_path_GLIB_GENMARSHAL=$(INSTALL_DIR)/usr/bin/glib-genmarshal |
| 88 | export ac_cv_prog_F77=no |
| 89 | export ac_cv_func_posix_getgrgid_r=no |
| 90 | export glib_cv_long_long_format=ll |
| 91 | export ac_cv_func_printf_unix98=yes |
| 92 | export ac_cv_func_vsnprintf_c99=yes |
| 93 | export ac_cv_func_newlocale=no |
| 94 | export ac_cv_func_uselocale=no |
| 95 | export ac_cv_func_strtod_l=no |
| 96 | export ac_cv_func_strtoll_l=no |
| 97 | export ac_cv_func_strtoull_l=no |
| 98 | export gt_cv_c_wchar_t=no |
| 99 | |
| 100 | export CFLAGS := |
| 101 | export LIBFFI_LIBS = -lffi |
| 102 | export LDFLAGS := |
| 103 | ifeq ($(LIBC_TYPE),uClibc) |
| 104 | export LIBS := -liconv |
| 105 | endif |
| 106 | export PKG_CONFIG_PATH=$(CROSS_COMPILE_SYSROOT)/usr/lib/pkgconfig |
| 107 | |
| 108 | all: $(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 | |
| 121 | clean: |
| 122 | -make -C $(SRC_DIR) distclean |
| 123 | -rm -fr $(BUILD_DIR) $(INSTALL_DIR) $(SRC_DIR) |
| 124 | |
| 125 | romfs: |
| 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 | |
| 135 | populate_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/ |