Gentoo Archives: gentoo-commits

From: "Julian Ospald (hasufell)" <hasufell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-engines/odamex/files: 4-odamex-0.7.0-odalauncher-bin-path.patch 3-odamex-0.7.0-wad-search-path.patch odamex-0.7.0-miniupnpc.patch 1-odamex-0.7.0-install-rules.patch 2-odamex-0.7.0-cmake-options.patch
Date: Thu, 27 Mar 2014 21:20:57
Message-Id: 20140327212052.AC4122004F@flycatcher.gentoo.org
1 hasufell 14/03/27 21:20:52
2
3 Added: 4-odamex-0.7.0-odalauncher-bin-path.patch
4 3-odamex-0.7.0-wad-search-path.patch
5 odamex-0.7.0-miniupnpc.patch
6 1-odamex-0.7.0-install-rules.patch
7 2-odamex-0.7.0-cmake-options.patch
8 Log:
9 version bump
10
11 (Portage version: 2.2.9-r1/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
12
13 Revision Changes Path
14 1.1 games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch?rev=1.1&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch?rev=1.1&content-type=text/plain
18
19 Index: 4-odamex-0.7.0-odalauncher-bin-path.patch
20 ===================================================================
21 From 672b2e61f3c0347c29746a4a22fe3ab912e88d62 Mon Sep 17 00:00:00 2001
22 From: hasufell <hasufell@g.o>
23 Date: Thu, 27 Mar 2014 21:19:48 +0100
24 Subject: [PATCH 4/4] use CMAKE_BINDIR as default bin patch in odalauncher
25
26 ---
27 config.h.in | 1 +
28 odalaunch/src/dlg_main.cpp | 6 +++++-
29 2 files changed, 6 insertions(+), 1 deletion(-)
30
31 diff --git a/config.h.in b/config.h.in
32 index e91b3a6..7019a02 100644
33 --- a/config.h.in
34 +++ b/config.h.in
35 @@ -2,5 +2,6 @@
36 #define CONFIG_H
37
38 #define CMAKE_WADDIR "@CMAKE_INSTALL_DATADIR@"
39 +#define CMAKE_BINDIR "@CMAKE_INSTALL_BINDIR@"
40
41 #endif
42 diff --git a/odalaunch/src/dlg_main.cpp b/odalaunch/src/dlg_main.cpp
43 index a95a5f6..abbfc0a 100644
44 --- a/odalaunch/src/dlg_main.cpp
45 +++ b/odalaunch/src/dlg_main.cpp
46 @@ -27,6 +27,7 @@
47 #include "str_utils.h"
48
49 #include "md5.h"
50 +#include "config.h"
51
52 #include <wx/settings.h>
53 #include <wx/menu.h>
54 @@ -42,6 +43,7 @@
55 #include <wx/process.h>
56 #include <wx/toolbar.h>
57 #include <wx/xrc/xmlres.h>
58 +#include <wx/string.h>
59 #include <wx/cmdline.h>
60
61 #ifdef __WXMSW__
62 @@ -205,10 +207,12 @@ dlgMain::dlgMain(wxWindow* parent, wxWindowID id)
63 }
64 #endif
65
66 + const char *cmake_bindir_str = CMAKE_BINDIR;
67 + wxString cmake_bindir = wxString::FromAscii(cmake_bindir_str);
68 launchercfg_s.get_list_on_start = 1;
69 launchercfg_s.show_blocked_servers = 0;
70 launchercfg_s.wad_paths = wxGetCwd();
71 - launchercfg_s.odamex_directory = wxGetCwd();
72 + launchercfg_s.odamex_directory = cmake_bindir;
73
74 m_LstCtrlServers = XRCCTRL(*this, "Id_LstCtrlServers", LstOdaServerList);
75 m_LstCtrlPlayers = XRCCTRL(*this, "Id_LstCtrlPlayers", LstOdaPlayerList);
76 --
77 1.9.1
78
79
80
81
82 1.1 games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch
83
84 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch?rev=1.1&view=markup
85 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch?rev=1.1&content-type=text/plain
86
87 Index: 3-odamex-0.7.0-wad-search-path.patch
88 ===================================================================
89 From 9af4e992ff9fa10816beba36478c711ac2c8542a Mon Sep 17 00:00:00 2001
90 From: hasufell <hasufell@g.o>
91 Date: Thu, 27 Mar 2014 21:17:21 +0100
92 Subject: [PATCH 3/4] add odamex.wad install destination to wad search path
93
94 ---
95 CMakeLists.txt | 9 +++++++++
96 common/d_main.cpp | 2 ++
97 config.h.in | 6 ++++++
98 3 files changed, 17 insertions(+)
99 create mode 100644 config.h.in
100
101 diff --git a/CMakeLists.txt b/CMakeLists.txt
102 index 91d5c50..a06613e 100644
103 --- a/CMakeLists.txt
104 +++ b/CMakeLists.txt
105 @@ -13,6 +13,15 @@
106
107 set(PROJECT_VERSION 0.7.0)
108 set(PROJECT_COPYRIGHT "2006-2014")
109 +
110 +configure_file (
111 + "${PROJECT_SOURCE_DIR}/config.h.in"
112 + "${PROJECT_BINARY_DIR}/config.h"
113 + )
114 +
115 +include_directories(
116 + ${PROJECT_BINARY_DIR}
117 +)
118
119 # Default build type
120 if(NOT MSVC)
121 diff --git a/common/d_main.cpp b/common/d_main.cpp
122 index 31d4f59..be0ffd2 100644
123 --- a/common/d_main.cpp
124 +++ b/common/d_main.cpp
125 @@ -23,6 +23,7 @@
126 //-----------------------------------------------------------------------------
127
128 #include "version.h"
129 +#include "config.h"
130
131 #include <sstream>
132 #include <string>
133 @@ -506,6 +507,7 @@ static std::string BaseFileSearch(std::string file, std::string ext = "", std::s
134 D_AddSearchDir(dirs, getenv("DOOMWADDIR"), separator);
135 D_AddSearchDir(dirs, getenv("DOOMWADPATH"), separator);
136 D_AddSearchDir(dirs, getenv("HOME"), separator);
137 + D_AddSearchDir(dirs, CMAKE_WADDIR, separator);
138
139 // [AM] Search additional paths based on platform
140 D_AddPlatformSearchDirs(dirs);
141 diff --git a/config.h.in b/config.h.in
142 new file mode 100644
143 index 0000000..e91b3a6
144 --- /dev/null
145 +++ b/config.h.in
146 @@ -0,0 +1,6 @@
147 +#ifndef CONFIG_H
148 +#define CONFIG_H
149 +
150 +#define CMAKE_WADDIR "@CMAKE_INSTALL_DATADIR@"
151 +
152 +#endif
153 --
154 1.9.1
155
156
157
158
159 1.1 games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch
160
161 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch?rev=1.1&view=markup
162 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch?rev=1.1&content-type=text/plain
163
164 Index: odamex-0.7.0-miniupnpc.patch
165 ===================================================================
166 From: Julian Ospald <hasufell@g.o>
167 Date: Thu Mar 27 21:16:02 UTC 2014
168 Subject: unbundle miniupnpc
169
170 --- a/server/CMakeLists.txt
171 +++ b/server/CMakeLists.txt
172 @@ -29,8 +29,7 @@
173 set(JSONCPP_SOURCE ${JSONCPP_DIR}/jsoncpp.cpp)
174
175 # MiniUPnPc
176 -set(MINIUPNPC_DIR ../libraries/libminiupnpc)
177 -set(MINIUPNPC_STATIC_LIBRARIES upnpc-static)
178 +set(MINIUPNPC_DIR /usr/include/miniupnpc)
179
180 # Platform definitions
181 define_platform()
182 @@ -54,7 +53,7 @@
183 ${COMMON_SOURCES} ${COMMON_HEADERS}
184 ${SERVER_SOURCES} ${SERVER_HEADERS}
185 ${SERVER_WIN32_HEADERS} ${SERVER_WIN32_RESOURCES})
186 -target_link_libraries(odasrv ${MINIUPNPC_STATIC_LIBRARIES})
187 +target_link_libraries(odasrv -lminiupnpc)
188
189 if(WIN32)
190 target_link_libraries(odasrv winmm wsock32)
191 --- a/CMakeLists.txt
192 +++ b/CMakeLists.txt
193 @@ -71,7 +71,6 @@
194 set(UPNPC_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
195 set(UPNPC_INSTALL OFF CACHE INTERNAL "" FORCE)
196 mark_as_advanced(FORCE UPNPC_INSTALL)
197 -add_subdirectory(libraries/libminiupnpc)
198
199 # PortMidi
200 cmake_dependent_option(USE_INTREE_PORTMIDI "Compile with the version of PortMidi included in the source tree." ON "WIN32" OFF)
201
202
203
204 1.1 games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch
205
206 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch?rev=1.1&view=markup
207 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch?rev=1.1&content-type=text/plain
208
209 Index: 1-odamex-0.7.0-install-rules.patch
210 ===================================================================
211 From 1352b633388dd9d82b8cb7e3d11932d0b569da4e Mon Sep 17 00:00:00 2001
212 From: hasufell <hasufell@g.o>
213 Date: Thu, 27 Mar 2014 21:07:37 +0100
214 Subject: [PATCH 1/4] make install destinations modifiable
215
216 ---
217 CMakeLists.txt | 5 +++--
218 client/CMakeLists.txt | 2 +-
219 master/CMakeLists.txt | 4 ++++
220 odalaunch/CMakeLists.txt | 2 +-
221 server/CMakeLists.txt | 2 +-
222 5 files changed, 10 insertions(+), 5 deletions(-)
223
224 diff --git a/CMakeLists.txt b/CMakeLists.txt
225 index 11e52d1..262e3db 100644
226 --- a/CMakeLists.txt
227 +++ b/CMakeLists.txt
228 @@ -1,4 +1,5 @@
229 include(CMakeDependentOption)
230 +include(GNUInstallDirs)
231
232 project(Odamex)
233 cmake_minimum_required(VERSION 2.8)
234 @@ -113,10 +114,10 @@ if(NOT APPLE)
235 set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
236 else()
237 install(FILES odamex.wad LICENSE README
238 - DESTINATION share/odamex
239 + DESTINATION ${CMAKE_INSTALL_DATADIR}/odamex
240 COMPONENT common)
241 install(FILES ${CONFIG_SAMPLES}
242 - DESTINATION share/odamex/config-samples
243 + DESTINATION ${CMAKE_INSTALL_DATADIR}/odamex/config-samples
244 COMPONENT common)
245
246 option(ODAMEX_COMPONENT_PACKAGES "Create several rpm/deb packages for repository maintainers." OFF)
247 diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
248 index 510b820..3f73ab5 100644
249 --- a/client/CMakeLists.txt
250 +++ b/client/CMakeLists.txt
251 @@ -228,7 +228,7 @@ if(SDL_FOUND AND SDLMIXER_FOUND)
252 COMPONENT client)
253 else()
254 install(TARGETS odamex
255 - RUNTIME DESTINATION bin
256 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
257 COMPONENT client)
258 endif()
259 endif()
260 diff --git a/master/CMakeLists.txt b/master/CMakeLists.txt
261 index 7fc386b..5bdc048 100644
262 --- a/master/CMakeLists.txt
263 +++ b/master/CMakeLists.txt
264 @@ -14,3 +14,7 @@ if(WIN32)
265 elseif(SOLARIS)
266 target_link_libraries(odamast socket nsl)
267 endif()
268 +
269 +if(UNIX)
270 + install( TARGETS odamast DESTINATION ${CMAKE_INSTALL_BINDIR} )
271 +endif()
272 diff --git a/odalaunch/CMakeLists.txt b/odalaunch/CMakeLists.txt
273 index 4ca5920..0b134ef 100644
274 --- a/odalaunch/CMakeLists.txt
275 +++ b/odalaunch/CMakeLists.txt
276 @@ -71,7 +71,7 @@ if(wxWidgets_FOUND)
277 COMPONENT odalaunch)
278 else()
279 install(TARGETS odalaunch
280 - RUNTIME DESTINATION bin
281 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
282 COMPONENT odalaunch)
283 endif()
284
285 diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
286 index b046714..d33b974 100644
287 --- a/server/CMakeLists.txt
288 +++ b/server/CMakeLists.txt
289 @@ -73,6 +73,6 @@ elseif(WIN32)
290 COMPONENT server)
291 else()
292 install(TARGETS odasrv
293 - RUNTIME DESTINATION bin
294 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
295 COMPONENT server)
296 endif()
297 --
298 1.9.1
299
300
301
302
303 1.1 games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch
304
305 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch?rev=1.1&view=markup
306 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch?rev=1.1&content-type=text/plain
307
308 Index: 2-odamex-0.7.0-cmake-options.patch
309 ===================================================================
310 From 851bc58a74eadd89838c924167f27df1b9d3be37 Mon Sep 17 00:00:00 2001
311 From: hasufell <hasufell@g.o>
312 Date: Thu, 27 Mar 2014 21:14:20 +0100
313 Subject: [PATCH 2/4] add various cmake options
314
315 ---
316 CMakeLists.txt | 26 ++++++++++++++++++++++----
317 client/CMakeLists.txt | 34 ++++++++++++++++++++--------------
318 2 files changed, 42 insertions(+), 18 deletions(-)
319
320 diff --git a/CMakeLists.txt b/CMakeLists.txt
321 index 262e3db..91d5c50 100644
322 --- a/CMakeLists.txt
323 +++ b/CMakeLists.txt
324 @@ -1,6 +1,13 @@
325 include(CMakeDependentOption)
326 include(GNUInstallDirs)
327
328 +# options
329 +option(BUILD_CLIENT "Build client target" 1)
330 +option(BUILD_SERVER "Build server target" 1)
331 +option(BUILD_MASTER "Build master server target" 1)
332 +cmake_dependent_option( BUILD_ODALAUNCH "Build odalaunch target" 1 BUILD_CLIENT 0 )
333 +cmake_dependent_option( ENABLE_PORTMIDI "Enable portmidi support" 1 BUILD_CLIENT 0 )
334 +
335 project(Odamex)
336 cmake_minimum_required(VERSION 2.8)
337
338 @@ -73,10 +80,21 @@ if(USE_INTREE_PORTMIDI)
339 endif()
340
341 # Subdirectories for Odamex projects
342 -add_subdirectory(client)
343 -add_subdirectory(server)
344 -add_subdirectory(master)
345 -add_subdirectory(odalaunch)
346 +if(BUILD_CLIENT)
347 + add_subdirectory(client)
348 +endif()
349 +if(BUILD_SERVER)
350 + add_subdirectory(server)
351 +endif()
352 +if(BUILD_MASTER)
353 + add_subdirectory(master)
354 +endif()
355 +if(BUILD_ODALAUNCH)
356 + add_subdirectory(odalaunch)
357 +endif()
358 +if(NOT BUILD_CLIENT AND NOT BUILD_SERVER AND NOT BUILD_MASTER)
359 + message(FATAL_ERROR "No target chosen, doing nothing.")
360 +endif()
361
362 # Disable the ag-odalaunch target completely: -DNO_AG-ODALAUNCH_TARGET
363 # This is only really useful when setting up a universal build.
364 diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
365 index 3f73ab5..7363c5a 100644
366 --- a/client/CMakeLists.txt
367 +++ b/client/CMakeLists.txt
368 @@ -107,17 +107,21 @@ include_directories(${PNG_INCLUDE_DIRS})
369 add_definitions(-DUSE_PNG)
370
371 # PortMidi configuration
372 -if(USE_INTREE_PORTMIDI)
373 - include_directories(../libraries/portmidi/pm_common/ ../libraries/portmidi/porttime/)
374 - add_definitions(-DPORTMIDI)
375 +if(ENABLE_PORTMIDI)
376 + if(USE_INTREE_PORTMIDI)
377 + include_directories(../libraries/portmidi/pm_common/ ../libraries/portmidi/porttime/)
378 + add_definitions(-DPORTMIDI)
379 + else()
380 + find_package(PortMidi QUIET)
381 + if(PORTMIDI_FOUND)
382 + include_directories(${PORTMIDI_INCLUDE_DIR})
383 + add_definitions(-DPORTMIDI)
384 + else()
385 + message(WARNING "PortMidi not found, client will be built without PortMidi support.")
386 + endif()
387 + endif()
388 else()
389 - find_package(PortMidi QUIET)
390 - if(PORTMIDI_FOUND)
391 - include_directories(${PORTMIDI_INCLUDE_DIR})
392 - add_definitions(-DPORTMIDI)
393 - else()
394 - message(WARNING "PortMidi not found, client will be built without PortMidi support.")
395 - endif()
396 + message(STATUS "Portmidi disabled.")
397 endif()
398
399 # Find Mac frameworks
400 @@ -147,10 +151,12 @@ if(SDL_FOUND AND SDLMIXER_FOUND)
401 target_link_libraries(odamex ${ZLIB_LIBRARY})
402 target_link_libraries(odamex ${PNG_LIBRARY} ${ZLIB_LIBRARY})
403
404 - if(USE_INTREE_PORTMIDI)
405 - target_link_libraries(odamex portmidi-static)
406 - elseif(PORTMIDI_FOUND)
407 - target_link_libraries(odamex ${PORTMIDI_LIBRARIES})
408 + if(ENABLE_PORTMIDI)
409 + if(USE_INTREE_PORTMIDI)
410 + target_link_libraries(odamex portmidi-static)
411 + elseif(PORTMIDI_FOUND)
412 + target_link_libraries(odamex ${PORTMIDI_LIBRARIES})
413 + endif()
414 endif()
415
416 if(WIN32)
417 --
418 1.9.1