commit:     50f3f28b865ad1e0f4c6fe385ab050003f99683c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May 30 11:00:48 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 30 11:01:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50f3f28b

app-forensics/radamsa: wire up tests

Bug: https://bugs.gentoo.org/546768
Bug: https://bugs.gentoo.org/546770
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../radamsa/files/radamsa-0.7-no-which.patch       | 10 +++++
 app-forensics/radamsa/radamsa-0.7-r1.ebuild        | 52 ++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/app-forensics/radamsa/files/radamsa-0.7-no-which.patch 
b/app-forensics/radamsa/files/radamsa-0.7-no-which.patch
new file mode 100644
index 000000000000..6a6d04a9c806
--- /dev/null
+++ b/app-forensics/radamsa/files/radamsa-0.7-no-which.patch
@@ -0,0 +1,10 @@
+--- a/tests/uniq.sh
++++ b/tests/uniq.sh
+@@ -2,6 +2,6 @@
+ 
+ set -e
+ echo "HAL 9000" | $@ -o tmp/uniq-%n -n 100 -p od -m num 
+-md5cmd=$(test -x "$(which md5)" && echo "md5 -r" || echo "md5sum")
++md5cmd=md5sum
+ test 0 = $($md5cmd tmp/uniq-* | sed -e 's/ .*//' | sort | uniq -c | grep -v " 
1 " | wc -l)
+ rm tmp/uniq-*

diff --git a/app-forensics/radamsa/radamsa-0.7-r1.ebuild 
b/app-forensics/radamsa/radamsa-0.7-r1.ebuild
new file mode 100644
index 000000000000..226d86d3a64b
--- /dev/null
+++ b/app-forensics/radamsa/radamsa-0.7-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_P="${PN}-v${PV}"
+
+DESCRIPTION="A general-purpose fuzzer"
+HOMEPAGE="https://gitlab.com/akihe/radamsa";
+SRC_URI="
+       https://gitlab.com/akihe/${PN}/-/archive/v${PV}/${MY_P}.tar.bz2
+       
https://gitlab.com/akihe/${PN}/uploads/d774a42f7893012d0a56c490a75ae12b/${P}.c.gz
+"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="test? ( dev-scheme/owl-lisp )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.7_prebuilt-c.patch
+       "${FILESDIR}"/${PN}-0.7-no-which.patch
+)
+
+src_prepare() {
+       default
+
+       cp "${WORKDIR}"/${P}.c "${S}"/${PN}.c || die
+}
+
+src_compile() {
+       emake -Onone bin/radamsa CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+       ln -s "${BROOT}"/usr/bin/ol bin/ol || die
+       emake -Onone test
+}
+
+src_install() {
+       dobin bin/radamsa
+       # avoid man compression by build system
+       doman doc/radamsa.1
+
+       einstalldocs
+}

Reply via email to