native-api 06fd1ce788
2.7, 3.4: force C99 standard; 2.7.14-18: force OpenSSL 1 formula (#3448)
GCC 15+ uses C23 by default
(https://www.phoronix.com/news/GCC-15-Default-C23)

fixes "error: static declaration of ‘sinpi’ follows non-static declaration"
fixes "error: cannot use keyword ‘false’ as enumeration constant"

* use OpenSSL 1.0 and 1.1 only from formulae
2026-05-14 06:41:47 +03:00

11 lines
1.1 KiB
Plaintext

export PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="${PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA:-openssl@1.1 openssl@1.0}"
export PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA="${PYTHON_BUILD_MACPORTS_OPENSSL_FORMULA:-openssl11 openssl10}"
export PYTHON_CFLAGS="${PYTHON_CFLAGS:+$PYTHON_CFLAGS }-std=c99"
install_package "openssl-1.0.2q" "https://www.openssl.org/source/old/1.0.2/openssl-1.0.2q.tar.gz#5744cfcbcec2b1b48629f7354203bc1e5e9b5466998bbccc5b5fcde3b18eb684" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-2.7.16" "https://www.python.org/ftp/python/2.7.16/Python-2.7.16.tar.xz#f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7" standard verify_py27 copy_python_gdb ensurepip
else
install_package "Python-2.7.16" "https://www.python.org/ftp/python/2.7.16/Python-2.7.16.tgz#01da813a3600876f03f46db11cc5c408175e99f03af2ba942ef324389a83bad5" standard verify_py27 copy_python_gdb ensurepip
fi