aboutsummaryrefslogtreecommitdiff
blob: 1eb01f13249067a3fb8ab7670a3843a75c9f8d14 (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
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DOCS_BUILDER="sphinx"
DOCS_AUTODOC=0
DOCS_DIR="docs"
DOCS_DEPEND=(
)
PYTHON_COMPAT=( python3_{10..11} )
inherit python-any-r1 docs nim-utils

DESCRIPTION="A Nim build system"
HOMEPAGE="
	https://nimbus.sysrq.in/
	https://git.sysrq.in/nimbus/about/
"
SRC_URI="https://git.sysrq.in/${PN}/snapshot/${P}.tar.bz2"

LICENSE="Apache-2.0 BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug"

RDEPEND="dev-lang/nim"
BDEPEND="
	${RDEPEND}
	doc? (
		$(python_gen_any_dep '
			dev-python/sphinx-notfound-page[${PYTHON_USEDEP}]
			dev-python/sphinx-prompt[${PYTHON_USEDEP}]
			dev-python/sphinx-sitemap[${PYTHON_USEDEP}]
		')
	)
"

python_check_deps() {
	use doc || return 0

	python_has_version "dev-python/sphinx-notfound-page[${PYTHON_USEDEP}]" &&
	python_has_version "dev-python/sphinx-prompt[${PYTHON_USEDEP}]" &&
	python_has_version "dev-python/sphinx-sitemap[${PYTHON_USEDEP}]"
}

src_configure() {
	nim_gen_config
}

src_compile() {
	enim c src/nimbus
	enim c src/txt2deps

	docs_compile
}

src_test() {
	etestament all
}

src_install() {
	dobin src/nimbus
	dobin src/txt2deps

	doman man/*.1
	einstalldocs
}