path: root/package
diff options
authorGravatar Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>2013-08-02 11:05:15 +0200
committerGravatar Peter Korsgaard <jacmet@sunsite.dk>2013-09-06 23:30:36 +0200
commitd1f325f554cab7912e9221e91aba5b8aa97b1e3c (patch)
tree2432166fbacae86cc78d18a8b782d4680ad69ab1 /package
parentf8d89f051032a8835bdb77edec518e73170006c1 (diff)
xzcat: treat as host prerequisite and build if needed
If xzcat is not present on the host system, buildroot bails out early asking the developer to install it (xzcat is now a DL_TOOLS_DEPENDENCY) Conversely, when BR2_TARGET_ROOTFS_CPIO_XZ is enabled, then host-xz is a build dependency, and no manual action is required from the developer. Because the second approach is nicer, also build host-xz when xzcat is not available, using the host-prerequisite and suitable-host-pkg mechanisms, already used for tar. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
1 files changed, 4 insertions, 0 deletions
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 65ab8c63da..00f1cb31d2 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -541,7 +541,11 @@ endif # SITE_METHOD
# $(firstword) is used here because the extractor can have arguments, like
# ZCAT="gzip -d -c", and to check for the dependency we only want 'gzip'.
+# Do not add xzcat to the list of required dependencies, as it gets built
+# automatically if it isn't found.
+ifneq ($(call suitable-extractor,$($(2)_SOURCE)),$(XZCAT))
DL_TOOLS_DEPENDENCIES += $(firstword $(call suitable-extractor,$($(2)_SOURCE)))
endif # $(2)_KCONFIG_VAR
endef # inner-generic-package