1 |
commit: 288360dc7ce2f968a2f12099edeace3f3ed1a705 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 2 20:59:21 2021 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 2 20:59:21 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=288360dc |
7 |
|
8 |
games-action/supertuxkart: Fix build with latest SDL2 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/761814 |
11 |
Package-Manager: Portage-3.0.12, Repoman-3.0.1 |
12 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
13 |
|
14 |
.../files/supertuxkart-1.2-new-sdl.patch | 106 +++++++++++++++++++++ |
15 |
games-action/supertuxkart/supertuxkart-1.2.ebuild | 3 +- |
16 |
2 files changed, 108 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/games-action/supertuxkart/files/supertuxkart-1.2-new-sdl.patch b/games-action/supertuxkart/files/supertuxkart-1.2-new-sdl.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..973c75d010f |
21 |
--- /dev/null |
22 |
+++ b/games-action/supertuxkart/files/supertuxkart-1.2-new-sdl.patch |
23 |
@@ -0,0 +1,106 @@ |
24 |
+From 61833c9c26da5520f2eaa02f2458971ba07f2aad Mon Sep 17 00:00:00 2001 |
25 |
+From: Benau <Benau@××××××××××××××××××××.com> |
26 |
+Date: Sun, 29 Nov 2020 12:42:11 +0800 |
27 |
+Subject: [PATCH] Fix compilation with latest SDL |
28 |
+ |
29 |
+--- |
30 |
+ src/input/gamepad_config.cpp | 55 ++++++++++++++++++------------------ |
31 |
+ 1 file changed, 27 insertions(+), 28 deletions(-) |
32 |
+ |
33 |
+diff --git a/src/input/gamepad_config.cpp b/src/input/gamepad_config.cpp |
34 |
+index 7c6f632099..c060e7a5a7 100644 |
35 |
+--- a/src/input/gamepad_config.cpp |
36 |
++++ b/src/input/gamepad_config.cpp |
37 |
+@@ -32,8 +32,7 @@ |
38 |
+ #include "input/sdl_controller.hpp" |
39 |
+ #include <array> |
40 |
+ |
41 |
+-static_assert(SDL_CONTROLLER_BUTTON_MAX - 1 == SDL_CONTROLLER_BUTTON_DPAD_RIGHT, "non continous name"); |
42 |
+-enum AxisWithDirection |
43 |
++enum AxisWithDirection : unsigned |
44 |
+ { |
45 |
+ SDL_CONTROLLER_AXIS_LEFTX_RIGHT = SDL_CONTROLLER_BUTTON_MAX, |
46 |
+ SDL_CONTROLLER_AXIS_LEFTX_LEFT, |
47 |
+@@ -140,56 +139,56 @@ void GamepadConfig::setDefaultBinds () |
48 |
+ core::stringw GamepadConfig::getBindingAsString(const PlayerAction action) const |
49 |
+ { |
50 |
+ #ifndef SERVER_ONLY |
51 |
+- std::array<core::stringw, SDL_CONTROLLER_AXIS_WITH_DIRECTION_AND_BUTTON_MAX> readable = |
52 |
++ std::map<unsigned, core::stringw> readable = |
53 |
+ {{ |
54 |
+- "A", // SDL_CONTROLLER_BUTTON_A |
55 |
+- "B", // SDL_CONTROLLER_BUTTON_B |
56 |
+- "X", // SDL_CONTROLLER_BUTTON_X |
57 |
+- "Y", // SDL_CONTROLLER_BUTTON_Y |
58 |
++ { SDL_CONTROLLER_BUTTON_A, "A" }, |
59 |
++ { SDL_CONTROLLER_BUTTON_B, "B" }, |
60 |
++ { SDL_CONTROLLER_BUTTON_X, "X" }, |
61 |
++ { SDL_CONTROLLER_BUTTON_Y, "Y" }, |
62 |
+ // I18N: name of buttons on gamepads |
63 |
+- _("Back"), // SDL_CONTROLLER_BUTTON_BACK |
64 |
++ { SDL_CONTROLLER_BUTTON_BACK, _("Back") }, |
65 |
+ // I18N: name of buttons on gamepads |
66 |
+- _("Guide"), // SDL_CONTROLLER_BUTTON_GUIDE |
67 |
++ { SDL_CONTROLLER_BUTTON_GUIDE, _("Guide") }, |
68 |
+ // I18N: name of buttons on gamepads |
69 |
+- _("Start"), // SDL_CONTROLLER_BUTTON_START |
70 |
++ { SDL_CONTROLLER_BUTTON_START, _("Start") }, |
71 |
+ // I18N: name of buttons on gamepads |
72 |
+- _("Left thumbstick press"), // SDL_CONTROLLER_BUTTON_LEFTSTICK |
73 |
++ { SDL_CONTROLLER_BUTTON_LEFTSTICK, _("Left thumbstick press") }, |
74 |
+ // I18N: name of buttons on gamepads |
75 |
+- _("Right thumbstick press"), // SDL_CONTROLLER_BUTTON_RIGHTSTICK |
76 |
++ { SDL_CONTROLLER_BUTTON_RIGHTSTICK, _("Right thumbstick press") }, |
77 |
+ // I18N: name of buttons on gamepads |
78 |
+- _("Left shoulder"), // SDL_CONTROLLER_BUTTON_LEFTSHOULDER |
79 |
++ { SDL_CONTROLLER_BUTTON_LEFTSHOULDER, _("Left shoulder") }, |
80 |
+ // I18N: name of buttons on gamepads |
81 |
+- _("Right shoulder"), // SDL_CONTROLLER_BUTTON_RIGHTSHOULDER |
82 |
++ { SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, _("Right shoulder") }, |
83 |
+ // I18N: name of buttons on gamepads |
84 |
+- _("DPad up"), // SDL_CONTROLLER_BUTTON_DPAD_UP |
85 |
++ { SDL_CONTROLLER_BUTTON_DPAD_UP, _("DPad up") }, |
86 |
+ // I18N: name of buttons on gamepads |
87 |
+- _("DPad down"), // SDL_CONTROLLER_BUTTON_DPAD_DOWN |
88 |
++ { SDL_CONTROLLER_BUTTON_DPAD_DOWN, _("DPad down") }, |
89 |
+ // I18N: name of buttons on gamepads |
90 |
+- _("DPad left"), // SDL_CONTROLLER_BUTTON_DPAD_LEFT |
91 |
++ { SDL_CONTROLLER_BUTTON_DPAD_LEFT, _("DPad left") }, |
92 |
+ // I18N: name of buttons on gamepads |
93 |
+- _("DPad right"), // SDL_CONTROLLER_BUTTON_DPAD_RIGHT |
94 |
++ { SDL_CONTROLLER_BUTTON_DPAD_RIGHT, _("DPad right") }, |
95 |
+ |
96 |
+ // Below are extensions after SDL2 header SDL_CONTROLLER_BUTTON_MAX |
97 |
+ // I18N: name of buttons on gamepads |
98 |
+- _("Left thumbstick right"), // SDL_CONTROLLER_AXIS_LEFTX_RIGHT |
99 |
++ { SDL_CONTROLLER_AXIS_LEFTX_RIGHT, _("Left thumbstick right") }, |
100 |
+ // I18N: name of buttons on gamepads |
101 |
+- _("Left thumbstick left"), // SDL_CONTROLLER_AXIS_LEFTX_LEFT |
102 |
++ { SDL_CONTROLLER_AXIS_LEFTX_LEFT, _("Left thumbstick left") }, |
103 |
+ // I18N: name of buttons on gamepads |
104 |
+- _("Left thumbstick down"), // SDL_CONTROLLER_AXIS_LEFTY_DOWN |
105 |
++ { SDL_CONTROLLER_AXIS_LEFTY_DOWN, _("Left thumbstick down") }, |
106 |
+ // I18N: name of buttons on gamepads |
107 |
+- _("Left thumbstick up"), // SDL_CONTROLLER_AXIS_LEFTY_UP |
108 |
++ { SDL_CONTROLLER_AXIS_LEFTY_UP, _("Left thumbstick up") }, |
109 |
+ // I18N: name of buttons on gamepads |
110 |
+- _("Right thumbstick right"), // SDL_CONTROLLER_AXIS_RIGHTX_RIGHT |
111 |
++ { SDL_CONTROLLER_AXIS_RIGHTX_RIGHT, _("Right thumbstick right") }, |
112 |
+ // I18N: name of buttons on gamepads |
113 |
+- _("Right thumbstick left"), // SDL_CONTROLLER_AXIS_RIGHTX_LEFT |
114 |
++ { SDL_CONTROLLER_AXIS_RIGHTX_LEFT, _("Right thumbstick left") }, |
115 |
+ // I18N: name of buttons on gamepads |
116 |
+- _("Right thumbstick down"), // SDL_CONTROLLER_AXIS_RIGHTY_DOWN |
117 |
++ { SDL_CONTROLLER_AXIS_RIGHTY_DOWN, _("Right thumbstick down") }, |
118 |
+ // I18N: name of buttons on gamepads |
119 |
+- _("Right thumbstick up"), // SDL_CONTROLLER_AXIS_RIGHTY_UP |
120 |
++ { SDL_CONTROLLER_AXIS_RIGHTY_UP, _("Right thumbstick up") }, |
121 |
+ // I18N: name of buttons on gamepads |
122 |
+- _("Left trigger"), // SDL_CONTROLLER_AXIS_TRIGGERLEFT_UP |
123 |
++ { SDL_CONTROLLER_AXIS_TRIGGERLEFT_UP, _("Left trigger") }, |
124 |
+ // I18N: name of buttons on gamepads |
125 |
+- _("Right trigger") // SDL_CONTROLLER_AXIS_TRIGGERRIGHT_UP |
126 |
++ { SDL_CONTROLLER_AXIS_TRIGGERRIGHT_UP, _("Right trigger") } |
127 |
+ }}; |
128 |
+ |
129 |
+ const Binding &b = getBinding(action); |
130 |
|
131 |
diff --git a/games-action/supertuxkart/supertuxkart-1.2.ebuild b/games-action/supertuxkart/supertuxkart-1.2.ebuild |
132 |
index 5e9aa59fdef..fc674824ebb 100644 |
133 |
--- a/games-action/supertuxkart/supertuxkart-1.2.ebuild |
134 |
+++ b/games-action/supertuxkart/supertuxkart-1.2.ebuild |
135 |
@@ -1,4 +1,4 @@ |
136 |
-# Copyright 1999-2020 Gentoo Authors |
137 |
+# Copyright 1999-2021 Gentoo Authors |
138 |
# Distributed under the terms of the GNU General Public License v2 |
139 |
|
140 |
EAPI=7 |
141 |
@@ -57,6 +57,7 @@ S="${WORKDIR}/${MY_P}" |
142 |
PATCHES=( |
143 |
"${FILESDIR}"/${PN}-1.1-irrlicht-arch-support.patch |
144 |
"${FILESDIR}"/${PN}-1.2-irrlicht-system-libs.patch |
145 |
+ "${FILESDIR}"/${P}-new-sdl.patch |
146 |
) |
147 |
|
148 |
src_prepare() { |