python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / coreutils / coreutils.mk
blob409089c332f9b3b1c7095d739fa7d467e1a3f1f3
1 ################################################################################
3 # coreutils
5 ################################################################################
7 COREUTILS_VERSION = 8.26
8 COREUTILS_SITE = $(BR2_GNU_MIRROR)/coreutils
9 COREUTILS_SOURCE = coreutils-$(COREUTILS_VERSION).tar.xz
10 COREUTILS_LICENSE = GPLv3+
11 COREUTILS_LICENSE_FILES = COPYING
13 # coreutils-01-fix-for-dummy-man-usage.patch triggers autoreconf on build
14 COREUTILS_AUTORECONF = YES
15 COREUTILS_GETTEXTIZE = YES
17 COREUTILS_CONF_OPTS = --disable-rpath --enable-single-binary=shebangs \
18 $(if $(BR2_TOOLCHAIN_USES_MUSL),--with-included-regex)
19 COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
20 ac_cv_func_chown_works=yes \
21 ac_cv_func_euidaccess=no \
22 ac_cv_func_fstatat=yes \
23 ac_cv_func_getdelim=yes \
24 ac_cv_func_getgroups=yes \
25 ac_cv_func_getgroups_works=yes \
26 ac_cv_func_getloadavg=no \
27 ac_cv_func_lstat_dereferences_slashed_symlink=yes \
28 ac_cv_func_lstat_empty_string_bug=no \
29 ac_cv_func_strerror_r_char_p=no \
30 ac_cv_func_strnlen_working=yes \
31 ac_cv_func_strtod=yes \
32 ac_cv_func_working_mktime=yes \
33 ac_cv_have_decl_strerror_r=yes \
34 ac_cv_have_decl_strnlen=yes \
35 ac_cv_lib_getloadavg_getloadavg=no \
36 ac_cv_lib_util_getloadavg=no \
37 ac_fsusage_space=yes \
38 ac_use_included_regex=no \
39 am_cv_func_working_getline=yes \
40 fu_cv_sys_stat_statfs2_bsize=yes \
41 gl_cv_func_getcwd_null=yes \
42 gl_cv_func_getcwd_path_max=yes \
43 gl_cv_func_gettimeofday_clobber=no \
44 gl_cv_func_fstatat_zero_flag=no \
45 gl_cv_func_link_follows_symlink=no \
46 gl_cv_func_re_compile_pattern_working=yes \
47 gl_cv_func_svid_putenv=yes \
48 gl_cv_func_tzset_clobber=no \
49 gl_cv_func_working_mkstemp=yes \
50 gl_cv_func_working_utimes=yes \
51 gl_getline_needs_run_time_check=no \
52 gl_cv_have_proc_uptime=yes \
53 utils_cv_localtime_cache=no \
54 PERL=missing \
55 MAKEINFO=true \
56 INSTALL_PROGRAM=$(INSTALL)
58 COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false \
59 ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \
60 uname join
62 # If both coreutils and busybox are selected, make certain coreutils
63 # wins the fight over who gets to have their utils actually installed.
64 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
65 COREUTILS_DEPENDENCIES = busybox
66 endif
68 ifeq ($(BR2_PACKAGE_ACL),y)
69 COREUTILS_DEPENDENCIES += acl
70 else
71 COREUTILS_CONF_OPTS += --disable-acl
72 endif
74 ifeq ($(BR2_PACKAGE_ATTR),y)
75 COREUTILS_DEPENDENCIES += attr
76 else
77 COREUTILS_CONF_OPTS += --disable-xattr
78 endif
80 # It otherwise fails to link properly, not mandatory though
81 ifeq ($(BR2_PACKAGE_GETTEXT),y)
82 COREUTILS_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
83 COREUTILS_DEPENDENCIES += gettext
84 endif
86 ifeq ($(BR2_PACKAGE_GMP),y)
87 COREUTILS_DEPENDENCIES += gmp
88 else
89 COREUTILS_CONF_OPTS += --without-gmp
90 endif
92 ifeq ($(BR2_PACKAGE_LIBCAP),y)
93 COREUTILS_DEPENDENCIES += libcap
94 else
95 COREUTILS_CONF_OPTS += --disable-libcap
96 endif
98 ifeq ($(BR2_PACKAGE_OPENSSL),y)
99 COREUTILS_CONF_OPTS += --with-openssl=yes
100 COREUTILS_DEPENDENCIES += openssl
101 endif
103 ifeq ($(BR2_ROOTFS_MERGED_USR),)
104 define COREUTILS_CLEANUP_BIN
105 # some things go in root rather than usr
106 for f in $(COREUTILS_BIN_PROGS); do \
107 mv -f $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f || exit 1; \
108 done
109 endef
110 COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
111 endif
113 ifeq ($(BR2_STATIC_LIBS),y)
114 COREUTILS_CONF_OPTS += --enable-no-install-program=stdbuf
115 endif
117 define COREUTILS_CLEANUP
118 # link for archaic shells
119 ln -fs test $(TARGET_DIR)/usr/bin/[
120 # gnu thinks chroot is in bin, debian thinks it's in sbin
121 mv -f $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
122 endef
124 COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP
126 # If both coreutils and busybox are selected, the corresponding applets
127 # may need to be reinstated by the clean targets.
129 $(eval $(autotools-package))