1 |
commit: 687f792527e89fb9d0c80031685c0abc418d80eb |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 29 21:37:22 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 21:42:46 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=687f7925 |
7 |
|
8 |
games-action/openlierox: Add missing DEPEND on x11-proto/xproto |
9 |
|
10 |
Gentoo-bug: 606908 |
11 |
* Also fix building with GCC 6 |
12 |
|
13 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
14 |
|
15 |
.../files/openlierox-0.58_rc3-fix-c++14.patch | 215 +++++++++++++++++++++ |
16 |
.../openlierox/openlierox-0.58_rc3-r1.ebuild | 61 +++--- |
17 |
2 files changed, 243 insertions(+), 33 deletions(-) |
18 |
|
19 |
diff --git a/games-action/openlierox/files/openlierox-0.58_rc3-fix-c++14.patch b/games-action/openlierox/files/openlierox-0.58_rc3-fix-c++14.patch |
20 |
new file mode 100644 |
21 |
index 00000000..a907161 |
22 |
--- /dev/null |
23 |
+++ b/games-action/openlierox/files/openlierox-0.58_rc3-fix-c++14.patch |
24 |
@@ -0,0 +1,215 @@ |
25 |
+static_assert is a reserved keyword in C++14 now. |
26 |
+ |
27 |
+--- a/include/CGameScript.h |
28 |
++++ b/include/CGameScript.h |
29 |
+@@ -40,7 +40,7 @@ |
30 |
+ // current most recent version |
31 |
+ #define GS_VERSION 8 |
32 |
+ |
33 |
+-static_assert(GS_VERSION - GS_FIRST_SUPPORTED_VERSION + 1 == sizeof(GS_MinLxVersion)/sizeof(Version), GS_MinLxVersion__sizecheck); |
34 |
++static_openlierox_assert(GS_VERSION - GS_FIRST_SUPPORTED_VERSION + 1 == sizeof(GS_MinLxVersion)/sizeof(Version), GS_MinLxVersion__sizecheck); |
35 |
+ |
36 |
+ // Error codes |
37 |
+ #define GSE_OK 1 |
38 |
+--- a/include/EndianSwap.h |
39 |
++++ b/include/EndianSwap.h |
40 |
+@@ -23,7 +23,7 @@ |
41 |
+ |
42 |
+ template <int n> |
43 |
+ void ByteSwap(unsigned char * b) { |
44 |
+- static_assert(n == 1 || n % 2 == 0, n_must_be_equal); |
45 |
++ static_openlierox_assert(n == 1 || n % 2 == 0, n_must_be_equal); |
46 |
+ for(int i = 0; i < n/2; ++i) { |
47 |
+ std::swap(b[i], b[n - i - 1]); |
48 |
+ } |
49 |
+@@ -57,8 +57,8 @@ |
50 |
+ |
51 |
+ template <int size, int nmemb, typename T> |
52 |
+ static size_t fwrite_endian_compat_wrapper(FILE* stream, T d) { |
53 |
+- static_assert(nmemb == 1, nmemb__equals1); |
54 |
+- static_assert(size == sizeof(T), size__mismatch); |
55 |
++ static_openlierox_assert(nmemb == 1, nmemb__equals1); |
56 |
++ static_openlierox_assert(size == sizeof(T), size__mismatch); |
57 |
+ EndianSwap(d); |
58 |
+ return fwrite(&d, sizeof(T), 1, stream); |
59 |
+ } |
60 |
+@@ -69,8 +69,8 @@ |
61 |
+ |
62 |
+ template <int size, int nmemb, typename T> |
63 |
+ static size_t fread_compat_wrapper(FILE* stream, T& d) { |
64 |
+- static_assert(nmemb == 1, nmemb__equals1); |
65 |
+- static_assert(size == sizeof(T), size__mismatch); |
66 |
++ static_openlierox_assert(nmemb == 1, nmemb__equals1); |
67 |
++ static_openlierox_assert(size == sizeof(T), size__mismatch); |
68 |
+ return fread(&d, sizeof(T), 1, stream); |
69 |
+ } |
70 |
+ |
71 |
+--- a/include/ProjAction.h |
72 |
++++ b/include/ProjAction.h |
73 |
+@@ -125,7 +125,7 @@ |
74 |
+ __TRL_UBOUND = INT_MAX // force enum to be of size int |
75 |
+ }; |
76 |
+ |
77 |
+-static_assert(sizeof(Proj_TrailType) == sizeof(int), Proj_TrailType__SizeCheck); |
78 |
++static_openlierox_assert(sizeof(Proj_TrailType) == sizeof(int), Proj_TrailType__SizeCheck); |
79 |
+ |
80 |
+ |
81 |
+ struct Proj_Trail { |
82 |
+@@ -176,7 +176,7 @@ |
83 |
+ __PJ_UBOUND = INT_MAX // force enum to be of size int |
84 |
+ }; |
85 |
+ |
86 |
+-static_assert(sizeof(Proj_ActionType) == sizeof(int), Proj_ActionType__SizeCheck); |
87 |
++static_openlierox_assert(sizeof(Proj_ActionType) == sizeof(int), Proj_ActionType__SizeCheck); |
88 |
+ |
89 |
+ |
90 |
+ struct ProjCollisionType; |
91 |
+@@ -379,7 +379,7 @@ |
92 |
+ __PET_LBOUND = INT_MIN, |
93 |
+ __PET_UBOUND = INT_MAX |
94 |
+ } type; |
95 |
+- static_assert(sizeof(Type) == sizeof(int), Proj_Event_Type__SizeCheck); |
96 |
++ static_openlierox_assert(sizeof(Type) == sizeof(int), Proj_Event_Type__SizeCheck); |
97 |
+ |
98 |
+ Proj_Event(Type t = PET_UNSET) : type(t) {} |
99 |
+ Proj_TimerEvent timer; |
100 |
+--- a/include/ProjectileDesc.h |
101 |
++++ b/include/ProjectileDesc.h |
102 |
+@@ -60,7 +60,7 @@ |
103 |
+ ATT_QUADRATIC, // The force fades out using the inverse quadratic function |
104 |
+ }; |
105 |
+ |
106 |
+-static_assert(sizeof(Proj_GfxType) == sizeof(int), Proj_Type__SizeCheck); |
107 |
++static_openlierox_assert(sizeof(Proj_GfxType) == sizeof(int), Proj_Type__SizeCheck); |
108 |
+ |
109 |
+ |
110 |
+ // Animation types |
111 |
+@@ -73,7 +73,7 @@ |
112 |
+ __ANI_UBOUND = INT_MAX, |
113 |
+ }; |
114 |
+ |
115 |
+-static_assert(sizeof(Proj_AnimType) == sizeof(int), Proj_AnimType__SizeCheck); |
116 |
++static_openlierox_assert(sizeof(Proj_AnimType) == sizeof(int), Proj_AnimType__SizeCheck); |
117 |
+ |
118 |
+ |
119 |
+ |
120 |
+--- a/include/StaticAssert.h |
121 |
++++ b/include/StaticAssert.h |
122 |
+@@ -10,11 +10,11 @@ |
123 |
+ #ifndef __OLX__STATICASSERT_H__ |
124 |
+ #define __OLX__STATICASSERT_H__ |
125 |
+ |
126 |
+-template <bool b> class static_assert_failure; |
127 |
+-template <> class static_assert_failure<true> { char foo; }; |
128 |
+-template <int s> class static_assert_test{}; |
129 |
++template <bool b> class static_openlierox_assert_failure; |
130 |
++template <> class static_openlierox_assert_failure<true> { char foo; }; |
131 |
++template <int s> class static_openlierox_assert_test{}; |
132 |
+ |
133 |
+-#define static_assert(X, desc) \ |
134 |
+- typedef static_assert_test< (int)sizeof(static_assert_failure< (bool)(X) >) > static_assert_typedef_##desc; |
135 |
++#define static_openlierox_assert(X, desc) \ |
136 |
++ typedef static_openlierox_assert_test< (int)sizeof(static_openlierox_assert_failure< (bool)(X) >) > static_assert_typedef_##desc; |
137 |
+ |
138 |
+ #endif |
139 |
+--- a/include/WeaponDesc.h |
140 |
++++ b/include/WeaponDesc.h |
141 |
+@@ -34,7 +34,7 @@ |
142 |
+ __WCL_UBOUND = INT_MAX, |
143 |
+ }; |
144 |
+ |
145 |
+-static_assert(sizeof(Wpn_Class) == sizeof(int), Wpn_Class__SizeCheck); |
146 |
++static_openlierox_assert(sizeof(Wpn_Class) == sizeof(int), Wpn_Class__SizeCheck); |
147 |
+ |
148 |
+ // Weapon types |
149 |
+ enum Wpn_Type { |
150 |
+@@ -46,7 +46,7 @@ |
151 |
+ __WPN_UBOUND = INT_MAX |
152 |
+ }; |
153 |
+ |
154 |
+-static_assert(sizeof(Wpn_Type) == sizeof(int), Wpn_Type__SizeCheck); |
155 |
++static_openlierox_assert(sizeof(Wpn_Type) == sizeof(int), Wpn_Type__SizeCheck); |
156 |
+ |
157 |
+ |
158 |
+ // Special Weapons |
159 |
+@@ -58,7 +58,7 @@ |
160 |
+ __SPC_UBOUND = INT_MAX |
161 |
+ }; |
162 |
+ |
163 |
+-static_assert(sizeof(Wpn_Special) == sizeof(int), Wpn_Special__SizeCheck); |
164 |
++static_openlierox_assert(sizeof(Wpn_Special) == sizeof(int), Wpn_Special__SizeCheck); |
165 |
+ |
166 |
+ |
167 |
+ |
168 |
+--- a/src/client/DeprecatedGUI/Menu_FloatingOptions.cpp |
169 |
++++ b/src/client/DeprecatedGUI/Menu_FloatingOptions.cpp |
170 |
+@@ -134,7 +134,7 @@ |
171 |
+ }; |
172 |
+ |
173 |
+ static const int sFloatingOpt_InputNames__size = sizeof(sFloatingOpt_InputNames) / sizeof(std::string); |
174 |
+-static_assert( sFloatingOpt_InputNames__size == __SIN_PLY_BOTTOM - 5, inputopts__sizecheck ); |
175 |
++static_openlierox_assert( sFloatingOpt_InputNames__size == __SIN_PLY_BOTTOM - 5, inputopts__sizecheck ); |
176 |
+ |
177 |
+ |
178 |
+ /////////////////// |
179 |
+--- a/src/client/Options.cpp |
180 |
++++ b/src/client/Options.cpp |
181 |
+@@ -51,11 +51,11 @@ |
182 |
+ const std::string gen_keys[] = {"Chat", "ShowScore", "ShowHealth", "ShowSettings", "TakeScreenshot", "ViewportManager", "SwitchMode", "ToggleTopBar", "TeamChat", "IrcChat", "Console"}; |
183 |
+ const std::string gen_def[] = {"i", "tab", "h", "space", "F12", "F2", "F5", "F8", "o", "F4", "F3"}; |
184 |
+ |
185 |
+-static_assert( sizeof(ply_keys) / sizeof(std::string) == __SIN_PLY_BOTTOM, ply_keys__sizecheck ); |
186 |
+-static_assert( sizeof(ply_def1) / sizeof(std::string) == __SIN_PLY_BOTTOM, ply_def1__sizecheck ); |
187 |
+-static_assert( sizeof(ply_def2) / sizeof(std::string) == __SIN_PLY_BOTTOM, ply_def2__sizecheck ); |
188 |
+-static_assert( sizeof(gen_keys) / sizeof(std::string) == __SIN_GENERAL_BOTTOM, gen_keys__sizecheck ); |
189 |
+-static_assert( sizeof(gen_def) / sizeof(std::string) == __SIN_GENERAL_BOTTOM, gen_def__sizecheck ); |
190 |
++static_openlierox_assert( sizeof(ply_keys) / sizeof(std::string) == __SIN_PLY_BOTTOM, ply_keys__sizecheck ); |
191 |
++static_openlierox_assert( sizeof(ply_def1) / sizeof(std::string) == __SIN_PLY_BOTTOM, ply_def1__sizecheck ); |
192 |
++static_openlierox_assert( sizeof(ply_def2) / sizeof(std::string) == __SIN_PLY_BOTTOM, ply_def2__sizecheck ); |
193 |
++static_openlierox_assert( sizeof(gen_keys) / sizeof(std::string) == __SIN_GENERAL_BOTTOM, gen_keys__sizecheck ); |
194 |
++static_openlierox_assert( sizeof(gen_def) / sizeof(std::string) == __SIN_GENERAL_BOTTOM, gen_def__sizecheck ); |
195 |
+ |
196 |
+ static const Version defaultMinVersion("OpenLieroX/0.58_rc1"); |
197 |
+ |
198 |
+--- a/src/common/CScriptableVars.cpp |
199 |
++++ b/src/common/CScriptableVars.cpp |
200 |
+@@ -32,7 +32,7 @@ |
201 |
+ {"Race", "Race gamemode settings"}, |
202 |
+ }; |
203 |
+ |
204 |
+-static_assert( sizeof(GameInfoGroupDescriptions) / (sizeof(char*) * 2) == GIG_Size, GIG_desc__sizecheck ); |
205 |
++static_openlierox_assert( sizeof(GameInfoGroupDescriptions) / (sizeof(char*) * 2) == GIG_Size, GIG_desc__sizecheck ); |
206 |
+ |
207 |
+ |
208 |
+ std::string AdvancedLevelDescription(AdvancedLevel l) { |
209 |
+--- a/src/common/FeatureList.cpp |
210 |
++++ b/src/common/FeatureList.cpp |
211 |
+@@ -114,7 +114,7 @@ |
212 |
+ Feature::Unset() |
213 |
+ }; |
214 |
+ |
215 |
+-static_assert(__FTI_BOTTOM == sizeof(featureArray)/sizeof(Feature) - 1, featureArray__sizecheck); |
216 |
++static_openlierox_assert(__FTI_BOTTOM == sizeof(featureArray)/sizeof(Feature) - 1, featureArray__sizecheck); |
217 |
+ |
218 |
+ |
219 |
+ |
220 |
+--- a/src/main.cpp |
221 |
++++ b/src/main.cpp |
222 |
+@@ -135,12 +135,12 @@ |
223 |
+ static void DoSystemChecks() { |
224 |
+ // sadly, these sizeof are directly used in CGameScript.cpp/CMap.cpp |
225 |
+ // TODO: fix this issue |
226 |
+- static_assert(sizeof(char) == 1, sizeof_char__equals1); |
227 |
+- static_assert(sizeof(short) == 2, sizeof_short__equals2); |
228 |
+- static_assert(sizeof(int) == 4, sizeof_int__equals4); |
229 |
+- static_assert(sizeof(float) == 4, sizeof_float__equals4); |
230 |
++ static_openlierox_assert(sizeof(char) == 1, sizeof_char__equals1); |
231 |
++ static_openlierox_assert(sizeof(short) == 2, sizeof_short__equals2); |
232 |
++ static_openlierox_assert(sizeof(int) == 4, sizeof_int__equals4); |
233 |
++ static_openlierox_assert(sizeof(float) == 4, sizeof_float__equals4); |
234 |
+ // sometimes the return value of SendMessage is used as a pointer |
235 |
+- static_assert(sizeof(DWORD) == sizeof(void*), sizeof_dword__equals_p); |
236 |
++ static_openlierox_assert(sizeof(DWORD) == sizeof(void*), sizeof_dword__equals_p); |
237 |
+ } |
238 |
+ |
239 |
+ |
240 |
|
241 |
diff --git a/games-action/openlierox/openlierox-0.58_rc3-r1.ebuild b/games-action/openlierox/openlierox-0.58_rc3-r1.ebuild |
242 |
index a9fd8f9..b820b7e 100644 |
243 |
--- a/games-action/openlierox/openlierox-0.58_rc3-r1.ebuild |
244 |
+++ b/games-action/openlierox/openlierox-0.58_rc3-r1.ebuild |
245 |
@@ -8,6 +8,7 @@ inherit cmake-utils eutils |
246 |
|
247 |
MY_PN="OpenLieroX" |
248 |
MY_P="${MY_PN}_${PV}" |
249 |
+ |
250 |
DESCRIPTION="Real-time excessive Worms-clone" |
251 |
HOMEPAGE="http://openlierox.sourceforge.net/" |
252 |
SRC_URI="mirror://sourceforge/openlierox/${MY_P}.src.tar.bz2" |
253 |
@@ -17,56 +18,50 @@ SLOT="0" |
254 |
KEYWORDS="amd64 x86" |
255 |
IUSE="X breakpad debug joystick" |
256 |
|
257 |
-RDEPEND="media-libs/sdl-mixer |
258 |
- media-libs/sdl-image |
259 |
- media-libs/gd[jpeg,png] |
260 |
+RDEPEND=" |
261 |
dev-libs/libxml2 |
262 |
- dev-libs/libzip |
263 |
+ dev-libs/libzip:= |
264 |
+ media-libs/gd:=[jpeg,png] |
265 |
+ media-libs/libsdl[joystick?,X?] |
266 |
+ media-libs/sdl-image |
267 |
+ media-libs/sdl-mixer |
268 |
net-misc/curl |
269 |
- joystick? ( media-libs/libsdl[joystick] ) |
270 |
- !joystick? ( media-libs/libsdl ) |
271 |
- X? ( x11-libs/libX11 |
272 |
- media-libs/libsdl[X] ) |
273 |
- !X? ( media-libs/libsdl )" |
274 |
-DEPEND="${RDEPEND}" |
275 |
+ X? ( x11-libs/libX11 )" |
276 |
+DEPEND="${RDEPEND} |
277 |
+ X? ( x11-proto/xproto )" |
278 |
|
279 |
S="${WORKDIR}/${MY_PN}" |
280 |
|
281 |
-src_prepare() { |
282 |
- epatch "${FILESDIR}"/${PN}-0.58_rc1-icu.patch \ |
283 |
- "${FILESDIR}"/${PN}-0.58_rc1-curl.patch |
284 |
- eapply_user |
285 |
-} |
286 |
+PATCHES=( |
287 |
+ "${FILESDIR}"/${PN}-0.58_rc1-icu.patch |
288 |
+ "${FILESDIR}"/${PN}-0.58_rc1-curl.patch |
289 |
+ "${FILESDIR}"/${PN}-0.58_rc3-fix-c++14.patch |
290 |
+) |
291 |
|
292 |
src_configure() { |
293 |
local mycmakeargs=( |
294 |
- -D DEBUG=$(usex debug) |
295 |
- -D X11=$(usex X) |
296 |
- -D BREAKPAD=$(usex breakpad Yes No) |
297 |
- -D DISABLE_JOYSTICK=$(usex joystick No Yes) |
298 |
- -D SYSTEM_DATA_DIR=/usr/share |
299 |
- -D VERSION=${PV} |
300 |
+ -DDEBUG=$(usex debug) |
301 |
+ -DX11=$(usex X) |
302 |
+ -DBREAKPAD=$(usex breakpad) |
303 |
+ -DDISABLE_JOYSTICK=$(usex !joystick) |
304 |
+ -DSYSTEM_DATA_DIR=usr/share |
305 |
+ -DVERSION=${PV} |
306 |
) |
307 |
- |
308 |
cmake-utils_src_configure |
309 |
} |
310 |
|
311 |
-src_compile() { |
312 |
- cmake-utils_src_compile |
313 |
-} |
314 |
- |
315 |
src_install() { |
316 |
# NOTE: App uses case-insensitive file-handling |
317 |
- insinto /usr/share/${PN}/ |
318 |
- doins -r share/gamedir/* |
319 |
+ dobin "${CMAKE_BUILD_DIR}"/bin/openlierox |
320 |
+ |
321 |
+ insinto /usr/share/${PN} |
322 |
+ doins -r share/gamedir/. |
323 |
|
324 |
- dodoc doc/{README,ChangeLog,Development,TODO} |
325 |
- insinto /usr/share/doc/"${PF}" |
326 |
- doins -r doc/original_lx_docs |
327 |
+ DOCS=( doc/{README,ChangeLog,Development,TODO,original_lx_docs/*.txt} ) |
328 |
+ HTML_DOCS=( doc/original_lx_docs/{*.html,images} ) |
329 |
+ einstalldocs |
330 |
|
331 |
doicon share/OpenLieroX.* |
332 |
make_desktop_entry openlierox OpenLieroX OpenLieroX \ |
333 |
"Game;ActionGame;ArcadeGame;" |
334 |
- |
335 |
- dobin "${CMAKE_BUILD_DIR}"/bin/openlierox |
336 |
} |