Skip to content

Commit a120f64

Browse files
committed
chore: Add legacy gamescope package
1 parent 21353dd commit a120f64

File tree

3 files changed

+156
-8
lines changed

3 files changed

+156
-8
lines changed
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 5529e8ac8f3232ec6233e33286834548e1d8018d Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
3+
Date: Sun, 8 Oct 2023 22:10:33 +0200
4+
Subject: [PATCH] <cstdint>
5+
6+
---
7+
src/reshade/source/effect_parser_stmt.cpp | 1 +
8+
src/reshade/source/effect_token.hpp | 1 +
9+
2 files changed, 2 insertions(+)
10+
11+
diff --git a/src/reshade/source/effect_parser_stmt.cpp b/src/reshade/source/effect_parser_stmt.cpp
12+
index 7829729..f126be2 100644
13+
--- a/src/reshade/source/effect_parser_stmt.cpp
14+
+++ b/src/reshade/source/effect_parser_stmt.cpp
15+
@@ -9,6 +9,7 @@
16+
#include <cctype> // std::toupper
17+
#include <cassert>
18+
#include <functional>
19+
+#include <limits>
20+
#include <string_view>
21+
22+
struct on_scope_exit
23+
diff --git a/src/reshade/source/effect_token.hpp b/src/reshade/source/effect_token.hpp
24+
index 072d439..e4bb633 100644
25+
--- a/src/reshade/source/effect_token.hpp
26+
+++ b/src/reshade/source/effect_token.hpp
27+
@@ -5,6 +5,7 @@
28+
29+
#pragma once
30+
31+
+#include <cstdint>
32+
#include <string>
33+
#include <vector>
34+
35+
--
36+
2.41.0
37+
+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
%global libliftoff_minver 0.4.1
2+
%global reshade_commit 4245743a8c41abbe3dc73980c1810fe449359bf1
3+
%global reshade_shortcommit %(c=%{reshade_commit}; echo ${c:0:7})
4+
5+
Name: gamescope-legacy
6+
Version: 3.14.2
7+
Release: %autorelease
8+
Summary: Legacy builds of gamescope, a micro-compositor for video games on Wayland
9+
10+
License: BSD
11+
URL: https://github.com/ValveSoftware/gamescope
12+
Source0: %{url}/archive/%{version}/gamescope-%{version}.tar.gz
13+
# Create stb.pc to satisfy dependency('stb')
14+
Source1: stb.pc
15+
Source2: https://github.com/Joshua-Ashton/reshade/archive/%{reshade_commit}/reshade-%{reshade_shortcommit}.tar.gz
16+
17+
Patch01: 0001-cstdint.patch
18+
19+
BuildRequires: meson >= 0.54.0
20+
BuildRequires: ninja-build
21+
BuildRequires: cmake
22+
BuildRequires: gcc
23+
BuildRequires: gcc-c++
24+
BuildRequires: glm-devel
25+
BuildRequires: google-benchmark-devel
26+
BuildRequires: libXmu-devel
27+
BuildRequires: libXcursor-devel
28+
BuildRequires: pkgconfig(libdisplay-info)
29+
BuildRequires: pkgconfig(x11)
30+
BuildRequires: pkgconfig(xdamage)
31+
BuildRequires: pkgconfig(xcomposite)
32+
BuildRequires: pkgconfig(xrender)
33+
BuildRequires: pkgconfig(xext)
34+
BuildRequires: pkgconfig(xfixes)
35+
BuildRequires: pkgconfig(xxf86vm)
36+
BuildRequires: pkgconfig(xtst)
37+
BuildRequires: pkgconfig(xres)
38+
BuildRequires: pkgconfig(libdrm)
39+
BuildRequires: pkgconfig(vulkan)
40+
BuildRequires: pkgconfig(wayland-scanner)
41+
BuildRequires: pkgconfig(wayland-server)
42+
BuildRequires: pkgconfig(wayland-protocols) >= 1.17
43+
BuildRequires: pkgconfig(xkbcommon)
44+
BuildRequires: pkgconfig(sdl2)
45+
BuildRequires: pkgconfig(libpipewire-0.3)
46+
BuildRequires: pkgconfig(libavif)
47+
BuildRequires: (pkgconfig(wlroots) >= 0.17.0 with pkgconfig(wlroots) < 0.18)
48+
BuildRequires: (pkgconfig(libliftoff) >= 0.4.1 with pkgconfig(libliftoff) < 0.5)
49+
BuildRequires: pkgconfig(libcap)
50+
BuildRequires: pkgconfig(hwdata)
51+
BuildRequires: spirv-headers-devel
52+
# Enforce the the minimum EVR to contain fixes for all of:
53+
# CVE-2021-28021 CVE-2021-42715 CVE-2021-42716 CVE-2022-28041 CVE-2023-43898
54+
# CVE-2023-45661 CVE-2023-45662 CVE-2023-45663 CVE-2023-45664 CVE-2023-45666
55+
# CVE-2023-45667
56+
BuildRequires: stb_image-devel >= 2.28^20231011gitbeebb24-12
57+
# Header-only library: -static is for tracking per guidelines
58+
BuildRequires: stb_image-static
59+
BuildRequires: stb_image_resize-devel
60+
BuildRequires: stb_image_resize-static
61+
BuildRequires: stb_image_write-devel
62+
BuildRequires: stb_image_write-static
63+
BuildRequires: vkroots-devel
64+
BuildRequires: /usr/bin/glslangValidator
65+
66+
# libliftoff hasn't bumped soname, but API/ABI has changed for 0.2.0 release
67+
Requires: libliftoff%{?_isa} >= %{libliftoff_minver}
68+
Requires: xorg-x11-server-Xwayland
69+
70+
Requires: gamescope-libs
71+
Requires: gamescope-libs(x86-32)
72+
73+
Recommends: mesa-dri-drivers
74+
Recommends: mesa-vulkan-drivers
75+
76+
%description
77+
%{name} is the micro-compositor optimized for running video games on Wayland. This is a legacy build primarily intended for use by Polaris GPUs.
78+
79+
%prep
80+
%autosetup -p1 -a2 -N -n gamescope-%{version}
81+
# Install stub pkgconfig file
82+
mkdir -p pkgconfig
83+
cp %{SOURCE1} pkgconfig/stb.pc
84+
85+
# Replace spirv-headers include with the system directory
86+
sed -i 's^../thirdparty/SPIRV-Headers/include/spirv/^/usr/include/spirv/^' src/meson.build
87+
88+
# Push in reshade from sources instead of submodule
89+
rm -rf src/reshade && mv reshade-%{reshade_commit} src/reshade
90+
91+
%autopatch -p1
92+
93+
%build
94+
export PKG_CONFIG_PATH=pkgconfig
95+
%meson -Dpipewire=enabled -Denable_gamescope_wsi_layer=false -Denable_openvr_support=false -Dforce_fallback_for=[]
96+
%meson_build
97+
98+
%install
99+
%meson_install
100+
# Rename to not conflict with the base package
101+
mv %{buildroot}%{_bindir}/gamescope %{buildroot}%{_bindir}/gamescope-legacy
102+
103+
%files
104+
%license LICENSE
105+
%doc README.md
106+
%{_bindir}/gamescope-legacy
107+
108+
%changelog
109+
%autochangelog

