git: 57a2c4c7d1f0 - main - security/boringssl: use CMAKE_INSTALL_PREFIX (+)

From: Sergey A. Osokin <osa_at_FreeBSD.org>
Date: Wed, 09 Aug 2023 20:06:11 UTC
The branch main has been updated by osa:

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

commit 57a2c4c7d1f0a02aa115501c8ee9c30c605cea7c
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2023-08-09 20:05:45 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2023-08-09 20:06:05 +0000

    security/boringssl: use CMAKE_INSTALL_PREFIX (+)
    
    CMAKE_INSTALL_PREFIX usage helps to fix an issue with the RUNPATH.
    
    Also, it's possible to use native installation procedure for the
    package, our do-install target can be safely removed.
    
    Bump PORTREVISION.
---
 security/boringssl/Makefile  | 16 ++++++----------
 security/boringssl/pkg-plist |  3 +++
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/security/boringssl/Makefile b/security/boringssl/Makefile
index fe073e822441..15084b61dced 100644
--- a/security/boringssl/Makefile
+++ b/security/boringssl/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	boringssl
 PORTVERSION=	0.0.0.0.2023.08.05.01
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES+=	https://proxy.golang.org/:gomods
 DISTFILES+=	golang.org/x/crypto/@v/v0.10.0.zip:gomods \
@@ -30,21 +31,16 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	google
 GH_TAGNAME=	e28988e
 CMAKE_ARGS+=	-DBUILD_SHARED_LIBS=1 \
-		-DCMAKE_BUILD_TYPE=Release
+		-DCMAKE_BUILD_TYPE=Release \
+		-DCMAKE_INSTALL_PREFIX=${PREFIX}
 USE_LDCONFIG=	yes
 LDFLAGS+=	-Wl,-rpath,${LOCALBASE}/lib
 TEST_TARGET=	run_tests
 MAKE_ENV+=	GOFLAGS=-mod=readonly \
 		GOPROXY=file://${DISTDIR}
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/tool/bssl ${STAGEDIR}${PREFIX}/bin/
-	(cd ${WRKSRC}/include && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include)
-	${INSTALL_LIB} ${WRKSRC}/crypto/libcrypto.so ${STAGEDIR}${PREFIX}/lib/libcrypto.so.1.0.0
-	${INSTALL_LIB} ${WRKSRC}/ssl/libssl.so ${STAGEDIR}${PREFIX}/lib/libssl.so.1.0.0
-	${LN} -sf libcrypto.so.1 ${STAGEDIR}${PREFIX}/lib/libcrypto.so
-	${LN} -sf libcrypto.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libcrypto.so.1
-	${LN} -sf libssl.so.1 ${STAGEDIR}${PREFIX}/lib/libssl.so
-	${LN} -sf libssl.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libssl.so.1
+post-install:
+	${LN} -sf libcrypto.so.1 ${STAGEDIR}${PREFIX}/lib/libcrypto.so.1.0.0
+	${LN} -sf libssl.so.1 ${STAGEDIR}${PREFIX}/lib/libssl.so.1.0.0
 
 .include <bsd.port.mk>
diff --git a/security/boringssl/pkg-plist b/security/boringssl/pkg-plist
index 3175d612e22e..9c9205e8e554 100644
--- a/security/boringssl/pkg-plist
+++ b/security/boringssl/pkg-plist
@@ -85,6 +85,9 @@ include/openssl/type_check.h
 include/openssl/x509.h
 include/openssl/x509_vfy.h
 include/openssl/x509v3.h
+lib/cmake/OpenSSL/OpenSSLConfig.cmake
+lib/cmake/OpenSSL/OpenSSLTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/OpenSSL/OpenSSLTargets.cmake
 lib/libcrypto.so
 lib/libcrypto.so.1
 lib/libcrypto.so.1.0.0