diff --git a/devel/criterion/Makefile b/devel/criterion/Makefile index 1b375e0ff1d6..fbd8e2a66be6 100644 --- a/devel/criterion/Makefile +++ b/devel/criterion/Makefile @@ -1,52 +1,54 @@ PORTNAME= criterion DISTVERSIONPREFIX= v -DISTVERSION= 2.4.1-13 -DISTVERSIONSUFFIX= -g2f48d0f +DISTVERSION= 2.4.2 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org COMMENT= C and C++ unit testing framework for the 21st century WWW= https://github.com/Snaipe/Criterion LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}protobuf>0:devel/py-protobuf@${PY_FLAVOR} \ +BUILD_DEPENDS= ${LOCALBASE}/include/klib/khash.h:devel/klib \ + ${PYTHON_PKGNAMEPREFIX}protobuf>0:devel/py-protobuf@${PY_FLAVOR} \ nanopb>0:devel/nanopb \ cmake:devel/cmake-core \ protoc:devel/protobuf LIB_DEPENDS= libboxfort.so:devel/boxfort \ libffi.so:devel/libffi \ libgit2.so:devel/libgit2 \ libnanomsg.so:net/nanomsg RUN_DEPENDS= nanopb>0:devel/nanopb USES= gettext localbase:ldflags meson python pkgconfig shebangfix USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= Snaipe GH_PROJECT= Criterion -GH_TUPLE= attractivechaos:klib:cdb7e92:klib/dependencies/klib \ - MrAnno:debugbreak:83bf7e9:debugbreak/dependencies/debugbreak +GH_TUPLE= MrAnno:debugbreak:83bf7e9:debugbreak SHEBANG_FILES= src/protocol/gen-pb.py +CFLAGS+= -fPIC \ + -I${LOCALBASE}/include/klib \ + -I${WRKSRC_debugbreak} + MESON_ARGS= -Dtests=false -Dsamples=false quick-test: @cd ${TEST_WRKSRC} && \ ${CC} ${CFLAGS} ${LDFLAGS} -I${STAGEDIR}${PREFIX}/include \ ${STAGEDIR}${PREFIX}/lib/libcriterion.a \ -L${LOCALBASE}/lib -lboxfort -lprotobuf-nanopb -lgit2 -lnanomsg -lintl \ ${FILESDIR}/example.c && \ ./a.out # test succeeds when simple::Test fails with assertion do-test: - @cd ${WRKSRC} && \ - ${RM} -rf _build && \ - ${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS} -Dtests=true -Dsamples=false && \ + cd ${WRKSRC} && \ + ${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} --reconfigure ${CONFIGURE_ARGS} -Dtests=true && \ cd ${BUILD_WRKSRC} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} test + ${DO_MAKE_BUILD} ${ALL_TARGET} test .include diff --git a/devel/criterion/distinfo b/devel/criterion/distinfo index 2cf917f04778..0e1880529d3f 100644 --- a/devel/criterion/distinfo +++ b/devel/criterion/distinfo @@ -1,7 +1,5 @@ -TIMESTAMP = 1678602173 -SHA256 (Snaipe-Criterion-v2.4.1-13-g2f48d0f_GH0.tar.gz) = 62a427b71fd7fce4a8fb82f72c3d2e1f6232821528c4add7aee435331ba4fefa -SIZE (Snaipe-Criterion-v2.4.1-13-g2f48d0f_GH0.tar.gz) = 871145 -SHA256 (attractivechaos-klib-cdb7e92_GH0.tar.gz) = 659a9b920bc77a88c30e61053cfaecd673ab2120df31efadaf544c195415f390 -SIZE (attractivechaos-klib-cdb7e92_GH0.tar.gz) = 99298 +TIMESTAMP = 1685979400 +SHA256 (Snaipe-Criterion-v2.4.2_GH0.tar.gz) = 83e1a39c8c519fbef0d64057dc61c8100b3a5741595788c9f094bba2eeeef0df +SIZE (Snaipe-Criterion-v2.4.2_GH0.tar.gz) = 874664 SHA256 (MrAnno-debugbreak-83bf7e9_GH0.tar.gz) = 6ec24bdf3d361ec2bb7d128c56b8e870a1bb2d6b22eab3c2821eb1e15ccb8919 SIZE (MrAnno-debugbreak-83bf7e9_GH0.tar.gz) = 7060 diff --git a/devel/criterion/files/patch-meson.build b/devel/criterion/files/patch-meson.build index 769ec915be7f..1bc48a1752ce 100644 --- a/devel/criterion/files/patch-meson.build +++ b/devel/criterion/files/patch-meson.build @@ -1,22 +1,45 @@ - use the shared library for nanopb ---- meson.build.orig 2022-07-03 16:28:55 UTC +--- meson.build.orig 2023-05-13 16:02:30 UTC +++ meson.build -@@ -171,7 +171,7 @@ else - config.set('NN_REQREP_H', '') +@@ -138,9 +138,9 @@ deps = [] + + cmake = import('cmake') + +-debugbreak = dependency('debugbreak') ++#debugbreak = dependency('debugbreak') + +-klib = dependency('klib') ++#klib = dependency('klib') + + threads = dependency('threads') + +@@ -178,7 +178,7 @@ else endif --nanopb = dependency('nanopb', required: false, method: 'cmake', modules: ['nanopb::protobuf-nanopb-static']) -+nanopb = dependency('nanopb', required: false, method: 'cmake', modules: ['nanopb::protobuf-nanopb']) + nanopb = dependency('nanopb', required: get_option('wrap_mode') == 'nofallback', method: 'cmake', +- modules: ['nanopb::protobuf-nanopb-static']) ++ modules: ['nanopb::protobuf-nanopb']) must_regenerate_pb = nanopb.found() - if not nanopb.found() - nanopb_proj = cmake.subproject('nanopb', -@@ -181,7 +181,7 @@ if not nanopb.found() - '-DCMAKE_C_FLAGS=-DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1', - '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', - ]) + if (not nanopb.found() + or get_option('wrap_mode') == 'forcefallback' +@@ -192,7 +192,7 @@ if (not nanopb.found() + 'CMAKE_POSITION_INDEPENDENT_CODE': true, + }) + nanopb_proj = cmake.subproject('nanopb-cmake', options: nanopb_opts) - nanopb = nanopb_proj.dependency('protobuf-nanopb-static') + nanopb = nanopb_proj.dependency('protobuf-nanopb') endif - libgit2 = dependency('libgit2', required: false) + libgit2 = dependency('libgit2', required: get_option('wrap_mode') == 'nofallback') +@@ -244,8 +244,8 @@ else + endif + + deps += [ +- debugbreak, +- klib, ++ #debugbreak, ++ #klib, + threads, + boxfort, + libffi,