1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #!/bin/bash
- set -ev
- if [ -z ${DOCKER+x} ] && [ -z ${SONAR+x} ]; then
- # Only on non-docker builds required
- echo "=== Installing from external package sources in $LOCAL_PKG ===" && echo -en 'travis_fold:start:before_install.external\\r'
- # Increase the environment version to force a rebuild of the packages
- # The version is writen to the cache file after every build of the dependencies
- ENV_VERSION="1"
- ENV_INSTALLED=""
- if [ -e $LOCAL_PKG/.build_env ]; then
- echo "=== No cached build environment ==="
- read -r ENV_INSTALLED < $LOCAL_PKG/.build_env
- fi
- # travis caches the $LOCAL_PKG dir. If it is loaded, we don't need to reinstall the packages
- if [ "$ENV_VERSION" = "$ENV_INSTALLED" ]; then
- echo "=== The build environment is current ==="
- exit 0
- fi
- echo "=== The build environment is outdated ==="
- # Clean up
- rm -rf $LOCAL_PKG/*
- if [ "$CC" = "tcc" ]; then
- mkdir tcc_install && cd tcc_install
- wget https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27.tar.bz2
- tar xf tcc-0.9.27.tar.bz2
- cd tcc-0.9.27
- ./configure --prefix=$LOCAL_PKG
- make
- make install
- cd ../..
- rm -rf tcc_install
- fi
- wget https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.7.1.tar.gz
- tar xf mbedtls-2.7.1.tar.gz
- cd mbedtls-mbedtls-2.7.1
- cmake -DENABLE_TESTING=Off -DCMAKE_INSTALL_PREFIX=$LOCAL_PKG .
- make -j
- make install
- echo -en 'travis_fold:end:script.before_install.external\\r'
- echo "=== Installing python packages ===" && echo -en 'travis_fold:start:before_install.python\\r'
- pip install --user cpp-coveralls
- pip install --user sphinx
- pip install --user sphinx_rtd_theme
- pip install --user cpplint
- echo -en 'travis_fold:end:script.before_install.python\\r'
- fi
|