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

EAPI=8

inherit toolchain-funcs

DESCRIPTION="A general purpose fuzzer with feedback support"
HOMEPAGE="https://honggfuzz.dev/"
SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

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

RDEPEND="
	>=sys-libs/binutils-libs-2.29:=
	sys-libs/libunwind:=
	app-arch/xz-utils
	clang? ( sys-libs/blocksruntime )
"

DEPEND="${RDEPEND}
	elibc_musl? ( sys-libs/queue-standalone )"

DOCS=(
	CHANGELOG
	COPYING
	CONTRIBUTING.md
	README.md
)

PATCHES=(
	"${FILESDIR}"/${PN}-2.0-no-werror.patch
	"${FILESDIR}"/${PN}-2.5_binutils239.patch
)

pkg_pretend() {
	if tc-is-clang; then
		use clang || die "${P}: to use clang enable USE=clang for ${P} (bug #729256)."
	fi
}

src_prepare() {
	default
	tc-export AR CC
	export CFLAGS
	export LDFLAGS
}

src_install() {
	dobin ${PN}
	dobin hfuzz_cc/hfuzz-cc

	einstalldocs
}