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.17" "https://www.python.org/ftp/python/2.7.17/Python-2.7.17.tar.xz#4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41" standard verify_py27 copy_python_gdb ensurepip
else
install_package "Python-2.7.17" "https://www.python.org/ftp/python/2.7.17/Python-2.7.17.tgz#f22059d09cdf9625e0a7284d24a13062044f5bf59d93a7f3382190dfa94cecde" standard verify_py27 copy_python_gdb ensurepip
fi