+cd ../..
+
+# Check if we have all requirements to build PulseView:
+
+if [ -z "$ANDROID_NDK" -o ! -d "$ANDROID_NDK" ]; then
+ echo "Android NDK not available, not building PulseView."
+ exit 0
+fi
+
+if [ -z "$ANDROID_SDK" -o \
+ ! -d "$ANDROID_SDK"/platforms/android-8 -o \
+ ! -d "$ANDROID_SDK"/platforms/android-10 -o \
+ ! -d "$ANDROID_SDK"/platforms/android-11 -o \
+ ! -d "$ANDROID_SDK"/platforms/android-14 -o \
+ ! -d "$ANDROID_SDK"/platforms/android-16 ]; then
+ echo "Android SDK with platforms 8 10 11 14 16 not available, not building PulseView."
+ exit 0
+fi
+
+if [ ! -e "${ANDROID_SDK}/tools/android" ]; then
+ echo "Essential Android build tools not available, not building PulseView."
+ exit 0
+fi
+
+NDK_HOST=`"$ANDROID_NDK/ndk-build" -p 2>/dev/null | awk '$1 == "HOST_TAG" { print $3 }'`
+
+# Boost (needed for PulseView)
+$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 -p1 < ../../boost.patch
+CC= ./bootstrap.sh --with-toolset=gcc --with-libraries=filesystem,system --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 --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