diff options
author | Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> | 2022-01-15 13:39:10 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-01-28 05:16:43 +0000 |
commit | e3c69f09ccb7c5203b683b9a878aa4a90959f745 (patch) | |
tree | 2c42aa6c4c85e6f3f0ba15f03ad444103311ebf1 /dev-util/unicorn | |
parent | dev-python/filebytes: new ebuild (diff) | |
download | gentoo-e3c69f09ccb7c5203b683b9a878aa4a90959f745.tar.gz gentoo-e3c69f09ccb7c5203b683b9a878aa4a90959f745.tar.bz2 gentoo-e3c69f09ccb7c5203b683b9a878aa4a90959f745.zip |
dev-util/unicorn: new ebuild
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/unicorn')
-rw-r--r-- | dev-util/unicorn/Manifest | 1 | ||||
-rw-r--r-- | dev-util/unicorn/metadata.xml | 15 | ||||
-rw-r--r-- | dev-util/unicorn/unicorn-2.0.0_rc5.ebuild | 77 | ||||
-rw-r--r-- | dev-util/unicorn/unicorn-9999.ebuild | 77 |
4 files changed, 170 insertions, 0 deletions
diff --git a/dev-util/unicorn/Manifest b/dev-util/unicorn/Manifest new file mode 100644 index 000000000000..2566a0abfced --- /dev/null +++ b/dev-util/unicorn/Manifest @@ -0,0 +1 @@ +DIST unicorn-2.0.0_rc5.tar.gz 3808762 BLAKE2B 02a77c46e075f67df04a9fe0b5474df9f6a6c154778de3223c6ed3c475bd4658abd7b57d351a63cfa7ef5ecbadbee12a6151957b7b47b4f6741b5e4581d13c4b SHA512 3b5118e378872a50d3aa0dca01cda69b0e7b3875da7b03c1708963848c71818dd1e120df8796acace661c6b4d63813b9acc8106ce3a94c0d40c3b50677fbaacd diff --git a/dev-util/unicorn/metadata.xml b/dev-util/unicorn/metadata.xml new file mode 100644 index 000000000000..0c34d21d4fdd --- /dev/null +++ b/dev-util/unicorn/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mario.haustein@hrz.tu-chemnitz.de</email> + <name>Mario Haustein</name> + </maintainer> + <maintainer type="person"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <upstream> + <remote-id type="github">unicorn-engine/unicorn</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-util/unicorn/unicorn-2.0.0_rc5.ebuild b/dev-util/unicorn/unicorn-2.0.0_rc5.ebuild new file mode 100644 index 000000000000..c0be1c278b68 --- /dev/null +++ b/dev-util/unicorn/unicorn-2.0.0_rc5.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PV=${PV/_/-} + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python3_{9..10} ) +inherit cmake distutils-r1 + +DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework" +HOMEPAGE="http://www.unicorn-engine.org" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/unicorn-engine/unicorn" +else + SRC_URI="https://github.com/unicorn-engine/unicorn/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc" + +IUSE="python static-libs" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="dev-libs/glib:2 + virtual/pkgconfig + ${PYTHON_DEPS}" +RDEPEND="python? ( ${PYTHON_DEPS} )" + +S="${WORKDIR}/${PN}-${MY_PV}" + +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" + cmake_src_prepare + wrap_python ${FUNCNAME} +} + +src_configure(){ + local mycmakeargs=( + -DBUILD_SHARED_LIBS=OFF + -DUNICORN_BUILD_SHARED="$(usex static-libs OFF ON)" + -DUNICORN_ARCH="${UNICORN_TARGETS}" + ) + cmake_src_configure + wrap_python ${FUNCNAME} +} + +src_compile() { + cmake_src_compile + wrap_python ${FUNCNAME} +} + +src_install() { + cmake_src_install + + wrap_python ${FUNCNAME} +} diff --git a/dev-util/unicorn/unicorn-9999.ebuild b/dev-util/unicorn/unicorn-9999.ebuild new file mode 100644 index 000000000000..c0be1c278b68 --- /dev/null +++ b/dev-util/unicorn/unicorn-9999.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PV=${PV/_/-} + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python3_{9..10} ) +inherit cmake distutils-r1 + +DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework" +HOMEPAGE="http://www.unicorn-engine.org" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/unicorn-engine/unicorn" +else + SRC_URI="https://github.com/unicorn-engine/unicorn/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc" + +IUSE="python static-libs" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="dev-libs/glib:2 + virtual/pkgconfig + ${PYTHON_DEPS}" +RDEPEND="python? ( ${PYTHON_DEPS} )" + +S="${WORKDIR}/${PN}-${MY_PV}" + +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" + cmake_src_prepare + wrap_python ${FUNCNAME} +} + +src_configure(){ + local mycmakeargs=( + -DBUILD_SHARED_LIBS=OFF + -DUNICORN_BUILD_SHARED="$(usex static-libs OFF ON)" + -DUNICORN_ARCH="${UNICORN_TARGETS}" + ) + cmake_src_configure + wrap_python ${FUNCNAME} +} + +src_compile() { + cmake_src_compile + wrap_python ${FUNCNAME} +} + +src_install() { + cmake_src_install + + wrap_python ${FUNCNAME} +} |