Diff unicorn-2.0.1 with a unicorn-9999

/usr/portage/dev-util/unicorn/unicorn-9999.ebuild 2025-07-29 16:22:14.260455037 +0300
8 8
DISTUTILS_USE_PEP517=setuptools
9 9
DISTUTILS_OPTIONAL=1
10 10
PYTHON_COMPAT=( python3_{10..13} )
11

  
11 12
inherit cmake distutils-r1
12 13

  
13 14
DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework"
......
18 19
	EGIT_REPO_URI="https://github.com/unicorn-engine/unicorn"
19 20
else
20 21
	SRC_URI="https://github.com/unicorn-engine/unicorn/archive/${MY_PV}.tar.gz -> ${P}.gh.tar.gz"
21
	KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv x86"
22
	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
22 23
fi
23 24

  
24 25
S="${WORKDIR}/${PN}-${MY_PV}"
25 26

  
26 27
LICENSE="BSD-2 GPL-2 LGPL-2.1"
27 28
SLOT="0/2"
28
IUSE="python static-libs"
29
IUSE="logging python static-libs test"
29 30
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
30 31

  
31 32
DEPEND="${PYTHON_DEPS}
32 33
	dev-libs/glib:2"
33 34
RDEPEND="python? ( ${PYTHON_DEPS} )"
34 35
BDEPEND="virtual/pkgconfig
35
	python? ( ${DISTUTILS_DEPS} )"
36
	python? (
37
		${DISTUTILS_DEPS}
38
		>=dev-python/setuptools-scm-8[${PYTHON_USEDEP}]
39
	)"
40

  
41
RESTRICT="!test? ( test )"
36 42

  
37 43
UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc s390x tricore"
38 44

  
39
PATCHES=(
40
	"${FILESDIR}"/${PN}-2.0.1-configure.patch
41
)
45
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
42 46

  
43 47
wrap_python() {
44 48
	if use python; then
......
67 71
src_configure(){
68 72
	local mycmakeargs=(
69 73
		-DUNICORN_ARCH="${UNICORN_TARGETS// /;}"
74
		-DUNICORN_LOGGING=$(usex logging)
75
		-DUNICORN_LEGACY_STATIC_ARCHIVE=$(usex static-libs)
76
		-DZIG_BUILD=OFF
70 77
	)
71 78

  
72 79
	cmake_src_configure
......
80 87
	wrap_python ${FUNCNAME}
81 88
}
82 89

  
83
src_install() {
90
src_test() {
84 91
	cmake_src_install
85 92

  
86
	if ! use static-libs; then
87
		find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die
88
	fi
93
	wrap_python ${FUNCNAME}
94
}
95

  
96
python_test() {
97
#	export LD_LIBRARY_PATH="${ED}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
98
	for f in tests/test_*.py; do
99
		if test -x ${f}; then
100
			LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)" ${EPYHTON} ${f} || die
101
		fi
102
	done
103
}
104

  
105
src_install() {
106
	cmake_src_install
89 107

  
90 108
	wrap_python ${FUNCNAME}
91 109
}
Thank you!