aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-06-03 14:05:49 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-06-03 14:08:49 +0000
commita5b3714057750ecbb8db8912edf5c481ff46ef2b (patch)
tree20170b704abc62e46ecfdc5e274888313b24f45a
parentf4074315f467154d3b5d78c31ccdde0f6c54529c (diff)
downloadports-a5b3714057750ecbb8db8912edf5c481ff46ef2b.tar.gz
ports-a5b3714057750ecbb8db8912edf5c481ff46ef2b.zip
lang/python27: Fix build with OpenSSL 3 and later
PR: 271656 Reported by: exp-run Approved by: portmgr (blanket)
-rw-r--r--lang/python27/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/lang/python27/Makefile b/lang/python27/Makefile
index b2784fe9435b..fc63dbf9e6ca 100644
--- a/lang/python27/Makefile
+++ b/lang/python27/Makefile
@@ -123,6 +123,16 @@ post-patch:
${WRKSRC}/setup.py
.endif
+# This is just a dirty hack for building with OpenSSL 3.0.0 and later
+# There is no plain string OPENSSL_VERSION_NUMBER available in
+# openssl/opensslv.h so setup.py just detects the string as 00000000
+# However care should be taken for the OSVERSION. If OpenSSL 3.0.9
+# lands later the OSVERSION string should be fixed accordingly
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400089 && (${SSL_DEFAULT} == base || ${SSL_DEFAULT:Mopenssl3*} )
+ @${REINPLACE_CMD} -e 's|00907000|00000000|' \
+ ${WRKSRC}/setup.py
+.endif
+
post-install:
for i in ${STAGEDIR}${PREFIX}/lib/python2.7/lib-dynload/*.so; do \
${STRIP_CMD} $$i; done # Strip shared extensions