mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Merge pull request #1302 from ThomasWaldmann/prefer-openssl-1.1
macOS: prefer homebrew openssl 1.1.x over 1.0.x, see #839
This commit is contained in:
commit
b610909314
1 changed files with 11 additions and 6 deletions
|
@ -1492,15 +1492,20 @@ has_broken_mac_openssl() {
|
|||
}
|
||||
|
||||
use_homebrew_openssl() {
|
||||
local ssldir="$(brew --prefix openssl 2>/dev/null || true)"
|
||||
if [ -d "$ssldir" ]; then
|
||||
echo "python-build: use openssl from homebrew"
|
||||
export PKG_CONFIG_PATH="$ssldir/lib/pkgconfig/:${PKG_CONFIG_PATH}"
|
||||
export CPPFLAGS="-I$ssldir/include ${CPPFLAGS}"
|
||||
export LDFLAGS="-L$ssldir/lib ${LDFLAGS}"
|
||||
local ssl11dir="$(brew --prefix openssl@1.1 2>/dev/null || true)"
|
||||
local ssl10dir="$(brew --prefix openssl 2>/dev/null || true)"
|
||||
if [ -d "$ssl11dir" ]; then
|
||||
echo "python-build: use openssl 1.1 from homebrew"
|
||||
local ssldir=$ssl11dir
|
||||
elif [ -d "$ssl10dir" ]; then
|
||||
echo "python-build: use openssl 1.0 from homebrew"
|
||||
local ssldir=$ssl10dir
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
export PKG_CONFIG_PATH="$ssldir/lib/pkgconfig/:${PKG_CONFIG_PATH}"
|
||||
export CPPFLAGS="-I$ssldir/include ${CPPFLAGS}"
|
||||
export LDFLAGS="-L$ssldir/lib ${LDFLAGS}"
|
||||
}
|
||||
|
||||
build_package_mac_openssl() {
|
||||
|
|
Loading…
Reference in a new issue