summaryrefslogtreecommitdiff
path: root/games-util/umu-launcher/umu-launcher-1.4.4.ebuild
blob: 63801931282314d632a133e094f5b2cd13141d22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CARGO_OPTIONAL=1
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( python3_{13..14} )
RUST_MIN_VER="1.85.0"

CRATES="
	base16ct@1.0.0
	base64ct@1.6.0
	block-buffer@0.10.4
	block-buffer@0.12.0
	cfg-if@1.0.0
	cipher@0.4.4
	const-oid@0.10.2
	cpufeatures@0.2.16
	cpufeatures@0.3.0
	crypto-common@0.1.6
	crypto-common@0.2.1
	curve25519-dalek-derive@0.1.1
	curve25519-dalek@4.1.3
	digest@0.10.7
	digest@0.11.2
	ed25519-dalek@2.1.1
	ed25519@2.2.3
	fiat-crypto@0.2.9
	generic-array@0.14.7
	heck@0.5.0
	hybrid-array@0.4.8
	inout@0.1.3
	libc@0.2.169
	once_cell@1.21.3
	pem-rfc7468@0.7.0
	portable-atomic@1.10.0
	proc-macro2@1.0.92
	pyo3-build-config@0.29.0
	pyo3-ffi@0.29.0
	pyo3-macros-backend@0.29.0
	pyo3-macros@0.29.0
	pyo3@0.29.0
	quote@1.0.38
	rand_core@0.6.4
	rustc_version@0.4.1
	semver@1.0.24
	sha2@0.10.9
	sha2@0.11.0
	signature@2.2.0
	ssh-cipher@0.2.0
	ssh-encoding@0.2.0
	ssh-key@0.6.7
	subtle@2.6.1
	syn@2.0.96
	target-lexicon@0.13.5
	typenum@1.17.0
	unicode-ident@1.0.14
	version_check@0.9.5
	zeroize@1.8.1
"

inherit cargo distutils-r1

DESCRIPTION="Unified launcher for Windows games on Linux"
HOMEPAGE="https://github.com/Open-Wine-Components/umu-launcher"
SRC_URI="
	https://github.com/Open-Wine-Components/umu-launcher/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="GPL-3"
# Dependent crate licenses
LICENSE+=" Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-3.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="delta-update"

RDEPEND="
	>=dev-python/python-xlib-0.33[${PYTHON_USEDEP}]
	>=dev-python/urllib3-2.0.0[${PYTHON_USEDEP}]
	delta-update? (
		>=dev-python/cbor2-5.4.6[${PYTHON_USEDEP}]
		>=dev-python/pyzstd-0.16.2[${PYTHON_USEDEP}]
		>=dev-python/xxhash-3.2.0[${PYTHON_USEDEP}]
	)
"
BDEPEND="
	app-text/scdoc
	delta-update? (
		${RUST_DEPEND}
	)
	test? (
		>=dev-python/cbor2-5.4.6[${PYTHON_USEDEP}]
		>=dev-python/pyzstd-0.16.2[${PYTHON_USEDEP}]
		>=dev-python/xxhash-3.2.0[${PYTHON_USEDEP}]
	)
"

PATCHES=(
	"${FILESDIR}/${PN}-1.2.9-optional-delta.patch"
)

QA_FLAGS_IGNORED=".*/site-packages/umu/.*so"

EPYTEST_PLUGINS=()

distutils_enable_tests pytest

src_unpack() {
	if use delta-update; then
		cargo_src_unpack
	else
		default
	fi
}

src_configure() {
	distutils-r1_src_configure
	./configure.sh --prefix="${EPREFIX}"/usr || die
}

src_compile() {
	distutils-r1_src_compile
	emake umu-docs
	if use delta-update; then
		cargo_src_compile
		cp "$(cargo_target_dir)"/{libumu_delta.so,umu_delta.so} || die
	fi
}

python_test() {
	epytest -o 'python_files=test_*.py *_test_*.py *_test.py'
}

python_install() {
	distutils-r1_python_install
	if use delta-update; then
		python_moduleinto umu
		python_domodule "$(cargo_target_dir)"/umu_delta.so
	fi
}

src_install() {
	distutils-r1_src_install
	emake DESTDIR="${D}" umu-docs-install
}