From 0a97bed539cc8f61dbdbda86214a5f0d84cc84ff Mon Sep 17 00:00:00 2001 From: Tomas Mozes Date: Thu, 19 Dec 2019 16:05:39 +0100 Subject: [PATCH] dev-libs/criterion: add new package MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Needed for app-admin/syslog-ng tests Package-Manager: Portage-2.3.82, Repoman-2.3.20 Signed-off-by: Tomáš Mózes Signed-off-by: Joonas Niilola --- dev-libs/criterion/Manifest | 1 + dev-libs/criterion/criterion-2.3.3.ebuild | 54 +++++++++++++++++++++++ dev-libs/criterion/metadata.xml | 15 +++++++ 3 files changed, 70 insertions(+) create mode 100644 dev-libs/criterion/Manifest create mode 100644 dev-libs/criterion/criterion-2.3.3.ebuild create mode 100644 dev-libs/criterion/metadata.xml diff --git a/dev-libs/criterion/Manifest b/dev-libs/criterion/Manifest new file mode 100644 index 000000000000..4b651b0aa21e --- /dev/null +++ b/dev-libs/criterion/Manifest @@ -0,0 +1 @@ +DIST criterion-v2.3.3.tar.bz2 1821413 BLAKE2B 7972bf03870ae07da57252f7d62f3f5818755ad9ea2a0bed7b73d42649fbf5069c1a9af16bd8da9366d0506bbc86ec93a12904809bf91e36618d53f5d8674c18 SHA512 bf53716ff90421a42dd4d1bbd61451a4183aa6436af901c222e43e9e9b3e008008a891157a1c982b80c04e7e68aadc287392503094a3c4ad9c2066432d548e16 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..ffb7d5c22020 --- /dev/null +++ b/dev-libs/criterion/criterion-2.3.3.ebuild @@ -0,0 +1,54 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake-utils + +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 )" + +REPEND="dev-libs/nanomsg:=" +DDEPEND="${DEPEND} + test? ( dev-util/cram )" +BDEPEND="virtual/pkgconfig" + +S="${WORKDIR}/${PN}-v${PV}" + +QA_EXECSTACK="usr/lib*/libcriterion.so*" + +src_configure() { + local mycmakeargs=( + -DCTESTS="$(usex test ON OFF)" + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + + if use test; then + cmake-utils_src_make criterion_tests + fi +} + +src_install() { + cmake-utils_src_install + + if [[ "/usr/lib" != "/usr/$(get_libdir)" ]]; then + mkdir -p "${D}/usr/$(get_libdir)" || die + mv "${D}"/usr/lib/libcriterion.so* "${D}/usr/$(get_libdir)/" || die + fi + + sed -i "s@${prefix}/lib@${prefix}/$(get_libdir)@g" \ + "${D}/usr/share/pkgconfig/criterion.pc" || die +} 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 @@ + + + + + hydrapolic@gmail.com + Tomáš Mózes + + + proxy-maint@gentoo.org + Proxy Maintainers + + + Snaipe/Criterion + + -- 2.26.2