1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python{3_6,3_7} )
9 inherit distutils-r1 toolchain-funcs
11 DESCRIPTION="disassembly/disassembler framework + bindings"
12 HOMEPAGE="http://www.capstone-engine.org/"
13 SRC_URI="https://github.com/aquynh/${PN}/archive/${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
16 SLOT="0/4" # libcapstone.so.4
17 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
19 RESTRICT="!test? ( test )"
22 RDEPEND="python? ( ${PYTHON_DEPS} )"
24 python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
26 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
29 "${FILESDIR}"/${PN}-4.0-FLAGS.patch
30 "${FILESDIR}"/${PN}-4.0-no-fuzz-tests.patch
33 S=${WORKDIR}/${P/_rc/-rc}
37 pushd bindings/python >/dev/null || die
38 distutils-r1_${1} "$@"
46 wrap_python ${FUNCNAME}
58 RANLIB = $(tc-getRANLIB)
63 LIBDIRARCH = $(get_libdir)
64 PREFIX = ${EPREFIX}/usr
69 # Don't build tests if not requested: bug #663006
70 sed -i tests/Makefile -e 's@all: $(BINARY)@all:@' || die
73 wrap_python ${FUNCNAME}
79 wrap_python ${FUNCNAME}
85 wrap_python ${FUNCNAME}
91 wrap_python ${FUNCNAME}