From a4a24e1df3a93f03ad41c7114aaf9bb2662ce369 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 25 Oct 2024 15:15:27 -0700 Subject: [PATCH] Support aarch64 Homebrew ARM Homebrew uses `/opt/homebrew` as the prefix instead of `/usr/local`. --- HsOpenSSL.cabal | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/HsOpenSSL.cabal b/HsOpenSSL.cabal index 9990937..0a2313e 100644 --- a/HsOpenSSL.cabal +++ b/HsOpenSSL.cabal @@ -99,11 +99,15 @@ Library Build-Depends: integer-gmp >= 1.0.0 && < 1.1.0 if os(darwin) && flag(homebrew-openssl) - Include-Dirs: /usr/local/opt/openssl/include - Extra-Lib-Dirs: /usr/local/opt/openssl/lib + if arch(aarch64) + Include-Dirs: /opt/homebrew/opt/openssl/include + Extra-Lib-Dirs: /opt/homebrew/opt/openssl/lib + else + Include-Dirs: /usr/local/opt/openssl/include + Extra-Lib-Dirs: /usr/local/opt/openssl/lib if os(darwin) && flag(macports-openssl) - Include-Dirs: /opt/local/include + Include-Dirs: /opt/local/include Extra-Lib-Dirs: /opt/local/lib if flag(use-pkg-config)