commit:     c865d38005112eac1570480593cc2a82e0f2132e
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  1 23:05:10 2025 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Sat Feb  1 23:05:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c865d380

dev-util/rizin: add 0.7.4

Bug: https://bugs.gentoo.org/949208
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 dev-util/rizin/Manifest           |   2 +
 dev-util/rizin/rizin-0.7.4.ebuild | 101 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 103 insertions(+)

diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest
index 52046bc744df..b499ecf7b294 100644
--- a/dev-util/rizin/Manifest
+++ b/dev-util/rizin/Manifest
@@ -1,2 +1,4 @@
 DIST rizin-src-v0.7.3.tar.xz 18604220 BLAKE2B 
9bbfbd8cf86839dcfdc30beb12d4472abf68e7d8c81561f6124b4d8ac781242bbbe8b62e06d2873928830d2524203c18ab1c17fa35855ac2d344af7649b64b3c
 SHA512 
bad89888b2cb1ce1227ce629ff1209f18d1afb9da55685f0ea4ead7dd1b4dfbf8ed72c173048b2ee47362a10d5e20a6c34e09d0bbaa210f3873073c10ebc4dc1
+DIST rizin-src-v0.7.4.tar.xz 18613012 BLAKE2B 
0f55416fc73bf6122e3969aec286c1b77ee9d9495d71aee0c9dcdceb94d411aa9e12a05ad3a4aa8792f40d028e753c30b586bc397a9e72276b8e10fd058eab29
 SHA512 
47f077805d88ae10d69e9eb1a53a691b5c3c4b1604927934948cf8ff69731b23a1df8811297e2e5882a2d09b60a5601fcbc96abaa9342712f52335508f64a20a
 DIST rizin-testbins-1203a9a2f51e32337c8434d9f4f7c4543552e271.tar.gz 185572487 
BLAKE2B 
b274a58bebe0123bd8ab7b18a4e88833e7de53133d8f640d00b9efa953cf8ef766582acd5a0f65750ebb273be70d5cc1daf9b700cd6b9bfd4d464cf59ab735ba
 SHA512 
47e8993bea5d7805acb46c1c4e034524fe47d2b0b2471af00d3255f3e853430617658cd6b1f8a4706a748704a52646ec43495f0d4e80f16bce4aaf34e29539a4
+DIST rizin-testbins-ced304a8d886b2ba189027a86b2e9d949ab311dd.tar.gz 187060498 
BLAKE2B 
612d6f13f609e1dcdd72e37ae18d96680cacbb788aebc101ca6e78e96712b7142ee73ba9157163a49152810a6223524d15e211a7db81c4aa2efcb4ed4572d1de
 SHA512 
07d9c66d7ffbe8954a6a8c8ac7da75e5a1d0258533e32d223d1267826c9e8b3182bf8e2d55ca8d683992059b1068044dbbb662774e533d70bad7806b0d343369

diff --git a/dev-util/rizin/rizin-0.7.4.ebuild 
b/dev-util/rizin/rizin-0.7.4.ebuild
new file mode 100644
index 000000000000..11bb3d27040c
--- /dev/null
+++ b/dev-util/rizin/rizin-0.7.4.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+# This is the commit that the CI for the release commit used
+BINS_COMMIT="ced304a8d886b2ba189027a86b2e9d949ab311dd"
+
+inherit meson python-any-r1
+
+DESCRIPTION="reverse engineering framework for binary analysis"
+HOMEPAGE="https://rizin.re/";
+
+SRC_URI="mirror+https://github.com/rizinorg/rizin/releases/download/v${PV}/rizin-src-v${PV}.tar.xz
+       test? ( 
https://github.com/rizinorg/rizin-testbins/archive/${BINS_COMMIT}.tar.gz -> 
rizin-testbins-${BINS_COMMIT}.tar.gz )"
+S="${WORKDIR}/${PN}-v${PV}"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+
+# Need to audit licenses of the binaries used for testing
+RESTRICT="test? ( fetch ) !test? ( test )"
+
+# TODO: unbundle dev-libs/blake3
+RDEPEND="
+       app-arch/lz4:0=
+       app-arch/xz-utils
+       app-arch/zstd:=
+       >=dev-libs/capstone-5:0=
+       dev-libs/libmspack
+       dev-libs/libzip:0=
+       dev-libs/openssl:0=
+       dev-libs/libpcre2:0=[jit]
+       >=dev-libs/tree-sitter-0.19.0:=
+       dev-libs/xxhash
+       sys-apps/file
+       sys-libs/zlib:0=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
+       "${FILESDIR}/${PN}-0.7.3-force-local-tree-sitter-c.patch"
+       "${FILESDIR}/${PN}-0.7.3-tree-sitter-underlinking.patch"
+)
+
+src_prepare() {
+       default
+
+       local py_to_mangle=(
+               librz/core/cmd_descs/cmd_descs_generate.py
+               sys/clang-format.py
+               test/fuzz/scripts/fuzz_rz_asm.py
+               test/scripts/gdbserver.py
+       )
+
+       python_fix_shebang "${py_to_mangle[@]}"
+
+       # https://github.com/rizinorg/rizin/issues/3459
+       sed -ie '/dyld_chained_ptr_arm64e_auth/d' test/unit/test_bin_mach0.c || 
die
+
+       if use test; then
+               cp -r "${WORKDIR}/rizin-testbins-${BINS_COMMIT}" 
"${S}/test/bins" || die
+               cp -r "${WORKDIR}/rizin-testbins-${BINS_COMMIT}" "${S}" || die
+       fi
+}
+
+src_configure() {
+       local emesonargs=(
+               -Dcli=enabled
+               -Duse_sys_capstone=enabled
+               -Duse_sys_libmspack=enabled
+               -Duse_sys_libzip=enabled
+               -Duse_sys_libzstd=enabled
+               -Duse_sys_lz4=enabled
+               -Duse_sys_lzma=enabled
+               -Duse_sys_magic=enabled
+               -Duse_sys_openssl=enabled
+               -Duse_sys_pcre2=enabled
+               -Duse_sys_tree_sitter=enabled
+               -Duse_sys_xxhash=enabled
+               -Duse_sys_zlib=enabled
+
+               $(meson_use test enable_tests)
+               $(meson_use test enable_rz_test)
+       )
+       meson_src_configure
+}
+
+src_test() {
+       # We can select running either unit or integration tests, or all of
+       # them by not passing --suite. According to upstream, integration
+       # tests are more fragile and unit tests are sufficient for testing
+       # packaging, so only run those.
+       meson_src_test --suite unit
+}

Reply via email to