From f17d80a20e444983edaa3c9edd4abec4f79ea09b Mon Sep 17 00:00:00 2001 From: lvmbdv Date: Mon, 11 Dec 2017 22:47:41 +0300 Subject: [PATCH] crystal-bin: refine libressl/openssl version conflict solution --- srcpkgs/crystal-bin/template | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/srcpkgs/crystal-bin/template b/srcpkgs/crystal-bin/template index c3295b6f399..a9c9fba45fd 100644 --- a/srcpkgs/crystal-bin/template +++ b/srcpkgs/crystal-bin/template @@ -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() {