mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 16:24:17 -09:00
support/dependencies/dependencies.sh: correct check for open perl module
Commit4cdd99190e(support/dependencies/dependencies.sh: require open perl package for libxcrypt) added a check for the "open" perl module for libxcrypt, but it does not work as "open" cannot be directly used with "require" as an argument is needed: perl -e "require open" Not enough arguments for open at -e line 1, at EOF Execution of -e aborted due to compilation errors. So special case the check to instead check with "use open ':std'". Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commitb63e155e5f) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
@@ -280,10 +280,6 @@ required_perl_modules="$required_perl_modules ExtUtils::MakeMaker" # Used by hos
|
||||
required_perl_modules="$required_perl_modules Thread::Queue" # Used by host-automake
|
||||
required_perl_modules="$required_perl_modules FindBin" # Used by (host-)libopenssl
|
||||
|
||||
if grep -q ^BR2_PACKAGE_LIBXCRYPT=y $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules open"
|
||||
fi
|
||||
|
||||
if grep -q ^BR2_PACKAGE_MPV=y $BR2_CONFIG ; then
|
||||
required_perl_modules="$required_perl_modules Math::BigInt"
|
||||
required_perl_modules="$required_perl_modules Math::BigRat"
|
||||
@@ -300,6 +296,13 @@ fi
|
||||
# This variable will keep the modules that are missing in your system.
|
||||
missing_perl_modules=""
|
||||
|
||||
if grep -q ^BR2_PACKAGE_LIBXCRYPT=y $BR2_CONFIG ; then
|
||||
# open cannot be used with require
|
||||
if ! perl -e "use open ':std'" > /dev/null 2>&1 ; then
|
||||
missing_perl_modules="$missing_perl_modules open"
|
||||
fi
|
||||
fi
|
||||
|
||||
for pm in $required_perl_modules ; do
|
||||
if ! perl -e "require $pm" > /dev/null 2>&1 ; then
|
||||
missing_perl_modules="$missing_perl_modules $pm"
|
||||
|
||||
Reference in New Issue
Block a user