From 1b346af4da061d0e0fe45dd5e49e5ae1e199e90d Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Fri, 16 Aug 2024 00:47:35 +0700 Subject: [PATCH] attempt to fix gamescope-legacy on rawhide --- .../games/gamescope-legacy/0001-cstdint.patch | 36 ------------------- .../gamescope-legacy/gamescope-legacy.spec | 22 +++++++----- anda/games/gamescope-legacy/wlroots-pc.patch | 0 3 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 anda/games/gamescope-legacy/0001-cstdint.patch create mode 100644 anda/games/gamescope-legacy/wlroots-pc.patch diff --git a/anda/games/gamescope-legacy/0001-cstdint.patch b/anda/games/gamescope-legacy/0001-cstdint.patch deleted file mode 100644 index 36a9ad59f2..0000000000 --- a/anda/games/gamescope-legacy/0001-cstdint.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 5529e8ac8f3232ec6233e33286834548e1d8018d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= -Date: Sun, 8 Oct 2023 22:10:33 +0200 -Subject: [PATCH] - ---- - src/reshade/source/effect_parser_stmt.cpp | 1 + - src/reshade/source/effect_token.hpp | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/reshade/source/effect_parser_stmt.cpp b/src/reshade/source/effect_parser_stmt.cpp -index 7829729..f126be2 100644 ---- a/src/reshade/source/effect_parser_stmt.cpp -+++ b/src/reshade/source/effect_parser_stmt.cpp -@@ -9,6 +9,7 @@ - #include // std::toupper - #include - #include -+#include - #include - - struct on_scope_exit -diff --git a/src/reshade/source/effect_token.hpp b/src/reshade/source/effect_token.hpp -index 072d439..e4bb633 100644 ---- a/src/reshade/source/effect_token.hpp -+++ b/src/reshade/source/effect_token.hpp -@@ -5,6 +5,7 @@ - - #pragma once - -+#include - #include - #include - --- -2.41.0 diff --git a/anda/games/gamescope-legacy/gamescope-legacy.spec b/anda/games/gamescope-legacy/gamescope-legacy.spec index 75ead5d764..23dc10db89 100644 --- a/anda/games/gamescope-legacy/gamescope-legacy.spec +++ b/anda/games/gamescope-legacy/gamescope-legacy.spec @@ -1,4 +1,8 @@ +%if 0%{?fedora} >= 41 +%global libliftoff_minver 0.5.0 +%else %global libliftoff_minver 0.4.1 +%endif %global reshade_commit 4245743a8c41abbe3dc73980c1810fe449359bf1 %global reshade_shortcommit %(c=%{reshade_commit}; echo ${c:0:7}) %global _default_patch_fuzz 2 @@ -22,12 +26,9 @@ Summary: Legacy builds of gamescope, a micro-compositor for video games o Packager: Cappy Ishihara License: BSD URL: https://github.com/ValveSoftware/gamescope -Source0: %{url}/archive/%{version}/gamescope-%{version}.tar.gz + # Create stb.pc to satisfy dependency('stb') Source1: stb.pc -Source2: https://github.com/Joshua-Ashton/reshade/archive/%{reshade_commit}/reshade-%{reshade_shortcommit}.tar.gz - -Patch0: 0001-cstdint.patch # https://hhd.dev/ Patch1: v2-0001-always-send-ctrl-1-2-to-steam-s-wayland-session.patch @@ -35,6 +36,9 @@ Patch1: v2-0001-always-send-ctrl-1-2-to-steam-s-wayland-session.patch # ChimeraOS Patch2: legacy-720p.patch +# System wlroots +Patch4: wlroots-pc.patch +BuildRequires: git-core BuildRequires: meson >= 0.54.0 BuildRequires: ninja-build BuildRequires: cmake @@ -64,7 +68,7 @@ BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(libpipewire-0.3) BuildRequires: pkgconfig(libavif) BuildRequires: (pkgconfig(wlroots) >= 0.17.0 with pkgconfig(wlroots) < 0.18) -BuildRequires: (pkgconfig(libliftoff) >= 0.4.1 with pkgconfig(libliftoff) < 0.5) +BuildRequires: (pkgconfig(libliftoff) >= %{libliftoff_minver} with pkgconfig(libliftoff) < 0.6) BuildRequires: pkgconfig(libcap) BuildRequires: pkgconfig(hwdata) BuildRequires: spirv-headers-devel @@ -96,7 +100,9 @@ Recommends: mesa-vulkan-drivers %{name} is the micro-compositor optimized for running video games on Wayland. This is a legacy build primarily intended for use by Polaris GPUs. %prep -%autosetup -p1 -a2 -N -n gamescope-%{version} +git clone --depth 1 --branch %{version} %{url}.git gamescope +cd gamescope +git submodule update --init --recursive # Install stub pkgconfig file mkdir -p pkgconfig cp %{SOURCE1} pkgconfig/stb.pc @@ -104,17 +110,17 @@ cp %{SOURCE1} 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 -# Push in reshade from sources instead of submodule -rm -rf src/reshade && mv reshade-%{reshade_commit} src/reshade %autopatch -p1 %build +cd gamescope export PKG_CONFIG_PATH=pkgconfig %meson -Dpipewire=enabled -Denable_gamescope_wsi_layer=false -Denable_openvr_support=false -Dforce_fallback_for=[] %meson_build %install +cd gamescope %meson_install # Rename to not conflict with the base package mv %{buildroot}%{_bindir}/gamescope %{buildroot}%{_bindir}/gamescope-legacy diff --git a/anda/games/gamescope-legacy/wlroots-pc.patch b/anda/games/gamescope-legacy/wlroots-pc.patch new file mode 100644 index 0000000000..e69de29bb2