|
| 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 |
0 commit comments