diff options
Diffstat (limited to 'dev-util/unicorn')
-rw-r--r-- | dev-util/unicorn/Manifest | 2 | ||||
-rw-r--r-- | dev-util/unicorn/unicorn-2.0.1.ebuild | 83 |
2 files changed, 85 insertions, 0 deletions
diff --git a/dev-util/unicorn/Manifest b/dev-util/unicorn/Manifest index 4d6f61c3aa35..320ba9fcbb1b 100644 --- a/dev-util/unicorn/Manifest +++ b/dev-util/unicorn/Manifest @@ -1,5 +1,7 @@ AUX unicorn-2.0.0-lto.patch 2165 BLAKE2B 5858b3d7daf1f3654271d974f04836baa1c89a8204317c37b043e44f1c9005c2e4d1207308db253e2463f0c0b5ec2d59ef1717d941ad35feeab8c94b9518d3f5 SHA512 bd3f7e281f6c064b08dde128453da5db41ddd673fca53975a9e80a2ffe5f5fa05f5826f5027a7662ef11182e3f77680aa357341e0cbe085943047ed280af8d75 DIST unicorn-2.0.0.gh.tar.gz 4065595 BLAKE2B c16252a8a4af77c1c76c80101c30b92536d1677f93898acf4711e910dbbe1072715b83b4564c015592465eb51d00333e55849c3e06b07726ea3522286d8429bf SHA512 3996f19755ccdaac6e92a7455160e1c90a592ffb789d55ddc9d1bdcf1e68e8a6150bcfa1025a322780c04878be8de28e0ad5fdd79a7b25887ed2793b769f6789 +DIST unicorn-2.0.1.gh.tar.gz 4070004 BLAKE2B 4ab8f92367e7df5762d29ed58dfff524f59053e28548b170b982d16988eea16df46851d2ea559d8beabb4f1315e5ee627f9ded755a4f3b1cfd6d863a50c633b6 SHA512 4249d33d38614ea1ca51e38c7838cb276306100aa44c65ad1b3e39304e4b856ac643a9c6f9d13678fc07bea58989a08b64653d17afe9e62bcef2936ba63e1b1f EBUILD unicorn-2.0.0.ebuild 1749 BLAKE2B 964761d8c139fe79c8549715fefa2ed7a8f33928cec4eef2246143b3d690e4a2dcaec8a74cdf5c69b6da33aa1ded0958b56bf157ce355c943d090c3051860879 SHA512 5ac8715ced8967784293087a71203c12ec5dd7292ae4f2d764b90af3cf7591ba22b91935d39c873dafba670b8093cbc9b0d4485dd3dd716817f04f20c2cc56cb +EBUILD unicorn-2.0.1.ebuild 1708 BLAKE2B 43214ad5df0aa79a0fd002304c0f4964d3b3f1ba90ca9a2f64b61e5c3e01ee9a47e323b364bc08d93dce036f196ce8c19888b5a93da95ad8ea335cb8ae3f6318 SHA512 bdd22202eb84437c619831116fad9438cac24b3eb85b3d0476ed5d43999572223c7e83ff7484212039a54d725df6b839cddbf59f2c09529f737b81dc72e2bd00 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.1.ebuild b/dev-util/unicorn/unicorn-2.0.1.ebuild new file mode 100644 index 000000000000..34777b117a28 --- /dev/null +++ b/dev-util/unicorn/unicorn-2.0.1.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} +} |