2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-23 14:54:42 +02:00
|
|
|
#
|
|
|
|
# coreutils
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-11-13 23:27:58 +01:00
|
|
|
|
2017-05-25 23:56:47 +02:00
|
|
|
COREUTILS_VERSION = 8.27
|
2010-09-30 21:03:31 +02:00
|
|
|
COREUTILS_SITE = $(BR2_GNU_MIRROR)/coreutils
|
2011-11-13 23:27:58 +01:00
|
|
|
COREUTILS_SOURCE = coreutils-$(COREUTILS_VERSION).tar.xz
|
2017-03-30 15:43:33 +02:00
|
|
|
COREUTILS_LICENSE = GPL-3.0+
|
2013-01-21 12:29:42 +01:00
|
|
|
COREUTILS_LICENSE_FILES = COPYING
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2014-10-25 00:09:35 +02:00
|
|
|
# coreutils-01-fix-for-dummy-man-usage.patch triggers autoreconf on build
|
2014-02-11 15:25:21 +01:00
|
|
|
COREUTILS_AUTORECONF = YES
|
2014-07-17 00:00:38 +02:00
|
|
|
COREUTILS_GETTEXTIZE = YES
|
2014-02-11 15:25:21 +01:00
|
|
|
|
2018-04-01 17:39:05 +02:00
|
|
|
COREUTILS_CONF_OPTS = --disable-rpath --enable-single-binary=symlinks \
|
2014-11-07 13:45:46 +01:00
|
|
|
$(if $(BR2_TOOLCHAIN_USES_MUSL),--with-included-regex)
|
2014-10-26 13:33:10 +01:00
|
|
|
COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
|
|
|
|
ac_cv_func_chown_works=yes \
|
|
|
|
ac_cv_func_euidaccess=no \
|
|
|
|
ac_cv_func_fstatat=yes \
|
|
|
|
ac_cv_func_getdelim=yes \
|
|
|
|
ac_cv_func_getgroups=yes \
|
|
|
|
ac_cv_func_getgroups_works=yes \
|
|
|
|
ac_cv_func_getloadavg=no \
|
|
|
|
ac_cv_func_lstat_dereferences_slashed_symlink=yes \
|
|
|
|
ac_cv_func_lstat_empty_string_bug=no \
|
|
|
|
ac_cv_func_strerror_r_char_p=no \
|
|
|
|
ac_cv_func_strnlen_working=yes \
|
|
|
|
ac_cv_func_strtod=yes \
|
|
|
|
ac_cv_func_working_mktime=yes \
|
|
|
|
ac_cv_have_decl_strerror_r=yes \
|
|
|
|
ac_cv_have_decl_strnlen=yes \
|
|
|
|
ac_cv_lib_getloadavg_getloadavg=no \
|
|
|
|
ac_cv_lib_util_getloadavg=no \
|
|
|
|
ac_fsusage_space=yes \
|
|
|
|
ac_use_included_regex=no \
|
|
|
|
am_cv_func_working_getline=yes \
|
|
|
|
fu_cv_sys_stat_statfs2_bsize=yes \
|
|
|
|
gl_cv_func_getcwd_null=yes \
|
|
|
|
gl_cv_func_getcwd_path_max=yes \
|
|
|
|
gl_cv_func_gettimeofday_clobber=no \
|
|
|
|
gl_cv_func_fstatat_zero_flag=no \
|
|
|
|
gl_cv_func_link_follows_symlink=no \
|
|
|
|
gl_cv_func_re_compile_pattern_working=yes \
|
|
|
|
gl_cv_func_svid_putenv=yes \
|
|
|
|
gl_cv_func_tzset_clobber=no \
|
|
|
|
gl_cv_func_working_mkstemp=yes \
|
|
|
|
gl_cv_func_working_utimes=yes \
|
|
|
|
gl_getline_needs_run_time_check=no \
|
|
|
|
gl_cv_have_proc_uptime=yes \
|
|
|
|
utils_cv_localtime_cache=no \
|
2014-11-18 11:28:36 +01:00
|
|
|
PERL=missing \
|
2016-12-09 14:43:09 +01:00
|
|
|
MAKEINFO=true \
|
|
|
|
INSTALL_PROGRAM=$(INSTALL)
|
2014-10-26 13:33:10 +01:00
|
|
|
|
|
|
|
COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false \
|
2017-10-13 01:33:32 +02:00
|
|
|
kill link ln ls mkdir mknod mktemp mv nice printenv pwd rm rmdir \
|
|
|
|
vdir sleep stty sync touch true uname join
|
2014-10-26 13:33:10 +01:00
|
|
|
|
2010-09-30 21:03:31 +02:00
|
|
|
# If both coreutils and busybox are selected, make certain coreutils
|
|
|
|
# wins the fight over who gets to have their utils actually installed.
|
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
|
|
COREUTILS_DEPENDENCIES = busybox
|
|
|
|
endif
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2014-10-25 04:06:45 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ACL),y)
|
|
|
|
COREUTILS_DEPENDENCIES += acl
|
|
|
|
else
|
|
|
|
COREUTILS_CONF_OPTS += --disable-acl
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_ATTR),y)
|
|
|
|
COREUTILS_DEPENDENCIES += attr
|
|
|
|
else
|
|
|
|
COREUTILS_CONF_OPTS += --disable-xattr
|
|
|
|
endif
|
|
|
|
|
2017-07-04 12:28:00 +02:00
|
|
|
COREUTILS_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
|
|
|
|
|
2014-10-26 13:33:10 +01:00
|
|
|
# It otherwise fails to link properly, not mandatory though
|
2017-07-04 12:28:00 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
|
2014-10-26 13:33:10 +01:00
|
|
|
COREUTILS_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
|
|
|
|
endif
|
|
|
|
|
2014-10-25 04:06:45 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_GMP),y)
|
|
|
|
COREUTILS_DEPENDENCIES += gmp
|
|
|
|
else
|
|
|
|
COREUTILS_CONF_OPTS += --without-gmp
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
|
|
|
COREUTILS_DEPENDENCIES += libcap
|
|
|
|
else
|
|
|
|
COREUTILS_CONF_OPTS += --disable-libcap
|
|
|
|
endif
|
|
|
|
|
2014-10-26 13:33:10 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
COREUTILS_CONF_OPTS += --with-openssl=yes
|
|
|
|
COREUTILS_DEPENDENCIES += openssl
|
|
|
|
endif
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2015-10-18 08:32:45 +02:00
|
|
|
ifeq ($(BR2_ROOTFS_MERGED_USR),)
|
|
|
|
define COREUTILS_CLEANUP_BIN
|
2018-04-01 17:39:05 +02:00
|
|
|
# some things go in /bin rather than /usr/bin
|
2018-04-01 17:39:04 +02:00
|
|
|
$(foreach f,$(COREUTILS_BIN_PROGS), \
|
2018-04-01 17:39:05 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/$(f) && \
|
|
|
|
ln -sf ../usr/bin/coreutils $(TARGET_DIR)/bin/$(f)
|
2018-04-01 17:39:04 +02:00
|
|
|
)
|
2015-10-18 08:32:45 +02:00
|
|
|
endef
|
|
|
|
COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
|
|
|
|
endif
|
|
|
|
|
2015-11-28 22:17:30 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
COREUTILS_CONF_OPTS += --enable-no-install-program=stdbuf
|
|
|
|
endif
|
|
|
|
|
2015-10-18 08:32:45 +02:00
|
|
|
define COREUTILS_CLEANUP
|
2002-10-23 14:54:42 +02:00
|
|
|
# link for archaic shells
|
|
|
|
ln -fs test $(TARGET_DIR)/usr/bin/[
|
|
|
|
# gnu thinks chroot is in bin, debian thinks it's in sbin
|
2014-11-18 20:07:28 +01:00
|
|
|
mv -f $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
|
2010-09-30 21:03:31 +02:00
|
|
|
endef
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2015-10-18 08:32:45 +02:00
|
|
|
COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|