1 |
commit: 8b23a01ee9c711bd6faec409c95c0b46f76abef2 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 29 20:45:20 2017 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 29 20:47:07 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b23a01e |
7 |
|
8 |
dev-util/radare2: use system-installed capstone, bug #592220 |
9 |
|
10 |
Reported-by: Anton Bolshakov |
11 |
Bug: https://bugs.gentoo.org/592220 |
12 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
13 |
|
14 |
dev-util/radare2/metadata.xml | 3 +++ |
15 |
dev-util/radare2/radare2-1.4.0-r1.ebuild | 45 ++++++++++++++++++++++++++++++++ |
16 |
dev-util/radare2/radare2-9999.ebuild | 6 +++-- |
17 |
3 files changed, 52 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/dev-util/radare2/metadata.xml b/dev-util/radare2/metadata.xml |
20 |
index 248be000563..43119efc781 100644 |
21 |
--- a/dev-util/radare2/metadata.xml |
22 |
+++ b/dev-util/radare2/metadata.xml |
23 |
@@ -6,4 +6,7 @@ |
24 |
<name>Sergei Trofimovich</name> |
25 |
<description>Primary Maintainer</description> |
26 |
</maintainer> |
27 |
+ <use> |
28 |
+ <flag name='system-capstone'>Use <pkg>dev-libs/capstone</pkg> instead of bundled copy.</flag> |
29 |
+ </use> |
30 |
</pkgmetadata> |
31 |
|
32 |
diff --git a/dev-util/radare2/radare2-1.4.0-r1.ebuild b/dev-util/radare2/radare2-1.4.0-r1.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..397bcc5a11f |
35 |
--- /dev/null |
36 |
+++ b/dev-util/radare2/radare2-1.4.0-r1.ebuild |
37 |
@@ -0,0 +1,45 @@ |
38 |
+# Copyright 1999-2017 Gentoo Foundation |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+inherit eutils |
44 |
+ |
45 |
+DESCRIPTION="Advanced command line hexadecimal editor and more" |
46 |
+HOMEPAGE="http://www.radare.org" |
47 |
+SRC_URI="http://cloud.radare.org/get/${PV}/${P}.tar.gz" |
48 |
+ |
49 |
+LICENSE="GPL-2" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~amd64 ~x86" |
52 |
+IUSE="ssl +system-capstone" |
53 |
+ |
54 |
+RDEPEND=" |
55 |
+ ssl? ( dev-libs/openssl:0= ) |
56 |
+ system-capstone? ( dev-libs/capstone:0= ) |
57 |
+" |
58 |
+DEPEND="${RDEPEND} |
59 |
+ virtual/pkgconfig |
60 |
+" |
61 |
+ |
62 |
+PATCHES=( |
63 |
+ "${FILESDIR}"/${PN}-0.9.9-nogit.patch |
64 |
+) |
65 |
+ |
66 |
+src_configure() { |
67 |
+ econf \ |
68 |
+ $(use_with ssl openssl) \ |
69 |
+ $(use_with system-capstone syscapstone) |
70 |
+} |
71 |
+ |
72 |
+src_install() { |
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 |
+ |
81 |
+ default |
82 |
+} |
83 |
|
84 |
diff --git a/dev-util/radare2/radare2-9999.ebuild b/dev-util/radare2/radare2-9999.ebuild |
85 |
index cda7b0773b9..4c5adb60d12 100644 |
86 |
--- a/dev-util/radare2/radare2-9999.ebuild |
87 |
+++ b/dev-util/radare2/radare2-9999.ebuild |
88 |
@@ -14,10 +14,11 @@ EGIT_REPO_URI="https://github.com/radare/radare2" |
89 |
|
90 |
LICENSE="GPL-2" |
91 |
SLOT="0" |
92 |
-IUSE="ssl" |
93 |
+IUSE="ssl +system-capstone" |
94 |
|
95 |
RDEPEND=" |
96 |
ssl? ( dev-libs/openssl:0= ) |
97 |
+ system-capstone? ( dev-libs/capstone:0= ) |
98 |
" |
99 |
DEPEND="${RDEPEND} |
100 |
virtual/pkgconfig |
101 |
@@ -25,5 +26,6 @@ DEPEND="${RDEPEND} |
102 |
|
103 |
src_configure() { |
104 |
econf \ |
105 |
- $(use_with ssl openssl) |
106 |
+ $(use_with ssl openssl) \ |
107 |
+ $(use_with system-capstone syscapstone) |
108 |
} |