0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 04:02:15 +02:00

build system: fix 'git apply'

When 'git apply' is run inside repository folder, it ignores files
missing in index. To make it work, run 'git apply' outside of repository.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
This commit is contained in:
Lev Stipakov 2018-03-27 15:02:41 +03:00
parent 3e49de7dea
commit cfd6df5bc2
3 changed files with 19 additions and 10 deletions

View File

@ -36,11 +36,7 @@ else
tar xfz $DL/$FNAME
cd asio-$ASIO_VERSION
# apply pre-generated patches
for file in $O3/core/deps/asio/patches/*.patch; do
echo Applying patch: $file
git apply $file
done
apply_patches "asio"
cd ..

17
deps/functions.sh vendored
View File

@ -28,3 +28,20 @@ function download()
check_download || return -1
}
function apply_patches()
{
DEP_NAME=$1
# change directory since git apply got confused when
# applying patches to files which are not found in index
DIR=$(pwd)
pushd ${DIR}
cd /tmp
# apply pre-generated patches
for file in $O3/core/deps/${DEP_NAME}/patches/*.patch; do
echo Applying patch: $file
git apply --directory ${DIR} --unsafe-path $file
done
popd
}

View File

@ -51,11 +51,7 @@ else
# enable MD4 (needed for NTLM auth)
perl -pi -e 's/^\/\/// if /#define MBEDTLS_MD4_C/' include/mbedtls/config.h
# apply pre-generated patches
for file in $O3/core/deps/mbedtls/patches/*.patch; do
echo Applying patch: $file
git apply $file
done
apply_patches "mbedtls"
fi
if [[ "x$TARGET" == xlinux* || "x$TARGET" == xosx* ]]; then