x11-wm/sawfish: Fix building with CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Fri, 15 May 2020 06:31:00 +0000 (08:31 +0200)
committerJeroen Roovers <jer@gentoo.org>
Fri, 15 May 2020 06:42:49 +0000 (08:42 +0200)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Closes: https://bugs.gentoo.org/show_bug.cgi?id=708024
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
x11-wm/sawfish/files/sawfish-1.12.0-fno-common.patch [new file with mode: 0644]
x11-wm/sawfish/sawfish-1.12.0-r1.ebuild

diff --git a/x11-wm/sawfish/files/sawfish-1.12.0-fno-common.patch b/x11-wm/sawfish/files/sawfish-1.12.0-fno-common.patch
new file mode 100644 (file)
index 0000000..73f58be
--- /dev/null
@@ -0,0 +1,39 @@
+--- a/src/functions.c
++++ b/src/functions.c
+@@ -65,7 +65,7 @@
+ # endif
+ #endif
+-DEFSYM(root, "root");
++extern DEFSYM(root, "root");
+ DEFSYM(after_restacking_hook, "after-restacking-hook");
+ DEFSYM(position, "position");
+ DEFSYM(spacing, "spacing");
+--- a/src/flippers.c
++++ b/src/flippers.c
+@@ -22,10 +22,10 @@
+ static Window edge_left, edge_right, edge_top, edge_bottom;
+-DEFSYM(left, "left");
+-DEFSYM(right, "right");
+-DEFSYM(top, "top");
+-DEFSYM(bottom, "bottom");
++extern DEFSYM(left, "left");
++extern DEFSYM(right, "right");
++extern DEFSYM(top, "top");
++extern DEFSYM(bottom, "bottom");
+ DEFSYM(enter_flipper_hook, "enter-flipper-hook");
+ DEFSYM(leave_flipper_hook, "leave-flipper-hook");
+--- a/src/windows.c
++++ b/src/windows.c
+@@ -75,7 +75,7 @@
+ DEFSYM(north, "north");
+ DEFSYM(north_east, "north-east");
+ DEFSYM(west, "west");
+-DEFSYM(center, "center");
++extern DEFSYM(center, "center");
+ DEFSYM(east, "east");
+ DEFSYM(south_west, "south-west");
+ DEFSYM(south, "south");
index 2cc5b3ad24c28dbc1badd285df92cc8e9111cc52..726c0ecafee007a11a229e8cbebab67a9d51b6f0 100644 (file)
@@ -34,7 +34,8 @@ S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
        # From Fedora
-       "${FILESDIR}"/${P}-desktop.patch
+       "${FILESDIR}"/${PN}-1.12.0-desktop.patch
+       "${FILESDIR}"/${PN}-1.12.0-fno-common.patch
 )
 
 DOCS=( AUTHORS ChangeLog CONTRIBUTING doc/AUTOSTART doc/KEYBINDINGS doc/OPTIONS doc/XSettings MAINTAINERS NEWS README README.IMPORTANT TODO )