git: 6a53dee4f524 - main - security/gost-engine: Fix build with OpenSSL 3.0.0

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Thu, 04 May 2023 15:00:20 UTC
The branch main has been updated by bofh:

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

commit 6a53dee4f524aae69186288bf4c19e00f4e237cb
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-05-04 13:56:39 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-05-04 15:00:13 +0000

    security/gost-engine: Fix build with OpenSSL 3.0.0
    
    - Although this ports sets up different flavor for base and openssl30
      however it was not checking the SSL_DEFAULT and was always building
      with base even though SSL_DEFAULT was openssl30. This commit fixes
      this by checking the SSL_DEFAULT and changing the default FLAVOR.
    - Add additional pkg-plist for openssl30 flavor
    - Remove unused BROKEN_SSL_REASON_* which were not mentioned in
      BROKEN_SSL
    
    Approved by:    portmgr (blanket)
---
 security/gost-engine/Makefile            |  7 +++++--
 security/gost-engine/pkg-plist-openssl30 | 16 ++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/security/gost-engine/Makefile b/security/gost-engine/Makefile
index 7d8729e52a98..22881074bb70 100644
--- a/security/gost-engine/Makefile
+++ b/security/gost-engine/Makefile
@@ -11,12 +11,11 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 FLAVORS=	base openssl30
 
 openssl30_PKGNAMESUFFIX=	-${FLAVOR}
+openssl30_PLIST=	${.CURDIR}/pkg-plist-${FLAVOR}
 
 BROKEN_SSL=				libressl libressl-devel openssl31
 BROKEN_SSL_REASON_libressl=		needs features only available in OpenSSL 1.1.1+
 BROKEN_SSL_REASON_libressl-devel=	needs features only available in OpenSSL 1.1.1+
-BROKEN_SSL_REASON_base=			needs either ssl=${FLAVOR} or FLAVOR=base
-BROKEN_SSL_REASON_openssl30=		needs either ssl=${FLAVOR} or FLAVOR=openssl30
 BROKEN_SSL_REASON_openssl31=		not ready for openssl31
 
 BUILD_DEPENDS=  cmake>=3.18.1:devel/cmake
@@ -55,6 +54,10 @@ OPTIONS_DEFINE=	DOCS
 
 .include <bsd.port.options.mk>
 
+.if ${SSL_DEFAULT} == openssl30
+FLAVOR=	openssl30
+.endif
+
 .if ${FLAVOR:U} == base
 post-patch:
 	${REINPLACE_CMD} 's/-Werror //' ${WRKSRC}/CMakeLists.txt
diff --git a/security/gost-engine/pkg-plist-openssl30 b/security/gost-engine/pkg-plist-openssl30
new file mode 100644
index 000000000000..a4c8b49c89c9
--- /dev/null
+++ b/security/gost-engine/pkg-plist-openssl30
@@ -0,0 +1,16 @@
+bin/gost12sum
+bin/gostsum
+%%EDIR%%/gost.so
+%%EDIRV%%/libgost.so.1.1
+lib/libgost.so
+lib/libgostprov.so
+lib/ossl-modules/gostprov.so
+share/cmake/GostEngine/GostEngineConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/cmake/GostEngine/GostEngineConfig.cmake
+share/cmake/GostProvider/GostProviderConfig-%%CMAKE_BUILD_TYPE%%.cmake
+share/cmake/GostProvider/GostProviderConfig.cmake
+%%PORTDOCS%%share/man/man1/gost12sum.1.gz
+%%PORTDOCS%%share/man/man1/gostsum.1.gz
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL.md
+%%PORTDOCS%%%%DOCSDIR%%/README.gost
+%%PORTDOCS%%%%DOCSDIR%%/README.md