Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-wm/awesome/files/, x11-wm/awesome/
Date: Sat, 26 Dec 2020 21:33:03
Message-Id: 1609018376.9ff59e69344b86713527434dab3c6c570c5e1470.sam@gentoo
1 commit: 9ff59e69344b86713527434dab3c6c570c5e1470
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 26 21:32:48 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 26 21:32:56 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ff59e69
7
8 x11-wm/awesome: add -fno-common (gcc 10) patch
9
10 Thanks-to: Eddie Chapman <maracay <AT> ehuk.net>
11 Closes: https://bugs.gentoo.org/707262
12 Package-Manager: Portage-3.0.9, Repoman-3.0.2
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 x11-wm/awesome/awesome-4.3-r1.ebuild | 1 +
16 x11-wm/awesome/awesome-4.3-r100.ebuild | 1 +
17 x11-wm/awesome/files/awesome-4.3-fno-common.patch | 240 ++++++++++++++++++++++
18 3 files changed, 242 insertions(+)
19
20 diff --git a/x11-wm/awesome/awesome-4.3-r1.ebuild b/x11-wm/awesome/awesome-4.3-r1.ebuild
21 index 64d00a31b10..5c0d71205ae 100644
22 --- a/x11-wm/awesome/awesome-4.3-r1.ebuild
23 +++ b/x11-wm/awesome/awesome-4.3-r1.ebuild
24 @@ -61,6 +61,7 @@ PATCHES=(
25 "${FILESDIR}/${PN}-4.0-convert-path.patch" # bug #408025
26 "${FILESDIR}/${PN}-xsession.patch" # bug #408025
27 "${FILESDIR}/${PN}-4.0-cflag-cleanup.patch" # bug #509658
28 + "${FILESDIR}/${PN}-4.3-fno-common.patch" # bug #707262
29 )
30
31 src_configure() {
32
33 diff --git a/x11-wm/awesome/awesome-4.3-r100.ebuild b/x11-wm/awesome/awesome-4.3-r100.ebuild
34 index 56bd122ae47..0ce35e845bd 100644
35 --- a/x11-wm/awesome/awesome-4.3-r100.ebuild
36 +++ b/x11-wm/awesome/awesome-4.3-r100.ebuild
37 @@ -67,6 +67,7 @@ PATCHES=(
38 "${FILESDIR}/${PN}-4.0-convert-path.patch" # bug #408025
39 "${FILESDIR}/${PN}-xsession.patch" # bug #408025
40 "${FILESDIR}/${PN}-4.0-cflag-cleanup.patch" # bug #509658
41 + "${FILESDIR}/${PN}-4.3-fno-common.patch" # bug #707262
42 )
43
44 src_configure() {
45
46 diff --git a/x11-wm/awesome/files/awesome-4.3-fno-common.patch b/x11-wm/awesome/files/awesome-4.3-fno-common.patch
47 new file mode 100644
48 index 00000000000..9a77bf42a39
49 --- /dev/null
50 +++ b/x11-wm/awesome/files/awesome-4.3-fno-common.patch
51 @@ -0,0 +1,240 @@
52 +https://github.com/awesomeWM/awesome/commit/d256d9055095f27a33696e0aeda4ee20ed4fb1a0.patch
53 +https://bugs.gentoo.org/707262
54 +Rebased by Eddie Chapman <maracay@××××.net>
55 +----
56 +From d256d9055095f27a33696e0aeda4ee20ed4fb1a0 Mon Sep 17 00:00:00 2001
57 +From: Reiner Herrmann <reiner@××××××××.de>
58 +Date: Fri, 17 Apr 2020 19:25:40 +0200
59 +Subject: [PATCH] Move variable declarations from header to C file to fix build
60 + with GCC 10
61 +
62 +GCC 10 builds with -fno-common by default, which causes linker errors when
63 +variables are declared in header files and included in multiple places.
64 +
65 +See also: https://gcc.gnu.org/gcc-10/porting_to.html
66 +---
67 + common/lualib.c | 2 ++
68 + common/lualib.h | 2 +-
69 + luaa.c | 2 ++
70 + luaa.h | 2 +-
71 + objects/button.c | 2 ++
72 + objects/button.h | 2 +-
73 + objects/client.c | 2 ++
74 + objects/client.h | 2 +-
75 + objects/drawin.c | 2 ++
76 + objects/drawin.h | 2 +-
77 + objects/key.c | 2 ++
78 + objects/key.h | 2 +-
79 + objects/tag.c | 2 ++
80 + objects/tag.h | 2 +-
81 + objects/window.c | 1 +
82 + objects/window.h | 2 +-
83 + 16 files changed, 23 insertions(+), 8 deletions(-)
84 +
85 +diff --git a/common/lualib.c b/common/lualib.c
86 +index 312fb2d594..bb110ac716 100644
87 +--- a/common/lualib.c
88 ++++ b/common/lualib.c
89 +@@ -20,6 +20,8 @@
90 + #include "common/lualib.h"
91 + #include "luaa.h"
92 +
93 ++lua_CFunction lualib_dofunction_on_error;
94 ++
95 + void luaA_checkfunction(lua_State *L, int idx)
96 + {
97 + if(!lua_isfunction(L, idx))
98 +diff --git a/common/lualib.h b/common/lualib.h
99 +index 8a3ef089d7..a91261843c 100644
100 +--- a/common/lualib.h
101 ++++ b/common/lualib.h
102 +@@ -28,7 +28,7 @@
103 + #include "common/util.h"
104 +
105 + /** Lua function to call on dofunction() error */
106 +-lua_CFunction lualib_dofunction_on_error;
107 ++extern lua_CFunction lualib_dofunction_on_error;
108 +
109 + void luaA_checkfunction(lua_State *, int);
110 + void luaA_checktable(lua_State *, int);
111 +diff --git a/luaa.c b/luaa.c
112 +index 419a8c2eb2..aeaba9cd1f 100644
113 +--- a/luaa.c
114 ++++ b/luaa.c
115 +@@ -91,6 +91,8 @@ extern const struct luaL_Reg awesome_mouse_meta[];
116 + extern const struct luaL_Reg awesome_root_methods[];
117 + extern const struct luaL_Reg awesome_root_meta[];
118 +
119 ++signal_array_t global_signals;
120 ++
121 + /** A call into the Lua code aborted with an error.
122 + *
123 + * This signal is used in the example configuration, @{05-awesomerc.md},
124 +diff --git a/luaa.h b/luaa.h
125 +index e159258348..d26c437691 100644
126 +--- a/luaa.h
127 ++++ b/luaa.h
128 +@@ -317,7 +317,7 @@ const char *luaA_find_config(xdgHandle *, const char *, luaA_config_callback *);
129 + bool luaA_parserc(xdgHandle *, const char *);
130 +
131 + /** Global signals */
132 +-signal_array_t global_signals;
133 ++extern signal_array_t global_signals;
134 +
135 + int luaA_class_index_miss_property(lua_State *, lua_object_t *);
136 + int luaA_class_newindex_miss_property(lua_State *, lua_object_t *);
137 +diff --git a/objects/button.c b/objects/button.c
138 +index 892347a928..5ffdcd4432 100644
139 +--- a/objects/button.c
140 ++++ b/objects/button.c
141 +@@ -35,6 +35,8 @@
142 +
143 + #include "button.h"
144 +
145 ++lua_class_t button_class;
146 ++
147 + /** Button object.
148 + *
149 + * @tfield int button The mouse button number, or 0 for any button.
150 +diff --git a/objects/button.h b/objects/button.h
151 +index fb8bb8da28..8f0b894305 100644
152 +--- a/objects/button.h
153 ++++ b/objects/button.h
154 +@@ -39,7 +39,7 @@ typedef struct button_t
155 + xcb_button_t button;
156 + } button_t;
157 +
158 +-lua_class_t button_class;
159 ++extern lua_class_t button_class;
160 + LUA_OBJECT_FUNCS(button_class, button_t, button)
161 + ARRAY_FUNCS(button_t *, button, DO_NOTHING)
162 +
163 +diff --git a/objects/client.c b/objects/client.c
164 +index 7b2d3a2022..b617a9e7a9 100644
165 +--- a/objects/client.c
166 ++++ b/objects/client.c
167 +@@ -108,6 +108,8 @@
168 + #include <xcb/shape.h>
169 + #include <cairo-xcb.h>
170 +
171 ++lua_class_t client_class;
172 ++
173 + /** Client class.
174 + *
175 + * This table allow to add more dynamic properties to the clients. For example,
176 +diff --git a/objects/client.h b/objects/client.h
177 +index 74a23131c5..387e7c2aea 100644
178 +--- a/objects/client.h
179 ++++ b/objects/client.h
180 +@@ -200,7 +200,7 @@ struct client_t
181 + ARRAY_FUNCS(client_t *, client, DO_NOTHING)
182 +
183 + /** Client class */
184 +-lua_class_t client_class;
185 ++extern lua_class_t client_class;
186 +
187 + LUA_OBJECT_FUNCS(client_class, client_t, client)
188 +
189 +diff --git a/objects/drawin.c b/objects/drawin.c
190 +index 3fd1cc4350..3bbd93179c 100644
191 +--- a/objects/drawin.c
192 ++++ b/objects/drawin.c
193 +@@ -46,6 +46,8 @@
194 + #include <cairo-xcb.h>
195 + #include <xcb/shape.h>
196 +
197 ++lua_class_t drawin_class;
198 ++
199 + /** Drawin object.
200 + *
201 + * @field border_width Border width.
202 +diff --git a/objects/drawin.h b/objects/drawin.h
203 +index 31f315aac5..2f8887d944 100644
204 +--- a/objects/drawin.h
205 ++++ b/objects/drawin.h
206 +@@ -52,7 +52,7 @@ void luaA_drawin_systray_kickout(lua_State *);
207 +
208 + void drawin_class_setup(lua_State *);
209 +
210 +-lua_class_t drawin_class;
211 ++extern lua_class_t drawin_class;
212 +
213 + #endif
214 + // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
215 +diff --git a/objects/key.c b/objects/key.c
216 +index c42f7446d8..365ba998cc 100644
217 +--- a/objects/key.c
218 ++++ b/objects/key.c
219 +@@ -43,6 +43,8 @@
220 + #include <xkbcommon/xkbcommon.h>
221 + #include <glib.h>
222 +
223 ++lua_class_t key_class;
224 ++
225 + /** Key object.
226 + *
227 + * @tfield string key The key to trigger an event.
228 +diff --git a/objects/key.h b/objects/key.h
229 +index 8aa07ffe3d..45f23cac79 100644
230 +--- a/objects/key.h
231 ++++ b/objects/key.h
232 +@@ -36,7 +36,7 @@ typedef struct keyb_t
233 + xcb_keycode_t keycode;
234 + } keyb_t;
235 +
236 +-lua_class_t key_class;
237 ++extern lua_class_t key_class;
238 + LUA_OBJECT_FUNCS(key_class, keyb_t, key)
239 + DO_ARRAY(keyb_t *, key, DO_NOTHING)
240 +
241 +diff --git a/objects/tag.c b/objects/tag.c
242 +index a0050cc2a9..1b1a135762 100644
243 +--- a/objects/tag.c
244 ++++ b/objects/tag.c
245 +@@ -190,6 +190,8 @@
246 + #include "ewmh.h"
247 + #include "luaa.h"
248 +
249 ++lua_class_t tag_class;
250 ++
251 + /**
252 + * @signal request::select
253 + */
254 +diff --git a/objects/tag.h b/objects/tag.h
255 +index d6bb40e0d8..f830b1e2c5 100644
256 +--- a/objects/tag.h
257 ++++ b/objects/tag.h
258 +@@ -46,7 +46,7 @@ struct tag
259 + client_array_t clients;
260 + };
261 +
262 +-lua_class_t tag_class;
263 ++extern lua_class_t tag_class;
264 + LUA_OBJECT_FUNCS(tag_class, tag_t, tag)
265 +
266 + void tag_class_setup(lua_State *);
267 +diff --git a/objects/window.c b/objects/window.c
268 +index 440970f3d0..371d06bcd3 100644
269 +--- a/objects/window.c
270 ++++ b/objects/window.c
271 +@@ -59,6 +59,7 @@
272 + #include "property.h"
273 + #include "xwindow.h"
274 +
275 ++lua_class_t window_class;
276 + LUA_CLASS_FUNCS(window, window_class)
277 +
278 + static xcb_window_t
279 +diff --git a/objects/window.h b/objects/window.h
280 +index 5386fafead..fbc5296cf5 100644
281 +--- a/objects/window.h
282 ++++ b/objects/window.h
283 +@@ -80,7 +80,7 @@ typedef struct
284 + WINDOW_OBJECT_HEADER
285 + } window_t;
286 +
287 +-lua_class_t window_class;
288 ++extern lua_class_t window_class;
289 +
290 + void window_class_setup(lua_State *);
291 +