spec_files/gamescope/gamescope.spec

+10-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Name: gamescope
88
Version: 100.%{gamescope_tag}
9-
Release: 16.bazzite
9+
Release: 17.bazzite
1010
Summary: Micro-compositor for video games on Wayland
1111

1212
License: BSD
@@ -15,19 +15,21 @@ URL: https://github.com/ValveSoftware/gamescope
1515
# Create stb.pc to satisfy dependency('stb')
1616
Source0: stb.pc
1717

18+
Patch0: 0001-cstdint.patch
19+
1820
# https://github.com/ChimeraOS/gamescope
19-
Patch0: chimeraos.patch
21+
Patch1: chimeraos.patch
2022
# https://hhd.dev/
21-
Patch1: disable-steam-touch-click-atom.patch
22-
Patch2: v2-0001-always-send-ctrl-1-2-to-steam-s-wayland-session.patch
23+
Patch2: disable-steam-touch-click-atom.patch
24+
Patch3: v2-0001-always-send-ctrl-1-2-to-steam-s-wayland-session.patch
2325
# https://github.com/ValveSoftware/gamescope/pull/1281
24-
Patch3: deckhd.patch
26+
Patch4: deckhd.patch
2527
# https://github.com/ValveSoftware/gamescope/issues/1398
26-
Patch4: drm-Separate-BOE-and-SDC-OLED-Deck-panel-rates.patch
28+
Patch5: drm-Separate-BOE-and-SDC-OLED-Deck-panel-rates.patch
2729
# https://github.com/ValveSoftware/gamescope/issues/1369
28-
Patch5: revert-299bc34.patch
30+
Patch6: revert-299bc34.patch
2931
# https://github.com/ValveSoftware/gamescope/pull/1231
30-
Patch6: 1231.patch
32+
Patch7: 1231.patch
3133

3234
BuildRequires: meson >= 0.54.0
3335
BuildRequires: ninja-build

0 commit comments

Comments
 (0)