unicorn: 2.0.0_rc4 bump, convert to cmake

This commit is contained in:
Anton Bolshakov 2021-11-18 09:36:53 +08:00
parent 1787091671
commit 0d8b5545d7
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
2 changed files with 32 additions and 22 deletions

View file

@ -1,2 +1,2 @@
DIST unicorn-1.0.2_rc3.tar.gz 3747400 BLAKE2B 863dbead1cb08467298082fe8845741485ed6c1549ef846d30cde6b225fcd1cd955c5b2773ff78df8271304595f9559118ce41b3f993bd9cd1e5e47abaeb8a51 SHA512 6d27fa74504fe2c3d9292b4f67634042ac87015c203dfa0085d17d0efb82c12d0084bb5bd3f96200fb0c861820d499f09fa2e9e2a27addb68e1ba3bf2c7fea37
DIST unicorn-1.0.3.tar.gz 3759365 BLAKE2B 130d494d03aa9aa1b27e6806856eb36c1871af6e8b89aef9136baa6ca8b726ba2eab778488185e96c47bf3771dd8bce19bf4fd5090888d28433a6129c827d88c SHA512 10f1b5194358c65bc94723eaafd7b4167fee18f96a4810f46f8c78ed1ef5584546e66e8c910fa4eeadd791fcd73edea68f898e337081409fd188b4090b78a7ca
DIST unicorn-2.0.0_rc4.tar.gz 3804902 BLAKE2B 98350911f80d4906e591f99ea9c04c39b951cf58fd55ab57a5c25b75d1a6a5bc45fd6606d0f95078dfba5253ec6577eea404c6daab28ae04db67386f711fd458 SHA512 f0b3fe6791d7060a20ae77adc8dde652b73f881b9be972e41d89ffb72a726d1d4b98c67a1d26fc130d1be37cd56ca35f74bf3ccf928258206ce69b487b0a65a4

View file

@ -7,7 +7,7 @@ MY_PV=${PV/_/-}
DISTUTILS_OPTIONAL=1
PYTHON_COMPAT=( python3_{8..9} )
inherit multilib distutils-r1
inherit cmake multilib distutils-r1
DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework"
HOMEPAGE="http://www.unicorn-engine.org"
@ -15,11 +15,12 @@ SRC_URI="https://github.com/unicorn-engine/unicorn/archive/${MY_PV}.tar.gz -> ${
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~m68k ~mips ~sparc x86"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE_UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc"
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"
IUSE="python ${use_unicorn_targets} static-libs debug"
REQUIRED_USE="|| ( ${use_unicorn_targets} )
python? ( ${PYTHON_REQUIRED_USE} )"
@ -46,15 +47,12 @@ wrap_python() {
src_prepare() {
#build from sources
rm -r bindings/python/prebuilt || die "failed to remove prebuild"
default
cmake_src_prepare
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} "
@ -62,27 +60,39 @@ src_configure(){
done
#the following variable is getting recreated using UNICORN_ARCHS below
UNICORN_TARGETS=""
default
# UNICORN_TARGETS=""
local mycmakeargs=(
-DUNICORN_BUILD_SHARED="$(usex static-libs OFF ON)"
-DUNICORN_ARCH="${unicorn_targets}"
)
cmake_src_configure
wrap_python ${FUNCNAME}
}
src_compile() {
export CC INSTALL_BIN PREFIX PKGCFGDIR LIBDIRARCH LIBARCHS CFLAGS LDFLAGS
UNICORN_QEMU_FLAGS="--python=/usr/bin/python3" \
UNICORN_ARCHS="${unicorn_targets}" \
UNICORN_STATIC="$(use static-libs && echo yes || echo no)" \
emake
# export CC INSTALL_BIN PREFIX PKGCFGDIR LIBDIRARCH LIBARCHS CFLAGS LDFLAGS
# UNICORN_ARCHS="${unicorn_targets}" \
# UNICORN_STATIC="$(use static-libs && echo yes || echo no)" \
# UNICORN_DEBUG="$(use debug && echo yes || echo no)" \
# emake V=s
cmake_src_compile
wrap_python ${FUNCNAME}
}
src_test() {
default
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
# emake \
# UNICORN_ARCHS="${unicorn_targets}" \
# DESTDIR="${D}" \
# LIBDIR="/usr/$(get_libdir)" \
# UNICORN_STATIC="$(use static-libs && echo yes || echo no)" \
# install
cmake_src_install
wrap_python ${FUNCNAME}
}