blob: 2fb946af8b1124a5de72aa549639de05c3776f1b (
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
|
# Maintainer: detiam <dehe_tian@outlook.com>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Samuel "scrufulufugus" Monson <smonson@irbash.net>
# Contributor: PedroHLC <root@pedrohlc.com>
pkgname=gamescope-nvidia
_pkgname=gamescope
pkgver=3.14.14
pkgrel=1
pkgdesc='SteamOS session compositing window manager (NVIDIA patch)'
arch=(x86_64)
url=https://github.com/sharkautarch/gamescope/tree/nvidia-fix
license=('BSD-2-Clause')
install="$_pkgname.install"
depends=(
'libpipewire'
'libcap'
'libliftoff'
'libxcomposite'
'libxdamage'
'libxkbcommon'
'libxmu'
'libxres'
'libxxf86vm'
'seatd' # wlroots deps
'xcb-util-errors' # wlroots deps
'libdisplay-info' # wlroots deps
'sdl2'
'openvr'
'vulkan-icd-loader'
'xorg-xwayland')
makedepends=(
'git'
'glm=1.0.0'
'glslang'
'meson'
'cmake'
'ninja'
'spirv-headers'
'vulkan-headers'
'wayland-protocols')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=(
"gamescope::git+https://github.com/ValveSoftware/gamescope.git#tag=$pkgver"
"reshade::git+https://github.com/Joshua-Ashton/reshade.git#commit=9fdbea6892f9959fdc18095d035976c574b268b7"
"vkroots::git+https://github.com/Joshua-Ashton/vkroots.git#commit=5106d8a0df95de66cc58dc1ea37e69c99afc9540"
"wlroots::git+https://github.com/Joshua-Ashton/wlroots.git#commit=a5c9826e6d7d8b504b07d1c02425e6f62b020791"
"stb::git+https://github.com/nothings/stb.git#commit=5736b15f7ea0ffb08dd38af21067c314d6a3aae9"
"reverts-bd722f7.patch")
sha1sums=('a8a0df037a4cca63a3f50639997492a73d67ebce'
'5860b457b6bb00d1fdfd6dd068516604e87a6466'
'fc042f50602b41be8a7c6be0a85c14cc70da761b'
'0e6ccd1ec72dc3471594568097c922bec551fc3c'
'e89ef3e6ee66abf807ce78bb269809eb0a0ff63a'
'6573136d575068266dcb67459545ab06db58758a')
prepare() {
# apply nvidia-fix patchs from
# https://github.com/sharkautarch/gamescope/tree/nvidia-fix
for patch in "${source[@]}"; do
if [[ $patch == *.patch ]]; then
msg2 "Applying $patch"
patch --no-backup-if-mismatch -d gamescope -Np1 -i "$srcdir/$patch"
fi
done
cd gamescope
# use system spirv-headers
sed -i "s|'.*spirv/unified1|'/usr/include/spirv/unified1|" src/meson.build
msg2 'Retrieving git build dependencies...'
# configure build deps
git -c submodule.src/reshade.url="$srcdir/reshade" \
-c submodule.subprojects/vkroots.url="$srcdir/vkroots" \
-c submodule.subprojects/wlroots.url="$srcdir/wlroots" \
-c submodule.thirdparty/SPIRV-Headers.update=none \
-c submodule.subprojects/openvr.update=none \
-c submodule.subprojects/libdisplay-info.update=none \
-c submodule.subprojects/libliftoff.update=none \
-c protocol.file.allow=always submodule update --init --progress
msg2 'Retrieving meson build dependencies...'
# meson wrap deps that can't be replaced with system one
sed -i "s|^url =.*|url = file://$srcdir/stb|" subprojects/stb.wrap
meson subprojects download stb
}
pkgver() {
git -C "$_pkgname" describe --tags | sed 's/-//'
}
build() {
arch-meson "$_pkgname" build \
-Dforce_fallback_for=stb,vkroots \
-Dbenchmark=disabled \
-Dpipewire=enabled
meson compile -C build
}
package() {
DESTDIR="$pkgdir" meson install -C build --skip-subprojects
install -Dm 644 "$_pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$_pkgname/"
}
# vim: ts=2 sw=2 et:
|