termux-packages/packages/boost/build.sh

72 lines
2.3 KiB
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://boost.org
TERMUX_PKG_DESCRIPTION="Free peer-reviewed portable C++ source libraries"
2018-08-14 12:19:31 +02:00
TERMUX_PKG_VERSION=1.68.0
2018-10-21 21:16:53 +02:00
TERMUX_PKG_REVISION=1
2018-08-14 12:19:31 +02:00
TERMUX_PKG_SHA256=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7
2018-02-26 00:09:05 +01:00
TERMUX_PKG_SRCURL=https://dl.bintray.com/boostorg/release/$TERMUX_PKG_VERSION/source/boost_${TERMUX_PKG_VERSION//./_}.tar.bz2
TERMUX_PKG_BUILD_IN_SRC=yes
2017-09-24 23:14:59 +02:00
TERMUX_PKG_DEPENDS="libbz2, liblzma"
TERMUX_PKG_BUILD_DEPENDS="python, python2"
TERMUX_PKG_BREAKS="libboost-python (<= 1.65.1-2)"
TERMUX_PKG_REPLACES="libboost-python (<= 1.65.1-2)"
2018-01-06 20:14:46 +01:00
termux_step_make_install() {
2018-08-14 12:19:31 +02:00
CXXFLAGS+=" -std=c++14"
rm $TERMUX_PREFIX/lib/libboost* -f
rm $TERMUX_PREFIX/include/boost -rf
2018-05-14 08:42:34 +02:00
./bootstrap.sh
2018-05-14 08:42:34 +02:00
echo "using clang : $TERMUX_ARCH : $CXX : <linkflags>-L/data/data/com.termux/files/usr/lib ; " >> project-config.jam
2018-10-21 21:16:53 +02:00
echo "using python : 3.7 : $TERMUX_PREFIX/bin/python3 : $TERMUX_PREFIX/include/python3.7m : $TERMUX_PREFIX/lib ;" >> project-config.jam
2018-05-14 08:42:34 +02:00
if [ "$TERMUX_ARCH" = arm ] || [ "$TERMUX_ARCH" = aarch64 ]; then
2018-05-14 04:23:08 +02:00
BOOSTARCH=arm
BOOSTABI=aapcs
2018-05-14 08:42:34 +02:00
elif [ "$TERMUX_ARCH" = i686 ] || [ "$TERMUX_ARCH" = x86_64 ]; then
2018-05-14 04:23:08 +02:00
BOOSTARCH=x86
BOOSTABI=sysv
fi
2018-05-14 08:42:34 +02:00
if [ "$TERMUX_ARCH" = x86_64 ] || [ "$TERMUX_ARCH" = aarch64 ]; then
BOOSTAM=64
elif [ "$TERMUX_ARCH" = i686 ] || [ "$TERMUX_ARCH" = arm ]; then
BOOSTAM=32
fi
./b2 target-os=android -j${TERMUX_MAKE_PROCESSES} \
include=/data/data/com.termux/files/usr/include \
toolset=clang-$TERMUX_ARCH \
--prefix="$TERMUX_PREFIX" \
-q \
2017-09-24 21:39:34 +02:00
--without-stacktrace \
--without-log \
--disable-icu \
cxxflags="$CXXFLAGS" \
2018-05-14 08:42:34 +02:00
architecture="$BOOSTARCH" \
abi="$BOOSTABI" \
address-model="$BOOSTAM" \
2018-10-21 21:16:53 +02:00
boost.locale.icu=off \
2018-05-14 04:23:08 +02:00
binary-format=elf \
link=shared \
threading=multi \
install
./bootstrap.sh --with-libraries=python
echo "using clang : $TERMUX_ARCH : $CXX : <linkflags>-L/data/data/com.termux/files/usr/lib ; " >> project-config.jam
echo "using python : 2.7 : $TERMUX_PREFIX/bin/python2 : $TERMUX_PREFIX/include/python2.7 : $TERMUX_PREFIX/lib ;" >> project-config.jam
./b2 target-os=android -j${TERMUX_MAKE_PROCESSES} \
include=/data/data/com.termux/files/usr/include \
toolset=clang-$TERMUX_ARCH \
--stagedir="$TERMUX_PREFIX" \
-q \
-a \
--disable-icu \
cxxflags="$CXXFLAGS" \
link=shared \
threading=multi \
2018-10-21 21:16:53 +02:00
boost.locale.icu=off \
stage
}