commit:     10ee867cf72d6130da041fba0a82381a7d26b289
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 27 00:23:50 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 27 00:34:21 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10ee867c

app-forensics/aflplusplus: add 4.35c

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-forensics/aflplusplus/Manifest                 |  2 +
 app-forensics/aflplusplus/aflplusplus-4.35c.ebuild | 99 ++++++++++++++++++++++
 2 files changed, 101 insertions(+)

diff --git a/app-forensics/aflplusplus/Manifest 
b/app-forensics/aflplusplus/Manifest
index d8203c630c90..ea3e15d575da 100644
--- a/app-forensics/aflplusplus/Manifest
+++ b/app-forensics/aflplusplus/Manifest
@@ -2,3 +2,5 @@ DIST aflplusplus-4.30c-patches.tar.xz 5008 BLAKE2B 
60031d726e0d1834d0791bb88e437
 DIST aflplusplus-4.30c.tar.gz 3031558 BLAKE2B 
7f9c7d32afc5316cef460a72e7603aee36161559c2bb5c03edc408c16e8ba8bf96ced2c90e5578caa401ace37caf3ff7bba72ab58b7070c7c5b69004dc2d4da7
 SHA512 
072c9524978843eec6be5428793be43d10f3530a3f569fd4015d950cdd87696e887c3b567440afee8cb5e359b234d0c5e668cf9ab90622783fc82f68e3ec5f98
 DIST aflplusplus-4.32c-patches.tar.xz 4776 BLAKE2B 
75cbe9dfa1d3fccd358cb2f9c3d339d7854d2a690f7e32d57e65a76d7b8a34c30acd6776e2be28280a981d2b9cae7dc4685a28a8cd8b47a5e224074acaf257d1
 SHA512 
0c863c4d67fc535fdb96f27a429cc11e960820c9825667156987eb468b45d893caf3df37a6c949c47cdc95b250fa92791c3d03ffc4faa61fd728c116c25ae9db
 DIST aflplusplus-4.32c.tar.gz 3045679 BLAKE2B 
259edf3fe4405a8703a7452f99406fd390e97763d687445e0a6104f884ba304b3f6755fcdef36f7f8d9743db945ef60791402462cf4599c5a90593ecbb414daf
 SHA512 
9688f476129b45e842918b2e185c5fc82eb94aecd7ac27bfeecc74f5525aaf3754dbb4c442fec3902a93aad079178e1523a544f0808a4b6d21a11dc9508be0a0
+DIST aflplusplus-4.35c-patches.tar.xz 4932 BLAKE2B 
3e564d1d035b9b9b6d7fcdd0a11a5a6c4e3302457a7e5d1ae1e61966623a684d5c78b3a4735c1f6fd446760fe4c9231f2d2e862335c761eab2d42ae5986b0dc5
 SHA512 
287abeed965749609fe18a43e559a807c4de60b9d9e21443a3def68f1902e44302eb6147cdd30f941e412caf857d561eec5744adb46fa842f59909bb5f554c2b
+DIST aflplusplus-4.35c.tar.gz 3117948 BLAKE2B 
b8b068a5b7eca17eee8bc71f70df9220adb438ed82a169fbfb8da1d7948012b712d3d7ac24bddb48f779abb33467211a3d708eb3b4f0b13bc6e5a832c88a922f
 SHA512 
07a503d22c42f55092367255907d7173d2aef9beb8bcfa9c2d7aca24f6de342305a0310b780c692bc4db807042fd38c479c7ba3ba13210715bd7c0143499785e

diff --git a/app-forensics/aflplusplus/aflplusplus-4.35c.ebuild 
b/app-forensics/aflplusplus/aflplusplus-4.35c.ebuild
new file mode 100644
index 000000000000..ee31101879f5
--- /dev/null
+++ b/app-forensics/aflplusplus/aflplusplus-4.35c.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( {15..22} )
+PYTHON_COMPAT=( python3_{11..14} )
+inherit flag-o-matic toolchain-funcs llvm-r2 optfeature python-single-r1
+
+AFL_PATCHSET="${PN}-4.35c-patches"
+DESCRIPTION="Fork of AFL, the popular compile-time instrumentation fuzzer"
+HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus";
+SRC_URI="https://github.com/AFLplusplus/AFLplusplus/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${AFL_PATCHSET}.tar.xz";
+S="${WORKDIR}"/AFLplusplus-${PV}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+# Tests involve heavy use of LD_PRELOAD in some cases
+# This isn't compatible with sandbox
+RESTRICT="test"
+
+RDEPEND="
+       ${PYTHON_DEPS}
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}=
+               llvm-core/llvm:${LLVM_SLOT}=
+       ')
+       !app-forensics/afl
+"
+DEPEND="
+       ${RDEPEND}
+       test? ( dev-util/cmocka )
+"
+
+QA_FLAGS_IGNORED="
+       usr/lib.*/afl/afl-gcc-cmplog-pass.so
+       usr/lib.*/afl/afl-gcc-cmptrs-pass.so
+"
+QA_PREBUILT="usr/share/afl/testcases/others/elf/small_exec.elf"
+
+PATCHES=(
+       "${WORKDIR}"/${AFL_PATCHSET}
+)
+
+pkg_setup() {
+       llvm-r2_pkg_setup
+       python-single-r1_pkg_setup
+}
+
+mymake() {
+       # afl-fuzz spews garbage to stdout if the environment contains any
+       # variables whose name beginning with USE_ (including the underscore),
+       # regardless of their value (even if empty!).  The ebuild environment
+       # contains several such variables and the garbage that gets printed
+       # ends up in the generated man page.
+       #
+       # We can work around the problem by unsetting all these variables when
+       # running make.
+       local badvars=("${!USE_@}")
+
+       env "${badvars[@]/#/-u}" emake -Onone \
+               CC="$(tc-getCC)" \
+               CXX="$(tc-getCXX)" \
+               CFLAGS_FLTO="" \
+               PREFIX="${EPREFIX}/usr" \
+               HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+               DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \
+               MAN_PATH="${EPREFIX}/usr/share/man/man8" \
+               "$@"
+}
+
+src_compile() {
+       # bug #945258
+       append-cflags -std=gnu17
+
+       strip-unsupported-flags
+       CC=clang CXX=clang++ strip-unsupported-flags
+
+       mymake
+}
+
+src_test() {
+       mymake test
+}
+
+src_install() {
+       mymake DESTDIR="${D}" install
+       dostrip -x /usr/share/afl/testcases/
+}
+
+pkg_postinst() {
+       # TODO: Any others?
+       optfeature "fuzzing with AFL_USE_ASAN" 
llvm-runtimes/compiler-rt-sanitizers[asan]
+       optfeature "fuzzing with AFL_USE_MSAN" 
llvm-runtimes/compiler-rt-sanitizers[msan]
+}

Reply via email to