-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: https://bugs.gentoo.org/815046 Bug: https://bugs.gentoo.org/790284 Bug: https://bugs.gentoo.org/807061 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: David Roman <davidroman96@gmail.com>
- Loading branch information
Showing
4 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
DIST 3c5eaba46dab72ecb7d5f5b865a13fdeee95b464.tar.gz 1021299 BLAKE2B 389bdc43e90ba71961e5d8afca495bd63b25d4c0dc9513c5e9cc0770f091199197dc1e4b8a9d4c57206acfd892a6b4ff9ba8b0f925e493f540956c64edfcd809 SHA512 7762cee60acc7605c2c127acab646c5c58c5736e6801058eec69c2da52901d0ecab85b0496d798be6403bedf27ffd4fe4e3a8d47c8802af1fe3805a4ac32ae26 | ||
DIST dde39f69ffea19fc37e681874b12cb4707bc4f30.tar.gz 255288 BLAKE2B ca96b3f68381a0987c4efa10dcb798194486019762e89d1eb19a3fd24f6983535eea792099c60e4c1a9d2bdb5baab119fe2e9a7a889fad5a14023e5f984959b8 SHA512 e9eb6cee02bbbb265914b1f9118c7a143ed76a201c085af5516855475bf7f3ad5f9c82d1548e85a0339fbc33e029ef0e4be9d8cef68d212ae16ce1a7f18453ff | ||
DIST radare2-4.5.1.tar.gz 8266567 BLAKE2B 0d23c1d47dd79ffd9398ca7b2c8b383ba6a7e3ec662046d1111ab34cabcdaaf1fdd449686433b3229e3c22c31c705530b0a85bbd22b5fc79891a5ad292ba0ff1 SHA512 f08a4cd1e0d65643463d9f9dbb1aacfe793c7b411ec820a18b75a5975d265cfc2cf91e593522c8823aa369098ded21415939acb07c84d8acd102889bf5aed899 | ||
DIST radare2-5.3.1.tar.gz 8500461 BLAKE2B 8b29e81c90f477e313f5d14dea707f3e8d47c9abbe1f9ca2c7caef98a85b38a5b5e37a31063be289c55fda041e10b8403895f863dd602091ab5307213605260d SHA512 34c96c7c863fb8a59f1d03539375d5b8f31f6021dc84ce943daa163d8a0227bf3156963cc187c366790abec4381da6aa987248e76570a498cfcdeb982cb2ffc0 | ||
DIST radare2-5.5.0.tar.gz 9599038 BLAKE2B ae171fd1e0aba6dd35eda29e9a6fa0aa77ef5b9b09cb4a96f427c7efc35391acd85ef86a913387deeb9de1469aad98ce14f3dcb96579e067f3dc81bcb75af2a4 SHA512 a5a6a8b1c88fd01a4920e1bac15b853afdf23701229cd13789962682208ee6fa727c04acb5ee4fc54dd55a99016a68332fd4586c01ff69596b6abf461a7eb665 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 645835794b0013b52042d5762d98d03fcbf250f6 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Sergi=20=C3=80lvarez=20i=20Capilla?= <pancake@nowsecure.com> | ||
Date: Mon, 15 Nov 2021 18:10:04 +0100 | ||
Subject: [PATCH] arm64's NAND isnt supported in capstone4 | ||
|
||
--- | ||
libr/anal/p/anal_arm_cs.c | 6 +++--- | ||
1 file changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/libr/anal/p/anal_arm_cs.c b/libr/anal/p/anal_arm_cs.c | ||
index dbdfcafd898..307b3997486 100644 | ||
--- a/libr/anal/p/anal_arm_cs.c | ||
+++ b/libr/anal/p/anal_arm_cs.c | ||
@@ -1361,13 +1361,13 @@ static int analop64_esil(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int l | ||
case ARM64_INS_AND: | ||
OPCALL("&"); | ||
break; | ||
- case ARM64_INS_NAND: | ||
- OPCALL_NEG("&"); | ||
- break; | ||
case ARM64_INS_ORR: | ||
OPCALL("|"); | ||
break; | ||
#if CS_API_MAJOR > 4 | ||
+ case ARM64_INS_NAND: | ||
+ OPCALL_NEG("&"); | ||
+ break; | ||
case ARM64_INS_ADDS: | ||
case ARM64_INS_ADCS: | ||
OPCALL("+"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- a/libr/asm/arch/arm/v35arm64/Makefile | ||
+++ b/libr/asm/arch/arm/v35arm64/Makefile | ||
@@ -30,8 +30,7 @@ $(ALIBS): arch-arm64 arch-armv7 | ||
|
||
## ARM64 | ||
arch-arm64: | ||
- git clone -q https://github.com/radareorg/vector35-arch-arm64 arch-arm64 | ||
- cd arch-arm64 && git checkout -q radare2 > /dev/null && git reset --hard $(ARCH_ARM64_COMMIT) | ||
+ cd arch-arm64 | ||
|
||
$(V35ARM64_HOME)/arm64dis.a arm64dis.a: $(ALIBS) | ||
rm -f arm64dis.$(EXT_AR) | ||
@@ -40,8 +39,7 @@ $(V35ARM64_HOME)/arm64dis.a arm64dis.a: $(ALIBS) | ||
|
||
## ARMV7 | ||
arch-armv7: | ||
- git clone -q https://github.com/radareorg/vector35-arch-armv7 arch-armv7 | ||
- cd arch-armv7 && git checkout -q radare2 > /dev/null && git reset --hard $(ARCH_ARMV7_COMMIT) | ||
+ cd arch-armv7 | ||
|
||
$(V35ARMV7_HOME)/armv7dis.a armv7dis.a: $(ALIBS) | ||
rm -f armv7dis.$(EXT_AR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit bash-completion-r1 toolchain-funcs | ||
|
||
DESCRIPTION="unix-like reverse engineering framework and commandline tools" | ||
HOMEPAGE="http://www.radare.org" | ||
|
||
|
||
ARM64_COMMIT=3c5eaba46dab72ecb7d5f5b865a13fdeee95b464 | ||
ARMV7_COMMIT=dde39f69ffea19fc37e681874b12cb4707bc4f30 | ||
|
||
if [[ ${PV} == *9999 ]]; then | ||
inherit git-r3 | ||
EGIT_REPO_URI="https://github.com/radareorg/radare2" | ||
else | ||
SRC_URI="https://github.com/radareorg/radare2/archive/${PV}.tar.gz -> ${P}.tar.gz | ||
https://github.com/radareorg/vector35-arch-arm64/archive/${ARM64_COMMIT}.tar.gz | ||
https://github.com/radareorg/vector35-arch-armv7/archive/${ARMV7_COMMIT}.tar.gz | ||
" | ||
|
||
KEYWORDS="~amd64 ~arm ~arm64 ~x86" | ||
fi | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
IUSE="ssl" | ||
|
||
RDEPEND=" | ||
dev-libs/libzip | ||
dev-libs/xxhash | ||
sys-apps/file | ||
sys-libs/zlib | ||
dev-libs/capstone:0= | ||
ssl? ( dev-libs/openssl:0= ) | ||
" | ||
DEPEND=" | ||
${RDEPEND} | ||
dev-util/gperf | ||
" | ||
BDEPEND="virtual/pkgconfig" | ||
|
||
PATCHES=( "${FILESDIR}/${PN}-5.5.0-vector35.patch" "${FILESDIR}/${P}-capstone.patch" ) | ||
|
||
src_prepare() { | ||
# Hack for vector35 arm plugins | ||
mv "${WORKDIR}/vector35-arch-arm64-${ARM64_COMMIT}" libr/asm/arch/arm/v35arm64/arch-arm64 || die | ||
mv "${WORKDIR}/vector35-arch-armv7-${ARMV7_COMMIT}" libr/asm/arch/arm/v35arm64/arch-armv7 || die | ||
|
||
# Fix hardcoded docdir for fortunes | ||
sed -i -e "/^#define R2_FORTUNES/s/radare2/$PF/" \ | ||
libr/include/r_userconf.h.acr | ||
default | ||
} | ||
|
||
src_configure() { | ||
# Ideally these should be set by ./configure | ||
tc-export CC AR LD OBJCOPY RANLIB | ||
export HOST_CC=${CC} | ||
|
||
econf \ | ||
--without-libuv \ | ||
--with-syscapstone \ | ||
--with-sysmagic \ | ||
--with-sysxxhash \ | ||
--with-syszip \ | ||
$(use_with ssl openssl) | ||
} | ||
|
||
src_install() { | ||
default | ||
|
||
insinto /usr/share/zsh/site-functions | ||
doins doc/zsh/_* | ||
|
||
newbashcomp doc/bash_autocompletion.sh "${PN}" | ||
bashcomp_alias "${PN}" rafind2 r2 rabin2 rasm2 radiff2 | ||
|
||
# a workaround for unstable $(INSTALL) call, bug #574866 | ||
local d | ||
for d in doc/*; do | ||
if [[ -d ${d} ]]; then | ||
rm -rfv "${d}" || die "failed to delete '${d}'" | ||
fi | ||
done | ||
|
||
# These are not really docs. radare assumes | ||
# uncompressed files: bug #761250 | ||
docompress -x /usr/share/doc/${PF}/fortunes.{creepy,fun,nsfw,tips} | ||
} |