blob: 323b23975307aee9f0c40b718229bb01eb2ff49f (
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
|
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Minimal, header-only, modern C++ library for terminal goodies"
HOMEPAGE="https://agauniyal.github.io/rang/"
SRC_URI="https://github.com/agauniyal/rang/archive/refs/tags/v${PV}.tar.gz
-> ${P}.gh.tar.gz"
LICENSE="Unlicense"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"
IUSE="test"
RESTRICT="!test? ( test )"
PATCHES="${FILESDIR}/${P}-fix-tests.patch"
BDEPEND="test? ( dev-cpp/doctest )"
src_configure() {
cmake_src_configure
if use test; then
local BUILD_DIR CMAKE_USE_DIR
BUILD_DIR="${WORKDIR}/${P}_test"
CMAKE_USE_DIR="${S}/test"
cmake_src_configure
fi
}
src_compile() {
if use test; then
local BUILD_DIR CMAKE_USE_DIR
BUILD_DIR="${WORKDIR}/${P}_test"
CMAKE_USE_DIR="${S}/test"
cmake_src_compile
fi
}
src_test() {
local BUILD_DIR CMAKE_USE_DIR
BUILD_DIR="${WORKDIR}/${P}_test"
CMAKE_USE_DIR="${S}/test"
cmake_src_test
}
|