From nobody Sun Jul 03 18:47:23 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1CC008AE6DA; Sun, 3 Jul 2022 18:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LbdGM3GtQz3CXC; Sun, 3 Jul 2022 18:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656874043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5TXPwsLMOcgFaNqhJnBKaUnGXH9ECWlBuvqi6zae+L0=; b=ph8dXzu94PNhaSRcjgQHx2GIXbf0RHzNpkFYfQ/+BDudopvWtslTPtTh6FVF0DcUvmyoq8 8sX3Bkn7au4JVPGFvq9nDlZSj+KmUp6GFUPqSp5C1J2hfc3VAtmAM9BP7byl1wy76/EfYM kSuYCKAAp0Q6BEPwmTrZq8l53w7EfpNdfvPxyM9RxSheJ0Ez4A2bl/kHJtDCK81aXHBae7 IaM62/31l/tMkQHk+jNdZYs3HregYWdiwsjfkCOKP5Fzfb0gqTUjOihjc7Uk+uQVmXvpnV ZJhcx0ftyzjKj/oUyoNzbRD+P6SOnwDtySiLyZ1Zm+jTC21neYhsX1TPf5k5+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4057A298E7; Sun, 3 Jul 2022 18:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 263IlNxM063293; Sun, 3 Jul 2022 18:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 263IlNcr063292; Sun, 3 Jul 2022 18:47:23 GMT (envelope-from git) Date: Sun, 3 Jul 2022 18:47:23 GMT Message-Id: <202207031847.263IlNcr063292@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: c32decee33ce - main - devel/criterion: New port: C and C++ unit testing framework for the 21st century List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c32decee33ce9db095fb2b77e4ece07c5ec50f59 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656874043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5TXPwsLMOcgFaNqhJnBKaUnGXH9ECWlBuvqi6zae+L0=; b=hvsWdKXgtiakw+2lUGrjSPf2DXG8vlzrkjel0+g80KyEwZA3CeFs6iurwDHsieZasbyQW2 JVC6Z9dANWsAF2LQRXtDGIM+IY3j999ziRjdje8sf4VRdxEBkZ5BEK8mymOjwfTYRdUUHX 3y2EYV0Eq1yGAsPX77RqT0RJBl/1oSxH8l/UzYC/aFBJN3KiqrGNQfPWLkhyF6O3JcRWfv 3Vs2TG9yJWNz8cdnNZ8JAp4pXAunvgQhGKqdYbMDfeosUFIRkK+SVUzzj24+RDhJbZ7xlM f9SEuQzmUgjnKaIhrptlz5MoYQHNddAXCWu9gtnkZUkrf273Kemh4bWnO4OLCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656874043; a=rsa-sha256; cv=none; b=IJZmwwR4K+qbxQCAxKOAfM+sugsvHcF9fyTa8xHq4im/Sva5/md6thEVEBvPPfbE4030/+ W+MeD2/Ipe/QOo7yWmG22MKd0gxmQL+Vl2hDs7m5FZ67lioStKxnGAQQBZV5bfHgzBTyEs qXGjMysa+FevQH0eBim+IYesxllYEbzetp5r4ZxDq5lNmi8KVIDioW/PZ2oiRvVctlWRw1 aPL6B2OTHQLrS8UhAjiPjv9dxiOyA9ZlIXKb+Gp1NBs9lKg/aD/7HPk+KpeMTTlnQfixS6 XThmEh5/eG5iPcA9l+0RLCA+O5FfeoDJ2u0ZAAbHUo96AwD3PkSmGWedfBqMbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=c32decee33ce9db095fb2b77e4ece07c5ec50f59 commit c32decee33ce9db095fb2b77e4ece07c5ec50f59 Author: Yuri Victorovich AuthorDate: 2022-07-03 18:45:28 +0000 Commit: Yuri Victorovich CommitDate: 2022-07-03 18:47:18 +0000 devel/criterion: New port: C and C++ unit testing framework for the 21st century This KISS-compliant library makes testsuites as simple as possible. --- devel/Makefile | 1 + devel/criterion/Makefile | 48 +++++++++++++++++++++++++++++++ devel/criterion/distinfo | 7 +++++ devel/criterion/files/example.c | 5 ++++ devel/criterion/files/patch-meson.build | 22 ++++++++++++++ devel/criterion/pkg-descr | 15 ++++++++++ devel/criterion/pkg-plist | 51 +++++++++++++++++++++++++++++++++ 7 files changed, 149 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index e8208656b11c..dd52006d2766 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -441,6 +441,7 @@ SUBDIR += crc32c SUBDIR += creduce SUBDIR += critcl + SUBDIR += criterion SUBDIR += cscope SUBDIR += cscout SUBDIR += csmith diff --git a/devel/criterion/Makefile b/devel/criterion/Makefile new file mode 100644 index 000000000000..be7142673f0b --- /dev/null +++ b/devel/criterion/Makefile @@ -0,0 +1,48 @@ +PORTNAME= criterion +DISTVERSIONPREFIX= v +DISTVERSION= 2.4.1 +CATEGORIES= devel + +MAINTAINER= yuri@FreeBSD.org +COMMENT= C and C++ unit testing framework for the 21st century + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}protobuf>0:devel/py-protobuf@${PY_FLAVOR} \ + nanopb>0:devel/nanopb \ + cmake:devel/cmake \ + protoc:devel/protobuf +LIB_DEPENDS= libboxfort.so:devel/boxfort \ + libffi.so:devel/libffi \ + libgit2.so:devel/libgit2 \ + libnanomsg.so:net/nanomsg \ + libprotobuf-nanopb.so:devel/nanopb +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 + +SHEBANG_FILES= src/protocol/gen-pb.py + +MESON_ARGS= -Db_lundef=false # remove -Wl,--no-undefined to work around bug#265008 +MESON_ARGS= -Dtests=false -Dsamples=false + +CFLAGS+= -fPIC +CXXFLAGS+= -fPIC + +quick-test: + @cd ${TEST_WRKSRC} && \ + ${CC} ${CFLAGS} -I${STAGEDIR}${PREFIX}/include \ + ${STAGEDIR}${PREFIX}/lib/libcriterion.a \ + -L${LOCALBASE}/lib -lboxfort -lprotobuf-nanopb -lgit2 -lnanomsg \ + ${FILESDIR}/example.c && \ + ./a.out # test succeeds when simple::Test fails with assertion + +.include diff --git a/devel/criterion/distinfo b/devel/criterion/distinfo new file mode 100644 index 000000000000..9e662f28da98 --- /dev/null +++ b/devel/criterion/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1656832146 +SHA256 (Snaipe-Criterion-v2.4.1_GH0.tar.gz) = 34eb5c92c2663e0c0a0b77f7c4c2f6d5600ee08a4e41833e06859b7af089c891 +SIZE (Snaipe-Criterion-v2.4.1_GH0.tar.gz) = 870842 +SHA256 (attractivechaos-klib-cdb7e92_GH0.tar.gz) = 659a9b920bc77a88c30e61053cfaecd673ab2120df31efadaf544c195415f390 +SIZE (attractivechaos-klib-cdb7e92_GH0.tar.gz) = 99298 +SHA256 (MrAnno-debugbreak-83bf7e9_GH0.tar.gz) = 6ec24bdf3d361ec2bb7d128c56b8e870a1bb2d6b22eab3c2821eb1e15ccb8919 +SIZE (MrAnno-debugbreak-83bf7e9_GH0.tar.gz) = 7060 diff --git a/devel/criterion/files/example.c b/devel/criterion/files/example.c new file mode 100644 index 000000000000..57d5bdd31c03 --- /dev/null +++ b/devel/criterion/files/example.c @@ -0,0 +1,5 @@ +#include + +Test(simple, Test) { + cr_assert(false, "Hello World!"); +} diff --git a/devel/criterion/files/patch-meson.build b/devel/criterion/files/patch-meson.build new file mode 100644 index 000000000000..769ec915be7f --- /dev/null +++ b/devel/criterion/files/patch-meson.build @@ -0,0 +1,22 @@ +- use the shared library for nanopb + +--- meson.build.orig 2022-07-03 16:28:55 UTC ++++ meson.build +@@ -171,7 +171,7 @@ else + config.set('NN_REQREP_H', '') + endif + +-nanopb = dependency('nanopb', required: false, method: 'cmake', modules: ['nanopb::protobuf-nanopb-static']) ++nanopb = dependency('nanopb', required: false, method: 'cmake', 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', + ]) +- nanopb = nanopb_proj.dependency('protobuf-nanopb-static') ++ nanopb = nanopb_proj.dependency('protobuf-nanopb') + endif + + libgit2 = dependency('libgit2', required: false) diff --git a/devel/criterion/pkg-descr b/devel/criterion/pkg-descr new file mode 100644 index 000000000000..1040d9d56d4a --- /dev/null +++ b/devel/criterion/pkg-descr @@ -0,0 +1,15 @@ +Criterion is a cross-platform C and C++ unit testing framework for the +21st century. + +Most test frameworks for C require a lot of boilerplate code to set up +tests and test suites -- you need to create a main, then register new +test suites, then register the tests within these suites, and finally +call the right functions. + +This gives the user great control, at the unfortunate cost of +simplicity. + +Criterion follows the KISS principle, while keeping the control the +user would have with other frameworks. + +WWW: https://github.com/Snaipe/Criterion diff --git a/devel/criterion/pkg-plist b/devel/criterion/pkg-plist new file mode 100644 index 000000000000..700e6d4d3cc6 --- /dev/null +++ b/devel/criterion/pkg-plist @@ -0,0 +1,51 @@ +include/criterion/abort.h +include/criterion/alloc.h +include/criterion/assert.h +include/criterion/criterion.h +include/criterion/embedded.h +include/criterion/event.h +include/criterion/hooks.h +include/criterion/internal/asprintf-compat.h +include/criterion/internal/assert.h +include/criterion/internal/assert/complex.h +include/criterion/internal/assert/exceptions.h +include/criterion/internal/assert/ieee.h +include/criterion/internal/assert/memory.h +include/criterion/internal/assert/op.h +include/criterion/internal/assert/op.hxx +include/criterion/internal/assert/stream.h +include/criterion/internal/assert/tag.h +include/criterion/internal/assert/tostr.h +include/criterion/internal/assert/types.h +include/criterion/internal/capabilities.h +include/criterion/internal/common.h +include/criterion/internal/deprecation.h +include/criterion/internal/designated-initializer-compat.h +include/criterion/internal/hooks.h +include/criterion/internal/new_asserts.h +include/criterion/internal/ordered-set.h +include/criterion/internal/parameterized.h +include/criterion/internal/preprocess.h +include/criterion/internal/redirect.h +include/criterion/internal/stdio_filebuf.hxx +include/criterion/internal/stream.hxx +include/criterion/internal/test.h +include/criterion/internal/theories.h +include/criterion/logging.h +include/criterion/new/assert.h +include/criterion/new/memory.h +include/criterion/new/stream.h +include/criterion/options.h +include/criterion/output.h +include/criterion/parameterized.h +include/criterion/redirect.h +include/criterion/stats.h +include/criterion/theories.h +include/criterion/types.h +lib/libcriterion.a +lib/libcriterion.so +lib/libcriterion.so.3 +lib/libcriterion.so.3.2.0 +libdata/pkgconfig/criterion.pc +share/locale/de/LC_MESSAGES/criterion.mo +share/locale/fr/LC_MESSAGES/criterion.mo