5 # Change to extlibs directory
10 # Pick the preferred version of boost to use
15 BOOST_VERSION="${BOOST_MAJOR}.${BOOST_MINOR}.${BOOST_REVISION}"
17 # Determine the architecture
20 if [ "${HOST_ARCH}" != "x86_64" ];
25 HOST_ARCH="linux-${HOST_ARCH}"
28 echo "Removing old boost repo..."
30 echo "Cloning boost from GIT HUB..."
31 git clone --recursive https://github.com/boostorg/boost.git boost
35 if [ ! -d "boost" ]; then
40 TOOLCHAIN=${ANDROID_NDK}/toolchains/${TOOLSET}-${VERSION}/prebuilt/${HOST_ARCH}/bin
48 echo "Checking out boost v${BOOST_VERSION}..."
49 git checkout --force -B boost-${BOOST_VERSION} tags/boost-${BOOST_VERSION} &>> ../boost.log
50 git submodule foreach --recursive git checkout --force -B boost-${BOOST_VERSION} tags/boost-${BOOST_VERSION} &>> ../boost.log
51 echo "Reset and clean all modular repositories..."
52 git reset --hard HEAD >> ../boost.log
53 git clean -d --force >> ../boost.log
54 git clean -d --force -x >> ../boost.log
55 git submodule foreach --recursive git reset --hard HEAD >> ../boost.log
56 git submodule foreach --recursive git clean --force -d >> ../boost.log
57 git submodule foreach --recursive git clean --force -d -x >> ../boost.log
58 echo "Copying user configs to boost..."
59 cp ${EXTDIR}/../resource/patches/boost/${TOOLSET}/user-config.jam tools/build/src/user-config.jam
60 echo "Boostrapping boost..."
68 --build-type=minimal \
69 -s PLATFORM=${PLATFORM} \
70 -s VERSION=${VERSION} \
71 --prefix="${EXTDIR}/../out/boost" \
72 --includedir="${INCPATH}" \
73 --libdir="${LIBPATH}" \
74 --build-dir="$(pwd)/build" \
76 --with-program_options \
80 if [ ! -d "${INCPATH}" ];
82 echo "Copying headers to android include directory..."
84 cp --recursive --dereference boost/boost ${INCPATH}
95 INCPATH="${EXTDIR}/../out/android/include"
96 LIBPATH="${EXTDIR}/../out/android/lib/${TOOLSET}"
98 if [ ! -d "${LIBPATH}" ];
104 checkBoost android-19 arm-linux-androideabi 4.9
105 checkBoost android-19 x86 4.9