From 1aa99ecc93a15a428a88197dd05d97bcd33102b7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 19 Feb 2023 02:12:45 +0000 Subject: gentoo auto-resync : 19:02:2023 - 02:12:45 --- dev-util/rizin/Manifest | 6 +- .../files/rizin-0.5.0-capstone-include-path.patch | 52 +++++++++++++ dev-util/rizin/rizin-0.4.1.ebuild | 4 +- dev-util/rizin/rizin-0.5.0.ebuild | 90 ++++++++++++++++++++++ 4 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 dev-util/rizin/files/rizin-0.5.0-capstone-include-path.patch create mode 100644 dev-util/rizin/rizin-0.5.0.ebuild (limited to 'dev-util/rizin') diff --git a/dev-util/rizin/Manifest b/dev-util/rizin/Manifest index 9667c91afbd6..8ebb7d944dc9 100644 --- a/dev-util/rizin/Manifest +++ b/dev-util/rizin/Manifest @@ -1,5 +1,9 @@ AUX rizin-0.4.0-never-rebuild-parser.patch 1568 BLAKE2B c77276adb8349188ebc937d84b011650b978ba5bed6c0596258963d395014c5e0733e44930b4c2db6dd88941d99b2aa37acf461d035fc31dcd321571ef0d6392 SHA512 a46311772dc42b90b8e3e49ddb66f6d64873773e254ac943934de0129d5f4a77ccb759d20b519b58418d45c076f136d582f2e70056693c75b2f6aae19eb07551 +AUX rizin-0.5.0-capstone-include-path.patch 1783 BLAKE2B 32d172b6dae3e4c7c740c2a5e3aaa9aa8a97d6ca9b3b96f21501cb1e3bd2381951733ccb08291944ecb37b19b14e9b54233bcf4b338e1e811117ff95fb897281 SHA512 9a1b7847ea0ef04318a8ae6568b9a4fb7d5ce9a28649dcbdb1e1bcb1f612e31b5e484738b77a2790a7f3b77a0b2ed965b0d58a65673cccf012d3d03e4f5958af 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 -EBUILD rizin-0.4.1.ebuild 2447 BLAKE2B 18afb0d0b664e636ffd6f605befe22621594045cac56cb3c90968cd2bb18e363a2192b61d55406c7ac1866eb2b15d47c2ed5295402bfa547940509bf7d6fa35f SHA512 a2d103f22892db99233377c9f994d744a9171608adfe16a655fe11d60c3d12275afabdcb96ec43c2beea041eeae116f7ebe170da25e2ba36165711c26753a6c0 +EBUILD rizin-0.4.1.ebuild 2441 BLAKE2B 6b93beab0b3f394b243039551c66a27cf498a7943cab90063d12d31e2349d478cbce12795ed724fd51393c1ce4e944f550e73279a52bcba7a3528370371b9d20 SHA512 ead851e780e6d3c0ce5e8c16789e182b62dab1631fabcebd96f17b0e0c449ae48b5c3caac1c0d1bfb7e7d2dadcaf0a6b16757b26991fe5f7647d7dd349bcb85b +EBUILD rizin-0.5.0.ebuild 2237 BLAKE2B 19f2a60df6f0bf6d2cb1b11c3ef4c6bafe1e97825c39a5ab07a3b2e7651824e891d298ccd2c7dd7eca5e83514b200c94c1d1cee8b99f4c835d8cc1d36ea8ee8d SHA512 3e59e4f18ffca150c19920db3b4bb4f75d179b7343e4d764eecc990b8c151b6fb5264f2fb61599ebab6b658f88691987b58b1c5210f37d23183df884175f5cb8 MISC metadata.xml 427 BLAKE2B 2937970e78526f69e371b4451a3406b1fdc35a01707d366e8b54e23f9d13e8a713254902825ae111817ee00ea3aaf3bc968db8b6d944b15f869e2b89ba8e16b8 SHA512 65cc9c4cd5f2f64cd02e89b0f7f4972fefec51cb175650625da263b729022587c9487e9ab9faed8517200ed622a8ca5ec35b2b6f4c67966d78344c043197c981 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 +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 + +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 + #include + #include +-#include ++#include + + #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 + // 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 + #include +-#include ++#include + #include + + 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.4.1.ebuild b/dev-util/rizin/rizin-0.4.1.ebuild index 1fcd320b67bf..26707156eddb 100644 --- a/dev-util/rizin/rizin-0.4.1.ebuild +++ b/dev-util/rizin/rizin-0.4.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -22,7 +22,7 @@ SLOT="0/${PV}" IUSE="test" # Need to audit licenses of the binaries used for testing -RESTRICT="fetch !test? ( test )" +RESTRICT="!test? ( test )" RDEPEND=" sys-apps/file 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..5bb4702d4c90 --- /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? ( 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}/${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 +} -- cgit v1.2.3