Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-arcade/burgerspace/files/, games-arcade/burgerspace/
Date: Fri, 30 Apr 2021 14:54:17
Message-Id: 1619794438.f33eb47dae72ac0a1730563cc7b9bd08cdbce849.soap@gentoo
1 commit: f33eb47dae72ac0a1730563cc7b9bd08cdbce849
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 30 14:53:58 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 30 14:53:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f33eb47d
7
8 games-arcade/burgerspace: Fix building against GCC 11
9
10 Closes: https://bugs.gentoo.org/787131
11 Package-Manager: Portage-3.0.18, Repoman-3.0.3
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 .../burgerspace/burgerspace-1.9.2-r1.ebuild | 2 +
15 .../files/burgerspace-1.9.2-gcc11.patch | 202 +++++++++++++++++++++
16 2 files changed, 204 insertions(+)
17
18 diff --git a/games-arcade/burgerspace/burgerspace-1.9.2-r1.ebuild b/games-arcade/burgerspace/burgerspace-1.9.2-r1.ebuild
19 index 11de206aa18..7ff631c964f 100644
20 --- a/games-arcade/burgerspace/burgerspace-1.9.2-r1.ebuild
21 +++ b/games-arcade/burgerspace/burgerspace-1.9.2-r1.ebuild
22 @@ -19,6 +19,8 @@ RDEPEND=">=dev-games/flatzebra-0.1.6"
23 DEPEND="${RDEPEND}"
24 BDEPEND="virtual/pkgconfig"
25
26 +PATCHES=( "${FILESDIR}"/${PN}-1.9.2-gcc11.patch )
27 +
28 src_prepare() {
29 default
30
31
32 diff --git a/games-arcade/burgerspace/files/burgerspace-1.9.2-gcc11.patch b/games-arcade/burgerspace/files/burgerspace-1.9.2-gcc11.patch
33 new file mode 100644
34 index 00000000000..aea4d2ee318
35 --- /dev/null
36 +++ b/games-arcade/burgerspace/files/burgerspace-1.9.2-gcc11.patch
37 @@ -0,0 +1,202 @@
38 +--- a/src/BurgerSpaceClient.cpp
39 ++++ b/src/BurgerSpaceClient.cpp
40 +@@ -209,7 +209,7 @@
41 +
42 +
43 + void
44 +-BurgerSpaceClient::loadPixmaps() throw(PixmapLoadError)
45 ++BurgerSpaceClient::loadPixmaps()
46 + {
47 + /* Tiles:
48 + */
49 +--- a/src/BurgerSpaceClient.h
50 ++++ b/src/BurgerSpaceClient.h
51 +@@ -177,7 +177,7 @@
52 +
53 + ///////////////////////////////////////////////////////////////////////////
54 +
55 +- void loadPixmaps() throw(flatzebra::PixmapLoadError);
56 ++ void loadPixmaps();
57 + void restoreBackground();
58 + void draw();
59 + void displayMessage(int row, const char *msg);
60 +--- a/src/BurgerSpaceServer.cpp
61 ++++ b/src/BurgerSpaceServer.cpp
62 +@@ -733,7 +733,7 @@
63 +
64 +
65 + BurgerSpaceServer::BurgerSpaceServer(int initLevelNumber,
66 +- bool _oldMotionMode) throw(int, string)
67 ++ bool _oldMotionMode)
68 + : theScreenSizeInPixels(SCREEN_WIDTH_IN_PIXELS, SCREEN_HEIGHT_IN_PIXELS),
69 +
70 + initLevelNo(1),
71 +@@ -830,7 +830,7 @@
72 +
73 +
74 + void
75 +-BurgerSpaceServer::displayErrorMessage(const string &msg) throw()
76 ++BurgerSpaceServer::displayErrorMessage(const string &msg)
77 + {
78 + cerr << msg << endl;
79 + }
80 +@@ -871,7 +871,7 @@
81 +
82 +
83 + void
84 +-BurgerSpaceServer::initializeSprites() throw(PixmapLoadError)
85 ++BurgerSpaceServer::initializeSprites()
86 + /* Initializes the sprites that appear at the beginning of a level,
87 + like the ingredients.
88 +
89 +@@ -930,7 +930,7 @@
90 +
91 +
92 + void
93 +-BurgerSpaceServer::initializeMisc() throw(string)
94 ++BurgerSpaceServer::initializeMisc()
95 + /* Initializes things that need to be initialized once, but not at the
96 + beginning of each level.
97 +
98 +@@ -1160,7 +1160,7 @@
99 +
100 +
101 + void
102 +-BurgerSpaceServer::initNextLevel(int levelNo /*= 0*/) throw(int)
103 ++BurgerSpaceServer::initNextLevel(int levelNo /*= 0*/)
104 + /* Initialize the next level. Increments the current level number if
105 + levelNo is zero, or uses levelNo if it is positive.
106 + */
107 +@@ -2118,7 +2118,7 @@
108 + if (numDirectionsAllowed == 0)
109 + {
110 + belowStructure = true;
111 +- allowedDirections[UP]++;
112 ++ allowedDirections[UP] = true;
113 + }
114 + }
115 +
116 +@@ -2643,7 +2643,7 @@
117 + static void
118 + loadPixmap(const char **xpmData,
119 + SDL_Surface *&pixmap,
120 +- Couple &pixmapSize) throw(PixmapLoadError)
121 ++ Couple &pixmapSize)
122 + {
123 + pixmapSize.zero();
124 +
125 +@@ -2661,7 +2661,6 @@
126 +
127 + static void
128 + loadPixmap(const char **xpmData, PixmapArray &pa, size_t index)
129 +- throw(PixmapLoadError)
130 + {
131 + // Masks are not be relevant with SDL.
132 +
133 +@@ -2674,7 +2673,7 @@
134 +
135 +
136 + void
137 +-BurgerSpaceServer::loadPixmaps() throw(PixmapLoadError)
138 ++BurgerSpaceServer::loadPixmaps()
139 + {
140 + /* Load the player pixmaps:
141 +
142 +@@ -2813,7 +2812,7 @@
143 +
144 +
145 + void
146 +-BurgerSpaceServer::loadLevel(int levelNo) throw(string)
147 ++BurgerSpaceServer::loadLevel(int levelNo)
148 + /* Affects the data member 'theCurrentLevel', which must already be
149 + initialized to defined values.
150 + 'levelNo' may exceed NUM_LEVELS.
151 +--- a/src/BurgerSpaceServer.h
152 ++++ b/src/BurgerSpaceServer.h
153 +@@ -72,7 +72,7 @@
154 + {
155 + public:
156 +
157 +- BurgerSpaceServer(int initLevelNumber, bool _oldMotionMode) throw(int, std::string);
158 ++ BurgerSpaceServer(int initLevelNumber, bool _oldMotionMode);
159 +
160 + void finishInit(); // must be called after constructor -- calls virtual functions
161 +
162 +@@ -355,7 +355,7 @@
163 + void putSprite(const flatzebra::Sprite &s);
164 + void showInstructions();
165 + void initGameParameters();
166 +- void initNextLevel(int levelNo = 0) throw(int);
167 ++ void initNextLevel(int levelNo = 0);
168 + void resetPlay();
169 + int isPositionAtSideOfStructure(flatzebra::Couple pos) const;
170 + void animateTemporarySprites(flatzebra::SpriteList &slist) const;
171 +@@ -369,11 +369,11 @@
172 + bool ingredientGroupCollidesWithSprite(
173 + const flatzebra::Couple groupPos, const flatzebra::Couple groupSize,
174 + const flatzebra::Sprite &s) const;
175 +- void loadLevel(int levelNo) throw(std::string);
176 +- void displayErrorMessage(const std::string &msg) throw();
177 ++ void loadLevel(int levelNo);
178 ++ void displayErrorMessage(const std::string &msg);
179 + void createPlayerSprite();
180 +- void initializeSprites() throw(flatzebra::PixmapLoadError);
181 +- void initializeMisc() throw(std::string);
182 ++ void initializeSprites();
183 ++ void initializeMisc();
184 + void deleteSprite(flatzebra::Sprite *s) const;
185 + void deleteSprites(flatzebra::SpriteList &sl) const;
186 + void deleteSprites(IngredientSprite::List &isl) const;
187 +@@ -386,7 +386,7 @@
188 + size_t carryEnemiesInList(IngredientGroup &g, flatzebra::SpriteList &slist);
189 + size_t releaseCarriedEnemies(IngredientGroup &g);
190 + void createScoreSprites(long n, flatzebra::Couple center);
191 +- void loadPixmaps() throw(flatzebra::PixmapLoadError);
192 ++ void loadPixmaps();
193 + void moveEnemyList(flatzebra::SpriteList &slist, int speedFactor);
194 + flatzebra::Couple getDistanceToPerfectPos(const flatzebra::Sprite &s) const;
195 + bool isSpriteOnFloor(const flatzebra::Sprite &s) const;
196 +--- a/src/EnemySprite.cpp
197 ++++ b/src/EnemySprite.cpp
198 +@@ -29,7 +29,7 @@
199 +
200 + EnemySprite::EnemySprite(const PixmapArray &pa,
201 + Couple pos, Couple speed,
202 +- Couple collBoxPos, Couple collBosSize) throw(int)
203 ++ Couple collBoxPos, Couple collBosSize)
204 + : Sprite(pa, pos, speed, Couple(0, 0), collBoxPos, collBosSize),
205 + carryingGroup(NULL),
206 + disappearanceTime(0),
207 +--- a/src/EnemySprite.h
208 ++++ b/src/EnemySprite.h
209 +@@ -45,7 +45,7 @@
210 + flatzebra::Couple pos,
211 + flatzebra::Couple speed,
212 + flatzebra::Couple collBoxPos,
213 +- flatzebra::Couple collBosSize) throw(int);
214 ++ flatzebra::Couple collBosSize);
215 + /* Calls Sprite constructor.
216 + */
217 +
218 +--- a/src/IngredientSprite.h
219 ++++ b/src/IngredientSprite.h
220 +@@ -42,7 +42,7 @@
221 +
222 + IngredientSprite(const flatzebra::PixmapArray &pixmapArray,
223 + const flatzebra::Couple &pos,
224 +- IngredientGroup *ig) throw(int)
225 ++ IngredientGroup *ig)
226 + : flatzebra::Sprite(pixmapArray, pos,
227 + flatzebra::Couple(0, 0), flatzebra::Couple(0, 0),
228 + flatzebra::Couple(0, 5), flatzebra::Couple(24, 1)),
229 +--- a/src/server.cpp
230 ++++ b/src/server.cpp
231 +@@ -304,7 +304,7 @@
232 + {
233 + public:
234 +
235 +- BurgerSpaceCommandLineServer(int _initLevelNumber, int _sock, Uint32 _minMSBetweenWrites) throw(int, std::string)
236 ++ BurgerSpaceCommandLineServer(int _initLevelNumber, int _sock, Uint32 _minMSBetweenWrites)
237 + : BurgerSpaceServer(_initLevelNumber, false),
238 + sock(_sock),
239 + minMSBetweenWrites(_minMSBetweenWrites),