crystal-bin: refine libressl/openssl version conflict solution

This commit is contained in:
lvmbdv 2017-12-11 22:47:41 +03:00 committed by Toyam Cox
parent 49f7f29c1c
commit f17d80a20e
1 changed files with 5 additions and 2 deletions

View File

@ -26,8 +26,11 @@ do_extract() {
}
post_extract() {
sed -i 's/OPENSSL_102 = .*/OPENSSL_102 = false # LibreSSL currently does not support APIs above 1.0.1/' ${wrksrc}/src/openssl/lib_{ssl,crypto}.cr
sed -i 's/OPENSSL_110 = .*/OPENSSL_110 = false # LibreSSL currently does not support APIs above 1.0.1/' ${wrksrc}/src/openssl/lib_{ssl,crypto}.cr
# Check for libtls to determine if libssl is coming from LibreSSL, as suggested by Vaelatern
sed -i 's/OPENSSL_102 = .*/OPENSSL_102 = {{ `command -v pkg-config > \/dev\/null \&\& pkg-config --atleast-version=1.0.2 libssl \&\& pkg-config --exists libtls || printf succ`.stringify == "succ" }}/' ${wrksrc}/src/openssl/lib_ssl.cr
sed -i 's/OPENSSL_102 = .*/OPENSSL_102 = {{ `command -v pkg-config > \/dev\/null \&\& pkg-config --atleast-version=1.0.2 libcrypto \&\& pkg-config --exists libtls || printf succ`.stringify == "succ" }}/' ${wrksrc}/src/openssl/lib_crypto.cr
sed -i 's/OPENSSL_110 = .*/OPENSSL_110 = {{ `command -v pkg-config > \/dev\/null \&\& pkg-config --atleast-version=1.1.0 libssl \&\& pkg-config --exists libtls || printf succ`.stringify == "succ" }}/' ${wrksrc}/src/openssl/lib_ssl.cr
sed -i 's/OPENSSL_110 = .*/OPENSSL_110 = {{ `command -v pkg-config > \/dev\/null \&\& pkg-config --atleast-version=1.1.0 libcrypto \&\& pkg-config --exists libtls || printf succ`.stringify == "succ" }}/' ${wrksrc}/src/openssl/lib_crypto.cr
}
do_install() {