New upstream version 0.3.7
[anytun.git] / contrib / build-boost-mingw-cross.sh
1 #!/bin/sh
2 set -e
3 BOOST=1.58.0
4
5 BOOST_DASH=`echo $BOOST | perl -ne 's/\./_/g; print'`
6 echo $BOOST_DASH
7 wget http://downloads.sourceforge.net/project/boost/boost/$BOOST/boost_${BOOST_DASH}.tar.bz2 -O - | tar xj
8
9 cd boost_${BOOST_DASH}
10 ./bootstrap.sh
11
12 patch -p1 < ../boost_project-config.patch
13
14 for target in w32 w64; do
15   ./b2 --layout=system variant=release threading=multi link=shared runtime-link=shared toolset=gcc-$target target-os=windows threadapi=win32 stage || true
16   mkdir -p ../boost-$target/include
17   mv stage/lib ../boost-$target/
18   cp -r boost ../boost-$target/include
19   ./b2 --layout=system variant=release threading=multi link=shared runtime-link=shared toolset=gcc-$target target-os=windows threadapi=win32 stage --clean || true
20 done
21 rm -rf ../boost_${BOOST_DASH}