aboutsummaryrefslogtreecommitdiff
blob: ed96f1807f5adce9dfadf801ef4ebb0d9bb86a37 (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 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit meson

DESCRIPTION="The DWARF Debugging Information Format"
HOMEPAGE="
	https://www.prevanders.net/dwarf.html
	https://www.dwarfstd.org
	https://github.com/davea42/libdwarf-code
"
SRC_URI="https://www.prevanders.net/${P}.tar.xz"

LICENSE="LGPL-2.1 GPL-2 BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc dwarfexample dwarfgen +elf"

DEPEND="
	app-arch/zstd:=
	sys-libs/zlib:=
	elf? ( virtual/libelf:= )
"
RDEPEND="${DEPEND}"
BDEPEND="doc? ( app-doc/doxygen )"

DOCS=( AUTHORS NEWS README{,.md} )

src_configure() {
	local emesonargs=(
		$(meson_use dwarfgen)
		$(meson_use dwarfexample)
		$(meson_use doc)
		$(meson_use elf libelf)
	)
	meson_src_configure
}

src_install(){
	meson_src_install

	dodoc ChangeLog* doc/*.pdf
	if use doc; then
		mv "${ED}"/usr/share/doc/{${PN},${PF}}/html || die
	fi
}