aboutsummaryrefslogtreecommitdiffstats
path: root/community/afl++/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/afl++/APKBUILD')
-rw-r--r--community/afl++/APKBUILD92
1 files changed, 92 insertions, 0 deletions
diff --git a/community/afl++/APKBUILD b/community/afl++/APKBUILD
new file mode 100644
index 00000000000..cce4df94df7
--- /dev/null
+++ b/community/afl++/APKBUILD
@@ -0,0 +1,92 @@
+# Contributor: Marian <marian.buschsieweke@ovgu.de>
+# Maintainer: Marian <marian.buschsieweke@ovgu.de>
+pkgname=afl++
+pkgver=4.10c
+pkgrel=2
+pkgdesc="Fuzzer relying on genetic algorithms instead of brute force"
+url="https://aflplus.plus/"
+# s390x: blocked by missing lld
+# x86: basic unit tests fails
+# 32-bit: unlikely anyone is doing fuzzing here
+arch="all !armhf !armv7 !s390x !x86"
+license="Apache-2.0"
+# afl-cmin requires stat
+_llvmver=17
+depends="
+ clang$_llvmver
+ compiler-rt
+ lld~$_llvmver
+ llvm$_llvmver
+ python3
+ "
+# install -T
+makedepends="
+ clang$_llvmver-dev
+ gmp-dev
+ grep
+ llvm$_llvmver-dev
+ python3-dev
+ "
+checkdepends="
+ bash
+ cmocka-dev
+ coreutils
+ grep
+ "
+subpackages="
+ $pkgname-doc
+ afl++-tools
+ "
+provides="
+ afl=$pkgver-r$pkgrel
+ afl-clang=$pkgver-r$pkgrel
+ afl-gcc=$pkgver-r$pkgrel
+ "
+source="
+ $pkgname-$pkgver.tar.gz::https://github.com/AFLplusplus/AFLplusplus/archive/refs/tags/v$pkgver.tar.gz
+ "
+builddir="$srcdir/AFLplusplus-$pkgver"
+
+build() {
+ export PATH="$PATH:/usr/lib/llvm$_llvmver/bin"
+ export NO_NYX=1
+ export AFL_NO_X86=1
+ export LLVM_LTO=1
+ make PREFIX=/usr all
+}
+
+check() {
+ # Unset our CFLAGS/CXXFLAGS for the tests since these may
+ # interact in unexpected ways with afl-cc instrumentation.
+ CFLAGS= CXXFLAGS= make AFL_NO_X86=1 test
+}
+
+package() {
+ make AFL_NO_X86=1 PREFIX=/usr DESTDIR="$pkgdir" install
+
+ # Test cases contain x86 binaries that cause trouble with strip on non-x86
+ # architectures, so just drop the test cases here.
+ rm -rf "$pkgdir"/usr/share/afl/testcases/
+
+ # afl-cmin.bash is the same as afl-cmin, but implemented differently making
+ # use of bash features. No need for the same functionality twice.
+ rm "$pkgdir"/usr/bin/afl-cmin.bash
+}
+
+tools() {
+ pkgdesc="AFL++ tools and utilities"
+ depends="
+ afl++
+ coreutils
+ grep
+ "
+
+ amove usr/bin/afl-cmin
+ amove usr/bin/afl-plot
+ amove usr/bin/afl-showmap
+ amove usr/bin/afl-tmin
+}
+
+sha512sums="
+688a2cb1f8eeee17456866694b605c723f3411ba43171b0b82f1618ee61a06df7940d7cd9d67dc2e6680542a7273875beb48d99cbfef3de37c019e1e952c5fd4 afl++-4.10c.tar.gz
+"