summaryrefslogtreecommitdiff
path: root/dev-util/unicorn
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
commitfcc5224904648a8e6eb528d7603154160a20022f (patch)
tree3bfce096b38a9cea8eed13fc70c1526c456e9abd /dev-util/unicorn
parent2fd57282f0262ca084e05b0f2c63fbada395d02b (diff)
gentoo resync : 02.02.2022
Diffstat (limited to 'dev-util/unicorn')
-rw-r--r--dev-util/unicorn/Manifest4
-rw-r--r--dev-util/unicorn/metadata.xml15
-rw-r--r--dev-util/unicorn/unicorn-2.0.0_rc5.ebuild87
-rw-r--r--dev-util/unicorn/unicorn-9999.ebuild87
4 files changed, 193 insertions, 0 deletions
diff --git a/dev-util/unicorn/Manifest b/dev-util/unicorn/Manifest
new file mode 100644
index 000000000000..1b534a93b8e3
--- /dev/null
+++ b/dev-util/unicorn/Manifest
@@ -0,0 +1,4 @@
+DIST unicorn-2.0.0_rc5.tar.gz 3808762 BLAKE2B 02a77c46e075f67df04a9fe0b5474df9f6a6c154778de3223c6ed3c475bd4658abd7b57d351a63cfa7ef5ecbadbee12a6151957b7b47b4f6741b5e4581d13c4b SHA512 3b5118e378872a50d3aa0dca01cda69b0e7b3875da7b03c1708963848c71818dd1e120df8796acace661c6b4d63813b9acc8106ce3a94c0d40c3b50677fbaacd
+EBUILD unicorn-2.0.0_rc5.ebuild 1838 BLAKE2B 4e7566680f4627892114a61f016b01b86bb9fda097af89e5a2bd234251f5b6cff7a415ac13db9dba1cf47a2c18ef2e451db6d1b4788bb21625bcb6ea394b4d07 SHA512 1b71931e7d7e621bfbefd7e42584f08667b37204dff1cc4836fe665cc40eeff606a9fc17eab38cfee9ca5290546dcf95aa4e4e9843418c83ccdd23a42c8a1126
+EBUILD unicorn-9999.ebuild 1838 BLAKE2B 4e7566680f4627892114a61f016b01b86bb9fda097af89e5a2bd234251f5b6cff7a415ac13db9dba1cf47a2c18ef2e451db6d1b4788bb21625bcb6ea394b4d07 SHA512 1b71931e7d7e621bfbefd7e42584f08667b37204dff1cc4836fe665cc40eeff606a9fc17eab38cfee9ca5290546dcf95aa4e4e9843418c83ccdd23a42c8a1126
+MISC metadata.xml 465 BLAKE2B 939a9adeaa9402af97d46bf8c19dddeb6d732de7c748480650bda37b0320de9666e1f537b23618310c1b2d85abb3f9d5fa0d62156b2d159ea77adaa456496fb9 SHA512 d09ee2447dd71ea02ffa1b18b23e1529c9506f8418314c7fb068b76d8dab8689a777940d4683e5cd574736dd185bbdff2cbbc79b372eb02bb061798490952a9b
diff --git a/dev-util/unicorn/metadata.xml b/dev-util/unicorn/metadata.xml
new file mode 100644
index 000000000000..ce9705eab55c
--- /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" proxied="yes">
+ <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..8687e522b5a0
--- /dev/null
+++ b/dev-util/unicorn/unicorn-2.0.0_rc5.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PV=${PV/_/-}
+
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{9..10} )
+inherit cmake distutils-r1
+
+DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework"
+HOMEPAGE="https://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
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="GPL-2"
+SLOT="0/2"
+IUSE="python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2"
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+# See bug #832337 re Python deps
+BDEPEND="virtual/pkgconfig
+ python? (
+ >=dev-python/installer-0.4.0_p20220124[${PYTHON_USEDEP}]
+ dev-python/tomli[${PYTHON_USEDEP}]
+ >=dev-python/setuptools-60.5.0[${PYTHON_USEDEP}]
+ dev-python/wheel[${PYTHON_USEDEP}]
+ )"
+
+UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc"
+
+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 || die
+ fi
+}
+
+src_prepare() {
+ # Build from sources
+ rm -r bindings/python/prebuilt || die "failed to remove prebuilt files"
+
+ cmake_src_prepare
+ wrap_python ${FUNCNAME}
+}
+
+src_configure(){
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=OFF
+ -DUNICORN_BUILD_SHARED=$(usex !static-libs)
+ -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..8687e522b5a0
--- /dev/null
+++ b/dev-util/unicorn/unicorn-9999.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PV=${PV/_/-}
+
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{9..10} )
+inherit cmake distutils-r1
+
+DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework"
+HOMEPAGE="https://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
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="GPL-2"
+SLOT="0/2"
+IUSE="python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2"
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+# See bug #832337 re Python deps
+BDEPEND="virtual/pkgconfig
+ python? (
+ >=dev-python/installer-0.4.0_p20220124[${PYTHON_USEDEP}]
+ dev-python/tomli[${PYTHON_USEDEP}]
+ >=dev-python/setuptools-60.5.0[${PYTHON_USEDEP}]
+ dev-python/wheel[${PYTHON_USEDEP}]
+ )"
+
+UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc"
+
+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 || die
+ fi
+}
+
+src_prepare() {
+ # Build from sources
+ rm -r bindings/python/prebuilt || die "failed to remove prebuilt files"
+
+ cmake_src_prepare
+ wrap_python ${FUNCNAME}
+}
+
+src_configure(){
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=OFF
+ -DUNICORN_BUILD_SHARED=$(usex !static-libs)
+ -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}
+}