blob: 1dc668e0e23aef6b20908681ff32e53b13073a75 (
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
55
|
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Command line parser for C++11"
HOMEPAGE="https://cliutils.github.io/CLI11/book/"
SRC_URI="
https://github.com/CLIUtils/CLI11/archive/refs/tags/v${PV}.tar.gz
-> ${P}.tar.gz
"
S=${WORKDIR}/${PN^^}-${PV}
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~x86"
IUSE="doc test"
RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-cpp/catch:0
dev-libs/boost
)
"
BDEPEND="
doc? (
app-text/doxygen
media-gfx/graphviz
)
"
src_configure() {
local mycmakeargs=(
-DCLI11_BUILD_DOCS=$(usex doc)
-DCLI11_BUILD_EXAMPLES=no
-DCLI11_BUILD_TESTS=$(usex test)
$(usev test -DCLI11_BOOST=yes)
)
cmake_src_configure
}
src_compile() {
cmake_src_compile all $(usev doc docs)
}
src_install() {
local DOCS=( CHANGELOG.md README.md book/{chapters,code,*.md} )
cmake_src_install
use doc && dodoc -r "${BUILD_DIR}"/docs/html
}
|