# Contributor: Marian # Maintainer: Marian pkgname=afl++ pkgver=4.04c pkgrel=0 pkgdesc="Fuzzer relying on genetic algorithms instead of brute force" url="https://aflplus.plus/" # s390x: blocked by missing lld # x86: basic unit tests fails arch="all !s390x !x86" license="Apache-2.0" # afl-cmin requires stat _llvmver=15 depends=" clang$_llvmver lld llvm$_llvmver python3 " makedepends=" clang$_llvmver-dev gmp-dev grep llvm$_llvmver-dev python3-dev " checkdepends=" bash cmocka-dev " subpackages="$pkgname-doc" 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/$pkgver.tar.gz 0001-fix-missing-max-path-define.patch 0003-fix-wrong-format-specifier.patch 0004-busybox-stat.patch " builddir="$srcdir/AFLplusplus-$pkgver" build() { # AFL++ is expecting clang, clang++ and ld.lld in LLVM_BINDIR, # which is set to $(llvm-config --bindir) by default, which points # to /usr/lib/llvm13/bin rather than /usr/bin export LLVM_BINDIR=/usr/bin make AFL_NO_X86=1 LLVM_LTO=1 PREFIX=/usr all } check() { 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/ } sha512sums=" 1c2e2e6677e87de2f069e1acdc2319580e488670c3d4975a0f0807da33965c4a14087a7c734195d0a47260acc91f7211b10bd905aac99bdab81145b282edb44e afl++-4.04c.tar.gz f12285163797823d820029b7bc4591fa040aac137724611e3643a77fcf49f04f59efb0e2e95863966636299dd92862bc5319d4434d4543289dfb8392dc39b97a 0001-fix-missing-max-path-define.patch 29063f71feff74bb7c74d7e11da654d120d76b178532321ee6c40bf766e3a8834cc09458fc0afdade96c2119fb2fbbb5fd8e01ae5df08ea615688872797380e1 0003-fix-wrong-format-specifier.patch 4a00b4c5a494d06896746e5c5dac93f736efa60a51bcc659adec6ec1c928804af6b3f401a41aaf99451ea7c1611607691deea879b41d3b607c1a9fc41aa914f0 0004-busybox-stat.patch "