mingw: adapt to vcpkg openssl portfile change

vcpkg has removed OPENSSL_VERSION from portfile.cmake
in favor of VERSION variable which is set based on port version
(https://github.com/microsoft/vcpkg/pull/27178/files).

Parse port manifest to get OpenSSL version.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
(cherry picked from commit a12737b5cc)
This commit is contained in:
Lev Stipakov
2022-11-03 11:30:23 +02:00
committed by Frank Lichtenheld
parent 04af83e079
commit cc5efc52a4

View File

@@ -32,8 +32,8 @@ download_deps()
if [ -z "$NO_OPENSSL" ]; then
rm -rf openssl
portfile_url=https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/openssl/portfile.cmake
osslver=$(wget -q -O- "$portfile_url" | grep -oP '\bOPENSSL_VERSION\s+\S+' | cut -d' ' -f2 | tr -d ')')
portfile_url=https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/openssl/vcpkg.json
osslver=$(wget -q -O- "$portfile_url" | grep -oP '\"version": \"\S+' | cut -d' ' -f2 | tr -d "\",")
git clone --single-branch --branch "openssl-$osslver" https://github.com/openssl/openssl.git
fi