mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 12:30:44 +02:00
unicorn: revert 918cae7867
This commit is contained in:
parent
4c5eb9f446
commit
37062a0e90
3 changed files with 94 additions and 9 deletions
88
dev-util/unicorn/unicorn-1.0.2.ebuild
Normal file
88
dev-util/unicorn/unicorn-1.0.2.ebuild
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DISTUTILS_OPTIONAL=1
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
inherit multilib distutils-r1
|
||||
|
||||
DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework"
|
||||
HOMEPAGE="http://www.unicorn-engine.org"
|
||||
SRC_URI="https://github.com/unicorn-engine/unicorn/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
#https://github.com/unicorn-engine/unicorn/issues/1298
|
||||
#KEYWORDS="amd64 ~arm64 x86"
|
||||
|
||||
IUSE_UNICORN_TARGETS="x86 m68k arm aarch64 mips sparc"
|
||||
use_unicorn_targets=$(printf ' unicorn_targets_%s' ${IUSE_UNICORN_TARGETS})
|
||||
IUSE="python ${use_unicorn_targets} static-libs"
|
||||
|
||||
REQUIRED_USE="|| ( ${use_unicorn_targets} )
|
||||
python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
DEPEND="dev-libs/glib:2
|
||||
virtual/pkgconfig
|
||||
${PYTHON_DEPS}"
|
||||
RDEPEND="python? ( ${PYTHON_DEPS} )"
|
||||
|
||||
wrap_python() {
|
||||
if use python; then
|
||||
#src_prepare
|
||||
#do not compile C extensions
|
||||
export LIBUNICORN_PATH=1
|
||||
|
||||
pushd bindings/python >/dev/null || die
|
||||
distutils-r1_${1} "$@"
|
||||
popd >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
#build from sources
|
||||
rm -r bindings/python/prebuilt || die "failed to remove prebuild"
|
||||
|
||||
default
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
local target
|
||||
unicorn_softmmu_targets=""
|
||||
|
||||
for target in ${IUSE_UNICORN_TARGETS} ; do
|
||||
if use "unicorn_targets_${target}"; then
|
||||
unicorn_targets+="${target} "
|
||||
fi
|
||||
done
|
||||
|
||||
#the following variable is getting recreated using UNICORN_ARCHS below
|
||||
UNICORN_TARGETS=""
|
||||
default
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export CC INSTALL_BIN PREFIX PKGCFGDIR LIBDIRARCH LIBARCHS CFLAGS LDFLAGS
|
||||
UNICORN_ARCHS="${unicorn_targets}" \
|
||||
UNICORN_STATIC="$(use static-libs && echo yes || echo no)" \
|
||||
emake V=s
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
LIBDIR="/usr/$(get_libdir)" \
|
||||
UNICORN_STATIC="$(use static-libs && echo yes || echo no)"
|
||||
install
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ SRC_URI="https://github.com/unicorn-engine/unicorn/archive/${MY_PV}.tar.gz -> ${
|
|||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64 x86"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~sparc ~x86"
|
||||
|
||||
IUSE_UNICORN_TARGETS="x86 m68k arm aarch64 mips sparc"
|
||||
use_unicorn_targets=$(printf ' unicorn_targets_%s' ${IUSE_UNICORN_TARGETS})
|
||||
|
|
@ -69,9 +69,10 @@ src_configure(){
|
|||
|
||||
src_compile() {
|
||||
export CC INSTALL_BIN PREFIX PKGCFGDIR LIBDIRARCH LIBARCHS CFLAGS LDFLAGS
|
||||
UNICORN_ARCHS="${unicorn_targets}" \
|
||||
UNICORN_QEMU_FLAGS="--python=/usr/bin/python3" \
|
||||
UNICORN_ARCHS="${unicorn_targets}" \
|
||||
UNICORN_STATIC="$(use static-libs && echo yes || echo no)" \
|
||||
emake V=s
|
||||
emake
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
||||
|
|
@ -82,11 +83,6 @@ src_test() {
|
|||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
LIBDIR="/usr/$(get_libdir)" \
|
||||
UNICORN_STATIC="$(use static-libs && echo yes || echo no)" \
|
||||
UNICORN_ARCHS="${unicorn_targets}"
|
||||
install
|
||||
emake DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)" UNICORN_STATIC="$(use static-libs && echo yes || echo no)" install
|
||||
wrap_python ${FUNCNAME}
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ dev-util/objection
|
|||
dev-util/qark
|
||||
dev-util/recaf-bin
|
||||
=dev-util/redasm-2*
|
||||
~dev-util/unicorn-1.0.2_rc3
|
||||
|
||||
# Gentoo
|
||||
~dev-util/opencl-headers-2020.03.13-r1
|
||||
|
|
|
|||
Loading…
Reference in a new issue