Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2020 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=7 |
5 |
|
6 |
inherit bash-completion-r1 eutils toolchain-funcs |
7 |
|
8 |
DESCRIPTION="unix-like reverse engineering framework and commandline tools" |
9 |
HOMEPAGE="http://www.radare.org" |
10 |
|
11 |
if [[ ${PV} == *9999 ]]; then |
12 |
inherit git-r3 |
13 |
EGIT_REPO_URI="https://github.com/radareorg/radare2" |
14 |
else |
15 |
SRC_URI="https://github.com/radareorg/radare2/archive/${PV}.tar.gz -> ${P}.tar.gz" |
16 |
KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
17 |
fi |
18 |
|
19 |
LICENSE="GPL-2" |
20 |
SLOT="0" |
21 |
IUSE="ssl libressl" |
22 |
|
23 |
RDEPEND=" |
24 |
dev-libs/libzip |
25 |
dev-libs/xxhash |
26 |
sys-apps/file |
27 |
sys-libs/zlib |
28 |
dev-libs/capstone:0= |
29 |
ssl? ( |
30 |
!libressl? ( dev-libs/openssl:0= ) |
31 |
libressl? ( dev-libs/libressl:0= ) |
32 |
) |
33 |
" |
34 |
DEPEND="${RDEPEND}" |
35 |
BDEPEND="virtual/pkgconfig" |
36 |
|
37 |
PATCHES=("${FILESDIR}"/${PN}-4.5.1-docdir.patch) |
38 |
|
39 |
src_configure() { |
40 |
# Ideally these should be set by ./configure |
41 |
tc-export CC AR LD OBJCOPY RANLIB |
42 |
export HOST_CC=${CC} |
43 |
|
44 |
econf \ |
45 |
--without-libuv \ |
46 |
--with-syscapstone \ |
47 |
--with-sysmagic \ |
48 |
--with-sysxxhash \ |
49 |
--with-syszip \ |
50 |
$(use_with ssl openssl) |
51 |
} |
52 |
|
53 |
src_install() { |
54 |
default |
55 |
|
56 |
insinto /usr/share/zsh/site-functions |
57 |
doins doc/zsh/_* |
58 |
|
59 |
newbashcomp doc/bash_autocompletion.sh "${PN}" |
60 |
bashcomp_alias "${PN}" rafind2 r2 rabin2 rasm2 radiff2 |
61 |
|
62 |
# a workaround for unstable $(INSTALL) call, bug #574866 |
63 |
local d |
64 |
for d in doc/*; do |
65 |
if [[ -d $d ]]; then |
66 |
rm -rfv "$d" || die "failed to delete '$d'" |
67 |
fi |
68 |
done |
69 |
|
70 |
# These are not really docs. radare assumes |
71 |
# uncompressed files: bug #761250 |
72 |
docompress -x /usr/share/doc/${PF}/fortunes.{creepy,fun,nsfw,tips} |
73 |
} |