File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,6 +165,30 @@ if [ -d "/Library/Developer/CommandLineTools/usr/lib" ]; then
165165fi
166166LIBDIRS=" $LIBDIRS /lib /usr/lib /usr/local/lib /opt/local/lib /mingw64/lib /mingw64/bin"
167167INCDIRS=" $SDK_PATH /usr/include /usr/local/include /opt/include /opt/local/include /mingw64/include"
168+
169+ if [ " $SYSS " = " Darwin" ]; then
170+ # 1. Add standard Homebrew paths for ARM/Intel
171+ for brew_path in /opt/homebrew /usr/local /opt/local; do
172+ if [ -d " $brew_path /lib" ]; then
173+ LIBDIRS=" $LIBDIRS $brew_path /lib"
174+ INCDIRS=" $INCDIRS $brew_path /include"
175+ fi
176+ done
177+
178+ # 2. Use pkg-config to find paths for common Hydra dependencies (especially keg-only ones)
179+ # This handles libpq, openssl, libssh, etc. in a generic way.
180+ if command -v " $PKG_CONFIG " > /dev/null 2>&1 ; then
181+ for pkg in libpq openssl libssh libidn2 libidn pcre2-8 libpcre mysqlclient libmariadb apr-1 apr-util-1 libsvn_client; do
182+ if " $PKG_CONFIG " --exists " $pkg " 2> /dev/null; then
183+ pkg_libdir=` " $PKG_CONFIG " --variable=libdir " $pkg " 2> /dev/null`
184+ pkg_incdir=` " $PKG_CONFIG " --variable=includedir " $pkg " 2> /dev/null`
185+ [ -d " $pkg_libdir " ] && LIBDIRS=" $LIBDIRS $pkg_libdir "
186+ [ -d " $pkg_incdir " ] && INCDIRS=" $INCDIRS $pkg_incdir "
187+ fi
188+ done
189+ fi
190+ fi
191+
168192if [ -n " $PREFIX " ]; then
169193 if [ -d " $PREFIX /lib" ]; then
170194 LIBDIRS=" $LIBDIRS $PREFIX /lib"
You can’t perform that action at this time.
0 commit comments