summaryrefslogtreecommitdiff
path: root/app-forensics/afl
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /app-forensics/afl
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'app-forensics/afl')
-rw-r--r--app-forensics/afl/Manifest1
-rw-r--r--app-forensics/afl/afl-2.57b-r2.ebuild51
-rw-r--r--app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch14
-rw-r--r--app-forensics/afl/files/afl-2.57b-install-readmemd.diff12
-rw-r--r--app-forensics/afl/metadata.xml8
5 files changed, 86 insertions, 0 deletions
diff --git a/app-forensics/afl/Manifest b/app-forensics/afl/Manifest
new file mode 100644
index 000000000000..f67a27b26981
--- /dev/null
+++ b/app-forensics/afl/Manifest
@@ -0,0 +1 @@
+DIST afl-2.57b.tar.gz 839871 BLAKE2B 69029d59451e468528386154e8938a1a7303765e039f98aa05e36f07314398f60ff2578f765142e1f1ff653e5ab93ea53a2efb98abe275046ebacdd3ca8363b6 SHA512 5d12b96229e966aeb11deb47cd8eb36cde2fa32656eb187db02c7240909d6acda36be59b2baf7e42cddd228d25ec94c8bffc3fa27f7f4b5e1e462b62929ce75d
diff --git a/app-forensics/afl/afl-2.57b-r2.ebuild b/app-forensics/afl/afl-2.57b-r2.ebuild
new file mode 100644
index 000000000000..1d63aae81046
--- /dev/null
+++ b/app-forensics/afl/afl-2.57b-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+# See https://github.com/google/AFL/pull/117
+PATCHES=(
+ "${FILESDIR}/${P}-install-readmemd.diff"
+ "${FILESDIR}/${P}-implicit-int-clang16.patch"
+)
+
+DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
+HOMEPAGE="https://lcamtuf.coredump.cx/afl/"
+SRC_URI="https://github.com/google/AFL/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="sys-devel/gcc:*
+ !app-forensics/aflplusplus"
+RDEPEND="${DEPEND}"
+QA_PREBUILT="/usr/share/afl/testcases/others/elf/small_exec.elf"
+
+S="${WORKDIR}/AFL-${PV}"
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ PREFIX="${EPREFIX}/usr" \
+ HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+ DOC_PATH="${EPREFIX}/usr/share/doc/${PF}"
+# Not compatible with latest clang, see
+# https://github.com/google/AFL/issues/151
+#
+# CC="clang" CXX="clang++" strip-unsupported-flags
+# cd llvm_mode || die
+# emake \
+# PREFIX="${EPREFIX}/usr" \
+# HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+# DOC_PATH="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+ DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \
+ install
+}
diff --git a/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch b/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch
new file mode 100644
index 000000000000..dc432c5c08c4
--- /dev/null
+++ b/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch
@@ -0,0 +1,14 @@
+Bug: https://bugs.gentoo.org/894514
+diff --git a/Makefile b/Makefile
+index 3819312..536c20b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -50,7 +50,7 @@ ifndef AFL_NO_X86
+
+ test_x86:
+ @echo "[*] Checking for the ability to compile x86 code..."
+- @echo 'main() { __asm__("xorb %al, %al"); }' | $(CC) -w -x c - -o .test || ( echo; echo "Oops, looks like your compiler can't generate x86 code."; echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try again.)"; echo; exit 1 )
++ @echo 'int main() { __asm__("xorb %al, %al"); }' | $(CC) -w -x c - -o .test || ( echo; echo "Oops, looks like your compiler can't generate x86 code."; echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try again.)"; echo; exit 1 )
+ @rm -f .test
+ @echo "[+] Everything seems to be working, ready to compile."
+
diff --git a/app-forensics/afl/files/afl-2.57b-install-readmemd.diff b/app-forensics/afl/files/afl-2.57b-install-readmemd.diff
new file mode 100644
index 000000000000..50b777413c19
--- /dev/null
+++ b/app-forensics/afl/files/afl-2.57b-install-readmemd.diff
@@ -0,0 +1,12 @@
+diff --git a/Makefile b/Makefile
+index 5e800db26..381931289 100644
+--- a/Makefile
++++ b/Makefile
+@@ -133,7 +133,7 @@ endif
+ set -e; for i in afl-g++ afl-clang afl-clang++; do ln -sf afl-gcc $${DESTDIR}$(BIN_PATH)/$$i; done
+ install -m 755 afl-as $${DESTDIR}$(HELPER_PATH)
+ ln -sf afl-as $${DESTDIR}$(HELPER_PATH)/as
+- install -m 644 docs/README docs/ChangeLog docs/*.txt $${DESTDIR}$(DOC_PATH)
++ install -m 644 README.md docs/ChangeLog docs/*.txt $${DESTDIR}$(DOC_PATH)
+ cp -r testcases/ $${DESTDIR}$(MISC_PATH)
+ cp -r dictionaries/ $${DESTDIR}$(MISC_PATH)
diff --git a/app-forensics/afl/metadata.xml b/app-forensics/afl/metadata.xml
new file mode 100644
index 000000000000..c6eb48b47eb8
--- /dev/null
+++ b/app-forensics/afl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>