mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 20:43:38 +02:00
capstone-bindings: fix errors while installing (please not ignore QA alerts. Closes: https://github.com/pentoo/pentoo-overlay/issues/524)
This commit is contained in:
parent
7310ac0fb5
commit
d2a218a3d5
1 changed files with 19 additions and 6 deletions
|
|
@ -7,12 +7,14 @@ MY_PV="${PV//_/-}"
|
|||
MY_P=capstone-"${MY_PV}"
|
||||
|
||||
DISTUTILS_OPTIONAL=1
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
|
||||
|
||||
inherit eutils multilib distutils-r1
|
||||
|
||||
DESCRIPTION="A lightweight multi-platform, multi-architecture disassembly framework"
|
||||
HOMEPAGE="http://www.capstone-engine.org/"
|
||||
SRC_URI="https://github.com/aquynh/capstone/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
|
|
@ -25,20 +27,31 @@ DEPEND="${RDEPEND}
|
|||
dev-libs/capstone
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
|
||||
S=${WORKDIR}/${MY_P}/bindings/python
|
||||
S="${WORKDIR}/${MY_P}/bindings/python"
|
||||
|
||||
python_prepare() {
|
||||
pkg_setup() {
|
||||
python_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
#our hack to adjust cython setup
|
||||
if use cython; then
|
||||
einfo "cython flag is enabled"
|
||||
cp setup_cython.py setup.py
|
||||
cp setup_cython.py setup.py || die
|
||||
sed -e "s|'xcore_const']|'xcore_const', 'tms320c64x', 'tms320c64x_const']|" -i setup.py || die "sed failed"
|
||||
# sed -e 's|install:|install_default:|' -i Makefile || die "sed failed"
|
||||
# sed -e 's|install_cython:|install:|' -i Makefile || die "sed failed"
|
||||
#this section is from Makefile
|
||||
cp capstone/__init__.py pyx/__init__.py
|
||||
cp capstone/__init__.py pyx/__init__.py || die
|
||||
for i in arm{,_const} arm64{,_const} mips{,_const} ppc{,_const} x86{,_const} sparc{,_const} systemz sysz_const xcore{,_const} tms320c64x{,_const}; do
|
||||
cp capstone/${i}.py pyx/${i}.pyx
|
||||
cp capstone/${i}.py pyx/${i}.pyx || die
|
||||
done
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils-r1_src_install
|
||||
python_optimize "${D}$(python_get_sitedir)/capstone/"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue