git: f1ba99376b91 - main - textproc/cpp-peglib: Fix tests

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 16 Jan 2022 18:04:57 UTC
The branch main has been updated by yuri:

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

commit f1ba99376b91db7f2e4bfeb142610a1d75310de8
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-01-16 18:03:37 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-01-16 18:04:55 +0000

    textproc/cpp-peglib: Fix tests
---
 textproc/cpp-peglib/Makefile | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/textproc/cpp-peglib/Makefile b/textproc/cpp-peglib/Makefile
index f8416776723b..7e832ed5bf00 100644
--- a/textproc/cpp-peglib/Makefile
+++ b/textproc/cpp-peglib/Makefile
@@ -9,19 +9,15 @@ COMMENT=	C++ header-only PEG (Parsing Expression Grammars) library
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		cmake compiler:c++17-lang
+USES=		cmake:testing compiler:c++17-lang
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	yhirose
 
+CMAKE_TESTING_ON=	FREEBSD_BUILD_TESTS
+
 NO_ARCH=	yes
 
 PLIST_FILES=	include/peglib.h
 
-do-test: # testsuite segvs in the middle: https://github.com/yhirose/cpp-peglib/issues/189
-	@cd ${BUILD_WRKSRC} && \
-		${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DFREEBSD_BUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \
-		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
-		test/test-main
-
 .include <bsd.port.mk>