summaryrefslogtreecommitdiff
path: root/dev-util/rizin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-16 02:01:58 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-16 02:01:58 +0000
commite07c6f9648d478943b5ecd6f1c42cc91cae0f547 (patch)
tree2c56c6944fb4016ee510ee97a1a158baf49edfe4 /dev-util/rizin
parent16a4365c3b854e62b50726456ddb29bb78fd5038 (diff)
gentoo auto-resync : 16:12:2024 - 02:01:58
Diffstat (limited to 'dev-util/rizin')
-rw-r--r--dev-util/rizin/Manifest5
-rw-r--r--dev-util/rizin/files/rizin-0.7.3-force-local-tree-sitter-c.patch22
-rw-r--r--dev-util/rizin/files/rizin-0.7.3-tree-sitter-underlinking.patch31
-rw-r--r--dev-util/rizin/rizin-0.7.3-r1.ebuild2
-rw-r--r--dev-util/rizin/rizin-0.7.3-r2.ebuild101
5 files changed, 159 insertions, 2 deletions
diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest
index eec83595b388..6505bc365ed9 100644
--- a/dev-util/rizin/Manifest
+++ b/dev-util/rizin/Manifest
@@ -1,5 +1,8 @@
AUX rizin-0.4.0-never-rebuild-parser.patch 1568 BLAKE2B c77276adb8349188ebc937d84b011650b978ba5bed6c0596258963d395014c5e0733e44930b4c2db6dd88941d99b2aa37acf461d035fc31dcd321571ef0d6392 SHA512 a46311772dc42b90b8e3e49ddb66f6d64873773e254ac943934de0129d5f4a77ccb759d20b519b58418d45c076f136d582f2e70056693c75b2f6aae19eb07551
+AUX rizin-0.7.3-force-local-tree-sitter-c.patch 858 BLAKE2B f4164813fcb963d4cce9bbd9e7ec8aba9d841e6551d0663953744ddaa0f58310e9b657a19d0c4c5d488491393ccefeefc46ce363d69e094e934dec2ba9862f01 SHA512 be773a02f456fb36b61ad06ff200b35994ff25bee62b6cc3a8cd6edb5d677a6383e55dbf347fc0060174e5592603d9df657c64a3c1a9cf27fcd62ac428059638
+AUX rizin-0.7.3-tree-sitter-underlinking.patch 875 BLAKE2B 8abd5ce26f7b630f7b4528fabbfc08b54d1303e9636fb88dd8ae04f435b8a1dbe00cd7da687743cd28809f47be718cb79c2c44815c57aff4744c1f2a16a46aa9 SHA512 b53ed740922d2f8b0f63402754534878b917a495ff41334c59cbca033a8fa2791b068b2a56748c4f02bb6e34e65b577469a0e83f274651f68a329bba13de0044
DIST rizin-src-v0.7.3.tar.xz 18604220 BLAKE2B 9bbfbd8cf86839dcfdc30beb12d4472abf68e7d8c81561f6124b4d8ac781242bbbe8b62e06d2873928830d2524203c18ab1c17fa35855ac2d344af7649b64b3c SHA512 bad89888b2cb1ce1227ce629ff1209f18d1afb9da55685f0ea4ead7dd1b4dfbf8ed72c173048b2ee47362a10d5e20a6c34e09d0bbaa210f3873073c10ebc4dc1
DIST rizin-testbins-1203a9a2f51e32337c8434d9f4f7c4543552e271.tar.gz 185572487 BLAKE2B b274a58bebe0123bd8ab7b18a4e88833e7de53133d8f640d00b9efa953cf8ef766582acd5a0f65750ebb273be70d5cc1daf9b700cd6b9bfd4d464cf59ab735ba SHA512 47e8993bea5d7805acb46c1c4e034524fe47d2b0b2471af00d3255f3e853430617658cd6b1f8a4706a748704a52646ec43495f0d4e80f16bce4aaf34e29539a4
-EBUILD rizin-0.7.3-r1.ebuild 2644 BLAKE2B 34ef5c493108978dd7871544befc9c3a6baa69f15dd98c5342c856f13c0fda0707baeb759027d93e8ada17bf0376749da3a4b57b24e44ff2934425e6c3768d8b SHA512 e136d5f3583860035993e929a400c9a70e0ae2b8e5d90c2637c6ef2239a2c8b1132521d8bb7a3e46d016ce21e320462c812c23bfceaa1c988f57c0872509accb
+EBUILD rizin-0.7.3-r1.ebuild 2646 BLAKE2B 5fd798fedd745a033e0d09c0f8259fda9509b0f8606df68da493fcea7e1628f06b557516fb8f1540db50dac0ac251114da6808c460a41be6848e107f4a9be3a7 SHA512 f2a7a58f074427bfd1caf0ff6bed0c84b476b3eae52df9d055a52de59c7b658a9caed5948931eb2cfa5cb2bc248c5576fdb156b5230a61ee787e73808b5d7607
+EBUILD rizin-0.7.3-r2.ebuild 2638 BLAKE2B 163846a72aa457522f948dcf26a84914df2561f8ed54fa29686b27bf153a6fc1b1f0cdc08f48251557815c25a94653fee27852144957b7bbd17fc981aedf8992 SHA512 318db017056d4816c0cc62bc7e656b7c31063ce7386e15a8d60a9d3544d30e33eb92ead0cccafecd01084f4c6c04334c615db763906c49fbe0e151fab6606607
MISC metadata.xml 427 BLAKE2B 2937970e78526f69e371b4451a3406b1fdc35a01707d366e8b54e23f9d13e8a713254902825ae111817ee00ea3aaf3bc968db8b6d944b15f869e2b89ba8e16b8 SHA512 65cc9c4cd5f2f64cd02e89b0f7f4972fefec51cb175650625da263b729022587c9487e9ab9faed8517200ed622a8ca5ec35b2b6f4c67966d78344c043197c981
diff --git a/dev-util/rizin/files/rizin-0.7.3-force-local-tree-sitter-c.patch b/dev-util/rizin/files/rizin-0.7.3-force-local-tree-sitter-c.patch
new file mode 100644
index 000000000000..952ed430e72b
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.7.3-force-local-tree-sitter-c.patch
@@ -0,0 +1,22 @@
+From 1f8d7a37dc91ce41706ca7ee564cf3c48acf79d1 Mon Sep 17 00:00:00 2001
+From: John Helmert III <ajak@gentoo.org>
+Date: Sat, 14 Dec 2024 20:11:09 -0800
+Subject: [PATCH] librz/type: force tree-sitter-c subproject
+
+rizin depends on its fork of tree-sitter-c.
+
+Signed-off-by: John Helmert III <jchelmert3@posteo.net>
+--- a/librz/type/meson.build
++++ b/librz/type/meson.build
+@@ -18,7 +18,7 @@ if r.returncode() == 1 and get_option('subprojects_check')
+ error('Subprojects are not updated. Please run `git clean -dxff subprojects/` to delete all local subprojects directories. If you want to compile against current subprojects then set option `subprojects_check=false`.')
+ endif
+
+-tree_sitter_c_dep = dependency('tree-sitter-c')
++tree_sitter_c_dep = subproject('tree-sitter-c').get_variable('tree_sitter_c_dep')
+
+ rz_type_inc = [
+ platform_inc,
+--
+2.45.2
+
diff --git a/dev-util/rizin/files/rizin-0.7.3-tree-sitter-underlinking.patch b/dev-util/rizin/files/rizin-0.7.3-tree-sitter-underlinking.patch
new file mode 100644
index 000000000000..72a8b14a26bf
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.7.3-tree-sitter-underlinking.patch
@@ -0,0 +1,31 @@
+From 2d5a70879b8e0b7b2bbd9ce48b2bb459dc22203a Mon Sep 17 00:00:00 2001
+From: ajakk <ajak@gentoo.org>
+Date: Tue, 3 Sep 2024 08:46:24 -0500
+Subject: [PATCH] librz: link to tree-sitter directly (#4603)
+
+tree-sitter symbols are included in this library, so we need to
+specify the dependency to avoid linking failures due to missing
+tree-sitter symbols.
+
+See-Also: https://bugs.gentoo.org/928301
+
+Signed-off-by: John Helmert III <ajak@gentoo.org>
+---
+ librz/type/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librz/type/meson.build b/librz/type/meson.build
+index 06d6807bc3..7c58e82486 100644
+--- a/librz/type/meson.build
++++ b/librz/type/meson.build
+@@ -31,6 +31,7 @@ rz_type = library('rz_type', rz_type_sources,
+ include_directories: rz_type_inc,
+ dependencies: [
+ rz_util_dep,
++ tree_sitter_dep,
+ tree_sitter_c_dep,
+ lrt
+ ],
+--
+2.45.2
+
diff --git a/dev-util/rizin/rizin-0.7.3-r1.ebuild b/dev-util/rizin/rizin-0.7.3-r1.ebuild
index 9f446bfb76f0..ecc511746011 100644
--- a/dev-util/rizin/rizin-0.7.3-r1.ebuild
+++ b/dev-util/rizin/rizin-0.7.3-r1.ebuild
@@ -35,7 +35,7 @@ RDEPEND="
dev-libs/libzip:0=
dev-libs/openssl:0=
dev-libs/libpcre2:0=
- >=dev-libs/tree-sitter-0.19.0
+ >=dev-libs/tree-sitter-0.19.0:=
dev-libs/tree-sitter-c
dev-libs/xxhash
sys-apps/file
diff --git a/dev-util/rizin/rizin-0.7.3-r2.ebuild b/dev-util/rizin/rizin-0.7.3-r2.ebuild
new file mode 100644
index 000000000000..c86058324b43
--- /dev/null
+++ b/dev-util/rizin/rizin-0.7.3-r2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2024 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="1203a9a2f51e32337c8434d9f4f7c4543552e271"
+
+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
+}