summaryrefslogtreecommitdiff
blob: 28d22f8553d9d6355a9e2a7e254733c3b358c7cf (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
PYTHON_COMPAT=( python3_{9,10,11,12} )
inherit linux-info python-any-r1 toolchain-funcs

MY_P=linux-${PV}

S=${WORKDIR}/${MY_P}

DESCRIPTION="Developer documentation generated from the Linux kernel"
HOMEPAGE="https://www.kernel.org/"
SRC_URI="https://www.kernel.org/pub/linux/kernel/v6.x/${MY_P}.tar.xz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sparc ~x86"

IUSE="graphviz"

RDEPEND="graphviz? ( >=media-gfx/graphviz-5.0.0 )"

BDEPEND="${PYTHON_DEPS}
	>=dev-python/sphinx-7.2.3
	dev-python/sphinx-rtd-theme
	media-libs/fontconfig
	$(python_gen_any_dep '
		>=dev-python/pyyaml-6.0[${PYTHON_USEDEP}]
	')"

src_prepare() {
	default
	# Fix the Python shebangs.
	python_fix_shebang "${S}/Documentation/sphinx/"
}

src_compile() {
	local ARCH="$(tc-arch-kernel)"
	unset KBUILD_OUTPUT
	HTML_DOCS=( Documentation/output/. )
	emake htmldocs
}

src_install() {
	einstalldocs
}