Gentoo Archives: gentoo-commits

From: Louis Sautier <sbraz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/unittest++/
Date: Sat, 15 Aug 2020 17:46:04
Message-Id: 1597513536.3e7f1e4540edf3b33ec741fd2c2c03547b7de535.sbraz@gentoo
1 commit: 3e7f1e4540edf3b33ec741fd2c2c03547b7de535
2 Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 15 17:39:53 2020 +0000
4 Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 15 17:45:36 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e7f1e45
7
8 dev-libs/unittest++: bump to EAPI=7, migrate to cmake.eclass
9
10 Package-Manager: Portage-3.0.2, Repoman-2.3.23
11 Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
12
13 dev-libs/unittest++/unittest++-2.0.0-r1.ebuild | 42 ++++++++++++++++++++++++++
14 1 file changed, 42 insertions(+)
15
16 diff --git a/dev-libs/unittest++/unittest++-2.0.0-r1.ebuild b/dev-libs/unittest++/unittest++-2.0.0-r1.ebuild
17 new file mode 100644
18 index 00000000000..0da36ef58d5
19 --- /dev/null
20 +++ b/dev-libs/unittest++/unittest++-2.0.0-r1.ebuild
21 @@ -0,0 +1,42 @@
22 +# Copyright 1999-2020 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +inherit cmake
28 +
29 +MY_PN="unittest-cpp"
30 +MY_P="${MY_PN}-${PV}"
31 +
32 +DESCRIPTION="A lightweight unit testing framework for C++"
33 +HOMEPAGE="https://unittest-cpp.github.io/"
34 +SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
35 +S="${WORKDIR}/${MY_P}"
36 +
37 +LICENSE="MIT"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86"
40 +IUSE="test"
41 +RESTRICT="!test? ( test )"
42 +
43 +# https://github.com/unittest-cpp/unittest-cpp/commit/2423fcac7668aa9c331a2dcf024c3ca06742942d
44 +PATCHES=( "${FILESDIR}/${P}-fix-tests-with-clang.patch" )
45 +
46 +src_prepare() {
47 + cmake_src_prepare
48 +
49 + # https://github.com/unittest-cpp/unittest-cpp/pull/163
50 + sed -i '/run unit tests as post build step/,/Running unit tests/d' \
51 + CMakeLists.txt || die
52 +}
53 +
54 +src_configure() {
55 + local mycmakeargs=(
56 + -DUTPP_INCLUDE_TESTS_IN_BUILD=$(usex test)
57 + )
58 + cmake_src_configure
59 +}
60 +
61 +src_test() {
62 + "${BUILD_DIR}/TestUnitTest++" || die "Tests failed"
63 +}