diff options
author | Dane Springmeyer <dane@mapbox.com> | 2014-06-05 00:54:38 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-06-17 04:37:20 -0700 |
commit | 5800723ee7d06dfee14e1aad8355982d6953a899 (patch) | |
tree | a5feafa21e467ec037d6f06dedb955d26e942527 /setup-libraries-cross.sh | |
parent | 0fa3fe523b686aa16fa6275eb9fac4ac14478233 (diff) | |
download | qtlocation-mapboxgl-5800723ee7d06dfee14e1aad8355982d6953a899.tar.gz |
Fix dependency compilation for linaro-softfp
Diffstat (limited to 'setup-libraries-cross.sh')
-rwxr-xr-x | setup-libraries-cross.sh | 67 |
1 files changed, 50 insertions, 17 deletions
diff --git a/setup-libraries-cross.sh b/setup-libraries-cross.sh index 656f20242a..4f3a5bfbea 100755 --- a/setup-libraries-cross.sh +++ b/setup-libraries-cross.sh @@ -1,29 +1,62 @@ #!/bin/bash set -e -u - -export CXX11=true +UNAME=$(uname -s); + +MISSING_DEPS="" + +function ensure_dep { + if [[ ! `which $1` ]]; then + MISSING_DEPS="$MISSING_DEPS $1" + fi +} + +ensure_dep aclocal +ensure_dep cmake +ensure_dep automake +ensure_dep autoconf +ensure_dep pkg-config +ensure_dep node +ensure_dep libtool +ensure_dep gccmakedep + +if [[ $MISSING_DEPS != "" ]]; then + if [ ${UNAME} = 'Darwin' ]; then + echo "Missing build deps: ${MISSING_DEPS}" + echo 'Please run "brew install autoconf automake libtool makedepend cmake pkg-config node"' + echo 'and then re-run ./setup-libraries.sh' + elif [ ${UNAME} = 'Linux' ]; then + echo "Missing build deps: ${MISSING_DEPS}" + echo 'Please run "sudo apt-get install git build-essential zlib1g-dev automake libtool xutils-dev make cmake pkg-config nodejs-legacy libxi-dev libglu1-mesa-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev"' + echo 'and then re-run ./setup-libraries.sh' + fi + exit 1 +fi export SYSROOT=`pwd`/../rootfs export SDK_PATH=`pwd`/../arm-linux-gnueabi-linaro_4.8.3-2014.04 export V=1 -cd mapnik-packaging/osx/ - -source Linaro-softfp.sh - echo $PATH - if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi/lib/libpng.a ] ; then ./scripts/build_png.sh ; fi - # if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi/lib/libglfw3.a ] ; then ./scripts/build_glfw.sh ; fi - if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi/lib/libuv.a ] ; then ./scripts/build_libuv.sh ; fi - if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi/lib/libssl.a ] ; then ./scripts/build_openssl.sh ; fi - # if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libcurl.a ] ; then ./scripts/build_curl.sh ; fi - # if [ ! -d out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi/include/boost ] ; then ./scripts/build_boost.sh `pwd`/../../src/ `pwd`/../../linux/ `pwd`/../../common/ ; fi +if [ ! -d 'mapnik-packaging/.git' ]; then + git clone --depth=1 https://github.com/mapnik/mapnik-packaging.git +fi +cd mapnik-packaging/osx/ +# git pull +export CXX11=true -# cd ../../ -# ./configure \ -# --pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64/lib/pkgconfig \ -# --boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64 +source Linaro-softfp.sh + if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi-linaro-softfp/lib/libglfw3.a ] ; then ./scripts/build_glfw.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi-linaro-softfp/lib/libpng.a ] ; then ./scripts/build_png.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi-linaro-softfp/lib/libuv.a ] ; then ./scripts/build_libuv.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi-linaro-softfp/lib/libssl.a ] ; then ./scripts/build_openssl.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi-linaro-softfp/lib/libcurl.a ] ; then ./scripts/build_curl.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi-linaro-softfp/lib/libboost_regex.a ] ; then ./scripts/build_boost.sh --with-regex ; fi + +cd ../../ +./configure \ +--pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi-linaro-softfp/lib/pkgconfig \ +--boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-arm-linux-gnueabi-linaro-softfp \ +--node=`which node` -# fi |