diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..318586f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/gamescope-3.7.tar.gz diff --git a/1001-meson-Switch-to-using-external-wlroots.patch b/1001-meson-Switch-to-using-external-wlroots.patch new file mode 100644 index 0000000..079b9db --- /dev/null +++ b/1001-meson-Switch-to-using-external-wlroots.patch @@ -0,0 +1,37 @@ +From 9f687a409e5721d274a8bea7879cf1e7a9f9bbda Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Sun, 4 Oct 2020 15:14:39 -0400 +Subject: [PATCH 1001/1002] meson: Switch to using external wlroots + +wlroots is available in the distribution, so let's use it. +--- + meson.build | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/meson.build b/meson.build +index d4fadab..c73f299 100644 +--- a/meson.build ++++ b/meson.build +@@ -45,9 +45,7 @@ thread_dep = dependency('threads') + cap_dep = cc.find_library('cap') + sdl_dep = dependency('SDL2') + +-wlroots_proj = subproject('wlroots', default_options: +- ['default_library=static', 'examples=false']) +-wlroots_static_dep = wlroots_proj.get_variable('wlroots') ++wlroots_dep = dependency('wlroots', version: '>=0.11.0') + + shadercompiler = find_program('glslangValidator') + +@@ -77,7 +75,7 @@ executable( + dependencies : [ + dep_x11, dep_xdamage, dep_xcomposite, dep_xrender, dep_xext, + dep_xxf86vm, pixman_dep, drm_dep, wayland_server, wayland_protos, +- libinput, xkbcommon, math, thread_dep, sdl_dep, wlroots_static_dep, ++ libinput, xkbcommon, math, thread_dep, sdl_dep, wlroots_dep, + vulkan_dep, libftoff_dep, dep_xtst, cap_dep + ], + install: true, +-- +2.26.2 + diff --git a/1002-meson-Switch-to-using-external-libliftoff.patch b/1002-meson-Switch-to-using-external-libliftoff.patch new file mode 100644 index 0000000..fa5ba4a --- /dev/null +++ b/1002-meson-Switch-to-using-external-libliftoff.patch @@ -0,0 +1,27 @@ +From 573ea6573d7603ea9a348741fa4b1bc93235f4c1 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Sun, 4 Oct 2020 15:16:31 -0400 +Subject: [PATCH 1002/1002] meson: Switch to using external libliftoff + +--- + meson.build | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index c73f299..55a876c 100644 +--- a/meson.build ++++ b/meson.build +@@ -59,9 +59,7 @@ spirv_shader = custom_target('shader_target', + install : false, + ) + +-liftoff_proj = subproject('libliftoff', default_options: +- ['default_library=static']) +-libftoff_dep = liftoff_proj.get_variable('liftoff') ++libftoff_dep = dependency('liftoff') + + executable( + 'gamescope', +-- +2.26.2 + diff --git a/gamescope.spec b/gamescope.spec new file mode 100644 index 0000000..64c0da3 --- /dev/null +++ b/gamescope.spec @@ -0,0 +1,66 @@ +Name: gamescope +Version: 3.7 +Release: 1%{?dist} +Summary: Micro-compositor for video games on Wayland + +License: BSD +URL: https://github.com/Plagman/gamescope +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz + +# Fedora specific fixes +Patch1001: 1001-meson-Switch-to-using-external-wlroots.patch +Patch1002: 1002-meson-Switch-to-using-external-libliftoff.patch + +BuildRequires: meson >= 0.54.0 +BuildRequires: ninja-build +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xdamage) +BuildRequires: pkgconfig(xcomposite) +BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xxf86vm) +BuildRequires: pkgconfig(xtst) +BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(vulkan) +BuildRequires: pkgconfig(wayland-server) +BuildRequires: pkgconfig(wayland-protocols) >= 1.17 +BuildRequires: pkgconfig(libinput) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(sdl2) +BuildRequires: pkgconfig(wlroots) >= 0.11.0 +BuildRequires: pkgconfig(liftoff) +BuildRequires: pkgconfig(libcap) +BuildRequires: /usr/bin/glslangValidator + +Requires: xorg-x11-server-Xwayland +Recommends: mesa-dri-drivers +Recommends: mesa-vulkan-drivers + +%description +%{name} is the micro-compositor optimized for running video games on Wayland. + +%prep +%autosetup -p1 + + +%build +%meson +%meson_build + + +%install +%meson_install + + +%files +%license LICENSE +%doc README.md +%{_bindir}/gamescope + + +%changelog +* Sun Oct 4 15:56:25 EDT 2020 Neal Gompa - 3.7-1 +- Initial packaging diff --git a/sources b/sources new file mode 100644 index 0000000..25b515c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gamescope-3.7.tar.gz) = 20b7fcb65df5d38e56465e4daeeb8b43766847c7595c640b5e7262dc39ea73e05e8d1babe220c12334a43399078b5bf9b436ee9e332434880c1c83d5a6ebc3ed