summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-27 18:16:02 +0000
committerSam James <sam@gentoo.org>2021-04-27 18:20:37 +0000
commit43ab977c0eb0504b46bf04823afb8018da15e5da (patch)
tree38ad8430531c749ccb070c9dbe785db626754d38 /app-forensics/aflplusplus
parentdev-java/commons-io: removed obsolete and vulnerable 2.4 (diff)
downloadgentoo-43ab977c0eb0504b46bf04823afb8018da15e5da.tar.gz
gentoo-43ab977c0eb0504b46bf04823afb8018da15e5da.tar.bz2
gentoo-43ab977c0eb0504b46bf04823afb8018da15e5da.zip
app-forensics/aflplusplus: allow LLVM 12, add optfeature for sanitizers, clang dep
* Allow LLVM 12 * Add optfeature for sanitizers * Clang is required for afl-* testing during build (and generating some targets) Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-forensics/aflplusplus')
-rw-r--r--app-forensics/aflplusplus/aflplusplus-3.12c-r2.ebuild (renamed from app-forensics/aflplusplus/aflplusplus-3.12c-r1.ebuild)25
1 files changed, 19 insertions, 6 deletions
diff --git a/app-forensics/aflplusplus/aflplusplus-3.12c-r1.ebuild b/app-forensics/aflplusplus/aflplusplus-3.12c-r2.ebuild
index d6d3ef5f5104..4a430c667736 100644
--- a/app-forensics/aflplusplus/aflplusplus-3.12c-r1.ebuild
+++ b/app-forensics/aflplusplus/aflplusplus-3.12c-r2.ebuild
@@ -4,8 +4,8 @@
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
-LLVM_MAX_SLOT=11
-inherit toolchain-funcs llvm python-single-r1
+LLVM_MAX_SLOT=12
+inherit toolchain-funcs llvm optfeature python-single-r1
DESCRIPTION="A fork of AFL, the popular compile-time instrumentation fuzzer"
HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus"
@@ -14,7 +14,7 @@ S="${WORKDIR}/AFLplusplus-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~arm64"
IUSE="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -23,12 +23,14 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# This isn't compatible with sandbox
RESTRICT="test"
+# It turns out we need Clang too
RDEPEND="
${PYTHON_DEPS}
+ >=sys-devel/llvm-10:=
|| (
- sys-devel/llvm:10
- sys-devel/llvm:11
- sys-devel/llvm:12
+ sys-devel/clang:10
+ sys-devel/clang:11
+ sys-devel/clang:12
)
"
DEPEND="
@@ -43,6 +45,11 @@ PATCHES=(
"${FILESDIR}/${PN}-3.0c-CFLAGS.patch"
)
+llvm_check_deps() {
+ has_version -b "sys-devel/clang:${LLVM_SLOT}" && \
+ has_version -b "sys-devel/llvm:${LLVM_SLOT}"
+}
+
pkg_setup() {
llvm_pkg_setup
python-single-r1_pkg_setup
@@ -82,3 +89,9 @@ src_install() {
MAN_PATH="${EPREFIX}/usr/share/man/man8" \
install
}
+
+pkg_postinst() {
+ # TODO: Any otherrs?
+ optfeature "fuzzing with AFL_USE_ASAN" sys-libs/compiler-rt-sanitizers[asan]
+ optfeature "fuzzing with AFL_USE_MSAN" sys-libs/compiler-rt-sanitizers[msan]
+}