gnu: glib: Fix CVE-2021-27218 and CVE-2021-27219.
[jackhill/guix/guix.git] / gnu / packages / patches / pingus-boost-headers.patch
1 https://github.com/Pingus/pingus/commit/fef8cf6512fa4aa09e87643c22ef66de9ec7bb41.patch
2
3 From fef8cf6512fa4aa09e87643c22ef66de9ec7bb41 Mon Sep 17 00:00:00 2001
4 From: Ingo Ruhnke <grumbel@gmail.com>
5 Date: Sat, 26 Jul 2014 20:49:11 +0200
6 Subject: [PATCH] Switched to boost::signals2
7
8 ---
9 SConscript | 5 ++---
10 src/editor/button.hpp | 4 ++--
11 src/editor/checkbox.hpp | 4 ++--
12 src/editor/combobox.hpp | 4 ++--
13 src/editor/file_list.hpp | 4 ++--
14 src/editor/inputbox.hpp | 6 +++---
15 src/editor/message_box.hpp | 2 +-
16 src/editor/object_selector.cpp | 4 ++--
17 src/editor/viewport.hpp | 4 ++--
18 src/pingus/components/check_box.hpp | 4 ++--
19 src/pingus/components/choice_box.hpp | 4 ++--
20 src/pingus/components/slider_box.hpp | 4 ++--
21 src/pingus/config_manager.hpp | 28 ++++++++++++++--------------
22 src/pingus/screens/option_menu.hpp | 4 ++--
23 14 files changed, 40 insertions(+), 41 deletions(-)
24
25 diff --git a/SConscript b/SConscript
26 index 758567f51..c4d25a8a9 100644
27 --- a/SConscript
28 +++ b/SConscript
29 @@ -187,9 +187,8 @@ class Project:
30 'src/engine/input/xinput/xinput_device.cpp'])
31
32 def configure_boost(self):
33 - if not self.conf.CheckLibWithHeader('boost_signals', 'boost/signals.hpp', 'c++'):
34 - if not self.conf.CheckLibWithHeader('boost_signals-mt', 'boost/signals.hpp', 'c++'):
35 - self.fatal_error += " * library 'boost_signals' not found\n"
36 + if not self.conf.CheckHeader('boost/signals2.hpp', '<>', 'c++'):
37 + self.fatal_error += " * library 'boost_signals2' not found\n"
38
39 def configure_png(self):
40 if self.conf.CheckMyProgram('pkg-config'):
41 diff --git a/src/editor/button.hpp b/src/editor/button.hpp
42 index c85d7da9e..d89dfe669 100644
43 --- a/src/editor/button.hpp
44 +++ b/src/editor/button.hpp
45 @@ -17,7 +17,7 @@
46 #ifndef HEADER_PINGUS_EDITOR_BUTTON_HPP
47 #define HEADER_PINGUS_EDITOR_BUTTON_HPP
48
49 -#include <boost/signal.hpp>
50 +#include <boost/signals2.hpp>
51
52 #include "engine/gui/rect_component.hpp"
53
54 @@ -48,7 +48,7 @@ class Button : public GUI::RectComponent
55 void enable() { enabled = true; }
56 void disable() { enabled = false; }
57
58 - boost::signal<void()> on_click;
59 + boost::signals2::signal<void()> on_click;
60
61 private:
62 Button (const Button&);
63 diff --git a/src/editor/checkbox.hpp b/src/editor/checkbox.hpp
64 index 7c3bc835f..66382d79b 100644
65 --- a/src/editor/checkbox.hpp
66 +++ b/src/editor/checkbox.hpp
67 @@ -17,7 +17,7 @@
68 #ifndef HEADER_PINGUS_EDITOR_CHECKBOX_HPP
69 #define HEADER_PINGUS_EDITOR_CHECKBOX_HPP
70
71 -#include <boost/signal.hpp>
72 +#include <boost/signals2.hpp>
73
74 #include "engine/gui/rect_component.hpp"
75
76 @@ -40,7 +40,7 @@ class Checkbox : public GUI::RectComponent
77 bool is_checked() const { return checked; }
78 void on_primary_button_press(int x, int y);
79
80 - boost::signal<void (bool)> on_change;
81 + boost::signals2::signal<void (bool)> on_change;
82
83 private:
84 Checkbox (const Checkbox&);
85 diff --git a/src/editor/combobox.hpp b/src/editor/combobox.hpp
86 index 0ca742593..603556bd9 100644
87 --- a/src/editor/combobox.hpp
88 +++ b/src/editor/combobox.hpp
89 @@ -18,7 +18,7 @@
90 #ifndef HEADER_PINGUS_EDITOR_COMBOBOX_HPP
91 #define HEADER_PINGUS_EDITOR_COMBOBOX_HPP
92
93 -#include <boost/signal.hpp>
94 +#include <boost/signals2.hpp>
95
96 #include "engine/display/sprite.hpp"
97 #include "engine/gui/rect_component.hpp"
98 @@ -88,7 +88,7 @@ class Combobox : public GUI::RectComponent
99
100 void update_layout() {}
101
102 - boost::signal<void (const ComboItem&)> on_select;
103 + boost::signals2::signal<void (const ComboItem&)> on_select;
104
105 private:
106 Combobox();
107 diff --git a/src/editor/file_list.hpp b/src/editor/file_list.hpp
108 index cc4bba2de..85efe6aa0 100644
109 --- a/src/editor/file_list.hpp
110 +++ b/src/editor/file_list.hpp
111 @@ -17,7 +17,7 @@
112 #ifndef HEADER_PINGUS_EDITOR_FILE_LIST_HPP
113 #define HEADER_PINGUS_EDITOR_FILE_LIST_HPP
114
115 -#include <boost/signal.hpp>
116 +#include <boost/signals2.hpp>
117
118 #include "engine/display/sprite.hpp"
119 #include "engine/gui/rect_component.hpp"
120 @@ -61,7 +61,7 @@ class FileList : public GUI::RectComponent
121 bool has_more_next_pages();
122 bool has_more_prev_pages();
123
124 - boost::signal<void (const System::DirectoryEntry&)> on_click;
125 + boost::signals2::signal<void (const System::DirectoryEntry&)> on_click;
126
127 private:
128 int items_per_page();
129 diff --git a/src/editor/inputbox.hpp b/src/editor/inputbox.hpp
130 index cad9663ec..87321dbba 100644
131 --- a/src/editor/inputbox.hpp
132 +++ b/src/editor/inputbox.hpp
133 @@ -17,7 +17,7 @@
134 #ifndef HEADER_PINGUS_EDITOR_INPUTBOX_HPP
135 #define HEADER_PINGUS_EDITOR_INPUTBOX_HPP
136
137 -#include <boost/signal.hpp>
138 +#include <boost/signals2.hpp>
139
140 #include "engine/gui/rect_component.hpp"
141
142 @@ -40,8 +40,8 @@ class Inputbox : public GUI::RectComponent
143
144 void update_layout() {}
145
146 - boost::signal<void (const std::string&)> on_change;
147 - boost::signal<void (const std::string&)> on_enter;
148 + boost::signals2::signal<void (const std::string&)> on_change;
149 + boost::signals2::signal<void (const std::string&)> on_enter;
150
151 private:
152 Inputbox (const Inputbox&);
153 diff --git a/src/editor/message_box.hpp b/src/editor/message_box.hpp
154 index 385387a61..d885767cf 100644
155 --- a/src/editor/message_box.hpp
156 +++ b/src/editor/message_box.hpp
157 @@ -45,7 +45,7 @@ class MessageBox : public GUI::GroupComponent
158 void on_cancel_button();
159
160 public:
161 - boost::signal<void()> on_ok;
162 + boost::signals2::signal<void()> on_ok;
163
164 private:
165 MessageBox(const MessageBox&);
166 diff --git a/src/editor/object_selector.cpp b/src/editor/object_selector.cpp
167 index 28e306826..f3a36b5e8 100644
168 --- a/src/editor/object_selector.cpp
169 +++ b/src/editor/object_selector.cpp
170 @@ -16,7 +16,7 @@
171
172 #include "editor/object_selector.hpp"
173
174 -#include <boost/signal.hpp>
175 +#include <boost/signals2.hpp>
176
177 #include "editor/generic_level_obj.hpp"
178 #include "editor/gui_style.hpp"
179 @@ -47,7 +47,7 @@ class ObjectSelectorButton : public GUI::RectComponent
180 std::string tooltip;
181
182 public:
183 - boost::signal<void()> on_click;
184 + boost::signals2::signal<void()> on_click;
185
186 public:
187 ObjectSelectorButton(ObjectSelectorList* object_list_,
188 diff --git a/src/editor/viewport.hpp b/src/editor/viewport.hpp
189 index 1ae9eff7c..18868254d 100644
190 --- a/src/editor/viewport.hpp
191 +++ b/src/editor/viewport.hpp
192 @@ -18,7 +18,7 @@
193 #ifndef HEADER_PINGUS_EDITOR_VIEWPORT_HPP
194 #define HEADER_PINGUS_EDITOR_VIEWPORT_HPP
195
196 -#include <boost/signal.hpp>
197 +#include <boost/signals2.hpp>
198 #include <set>
199
200 #include "editor/selection.hpp"
201 @@ -148,7 +148,7 @@ class Viewport : public GUI::RectComponent
202
203 void clear_selection();
204
205 - boost::signal<void (const Selection&)> selection_changed;
206 + boost::signals2::signal<void (const Selection&)> selection_changed;
207 private:
208 Viewport();
209 Viewport (const Viewport&);
210 diff --git a/src/pingus/components/check_box.hpp b/src/pingus/components/check_box.hpp
211 index 00e23b764..5bef50f6b 100644
212 --- a/src/pingus/components/check_box.hpp
213 +++ b/src/pingus/components/check_box.hpp
214 @@ -17,7 +17,7 @@
215 #ifndef HEADER_PINGUS_PINGUS_COMPONENTS_CHECK_BOX_HPP
216 #define HEADER_PINGUS_PINGUS_COMPONENTS_CHECK_BOX_HPP
217
218 -#include <boost/signal.hpp>
219 +#include <boost/signals2.hpp>
220
221 #include "engine/display/sprite.hpp"
222 #include "engine/gui/rect_component.hpp"
223 @@ -39,7 +39,7 @@ class CheckBox : public GUI::RectComponent
224
225 void set_state(bool v, bool send_signal);
226
227 - boost::signal<void (bool)> on_change;
228 + boost::signals2::signal<void (bool)> on_change;
229
230 private:
231 CheckBox (const CheckBox&);
232 diff --git a/src/pingus/components/choice_box.hpp b/src/pingus/components/choice_box.hpp
233 index 49d6e1948..ef51b6dd2 100644
234 --- a/src/pingus/components/choice_box.hpp
235 +++ b/src/pingus/components/choice_box.hpp
236 @@ -17,7 +17,7 @@
237 #ifndef HEADER_PINGUS_PINGUS_COMPONENTS_CHOICE_BOX_HPP
238 #define HEADER_PINGUS_PINGUS_COMPONENTS_CHOICE_BOX_HPP
239
240 -#include <boost/signal.hpp>
241 +#include <boost/signals2.hpp>
242
243 #include "engine/gui/rect_component.hpp"
244
245 @@ -36,7 +36,7 @@ class ChoiceBox : public GUI::RectComponent
246 void add_choice(const std::string& str);
247 void set_current_choice(int choice);
248
249 - boost::signal<void (std::string)> on_change;
250 + boost::signals2::signal<void (std::string)> on_change;
251
252 private:
253 ChoiceBox (const ChoiceBox&);
254 diff --git a/src/pingus/components/slider_box.hpp b/src/pingus/components/slider_box.hpp
255 index ae4d92406..75118eac2 100644
256 --- a/src/pingus/components/slider_box.hpp
257 +++ b/src/pingus/components/slider_box.hpp
258 @@ -17,7 +17,7 @@
259 #ifndef HEADER_PINGUS_PINGUS_COMPONENTS_SLIDER_BOX_HPP
260 #define HEADER_PINGUS_PINGUS_COMPONENTS_SLIDER_BOX_HPP
261
262 -#include <boost/signal.hpp>
263 +#include <boost/signals2.hpp>
264
265 #include "engine/gui/rect_component.hpp"
266
267 @@ -39,7 +39,7 @@ class SliderBox : public GUI::RectComponent
268
269 void set_value(int v);
270
271 - boost::signal<void (int)> on_change;
272 + boost::signals2::signal<void (int)> on_change;
273
274 private:
275 SliderBox (const SliderBox&);
276 diff --git a/src/pingus/config_manager.hpp b/src/pingus/config_manager.hpp
277 index b07b83e65..4cf08e046 100644
278 --- a/src/pingus/config_manager.hpp
279 +++ b/src/pingus/config_manager.hpp
280 @@ -17,7 +17,7 @@
281 #ifndef HEADER_PINGUS_PINGUS_CONFIG_MANAGER_HPP
282 #define HEADER_PINGUS_PINGUS_CONFIG_MANAGER_HPP
283
284 -#include <boost/signal.hpp>
285 +#include <boost/signals2.hpp>
286
287 #include "math/size.hpp"
288 #include "pingus/options.hpp"
289 @@ -39,55 +39,55 @@ class ConfigManager
290
291 void set_master_volume(int);
292 int get_master_volume() const;
293 - boost::signal<void(int)> on_master_volume_change;
294 + boost::signals2::signal<void(int)> on_master_volume_change;
295
296 void set_sound_volume(int);
297 int get_sound_volume() const;
298 - boost::signal<void(int)> on_sound_volume_change;
299 + boost::signals2::signal<void(int)> on_sound_volume_change;
300
301 void set_music_volume(int);
302 int get_music_volume() const;
303 - boost::signal<void(int)> on_music_volume_change;
304 + boost::signals2::signal<void(int)> on_music_volume_change;
305
306 void set_fullscreen_resolution(const Size& size);
307 Size get_fullscreen_resolution() const;
308 - boost::signal<void(Size)> on_fullscreen_resolution_change;
309 + boost::signals2::signal<void(Size)> on_fullscreen_resolution_change;
310
311 void set_fullscreen(bool);
312 bool get_fullscreen() const;
313 - boost::signal<void(bool)> on_fullscreen_change;
314 + boost::signals2::signal<void(bool)> on_fullscreen_change;
315
316 void set_renderer(FramebufferType type);
317 FramebufferType get_renderer() const;
318 - boost::signal<void(FramebufferType)> on_renderer_change;
319 + boost::signals2::signal<void(FramebufferType)> on_renderer_change;
320
321 void set_resizable(bool);
322 bool get_resizable() const;
323 - boost::signal<void(bool)> on_resizable_change;
324 + boost::signals2::signal<void(bool)> on_resizable_change;
325
326 void set_mouse_grab(bool);
327 bool get_mouse_grab() const;
328 - boost::signal<void(bool)> on_mouse_grab_change;
329 + boost::signals2::signal<void(bool)> on_mouse_grab_change;
330
331 void set_print_fps(bool);
332 bool get_print_fps() const;
333 - boost::signal<void(bool)> on_print_fps_change;
334 + boost::signals2::signal<void(bool)> on_print_fps_change;
335
336 void set_language(const tinygettext::Language&);
337 tinygettext::Language get_language() const;
338 - boost::signal<void(const tinygettext::Language&)> on_language_change;
339 + boost::signals2::signal<void(const tinygettext::Language&)> on_language_change;
340
341 void set_software_cursor(bool);
342 bool get_software_cursor() const;
343 - boost::signal<void(bool)> on_software_cursor_change;
344 + boost::signals2::signal<void(bool)> on_software_cursor_change;
345
346 void set_auto_scrolling(bool);
347 bool get_auto_scrolling() const;
348 - boost::signal<void(bool)> on_auto_scrolling_change;
349 + boost::signals2::signal<void(bool)> on_auto_scrolling_change;
350
351 void set_drag_drop_scrolling(bool);
352 bool get_drag_drop_scrolling() const;
353 - boost::signal<void(bool)> on_drag_drop_scrolling_change;
354 + boost::signals2::signal<void(bool)> on_drag_drop_scrolling_change;
355
356 private:
357 ConfigManager (const ConfigManager&);
358 diff --git a/src/pingus/screens/option_menu.hpp b/src/pingus/screens/option_menu.hpp
359 index 60b1578d2..154ef0f69 100644
360 --- a/src/pingus/screens/option_menu.hpp
361 +++ b/src/pingus/screens/option_menu.hpp
362 @@ -17,7 +17,7 @@
363 #ifndef HEADER_PINGUS_PINGUS_SCREENS_OPTION_MENU_HPP
364 #define HEADER_PINGUS_PINGUS_SCREENS_OPTION_MENU_HPP
365
366 -#include <boost/signals.hpp>
367 +#include <boost/signals2.hpp>
368 #include <map>
369 #include <vector>
370
371 @@ -66,7 +66,7 @@ class OptionMenu : public GUIScreen
372 //Label* defaults_label;
373 //CheckBox* defaults_box;
374
375 - typedef std::vector<boost::signals::connection> Connections;
376 + typedef std::vector<boost::signals2::connection> Connections;
377 Connections connections;
378
379 tinygettext::Language m_language;