-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgamescope.spec
137 lines (121 loc) · 4.22 KB
/
gamescope.spec
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
# Based on https://src.fedoraproject.org/rpms/gamescope
%global commit bafa15766a3488c3c59ef2b558891ae1e26d6efa
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global git_date 20250207
%global tag 3.16.1
%global ver_count 1
%if 0%{?fedora} >= 41
%global libliftoff_minver 0.5.0
%else
%global libliftoff_minver 0.4.1
%endif
Name: gamescope
Version: %{tag}
Release: %{git_date}.%{ver_count}.%{shortcommit}%{?dist}
Summary: Micro-compositor for video games on Wayland
# Automatically converted from old format: BSD - review is highly recommended.
License: LicenseRef-Callaway-BSD
URL: https://github.com/ValveSoftware/gamescope
# Create stb.pc to satisfy dependency('stb')
Source0: stb.pc
Patch0: 1671.patch
BuildRequires: meson >= 0.54.0
BuildRequires: ninja-build
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: glm-devel
BuildRequires: google-benchmark-devel
BuildRequires: libXmu-devel
BuildRequires: libXcursor-devel
BuildRequires: pkgconfig(libdisplay-info)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xxf86vm)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(xres)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(vulkan)
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(wayland-protocols) >= 1.17
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(libpipewire-0.3)
BuildRequires: pkgconfig(libavif)
BuildRequires: pkgconfig(wlroots-0.18)
BuildRequires: (pkgconfig(libliftoff) >= %{libliftoff_minver} with pkgconfig(libliftoff) < 0.6)
BuildRequires: pkgconfig(libcap)
BuildRequires: pkgconfig(libeis-1.0)
BuildRequires: pkgconfig(libdecor-0)
BuildRequires: pkgconfig(hwdata)
BuildRequires: spirv-headers-devel
# Enforce the the minimum EVR to contain fixes for all of:
# CVE-2021-28021 CVE-2021-42715 CVE-2021-42716 CVE-2022-28041 CVE-2023-43898
# CVE-2023-45661 CVE-2023-45662 CVE-2023-45663 CVE-2023-45664 CVE-2023-45666
# CVE-2023-45667
BuildRequires: stb_image-devel >= 2.28^20231011gitbeebb24-12
# Header-only library: -static is for tracking per guidelines
BuildRequires: stb_image-static
BuildRequires: stb_image_resize-devel
BuildRequires: stb_image_resize-static
BuildRequires: stb_image_write-devel
BuildRequires: stb_image_write-static
# BuildRequires: vkroots-devel
BuildRequires: /usr/bin/glslangValidator
# libliftoff hasn't bumped soname, but API/ABI has changed for 0.2.0 release
Requires: libliftoff%{?_isa} >= %{libliftoff_minver}
Requires: xorg-x11-server-Xwayland
Recommends: mesa-dri-drivers
Recommends: mesa-vulkan-drivers
# submodule/copr deps
BuildRequires: pkgconfig(luajit)
BuildRequires: git
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libinput) >= 1.21.0
BuildRequires: pkgconfig(libseat)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(pixman-1) >= 0.42.0
BuildRequires: pkgconfig(x11-xcb)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xcb-errors)
BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-renderutil)
BuildRequires: pkgconfig(xwayland)
%description
%{name} is the micro-compositor optimized for running video games on Wayland.
%prep
git clone %{URL}
cd gamescope
git checkout %{commit}
git submodule update --init --recursive
# Install stub pkgconfig file
mkdir -p pkgconfig
cp %{SOURCE0} pkgconfig/stb.pc
# Replace spirv-headers include with the system directory
sed -i 's^../thirdparty/SPIRV-Headers/include/spirv/^/usr/include/spirv/^' src/meson.build
%autopatch -p1
%build
cd gamescope
export PKG_CONFIG_PATH=pkgconfig
%meson -Dpipewire=enabled
%meson_build
%install
cd gamescope
%meson_install --skip-subprojects
%files
%license gamescope/LICENSE
%doc gamescope/README.md
%{_bindir}/gamescope
%{_bindir}/gamescopectl
%{_bindir}/gamescopereaper
%{_bindir}/gamescopestream
%{_libdir}/libVkLayer_FROG_gamescope_wsi_*.so
%{_datadir}/vulkan/implicit_layer.d/VkLayer_FROG_gamescope_wsi.*.json
%{_datadir}/gamescope/scripts
%changelog
%autochangelog