aboutsummaryrefslogtreecommitdiffstats
path: root/community/afl/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/afl/APKBUILD')
-rw-r--r--community/afl/APKBUILD44
1 files changed, 30 insertions, 14 deletions
diff --git a/community/afl/APKBUILD b/community/afl/APKBUILD
index 04f45a0262..5f36e9aaa5 100644
--- a/community/afl/APKBUILD
+++ b/community/afl/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Marian <marian.buschsieweke@ovgu.de>
# Maintainer: Marian <marian.buschsieweke@ovgu.de>
pkgname=afl
-pkgver=2.52b
-pkgrel=2
+pkgver=2.56b
+pkgrel=0
pkgdesc="Fuzzer relying on genetic algorithms instead of brute force"
url="http://lcamtuf.coredump.cx/afl/"
arch="all !x86"
@@ -10,13 +10,15 @@ license="Apache-2.0"
options="!check" # no tests provided
depends="clang llvm"
makedepends="clang-dev llvm-dev"
-subpackages="$pkgname-doc"
-source="http://lcamtuf.coredump.cx/$pkgname/releases/$pkgname-$pkgver.tgz"
+subpackages="$pkgname-doc $pkgname-clang:_clang $pkgname-gcc:_gcc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/google/AFL/archive/v$pkgver.tar.gz"
+builddir="$srcdir/AFL-$pkgver"
+
+CC=clang
build() {
- local dir; for dir in "$builddir" "$builddir"/llvm_mode; do
- make AFL_NO_X86=1 -C "$dir" PREFIX=/usr CC=clang
- done
+ make AFL_NO_X86=1 PREFIX=/usr
+ make -C llvm_mode AFL_NO_X86=1 PREFIX=/usr
}
package() {
@@ -24,12 +26,6 @@ package() {
install -Dm644 llvm_mode/README.llvm \
"$pkgdir"/usr/share/doc/$pkgname/README.llvm_mode
- # Only install the llvm_mode of afl. Even though this is still
- # considered experimental it is faster than the gcc mode and
- # portable to non-x86 platforms.
- rm -f "$pkgdir/usr/bin/afl-clang" "$pkgdir/usr/bin/afl-clang++" \
- "$pkgdir/usr/bin/afl-gcc" "$pkgdir/usr/bin/afl-g++"
-
# small_exec.elf is an Intel binary which causes an error during
# the strip() process on non Intel plattforms.
case "$CARCH" in
@@ -38,4 +34,24 @@ package() {
esac
}
-sha512sums="30d4526440cff109ef2a014278f52a04b1b33560b6ab7d7f59e1516655858ffb36dac81963d2d8f214984776742ca9a7942c27c8fb61f7eb70b5b35cd029008f afl-2.52b.tgz"
+_clang() {
+ description="$pkgdesc - CLang instrumention support"
+ depends="clang"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/afl-clang \
+ "$pkgdir"/usr/bin/afl-clang++ \
+ "$subpkgdir"/usr/bin
+}
+
+_gcc() {
+ description="$pkgdesc - GCC instrumention support"
+ depends="gcc"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/afl-gcc \
+ "$pkgdir"/usr/bin/afl-g++ \
+ "$subpkgdir"/usr/bin
+}
+
+sha512sums="4e76fc503fe615aac4d0bbd8e3632d5cfbb7a3ac107be03c399afc024a8ad364dba933875d50a9b65083159faf6ebef5e13c39b25db977b01bd29b6340cad162 afl-2.56b.tar.gz"