termux-packages/packages/boost/build.sh

65 lines
2.2 KiB
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://boost.org
TERMUX_PKG_DESCRIPTION="Free peer-reviewed portable C++ source libraries"
TERMUX_PKG_LICENSE="BSL-1.0"
TERMUX_PKG_MAINTAINER="@termux"
2021-10-05 21:50:26 +02:00
TERMUX_PKG_VERSION=1.77.0
2021-05-09 16:49:06 +02:00
TERMUX_PKG_SRCURL=https://boostorg.jfrog.io/artifactory/main/release/$TERMUX_PKG_VERSION/source/boost_${TERMUX_PKG_VERSION//./_}.tar.bz2
2021-10-05 21:50:26 +02:00
TERMUX_PKG_SHA256=fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854
2019-06-19 20:18:20 +02:00
TERMUX_PKG_DEPENDS="libc++, libbz2, libiconv, liblzma, zlib"
2019-11-27 23:24:36 +01:00
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"
2020-01-13 00:02:45 +01:00
TERMUX_PKG_BUILD_IN_SRC=true
2021-10-05 21:50:26 +02:00
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DBOOST_FILESYSTEM_DISABLE_STATX=ON"
2018-01-06 20:14:46 +01:00
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() {
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
2019-11-27 23:24:36 +01:00
CC= CXX= LDFLAGS= CXXFLAGS= ./bootstrap.sh
2018-12-31 02:41:08 +01:00
echo "using clang : $TERMUX_ARCH : $CXX : <linkflags>-L$TERMUX_PREFIX/lib ; " >> project-config.jam
2021-10-05 21:50:26 +02:00
echo "using python : 3.10 : $TERMUX_PREFIX/bin/python3 : $TERMUX_PREFIX/include/python3.10 : $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} \
2018-12-31 02:41:08 +01:00
include=$TERMUX_PREFIX/include \
toolset=clang-$TERMUX_ARCH \
--prefix="$TERMUX_PREFIX" \
-q \
2017-09-24 21:39:34 +02:00
--without-stacktrace \
--disable-icu \
2019-01-03 00:45:45 +01:00
-sNO_ZSTD=1 \
cxxflags="$CXXFLAGS" \
2019-03-12 15:48:20 +01:00
linkflags="$LDFLAGS" \
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 \
threading=multi \
install
}