git: a5981f590944 - main - mail/archiveopteryx: Fix build with openssl3

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Wed, 26 Jul 2023 17:47:13 UTC
The branch main has been updated by bofh:

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

commit a5981f5909443e3e33874ba707ea205f6b0b6f6d
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-26 15:39:23 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-26 17:47:04 +0000

    mail/archiveopteryx: Fix build with openssl3
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 mail/archiveopteryx/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mail/archiveopteryx/Makefile b/mail/archiveopteryx/Makefile
index b5f2435a0a92..7dc33db12ba4 100644
--- a/mail/archiveopteryx/Makefile
+++ b/mail/archiveopteryx/Makefile
@@ -10,9 +10,6 @@ WWW=		https://www.archiveopteryx.org/
 
 LICENSE=	MIT
 
-BROKEN_SSL=	openssl30 openssl31
-BROKEN_SSL_REASON=	error: 'SSL_CTX_use_RSAPrivateKey_file' is deprecated
-
 BUILD_DEPENDS=	jam:devel/jam
 
 USES=		compiler perl5 ssl tar:bzip2
@@ -46,6 +43,10 @@ JAMARG+=	"-sCLANG=1"
 .endif
 .endif
 
+.if ( ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400092 && ${SSL_DEFAULT} == base ) || ${SSL_DEFAULT:Mopenssl3*}
+CXXFLAGS+=	-DOPENSSL_API_COMPAT=0x30000000L"
+.endif
+
 post-patch:
 	@${EGREP} -Rl '%%[[:alpha:]]+%%' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \
 		-e 's,%%PREFIX%%,${PREFIX},g'