1 |
commit: efa42a94e69af8e64611dd012457691e8b420adf |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 20 17:53:27 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 20 17:53:40 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efa42a94 |
7 |
|
8 |
dev-libs/capstone: switch to cmake, add USE=static-libs, bug #724302 |
9 |
|
10 |
Make-based build system can't handle shared-only cstoll linkage. |
11 |
Let's switch over to cmake and see how it goes. |
12 |
|
13 |
Reported-by: Agostino Sarubbo |
14 |
Closes: https://bugs.gentoo.org/724302 |
15 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
16 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
17 |
|
18 |
dev-libs/capstone/capstone-4.0.2-r1.ebuild | 70 ++++++++++++++++++++++++++++++ |
19 |
1 file changed, 70 insertions(+) |
20 |
|
21 |
diff --git a/dev-libs/capstone/capstone-4.0.2-r1.ebuild b/dev-libs/capstone/capstone-4.0.2-r1.ebuild |
22 |
new file mode 100644 |
23 |
index 00000000000..6de5971d2cd |
24 |
--- /dev/null |
25 |
+++ b/dev-libs/capstone/capstone-4.0.2-r1.ebuild |
26 |
@@ -0,0 +1,70 @@ |
27 |
+# Copyright 1999-2020 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=7 |
31 |
+ |
32 |
+DISTUTILS_OPTIONAL=1 |
33 |
+PYTHON_COMPAT=( python{3_6,3_7} ) |
34 |
+ |
35 |
+inherit cmake-utils distutils-r1 toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="disassembly/disassembler framework + bindings" |
38 |
+HOMEPAGE="http://www.capstone-engine.org/" |
39 |
+SRC_URI="https://github.com/aquynh/${PN}/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="BSD" |
42 |
+SLOT="0/4" # libcapstone.so.4 |
43 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
44 |
+ |
45 |
+RESTRICT="!test? ( test )" |
46 |
+ |
47 |
+IUSE="python static-libs test" |
48 |
+RDEPEND="python? ( ${PYTHON_DEPS} )" |
49 |
+DEPEND="${RDEPEND} |
50 |
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) |
51 |
+" |
52 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
53 |
+ |
54 |
+S=${WORKDIR}/${P/_rc/-rc} |
55 |
+ |
56 |
+wrap_python() { |
57 |
+ if use python; then |
58 |
+ pushd bindings/python >/dev/null || die |
59 |
+ distutils-r1_${1} "$@" |
60 |
+ popd >/dev/null |
61 |
+ fi |
62 |
+} |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ cmake-utils_src_prepare |
66 |
+ |
67 |
+ wrap_python ${FUNCNAME} |
68 |
+} |
69 |
+ |
70 |
+src_configure() { |
71 |
+ local mycmakeargs=( |
72 |
+ -DCAPSTONE_BUILD_TESTS="$(usex test)" |
73 |
+ -DCAPSTONE_BUILD_STATIC="$(usex static-libs)" |
74 |
+ ) |
75 |
+ cmake-utils_src_configure |
76 |
+ |
77 |
+ wrap_python ${FUNCNAME} |
78 |
+} |
79 |
+ |
80 |
+src_compile() { |
81 |
+ cmake-utils_src_compile |
82 |
+ |
83 |
+ wrap_python ${FUNCNAME} |
84 |
+} |
85 |
+ |
86 |
+src_test() { |
87 |
+ cmake-utils_src_test |
88 |
+ |
89 |
+ wrap_python ${FUNCNAME} |
90 |
+} |
91 |
+ |
92 |
+src_install() { |
93 |
+ cmake-utils_src_install |
94 |
+ |
95 |
+ wrap_python ${FUNCNAME} |
96 |
+} |