64 lines
2.1 KiB
Bash
64 lines
2.1 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://boost.org
|
|
TERMUX_PKG_DESCRIPTION="Free peer-reviewed portable C++ source libraries"
|
|
TERMUX_PKG_LICENSE="BSL-1.0"
|
|
TERMUX_PKG_VERSION=1.73.0
|
|
TERMUX_PKG_SRCURL=https://dl.bintray.com/boostorg/release/$TERMUX_PKG_VERSION/source/boost_${TERMUX_PKG_VERSION//./_}.tar.bz2
|
|
TERMUX_PKG_SHA256=4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402
|
|
TERMUX_PKG_DEPENDS="libc++, libbz2, libiconv, liblzma, zlib"
|
|
TERMUX_PKG_BUILD_DEPENDS="python"
|
|
TERMUX_PKG_BREAKS="libboost-python (<= 1.65.1-2), boost-dev"
|
|
TERMUX_PKG_REPLACES="libboost-python (<= 1.65.1-2), boost-dev"
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
termux_step_pre_configure() {
|
|
# Certain packages are not safe to build on device because their
|
|
# build.sh script deletes specific files in $TERMUX_PREFIX.
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
|
|
fi
|
|
}
|
|
|
|
termux_step_make_install() {
|
|
CXXFLAGS+=" -std=c++14"
|
|
|
|
rm $TERMUX_PREFIX/lib/libboost* -f
|
|
rm $TERMUX_PREFIX/include/boost -rf
|
|
|
|
CC= CXX= LDFLAGS= CXXFLAGS= ./bootstrap.sh
|
|
echo "using clang : $TERMUX_ARCH : $CXX : <linkflags>-L$TERMUX_PREFIX/lib ; " >> project-config.jam
|
|
echo "using python : 3.8 : $TERMUX_PREFIX/bin/python3 : $TERMUX_PREFIX/include/python3.8 : $TERMUX_PREFIX/lib ;" >> project-config.jam
|
|
|
|
if [ "$TERMUX_ARCH" = arm ] || [ "$TERMUX_ARCH" = aarch64 ]; then
|
|
BOOSTARCH=arm
|
|
BOOSTABI=aapcs
|
|
elif [ "$TERMUX_ARCH" = i686 ] || [ "$TERMUX_ARCH" = x86_64 ]; then
|
|
BOOSTARCH=x86
|
|
BOOSTABI=sysv
|
|
fi
|
|
|
|
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=$TERMUX_PREFIX/include \
|
|
toolset=clang-$TERMUX_ARCH \
|
|
--prefix="$TERMUX_PREFIX" \
|
|
-q \
|
|
--without-stacktrace \
|
|
--without-log \
|
|
--disable-icu \
|
|
-sNO_ZSTD=1 \
|
|
cxxflags="$CXXFLAGS" \
|
|
linkflags="$LDFLAGS" \
|
|
architecture="$BOOSTARCH" \
|
|
abi="$BOOSTABI" \
|
|
address-model="$BOOSTAM" \
|
|
boost.locale.icu=off \
|
|
binary-format=elf \
|
|
threading=multi \
|
|
install
|
|
}
|