diff options
-rw-r--r-- | dev-util/radare2/Manifest | 1 | ||||
-rw-r--r-- | dev-util/radare2/files/radare2-fix-syscapstone-2.6.patch | 34 | ||||
-rw-r--r-- | dev-util/radare2/radare2-2.6.0.ebuild | 58 |
3 files changed, 93 insertions, 0 deletions
diff --git a/dev-util/radare2/Manifest b/dev-util/radare2/Manifest index 6e6a1d55e9b3..2861b0403cea 100644 --- a/dev-util/radare2/Manifest +++ b/dev-util/radare2/Manifest @@ -1 +1,2 @@ DIST radare2-2.5.0.tar.gz 6272646 BLAKE2B 44c88327b544d03bd464f1ecb72a51b7e3fa86602aeae9055b6f2d41763be9ed9d63be4c7b959e1f920605feeed998c1f56ef0ed3a6a7213b4d5265c057b1213 SHA512 a29e0e61aeee6e08a99a1ed8a8bc428ec8b0474b3781475db3091232353d03d39d8750f774a266e01bb7565049269ee5f43b666b3b69bfadafb75cdb35f6cc4b +DIST radare2-2.6.0.tar.gz 6306317 BLAKE2B 213ed0ac92f5b4b9cfc2ba93c5cda9168746cffb0016e1368c4c3939d694bffccf689764c60e0e59a52b70b6b7d49407516c9ecd6e62c59ed0db37c6f72867f5 SHA512 44e7d0c10e17b40d4d71af851cf462c159b03b3242dfccd786bd54d3cf9f92441084f26694166dd1385e84c00626f45dbe09d1fe713595721723c468ac47b01b diff --git a/dev-util/radare2/files/radare2-fix-syscapstone-2.6.patch b/dev-util/radare2/files/radare2-fix-syscapstone-2.6.patch new file mode 100644 index 000000000000..4eb3c053f07a --- /dev/null +++ b/dev-util/radare2/files/radare2-fix-syscapstone-2.6.patch @@ -0,0 +1,34 @@ +From 3752d992f3140806ea1d513739b6f23addf52df1 Mon Sep 17 00:00:00 2001 +From: cc <longlene@gmail.com> +Date: Tue, 22 May 2018 12:52:12 +0800 +Subject: [PATCH] fix for build with syscapstone + +--- + libr/Makefile | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/libr/Makefile b/libr/Makefile +index 05cb40fec7..0b39b48c02 100644 +--- a/libr/Makefile ++++ b/libr/Makefile +@@ -84,13 +84,18 @@ E+=../shlr/bochs/lib/libbochs.${EXT_AR} + #E+=../shlr/sdb/src/libsdb.${EXT_AR} + #endif + ++ifeq ($(USE_CAPSTONE),1) ++E+=$(CAPSTONE_LDFLAGS) ++else ++E+=../shlr/capstone/libcapstone.${EXT_AR} ++endif ++ + libr.${EXT_SO}: .libr + $(CC) -fvisibility=hidden $(MLFLAGS) -shared -dynamiclib -o libr.${EXT_SO} \ + .libr/*.o \ + ../shlr/gdb/lib/libgdbr.${EXT_AR} ../shlr/java/libr_java.${EXT_AR} \ + ../shlr/zip/librz.${EXT_AR} \ +- ../shlr/libr_shlr.${EXT_AR} $(E)\ +- ../shlr/capstone/libcapstone.${EXT_AR} ++ ../shlr/libr_shlr.${EXT_AR} $(E) + + else + diff --git a/dev-util/radare2/radare2-2.6.0.ebuild b/dev-util/radare2/radare2-2.6.0.ebuild new file mode 100644 index 000000000000..74ac2faaaf52 --- /dev/null +++ b/dev-util/radare2/radare2-2.6.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit bash-completion-r1 eutils + +DESCRIPTION="unix-like reverse engineering framework and commandline tools" +HOMEPAGE="http://www.radare.org" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/radare/radare2" +else + SRC_URI="https://github.com/radare/radare2/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86 ~arm ~arm64" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="ssl libressl" + +RDEPEND=" + dev-libs/capstone:0= + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +DEPEND="${RDEPEND} + virtual/pkgconfig +" + +PATCHES=( "${FILESDIR}/${PN}-fix-syscapstone-2.6.patch" ) + +src_configure() { + econf \ + --with-syscapstone \ + $(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 +} |