--- /dev/null
+--- boost/config/platform/linux.hpp.orig 2016-12-03 12:31:10.512815722 +0100
++++ boost/config/platform/linux.hpp 2016-12-03 12:31:58.180223676 +0100
+@@ -102,4 +102,7 @@
+ # endif
+ #endif
+
++#ifdef __ANDROID__
++#define BOOST_NO_CWCHAR
++#endif
+
+--- boost/integer_traits.hpp.orig 2016-12-03 14:22:08.001314430 +0100
++++ boost/integer_traits.hpp 2016-12-03 14:22:19.582412591 +0100
+@@ -23,7 +23,7 @@
+ #include <limits.h>
+ // we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it,
+ // and some may have <wchar.h> but not <cwchar> ...
+-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__))
++#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__) || defined(__ANDROID__))
+ #include <wchar.h>
+ #endif
+
+--- libs/serialization/build/Jamfile.v2.orig 2016-12-03 13:29:51.821334991 +0100
++++ libs/serialization/build/Jamfile.v2 2016-12-03 13:30:21.457586514 +0100
+@@ -103,12 +103,13 @@
+ <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
+ ;
+
+-lib boost_wserialization
+- : $(WSOURCES).cpp boost_serialization
+- :
+- <toolset>msvc:<cxxflags>/Gy
+- #<toolset>gcc:<cxxflags>"-fvisibility=hidden"
+- <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
+- ;
+-
+-boost-install boost_serialization boost_wserialization ;
++# lib boost_wserialization
++# : $(WSOURCES).cpp boost_serialization
++# :
++# <toolset>msvc:<cxxflags>/Gy
++# #<toolset>gcc:<cxxflags>"-fvisibility=hidden"
++# <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
++# ;
++#
++# boost-install boost_serialization boost_wserialization ;
++boost-install boost_serialization ;
$WGET http://$SF_MIRROR/project/boost/boost/$VER_BOOST/boost_${VER_BOOST//./_}.tar.bz2
tar xfj boost_${VER_BOOST//./_}.tar.bz2
cd boost_${VER_BOOST//./_}
+patch -p0 < ../../boost_wchar.patch
CC= ./bootstrap.sh --with-toolset=gcc --with-libraries=filesystem,system,thread,serialization,test --without-icu
echo "using gcc : $NDK_TOOLCHAIN_VERSION : \"${TOOLCHAIN_TRIPLET}-g++\" : <cxxflags>\"$SYSROOT -I$PREFIX/include $CPPFLAGS_STL\" <linkflags>\"$SYSROOT -L$PREFIX/lib $LDFLAGS_STL -lgnustl_shared\" ;" > user-config.jam
./b2 -q -d+2 --ignore-site-config --user-config=user-config.jam toolset=gcc variant=release link=shared threading=multi runtime-link=shared target-os=android --prefix=$PREFIX --layout=system install $PARALLEL