git: c544161f8230 - main - devel/thrift-c_glib: Fix build with openssl3

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Tue, 25 Jul 2023 09:42:35 UTC
The branch main has been updated by bofh:

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

commit c544161f8230def97eb21305cd88612127142cc0
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-25 09:18:01 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-25 09:42:19 +0000

    devel/thrift-c_glib: Fix build with openssl3
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 devel/thrift-c_glib/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/devel/thrift-c_glib/Makefile b/devel/thrift-c_glib/Makefile
index f92aa8a86df8..e6e993acbe23 100644
--- a/devel/thrift-c_glib/Makefile
+++ b/devel/thrift-c_glib/Makefile
@@ -28,6 +28,12 @@ USE_LDCONFIG=	yes
 
 PLIST_SUB+=	PORTVERSION="${PORTVERSION}"
 
+.include <bsd.port.options.mk>
+
+.if ( ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400092 && ${SSL_DEFAULT} == base ) || ${SSL_DEFAULT:Mopenssl3*}
+CXXFLAGS+=	-DOPENSSL_API_COMPAT=0x30000000L"
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} 's,-Werror,,' ${WRKSRC}/compiler/cpp/Makefile.am \
 		${WRKSRC}/lib/rb/ext/extconf.rb