summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorsjmulder <sjmulder@pkgsrc.org>2022-04-22 14:25:34 +0000
committersjmulder <sjmulder@pkgsrc.org>2022-04-22 14:25:34 +0000
commit35eea55cf623c283edeb06287b160d845cc6c50c (patch)
tree2ff1c460204a57383cb62bf031e4a234bc28447a /lang
parent025865b28bd49faba216de4400952e90353a5c9d (diff)
downloadpkgsrc-35eea55cf623c283edeb06287b160d845cc6c50c.tar.gz
lang/python39: Fix build on OpenBSD
Diffstat (limited to 'lang')
-rw-r--r--lang/python39/distinfo3
-rw-r--r--lang/python39/patches/patch-Modules___hashopenssl.c16
2 files changed, 18 insertions, 1 deletions
diff --git a/lang/python39/distinfo b/lang/python39/distinfo
index ca4b464fed7..f36b9686797 100644
--- a/lang/python39/distinfo
+++ b/lang/python39/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2022/04/03 10:51:19 riastradh Exp $
+$NetBSD: distinfo,v 1.28 2022/04/22 14:25:34 sjmulder Exp $
BLAKE2s (Python-3.9.12.tar.xz) = 501eaf0162b3030762c2a7e20ed83294a91afbf8b491fb560c2d5517ee9ec5a8
SHA512 (Python-3.9.12.tar.xz) = 081981901e14149748fd35228db0b3b1d96fef227ae7404f07b8bad0fda4b02649bf31c348c94aefdaf3327565d78f9489437c2c02f647b15d41376a27a23e97
@@ -9,6 +9,7 @@ SHA1 (patch-Lib_distutils_unixccompiler.py) = 2e65a8dd5dd3fe25957206c062106fa7a6
SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 5d6dab14197f27363394ff1aeee22a8ced8026d2
SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c
SHA1 (patch-Makefile.pre.in) = dd5ff571ac9fe2dc2e41fa678261d8e3648ac908
+SHA1 (patch-Modules___hashopenssl.c) = d7157254630259b2073e67a921edf0dfe151e32a
SHA1 (patch-Modules___ssl.c) = f241ba148e4c244a641386be5ac07817b03f04f7
SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
diff --git a/lang/python39/patches/patch-Modules___hashopenssl.c b/lang/python39/patches/patch-Modules___hashopenssl.c
new file mode 100644
index 00000000000..ae3018e0744
--- /dev/null
+++ b/lang/python39/patches/patch-Modules___hashopenssl.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-Modules___hashopenssl.c,v 1.1 2022/04/22 14:25:35 sjmulder Exp $
+
+Fix version check for OpenBSD. Adapted from OpenBSD port.
+
+--- Modules/_hashopenssl.c.orig Wed Mar 23 21:12:08 2022
++++ 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