From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2FE3B1582EF for ; Sun, 16 Feb 2025 12:47:27 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 1328B3431CF for ; Sun, 16 Feb 2025 12:47:27 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 0BC0E1102CD; Sun, 16 Feb 2025 12:47:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 017351102CD for ; Sun, 16 Feb 2025 12:47:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A909B343104 for ; Sun, 16 Feb 2025 12:47:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 40FDC170C for ; Sun, 16 Feb 2025 12:47:11 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1739710002.c1612da5fddaa6ec85090c9fb6613d7e2d8c660f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/unicorn/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/unicorn/Manifest dev-util/unicorn/unicorn-2.1.2.ebuild X-VCS-Directories: dev-util/unicorn/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c1612da5fddaa6ec85090c9fb6613d7e2d8c660f X-VCS-Branch: master Date: Sun, 16 Feb 2025 12:47:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 88312019-4003-484c-a1ab-7f7e8a9ebfe7 X-Archives-Hash: 036fa5770e703e73075ce3ae6260b2a9 commit: c1612da5fddaa6ec85090c9fb6613d7e2d8c660f Author: Mario Haustein hrz tu-chemnitz de> AuthorDate: Sun Feb 16 12:37:52 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sun Feb 16 12:46:42 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1612da5 dev-util/unicorn: add 2.1.2 Signed-off-by: Mario Haustein hrz.tu-chemnitz.de> Signed-off-by: Sam James gentoo.org> dev-util/unicorn/Manifest | 1 + dev-util/unicorn/unicorn-2.1.2.ebuild | 104 ++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) diff --git a/dev-util/unicorn/Manifest b/dev-util/unicorn/Manifest index fe438d78e2c7..a9ee7657805e 100644 --- a/dev-util/unicorn/Manifest +++ b/dev-util/unicorn/Manifest @@ -1,2 +1,3 @@ DIST unicorn-2.0.1.gh.tar.gz 4070004 BLAKE2B 4ab8f92367e7df5762d29ed58dfff524f59053e28548b170b982d16988eea16df46851d2ea559d8beabb4f1315e5ee627f9ded755a4f3b1cfd6d863a50c633b6 SHA512 4249d33d38614ea1ca51e38c7838cb276306100aa44c65ad1b3e39304e4b856ac643a9c6f9d13678fc07bea58989a08b64653d17afe9e62bcef2936ba63e1b1f DIST unicorn-2.1.1.gh.tar.gz 4176172 BLAKE2B 3dd434121418b9a4eb69683cfca6ec0cd019b632492fbfff421eaf26f4907a2f30bf78699b3afe28df624037e3973a5110a6ea21bd233e66a04a689d3e3e5d1c SHA512 d6184b87a0fb729397ec2ac2cb8bfd9d10c9d4276e49efa681c66c7c54d1a325305a920332a708e68989cc299d0d1a543a1ceeaf552a9b44ec93084f7bf85ef2 +DIST unicorn-2.1.2.gh.tar.gz 4196820 BLAKE2B 3e97c0f0b6dccd157222d473ef51f28fbcaf72eda056713fe1463a3f741f1abe6fbf73d770f391c3730c02e94ede2de4f25c0bf460c80dcc560a79258a7338b2 SHA512 f05e16f02fbf527875f7246811307b8b224cecd4d305dd59490a2a51444672c7ec769153545c857b5425111c19b8c0c33abbb51fcc8d49c0777771d31cf32630 diff --git a/dev-util/unicorn/unicorn-2.1.2.ebuild b/dev-util/unicorn/unicorn-2.1.2.ebuild new file mode 100644 index 000000000000..6afc0cd70a64 --- /dev/null +++ b/dev-util/unicorn/unicorn-2.1.2.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2025 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_{10..13} ) + +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 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +fi + +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="BSD-2 GPL-2 LGPL-2.1" +SLOT="0/2" +IUSE="logging python static-libs test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="${PYTHON_DEPS} + dev-libs/glib:2" +RDEPEND="python? ( ${PYTHON_DEPS} )" +BDEPEND="virtual/pkgconfig + python? ( ${DISTUTILS_DEPS} )" + +RESTRICT="!test? ( test )" + +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} + + if use elibc_musl ; then + QA_CONFIG_IMPL_DECL_SKIP=( malloc_trim ) + fi +} + +src_configure(){ + local mycmakeargs=( + -DUNICORN_ARCH="${UNICORN_TARGETS// /;}" + -DUNICORN_LOGGING=$(usex logging) + -DUNICORN_LEGACY_STATIC_ARCHIVE=$(usex static-libs) + -DZIG_BUILD=OFF + ) + + cmake_src_configure + + wrap_python ${FUNCNAME} +} + +src_compile() { + cmake_src_compile + + wrap_python ${FUNCNAME} +} + +src_test() { + cmake_src_install + + wrap_python ${FUNCNAME} +} + +python_test() { +# export LD_LIBRARY_PATH="${ED}/usr/$(get_libdir):${LD_LIBRARY_PATH}" + for f in tests/test_*.py; do + if test -x ${f}; then + LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)" ${EPYHTON} ${f} || die + fi + done +} + +src_install() { + cmake_src_install + + wrap_python ${FUNCNAME} +}