aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorGravatar Vicente Olivert Riera <Vincent.Riera@imgtec.com>2015-09-29 09:47:02 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-10-15 22:51:50 +0200
commitc4339a0823ee886151269b9341e9c4dcb72df092 (patch)
tree96b46c1c56b40295f8071499046c0eb0b6bc51a9 /support
parenta41594ae2c1c9f5d773162e42bd992dbc21c16d1 (diff)
downloadbuildroot-c4339a0823ee886151269b9341e9c4dcb72df092.tar.gz
buildroot-c4339a0823ee886151269b9341e9c4dcb72df092.tar.bz2
dependencies.sh: improve the missing perl modules detection
[Thomas: - Check for Thread::Queue, not Thread:Queue. - Use 'printf' instead of 'echo -e', since printf is POSIX, but not 'echo -e'.] Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support')
-rwxr-xr-xsupport/dependencies/dependencies.sh26
1 files changed, 21 insertions, 5 deletions
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 01ad82887c..3146401a9d 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -236,10 +236,26 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
fi
fi
-# Check that the Perl installation is complete enough to build
-# host-autoconf.
-if ! perl -e "require Data::Dumper" > /dev/null 2>&1 ; then
- echo "Your Perl installation is not complete enough, at least Data::Dumper is missing."
- echo "On Debian/Ubuntu distributions, install the 'perl' package."
+# Check that the Perl installation is complete enough for Buildroot.
+required_perl_modules="Data::Dumper" # Needed to build host-autoconf
+required_perl_modules="$required_perl_modules Thread::Queue" # Used by host-automake
+
+# This variable will keep the modules that are missing in your system.
+missing_perl_modules=""
+
+for pm in $required_perl_modules ; do
+ if ! perl -e "require $pm" > /dev/null 2>&1 ; then
+ missing_perl_modules="$missing_perl_modules $pm"
+ fi
+done
+
+if [ -n "$missing_perl_modules" ] ; then
+ echo "Your Perl installation is not complete enough; at least the following"
+ echo "modules are missing:"
+ echo
+ for pm in $missing_perl_modules ; do
+ printf "\t $pm\n"
+ done
+ echo
exit 1
fi