Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/radare2/
Date: Tue, 28 Nov 2017 21:09:12
Message-Id: 1511903209.7b9e497628a324e7b2291cf0dd79a73b4dd66757.slyfox@gentoo
1 commit: 7b9e497628a324e7b2291cf0dd79a73b4dd66757
2 Author: David Roman <davidroman96 <AT> gmail <DOT> com>
3 AuthorDate: Mon Nov 27 20:52:53 2017 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 28 21:06:49 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b9e4976
7
8 dev-util/radare2: add bash-completion support
9
10 Closes: https://github.com/gentoo/gentoo/pull/6327
11
12 dev-util/radare2/radare2-2.1.0-r1.ebuild | 60 ++++++++++++++++++++++++++++++++
13 1 file changed, 60 insertions(+)
14
15 diff --git a/dev-util/radare2/radare2-2.1.0-r1.ebuild b/dev-util/radare2/radare2-2.1.0-r1.ebuild
16 new file mode 100644
17 index 00000000000..f69a9666f3b
18 --- /dev/null
19 +++ b/dev-util/radare2/radare2-2.1.0-r1.ebuild
20 @@ -0,0 +1,60 @@
21 +# Copyright 1999-2017 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +
26 +inherit eutils bash-completion-r1
27 +
28 +DESCRIPTION="unix-like reverse engineering framework and commandline tools"
29 +HOMEPAGE="http://www.radare.org"
30 +
31 +if [[ ${PV} == *9999 ]]; then
32 + inherit git-r3
33 + EGIT_REPO_URI="https://github.com/radare/radare2"
34 +else
35 + SRC_URI="https://github.com/radare/radare2/archive/${PV}.tar.gz -> ${P}.tar.gz"
36 + KEYWORDS="~amd64 ~x86 ~arm ~arm64"
37 +fi
38 +
39 +PATCHES=(
40 + "${FILESDIR}"/${PN}-0.9.9-nogit.patch
41 +)
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +IUSE="ssl +system-capstone zsh-completion bash-completion"
46 +
47 +RDEPEND="
48 + ssl? ( dev-libs/openssl:0= )
49 + system-capstone? ( dev-libs/capstone:0= )
50 +"
51 +DEPEND="${RDEPEND}
52 + virtual/pkgconfig
53 +"
54 +
55 +src_configure() {
56 + econf \
57 + $(use_with ssl openssl) \
58 + $(use_with system-capstone syscapstone)
59 +}
60 +
61 +src_install() {
62 + default
63 +
64 + if use zsh-completion; then
65 + insinto /usr/share/zsh/site-functions
66 + doins doc/zsh/_*
67 + fi
68 +
69 + if use bash-completion; then
70 + newbashcomp doc/bash_autocompletion.sh "${PN}"
71 + fi
72 +
73 + # a workaround for unstable $(INSTALL) call, bug #574866
74 + local d
75 + for d in doc/*; do
76 + if [[ -d $d ]]; then
77 + rm -rfv "$d" || die "failed to delete '$d'"
78 + fi
79 + done
80 +}