#!/bin/bash ROOT=$(dirname "$0") if [ ! -e "$ROOT"/third_party ]; then # Potentially run from a different folder before packaging. ROOT=$(dirname "$ROOT") fi if [ ! -e "$ROOT"/third_party ]; then echo "Unable to find third_party sources!" 1>&2 exit 1 fi ROOT=$(realpath "$ROOT") TMP=$(mktemp -d) trap "rm -rf $TMP" EXIT set -x set -e cd $TMP # Check out and install gyp locally svn checkout https://gyp.googlecode.com/svn/trunk/ gyp -r1846 rm -rf "$ROOT"/third_party/gyp mv gyp/pylib/gyp "$ROOT"/third_party/ # Check out and install stringencoders locally wget https://stringencoders.googlecode.com/files/stringencoders-v3.10.3.tar.gz tar xzf stringencoders-v3.10.3.tar.gz ( cd stringencoders-v3.10.3 ./configure --with-b64wchars='-_=' make modp_b64w_data.h make src/modp_b64w.c mkdir -p "$ROOT"/third_party/stringencoders/src cp src/modp_b64w.c "$ROOT"/third_party/stringencoders/src/modp_b64w.cpp cp src/modp_b64w.h modp_b64w_data.h "$ROOT"/third_party/stringencoders/src/ >"$ROOT"/third_party/stringencoders/src/config.h ) # Check out and install gmock locally wget https://googlemock.googlecode.com/files/gmock-1.7.0.zip unzip gmock-1.7.0.zip rm -rf "$ROOT"/third_party/gmock mv gmock-1.7.0 "$ROOT"/third_party/gmock # Check out and install protobuf locally wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz tar xzf protobuf-2.5.0.tar.gz (cd protobuf-2.5.0 && ./configure) rm -rf "$ROOT"/third_party/protobuf mv protobuf-2.5.0 "$ROOT"/third_party/protobuf