1 ################################################################################
5 ################################################################################
7 COREUTILS_VERSION
= 8.25
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 \
57 COREUTILS_BIN_PROGS
= cat chgrp chmod chown cp date dd df
dir echo false \
58 ln ls mkdir mknod mv pwd
rm rmdir vdir sleep stty sync touch true \
61 # If both coreutils and busybox are selected, make certain coreutils
62 # wins the fight over who gets to have their utils actually installed.
63 ifeq ($(BR2_PACKAGE_BUSYBOX
),y
)
64 COREUTILS_DEPENDENCIES
= busybox
67 ifeq ($(BR2_PACKAGE_ACL
),y
)
68 COREUTILS_DEPENDENCIES
+= acl
70 COREUTILS_CONF_OPTS
+= --disable-acl
73 ifeq ($(BR2_PACKAGE_ATTR
),y
)
74 COREUTILS_DEPENDENCIES
+= attr
76 COREUTILS_CONF_OPTS
+= --disable-xattr
79 # It otherwise fails to link properly, not mandatory though
80 ifeq ($(BR2_PACKAGE_GETTEXT
),y
)
81 COREUTILS_CONF_OPTS
+= --with-libintl-prefix
=$(STAGING_DIR
)/usr
82 COREUTILS_DEPENDENCIES
+= gettext
85 ifeq ($(BR2_PACKAGE_GMP
),y
)
86 COREUTILS_DEPENDENCIES
+= gmp
88 COREUTILS_CONF_OPTS
+= --without-gmp
91 ifeq ($(BR2_PACKAGE_LIBCAP
),y
)
92 COREUTILS_DEPENDENCIES
+= libcap
94 COREUTILS_CONF_OPTS
+= --disable-libcap
97 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
98 COREUTILS_CONF_OPTS
+= --with-openssl
=yes
99 COREUTILS_DEPENDENCIES
+= openssl
102 ifeq ($(BR2_ROOTFS_MERGED_USR
),)
103 define COREUTILS_CLEANUP_BIN
104 # some things go in root rather than usr
105 for f in
$(COREUTILS_BIN_PROGS
); do \
106 mv
-f
$(TARGET_DIR
)/usr
/bin
/$$f $(TARGET_DIR
)/bin
/$$f || exit
1; \
109 COREUTILS_POST_INSTALL_TARGET_HOOKS
+= COREUTILS_CLEANUP_BIN
112 ifeq ($(BR2_STATIC_LIBS
),y
)
113 COREUTILS_CONF_OPTS
+= --enable-no-install-program
=stdbuf
116 define COREUTILS_CLEANUP
117 # link for archaic shells
118 ln
-fs
test $(TARGET_DIR
)/usr
/bin
/[
119 # gnu thinks chroot is in bin, debian thinks it's in sbin
120 mv
-f
$(TARGET_DIR
)/usr
/bin
/chroot
$(TARGET_DIR
)/usr
/sbin
/chroot
123 COREUTILS_POST_INSTALL_TARGET_HOOKS
+= COREUTILS_CLEANUP
125 # If both coreutils and busybox are selected, the corresponding applets
126 # may need to be reinstated by the clean targets.
128 $(eval
$(autotools-package
))