16.08.2024 20:53, Klemens Nanni пишет: > Information for inst:benchmark-1.9.0 > > Comment: > microbenchmark support library > > Description: > A library to benchmark code snippets, similar to unit tests. > > Maintainer: Klemens Nanni <k...@openbsd.org> > > WWW: https://github.com/google/benchmark > > > Simple CMake port depending only devel/gtest: > 100% tests passed, 0 tests failed out of 76 > > Total Test time (real) = 4.65 sec > > > With this, at least textproc/re2 could enable tests: > 100% tests passed, 0 tests failed out of 20 > > Total Test time (real) = 1148.88 sec > > > I have not checked whether other ports would pick up benchmark. > Feedback? OK?
Anyone? Index: Makefile =================================================================== RCS file: /cvs/ports/textproc/re2/Makefile,v diff -u -p -r1.10 Makefile --- Makefile 16 Aug 2024 16:49:43 -0000 1.10 +++ Makefile 16 Aug 2024 17:51:03 -0000 @@ -2,12 +2,13 @@ COMMENT = non-backtracking regular expr V = 2024-07-02 DISTNAME = re2-${V} PKGNAME = re2-${V:S/-//g} -REVISION = 0 +REVISION = 1 SHARED_LIBS = re2 1.0 # 10.0.0 CATEGORIES = textproc devel +HOMEPAGE = https://github.com/google/re2 SITES = https://github.com/google/re2/releases/download/${V}/ # BSD @@ -44,6 +45,17 @@ MODULES = devel/cmake LIB_DEPENDS = devel/abseil-cpp -CONFIGURE_ARGS = -DBUILD_SHARED_LIBS=ON +BUILD_DEPENDS = devel/benchmark +TEST_DEPENDS = devel/benchmark + +CONFIGURE_ARGS = -DBUILD_SHARED_LIBS=ON \ + -DRE2_BUILD_TESTING=ON + +# everything except tests +ALL_TARGET = re2 + +# build whatever is left (51 C++ test files) +pre-test: + @${MODCMAKE_BUILD_TARGET} .include <bsd.port.mk> Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/textproc/re2/pkg/PLIST,v diff -u -p -r1.3 PLIST --- pkg/PLIST 16 Aug 2024 16:40:31 -0000 1.3 +++ pkg/PLIST 16 Aug 2024 17:13:20 -0000 @@ -3,7 +3,6 @@ include/re2/filtered_re2.h include/re2/re2.h include/re2/set.h include/re2/stringpiece.h -lib/cmake/ lib/cmake/re2/ lib/cmake/re2/re2Config.cmake lib/cmake/re2/re2ConfigVersion.cmake
benchmark.tgz
Description: application/compressed-tar