diff --git a/dev-libs/unicorn-bindings/unicorn-bindings-0.9_p20160901.ebuild b/dev-libs/unicorn-bindings/unicorn-bindings-0.9_p20160901.ebuild new file mode 100644 index 000000000..f69b15b15 --- /dev/null +++ b/dev-libs/unicorn-bindings/unicorn-bindings-0.9_p20160901.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) +inherit git-r3 python-single-r1 + +DESCRIPTION="Unicorn bindings" +HOMEPAGE="http://www.unicorn-engine.org" +EGIT_REPO_URI="https://github.com/unicorn-engine/unicorn.git" +EGIT_COMMIT="7b47ab6b667f8959cbfe149fc67de7cfcd0bcf54" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="go java python ruby" + +RDEPEND=" + go? ( dev-lang/go ) + ruby? ( || ( dev-lang/ruby:2.1 dev-lang/ruby:2.2 dev-lang/ruby:2.3 ) ) +" + +DEPEND="${RDEPEND} + ~dev-util/unicorn-${PV} + virtual/pkgconfig" + +S="${WORKDIR}/${P}"/bindings + +src_prepare(){ + use go || sed -i -e '/cd go/d' Makefile + use java || sed -i -e '/cd java/d' Makefile +} diff --git a/dev-util/unicorn/unicorn-0.9_p20160901.ebuild b/dev-util/unicorn/unicorn-0.9_p20160901.ebuild new file mode 100644 index 000000000..0370493a4 --- /dev/null +++ b/dev-util/unicorn/unicorn-0.9_p20160901.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit git-r3 + +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" +EGIT_REPO_URI="https://github.com/unicorn-engine/unicorn.git" +EGIT_COMMIT="7b47ab6b667f8959cbfe149fc67de7cfcd0bcf54" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~m68k ~arm ~arm64 ~mips ~sparc" + +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" +RDEPEND="${DEPEND} + virtual/pkgconfig" + +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="" +} + +src_compile() { + #UNICORN_QEMU_FLAGS="--python=/path/to/python2" ./make.sh + #use amd64 && UNICORN_ARCHS="arm x86" UNICORN_STATIC="no" ./make.sh + UNICORN_ARCHS="${unicorn_targets}" UNICORN_STATIC="no" ./make.sh +} diff --git a/profiles/pentoo/arch/amd64/package.use/dev-util b/profiles/pentoo/arch/amd64/package.use/dev-util new file mode 100644 index 000000000..fd87752b8 --- /dev/null +++ b/profiles/pentoo/arch/amd64/package.use/dev-util @@ -0,0 +1,3 @@ +# Enable the native arch as the default unicorn target +# x86 supports both x86 and amd64 +app-util/unicorn unicorn_targets_x86 diff --git a/profiles/pentoo/arch/arm/package.use/dev-util b/profiles/pentoo/arch/arm/package.use/dev-util new file mode 100644 index 000000000..0d8c876e3 --- /dev/null +++ b/profiles/pentoo/arch/arm/package.use/dev-util @@ -0,0 +1,2 @@ +# Enable the native arch as the default unicorn target +app-util/unicorn unicorn_targets_arm diff --git a/profiles/pentoo/arch/x86/package.use/dev-util b/profiles/pentoo/arch/x86/package.use/dev-util new file mode 100644 index 000000000..4852e89a6 --- /dev/null +++ b/profiles/pentoo/arch/x86/package.use/dev-util @@ -0,0 +1,2 @@ +# Enable the native arch as the default unicorn target +app-util/unicorn unicorn_targets_x86 diff --git a/profiles/pentoo/base/make.defaults b/profiles/pentoo/base/make.defaults index e093cb20f..bff973175 100644 --- a/profiles/pentoo/base/make.defaults +++ b/profiles/pentoo/base/make.defaults @@ -43,8 +43,8 @@ USE="${USE} X abi_x86_32 adns caps curl directfb fbcon gps jack lm_sensors lua l PORTAGE_BZIP2_COMMAND="lbzip2" -# Env vars to expand into USE vars. -USE_EXPAND="${USE_EXPAND} COMPAT_DRIVERS_WIFI COMPAT_DRIVERS_ETHERNET COMPAT_DRIVERS_VARIOUS" +# Env vars to expand into USE vars +USE_EXPAND="${USE_EXPAND} COMPAT_DRIVERS_WIFI COMPAT_DRIVERS_ETHERNET COMPAT_DRIVERS_VARIOUS UNICORN_TARGETS" #mgorny suggested this speeds up sync, in my testing it makes a rather large difference PORTAGE_RSYNC_EXTRA_OPTS="--omit-dir-times" diff --git a/profiles/pentoo/base/package.accept_keywords/dev-libs b/profiles/pentoo/base/package.accept_keywords/dev-libs index abb2212db..ec9c78968 100644 --- a/profiles/pentoo/base/package.accept_keywords/dev-libs +++ b/profiles/pentoo/base/package.accept_keywords/dev-libs @@ -12,3 +12,5 @@ #required by dev-embedded/mphidflash ~dev-libs/libhid-0.2.16 + +=dev-libs/unicorn-bindings-0.9* diff --git a/profiles/pentoo/base/package.accept_keywords/dev-util b/profiles/pentoo/base/package.accept_keywords/dev-util index 228debf5d..38b9cc469 100644 --- a/profiles/pentoo/base/package.accept_keywords/dev-util +++ b/profiles/pentoo/base/package.accept_keywords/dev-util @@ -31,3 +31,5 @@ dev-util/intel-ocl-sdk ~dev-util/sonarqube-bin-4.5.2 + +=dev-util/unicorn-0.9* diff --git a/profiles/pentoo/overlay/make.defaults b/profiles/pentoo/overlay/make.defaults index 577fa339b..2fb5556b4 100644 --- a/profiles/pentoo/overlay/make.defaults +++ b/profiles/pentoo/overlay/make.defaults @@ -31,5 +31,8 @@ USE="${USE} xinerama" #GRUB_PLATFORMS="coreboot efi-32 efi-64 emu multiboot pc qemu" +# Env vars to expand into USE vars +USE_EXPAND="${USE_EXPAND} COMPAT_DRIVERS_WIFI COMPAT_DRIVERS_ETHERNET COMPAT_DRIVERS_VARIOUS UNICORN_TARGETS" + #mgorny suggested this speeds up sync, in my testing it makes a rather large difference PORTAGE_RSYNC_EXTRA_OPTS="--omit-dir-times"