public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/
@ 2021-12-14  1:08 John Helmert III
  0 siblings, 0 replies; 8+ messages in thread
From: John Helmert III @ 2021-12-14  1:08 UTC (permalink / raw
  To: gentoo-commits

commit:     166222145e93b3e5bf1e1978fff2d00553585e1a
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 14 01:07:07 2021 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Tue Dec 14 01:08:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16622214

dev-util/rizin: add patch for CVE-2021-43814

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

 .../rizin/files/rizin-0.3.1-CVE-2021-43814.patch   |  90 ++++++++++++++++++
 dev-util/rizin/rizin-0.3.1-r2.ebuild               | 103 +++++++++++++++++++++
 2 files changed, 193 insertions(+)

diff --git a/dev-util/rizin/files/rizin-0.3.1-CVE-2021-43814.patch b/dev-util/rizin/files/rizin-0.3.1-CVE-2021-43814.patch
new file mode 100644
index 000000000000..f7c511b5a0cf
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.3.1-CVE-2021-43814.patch
@@ -0,0 +1,90 @@
+From aa6917772d2f32e5a7daab25a46c72df0b5ea406 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Florian=20M=C3=A4rkl?= <info@florianmaerkl.de>
+Date: Fri, 10 Dec 2021 15:43:12 +0100
+Subject: [PATCH] Fix oob write for dwarf with abbrev with count 0 (Fix #2083)
+ (#2086)
+
+---
+ librz/bin/dwarf.c         | 40 ++++++++++++++++++++++-----------------
+ test/db/formats/elf/crash |  8 ++++++++
+ 2 files changed, 31 insertions(+), 17 deletions(-)
+
+diff --git a/librz/bin/dwarf.c b/librz/bin/dwarf.c
+index 1ed1d3517c2..23dd1f9f0b1 100644
+--- a/librz/bin/dwarf.c
++++ b/librz/bin/dwarf.c
+@@ -1220,9 +1220,13 @@ static int init_die(RzBinDwarfDie *die, ut64 abbr_code, ut64 attr_count) {
+ 	if (!die) {
+ 		return -1;
+ 	}
+-	die->attr_values = calloc(sizeof(RzBinDwarfAttrValue), attr_count);
+-	if (!die->attr_values) {
+-		return -1;
++	if (attr_count) {
++		die->attr_values = calloc(sizeof(RzBinDwarfAttrValue), attr_count);
++		if (!die->attr_values) {
++			return -1;
++		}
++	} else {
++		die->attr_values = NULL;
+ 	}
+ 	die->abbrev_code = abbr_code;
+ 	die->capacity = attr_count;
+@@ -1726,25 +1730,27 @@ static const ut8 *parse_die(const ut8 *buf, const ut8 *buf_end, RzBinDwarfDebugI
+ 	size_t i;
+ 	const char *comp_dir = NULL;
+ 	ut64 line_info_offset = UT64_MAX;
+-	for (i = 0; i < abbrev->count - 1; i++) {
+-		memset(&die->attr_values[i], 0, sizeof(die->attr_values[i]));
++	if (abbrev->count) {
++		for (i = 0; i < abbrev->count - 1; i++) {
++			memset(&die->attr_values[i], 0, sizeof(die->attr_values[i]));
+ 
+-		buf = parse_attr_value(buf, buf_end - buf, &abbrev->defs[i],
+-			&die->attr_values[i], hdr, debug_str, debug_str_len, big_endian);
++			buf = parse_attr_value(buf, buf_end - buf, &abbrev->defs[i],
++				&die->attr_values[i], hdr, debug_str, debug_str_len, big_endian);
+ 
+-		RzBinDwarfAttrValue *attribute = &die->attr_values[i];
++			RzBinDwarfAttrValue *attribute = &die->attr_values[i];
+ 
+-		if (attribute->attr_name == DW_AT_comp_dir && (attribute->attr_form == DW_FORM_strp || attribute->attr_form == DW_FORM_string) && attribute->string.content) {
+-			comp_dir = attribute->string.content;
+-		}
+-		if (attribute->attr_name == DW_AT_stmt_list) {
+-			if (attribute->kind == DW_AT_KIND_CONSTANT) {
+-				line_info_offset = attribute->uconstant;
+-			} else if (attribute->kind == DW_AT_KIND_REFERENCE) {
+-				line_info_offset = attribute->reference;
++			if (attribute->attr_name == DW_AT_comp_dir && (attribute->attr_form == DW_FORM_strp || attribute->attr_form == DW_FORM_string) && attribute->string.content) {
++				comp_dir = attribute->string.content;
++			}
++			if (attribute->attr_name == DW_AT_stmt_list) {
++				if (attribute->kind == DW_AT_KIND_CONSTANT) {
++					line_info_offset = attribute->uconstant;
++				} else if (attribute->kind == DW_AT_KIND_REFERENCE) {
++					line_info_offset = attribute->reference;
++				}
+ 			}
++			die->count++;
+ 		}
+-		die->count++;
+ 	}
+ 
+ 	// If this is a compilation unit dir attribute, we want to cache it so the line info parsing
+diff --git a/test/db/formats/elf/crash b/test/db/formats/elf/crash
+index ea6c2c214bb..fb8a572bd56 100644
+--- a/test/db/formats/elf/crash
++++ b/test/db/formats/elf/crash
+@@ -25,3 +25,11 @@ nth vaddr bind type lib name
+ []
+ EOF
+ RUN
++
++NAME=ELF/Dwarf: abbrev empty
++FILE=bins/elf/dwarf_fuzzed_abbrev_empty
++CMDS=<<EOF
++aaa
++EOF
++EXPECT=
++RUN

diff --git a/dev-util/rizin/rizin-0.3.1-r2.ebuild b/dev-util/rizin/rizin-0.3.1-r2.ebuild
new file mode 100644
index 000000000000..5148796711c6
--- /dev/null
+++ b/dev-util/rizin/rizin-0.3.1-r2.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=(python3_{8,9,10})
+
+# This is the commit that the CI for the release commit used
+BINS_COMMIT="74b6e4511112b1a6abc571091efc32ec2a7d98a6"
+
+inherit meson python-any-r1
+
+DESCRIPTION="reverse engineering framework for binary analysis"
+HOMEPAGE="https://rizin.re/"
+
+SRC_URI="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 )"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0/${PV}"
+IUSE="test"
+
+# Need to audit licenses of the binaries used for testing
+RESTRICT="test"
+
+RDEPEND="
+	sys-apps/file
+	app-arch/lz4:0=
+	dev-libs/capstone:0=
+	dev-libs/libuv:0=
+	dev-libs/libzip:0=
+	dev-libs/openssl:0=
+	>=dev-libs/tree-sitter-0.19.0
+	dev-libs/xxhash
+	sys-libs/zlib:0=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.3.0-typedb-prefix.patch"
+	"${FILESDIR}/${P}-CVE-2021-43814.patch"
+)
+
+S="${WORKDIR}/${PN}-v${PV}"
+
+src_prepare() {
+	default
+
+	local py_to_mangle=(
+		librz/core/cmd_descs/cmd_descs_generate.py
+		subprojects/lz4-1.9.3/contrib/meson/meson/GetLz4LibraryVersion.py
+		subprojects/lz4-1.9.3/contrib/meson/meson/InstallSymlink.py
+		subprojects/lz4-1.9.3/tests/test-lz4-list.py
+		subprojects/lz4-1.9.3/tests/test-lz4-speed.py
+		subprojects/lz4-1.9.3/tests/test-lz4-versions.py
+		sys/clang-format.py
+		test/fuzz/scripts/fuzz_rz_asm.py
+		test/scripts/gdbserver.py
+	)
+
+	python_fix_shebang "${py_to_mangle[@]}"
+
+	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_magic=enabled
+		-Duse_sys_libzip=enabled
+		-Duse_sys_zlib=enabled
+		-Duse_sys_lz4=enabled
+		-Duse_sys_xxhash=enabled
+		-Duse_sys_openssl=enabled
+		-Duse_sys_tree_sitter=enabled
+
+		$(meson_use test enable_tests)
+		$(meson_use test enable_rz_test)
+	)
+	meson_src_configure
+}
+
+src_test() {
+	# Rizin uses data files that it expects to be installed on the
+	# system. To hack around this, we create a tree of what it expects
+	# in ${T}, and patch the tests to support a prefix from the
+	# environment. https://github.com/rizinorg/rizin/issues/1789
+	mkdir -p "${T}/usr/share/${PN}/${PV}" || die
+	ln -sf "${BUILD_DIR}/librz/analysis/d" "${T}/usr/share/${PN}/${PV}/types" || die
+	ln -sf "${BUILD_DIR}/librz/syscall/d" "${T}/usr/share/${PN}/${PV}/syscall" || die
+	ln -sf "${BUILD_DIR}/librz/asm/d" "${T}/usr/share/${PN}/${PV}/opcodes" || die
+	# https://github.com/rizinorg/rizin/issues/1797
+	ln -sf "${BUILD_DIR}/librz/flag/d" "${T}/usr/share/${PN}/${PV}/flag" || die
+	export RZ_PREFIX="${T}/usr"
+
+	meson_src_test
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/
@ 2022-01-10  6:10 John Helmert III
  0 siblings, 0 replies; 8+ messages in thread
From: John Helmert III @ 2022-01-10  6:10 UTC (permalink / raw
  To: gentoo-commits

commit:     14f82ad59e58ea7ac361ef0a19547c0d58fdd93b
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 10 06:07:40 2022 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Mon Jan 10 06:10:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14f82ad5

dev-util/rizin: drop 0.3.1-r2, 0.3.2, 0.3.3

Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 dev-util/rizin/Manifest                            |   4 -
 .../rizin/files/rizin-0.3.1-CVE-2021-43814.patch   |  90 ------------------
 dev-util/rizin/rizin-0.3.1-r2.ebuild               | 103 ---------------------
 dev-util/rizin/rizin-0.3.2.ebuild                  | 103 ---------------------
 dev-util/rizin/rizin-0.3.3.ebuild                  | 103 ---------------------
 5 files changed, 403 deletions(-)

diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest
index 8a3a8efbb804..c38b64e65193 100644
--- a/dev-util/rizin/Manifest
+++ b/dev-util/rizin/Manifest
@@ -1,6 +1,2 @@
-DIST rizin-src-v0.3.1.tar.xz 64089580 BLAKE2B 04f7e3cfa20a787f47af90c78405f295b346cc0c7d81164ff01bc6a69df526f3f9112ab4cb62092297ae2dda1fa738a2e7feff35e0f1b7f3e7467a8c6e4d1a1e SHA512 743f8f2c9ddb045f39147de9ad971d47f1a26bfcc233f41c12c64ade5e31c992104cf3f93c44c5035142b554779e895224b68f839cd87a59aaf344b4ec88d5fe
-DIST rizin-src-v0.3.2.tar.xz 64170200 BLAKE2B fe11317e4acc1a803323f42fd4c2c6435a2fe4032581ed509f37f7221ec53e0afac04ebe8cb9da693ac283b61c0a70e135007d635c4c5010519a5c7e7cfa19cf SHA512 c472770ee1b156d42a98d4641f365e2255f16489b2223b117c8b88dcac0d72065d1fd7eedad70046188231889e492bafb7b8462987c68311143f14808eaab1cc
-DIST rizin-src-v0.3.3.tar.xz 10409328 BLAKE2B 4d62ecbcabf960a0f8363ff5f8cc75911bb52ca15d7e7d0a6a78e754910d9607264086e8b0c28cd1423525b650443ab99a090624c8d2b7a376fbc8f71baa03b0 SHA512 4aca0a06be80434b61a92479588c92d32598b8eebb24a82acbc7e6c7b26fdde638b8dfa5b66afbd6cd369329f9514594595bab9314de92b8b2580d129543882d
 DIST rizin-src-v0.3.4.tar.xz 10411432 BLAKE2B 99745f069e6bd72aec6a6f335f3aa0ccc46ebf186b1dc0aaf32b4f95d2be4bb49e8d3d976a72978c22fce82d896e70bf8403568e100b73898731045ef06a2ad5 SHA512 cda35afe8c031f3207c055ed31d7f76a46b7addd04cead0f5aadf0733b66f4dd953ca16f054b47da7921d4726d6ea1250436012954a9755c1cd524a8fd0d670c
 DIST rizin-testbins-aa6a88dcdfaad54335e3935c16ce21a124ff861d.tar.gz 127254454 BLAKE2B e7a4536be7169abd197c2128e103b8d669fbb7532ce265b27da3ce347b1aa58c8a96c95d85cf7700f66a44c041a0575175de3a0e176a0d31c490f7ccfb2f6d6b SHA512 20cf299e5324793f07f8a2fdcfa3d66c3a418f09bfc6a272e35ab31d4a64408bf91532ae431098dede1a2d0ad0b1c02433304c514816d98dc068f6c0528a4099
-DIST rizin-testbins-d66fa0feaf3b1ecdad261ca17542f1d5d0b101cc.tar.gz 126773703 BLAKE2B f5eaeb7e99e9091b6ca043dd50d03143950adc06b75b5834886d96d6280207c0bea73101a5f9e06c38ba60c0d4cff82dbf1f00364f7d87fe183c0687b06d1904 SHA512 0a017954017c8d57133d51b441411a50aa9ed062c0cc61e1561951fdf0703f5244230cda377885199e9e35dca6780d8582a445ac92286b63ef2ac784777ec0c4

diff --git a/dev-util/rizin/files/rizin-0.3.1-CVE-2021-43814.patch b/dev-util/rizin/files/rizin-0.3.1-CVE-2021-43814.patch
deleted file mode 100644
index f7c511b5a0cf..000000000000
--- a/dev-util/rizin/files/rizin-0.3.1-CVE-2021-43814.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From aa6917772d2f32e5a7daab25a46c72df0b5ea406 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Florian=20M=C3=A4rkl?= <info@florianmaerkl.de>
-Date: Fri, 10 Dec 2021 15:43:12 +0100
-Subject: [PATCH] Fix oob write for dwarf with abbrev with count 0 (Fix #2083)
- (#2086)
-
----
- librz/bin/dwarf.c         | 40 ++++++++++++++++++++++-----------------
- test/db/formats/elf/crash |  8 ++++++++
- 2 files changed, 31 insertions(+), 17 deletions(-)
-
-diff --git a/librz/bin/dwarf.c b/librz/bin/dwarf.c
-index 1ed1d3517c2..23dd1f9f0b1 100644
---- a/librz/bin/dwarf.c
-+++ b/librz/bin/dwarf.c
-@@ -1220,9 +1220,13 @@ static int init_die(RzBinDwarfDie *die, ut64 abbr_code, ut64 attr_count) {
- 	if (!die) {
- 		return -1;
- 	}
--	die->attr_values = calloc(sizeof(RzBinDwarfAttrValue), attr_count);
--	if (!die->attr_values) {
--		return -1;
-+	if (attr_count) {
-+		die->attr_values = calloc(sizeof(RzBinDwarfAttrValue), attr_count);
-+		if (!die->attr_values) {
-+			return -1;
-+		}
-+	} else {
-+		die->attr_values = NULL;
- 	}
- 	die->abbrev_code = abbr_code;
- 	die->capacity = attr_count;
-@@ -1726,25 +1730,27 @@ static const ut8 *parse_die(const ut8 *buf, const ut8 *buf_end, RzBinDwarfDebugI
- 	size_t i;
- 	const char *comp_dir = NULL;
- 	ut64 line_info_offset = UT64_MAX;
--	for (i = 0; i < abbrev->count - 1; i++) {
--		memset(&die->attr_values[i], 0, sizeof(die->attr_values[i]));
-+	if (abbrev->count) {
-+		for (i = 0; i < abbrev->count - 1; i++) {
-+			memset(&die->attr_values[i], 0, sizeof(die->attr_values[i]));
- 
--		buf = parse_attr_value(buf, buf_end - buf, &abbrev->defs[i],
--			&die->attr_values[i], hdr, debug_str, debug_str_len, big_endian);
-+			buf = parse_attr_value(buf, buf_end - buf, &abbrev->defs[i],
-+				&die->attr_values[i], hdr, debug_str, debug_str_len, big_endian);
- 
--		RzBinDwarfAttrValue *attribute = &die->attr_values[i];
-+			RzBinDwarfAttrValue *attribute = &die->attr_values[i];
- 
--		if (attribute->attr_name == DW_AT_comp_dir && (attribute->attr_form == DW_FORM_strp || attribute->attr_form == DW_FORM_string) && attribute->string.content) {
--			comp_dir = attribute->string.content;
--		}
--		if (attribute->attr_name == DW_AT_stmt_list) {
--			if (attribute->kind == DW_AT_KIND_CONSTANT) {
--				line_info_offset = attribute->uconstant;
--			} else if (attribute->kind == DW_AT_KIND_REFERENCE) {
--				line_info_offset = attribute->reference;
-+			if (attribute->attr_name == DW_AT_comp_dir && (attribute->attr_form == DW_FORM_strp || attribute->attr_form == DW_FORM_string) && attribute->string.content) {
-+				comp_dir = attribute->string.content;
-+			}
-+			if (attribute->attr_name == DW_AT_stmt_list) {
-+				if (attribute->kind == DW_AT_KIND_CONSTANT) {
-+					line_info_offset = attribute->uconstant;
-+				} else if (attribute->kind == DW_AT_KIND_REFERENCE) {
-+					line_info_offset = attribute->reference;
-+				}
- 			}
-+			die->count++;
- 		}
--		die->count++;
- 	}
- 
- 	// If this is a compilation unit dir attribute, we want to cache it so the line info parsing
-diff --git a/test/db/formats/elf/crash b/test/db/formats/elf/crash
-index ea6c2c214bb..fb8a572bd56 100644
---- a/test/db/formats/elf/crash
-+++ b/test/db/formats/elf/crash
-@@ -25,3 +25,11 @@ nth vaddr bind type lib name
- []
- EOF
- RUN
-+
-+NAME=ELF/Dwarf: abbrev empty
-+FILE=bins/elf/dwarf_fuzzed_abbrev_empty
-+CMDS=<<EOF
-+aaa
-+EOF
-+EXPECT=
-+RUN

diff --git a/dev-util/rizin/rizin-0.3.1-r2.ebuild b/dev-util/rizin/rizin-0.3.1-r2.ebuild
deleted file mode 100644
index 5148796711c6..000000000000
--- a/dev-util/rizin/rizin-0.3.1-r2.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=(python3_{8,9,10})
-
-# This is the commit that the CI for the release commit used
-BINS_COMMIT="74b6e4511112b1a6abc571091efc32ec2a7d98a6"
-
-inherit meson python-any-r1
-
-DESCRIPTION="reverse engineering framework for binary analysis"
-HOMEPAGE="https://rizin.re/"
-
-SRC_URI="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 )"
-KEYWORDS="~amd64 ~arm64 ~x86"
-
-LICENSE="Apache-2.0 BSD LGPL-3 MIT"
-SLOT="0/${PV}"
-IUSE="test"
-
-# Need to audit licenses of the binaries used for testing
-RESTRICT="test"
-
-RDEPEND="
-	sys-apps/file
-	app-arch/lz4:0=
-	dev-libs/capstone:0=
-	dev-libs/libuv:0=
-	dev-libs/libzip:0=
-	dev-libs/openssl:0=
-	>=dev-libs/tree-sitter-0.19.0
-	dev-libs/xxhash
-	sys-libs/zlib:0=
-"
-DEPEND="${RDEPEND}"
-BDEPEND="${PYTHON_DEPS}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-0.3.0-typedb-prefix.patch"
-	"${FILESDIR}/${P}-CVE-2021-43814.patch"
-)
-
-S="${WORKDIR}/${PN}-v${PV}"
-
-src_prepare() {
-	default
-
-	local py_to_mangle=(
-		librz/core/cmd_descs/cmd_descs_generate.py
-		subprojects/lz4-1.9.3/contrib/meson/meson/GetLz4LibraryVersion.py
-		subprojects/lz4-1.9.3/contrib/meson/meson/InstallSymlink.py
-		subprojects/lz4-1.9.3/tests/test-lz4-list.py
-		subprojects/lz4-1.9.3/tests/test-lz4-speed.py
-		subprojects/lz4-1.9.3/tests/test-lz4-versions.py
-		sys/clang-format.py
-		test/fuzz/scripts/fuzz_rz_asm.py
-		test/scripts/gdbserver.py
-	)
-
-	python_fix_shebang "${py_to_mangle[@]}"
-
-	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_magic=enabled
-		-Duse_sys_libzip=enabled
-		-Duse_sys_zlib=enabled
-		-Duse_sys_lz4=enabled
-		-Duse_sys_xxhash=enabled
-		-Duse_sys_openssl=enabled
-		-Duse_sys_tree_sitter=enabled
-
-		$(meson_use test enable_tests)
-		$(meson_use test enable_rz_test)
-	)
-	meson_src_configure
-}
-
-src_test() {
-	# Rizin uses data files that it expects to be installed on the
-	# system. To hack around this, we create a tree of what it expects
-	# in ${T}, and patch the tests to support a prefix from the
-	# environment. https://github.com/rizinorg/rizin/issues/1789
-	mkdir -p "${T}/usr/share/${PN}/${PV}" || die
-	ln -sf "${BUILD_DIR}/librz/analysis/d" "${T}/usr/share/${PN}/${PV}/types" || die
-	ln -sf "${BUILD_DIR}/librz/syscall/d" "${T}/usr/share/${PN}/${PV}/syscall" || die
-	ln -sf "${BUILD_DIR}/librz/asm/d" "${T}/usr/share/${PN}/${PV}/opcodes" || die
-	# https://github.com/rizinorg/rizin/issues/1797
-	ln -sf "${BUILD_DIR}/librz/flag/d" "${T}/usr/share/${PN}/${PV}/flag" || die
-	export RZ_PREFIX="${T}/usr"
-
-	meson_src_test
-}

diff --git a/dev-util/rizin/rizin-0.3.2.ebuild b/dev-util/rizin/rizin-0.3.2.ebuild
deleted file mode 100644
index f0f118bdd3dc..000000000000
--- a/dev-util/rizin/rizin-0.3.2.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=(python3_{8,9,10})
-
-# This is the commit that the CI for the release commit used
-BINS_COMMIT="d66fa0feaf3b1ecdad261ca17542f1d5d0b101cc"
-
-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 )"
-KEYWORDS="~amd64 ~arm64 ~x86"
-
-LICENSE="Apache-2.0 BSD LGPL-3 MIT"
-SLOT="0/${PV}"
-IUSE="test"
-
-# Need to audit licenses of the binaries used for testing
-RESTRICT="fetch !test? ( test )"
-
-RDEPEND="
-	sys-apps/file
-	app-arch/lz4:0=
-	dev-libs/capstone:0=
-	dev-libs/libuv:0=
-	dev-libs/libzip:0=
-	dev-libs/openssl:0=
-	>=dev-libs/tree-sitter-0.19.0
-	dev-libs/xxhash
-	sys-libs/zlib:0=
-"
-DEPEND="${RDEPEND}"
-BDEPEND="${PYTHON_DEPS}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-0.3.0-typedb-prefix.patch"
-	"${FILESDIR}/${PN}-0.3.2-never-rebuild-parser.patch"
-)
-
-S="${WORKDIR}/${PN}-v${PV}"
-
-src_prepare() {
-	default
-
-	local py_to_mangle=(
-		librz/core/cmd_descs/cmd_descs_generate.py
-		subprojects/lz4-1.9.3/contrib/meson/meson/GetLz4LibraryVersion.py
-		subprojects/lz4-1.9.3/contrib/meson/meson/InstallSymlink.py
-		subprojects/lz4-1.9.3/tests/test-lz4-list.py
-		subprojects/lz4-1.9.3/tests/test-lz4-speed.py
-		subprojects/lz4-1.9.3/tests/test-lz4-versions.py
-		sys/clang-format.py
-		test/fuzz/scripts/fuzz_rz_asm.py
-		test/scripts/gdbserver.py
-	)
-
-	python_fix_shebang "${py_to_mangle[@]}"
-
-	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_magic=enabled
-		-Duse_sys_libzip=enabled
-		-Duse_sys_zlib=enabled
-		-Duse_sys_lz4=enabled
-		-Duse_sys_xxhash=enabled
-		-Duse_sys_openssl=enabled
-		-Duse_sys_tree_sitter=enabled
-
-		$(meson_use test enable_tests)
-		$(meson_use test enable_rz_test)
-	)
-	meson_src_configure
-}
-
-src_test() {
-	# Rizin uses data files that it expects to be installed on the
-	# system. To hack around this, we create a tree of what it expects
-	# in ${T}, and patch the tests to support a prefix from the
-	# environment. https://github.com/rizinorg/rizin/issues/1789
-	mkdir -p "${T}/usr/share/${PN}/${PV}" || die
-	ln -sf "${BUILD_DIR}/librz/analysis/d" "${T}/usr/share/${PN}/${PV}/types" || die
-	ln -sf "${BUILD_DIR}/librz/syscall/d" "${T}/usr/share/${PN}/${PV}/syscall" || die
-	ln -sf "${BUILD_DIR}/librz/asm/d" "${T}/usr/share/${PN}/${PV}/opcodes" || die
-	# https://github.com/rizinorg/rizin/issues/1797
-	ln -sf "${BUILD_DIR}/librz/flag/d" "${T}/usr/share/${PN}/${PV}/flag" || die
-	export RZ_PREFIX="${T}/usr"
-
-	meson_src_test
-}

diff --git a/dev-util/rizin/rizin-0.3.3.ebuild b/dev-util/rizin/rizin-0.3.3.ebuild
deleted file mode 100644
index b4bfee6c1042..000000000000
--- a/dev-util/rizin/rizin-0.3.3.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=(python3_{8,9,10})
-
-# This is the commit that the CI for the release commit used
-BINS_COMMIT="aa6a88dcdfaad54335e3935c16ce21a124ff861d"
-
-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 )"
-KEYWORDS="~amd64 ~arm64 ~x86"
-
-LICENSE="Apache-2.0 BSD LGPL-3 MIT"
-SLOT="0/${PV}"
-IUSE="test"
-
-# Need to audit licenses of the binaries used for testing
-RESTRICT="fetch !test? ( test )"
-
-RDEPEND="
-	sys-apps/file
-	app-arch/lz4:0=
-	dev-libs/capstone:0=
-	dev-libs/libuv:0=
-	dev-libs/libzip:0=
-	dev-libs/openssl:0=
-	>=dev-libs/tree-sitter-0.19.0
-	dev-libs/xxhash
-	sys-libs/zlib:0=
-"
-DEPEND="${RDEPEND}"
-BDEPEND="${PYTHON_DEPS}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-0.3.0-typedb-prefix.patch"
-	"${FILESDIR}/${PN}-0.3.2-never-rebuild-parser.patch"
-)
-
-S="${WORKDIR}/${PN}-v${PV}"
-
-src_prepare() {
-	default
-
-	local py_to_mangle=(
-		librz/core/cmd_descs/cmd_descs_generate.py
-		subprojects/lz4-1.9.3/contrib/meson/meson/GetLz4LibraryVersion.py
-		subprojects/lz4-1.9.3/contrib/meson/meson/InstallSymlink.py
-		subprojects/lz4-1.9.3/tests/test-lz4-list.py
-		subprojects/lz4-1.9.3/tests/test-lz4-speed.py
-		subprojects/lz4-1.9.3/tests/test-lz4-versions.py
-		sys/clang-format.py
-		test/fuzz/scripts/fuzz_rz_asm.py
-		test/scripts/gdbserver.py
-	)
-
-	python_fix_shebang "${py_to_mangle[@]}"
-
-	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_magic=enabled
-		-Duse_sys_libzip=enabled
-		-Duse_sys_zlib=enabled
-		-Duse_sys_lz4=enabled
-		-Duse_sys_xxhash=enabled
-		-Duse_sys_openssl=enabled
-		-Duse_sys_tree_sitter=enabled
-
-		$(meson_use test enable_tests)
-		$(meson_use test enable_rz_test)
-	)
-	meson_src_configure
-}
-
-src_test() {
-	# Rizin uses data files that it expects to be installed on the
-	# system. To hack around this, we create a tree of what it expects
-	# in ${T}, and patch the tests to support a prefix from the
-	# environment. https://github.com/rizinorg/rizin/issues/1789
-	mkdir -p "${T}/usr/share/${PN}/${PV}" || die
-	ln -sf "${BUILD_DIR}/librz/analysis/d" "${T}/usr/share/${PN}/${PV}/types" || die
-	ln -sf "${BUILD_DIR}/librz/syscall/d" "${T}/usr/share/${PN}/${PV}/syscall" || die
-	ln -sf "${BUILD_DIR}/librz/asm/d" "${T}/usr/share/${PN}/${PV}/opcodes" || die
-	# https://github.com/rizinorg/rizin/issues/1797
-	ln -sf "${BUILD_DIR}/librz/flag/d" "${T}/usr/share/${PN}/${PV}/flag" || die
-	export RZ_PREFIX="${T}/usr"
-
-	meson_src_test
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/
@ 2022-07-04 20:01 John Helmert III
  0 siblings, 0 replies; 8+ messages in thread
From: John Helmert III @ 2022-07-04 20:01 UTC (permalink / raw
  To: gentoo-commits

commit:     de8b82fad57e57633c0d3e4c666e4c8b916501cc
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  4 19:08:01 2022 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Mon Jul  4 20:01:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de8b82fa

dev-util/rizin: add 0.4.0, enable py3.11

Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 dev-util/rizin/Manifest                            |  2 +
 .../files/rizin-0.4.0-never-rebuild-parser.patch   | 38 +++++++++
 dev-util/rizin/rizin-0.4.0.ebuild                  | 94 ++++++++++++++++++++++
 3 files changed, 134 insertions(+)

diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest
index c38b64e65193..39d5687e41c8 100644
--- a/dev-util/rizin/Manifest
+++ b/dev-util/rizin/Manifest
@@ -1,2 +1,4 @@
 DIST rizin-src-v0.3.4.tar.xz 10411432 BLAKE2B 99745f069e6bd72aec6a6f335f3aa0ccc46ebf186b1dc0aaf32b4f95d2be4bb49e8d3d976a72978c22fce82d896e70bf8403568e100b73898731045ef06a2ad5 SHA512 cda35afe8c031f3207c055ed31d7f76a46b7addd04cead0f5aadf0733b66f4dd953ca16f054b47da7921d4726d6ea1250436012954a9755c1cd524a8fd0d670c
+DIST rizin-src-v0.4.0.tar.xz 11432232 BLAKE2B 095ca9d317296afca9514a70f208e9aa87fc426e6b7e41163f64d5a1192a4d9ccd8ece9c4f13a24fc973668dece625fa13ad75542695a66c542fe2f0d9e66733 SHA512 9d576bee48e5ceae46b4e309c53e01b82edf89a95046f576e1c38fefa73353d6d1f04e6d444332324387d4e115bc87659a358629f7277a41dfef44c82364547b
+DIST rizin-testbins-64a6f26369bf5893ecc20cb8984a5ad506ef8566.tar.gz 172591261 BLAKE2B e78843fd95ac0406f66490b7253206e77787fc65780bc7c6a67d26aa9618a6f85803a88724ad424a7bdeeb20d95ebf9314e582029ac778d7d4de4f207ff54aad SHA512 ada4a3faad94553f0f2802419ba604177bb66d332b1a351effd485d65bd8365abb36d736486bbd0bcbc0da584ad4a2edaa7aa3cb62fa12811282c2e0afecb950
 DIST rizin-testbins-aa6a88dcdfaad54335e3935c16ce21a124ff861d.tar.gz 127254454 BLAKE2B e7a4536be7169abd197c2128e103b8d669fbb7532ce265b27da3ce347b1aa58c8a96c95d85cf7700f66a44c041a0575175de3a0e176a0d31c490f7ccfb2f6d6b SHA512 20cf299e5324793f07f8a2fdcfa3d66c3a418f09bfc6a272e35ab31d4a64408bf91532ae431098dede1a2d0ad0b1c02433304c514816d98dc068f6c0528a4099

diff --git a/dev-util/rizin/files/rizin-0.4.0-never-rebuild-parser.patch b/dev-util/rizin/files/rizin-0.4.0-never-rebuild-parser.patch
new file mode 100644
index 000000000000..0e6e95c09318
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.4.0-never-rebuild-parser.patch
@@ -0,0 +1,38 @@
+commit 7af437dbedaaa478b579d19133b6711923b037d8
+Author: John Helmert III <ajak@gentoo.org>
+Date:   Mon Jul 4 12:44:43 2022 -0500
+
+    subprojects/rizin-shell-parser/src: Never rebuild parser.c
+    
+    This requires dev-libs/tree-sitter[ts-cli] and net-libs/nodejs, both
+    of which would be heavy new dependencies. However, these are only
+    needed to rebuild the already-existing tree-sitter parser, which
+    doesn't do much for us (if anything) since it already exists. In this
+    case, it's better to just reduce fragility by unconditionally
+    disabling this.
+    
+    Newly forward-ported from the 0.3.2 version.
+    
+    Bug: https://bugs.gentoo.org/830068
+    Signed-off-by: John Helmert III <ajak@gentoo.org>
+
+diff --git a/subprojects/rizin-shell-parser/src/meson.build b/subprojects/rizin-shell-parser/src/meson.build
+index ae31896a98..14324daba0 100644
+--- a/subprojects/rizin-shell-parser/src/meson.build
++++ b/subprojects/rizin-shell-parser/src/meson.build
+@@ -1,14 +1,4 @@
+-tree_sitter_bin = find_program('tree-sitter', required: false)
+-node_bin = find_program('node', required: false)
+-if tree_sitter_bin.found() and node_bin.found() and tree_sitter_dep.type_name() != 'internal'
+-  parser_c = custom_target('parser_src_c',
+-    command: [tree_sitter_wrap_py, tree_sitter_bin, '@OUTDIR@/..', '@INPUT@'],
+-    input: [grammar_js],
+-    output: 'parser.c',
+-  )
+-else
+-  parser_c = files('parser.c')
+-endif
++parser_c = files('parser.c')
+ 
+ shell_parser_files = [files('scanner.c'), parser_c]
+ shell_parser_inc = [include_directories('tree_sitter')]

diff --git a/dev-util/rizin/rizin-0.4.0.ebuild b/dev-util/rizin/rizin-0.4.0.ebuild
new file mode 100644
index 000000000000..7602de44178a
--- /dev/null
+++ b/dev-util/rizin/rizin-0.4.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+# This is the commit that the CI for the release commit used
+BINS_COMMIT="64a6f26369bf5893ecc20cb8984a5ad506ef8566"
+
+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 )"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0/${PV}"
+IUSE="test"
+
+# Need to audit licenses of the binaries used for testing
+RESTRICT="fetch !test? ( test )"
+
+RDEPEND="
+	sys-apps/file
+	app-arch/lz4:0=
+	<dev-libs/capstone-5:0=
+	dev-libs/libuv:0=
+	dev-libs/libzip:0=
+	dev-libs/openssl:0=
+	>=dev-libs/tree-sitter-0.19.0
+	dev-libs/xxhash
+	sys-libs/zlib:0=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
+)
+
+S="${WORKDIR}/${PN}-v${PV}"
+
+src_prepare() {
+	default
+
+	local py_to_mangle=(
+		librz/core/cmd_descs/cmd_descs_generate.py
+		subprojects/lz4-1.9.3/contrib/meson/meson/GetLz4LibraryVersion.py
+		subprojects/lz4-1.9.3/contrib/meson/meson/InstallSymlink.py
+		subprojects/lz4-1.9.3/tests/test-lz4-list.py
+		subprojects/lz4-1.9.3/tests/test-lz4-speed.py
+		subprojects/lz4-1.9.3/tests/test-lz4-versions.py
+		sys/clang-format.py
+		test/fuzz/scripts/fuzz_rz_asm.py
+		test/scripts/gdbserver.py
+	)
+
+	python_fix_shebang "${py_to_mangle[@]}"
+
+	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_magic=enabled
+		-Duse_sys_libzip=enabled
+		-Duse_sys_zlib=enabled
+		-Duse_sys_lz4=enabled
+		-Duse_sys_xxhash=enabled
+		-Duse_sys_openssl=enabled
+		-Duse_sys_tree_sitter=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
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/
@ 2022-07-08 19:03 John Helmert III
  0 siblings, 0 replies; 8+ messages in thread
From: John Helmert III @ 2022-07-08 19:03 UTC (permalink / raw
  To: gentoo-commits

commit:     fd6ebb9e30ebe13d67386165e6b91ca18b4d6781
Author:     Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
AuthorDate: Thu Jul  7 06:03:17 2022 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Fri Jul  8 19:01:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd6ebb9e

dev-util/rizin: remove version constraint for capstone dependency

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
Closes: https://github.com/gentoo/gentoo/pull/26255
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 dev-util/rizin/files/rizin-0.4.0-capstone.patch | 22 ++++++
 dev-util/rizin/rizin-0.4.0-r1.ebuild            | 95 +++++++++++++++++++++++++
 2 files changed, 117 insertions(+)

diff --git a/dev-util/rizin/files/rizin-0.4.0-capstone.patch b/dev-util/rizin/files/rizin-0.4.0-capstone.patch
new file mode 100644
index 000000000000..4132e97095f6
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.4.0-capstone.patch
@@ -0,0 +1,22 @@
+From 2b8104bc5e763ed841d6dbffacbeaf02e86b8421 Mon Sep 17 00:00:00 2001
+From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
+Date: Thu, 7 Jul 2022 07:50:10 +0200
+Subject: [PATCH] Fix capstone include directory
+
+---
+ librz/analysis/arch/arm/arm_il64.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/librz/analysis/arch/arm/arm_il64.c b/librz/analysis/arch/arm/arm_il64.c
+index 2e9da10aece..6b552596c9e 100644
+--- a/librz/analysis/arch/arm/arm_il64.c
++++ b/librz/analysis/arch/arm/arm_il64.c
+@@ -2,7 +2,7 @@
+ // SPDX-License-Identifier: LGPL-3.0-only
+ 
+ #include <rz_analysis.h>
+-#include <capstone.h>
++#include <capstone/capstone.h>
+ 
+ #include "arm_cs.h"
+ 

diff --git a/dev-util/rizin/rizin-0.4.0-r1.ebuild b/dev-util/rizin/rizin-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..b298dce57be7
--- /dev/null
+++ b/dev-util/rizin/rizin-0.4.0-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+# This is the commit that the CI for the release commit used
+BINS_COMMIT="64a6f26369bf5893ecc20cb8984a5ad506ef8566"
+
+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 )"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0/${PV}"
+IUSE="test"
+
+# Need to audit licenses of the binaries used for testing
+RESTRICT="fetch !test? ( test )"
+
+RDEPEND="
+	sys-apps/file
+	app-arch/lz4:0=
+	dev-libs/capstone:0=
+	dev-libs/libuv:0=
+	dev-libs/libzip:0=
+	dev-libs/openssl:0=
+	>=dev-libs/tree-sitter-0.19.0
+	dev-libs/xxhash
+	sys-libs/zlib:0=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
+	"${FILESDIR}/${P}-capstone.patch"
+)
+
+S="${WORKDIR}/${PN}-v${PV}"
+
+src_prepare() {
+	default
+
+	local py_to_mangle=(
+		librz/core/cmd_descs/cmd_descs_generate.py
+		subprojects/lz4-1.9.3/contrib/meson/meson/GetLz4LibraryVersion.py
+		subprojects/lz4-1.9.3/contrib/meson/meson/InstallSymlink.py
+		subprojects/lz4-1.9.3/tests/test-lz4-list.py
+		subprojects/lz4-1.9.3/tests/test-lz4-speed.py
+		subprojects/lz4-1.9.3/tests/test-lz4-versions.py
+		sys/clang-format.py
+		test/fuzz/scripts/fuzz_rz_asm.py
+		test/scripts/gdbserver.py
+	)
+
+	python_fix_shebang "${py_to_mangle[@]}"
+
+	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_magic=enabled
+		-Duse_sys_libzip=enabled
+		-Duse_sys_zlib=enabled
+		-Duse_sys_lz4=enabled
+		-Duse_sys_xxhash=enabled
+		-Duse_sys_openssl=enabled
+		-Duse_sys_tree_sitter=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
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/
@ 2022-09-18 21:43 John Helmert III
  0 siblings, 0 replies; 8+ messages in thread
From: John Helmert III @ 2022-09-18 21:43 UTC (permalink / raw
  To: gentoo-commits

commit:     afc498940ea5697bf841f7f8e052be6ec4768396
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 18 21:40:45 2022 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Sun Sep 18 21:42:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afc49894

dev-util/rizin: drop 0.4.0-r1

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

 dev-util/rizin/Manifest                         |  2 -
 dev-util/rizin/files/rizin-0.4.0-capstone.patch | 22 ------
 dev-util/rizin/rizin-0.4.0-r1.ebuild            | 95 -------------------------
 3 files changed, 119 deletions(-)

diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest
index de010726dcf3..aaaf7a30d602 100644
--- a/dev-util/rizin/Manifest
+++ b/dev-util/rizin/Manifest
@@ -1,4 +1,2 @@
-DIST rizin-src-v0.4.0.tar.xz 11432232 BLAKE2B 095ca9d317296afca9514a70f208e9aa87fc426e6b7e41163f64d5a1192a4d9ccd8ece9c4f13a24fc973668dece625fa13ad75542695a66c542fe2f0d9e66733 SHA512 9d576bee48e5ceae46b4e309c53e01b82edf89a95046f576e1c38fefa73353d6d1f04e6d444332324387d4e115bc87659a358629f7277a41dfef44c82364547b
 DIST rizin-src-v0.4.1.tar.xz 11453808 BLAKE2B dcae21320e2533904d9a337d4fb9cc9a450439753106dc5c341e3ca7c788f0a44034340eb0dfe3fad4f1d8a7ebe873720d42d70ce343e8c7b953d4d148a38da2 SHA512 565358e11fd4db44ec7f8c25313a1cfc726c38a17afcb699c3fc2af520242fb343ea4a267f0a8e35bdc08e9a765a6a17ec7b8eaba9f9ad9ef5a7dcfe01c7354c
-DIST rizin-testbins-64a6f26369bf5893ecc20cb8984a5ad506ef8566.tar.gz 172591261 BLAKE2B e78843fd95ac0406f66490b7253206e77787fc65780bc7c6a67d26aa9618a6f85803a88724ad424a7bdeeb20d95ebf9314e582029ac778d7d4de4f207ff54aad SHA512 ada4a3faad94553f0f2802419ba604177bb66d332b1a351effd485d65bd8365abb36d736486bbd0bcbc0da584ad4a2edaa7aa3cb62fa12811282c2e0afecb950
 DIST rizin-testbins-aef7f7b714a696f382f55b8cbbf94c5b69518de3.tar.gz 178497762 BLAKE2B 8c82a537a58e65d35bd8b309311c4377b5996ff4b650fc6cff4cf347e04fbe4b2ec0e88f03ff43572c8e99675186b05b393b7da070a60ab107c3cca829d2544b SHA512 2745b58646963c28a45b46e8e709845c355863e61cf796aeb3d2e617f1bf2f9916a4b106cd08f48b1ef6e36f7f38624b5977dcd62c921124b0a1122b7220baa8

diff --git a/dev-util/rizin/files/rizin-0.4.0-capstone.patch b/dev-util/rizin/files/rizin-0.4.0-capstone.patch
deleted file mode 100644
index 4132e97095f6..000000000000
--- a/dev-util/rizin/files/rizin-0.4.0-capstone.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 2b8104bc5e763ed841d6dbffacbeaf02e86b8421 Mon Sep 17 00:00:00 2001
-From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
-Date: Thu, 7 Jul 2022 07:50:10 +0200
-Subject: [PATCH] Fix capstone include directory
-
----
- librz/analysis/arch/arm/arm_il64.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/librz/analysis/arch/arm/arm_il64.c b/librz/analysis/arch/arm/arm_il64.c
-index 2e9da10aece..6b552596c9e 100644
---- a/librz/analysis/arch/arm/arm_il64.c
-+++ b/librz/analysis/arch/arm/arm_il64.c
-@@ -2,7 +2,7 @@
- // SPDX-License-Identifier: LGPL-3.0-only
- 
- #include <rz_analysis.h>
--#include <capstone.h>
-+#include <capstone/capstone.h>
- 
- #include "arm_cs.h"
- 

diff --git a/dev-util/rizin/rizin-0.4.0-r1.ebuild b/dev-util/rizin/rizin-0.4.0-r1.ebuild
deleted file mode 100644
index f1ecf6fdcb2b..000000000000
--- a/dev-util/rizin/rizin-0.4.0-r1.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-# This is the commit that the CI for the release commit used
-BINS_COMMIT="64a6f26369bf5893ecc20cb8984a5ad506ef8566"
-
-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 )"
-KEYWORDS="amd64 ~arm64 ~x86"
-
-LICENSE="Apache-2.0 BSD LGPL-3 MIT"
-SLOT="0/${PV}"
-IUSE="test"
-
-# Need to audit licenses of the binaries used for testing
-RESTRICT="fetch !test? ( test )"
-
-RDEPEND="
-	sys-apps/file
-	app-arch/lz4:0=
-	dev-libs/capstone:0=
-	dev-libs/libuv:0=
-	dev-libs/libzip:0=
-	dev-libs/openssl:0=
-	>=dev-libs/tree-sitter-0.19.0
-	dev-libs/xxhash
-	sys-libs/zlib:0=
-"
-DEPEND="${RDEPEND}"
-BDEPEND="${PYTHON_DEPS}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
-	"${FILESDIR}/${P}-capstone.patch"
-)
-
-S="${WORKDIR}/${PN}-v${PV}"
-
-src_prepare() {
-	default
-
-	local py_to_mangle=(
-		librz/core/cmd_descs/cmd_descs_generate.py
-		subprojects/lz4-1.9.3/contrib/meson/meson/GetLz4LibraryVersion.py
-		subprojects/lz4-1.9.3/contrib/meson/meson/InstallSymlink.py
-		subprojects/lz4-1.9.3/tests/test-lz4-list.py
-		subprojects/lz4-1.9.3/tests/test-lz4-speed.py
-		subprojects/lz4-1.9.3/tests/test-lz4-versions.py
-		sys/clang-format.py
-		test/fuzz/scripts/fuzz_rz_asm.py
-		test/scripts/gdbserver.py
-	)
-
-	python_fix_shebang "${py_to_mangle[@]}"
-
-	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_magic=enabled
-		-Duse_sys_libzip=enabled
-		-Duse_sys_zlib=enabled
-		-Duse_sys_lz4=enabled
-		-Duse_sys_xxhash=enabled
-		-Duse_sys_openssl=enabled
-		-Duse_sys_tree_sitter=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
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/
@ 2023-02-19  0:58 John Helmert III
  0 siblings, 0 replies; 8+ messages in thread
From: John Helmert III @ 2023-02-19  0:58 UTC (permalink / raw
  To: gentoo-commits

commit:     6c7380c8caebd3b4d7533c65384773fa8e57d6e4
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 19 00:51:46 2023 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Sun Feb 19 00:57:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c7380c8

dev-util/rizin: add 0.5.0

Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 dev-util/rizin/Manifest                            |  2 +
 .../files/rizin-0.5.0-capstone-include-path.patch  | 52 +++++++++++++
 dev-util/rizin/rizin-0.5.0.ebuild                  | 90 ++++++++++++++++++++++
 3 files changed, 144 insertions(+)

diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest
index aaaf7a30d602..3507cb8b84c3 100644
--- a/dev-util/rizin/Manifest
+++ b/dev-util/rizin/Manifest
@@ -1,2 +1,4 @@
 DIST rizin-src-v0.4.1.tar.xz 11453808 BLAKE2B dcae21320e2533904d9a337d4fb9cc9a450439753106dc5c341e3ca7c788f0a44034340eb0dfe3fad4f1d8a7ebe873720d42d70ce343e8c7b953d4d148a38da2 SHA512 565358e11fd4db44ec7f8c25313a1cfc726c38a17afcb699c3fc2af520242fb343ea4a267f0a8e35bdc08e9a765a6a17ec7b8eaba9f9ad9ef5a7dcfe01c7354c
+DIST rizin-src-v0.5.0.tar.xz 11774892 BLAKE2B ae64f2b14829eaedeff2e4ef9986778e311edddff7aac7b9a05a84d09015e13e67725e170d79f1f6bc85933726631ad76df2986e5c8fa64f3387418099296c2f SHA512 690a3220b808d41bcf56752556233d0d0b68b458c767441ce74f35358b2b4fa5e46a483a220d635e53bd287a0e10d16e5c141ba5cb916b984683f42eef10fcff
+DIST rizin-testbins-0264ae4ee5bd606ec6c6a539255eeb57ce2c82c2.tar.gz 179281553 BLAKE2B b86278589da2f8e5859b0f4b16e2667a6e7477c9a889158da5a2c1a1b6e29af4798d56a22dd4c3e23aec1908e7b444ca999502e73f8d8ccf4e0bf2a969380564 SHA512 ae11b6da5cb995f8f1cc996a7b772234b3e7e7c2b0695d0b223657ba839c82dbbcb390600aeb0d16c7c61a5037ba9d0739df79efd730c1b96392cfc1e6f6613d
 DIST rizin-testbins-aef7f7b714a696f382f55b8cbbf94c5b69518de3.tar.gz 178497762 BLAKE2B 8c82a537a58e65d35bd8b309311c4377b5996ff4b650fc6cff4cf347e04fbe4b2ec0e88f03ff43572c8e99675186b05b393b7da070a60ab107c3cca829d2544b SHA512 2745b58646963c28a45b46e8e709845c355863e61cf796aeb3d2e617f1bf2f9916a4b106cd08f48b1ef6e36f7f38624b5977dcd62c921124b0a1122b7220baa8

diff --git a/dev-util/rizin/files/rizin-0.5.0-capstone-include-path.patch b/dev-util/rizin/files/rizin-0.5.0-capstone-include-path.patch
new file mode 100644
index 000000000000..485a131cf483
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.5.0-capstone-include-path.patch
@@ -0,0 +1,52 @@
+Upstreamed at: https://github.com/rizinorg/rizin/pull/3380
+
+commit e1a65044139443c43a14c8304d095d9d6cddae56
+Author: John Helmert III <ajak@gentoo.org>
+Date:   Sat Feb 18 18:22:42 2023 -0600
+
+    fix capstone include paths
+    
+    capstone include paths were adjusted in
+    2b8104bc5e763ed841d6dbffacbeaf02e86b8421, and this wasn't picked up in
+    the "PPC uplifting" commit, leading to a build failure with system
+    capstone.
+    
+    Also fix the path of the ppc.h include, which seems to mistakenly use
+    capstone's ppc.h when building with bundled capstone.
+    
+    Fixes: b46e7bd4f2 ("PPC uplifting to RzIL (#2823)")
+    Signed-off-by: John Helmert III <ajak@gentoo.org>
+
+diff --git a/librz/analysis/arch/ppc/ppc_il.h b/librz/analysis/arch/ppc/ppc_il.h
+index ee91eb050b..7871414cef 100644
+--- a/librz/analysis/arch/ppc/ppc_il.h
++++ b/librz/analysis/arch/ppc/ppc_il.h
+@@ -9,7 +9,7 @@
+ #include <rz_analysis.h>
+ #include <rz_il.h>
+ #include <rz_types.h>
+-#include <capstone.h>
++#include <capstone/capstone.h>
+ 
+ #define PPC_BYTE  8
+ #define PPC_HWORD 16
+diff --git a/librz/analysis/arch/ppc/ppc_il_ops.c b/librz/analysis/arch/ppc/ppc_il_ops.c
+index f7a2261093..31a730c009 100644
+--- a/librz/analysis/arch/ppc/ppc_il_ops.c
++++ b/librz/analysis/arch/ppc/ppc_il_ops.c
+@@ -1,13 +1,13 @@
+ // SPDX-FileCopyrightText: 2022 Rot127 <unisono@quyllur.org>
+ // SPDX-License-Identifier: LGPL-3.0-only
+ 
+-#include "ppc.h"
++#include "opcode/ppc.h"
+ #include "ppc_il.h"
+ #include "ppc_analysis.h"
+ #include "rz_types_base.h"
+ #include <rz_il/rz_il_opcodes.h>
+ #include <rz_util/rz_assert.h>
+-#include <capstone.h>
++#include <capstone/capstone.h>
+ #include <rz_il/rz_il_opbuilder_begin.h>
+ 
+ static RzILOpEffect *load_op(RZ_BORROW csh handle, RZ_BORROW cs_insn *insn, const cs_mode mode) {

diff --git a/dev-util/rizin/rizin-0.5.0.ebuild b/dev-util/rizin/rizin-0.5.0.ebuild
new file mode 100644
index 000000000000..7b26e28e6034
--- /dev/null
+++ b/dev-util/rizin/rizin-0.5.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+# This is the commit that the CI for the release commit used
+BINS_COMMIT="0264ae4ee5bd606ec6c6a539255eeb57ce2c82c2"
+
+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 )"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0/${PV}"
+IUSE="test"
+
+# Need to audit licenses of the binaries used for testing
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	sys-apps/file
+	app-arch/lz4:0=
+	dev-libs/capstone:0=
+	dev-libs/libuv:0=
+	dev-libs/libzip:0=
+	dev-libs/openssl:0=
+	>=dev-libs/tree-sitter-0.19.0
+	dev-libs/xxhash
+	sys-libs/zlib:0=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
+	"${FILESDIR}/${PN}-0.5.0-capstone-include-path.patch"
+)
+
+S="${WORKDIR}/${PN}-v${PV}"
+
+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[@]}"
+
+	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_magic=enabled
+		-Duse_sys_libzip=enabled
+		-Duse_sys_zlib=enabled
+		-Duse_sys_lz4=enabled
+		-Duse_sys_xxhash=enabled
+		-Duse_sys_openssl=enabled
+		-Duse_sys_tree_sitter=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
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/
@ 2023-02-22  1:06 John Helmert III
  0 siblings, 0 replies; 8+ messages in thread
From: John Helmert III @ 2023-02-22  1:06 UTC (permalink / raw
  To: gentoo-commits

commit:     9184c6dd6297775f6e1f6b81da9325eb5cc71056
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 22 01:05:11 2023 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 01:05:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9184c6dd

dev-util/rizin: add 0.5.1, drop 0.5.0-r1

Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 dev-util/rizin/Manifest                            |  2 +-
 .../files/rizin-0.5.0-capstone-include-path.patch  | 52 ----------------------
 .../{rizin-0.5.0-r1.ebuild => rizin-0.5.1.ebuild}  |  1 -
 3 files changed, 1 insertion(+), 54 deletions(-)

diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest
index 3507cb8b84c3..518a6ae49d4c 100644
--- a/dev-util/rizin/Manifest
+++ b/dev-util/rizin/Manifest
@@ -1,4 +1,4 @@
 DIST rizin-src-v0.4.1.tar.xz 11453808 BLAKE2B dcae21320e2533904d9a337d4fb9cc9a450439753106dc5c341e3ca7c788f0a44034340eb0dfe3fad4f1d8a7ebe873720d42d70ce343e8c7b953d4d148a38da2 SHA512 565358e11fd4db44ec7f8c25313a1cfc726c38a17afcb699c3fc2af520242fb343ea4a267f0a8e35bdc08e9a765a6a17ec7b8eaba9f9ad9ef5a7dcfe01c7354c
-DIST rizin-src-v0.5.0.tar.xz 11774892 BLAKE2B ae64f2b14829eaedeff2e4ef9986778e311edddff7aac7b9a05a84d09015e13e67725e170d79f1f6bc85933726631ad76df2986e5c8fa64f3387418099296c2f SHA512 690a3220b808d41bcf56752556233d0d0b68b458c767441ce74f35358b2b4fa5e46a483a220d635e53bd287a0e10d16e5c141ba5cb916b984683f42eef10fcff
+DIST rizin-src-v0.5.1.tar.xz 11770688 BLAKE2B 31369497d5aa425aa6030ce404baa5d4a10ef2453a93f9b2c9f7d47135b5ffbc61618ef7e743acef3939bca2838a94637b7a1794ff44998608aee3f988301483 SHA512 c856112651bec91bb6e9f5580f60e3168f02a9f194bf567186a66398c162f59953ca8c3bf43441315356ca6ef077b7c56e4150e2dd8a79d4d08c5f789c549596
 DIST rizin-testbins-0264ae4ee5bd606ec6c6a539255eeb57ce2c82c2.tar.gz 179281553 BLAKE2B b86278589da2f8e5859b0f4b16e2667a6e7477c9a889158da5a2c1a1b6e29af4798d56a22dd4c3e23aec1908e7b444ca999502e73f8d8ccf4e0bf2a969380564 SHA512 ae11b6da5cb995f8f1cc996a7b772234b3e7e7c2b0695d0b223657ba839c82dbbcb390600aeb0d16c7c61a5037ba9d0739df79efd730c1b96392cfc1e6f6613d
 DIST rizin-testbins-aef7f7b714a696f382f55b8cbbf94c5b69518de3.tar.gz 178497762 BLAKE2B 8c82a537a58e65d35bd8b309311c4377b5996ff4b650fc6cff4cf347e04fbe4b2ec0e88f03ff43572c8e99675186b05b393b7da070a60ab107c3cca829d2544b SHA512 2745b58646963c28a45b46e8e709845c355863e61cf796aeb3d2e617f1bf2f9916a4b106cd08f48b1ef6e36f7f38624b5977dcd62c921124b0a1122b7220baa8

diff --git a/dev-util/rizin/files/rizin-0.5.0-capstone-include-path.patch b/dev-util/rizin/files/rizin-0.5.0-capstone-include-path.patch
deleted file mode 100644
index 485a131cf483..000000000000
--- a/dev-util/rizin/files/rizin-0.5.0-capstone-include-path.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstreamed at: https://github.com/rizinorg/rizin/pull/3380
-
-commit e1a65044139443c43a14c8304d095d9d6cddae56
-Author: John Helmert III <ajak@gentoo.org>
-Date:   Sat Feb 18 18:22:42 2023 -0600
-
-    fix capstone include paths
-    
-    capstone include paths were adjusted in
-    2b8104bc5e763ed841d6dbffacbeaf02e86b8421, and this wasn't picked up in
-    the "PPC uplifting" commit, leading to a build failure with system
-    capstone.
-    
-    Also fix the path of the ppc.h include, which seems to mistakenly use
-    capstone's ppc.h when building with bundled capstone.
-    
-    Fixes: b46e7bd4f2 ("PPC uplifting to RzIL (#2823)")
-    Signed-off-by: John Helmert III <ajak@gentoo.org>
-
-diff --git a/librz/analysis/arch/ppc/ppc_il.h b/librz/analysis/arch/ppc/ppc_il.h
-index ee91eb050b..7871414cef 100644
---- a/librz/analysis/arch/ppc/ppc_il.h
-+++ b/librz/analysis/arch/ppc/ppc_il.h
-@@ -9,7 +9,7 @@
- #include <rz_analysis.h>
- #include <rz_il.h>
- #include <rz_types.h>
--#include <capstone.h>
-+#include <capstone/capstone.h>
- 
- #define PPC_BYTE  8
- #define PPC_HWORD 16
-diff --git a/librz/analysis/arch/ppc/ppc_il_ops.c b/librz/analysis/arch/ppc/ppc_il_ops.c
-index f7a2261093..31a730c009 100644
---- a/librz/analysis/arch/ppc/ppc_il_ops.c
-+++ b/librz/analysis/arch/ppc/ppc_il_ops.c
-@@ -1,13 +1,13 @@
- // SPDX-FileCopyrightText: 2022 Rot127 <unisono@quyllur.org>
- // SPDX-License-Identifier: LGPL-3.0-only
- 
--#include "ppc.h"
-+#include "opcode/ppc.h"
- #include "ppc_il.h"
- #include "ppc_analysis.h"
- #include "rz_types_base.h"
- #include <rz_il/rz_il_opcodes.h>
- #include <rz_util/rz_assert.h>
--#include <capstone.h>
-+#include <capstone/capstone.h>
- #include <rz_il/rz_il_opbuilder_begin.h>
- 
- static RzILOpEffect *load_op(RZ_BORROW csh handle, RZ_BORROW cs_insn *insn, const cs_mode mode) {

diff --git a/dev-util/rizin/rizin-0.5.0-r1.ebuild b/dev-util/rizin/rizin-0.5.1.ebuild
similarity index 97%
rename from dev-util/rizin/rizin-0.5.0-r1.ebuild
rename to dev-util/rizin/rizin-0.5.1.ebuild
index 7144a4dcffb4..122296d19b05 100644
--- a/dev-util/rizin/rizin-0.5.0-r1.ebuild
+++ b/dev-util/rizin/rizin-0.5.1.ebuild
@@ -41,7 +41,6 @@ BDEPEND="${PYTHON_DEPS}"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
-	"${FILESDIR}/${PN}-0.5.0-capstone-include-path.patch"
 )
 
 S="${WORKDIR}/${PN}-v${PV}"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/
@ 2023-08-31  4:21 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2023-08-31  4:21 UTC (permalink / raw
  To: gentoo-commits

commit:     7fdc1251b7205263da7b5360aee17a5c5f82f7c5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 31 04:19:31 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 31 04:19:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fdc1251

dev-util/rizin: fix build w/ >=tree-sitter-0.20.8-r1

>=tree-sitter-0.20.8-r1 doesn't install parser.h anymore because it may be
mismatched with the version used to build the parser. Use one bundled with
rizin-shell-parser instead.

This should propagate into rizin-shell-parser when they regenerate
with a newer tree-sitter release (once one is made).

See also:
* https://github.com/tree-sitter/tree-sitter/pull/2573
* https://github.com/tree-sitter/tree-sitter/pull/2574

Bug: https://bugs.gentoo.org/912716
Closes: https://bugs.gentoo.org/913343
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../rizin-0.5.2-find-tree-sitter-parser.patch      | 33 ++++++++++++++++++++++
 dev-util/rizin/rizin-0.5.2.ebuild                  |  1 +
 2 files changed, 34 insertions(+)

diff --git a/dev-util/rizin/files/rizin-0.5.2-find-tree-sitter-parser.patch b/dev-util/rizin/files/rizin-0.5.2-find-tree-sitter-parser.patch
new file mode 100644
index 000000000000..27811e9930ee
--- /dev/null
+++ b/dev-util/rizin/files/rizin-0.5.2-find-tree-sitter-parser.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/913343
+
+>=tree-sitter-0.20.8-r1 doesn't install parser.h anymore because it may be
+mismatched with the version used to build the parser. Use one bundled with
+rizin-shell-parser instead.
+
+This should propagate into rizin-shell-parser when they regenerate
+with a newer tree-sitter release (once one is made).
+
+See also:
+* https://bugs.gentoo.org/912716
+* https://bugs.gentoo.org/913343
+* https://github.com/tree-sitter/tree-sitter/pull/2573
+* https://github.com/tree-sitter/tree-sitter/pull/2574
+--- a/subprojects/rizin-shell-parser/src/parser.c
++++ b/subprojects/rizin-shell-parser/src/parser.c
+@@ -1,4 +1,4 @@
+-#include <tree_sitter/parser.h>
++#include "tree_sitter/parser.h"
+ 
+ #if defined(__GNUC__) || defined(__clang__)
+ #pragma GCC diagnostic push
+--- a/subprojects/rizin-shell-parser/src/scanner.c
++++ b/subprojects/rizin-shell-parser/src/scanner.c
+@@ -1,7 +1,7 @@
+ // SPDX-FileCopyrightText: 2020 ret2libc <sirmy15@gmail.com>
+ // SPDX-License-Identifier: LGPL-3.0-only
+ 
+-#include <tree_sitter/parser.h>
++#include "tree_sitter/parser.h"
+ #include <ctype.h>
+ #include <wctype.h>
+ #include <stdio.h>

diff --git a/dev-util/rizin/rizin-0.5.2.ebuild b/dev-util/rizin/rizin-0.5.2.ebuild
index 9d91882992da..3a1e1579d4fb 100644
--- a/dev-util/rizin/rizin-0.5.2.ebuild
+++ b/dev-util/rizin/rizin-0.5.2.ebuild
@@ -41,6 +41,7 @@ BDEPEND="${PYTHON_DEPS}"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-0.4.0-never-rebuild-parser.patch"
+	"${FILESDIR}/${PN}-0.5.2-find-tree-sitter-parser.patch"
 )
 
 S="${WORKDIR}/${PN}-v${PV}"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-31  4:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-08 19:03 [gentoo-commits] repo/gentoo:master commit in: dev-util/rizin/, dev-util/rizin/files/ John Helmert III
  -- strict thread matches above, loose matches on Subject: below --
2023-08-31  4:21 Sam James
2023-02-22  1:06 John Helmert III
2023-02-19  0:58 John Helmert III
2022-09-18 21:43 John Helmert III
2022-07-04 20:01 John Helmert III
2022-01-10  6:10 John Helmert III
2021-12-14  1:08 John Helmert III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox