diff --git a/link-with-fno-common.patch b/link-with-fno-common.patch new file mode 100644 index 0000000..5cf99de --- /dev/null +++ b/link-with-fno-common.patch @@ -0,0 +1,44 @@ +From 29a5ce5f65d04b046271fbe53850836c77bbee80 Mon Sep 17 00:00:00 2001 +From: thermitegod +Date: Thu, 23 Jan 2020 18:12:00 -0700 +Subject: [PATCH] Fix compiling with -fno-common + +--- + include/sway/server.h | 4 ++-- + sway/main.c | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/include/sway/server.h b/include/sway/server.h +index 5b34852ca..2e8e46339 100644 +--- a/include/sway/server.h ++++ b/include/sway/server.h +@@ -78,7 +78,7 @@ struct sway_server { + list_t *dirty_nodes; + }; + +-struct sway_server server; ++extern struct sway_server server; + + struct sway_debug { + bool noatomic; // Ignore atomic layout updates +@@ -92,7 +92,7 @@ struct sway_debug { + } damage; + }; + +-struct sway_debug debug; ++extern struct sway_debug debug; + + /* Prepares an unprivileged server_init by performing all privileged operations in advance */ + bool server_privileged_prepare(struct sway_server *server); +diff --git a/sway/main.c b/sway/main.c +index 2cc69dfb5..e0af4a799 100644 +--- a/sway/main.c ++++ b/sway/main.c +@@ -27,6 +27,7 @@ + static bool terminate_request = false; + static int exit_value = 0; + struct sway_server server = {0}; ++struct sway_debug debug = {0}; + + void sway_terminate(int exit_code) { + if (!server.wl_display) { diff --git a/sway.spec b/sway.spec index 8c4622f..25b8690 100644 --- a/sway.spec +++ b/sway.spec @@ -1,10 +1,11 @@ Name: sway Version: 1.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: i3-compatible window manager for Wayland License: MIT URL: https://github.com/swaywm/sway Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz +Patch1: https://github.com/swaywm/sway/commit/29a5ce5f65d04b046271fbe53850836c77bbee80.patch#/link-with-fno-common.patch # FIXME: wlroots require `pkgconfig(egl)`, but assumes mesa provides it # (and uses it's extension header `). @@ -93,6 +94,9 @@ sed -i "s|^output \* bg .*|output * bg /usr/share/backgrounds/f%{fedora}/default %{_datadir}/backgrounds/sway %changelog +* Fri Feb 07 2020 Jan Staněk - 1.4-2 +- Apply upstream patch to allow compiling with -fno-common flag + * Thu Feb 06 2020 Joe Walker 1.4-1 - Update to 1.4 - Added Build requires to pull in mesa-libEGL-devel manually