This commit is contained in:
TriForceX
2021-03-13 22:13:38 -03:00
parent c77595adbd
commit b3ecc6e32d
7043 changed files with 119377 additions and 73694 deletions

View File

@@ -112,9 +112,9 @@ if [ -z "$COMPILER_VERSION" ] ; then
fi;
COMPILER_MAJOR=$(echo $COMPILER_VERSION | sed -e "s/\..*//g")
COMPILER_MINOR=$(echo $COMPILER_VERSION | sed -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g")
if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then
if [ $COMPILER_MAJOR -lt 4 -o $COMPILER_MAJOR -eq 4 -a $COMPILER_MINOR -lt 8 ] ; then
echo
echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 2.95 is required"
echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 4.8 is required"
exit 1;
fi;
@@ -140,9 +140,9 @@ fi
if [ -n "$CXXCOMPILER_VERSION" ] ; then
CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g")
CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
if [ $CXXCOMPILER_MAJOR -lt 4 -o $CXXCOMPILER_MAJOR -eq 4 -a $CXXCOMPILER_MINOR -lt 8 ] ; then
echo
echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required"
echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 4.8 is required"
exit 1
fi
fi
@@ -160,7 +160,7 @@ fi
# Check that a few mandatory programs are installed
missing_progs="no"
for prog in patch perl tar wget cpio python unzip rsync bc ${DL_TOOLS} ; do
for prog in patch perl tar wget cpio unzip rsync bc ${DL_TOOLS} ; do
if ! which $prog > /dev/null ; then
echo "You must install '$prog' on your build machine";
missing_progs="yes"
@@ -180,12 +180,10 @@ if test "${missing_progs}" = "yes" ; then
exit 1
fi
# Check that the python version is at least 2.7
PYTHON_VERSION=$(python -V 2>&1 |awk '{ split($2, v, "."); print v[1] v[2] }')
if [ $PYTHON_VERSION -lt 27 ]; then
echo
echo "You have '$(python -V 2>&1)' installed. Python >= 2.7 is required"
exit 1;
# apply-patches.sh needs patch with --no-backup-if-mismatch support (GNU, busybox w/DESKTOP)
if ! patch --no-backup-if-mismatch </dev/null 2>/dev/null; then
echo "Your patch program does not support the --no-backup-if-mismatch option. Install GNU patch"
exit 1
fi
if grep ^BR2_NEEDS_HOST_UTF8_LOCALE=y $BR2_CONFIG > /dev/null; then
@@ -212,14 +210,6 @@ if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then
fi
fi
if grep -q ^BR2_NEEDS_HOST_JAVAC=y $BR2_CONFIG ; then
check_prog_host "javac"
fi
if grep -q ^BR2_NEEDS_HOST_JAR=y $BR2_CONFIG ; then
check_prog_host "jar"
fi
if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then
if test ! -f /lib/ld-linux.so.2 ; then
echo
@@ -256,6 +246,16 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
fi
fi
if grep ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then
if ! echo "#include <gcc-plugin.h>" | $HOSTCXX_NOCCACHE -I$($HOSTCXX_NOCCACHE -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then
echo
echo "Your Buildroot configuration needs a host compiler capable of building gcc plugins."
echo "If you're running a Debian/Ubuntu distribution, install gcc-X-plugin-dev package."
echo "For other distributions, refer to their documentation."
exit 1 ;
fi
fi
# 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 ExtUtils::MakeMaker" # Used by host-libxml-parser-perl
@@ -270,6 +270,10 @@ if grep -q ^BR2_PACKAGE_WHOIS=y $BR2_CONFIG ; then
required_perl_modules="$required_perl_modules autodie"
fi
if grep -q -E '^BR2_PACKAGE_(WEBKITGTK|WPEWEBKIT)=y' $BR2_CONFIG ; then
required_perl_modules="${required_perl_modules} JSON::PP"
fi
# This variable will keep the modules that are missing in your system.
missing_perl_modules=""
@@ -289,8 +293,3 @@ if [ -n "$missing_perl_modules" ] ; then
echo
exit 1
fi
if ! python -c "import argparse" > /dev/null 2>&1 ; then
echo "Your Python installation is not complete enough: argparse module is missing"
exit 1
fi