1################################################################################ 2# 3# tar 4# 5################################################################################ 6 7TAR_VERSION = 1.34 8TAR_SOURCE = tar-$(TAR_VERSION).tar.xz 9TAR_SITE = $(BR2_GNU_MIRROR)/tar 10# busybox installs in /bin, so we need tar to install as well in /bin 11# so that we don't end up with two different tar 12TAR_CONF_OPTS = --exec-prefix=/ 13TAR_LICENSE = GPL-3.0+ 14TAR_LICENSE_FILES = COPYING 15TAR_CPE_ID_VENDOR = gnu 16# only tar <= 1.16 17TAR_IGNORE_CVES += CVE-2007-4476 18 19ifeq ($(BR2_PACKAGE_ACL),y) 20TAR_DEPENDENCIES += acl 21TAR_CONF_OPTS += --with-posix-acls 22else 23TAR_CONF_OPTS += --without-posix-acls 24endif 25 26ifeq ($(BR2_PACKAGE_ATTR),y) 27TAR_DEPENDENCIES += attr 28TAR_CONF_OPTS += --with-xattrs 29else 30TAR_CONF_OPTS += --without-xattrs 31endif 32 33$(eval $(autotools-package)) 34 35# host-tar: use cpio.gz instead of tar.gz to prevent chicken-egg problem 36# of needing tar to build tar. 37HOST_TAR_SOURCE = tar-$(TAR_VERSION).cpio.gz 38 39define HOST_TAR_EXTRACT_CMDS 40 mkdir -p $(@D) 41 cd $(@D) && \ 42 $(call suitable-extractor,$(HOST_TAR_SOURCE)) $(TAR_DL_DIR)/$(HOST_TAR_SOURCE) | cpio -i --preserve-modification-time 43 mv $(@D)/tar-$(HOST_TAR_VERSION)/* $(@D) 44 rmdir $(@D)/tar-$(HOST_TAR_VERSION) 45endef 46 47HOST_TAR_CONF_OPTS = --without-selinux 48 49# we are built before ccache 50HOST_TAR_CONF_ENV = \ 51 CC="$(HOSTCC_NOCCACHE)" \ 52 CXX="$(HOSTCXX_NOCCACHE)" 53 54$(eval $(host-autotools-package)) 55