blob: 27a2a9ae8b05f2883b3f3ac6822583da3caeeecd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 )"
RDEPEND="dev-libs/nanomsg:="
DEPEND="${RDEPEND}
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
}
|