blob: 6a6261ed0fa0f9c3c60a5964a931a24121ffea90 (
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
|
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.15.0
EAPI=8
RUST_MULTILIB=1
RUST_MIN_VER="1.88"
inherit cargo multilib-minimal
DESCRIPTION="OpenVR over OpenXR compatibility layer"
HOMEPAGE="https://github.com/Supreeeme/xrizer/"
MY_PV="$(ver_cut 1-2)"
OPENXR_SDK_VER="1.1.40"
if [[ ${PV} != 9999 ]]; then
SRC_URI="
https://github.com/Supreeeme/xrizer/archive/refs/tags/v${MY_PV}.tar.gz
-> ${P}.tar.gz
https://codeberg.org/TheGreatMcPain/guru-distfiles/releases/download/${P}/${P}-vendored.tar.xz
"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="GPL-3+"
# Dependent crate licenses
LICENSE+="
Apache-2.0 BSD Boost-1.0 ISC MIT OFL-1.1 UbuntuFontLicense-1.0
Unicode-3.0 ZLIB
"
SLOT="0"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/Supreeeme/xrizer.git"
else
KEYWORDS="~amd64"
fi
BDEPEND="media-libs/shaderc"
src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
ln -s "${WORKDIR}/vendor" "${S}/" || die
sed -i "${ECARGO_HOME}/config.toml" -e '/source.crates-io/d' || die
sed -i "${ECARGO_HOME}/config.toml" -e '/replace-with = "gentoo"/d' || die
sed -i "${ECARGO_HOME}/config.toml" -e '/local-registry = "\/nonexistent"/d' || die
cat "${WORKDIR}/vendor/vendor-config.toml" >> "${ECARGO_HOME}/config.toml" || die
fi
}
src_prepare() {
default
multilib_copy_sources
}
multilib_src_compile() {
cargo_src_compile
}
multilib_src_install() {
# OpenVR expects this particular directory structure.
exeinto "/opt/${PN}/bin$(multilib_is_native_abi && echo /linux64)"
newexe "$(cargo_target_dir)"/libxrizer.so vrclient.so
touch "${ED}/opt/${PN}/version.txt"
}
|