summaryrefslogtreecommitdiff
path: root/dev-libs/criterion
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/criterion')
-rw-r--r--dev-libs/criterion/Manifest9
-rw-r--r--dev-libs/criterion/criterion-2.3.3.ebuild55
-rw-r--r--dev-libs/criterion/criterion-2.4_pre20200110.ebuild64
-rw-r--r--dev-libs/criterion/files/criterion-libdir.patch30
-rw-r--r--dev-libs/criterion/metadata.xml15
5 files changed, 173 insertions, 0 deletions
diff --git a/dev-libs/criterion/Manifest b/dev-libs/criterion/Manifest
new file mode 100644
index 000000000000..94e4e94b6d81
--- /dev/null
+++ b/dev-libs/criterion/Manifest
@@ -0,0 +1,9 @@
+AUX criterion-libdir.patch 977 BLAKE2B 4d8c3510563d32a0b9bb8d61d90379173403f51046b87345e41f3f85014c8f88ff90b8c15fa0de1d99f4440c4d6d1a6f2735f73bf3e2f49bb87e6618ac16a97f SHA512 ff63aa827deb529c8e87978af9646cb52cc632edb7cd31fe398a989786303fef3830af3fbcedc59b1aa09268abc6c697f31355d084387e28067ebd3a1ad2c792
+DIST criterion-4b5174ebda04ab76fe65eec25b5b6ea0809055e7.tar.gz 862951 BLAKE2B c01f95cd573a5f8cb92fb7e6a38b2b27a8066d8a690d51374f38adab92d41d4d408316c0195767445d8bd417191f4c5914c5855d7f0012ec0d91e32398373f8f SHA512 58560ec81eb6017afa0491db5f1f3e16961b4c4f3eddae3d2d04c5bcd4e9cf13df515745531e512a6463ec5ab98bcd8936a8c23e5382535cb6f8b8bfb8cb2c9a
+DIST criterion-v2.3.3.tar.bz2 1821413 BLAKE2B 7972bf03870ae07da57252f7d62f3f5818755ad9ea2a0bed7b73d42649fbf5069c1a9af16bd8da9366d0506bbc86ec93a12904809bf91e36618d53f5d8674c18 SHA512 bf53716ff90421a42dd4d1bbd61451a4183aa6436af901c222e43e9e9b3e008008a891157a1c982b80c04e7e68aadc287392503094a3c4ad9c2066432d548e16
+DIST debugbreak-6b79ec8d8f8d4603111f580a0537f8f31c484c32.tar.gz 5613 BLAKE2B 78711c3c46d567fb7110a70dfddc2fb5e413eb5c6b9f67d5d8b5f8a663af854cb50f3b9d9947a2c14909dcd2b34f762192a4fbe8b32dcde7c9894f0560ccf769 SHA512 f4bb95b3f931545800abbb86aa787939cc1c30f464e465689aff3fff3d753766bafe4de9065b762d9db882608b2df250514ab38fc9c476cbd6d7d95d516c75cb
+DIST klib-cdb7e9236dc47abf8da7ebd702cc6f7f21f0c502.tar.gz 99303 BLAKE2B 7804c030106ffab44afcbc1ac77d644e7dfef7c107d4f9679a3a4b7506e41ada65e87113831f94fc5c6f70073356c38a317153e01f1985522029990e9af40544 SHA512 fe4f0cd9b5ff2d5605d388f8a67d6c7211320d0fea6fb9b2df0c9b1e67a1f683b80b86cac007b0cfbd264b75bc0e4849e772506c2ee66b86967e5ee24cc89e1d
+DIST nanopb-6a6903be6084bb3f5a98a3341acef2aa05c61df9.tar.gz 248884 BLAKE2B 5ab65dbee87686ac8fb4985c3a8c71cdc946580248318a4f566550e5f7dab492c00cf3be471e04313a15c4ad3659f71744bbb30686506d2950588aa3c26a37fb SHA512 14ddc420e8a38116d0f7fbf01623728f14048ddb41b3ac6024d7610532071ecb8ce88b25e3440f9f4bfe9ee7d376071e2eb9e0c166f3e2982f35cc155dcf0362
+EBUILD criterion-2.3.3.ebuild 1072 BLAKE2B 11263468ead77bec500b65fad1873f37f11d01041843e1aa137812d4e1385b706920d397c32b9c23671a0a061b4ef0eaf38cd70e75ca8b31037cd69ba02f5b04 SHA512 1592287e01a1ebebfd13658db3de23a5c10d8ed162da81460519d522de23a898c994660861ba825ee57b6863f1aeb01930d98bfaf096f370d33de40c6eabc2e7
+EBUILD criterion-2.4_pre20200110.ebuild 1855 BLAKE2B d779528295bb21d92af34fda959032a1303d62e9e79f86ff5439deae42bb02d58365b11ef572973115d0506ca0641cee1438963d84de851dd99724b598c6f96f SHA512 cc297c64de4d778b0ed4156c3015c39380fad8a79536267985fdb953c7898cbc8006b87a59c4344d10d41171915cce757bd2c0e7a297b1279d90db34537955e5
+MISC metadata.xml 464 BLAKE2B 336514e525410272f84e05c76be4fad57be4198bc88ebcc5f048615f233a0b69035b27728e15b2190ba04c13671aee6756be24b4fe8a5b09118b78abef918529 SHA512 42131d0130a9d260ac5f305a261c883a3c6222c21abdeef290d9f71f3080932acbd4127eb44266b4c69c782eb63f18df4fcf4a5a97829d9f8483fc1d3d853a1c
diff --git a/dev-libs/criterion/criterion-2.3.3.ebuild b/dev-libs/criterion/criterion-2.3.3.ebuild
new file mode 100644
index 000000000000..1f2eda350a62
--- /dev/null
+++ b/dev-libs/criterion/criterion-2.3.3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit cmake python-any-r1
+
+DESCRIPTION="Cross platform unit testing framework for C and C++"
+HOMEPAGE="https://github.com/Snaipe/Criterion"
+SRC_URI="https://github.com/Snaipe/Criterion/releases/download/v${PV}/${PN}-v${PV}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/nanomsg:="
+DEPEND="${RDEPEND}
+ test? (
+ $(python_gen_any_dep 'dev-util/cram[${PYTHON_USEDEP}]')
+ )"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES="${FILESDIR}/${PN}-libdir.patch"
+S="${WORKDIR}/${PN}-v${PV}"
+
+QA_EXECSTACK="usr/lib*/libcriterion.so*"
+
+python_check_deps() {
+ has_version "dev-util/cram[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCTESTS="$(usex test ON OFF)"
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use test; then
+ cmake_build criterion_tests
+ fi
+}
diff --git a/dev-libs/criterion/criterion-2.4_pre20200110.ebuild b/dev-libs/criterion/criterion-2.4_pre20200110.ebuild
new file mode 100644
index 000000000000..d26ebb1a9568
--- /dev/null
+++ b/dev-libs/criterion/criterion-2.4_pre20200110.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit meson python-any-r1
+
+CRITERION_COMMIT="4b5174ebda04ab76fe65eec25b5b6ea0809055e7"
+DEBUGBREAK_COMMIT="6b79ec8d8f8d4603111f580a0537f8f31c484c32"
+KLIB_COMMIT="cdb7e9236dc47abf8da7ebd702cc6f7f21f0c502"
+NANOPB_COMMIT="6a6903be6084bb3f5a98a3341acef2aa05c61df9"
+
+DESCRIPTION="Cross platform unit testing framework for C and C++"
+HOMEPAGE="https://github.com/Snaipe/Criterion"
+SRC_URI="https://github.com/Snaipe/Criterion/archive/${CRITERION_COMMIT}.tar.gz -> criterion-${CRITERION_COMMIT}.tar.gz
+ https://github.com/scottt/debugbreak/archive/${DEBUGBREAK_COMMIT}.tar.gz -> debugbreak-${DEBUGBREAK_COMMIT}.tar.gz
+ https://github.com/attractivechaos/klib/archive/${KLIB_COMMIT}.tar.gz -> klib-${KLIB_COMMIT}.tar.gz
+ https://github.com/nanopb/nanopb/archive/${NANOPB_COMMIT}.tar.gz -> nanopb-${NANOPB_COMMIT}.tar.gz"
+
+LICENSE="BSD-2 MIT ZLIB"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/nanomsg:=
+ dev-libs/libgit2:=
+ virtual/libffi:="
+DEPEND="${RDEPEND}
+ dev-libs/boxfort
+ test? (
+ $(python_gen_any_dep 'dev-util/cram[${PYTHON_USEDEP}]')
+ )"
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}/Criterion-${CRITERION_COMMIT}"
+
+python_check_deps() {
+ has_version "dev-util/cram[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ rm -r dependencies/{debugbreak,klib,nanopb} || die
+ mv "${WORKDIR}/debugbreak-${DEBUGBREAK_COMMIT}" dependencies/debugbreak || die
+ mv "${WORKDIR}/klib-${KLIB_COMMIT}" dependencies/klib || die
+ mv "${WORKDIR}/nanopb-${NANOPB_COMMIT}" dependencies/nanopb || die
+}
+
+src_configure() {
+ local emesonargs=(
+ -Dsamples=$(usex test true false)
+ -Dtests=$(usex test true false)
+ )
+
+ meson_src_configure
+}
diff --git a/dev-libs/criterion/files/criterion-libdir.patch b/dev-libs/criterion/files/criterion-libdir.patch
new file mode 100644
index 000000000000..91b28b06b947
--- /dev/null
+++ b/dev-libs/criterion/files/criterion-libdir.patch
@@ -0,0 +1,30 @@
+diff --git a/.cmake/Modules/PackageUtils.cmake b/.cmake/Modules/PackageUtils.cmake
+index 593f2d1..a771fd5 100644
+--- a/.cmake/Modules/PackageUtils.cmake
++++ b/.cmake/Modules/PackageUtils.cmake
+@@ -50,9 +50,9 @@ function (cr_add_library _LIB)
+ endforeach ()
+
+ install(TARGETS ${_LIB}
+- RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib ${install_flags}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ${install_flags}
+ )
+ endfunction ()
+
+diff --git a/src/criterion.pc.in b/src/criterion.pc.in
+index 18ac3d6..23737a4 100644
+--- a/src/criterion.pc.in
++++ b/src/criterion.pc.in
+@@ -1,7 +1,7 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+ includedir=${prefix}/include
+-libdir=${prefix}/lib
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+
+ Name: @PROJECT_NAME@
+ Description: A KISS, Cross platform unit testing framework for C and C++
diff --git a/dev-libs/criterion/metadata.xml b/dev-libs/criterion/metadata.xml
new file mode 100644
index 000000000000..5df5b2863638
--- /dev/null
+++ b/dev-libs/criterion/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hydrapolic@gmail.com</email>
+ <name>Tomáš Mózes</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Snaipe/Criterion</remote-id>
+ </upstream>
+</pkgmetadata>