summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-03-13 18:35:29 +0100
committerKonstantin Käfer <mail@kkaefer.com>2019-03-13 20:42:30 +0100
commit979433eddb5a8f2180aba134befb08b222718bc8 (patch)
treea307962a9105152514b6ab37f98818b6d4431204 /scripts
parente9805b60ee77fcb91dcaac89c09290d185d072bd (diff)
downloadqtlocation-mapboxgl-979433eddb5a8f2180aba134befb08b222718bc8.tar.gz
[build] update Boost to 1.69 and remove RTTI
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update-boost.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/update-boost.sh b/scripts/update-boost.sh
new file mode 100755
index 0000000000..03df5569aa
--- /dev/null
+++ b/scripts/update-boost.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+set -eu
+
+pushd "$BOOST"
+if [ ! -f dist/bin/bcp ]; then
+ # Build bcp
+ ./bootstrap.sh
+ ./b2 tools/bcp
+fi
+popd
+
+# Extract boost modules that we need
+rm -rf vendor/boost/include
+mkdir -p vendor/boost/include
+"$BOOST/dist/bin/bcp" --boost="$BOOST" --scan $(find {src,include,test,platform,bin} -name "*.cpp" -o -name "*.hpp") vendor/boost/include
+
+pushd vendor/boost
+VERSION=$(sed -n 's/^#define BOOST_LIB_VERSION "\([^"]*\)"$/\1/p' include/boost/version.hpp)
+echo "libboost ${VERSION/_/.} for Mapbox GL Native" > README.md
+git add README.md include
+popd
+
+echo "If everything works, run:"
+echo ""
+echo " git -C vendor/boost checkout master"
+echo " git -C vendor/boost commit -m \"update boost to ${VERSION/_/.}\""
+echo " git -C vendor/boost push"
+echo " git add vendor/boost"
+echo ""
+echo "and commit."