From 5850585276da24e01f067578c805672ccc84368b Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 23 Jun 2024 06:54:59 +0530 Subject: [PATCH] Fix support for relay --- src/scripts/extensions/relay.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scripts/extensions/relay.sh b/src/scripts/extensions/relay.sh index 368c0f0a1..3cb887c0d 100644 --- a/src/scripts/extensions/relay.sh +++ b/src/scripts/extensions/relay.sh @@ -34,12 +34,15 @@ get_openssl_suffix() { change_library_paths() { if [ "$os" = "Darwin" ]; then otool -L "${ext_dir:?}"/relay.so | grep -q 'ssl.1' && openssl_version='1.1' || openssl_version='3' - [ -e "${brew_prefix:?}"/opt/openssl@"$openssl_version" ] || brew install openssl@"$openssl_version" + for package in zstd lz4 hiredis openssl@"$openssl_version" concurrencykit; do + [ -e "${brew_prefix:?}"/opt/"$package" ] || brew install $package + done dylibs="$(otool -L "${ext_dir:?}"/relay.so | grep -Eo '.*\.dylib' | cut -f1 -d ' ')" install_name_tool -change "$(echo "${dylibs}" | grep -E "libzstd.*dylib" | xargs)" "$brew_prefix"/opt/zstd/lib/libzstd.dylib "$ext_dir"/relay.so install_name_tool -change "$(echo "${dylibs}" | grep -E "liblz4.*dylib" | xargs)" "$brew_prefix"/opt/lz4/lib/liblz4.dylib "$ext_dir"/relay.so install_name_tool -change "$(echo "${dylibs}" | grep -E "libssl.*dylib" | xargs)" "$brew_prefix"/opt/openssl@"$openssl_version"/lib/libssl.dylib "$ext_dir"/relay.so install_name_tool -change "$(echo "${dylibs}" | grep -E "libcrypto.*dylib" | xargs)" "$brew_prefix"/opt/openssl@"$openssl_version"/lib/libcrypto.dylib "$ext_dir"/relay.so + install_name_tool -change "$(echo "${dylibs}" | grep -E "libck.*dylib" | xargs)" "$brew_prefix"/opt/concurrencykit/lib/libck.dylib "$ext_dir"/relay.so fi }