1 |
commit: 644f1b4a501fc9d3c8767023e6a2bebcae0f145c |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 4 22:49:27 2022 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 4 22:49:27 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=644f1b4a |
7 |
|
8 |
games-engines/odamex: Version bump to 10.0.0, unbundling patches |
9 |
|
10 |
Closes: https://bugs.gentoo.org/833588 |
11 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
12 |
|
13 |
games-engines/odamex/Manifest | 1 + |
14 |
.../odamex/files/odamex-10.0.0-unbundle-fltk.patch | 105 +++++++++++++++++++++ |
15 |
.../files/odamex-10.0.0-unbundle-jsoncpp.patch | 85 +++++++++++++++++ |
16 |
.../files/odamex-10.0.0-unbundle-miniupnpc.patch | 96 +++++++++++++++++++ |
17 |
games-engines/odamex/metadata.xml | 3 +- |
18 |
games-engines/odamex/odamex-10.0.0.ebuild | 90 ++++++++++++++++++ |
19 |
6 files changed, 379 insertions(+), 1 deletion(-) |
20 |
|
21 |
diff --git a/games-engines/odamex/Manifest b/games-engines/odamex/Manifest |
22 |
index 41eaaf581314..b2e65dadb436 100644 |
23 |
--- a/games-engines/odamex/Manifest |
24 |
+++ b/games-engines/odamex/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST odamex-0.9.5.tar.bz2 6659528 BLAKE2B 6f6052aff5a1e0c9a54c417113b67a91044d05ebf13d8ab5fb01132f9bb90b1c97392e881b8bff8baee4621c8e53abbb360fc8c7e6de8ff53d45ee55f73c48ec SHA512 70a0deb5e5b5902620f8fe692dc8507f9f19d7d6afabb4e2efbc25dc6879d469aa250dc55bb165db83a4288af9d5adda72ce3823a3db6dd9ccb83f5c684d3ac8 |
27 |
+DIST odamex-src-10.0.0.tar.xz 17680868 BLAKE2B 95df336ccc24c2658174bdd051cb9b98ca906d653d84a120330d8fe6f11ad91ba70ba7edfc960f8815d02795f7392761a0174171de30ea78b37389a61deacae7 SHA512 b825953a446a4eb46d2d004b20df876bceec823cb5f0bf661ecac03eff2f07c11fe47c6861f3c3ee417ce9ca869474ff422d78bba1b742485315ba5ba86bd702 |
28 |
|
29 |
diff --git a/games-engines/odamex/files/odamex-10.0.0-unbundle-fltk.patch b/games-engines/odamex/files/odamex-10.0.0-unbundle-fltk.patch |
30 |
new file mode 100644 |
31 |
index 000000000000..1c9a8753b44a |
32 |
--- /dev/null |
33 |
+++ b/games-engines/odamex/files/odamex-10.0.0-unbundle-fltk.patch |
34 |
@@ -0,0 +1,105 @@ |
35 |
+From 8a2b7c043fe86916d56044d7489f8dce6ed2d479 Mon Sep 17 00:00:00 2001 |
36 |
+From: James Le Cuirot <chewi@g.o> |
37 |
+Date: Sun, 27 Feb 2022 14:01:33 +0000 |
38 |
+Subject: [PATCH 3/3] Allow building against the system FLTK library |
39 |
+ |
40 |
+`USE_INTERNAL_FLTK` defaults to true and ignores `USE_INTERNAL_LIBS` |
41 |
+because users are unlikely to have it installed. |
42 |
+ |
43 |
+Odamex makes of use screen scaling features in FLTK that have not yet |
44 |
+been released. This change therefore checks for the Fl::screen_scale |
45 |
+symbol and skips the associated code if it is absent. In practise, this |
46 |
+only affects the size of the dialog window on HiDPI screens. The game |
47 |
+window is unaffected. |
48 |
+ |
49 |
+Tested against FLTK 1.3.5 on Gentoo Linux. |
50 |
+ |
51 |
+(cherry picked from commit 656afab54e30598022f4dd2af298cf6a487a1fe1) |
52 |
+--- |
53 |
+ CMakeLists.txt | 1 + |
54 |
+ client/CMakeLists.txt | 23 ++++++++++++++++++++++- |
55 |
+ client/gui/gui_boot.cpp | 2 ++ |
56 |
+ libraries/CMakeLists.txt | 2 +- |
57 |
+ 4 files changed, 26 insertions(+), 2 deletions(-) |
58 |
+ |
59 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
60 |
+index 9353d0c6b..599b6e85b 100644 |
61 |
+--- a/CMakeLists.txt |
62 |
++++ b/CMakeLists.txt |
63 |
+@@ -42,6 +42,7 @@ option(USE_INTERNAL_DEUTEX "Use internal DeuTex" ${USE_INTERNAL_LIBS}) |
64 |
+ cmake_dependent_option( USE_INTERNAL_ZLIB "Use internal zlib" ${USE_INTERNAL_LIBS} BUILD_CLIENT 0 ) |
65 |
+ cmake_dependent_option( USE_INTERNAL_PNG "Use internal libpng" ${USE_INTERNAL_LIBS} BUILD_CLIENT 0 ) |
66 |
+ cmake_dependent_option( USE_INTERNAL_CURL "Use internal libcurl" ${USE_INTERNAL_LIBS} BUILD_CLIENT 0 ) |
67 |
++cmake_dependent_option( USE_INTERNAL_FLTK "Use internal FLTK" 1 BUILD_CLIENT 0 ) |
68 |
+ cmake_dependent_option( USE_INTERNAL_JSONCPP "Use internal JsonCpp" 1 BUILD_SERVER 0 ) |
69 |
+ cmake_dependent_option( USE_INTERNAL_WXWIDGETS "Use internal wxWidgets" ${USE_INTERNAL_LIBS} BUILD_LAUNCHER 0 ) |
70 |
+ cmake_dependent_option( ENABLE_PORTMIDI "Enable portmidi support" 1 BUILD_CLIENT 0 ) |
71 |
+diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt |
72 |
+index bd071a7a5..ff1e72ba3 100644 |
73 |
+--- a/client/CMakeLists.txt |
74 |
++++ b/client/CMakeLists.txt |
75 |
+@@ -206,7 +206,28 @@ if(TARGET SDL2::SDL2 OR TARGET SDL::SDL) |
76 |
+ target_link_libraries(odamex ${PNG_LIBRARY} ${ZLIB_LIBRARY} CURL::libcurl) |
77 |
+ if(NOT GCONSOLE) |
78 |
+ target_include_directories(odamex PRIVATE gui) |
79 |
+- target_link_libraries(odamex fltk fltk_images) |
80 |
++ |
81 |
++ if(USE_INTERNAL_FLTK) |
82 |
++ set(FLTK_LIBRARIES fltk fltk_images) |
83 |
++ set(HAVE_FLTK_SCREEN_SCALE TRUE) |
84 |
++ else() |
85 |
++ set(FLTK_SKIP_OPENGL 1) |
86 |
++ set(FLTK_SKIP_FORMS 1) |
87 |
++ set(FLTK_SKIP_FLUID 1) |
88 |
++ find_package(FLTK REQUIRED) |
89 |
++ target_include_directories(odamex SYSTEM PRIVATE ${FLTK_INCLUDE_DIR}) |
90 |
++ |
91 |
++ include(CheckCXXSymbolExists) |
92 |
++ set(CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR}) |
93 |
++ set(CMAKE_REQUIRED_LIBRARIES ${FLTK_LIBRARIES}) |
94 |
++ check_cxx_symbol_exists(Fl::screen_scale "FL/Fl.H" HAVE_FLTK_SCREEN_SCALE) |
95 |
++ endif() |
96 |
++ |
97 |
++ if(HAVE_FLTK_SCREEN_SCALE) |
98 |
++ target_compile_definitions(odamex PRIVATE HAVE_FLTK_SCREEN_SCALE) |
99 |
++ endif() |
100 |
++ |
101 |
++ target_link_libraries(odamex ${FLTK_LIBRARIES}) |
102 |
+ endif() |
103 |
+ |
104 |
+ if(ENABLE_PORTMIDI) |
105 |
+diff --git a/client/gui/gui_boot.cpp b/client/gui/gui_boot.cpp |
106 |
+index f0a0035d1..834038209 100644 |
107 |
+--- a/client/gui/gui_boot.cpp |
108 |
++++ b/client/gui/gui_boot.cpp |
109 |
+@@ -315,12 +315,14 @@ static BootWindow* MakeBootWindow() |
110 |
+ */ |
111 |
+ std::string GUI_BootWindow() |
112 |
+ { |
113 |
++#ifdef HAVE_FLTK_SCREEN_SCALE |
114 |
+ // Scale according to 1600x900. |
115 |
+ Fl::screen_scale(0, MAX(Fl::h() / 900.0f, 1.0f)); |
116 |
+ |
117 |
+ // This feature is too clever by half, and in my experience just |
118 |
+ // deforms the window. |
119 |
+ Fl::keyboard_screen_scaling(0); |
120 |
++#endif |
121 |
+ |
122 |
+ BootWindow* win = MakeBootWindow(); |
123 |
+ win->initWADDirs(); |
124 |
+diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt |
125 |
+index 493d8f12b..a53441d13 100644 |
126 |
+--- a/libraries/CMakeLists.txt |
127 |
++++ b/libraries/CMakeLists.txt |
128 |
+@@ -255,7 +255,7 @@ endif() |
129 |
+ |
130 |
+ ### FLTK (dep: libpng) ### |
131 |
+ |
132 |
+-if(BUILD_CLIENT) |
133 |
++if(BUILD_CLIENT AND USE_INTERNAL_FLTK) |
134 |
+ message(STATUS "Compiling FLTK...") |
135 |
+ |
136 |
+ set(_FLTK_BUILDGEN_PARAMS |
137 |
+-- |
138 |
+2.34.1 |
139 |
+ |
140 |
|
141 |
diff --git a/games-engines/odamex/files/odamex-10.0.0-unbundle-jsoncpp.patch b/games-engines/odamex/files/odamex-10.0.0-unbundle-jsoncpp.patch |
142 |
new file mode 100644 |
143 |
index 000000000000..9b0d3284dc48 |
144 |
--- /dev/null |
145 |
+++ b/games-engines/odamex/files/odamex-10.0.0-unbundle-jsoncpp.patch |
146 |
@@ -0,0 +1,85 @@ |
147 |
+From c8d1cd6465d8d64a23a111edb5fba67565660fe8 Mon Sep 17 00:00:00 2001 |
148 |
+From: James Le Cuirot <chewi@g.o> |
149 |
+Date: Sun, 27 Feb 2022 22:51:18 +0000 |
150 |
+Subject: [PATCH 2/3] Allow building against the system JsonCpp library |
151 |
+ |
152 |
+`USE_INTERNAL_JSONCPP` defaults to true and ignores `USE_INTERNAL_LIBS` |
153 |
+because users are unlikely to have it installed. |
154 |
+ |
155 |
+More recent versions of JsonCpp require C++11, but Odamex targets C++98 |
156 |
+for compatibility with older platforms. The standard is therefore only |
157 |
+changed to C++11 when `USE_INTERNAL_JSONCPP` is false, and only for the |
158 |
+server where JsonCpp is used. Note that C++11 still works when building |
159 |
+against an older JsonCpp version. |
160 |
+ |
161 |
+Tested against JsonCpp 1.9.5 on Gentoo Linux. |
162 |
+ |
163 |
+Closes: https://github.com/odamex/odamex/issues/261 |
164 |
+(cherry picked from commit 5162c6297c7177af907e5e0502eac9d59ffcc22b) |
165 |
+--- |
166 |
+ CMakeLists.txt | 1 + |
167 |
+ libraries/CMakeLists.txt | 2 +- |
168 |
+ server/CMakeLists.txt | 15 ++++++++++++++- |
169 |
+ 3 files changed, 16 insertions(+), 2 deletions(-) |
170 |
+ |
171 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
172 |
+index c43c9f111..9353d0c6b 100644 |
173 |
+--- a/CMakeLists.txt |
174 |
++++ b/CMakeLists.txt |
175 |
+@@ -42,6 +42,7 @@ option(USE_INTERNAL_DEUTEX "Use internal DeuTex" ${USE_INTERNAL_LIBS}) |
176 |
+ cmake_dependent_option( USE_INTERNAL_ZLIB "Use internal zlib" ${USE_INTERNAL_LIBS} BUILD_CLIENT 0 ) |
177 |
+ cmake_dependent_option( USE_INTERNAL_PNG "Use internal libpng" ${USE_INTERNAL_LIBS} BUILD_CLIENT 0 ) |
178 |
+ cmake_dependent_option( USE_INTERNAL_CURL "Use internal libcurl" ${USE_INTERNAL_LIBS} BUILD_CLIENT 0 ) |
179 |
++cmake_dependent_option( USE_INTERNAL_JSONCPP "Use internal JsonCpp" 1 BUILD_SERVER 0 ) |
180 |
+ cmake_dependent_option( USE_INTERNAL_WXWIDGETS "Use internal wxWidgets" ${USE_INTERNAL_LIBS} BUILD_LAUNCHER 0 ) |
181 |
+ cmake_dependent_option( ENABLE_PORTMIDI "Enable portmidi support" 1 BUILD_CLIENT 0 ) |
182 |
+ cmake_dependent_option( USE_MINIUPNP "Build with UPnP support" 1 BUILD_SERVER 0 ) |
183 |
+diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt |
184 |
+index ae7db4c86..493d8f12b 100644 |
185 |
+--- a/libraries/CMakeLists.txt |
186 |
++++ b/libraries/CMakeLists.txt |
187 |
+@@ -295,7 +295,7 @@ endif() |
188 |
+ |
189 |
+ ### JsonCpp ### |
190 |
+ |
191 |
+-if(BUILD_SERVER) |
192 |
++if(BUILD_SERVER AND USE_INTERNAL_JSONCPP) |
193 |
+ message(STATUS "Compiling JsonCpp...") |
194 |
+ |
195 |
+ # Figure out the correct library path to attach to our imported target |
196 |
+diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt |
197 |
+index 32297080f..a9bf8c44d 100644 |
198 |
+--- a/server/CMakeLists.txt |
199 |
++++ b/server/CMakeLists.txt |
200 |
+@@ -45,7 +45,12 @@ endif() |
201 |
+ add_executable(odasrv |
202 |
+ ${COMMON_SOURCES} ${SERVER_SOURCES} ${SERVER_WIN32_SOURCES}) |
203 |
+ odamex_target_settings(odasrv) |
204 |
+-set_property(TARGET odasrv PROPERTY CXX_STANDARD 98) |
205 |
++ |
206 |
++if(USE_INTERNAL_JSONCPP) |
207 |
++ set_property(TARGET odasrv PROPERTY CXX_STANDARD 98) |
208 |
++else() |
209 |
++ set_property(TARGET odasrv PROPERTY CXX_STANDARD 11) |
210 |
++endif() |
211 |
+ |
212 |
+ target_include_directories(odasrv PRIVATE src) |
213 |
+ if(WIN32) |
214 |
+@@ -53,6 +58,14 @@ if(WIN32) |
215 |
+ endif() |
216 |
+ target_link_libraries(odasrv ZLIB::ZLIB jsoncpp odamex-common odaproto) |
217 |
+ |
218 |
++if(USE_INTERNAL_JSONCPP) |
219 |
++ target_link_libraries(odasrv jsoncpp) |
220 |
++else() |
221 |
++ find_package(PkgConfig REQUIRED) |
222 |
++ pkg_check_modules(JSONCPP jsoncpp REQUIRED IMPORTED_TARGET) |
223 |
++ target_link_libraries(odasrv PkgConfig::JSONCPP) |
224 |
++endif() |
225 |
++ |
226 |
+ if(USE_MINIUPNP) |
227 |
+ if(USE_INTERNAL_MINIUPNP) |
228 |
+ target_link_libraries(odasrv upnpc-static) |
229 |
+-- |
230 |
+2.34.1 |
231 |
+ |
232 |
|
233 |
diff --git a/games-engines/odamex/files/odamex-10.0.0-unbundle-miniupnpc.patch b/games-engines/odamex/files/odamex-10.0.0-unbundle-miniupnpc.patch |
234 |
new file mode 100644 |
235 |
index 000000000000..80b0806e0c11 |
236 |
--- /dev/null |
237 |
+++ b/games-engines/odamex/files/odamex-10.0.0-unbundle-miniupnpc.patch |
238 |
@@ -0,0 +1,96 @@ |
239 |
+From 4e9fec4ce56fda2568a3a656e1f7c59cdbc5fb21 Mon Sep 17 00:00:00 2001 |
240 |
+From: James Le Cuirot <chewi@g.o> |
241 |
+Date: Sun, 20 Feb 2022 11:24:24 +0000 |
242 |
+Subject: [PATCH 1/3] Allow building against the system miniupnpc library |
243 |
+ |
244 |
+`USE_INTERNAL_MINIUPNP` defaults to true and ignores `USE_INTERNAL_LIBS` because |
245 |
+users are unlikely to have it installed. |
246 |
+ |
247 |
+Although miniupnpc uses pkg-config, it doesn't add any include paths to the |
248 |
+flags because it expects your include directives to include the miniupnpc |
249 |
+directory. We should therefore do the same with the internal build so that |
250 |
+either can be used. |
251 |
+ |
252 |
+Bug: https://github.com/odamex/odamex/issues/261 |
253 |
+(cherry picked from commit 1832a4a1c06504de953cdec2413a47ee393101c7) |
254 |
+--- |
255 |
+ CMakeLists.txt | 1 + |
256 |
+ common/i_net.cpp | 7 +++---- |
257 |
+ libraries/CMakeLists.txt | 4 ++-- |
258 |
+ server/CMakeLists.txt | 8 +++++++- |
259 |
+ 4 files changed, 13 insertions(+), 7 deletions(-) |
260 |
+ |
261 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
262 |
+index fd17dd36b..c43c9f111 100644 |
263 |
+--- a/CMakeLists.txt |
264 |
++++ b/CMakeLists.txt |
265 |
+@@ -45,6 +45,7 @@ cmake_dependent_option( USE_INTERNAL_CURL "Use internal libcurl" ${USE_INTERNAL_ |
266 |
+ cmake_dependent_option( USE_INTERNAL_WXWIDGETS "Use internal wxWidgets" ${USE_INTERNAL_LIBS} BUILD_LAUNCHER 0 ) |
267 |
+ cmake_dependent_option( ENABLE_PORTMIDI "Enable portmidi support" 1 BUILD_CLIENT 0 ) |
268 |
+ cmake_dependent_option( USE_MINIUPNP "Build with UPnP support" 1 BUILD_SERVER 0 ) |
269 |
++cmake_dependent_option( USE_INTERNAL_MINIUPNP "Use internal MiniUPnP" 1 USE_MINIUPNP 0 ) |
270 |
+ |
271 |
+ set(PROJECT_COPYRIGHT "2006-2022") |
272 |
+ set(PROJECT_RC_VERSION "10,0,0,0") |
273 |
+diff --git a/common/i_net.cpp b/common/i_net.cpp |
274 |
+index 27b218d0d..dba512346 100644 |
275 |
+--- a/common/i_net.cpp |
276 |
++++ b/common/i_net.cpp |
277 |
+@@ -93,10 +93,9 @@ typedef int SOCKET; |
278 |
+ #include "minilzo.h" |
279 |
+ |
280 |
+ #ifdef ODA_HAVE_MINIUPNP |
281 |
+-#define MINIUPNP_STATICLIB |
282 |
+-#include "miniwget.h" |
283 |
+-#include "miniupnpc.h" |
284 |
+-#include "upnpcommands.h" |
285 |
++#include "miniupnpc/miniwget.h" |
286 |
++#include "miniupnpc/miniupnpc.h" |
287 |
++#include "miniupnpc/upnpcommands.h" |
288 |
+ #endif |
289 |
+ |
290 |
+ unsigned int inet_socket; |
291 |
+diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt |
292 |
+index 1785ed0d8..ae7db4c86 100644 |
293 |
+--- a/libraries/CMakeLists.txt |
294 |
++++ b/libraries/CMakeLists.txt |
295 |
+@@ -350,7 +350,7 @@ endif() |
296 |
+ ### MiniUPnPc ### |
297 |
+ if(BUILD_SERVER AND NOT USE_MINIUPNP) |
298 |
+ message(STATUS "Skipping MiniUPnPc...") |
299 |
+-elseif(BUILD_SERVER AND USE_MINIUPNP) |
300 |
++elseif(BUILD_SERVER AND USE_MINIUPNP AND USE_INTERNAL_MINIUPNP) |
301 |
+ message(STATUS "Compiling MiniUPnPc...") |
302 |
+ |
303 |
+ # Figure out the correct library path to attach to our imported target |
304 |
+@@ -386,7 +386,7 @@ elseif(BUILD_SERVER AND USE_MINIUPNP) |
305 |
+ # Synthesize an imported target that can be linked against. |
306 |
+ add_library(upnpc-static STATIC IMPORTED GLOBAL) |
307 |
+ set_target_properties(upnpc-static PROPERTIES |
308 |
+- INTERFACE_INCLUDE_DIRECTORIES "${MINIUPNPC_INCLUDE_DIR}" |
309 |
++ INTERFACE_COMPILE_DEFINITIONS MINIUPNP_STATICLIB |
310 |
+ IMPORTED_LOCATION ${MINIUPNPC_LIBRARY}) |
311 |
+ if(WIN32) |
312 |
+ set_target_properties(upnpc-static PROPERTIES INTERFACE_LINK_LIBRARIES "ws2_32;iphlpapi") |
313 |
+diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt |
314 |
+index c9fa17b64..32297080f 100644 |
315 |
+--- a/server/CMakeLists.txt |
316 |
++++ b/server/CMakeLists.txt |
317 |
+@@ -54,7 +54,13 @@ endif() |
318 |
+ target_link_libraries(odasrv ZLIB::ZLIB jsoncpp odamex-common odaproto) |
319 |
+ |
320 |
+ if(USE_MINIUPNP) |
321 |
+- target_link_libraries(odasrv upnpc-static) |
322 |
++ if(USE_INTERNAL_MINIUPNP) |
323 |
++ target_link_libraries(odasrv upnpc-static) |
324 |
++ else() |
325 |
++ find_package(PkgConfig REQUIRED) |
326 |
++ pkg_check_modules(MINIUPNPC miniupnpc REQUIRED IMPORTED_TARGET) |
327 |
++ target_link_libraries(odasrv PkgConfig::MINIUPNPC) |
328 |
++ endif() |
329 |
+ endif() |
330 |
+ |
331 |
+ if(WIN32) |
332 |
+-- |
333 |
+2.34.1 |
334 |
+ |
335 |
|
336 |
diff --git a/games-engines/odamex/metadata.xml b/games-engines/odamex/metadata.xml |
337 |
index cb169a6f5bc5..1548d4273e2e 100644 |
338 |
--- a/games-engines/odamex/metadata.xml |
339 |
+++ b/games-engines/odamex/metadata.xml |
340 |
@@ -7,6 +7,7 @@ |
341 |
</maintainer> |
342 |
<use> |
343 |
<flag name="client">Build client target</flag> |
344 |
+ <flag name="hidpi">Use bundled FLTK 1.4, which has better support for HiDPI screens</flag> |
345 |
<flag name="master">Build master server target (advertises odamex server list)</flag> |
346 |
<flag name="odalaunch">Build the wxWidgets based launcher</flag> |
347 |
<flag name="portmidi">Enable PortMidi support</flag> |
348 |
@@ -25,6 +26,6 @@ |
349 |
broader expanse of security features, personal configuration, gameplay |
350 |
options, and editing features. Odamex can run on a wide range of |
351 |
operating systems and hardware, so players should be able to play |
352 |
- on almost any platform. |
353 |
+ on almost any platform. |
354 |
</longdescription> |
355 |
</pkgmetadata> |
356 |
|
357 |
diff --git a/games-engines/odamex/odamex-10.0.0.ebuild b/games-engines/odamex/odamex-10.0.0.ebuild |
358 |
new file mode 100644 |
359 |
index 000000000000..36c7c98744f3 |
360 |
--- /dev/null |
361 |
+++ b/games-engines/odamex/odamex-10.0.0.ebuild |
362 |
@@ -0,0 +1,90 @@ |
363 |
+# Copyright 1999-2022 Gentoo Authors |
364 |
+# Distributed under the terms of the GNU General Public License v2 |
365 |
+ |
366 |
+EAPI=8 |
367 |
+ |
368 |
+WX_GTK_VER="3.0-gtk3" |
369 |
+inherit cmake desktop prefix wxwidgets xdg |
370 |
+ |
371 |
+DESCRIPTION="Online multiplayer free software engine for DOOM" |
372 |
+HOMEPAGE="https://odamex.net/" |
373 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${PN}-src-${PV}.tar.xz" |
374 |
+ |
375 |
+LICENSE="GPL-2+ MIT" |
376 |
+SLOT="0" |
377 |
+KEYWORDS="~amd64 ~arm ~x86" |
378 |
+IUSE="+client hidpi master +odalaunch portmidi server upnp X" |
379 |
+REQUIRED_USE="|| ( client master server )" |
380 |
+ |
381 |
+# protobuf is still bundled. Unfortunately an old version is required for C++98 |
382 |
+# compatibility. We could use C++11, but upstream is concerned about using a |
383 |
+# completely different protobuf version on a multiplayer-focused engine. |
384 |
+ |
385 |
+RDEPEND=" |
386 |
+ client? ( |
387 |
+ media-libs/libpng:0= |
388 |
+ media-libs/libsdl2[joystick,sound,video] |
389 |
+ media-libs/sdl2-mixer |
390 |
+ net-misc/curl |
391 |
+ !hidpi? ( x11-libs/fltk:1 ) |
392 |
+ portmidi? ( media-libs/portmidi ) |
393 |
+ X? ( x11-libs/libX11 ) |
394 |
+ ) |
395 |
+ odalaunch? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) |
396 |
+ server? ( |
397 |
+ dev-libs/jsoncpp:= |
398 |
+ upnp? ( net-libs/miniupnpc:= ) |
399 |
+ )" |
400 |
+DEPEND="${RDEPEND}" |
401 |
+BDEPEND="games-util/deutex" |
402 |
+ |
403 |
+S="${WORKDIR}/${PN}-src-${PV}" |
404 |
+ |
405 |
+PATCHES=( |
406 |
+ "${FILESDIR}"/${PN}-10.0.0-unbundle-miniupnpc.patch |
407 |
+ "${FILESDIR}"/${PN}-10.0.0-unbundle-jsoncpp.patch |
408 |
+ "${FILESDIR}"/${PN}-10.0.0-unbundle-fltk.patch |
409 |
+ "${FILESDIR}"/${PN}-10.0.0-musl.patch |
410 |
+) |
411 |
+ |
412 |
+src_prepare() { |
413 |
+ rm -r libraries/libminiupnpc || die |
414 |
+ hprefixify common/d_main.cpp |
415 |
+ |
416 |
+ use odalaunch && setup-wxwidgets |
417 |
+ |
418 |
+ cmake_src_prepare |
419 |
+} |
420 |
+ |
421 |
+src_configure() { |
422 |
+ local mycmakeargs=( |
423 |
+ -DUSE_INTERNAL_FLTK=$(usex hidpi) |
424 |
+ -DUSE_INTERNAL_JSONCPP=0 |
425 |
+ -DUSE_INTERNAL_LIBS=0 |
426 |
+ -DUSE_INTERNAL_MINIUPNP=0 |
427 |
+ -DBUILD_CLIENT=$(usex client) |
428 |
+ -DBUILD_LAUNCHER=$(usex odalaunch) |
429 |
+ -DBUILD_MASTER=$(usex master) |
430 |
+ -DBUILD_SERVER=$(usex server) |
431 |
+ -DBUILD_OR_FAIL=1 |
432 |
+ -DENABLE_PORTMIDI=$(usex portmidi) |
433 |
+ -DUSE_MINIUPNP=$(usex upnp) |
434 |
+ ) |
435 |
+ use client && mycmakeargs+=(-DCMAKE_DISABLE_FIND_PACKAGE_X11=$(usex !X)) |
436 |
+ |
437 |
+ cmake_src_configure |
438 |
+} |
439 |
+ |
440 |
+src_install() { |
441 |
+ if use client ; then |
442 |
+ newicon -s 128 "${S}/media/icon_${PN}_128.png" "${PN}.png" |
443 |
+ make_desktop_entry "${PN}" "Odamex" |
444 |
+ |
445 |
+ if use odalaunch ; then |
446 |
+ newicon -s 128 "${S}/media/icon_odalaunch_128.png" "odalaunch.png" |
447 |
+ make_desktop_entry odalaunch "Odamex Launcher" odalaunch |
448 |
+ fi |
449 |
+ fi |
450 |
+ |
451 |
+ cmake_src_install |
452 |
+} |