2015-06-06 21:29:30 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
if [ -z "$O3" ]; then
|
|
|
|
echo O3 var must point to ovpn3 tree
|
|
|
|
exit 1
|
|
|
|
fi
|
2017-09-26 11:13:29 +02:00
|
|
|
if [ -z "$DEP_DIR" ]; then
|
2017-11-19 05:20:30 +01:00
|
|
|
echo DEP_DIR var must point to dependency build folder
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "$DL" ]; then
|
|
|
|
echo DL var must point to the download folder
|
2017-09-26 11:13:29 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
2015-06-06 21:29:30 +02:00
|
|
|
|
|
|
|
. $O3/core/deps/lib-versions
|
|
|
|
|
2017-11-19 05:20:30 +01:00
|
|
|
# source helper functions
|
|
|
|
. $O3/core/deps/functions.sh
|
|
|
|
|
|
|
|
PACKAGE=${ASIO_VERSION}
|
|
|
|
FNAME=${ASIO_VERSION}.tar.gz
|
|
|
|
PV=${ASIO_VERSION#*-}
|
|
|
|
URL=https://github.com/chriskohlhoff/asio/archive/${PV}.tar.gz
|
|
|
|
CSUM=${ASIO_CSUM}
|
2018-03-19 04:36:24 +01:00
|
|
|
DIST=asio
|
2017-11-19 05:20:30 +01:00
|
|
|
|
|
|
|
download
|
|
|
|
|
2018-03-19 04:36:24 +01:00
|
|
|
if [ "$NO_WIPE" = "1" ]; then
|
|
|
|
echo RETAIN existing source
|
|
|
|
else
|
|
|
|
echo WIPE and reunzip source
|
|
|
|
cd $DEP_DIR
|
|
|
|
rm -rf $DIST $ASIO_VERSION
|
|
|
|
tar xfz $DL/$FNAME
|
|
|
|
cd $ASIO_VERSION
|
|
|
|
|
|
|
|
# apply pre-generated patches
|
|
|
|
for file in $O3/core/deps/asio/patches/*.patch; do
|
|
|
|
echo Applying patch: $file
|
|
|
|
git apply $file
|
|
|
|
done
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
cp -a $ASIO_VERSION $DIST
|
|
|
|
fi
|