1 |
commit: 43ab977c0eb0504b46bf04823afb8018da15e5da |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 27 18:16:02 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 27 18:20:37 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43ab977c |
7 |
|
8 |
app-forensics/aflplusplus: allow LLVM 12, add optfeature for sanitizers, clang dep |
9 |
|
10 |
* Allow LLVM 12 |
11 |
* Add optfeature for sanitizers |
12 |
* Clang is required for afl-* testing during build (and generating some |
13 |
targets) |
14 |
|
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
...3.12c-r1.ebuild => aflplusplus-3.12c-r2.ebuild} | 25 ++++++++++++++++------ |
18 |
1 file changed, 19 insertions(+), 6 deletions(-) |
19 |
|
20 |
diff --git a/app-forensics/aflplusplus/aflplusplus-3.12c-r1.ebuild b/app-forensics/aflplusplus/aflplusplus-3.12c-r2.ebuild |
21 |
similarity index 74% |
22 |
rename from app-forensics/aflplusplus/aflplusplus-3.12c-r1.ebuild |
23 |
rename to app-forensics/aflplusplus/aflplusplus-3.12c-r2.ebuild |
24 |
index d6d3ef5f510..4a430c66773 100644 |
25 |
--- a/app-forensics/aflplusplus/aflplusplus-3.12c-r1.ebuild |
26 |
+++ b/app-forensics/aflplusplus/aflplusplus-3.12c-r2.ebuild |
27 |
@@ -4,8 +4,8 @@ |
28 |
EAPI=7 |
29 |
|
30 |
PYTHON_COMPAT=( python3_{7,8,9} ) |
31 |
-LLVM_MAX_SLOT=11 |
32 |
-inherit toolchain-funcs llvm python-single-r1 |
33 |
+LLVM_MAX_SLOT=12 |
34 |
+inherit toolchain-funcs llvm optfeature python-single-r1 |
35 |
|
36 |
DESCRIPTION="A fork of AFL, the popular compile-time instrumentation fuzzer" |
37 |
HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus" |
38 |
@@ -14,7 +14,7 @@ S="${WORKDIR}/AFLplusplus-${PV}" |
39 |
|
40 |
LICENSE="Apache-2.0" |
41 |
SLOT="0" |
42 |
-KEYWORDS="~amd64" |
43 |
+KEYWORDS="~amd64 ~arm64" |
44 |
IUSE="test" |
45 |
|
46 |
REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
47 |
@@ -23,12 +23,14 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
48 |
# This isn't compatible with sandbox |
49 |
RESTRICT="test" |
50 |
|
51 |
+# It turns out we need Clang too |
52 |
RDEPEND=" |
53 |
${PYTHON_DEPS} |
54 |
+ >=sys-devel/llvm-10:= |
55 |
|| ( |
56 |
- sys-devel/llvm:10 |
57 |
- sys-devel/llvm:11 |
58 |
- sys-devel/llvm:12 |
59 |
+ sys-devel/clang:10 |
60 |
+ sys-devel/clang:11 |
61 |
+ sys-devel/clang:12 |
62 |
) |
63 |
" |
64 |
DEPEND=" |
65 |
@@ -43,6 +45,11 @@ PATCHES=( |
66 |
"${FILESDIR}/${PN}-3.0c-CFLAGS.patch" |
67 |
) |
68 |
|
69 |
+llvm_check_deps() { |
70 |
+ has_version -b "sys-devel/clang:${LLVM_SLOT}" && \ |
71 |
+ has_version -b "sys-devel/llvm:${LLVM_SLOT}" |
72 |
+} |
73 |
+ |
74 |
pkg_setup() { |
75 |
llvm_pkg_setup |
76 |
python-single-r1_pkg_setup |
77 |
@@ -82,3 +89,9 @@ src_install() { |
78 |
MAN_PATH="${EPREFIX}/usr/share/man/man8" \ |
79 |
install |
80 |
} |
81 |
+ |
82 |
+pkg_postinst() { |
83 |
+ # TODO: Any otherrs? |
84 |
+ optfeature "fuzzing with AFL_USE_ASAN" sys-libs/compiler-rt-sanitizers[asan] |
85 |
+ optfeature "fuzzing with AFL_USE_MSAN" sys-libs/compiler-rt-sanitizers[msan] |
86 |
+} |