summaryrefslogtreecommitdiff
path: root/dev-util/unicorn
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
commit2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch)
tree8c816148bcbd22757d892089c989ae614eae4f5a /dev-util/unicorn
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
Diffstat (limited to 'dev-util/unicorn')
-rw-r--r--dev-util/unicorn/Manifest4
-rw-r--r--dev-util/unicorn/unicorn-2.0.0.ebuild83
-rw-r--r--dev-util/unicorn/unicorn-9999.ebuild13
3 files changed, 94 insertions, 6 deletions
diff --git a/dev-util/unicorn/Manifest b/dev-util/unicorn/Manifest
index 13753934d109..42885de0745e 100644
--- a/dev-util/unicorn/Manifest
+++ b/dev-util/unicorn/Manifest
@@ -1,4 +1,6 @@
+DIST unicorn-2.0.0.gh.tar.gz 4065595 BLAKE2B c16252a8a4af77c1c76c80101c30b92536d1677f93898acf4711e910dbbe1072715b83b4564c015592465eb51d00333e55849c3e06b07726ea3522286d8429bf SHA512 3996f19755ccdaac6e92a7455160e1c90a592ffb789d55ddc9d1bdcf1e68e8a6150bcfa1025a322780c04878be8de28e0ad5fdd79a7b25887ed2793b769f6789
DIST unicorn-2.0.0_rc7.tar.gz 3984228 BLAKE2B a3e6a0d6084780b3a47837a6c8f9df9ec0eb176ff041881fbf2dc879eee11c70796b4f8e4ba784f553e383b8537abe9a559e627afc2fcaf712e83bfc5daaf11c SHA512 ae7e2b35032a8cff516f27edc58ab41708c2acd05b8feebb127501d0bc990a6722ba8439876ea147a2025372500d5df4bd7db86fddf215be63d070218a85a27e
+EBUILD unicorn-2.0.0.ebuild 1708 BLAKE2B 43214ad5df0aa79a0fd002304c0f4964d3b3f1ba90ca9a2f64b61e5c3e01ee9a47e323b364bc08d93dce036f196ce8c19888b5a93da95ad8ea335cb8ae3f6318 SHA512 bdd22202eb84437c619831116fad9438cac24b3eb85b3d0476ed5d43999572223c7e83ff7484212039a54d725df6b839cddbf59f2c09529f737b81dc72e2bd00
EBUILD unicorn-2.0.0_rc7.ebuild 1635 BLAKE2B 3395838b9b1b40dc602fb58cab4081fcca8f0df4fe1d0990a71368dbc0e7e5ed2076b53559c485563fede19059c769f1580587746b5185c2726caa76f8b193e7 SHA512 26dea296997e337cdf854d4faa4c6eda2a16fb0b7e370c7c361d92153f9b5a37c706b0ee365691b5c69850f8fcd9cea80086ae368fdaf4e1d388fef81cc4047d
-EBUILD unicorn-9999.ebuild 1635 BLAKE2B 6b1ef99c0458971d413f0ebae78886de1c6375c3cce9edfb338b739a008cc17b1da636333d7952f95a000412a82ce4add748bcf7d32629a17257b8bc5e06bf97 SHA512 e80f886de510d66d8421d34747cce745237cd806f4cd2e286eb1cd38952553efd978ecfaf7ff0bfb4b9493a80c88e3bdb004c74a78b3c46caae792b8184adfbc
+EBUILD unicorn-9999.ebuild 1708 BLAKE2B 43214ad5df0aa79a0fd002304c0f4964d3b3f1ba90ca9a2f64b61e5c3e01ee9a47e323b364bc08d93dce036f196ce8c19888b5a93da95ad8ea335cb8ae3f6318 SHA512 bdd22202eb84437c619831116fad9438cac24b3eb85b3d0476ed5d43999572223c7e83ff7484212039a54d725df6b839cddbf59f2c09529f737b81dc72e2bd00
MISC metadata.xml 510 BLAKE2B 857f3ee3645ffdb28846b7305ec3066ddf49934225fe2c173a5a6b5b8354b208b6bb1337c2e11713b7c983a6fe3a1e67dae62bf64b0c9228f14ccfea8d57d5c5 SHA512 e1da17744042b95f11fb8b5f562020738c7495b0256469420cfa19fda995a24f02e806f67db8521e2f4a19a32825bf54a0865ec723d853cd5aa440c42b007946
diff --git a/dev-util/unicorn/unicorn-2.0.0.ebuild b/dev-util/unicorn/unicorn-2.0.0.ebuild
new file mode 100644
index 000000000000..34777b117a28
--- /dev/null
+++ b/dev-util/unicorn/unicorn-2.0.0.ebuild
@@ -0,0 +1,83 @@
+# 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_{8..11} )
+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}.gh.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="BSD-2 GPL-2 LGPL-2.1"
+SLOT="0/2"
+IUSE="python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2"
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+BDEPEND="virtual/pkgconfig
+ python? ( ${DISTUTILS_DEPS} )"
+
+UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc s390x tricore"
+
+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=(
+ -DUNICORN_ARCH="${UNICORN_TARGETS// /;}"
+ )
+
+ cmake_src_configure
+
+ wrap_python ${FUNCNAME}
+}
+
+src_compile() {
+ cmake_src_compile
+
+ wrap_python ${FUNCNAME}
+}
+
+src_install() {
+ cmake_src_install
+
+ if ! use static-libs; then
+ find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die
+ fi
+
+ wrap_python ${FUNCNAME}
+}
diff --git a/dev-util/unicorn/unicorn-9999.ebuild b/dev-util/unicorn/unicorn-9999.ebuild
index 01c1ff6ba6bf..34777b117a28 100644
--- a/dev-util/unicorn/unicorn-9999.ebuild
+++ b/dev-util/unicorn/unicorn-9999.ebuild
@@ -7,7 +7,7 @@ MY_PV=${PV/_/-}
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit cmake distutils-r1
DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework"
@@ -17,7 +17,7 @@ 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"
+ SRC_URI="https://github.com/unicorn-engine/unicorn/archive/${MY_PV}.tar.gz -> ${P}.gh.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
@@ -34,12 +34,12 @@ RDEPEND="python? ( ${PYTHON_DEPS} )"
BDEPEND="virtual/pkgconfig
python? ( ${DISTUTILS_DEPS} )"
-UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc s390x"
+UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc s390x tricore"
wrap_python() {
if use python; then
# src_prepare
- # do not compile C extensions
+ # Do not compile C extensions
export LIBUNICORN_PATH=1
pushd bindings/python >/dev/null || die
@@ -58,7 +58,6 @@ src_prepare() {
src_configure(){
local mycmakeargs=(
- -DBUILD_SHARED_LIBS=$(usex !static-libs)
-DUNICORN_ARCH="${UNICORN_TARGETS// /;}"
)
@@ -76,5 +75,9 @@ src_compile() {
src_install() {
cmake_src_install
+ if ! use static-libs; then
+ find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die
+ fi
+
wrap_python ${FUNCNAME}
}