From 63011b2be311e29183d83ca43e82da28fc322cea Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <barracuda@macos-powerpc.org>
Date: Wed, 11 Sep 2024 18:49:04 +0800
Subject: [PATCH] Remove brewisms

---
 deps/hiredis/CMakeLists.txt |  5 -----
 deps/hiredis/Makefile       | 13 -------------
 src/Makefile                | 10 ----------
 3 files changed, 28 deletions(-)

diff --git deps/hiredis/CMakeLists.txt deps/hiredis/CMakeLists.txt
index b7d6ee8d8..5d8438070 100644
--- deps/hiredis/CMakeLists.txt
+++ deps/hiredis/CMakeLists.txt
@@ -146,11 +146,6 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredis-config.cmake
 
 
 IF(ENABLE_SSL)
-    IF (NOT OPENSSL_ROOT_DIR)
-        IF (APPLE)
-            SET(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
-        ENDIF()
-    ENDIF()
     FIND_PACKAGE(OpenSSL REQUIRED)
     SET(hiredis_ssl_sources
         ssl.c)
diff --git deps/hiredis/Makefile deps/hiredis/Makefile
index bd2106b1d..738e8743d 100644
--- deps/hiredis/Makefile
+++ deps/hiredis/Makefile
@@ -92,19 +92,6 @@ ifeq ($(TEST_ASYNC),1)
 endif
 
 ifeq ($(USE_SSL),1)
-  ifndef OPENSSL_PREFIX
-    ifeq ($(uname_S),Darwin)
-      SEARCH_PATH1=/opt/homebrew/opt/openssl
-      SEARCH_PATH2=/usr/local/opt/openssl
-
-      ifneq ($(wildcard $(SEARCH_PATH1)),)
-        OPENSSL_PREFIX=$(SEARCH_PATH1)
-      else ifneq ($(wildcard $(SEARCH_PATH2)),)
-        OPENSSL_PREFIX=$(SEARCH_PATH2)
-      endif
-    endif
-  endif
-
   ifdef OPENSSL_PREFIX
     CFLAGS+=-I$(OPENSSL_PREFIX)/include
     SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib
diff --git src/Makefile src/Makefile
index cc84d09ad..235ec501b 100644
--- src/Makefile
+++ src/Makefile
@@ -156,16 +156,6 @@ else
 ifeq ($(uname_S),Darwin)
 	# Darwin
 	FINAL_LIBS+= -ldl
-	# Homebrew's OpenSSL is not linked to /usr/local to avoid
-	# conflicts with the system's LibreSSL installation so it
-	# must be referenced explicitly during build.
-ifeq ($(uname_M),arm64)
-	# Homebrew arm64 uses /opt/homebrew as HOMEBREW_PREFIX
-	OPENSSL_PREFIX?=/opt/homebrew/opt/openssl
-else
-	# Homebrew x86/ppc uses /usr/local as HOMEBREW_PREFIX
-	OPENSSL_PREFIX?=/usr/local/opt/openssl
-endif
 else
 ifeq ($(uname_S),AIX)
         # AIX
-- 
2.46.0

