summaryrefslogtreecommitdiffstats
path: root/support/dependencies
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2018-12-02 08:15:26 +0100
committerPeter Korsgaard <peter@korsgaard.com>2018-12-02 08:16:10 +0100
commit13c43455a05b036002e79808ca1c8e0d91d7871b (patch)
tree147ddbfc5486085018bb527de1a43961fc8ee1ca /support/dependencies
parent2e08c7398a47b414c288ea516514adac3edf00fb (diff)
parent0393f5d34433e34e49ff7ce0fb998735453ed4fc (diff)
downloadbuildroot-13c43455a05b036002e79808ca1c8e0d91d7871b.tar.gz
buildroot-13c43455a05b036002e79808ca1c8e0d91d7871b.zip
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support/dependencies')
-rw-r--r--support/dependencies/check-host-gzip.mk3
-rwxr-xr-xsupport/dependencies/check-host-gzip.sh21
-rwxr-xr-xsupport/dependencies/check-host-tar.sh9
3 files changed, 29 insertions, 4 deletions
diff --git a/support/dependencies/check-host-gzip.mk b/support/dependencies/check-host-gzip.mk
new file mode 100644
index 0000000000..bf9a369a7d
--- /dev/null
+++ b/support/dependencies/check-host-gzip.mk
@@ -0,0 +1,3 @@
+ifeq (,$(call suitable-host-package,gzip))
+BR2_GZIP_HOST_DEPENDENCY = host-gzip
+endif
diff --git a/support/dependencies/check-host-gzip.sh b/support/dependencies/check-host-gzip.sh
new file mode 100755
index 0000000000..5f344c5f9b
--- /dev/null
+++ b/support/dependencies/check-host-gzip.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+candidate="$1" # ignored
+
+gzip="$(which gzip)"
+if [ ! -x "${gzip}" ]; then
+ # echo nothing: no suitable gzip found
+ exit 1
+fi
+
+# gzip displays its version string on stdout
+# pigz displays its version string on stderr
+version="$("${gzip}" --version 2>&1)"
+case "${version}" in
+ (*pigz*)
+ # echo nothing: no suitable gzip found
+ exit 1
+ ;;
+esac
+
+printf "%s" "${gzip}"
diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
index 0857307396..934cb61299 100755
--- a/support/dependencies/check-host-tar.sh
+++ b/support/dependencies/check-host-tar.sh
@@ -20,10 +20,11 @@ major=`echo "$version" | cut -d. -f1`
minor=`echo "$version" | cut -d. -f2`
bugfix=`echo "$version" | cut -d. -f3`
version_bsd=`$tar --version | grep 'bsdtar'`
-if [ ! -z "${version_bsd}" ] ; then
- # mark as invalid version - not all command line options are available
- major=0
- minor=0
+
+# BSD tar does not have all the command-line options
+if [ -n "${version_bsd}" ] ; then
+ # echo nothing: no suitable tar found
+ exit 1
fi
# Minimal version = 1.27 (previous versions do not correctly unpack archives
OpenPOWER on IntegriCloud