commit: e07dadf93420be2dc3997c7352ca18a228441c8f Author: Mike Skec <skec <AT> protonmail <DOT> ch> AuthorDate: Tue Mar 15 23:44:15 2022 +0000 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> CommitDate: Wed Mar 16 23:56:27 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=e07dadf9
dev-lang/python: pull in OpenBSD patches to fix build Signed-off-by: Mike Skec <skec <AT> protonmail.ch> Closes: https://github.com/gentoo/libressl/pull/388 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> .../python/files/python-3.9.9-r1-libressl.patch | 34 ++++++++++++++++++++++ dev-lang/python/python-3.9.9-r1.ebuild | 1 + 2 files changed, 35 insertions(+) diff --git a/dev-lang/python/files/python-3.9.9-r1-libressl.patch b/dev-lang/python/files/python-3.9.9-r1-libressl.patch new file mode 100644 index 0000000..997bc0e --- /dev/null +++ b/dev-lang/python/files/python-3.9.9-r1-libressl.patch @@ -0,0 +1,34 @@ +$OpenBSD: patch-Modules__hashopenssl_c,v 1.3 2022/01/21 04:25:12 kmos Exp $ + +Index: Modules/_hashopenssl.c +--- a/Modules/_hashopenssl.c ++++ b/Modules/_hashopenssl.c +@@ -43,7 +43,8 @@ + # error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL" + #endif + +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) + /* OpenSSL < 1.1.0 */ + #define EVP_MD_CTX_new EVP_MD_CTX_create + #define EVP_MD_CTX_free EVP_MD_CTX_destroy + +$OpenBSD: patch-Modules__ssl_c,v 1.3 2021/11/18 15:45:28 tb Exp $ + +XXX maybe this can go away now we have auto-init, I'm not sure exactly +what python's lock protects + +Index: Modules/_ssl.c +--- a/Modules/_ssl.c ++++ b/Modules/_ssl.c +@@ -213,6 +213,9 @@ extern const SSL_METHOD *TLSv1_2_method(void); + #if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2) + #define OPENSSL_NO_SSL2 + #endif ++#if defined(LIBRESSL_VERSION_NUMBER) && defined(WITH_THREAD) ++#define HAVE_OPENSSL_CRYPTO_LOCK ++#endif + + #ifndef PY_OPENSSL_1_1_API + /* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */ diff --git a/dev-lang/python/python-3.9.9-r1.ebuild b/dev-lang/python/python-3.9.9-r1.ebuild index 0371630..dd18752 100644 --- a/dev-lang/python/python-3.9.9-r1.ebuild +++ b/dev-lang/python/python-3.9.9-r1.ebuild @@ -94,6 +94,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" + "${FILESDIR}"/${PN}-3.9.9-r1-libressl.patch ) default
