git: 6d297011f9ea - main - sysutils/barrier: unbreak build on non-OpenSSL 3 systems (12 and 13)

From: Hiroki Tagato <tagattie_at_FreeBSD.org>
Date: Tue, 25 Jul 2023 02:11:44 UTC
The branch main has been updated by tagattie:

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

commit 6d297011f9ea49d22bc36aa2c1fcda549db4ebba
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2023-07-25 02:03:35 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2023-07-25 02:11:35 +0000

    sysutils/barrier: unbreak build on non-OpenSSL 3 systems (12 and 13)
    
    Builds of barrier started failing on non-OpenSSL 3 systems after
    commit 29ba81195ab384a6b4de7c953cb6ac8ca2fff557 with the following
    error:
    
    /wrkdirs/usr/ports/sysutils/barrier/work/barrier-2.4.0/src/lib/net/SecureUtils.cpp:163:25: error: use of undeclared identifier 'EVP_RSA_gen'
        auto* private_key = EVP_RSA_gen(2048);
                            ^
    1 warning and 1 error generated.
    
    Applying the patch in commit 29ba81195ab384a6b4de7c953cb6ac8ca2fff557
    conditionally solves the issue.
    
    Approved by:    portmgr (build fix blanket)
---
 sysutils/barrier/Makefile                                           | 6 ++++++
 ..._net_SecureUtils.cpp => extra-patch-src_lib_net_SecureUtils.cpp} | 0
 2 files changed, 6 insertions(+)

diff --git a/sysutils/barrier/Makefile b/sysutils/barrier/Makefile
index 6e7b9abdf0d8..3d3c2e4feb64 100644
--- a/sysutils/barrier/Makefile
+++ b/sysutils/barrier/Makefile
@@ -37,6 +37,12 @@ GUI_USES=		qt:5
 GUI_USE=		QT=core,gui,network,widgets,buildtools:build,qmake:build
 GUI_CMAKE_BOOL=		BARRIER_BUILD_GUI
 
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400092
+EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src_lib_net_SecureUtils.cpp
+.endif
+
 post-extract:
 	@${CP} -a ${WRKSRC_gulrak}/include ${WRKSRC}/ext/gulrak-filesystem/
 
diff --git a/sysutils/barrier/files/patch-src_lib_net_SecureUtils.cpp b/sysutils/barrier/files/extra-patch-src_lib_net_SecureUtils.cpp
similarity index 100%
rename from sysutils/barrier/files/patch-src_lib_net_SecureUtils.cpp
rename to sysutils/barrier/files/extra-patch-src_lib_net_SecureUtils.cpp