diff options
author | 2022-07-07 20:18:42 +0200 | |
---|---|---|
committer | 2022-07-09 11:14:32 +0100 | |
commit | d12375dc8fab5e66fce4132e8d797e6ba1a73c28 (patch) | |
tree | 504e778d025538ff2bbbe6b17f6c766c5f6327f3 /dev-util/unicorn | |
parent | dev-python/signedjson: remove extra / from SRC_URI (diff) | |
download | gentoo-d12375dc8fab5e66fce4132e8d797e6ba1a73c28.tar.gz gentoo-d12375dc8fab5e66fce4132e8d797e6ba1a73c28.tar.bz2 gentoo-d12375dc8fab5e66fce4132e8d797e6ba1a73c28.zip |
dev-util/unicorn: version bump 2.0.0
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Closes: https://github.com/gentoo/gentoo/pull/26270
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/unicorn-2.0.0.ebuild | 84 | ||||
-rw-r--r-- | dev-util/unicorn/unicorn-9999.ebuild | 12 |
3 files changed, 93 insertions, 4 deletions
diff --git a/dev-util/unicorn/Manifest b/dev-util/unicorn/Manifest index b79c53ef4965..6bb09c630fce 100644 --- a/dev-util/unicorn/Manifest +++ b/dev-util/unicorn/Manifest @@ -1 +1,2 @@ +DIST unicorn-2.0.0.tar.gz 4065595 BLAKE2B c16252a8a4af77c1c76c80101c30b92536d1677f93898acf4711e910dbbe1072715b83b4564c015592465eb51d00333e55849c3e06b07726ea3522286d8429bf SHA512 3996f19755ccdaac6e92a7455160e1c90a592ffb789d55ddc9d1bdcf1e68e8a6150bcfa1025a322780c04878be8de28e0ad5fdd79a7b25887ed2793b769f6789 DIST unicorn-2.0.0_rc7.tar.gz 3984228 BLAKE2B a3e6a0d6084780b3a47837a6c8f9df9ec0eb176ff041881fbf2dc879eee11c70796b4f8e4ba784f553e383b8537abe9a559e627afc2fcaf712e83bfc5daaf11c SHA512 ae7e2b35032a8cff516f27edc58ab41708c2acd05b8feebb127501d0bc990a6722ba8439876ea147a2025372500d5df4bd7db86fddf215be63d070218a85a27e 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..1f771828950f --- /dev/null +++ b/dev-util/unicorn/unicorn-2.0.0.ebuild @@ -0,0 +1,84 @@ +# 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}.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=( + -DBUILD_SHARED_LIBS=yes + -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..1f771828950f 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" @@ -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,7 @@ src_prepare() { src_configure(){ local mycmakeargs=( - -DBUILD_SHARED_LIBS=$(usex !static-libs) + -DBUILD_SHARED_LIBS=yes -DUNICORN_ARCH="${UNICORN_TARGETS// /;}" ) @@ -76,5 +76,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} } |