blob: 062b2e4f08d70f5651c5734be09da60f3ea2fd70 (
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
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit fcaps meson
MY_PV=$(ver_rs 3 -)
MY_PV="${MY_PV//_/-}"
DESCRIPTION="Efficient micro-compositor for running games"
HOMEPAGE="https://github.com/ValveSoftware/gamescope"
EGIT_SUBMODULES=( src/reshade subprojects/{libliftoff,vkroots} )
if [[ ${PV} == "9999" ]]; then
EGIT_REPO_URI="https://github.com/ValveSoftware/${PN}.git"
inherit git-r3
else
RESHADE_COMMIT="696b14cd6006ae9ca174e6164450619ace043283"
LIBLIFTOFF_COMMIT="0.5.0" # Upstream points at this release.
VKROOTS_COMMIT="5106d8a0df95de66cc58dc1ea37e69c99afc9540"
SRC_URI="
https://github.com/ValveSoftware/${PN}/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz
https://gitlab.freedesktop.org/emersion/libliftoff/-/releases/v${LIBLIFTOFF_COMMIT}/downloads/libliftoff-${LIBLIFTOFF_COMMIT}.tar.gz
https://github.com/Joshua-Ashton/reshade/archive/${RESHADE_COMMIT}.tar.gz -> reshade-${RESHADE_COMMIT}.tar.gz
https://github.com/Joshua-Ashton/vkroots/archive/${VKROOTS_COMMIT}.tar.gz -> vkroots-${VKROOTS_COMMIT}.tar.gz
"
KEYWORDS="~amd64"
fi
S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="BSD-2"
SLOT="0"
IUSE="avif gui libei pipewire +sdl test +wsi-layer"
RESTRICT="!test? ( test )"
RDEPEND="
dev-lang/luajit:2=
>=dev-libs/libinput-1.14.0:=
>=dev-libs/wayland-1.23.1
gui-libs/libdecor
gui-libs/wlroots:0.20[libinput,X]
<media-libs/libdisplay-info-0.4:=
media-libs/vulkan-loader
sys-apps/hwdata
sys-libs/libcap
>=x11-libs/libdrm-2.4.109
x11-libs/libX11
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXi
>=x11-libs/libxkbcommon-1.8.0
x11-libs/libXmu
x11-libs/libXrender
x11-libs/libXres
x11-libs/libXtst
x11-libs/libXxf86vm
>=x11-libs/pixman-0.43.0
virtual/libudev
avif? ( >=media-libs/libavif-1.0.0:= )
libei? ( dev-libs/libei )
pipewire? ( >=media-video/pipewire-0.3:= )
sdl? ( media-libs/libsdl2[video,vulkan] )
wsi-layer? ( x11-libs/libxcb )
"
DEPEND="
${RDEPEND}
>=dev-libs/wayland-protocols-1.41
>=dev-libs/stb-20240201-r1
dev-util/vulkan-headers
>=media-libs/glm-1.0.1
dev-util/spirv-headers
test? ( dev-cpp/catch:0 )
"
RDEPEND+="
gui? ( gnome-extra/zenity )
"
BDEPEND="
dev-util/glslang
dev-util/wayland-scanner
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-deprecated-stb.patch
"${FILESDIR}"/${PN}-subprojects.patch
"${FILESDIR}"/${PN}-no-git.patch
)
FILECAPS=(
cap_sys_nice usr/bin/${PN}
)
src_prepare() {
# ReShade is bundled as a git submodule, but it references an unofficial
# fork, so we cannot unbundle it. Upstream have requested that we do not
# unbundle libliftoff or vkroots. Symlink to the extracted sources when not
# using the git submodules in 9999.
if [[ ${PV} != "9999" ]]; then
local dir name commit
for dir in "${EGIT_SUBMODULES[@]}"; do
rmdir "${dir}" || die
name=${dir##*/}
commit=${name^^}_COMMIT
mv "../${name}-${!commit}" "${dir}" || die
done
fi
# SPIRV-Headers is required by ReShade. It is bundled as a git submodule but
# not wrapped with Meson, so we can symlink to our system-wide headers.
# For 9999, this submodule is not included.
mkdir -p thirdparty/SPIRV-Headers/include || die
ln -snf "${ESYSROOT}"/usr/include/spirv thirdparty/SPIRV-Headers/include/ || die
default
}
src_configure() {
# Disabling DRM backend is currently broken.
# https://github.com/ValveSoftware/gamescope/issues/1347
local emesonargs=(
$(meson_feature pipewire)
-Ddrm_backend=enabled
$(meson_feature sdl sdl2_backend)
$(meson_feature avif avif_screenshots)
$(meson_feature libei input_emulation)
$(meson_use wsi-layer enable_gamescope_wsi_layer)
-Denable_openvr_support=false
$(meson_use test enable_tests)
$(meson_use gui enable_zenity)
-Dbenchmark=disabled
)
meson_src_configure
}
src_install() {
meson_src_install --skip-subprojects
}
|