diff options
author | David Roman <davidroman96@gmail.com> | 2022-09-16 16:54:24 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-10-02 16:53:40 +0200 |
commit | df630c02c167aa59d498dc041b5fe5b9df9d0dce (patch) | |
tree | b0043b5a149d090130e10a31afddbd8133c2f49b /dev-util | |
parent | dev-util/codespell: drop 2.1.0 (diff) | |
download | gentoo-df630c02c167aa59d498dc041b5fe5b9df9d0dce.tar.gz gentoo-df630c02c167aa59d498dc041b5fe5b9df9d0dce.tar.bz2 gentoo-df630c02c167aa59d498dc041b5fe5b9df9d0dce.zip |
dev-util/radare2: add 5.7.8
Signed-off-by: David Roman <davidroman96@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/27281
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/radare2/Manifest | 3 | ||||
-rw-r--r-- | dev-util/radare2/radare2-5.7.8.ebuild | 119 |
2 files changed, 122 insertions, 0 deletions
diff --git a/dev-util/radare2/Manifest b/dev-util/radare2/Manifest index 9da021966bb5..8929834b2409 100644 --- a/dev-util/radare2/Manifest +++ b/dev-util/radare2/Manifest @@ -4,5 +4,8 @@ DIST radare2-5.7.4.tar.gz 9814654 BLAKE2B ae8ed1d7b417236c27ee4857f7c33d657d379b DIST radare2-5.7.6-vector35-arm64.tar.gz 1050960 BLAKE2B 12faa86a4cdfd9cdc8e307c16d8f797ae3ee800b72e76c6ace84cb7cb5108198dbfbc9a00df6b70448628dc869c94bf8cf9794460d05be99e5a08ee5a3ed40de SHA512 478f06c3fe09232152bbb63e500a440ca8546cc11fe59f9d489a25d327469b1869fe80b4e2e2cfad8a2b96261857cf74b6708628ac30ec8dabc5da05d04c1cfd DIST radare2-5.7.6-vector35-armv7.tar.gz 255288 BLAKE2B ca96b3f68381a0987c4efa10dcb798194486019762e89d1eb19a3fd24f6983535eea792099c60e4c1a9d2bdb5baab119fe2e9a7a889fad5a14023e5f984959b8 SHA512 e9eb6cee02bbbb265914b1f9118c7a143ed76a201c085af5516855475bf7f3ad5f9c82d1548e85a0339fbc33e029ef0e4be9d8cef68d212ae16ce1a7f18453ff DIST radare2-5.7.6.tar.gz 10071795 BLAKE2B e0bd54fcf4a56b34ec6f3b87ab6a20a8be23514e48842d66d7a30f517fa9ba871bd1e740604840fb16a3ae1329221ee67645774ac7df9f8f8d00dc3548dc7830 SHA512 04717ddb4bef9ed415c22aa25a0bf626f05c5d32133ac46d5e8a30ebe83e7b782a2b1835233f17f16315a99a39b33dd4e67c34798eb8ae9fbc6db51ca1051e94 +DIST radare2-5.7.8-vector35-arm64.tar.gz 1050960 BLAKE2B 12faa86a4cdfd9cdc8e307c16d8f797ae3ee800b72e76c6ace84cb7cb5108198dbfbc9a00df6b70448628dc869c94bf8cf9794460d05be99e5a08ee5a3ed40de SHA512 478f06c3fe09232152bbb63e500a440ca8546cc11fe59f9d489a25d327469b1869fe80b4e2e2cfad8a2b96261857cf74b6708628ac30ec8dabc5da05d04c1cfd +DIST radare2-5.7.8-vector35-armv7.tar.gz 255288 BLAKE2B ca96b3f68381a0987c4efa10dcb798194486019762e89d1eb19a3fd24f6983535eea792099c60e4c1a9d2bdb5baab119fe2e9a7a889fad5a14023e5f984959b8 SHA512 e9eb6cee02bbbb265914b1f9118c7a143ed76a201c085af5516855475bf7f3ad5f9c82d1548e85a0339fbc33e029ef0e4be9d8cef68d212ae16ce1a7f18453ff +DIST radare2-5.7.8.tar.gz 10324020 BLAKE2B 628b0c146a8e797f34f43f8d76166fb8c5e945a45232c2e4d63b2c2ce89aef96a20349c519ceb62921bad75ce5faaa8ea51ab1dac79156e00eef8f9ef06f5a45 SHA512 7c819a052f5e4b3da72b945915fca92a747c52dc2e2fa8483a8c2d8e71479ce374efbbe2bc02b1b4af26db6a891b6e44cdbb9e062de2f13b22a258cceab561f6 DIST radare2-testbins-2fdb78f7f754b3aea90377588d45b774ccb41086.tar.gz 120580683 BLAKE2B ba16206f3c44f43c36fbc3079e43d29cd5b6266f8bd31602d7ec218a2b14601173c9022be9329975bd28de948933deeecc052f56c2acd9d6dfeb5576049ec32f SHA512 2c66c8f68df7c51a52a73b33e854b095a4f5435c60eab2a1456f366376aac0f7c39836699e09eae2918f31e75b7c6562994f0916f45de53ae6a480506da95dcb DIST radare2-testbins-602471f72caa60d6ece43c3fa483c43decf7052c.tar.gz 124090448 BLAKE2B 446f4b730095dc263f31bbd886b350fbf3cbde0cd3bc6f5ed0c5d65a90a66b4d97a7397798c0f6fb7596722d827a3805c6d4d810d06837cf46e8798cedb1fea4 SHA512 b490ec951813827bed940ca4fc772691f8e446ce14cf2f0cc7fe2027a481c91939e6212ce94237f71091c18ac8428c9a4a4f35fc58f41ba076c1da75835d0ff4 diff --git a/dev-util/radare2/radare2-5.7.8.ebuild b/dev-util/radare2/radare2-5.7.8.ebuild new file mode 100644 index 000000000000..8d4bfd6a4e75 --- /dev/null +++ b/dev-util/radare2/radare2-5.7.8.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 toolchain-funcs + +DESCRIPTION="unix-like reverse engineering framework and commandline tools" +HOMEPAGE="https://www.radare.org" + +ARM64_COMMIT=9ab2b0bedde459dc86e079718333de4a63bbbacb +ARMV7_COMMIT=dde39f69ffea19fc37e681874b12cb4707bc4f30 +BINS_COMMIT=602471f72caa60d6ece43c3fa483c43decf7052c + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/radareorg/radare2" +else + SRC_URI="mirror+https://github.com/radareorg/radare2/archive/${PV}.tar.gz -> ${P}.tar.gz + mirror+https://github.com/radareorg/vector35-arch-arm64/archive/${ARM64_COMMIT}.tar.gz -> ${P}-vector35-arm64.tar.gz + mirror+https://github.com/radareorg/vector35-arch-armv7/archive/${ARMV7_COMMIT}.tar.gz -> ${P}-vector35-armv7.tar.gz + test? ( https://github.com/radareorg/radare2-testbins/archive/${BINS_COMMIT}.tar.gz -> radare2-testbins-${BINS_COMMIT}.tar.gz ) + " + + KEYWORDS="~amd64 ~arm ~arm64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="ssl test" + +# Need to audit licenses of the binaries used for testing +RESTRICT="fetch !test? ( test )" + +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.7.0-vector35.patch" ) + +src_prepare() { + default + + # 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 + + if use test; then + cp -r "${WORKDIR}/radare2-testbins-${BINS_COMMIT}" "${S}/test/bins" || die + cp -r "${WORKDIR}/radare2-testbins-${BINS_COMMIT}" "${S}" || die + fi + + # Fix hardcoded docdir for fortunes + sed -i -e "/^#define R2_FORTUNES/s/radare2/$PF/" \ + libr/include/r_userconf.h.acr +} + +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_test() { + ln -fs "${S}/binr/radare2/radare2" "${S}/binr/radare2/r2" || die + LDFLAGS="" + for i in "${S}"/libr/*; do + if [[ -d ${i} ]]; then + LDFLAGS+="-R${i} -L${i} " + LD_LIBRARY_PATH+=":${i}" + fi + done + export LDFLAGS LD_LIBRARY_PATH + export PKG_CONFIG_PATH="${S}/pkgcfg" + PATH="${S}/binr/radare2:${PATH}" emake -C test -k unit_tests || die +} + +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} + + # Create plugins directory although it's currently unsupported by radare2 + keepdir "/usr/$(get_libdir)/radare2/${PV}" || die +} |