mirror of
https://github.com/pyenv/pyenv.git
synced 2026-04-06 13:45:11 +09:00
Fix MacPorts OpenSSL formula detection (#3417)
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
This commit is contained in:
parent
23bcdebe18
commit
d5fa1e225e
@ -175,6 +175,7 @@ You can set certain environment variables to control the build process.
|
||||
* `PYTHON_BUILD_SKIP_HOMEBREW`, if set, will not search for libraries installed by Homebrew when it would normally will.
|
||||
* `PYTHON_BUILD_USE_HOMEBREW`, if set, will search for libraries installed by Homebrew when it would normally not.
|
||||
* `PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA`, override the Homebrew OpenSSL formula to use.
|
||||
* `PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA`, override the MacPorts OpenSSL formula to use. The default is `openssl3 openssl`.
|
||||
* `PYTHON_BUILD_TCLTK_FORMULA`, override the Homebrew Tcl/Tk formula to use.
|
||||
* `PYTHON_BUILD_SKIP_MACPORTS`, if set, will not search for libraries installed by MacPorts when it would normally will.
|
||||
* `PYTHON_BUILD_USE_MACPORTS`, if set, will search for libraries installed by MacPorts when it would normally not.
|
||||
|
||||
@ -1663,12 +1663,20 @@ prefer_openssl11() {
|
||||
# Allow overriding the preference of OpenSSL version per definition basis (#1302, #1325, #1326)
|
||||
PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="${PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA:-openssl@1.1 openssl}"
|
||||
export PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA
|
||||
|
||||
PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA="${PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA:-openssl11 openssl3 openssl}"
|
||||
export PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA
|
||||
|
||||
}
|
||||
|
||||
prefer_openssl3() {
|
||||
# Allow overriding the preference of OpenSSL version per definition basis (#1302, #1325, #1326)
|
||||
PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="${PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA:-openssl@3 openssl@1.1 openssl}"
|
||||
export PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA
|
||||
|
||||
# Set MacPorts OpenSSL formula names for MacPorts environment
|
||||
PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA="${PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA:-openssl3 openssl openssl11}"
|
||||
export PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA
|
||||
}
|
||||
|
||||
build_package_mac_readline() {
|
||||
@ -1727,7 +1735,8 @@ use_macports_openssl() {
|
||||
command -v port >/dev/null || return 1
|
||||
local port_location="$(command -v port)"
|
||||
local prefix="${port_location%/bin/port}"
|
||||
for openssl in ${PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA:-openssl}; do
|
||||
# MacPorts uses a different package naming convention and does not use the @ symbol.
|
||||
for openssl in ${PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA:-openssl3 openssl}; do
|
||||
if [[ $(port -q installed ${openssl} | awk '{print $3}') == "(active)" ]]; then
|
||||
echo "python-build: use ${openssl} from MacPorts"
|
||||
if [[ -n "${PYTHON_BUILD_CONFIGURE_WITH_OPENSSL:-}" ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user