From 6b931af8fc3272d6feaede041360b18601e137b7 Mon Sep 17 00:00:00 2001 From: blshkv Date: Fri, 20 Mar 2020 16:56:50 +0800 Subject: [PATCH] unicorn: 1.0.2_rc2 bump --- dev-libs/unicorn-bindings/Manifest | 1 + .../unicorn-bindings-1.0.2_rc2.ebuild | 66 +++++++++++++++++++ dev-util/unicorn/Manifest | 1 + dev-util/unicorn/unicorn-1.0.2_rc2.ebuild | 61 +++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 dev-libs/unicorn-bindings/unicorn-bindings-1.0.2_rc2.ebuild create mode 100644 dev-util/unicorn/unicorn-1.0.2_rc2.ebuild diff --git a/dev-libs/unicorn-bindings/Manifest b/dev-libs/unicorn-bindings/Manifest index a4093124b..e9a5ef0b4 100644 --- a/dev-libs/unicorn-bindings/Manifest +++ b/dev-libs/unicorn-bindings/Manifest @@ -1,2 +1,3 @@ DIST unicorn-1.0.1.tar.gz 3241225 BLAKE2B 977349ee9f98d63a93d67ed9f1e8c4fd7fc6a5bf43285baf011624ddb4b801bdaf61879ddaec1310d84a23151e16af95af0eb3396e22895d4067396f1426ea1e SHA512 edfe1f7bfbc1d20f5b62232057e194a937bc09db686ef2efadb33a54605029a53426432cdb2a29511385aacdb9343b3b3091af50a1909098d7cf6db3429eb966 DIST unicorn-1.0.2_rc1.tar.gz 3340182 BLAKE2B b5845b7111b7d3657a6c0f509f63067cd6ead20a2792dd3695484e90e48453e78af17faaddb84951a8c3d69b536444f5f506766af01dfb4946fdd860cd246d0e SHA512 c710b4a6c24a2b51def4a732a2186dd774e111287950f80fccb01cd0a9dc9788302e15bc55146df298412a824123b862ddde3a9de3627d7912dea9bc29ee27d3 +DIST unicorn-1.0.2_rc2.tar.gz 3746757 BLAKE2B fa5e4f998de7836c4ed2bb704f9c9a898b0baaa4e55f2734bed7797667b75050e3267bc2f85f5899265e5beecf0d400c9b5432fe973c68fe2a6974dd61db06ba SHA512 170021813c665f6489a8f158148dcc1f08bb1dbe51640b1f53c1530d44921b9761f177cd30e6fc6dac0102f60c8787cb37fb13cc0afc1085fc2d5599d1cf13c3 diff --git a/dev-libs/unicorn-bindings/unicorn-bindings-1.0.2_rc2.ebuild b/dev-libs/unicorn-bindings/unicorn-bindings-1.0.2_rc2.ebuild new file mode 100644 index 000000000..aaf40bc81 --- /dev/null +++ b/dev-libs/unicorn-bindings/unicorn-bindings-1.0.2_rc2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PV=${PV/_/-} + +PYTHON_COMPAT=( python3_{6,7} ) +inherit multilib distutils-r1 + +DESCRIPTION="Unicorn bindings" +HOMEPAGE="http://www.unicorn-engine.org" +SRC_URI="https://github.com/unicorn-engine/unicorn/archive/${MY_PV}.tar.gz -> unicorn-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="python" + +RDEPEND="~dev-util/unicorn-${PV}" + +DEPEND="${RDEPEND} + virtual/pkgconfig + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) + " +# go? ( dev-lang/go ) +# ruby? ( dev-lang/ruby:* ) + +S="${WORKDIR}/unicorn-${MY_PV}"/bindings + +pkg_setup() { + python_setup +} + +src_prepare(){ + #do not compile C extensions + export LIBUNICORN_PATH=1 + +# use go || sed -i -e '/go gen_const/d' Makefile +# use java || sed -i -e '/java gen_const/d' Makefile +# use python || sed -i -e '/python gen_const/d' Makefile +# use ruby || sed -i -e '/ruby gen_const/d' Makefile + + sed -i -e '/const_generator.py dotnet/d' Makefile + #fix python2 install + sed -i "s|python setup.py install|python2 setup.py install|" python/Makefile || die + eapply_user +} + +src_compile(){ + einfo "Nothing to compile" +} + +src_install(){ + if use python; then + myinstall_python() { + if python_is_python3; then + emake -C python DESTDIR="${D}" install3 + else + emake -C python DESTDIR="${D}" install + fi + python_optimize + } + python_foreach_impl myinstall_python + fi +} diff --git a/dev-util/unicorn/Manifest b/dev-util/unicorn/Manifest index a4093124b..e9a5ef0b4 100644 --- a/dev-util/unicorn/Manifest +++ b/dev-util/unicorn/Manifest @@ -1,2 +1,3 @@ DIST unicorn-1.0.1.tar.gz 3241225 BLAKE2B 977349ee9f98d63a93d67ed9f1e8c4fd7fc6a5bf43285baf011624ddb4b801bdaf61879ddaec1310d84a23151e16af95af0eb3396e22895d4067396f1426ea1e SHA512 edfe1f7bfbc1d20f5b62232057e194a937bc09db686ef2efadb33a54605029a53426432cdb2a29511385aacdb9343b3b3091af50a1909098d7cf6db3429eb966 DIST unicorn-1.0.2_rc1.tar.gz 3340182 BLAKE2B b5845b7111b7d3657a6c0f509f63067cd6ead20a2792dd3695484e90e48453e78af17faaddb84951a8c3d69b536444f5f506766af01dfb4946fdd860cd246d0e SHA512 c710b4a6c24a2b51def4a732a2186dd774e111287950f80fccb01cd0a9dc9788302e15bc55146df298412a824123b862ddde3a9de3627d7912dea9bc29ee27d3 +DIST unicorn-1.0.2_rc2.tar.gz 3746757 BLAKE2B fa5e4f998de7836c4ed2bb704f9c9a898b0baaa4e55f2734bed7797667b75050e3267bc2f85f5899265e5beecf0d400c9b5432fe973c68fe2a6974dd61db06ba SHA512 170021813c665f6489a8f158148dcc1f08bb1dbe51640b1f53c1530d44921b9761f177cd30e6fc6dac0102f60c8787cb37fb13cc0afc1085fc2d5599d1cf13c3 diff --git a/dev-util/unicorn/unicorn-1.0.2_rc2.ebuild b/dev-util/unicorn/unicorn-1.0.2_rc2.ebuild new file mode 100644 index 000000000..b2c432ef3 --- /dev/null +++ b/dev-util/unicorn/unicorn-1.0.2_rc2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +MY_PV=${PV/_/-} + +PYTHON_COMPAT=( python2_7 python3_{6,7} ) +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/${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~m68k ~arm ~arm64 ~mips ~sparc" +IUSE="python static-libs" + +IUSE_UNICORN_TARGETS="x86 m68k arm aarch64 mips sparc" +use_unicorn_targets=$(printf ' unicorn_targets_%s' ${IUSE_UNICORN_TARGETS}) +IUSE+=" ${use_unicorn_targets}" + +DEPEND="dev-libs/glib:2 + ${PYTHON_DEPS}" +RDEPEND="${DEPEND} + virtual/pkgconfig" +PDEPEND="dev-libs/unicorn-bindings[python?]" + +REQUIRED_USE="|| ( ${use_unicorn_targets} )" + +S="${WORKDIR}/${PN}-${MY_PV}" + +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 +} + +src_compile() { + export CC INSTALL_BIN PREFIX PKGCFGDIR LIBDIRARCH LIBARCHS CFLAGS LDFLAGS + UNICORN_QEMU_FLAGS="--python=/usr/bin/python2" \ + UNICORN_ARCHS="${unicorn_targets}" \ + UNICORN_STATIC="$(use static-libs && echo yes || echo no)" \ + emake + # echo $PWD + # UNICORN_QEMU_FLAGS="--python=/usr/bin/python2" UNICORN_ARCHS="${unicorn_targets}" UNICORN_STATIC="$(use static-libs && echo yes || echo no)" ./make.sh --python=/usr/bin/python2 +} + +src_install() { + emake DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)" UNICORN_STATIC="$(use static-libs && echo yes || echo no)" install +}