forked from libevent/libevent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix-brew-autodetection'
* fix-brew-autodetection: ci: fix cmake build w/o OPENSSL_ROOT_DIR ci: remove separate build for BREW_AUTODETECT_OPENSSL (use it by default) autotools: fix autodetection of openssl location via brew
- Loading branch information
Showing
2 changed files
with
10 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ jobs: | |
- TEST_EXPORT_STATIC | ||
- TEST_EXPORT_SHARED | ||
- OPENSSL_1_1 | ||
- BREW_AUTODETECT_OPENSSL | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -53,12 +52,10 @@ jobs: | |
- name: Build | ||
shell: bash | ||
run: | | ||
if [ "${{ matrix.EVENT_MATRIX }}" == "BREW_AUTODETECT_OPENSSL" ]; then | ||
# use autodetection via brew | ||
: | ||
elif [ "${{ matrix.EVENT_MATRIX }}" == "OPENSSL_1_1" ]; then | ||
if [ "${{ matrix.EVENT_MATRIX }}" == "OPENSSL_1_1" ]; then | ||
export OPENSSL_ROOT_DIR=/usr/local/opt/[email protected] | ||
else | ||
# NOTE: cmake does not support autodetection of OPENSSL_ROOT_DIR via brew | ||
export OPENSSL_ROOT_DIR=/usr/local/opt/openssl | ||
fi | ||
|
@@ -132,7 +129,6 @@ jobs: | |
- DISABLE_DEBUG_MODE | ||
- DISABLE_MM_REPLACEMENT | ||
- OPENSSL_1_1 | ||
- BREW_AUTODETECT_OPENSSL | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -149,13 +145,8 @@ jobs: | |
- name: Build | ||
shell: bash | ||
run: | | ||
if [ "${{ matrix.EVENT_MATRIX }}" == "BREW_AUTODETECT_OPENSSL" ]; then | ||
# use autodetection via brew | ||
: | ||
elif [ "${{ matrix.EVENT_MATRIX }}" == "OPENSSL_1_1" ]; then | ||
if [ "${{ matrix.EVENT_MATRIX }}" == "OPENSSL_1_1" ]; then | ||
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig:$PKG_CONFIG_PATH" | ||
else | ||
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" | ||
fi | ||
export CPPFLAGS="-I/usr/local/opt/mbedtls@2/include" | ||
export LDFLAGS="-L/usr/local/opt/mbedtls@2/lib" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ AC_DEFUN([LIBEVENT_OPENSSL], [ | |
m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR([PKG_PROG_PKG_CONFIG not found. Please install pkg-config and re-run autogen.sh])]) | ||
PKG_PROG_PKG_CONFIG([0.15.0]) | ||
AC_PROG_GREP | ||
case "$host_os" in | ||
darwin*) | ||
|
@@ -14,6 +15,12 @@ case "$host_os" in | |
AC_CHECK_PROG([BREW],brew, brew) | ||
if test x$BREW = xbrew; then | ||
openssl_prefix=$($BREW --prefix openssl 2>/dev/null) | ||
dnl CI workers has only [email protected], | ||
dnl while default is openssl@3, see | ||
dnl https://github.com/Homebrew/brew/issues/12879 | ||
if ! test -d $openssl_prefix; then | ||
openssl_prefix=$($BREW --prefix $($BREW list | $GREP -m1 openssl) 2>/dev/null) | ||
fi | ||
if test x$openssl_prefix != x; then | ||
OPENSSL_LIBS=`$PKG_CONFIG --libs openssl 2>/dev/null` | ||
case "$OPENSSL_LIBS" in | ||
|