Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jun 2023 14:09:06 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: a5b371405775 - main - lang/python27: Fix build with OpenSSL 3 and later
Message-ID:  <202306031409.353E96gk022597@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a5b3714057750ecbb8db8912edf5c481ff46ef2b

commit a5b3714057750ecbb8db8912edf5c481ff46ef2b
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-06-03 14:05:49 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-06-03 14:08:49 +0000

    lang/python27: Fix build with OpenSSL 3 and later
    
    PR:             271656
    Reported by:    exp-run
    Approved by:    portmgr (blanket)
---
 lang/python27/Makefile | 10 ++++++++++
 1 file changed, 10 insertions(+)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306031409.353E96gk022597>