dependencies.sh: cleanup dependencies.sh

Cleanup mixed indents and remove commented lines.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Maxime Hadjinlian 2014-02-05 19:25:49 +01:00 committed by Peter Korsgaard
parent 2e8dd9563d
commit e24909a872

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
# vi: set sw=4 ts=4: # vi: set sw=4 ts=4:
#set -x
export LC_ALL=C export LC_ALL=C
@ -44,12 +43,12 @@ if test -n "$PATH" ; then
fi; fi;
if test -n "$PERL_MM_OPT" ; then if test -n "$PERL_MM_OPT" ; then
echo echo
echo "You have PERL_MM_OPT defined because Perl local::lib" echo "You have PERL_MM_OPT defined because Perl local::lib"
echo "is installed on your system. Please unset this variable" echo "is installed on your system. Please unset this variable"
echo "before starting Buildroot, otherwise the compilation of" echo "before starting Buildroot, otherwise the compilation of"
echo "Perl related packages will fail" echo "Perl related packages will fail"
exit 1 exit 1
fi fi
# Verify that which is installed # Verify that which is installed
@ -117,10 +116,10 @@ CXXCOMPILER=$(which $HOSTCXX_NOCCACHE 2> /dev/null)
if [ -z "$CXXCOMPILER" ] ; then if [ -z "$CXXCOMPILER" ] ; then
CXXCOMPILER=$(which c++ 2> /dev/null) CXXCOMPILER=$(which c++ 2> /dev/null)
fi fi
if [ -z "$CXXCOMPILER" ] ; then if [ -z "$CXXCOMPILER" ] ; then
echo echo
echo "You may have to install 'g++' on your build machine" echo "You may have to install 'g++' on your build machine"
#exit 1
fi fi
if [ ! -z "$CXXCOMPILER" ] ; then if [ ! -z "$CXXCOMPILER" ] ; then
CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' | CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' |
@ -149,77 +148,77 @@ fi;
# Check that a few mandatory programs are installed # Check that a few mandatory programs are installed
missing_progs="no" 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 python unzip rsync bc ${DL_TOOLS} ; do
if ! which $prog > /dev/null ; then if ! which $prog > /dev/null ; then
echo "You must install '$prog' on your build machine"; echo "You must install '$prog' on your build machine";
missing_progs="yes" missing_progs="yes"
if test $prog = "svn" ; then if test $prog = "svn" ; then
echo " svn is usually part of the subversion package in your distribution" echo " svn is usually part of the subversion package in your distribution"
elif test $prog = "hg" ; then elif test $prog = "hg" ; then
echo " hg is usually part of the mercurial package in your distribution" echo " hg is usually part of the mercurial package in your distribution"
elif test $prog = "zcat" ; then elif test $prog = "zcat" ; then
echo " zcat is usually part of the gzip package in your distribution" echo " zcat is usually part of the gzip package in your distribution"
elif test $prog = "bzcat" ; then elif test $prog = "bzcat" ; then
echo " bzcat is usually part of the bzip2 package in your distribution" echo " bzcat is usually part of the bzip2 package in your distribution"
fi
fi fi
fi
done done
if test "${missing_progs}" = "yes" ; then if test "${missing_progs}" = "yes" ; then
exit 1 exit 1
fi fi
if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BUILDROOT_CONFIG > /dev/null && \ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BUILDROOT_CONFIG > /dev/null && \
grep ^BR2_ENABLE_LOCALE=y $BUILDROOT_CONFIG > /dev/null ; then grep ^BR2_ENABLE_LOCALE=y $BUILDROOT_CONFIG > /dev/null ; then
if ! which locale > /dev/null ; then if ! which locale > /dev/null ; then
echo echo
echo "You need locale support on your build machine to build a toolchain supporting locales" echo "You need locale support on your build machine to build a toolchain supporting locales"
exit 1 ; exit 1 ;
fi fi
if ! locale -a | grep -q -i utf8$ ; then if ! locale -a | grep -q -i utf8$ ; then
echo echo
echo "You need at least one UTF8 locale to build a toolchain supporting locales" echo "You need at least one UTF8 locale to build a toolchain supporting locales"
exit 1 ; exit 1 ;
fi fi
fi fi
if grep -q ^BR2_PACKAGE_CLASSPATH=y $BUILDROOT_CONFIG ; then if grep -q ^BR2_PACKAGE_CLASSPATH=y $BUILDROOT_CONFIG ; then
for prog in javac jar; do for prog in javac jar; do
if ! which $prog > /dev/null ; then if ! which $prog > /dev/null ; then
echo >&2 echo >&2
echo "You must install '$prog' on your build machine" >&2 echo "You must install '$prog' on your build machine" >&2
exit 1 exit 1
fi fi
done done
fi fi
if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BUILDROOT_CONFIG ; then if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BUILDROOT_CONFIG ; then
if test ! -f /lib/ld-linux.so.2 ; then if test ! -f /lib/ld-linux.so.2 ; then
echo echo
echo "Your Buildroot configuration uses pre-built tools for the x86 architecture," echo "Your Buildroot configuration uses pre-built tools for the x86 architecture,"
echo "but your build machine uses the x86-64 architecture without the 32 bits compatibility" echo "but your build machine uses the x86-64 architecture without the 32 bits compatibility"
echo "library." echo "library."
echo "If you're running a Debian/Ubuntu distribution, install the libc6:i386," echo "If you're running a Debian/Ubuntu distribution, install the libc6:i386,"
echo "libstdc++6:i386, and zlib1g:i386 packages." echo "libstdc++6:i386, and zlib1g:i386 packages."
echo "For other distributions, refer to the documentation on how to install the 32 bits" echo "For other distributions, refer to the documentation on how to install the 32 bits"
echo "compatibility libraries." echo "compatibility libraries."
exit 1 exit 1
fi fi
fi fi
if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BUILDROOT_CONFIG ; then if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BUILDROOT_CONFIG ; then
if ! echo "int main(void) {}" | gcc -m32 -x c - -o /dev/null ; then if ! echo "int main(void) {}" | gcc -m32 -x c - -o /dev/null ; then
echo echo
echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries." echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries."
echo "If you're running a Debian/Ubuntu distribution, install the gcc-multilib package." echo "If you're running a Debian/Ubuntu distribution, install the gcc-multilib package."
echo "For other distributions, refer to their documentation." echo "For other distributions, refer to their documentation."
exit 1 exit 1
fi fi
fi fi
# Check that the Perl installation is complete enough to build # Check that the Perl installation is complete enough to build
# host-autoconf. # host-autoconf.
if ! perl -e "require Data::Dumper" > /dev/null 2>&1 ; then 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 "Your Perl installation is not complete enough, at least Data::Dumper is missing."
echo "On Debian/Ubuntu distributions, install the 'perl' package." echo "On Debian/Ubuntu distributions, install the 'perl' package."
exit 1 exit 1
fi fi