2022-06-09 15:26:04 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-02-13 20:40:12 +01:00
|
|
|
set -e
|
|
|
|
|
2024-07-22 21:16:39 +02:00
|
|
|
if [ "$(find build/"$2"/lib -name libboost_*.a 2>/dev/null |wc -l)" -eq 10 ]; then
|
2022-06-09 15:26:04 +02:00
|
|
|
echo "boost already built for $2";
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2024-02-13 20:40:12 +01:00
|
|
|
exec 9>/var/tmp/libcryfs-boost.lock
|
|
|
|
flock 9
|
|
|
|
|
2024-07-22 21:16:39 +02:00
|
|
|
mkdir -p build && rm -rf build/"$2" && cd Boost-for-Android
|
2022-06-09 15:26:04 +02:00
|
|
|
|
2024-07-22 21:16:39 +02:00
|
|
|
BOOST_TAR=boost_1_79_0.tar.bz2
|
2022-06-09 15:26:04 +02:00
|
|
|
if [ ! -f $BOOST_TAR ]; then
|
2024-07-22 21:16:39 +02:00
|
|
|
DL_URL="https://archives.boost.io/release/1.79.0/source/boost_1_79_0.tar.bz2"
|
|
|
|
if command -v wget; then
|
|
|
|
wget -O $BOOST_TAR "$DL_URL"
|
|
|
|
elif command -v curl; then
|
|
|
|
curl -fLo $BOOST_TAR "$DL_URL"
|
|
|
|
else
|
|
|
|
echo "Neither curl or wget have been found">&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-06-09 15:26:04 +02:00
|
|
|
fi
|
2024-02-13 20:40:12 +01:00
|
|
|
sha256sum -c ../checksum.txt
|
2022-06-09 15:26:04 +02:00
|
|
|
|
2024-07-22 21:16:39 +02:00
|
|
|
./build-android.sh --boost=1.79.0 --arch="$2" --target-version=21 \
|
2022-06-09 15:26:04 +02:00
|
|
|
--with-libraries=atomic,chrono,container,date_time,exception,filesystem,serialization,system,thread \
|
2024-07-22 21:16:39 +02:00
|
|
|
"$1"
|
2024-02-13 20:40:12 +01:00
|
|
|
|
2024-07-22 21:16:39 +02:00
|
|
|
mv build/out/"$2" ../build
|