1 |
hasufell 13/07/31 01:45:09 |
2 |
|
3 |
Added: 3-odamex-0.6.4-wad-search-path.patch |
4 |
2-odamex-0.6.4-cmake-options.patch |
5 |
1-odamex-0.6.4-install-rules.patch |
6 |
4-odamex-0.6.4-odalauncher-bin-path.patch |
7 |
Removed: odamex-0.6.1-build.patch |
8 |
Log: |
9 |
version bump, remove old |
10 |
|
11 |
(Portage version: 2.2.0_alpha191/cvs/Linux x86_64, signed Manifest commit with key E73C35B3) |
12 |
|
13 |
Revision Changes Path |
14 |
1.1 games-engines/odamex/files/3-odamex-0.6.4-wad-search-path.patch |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/3-odamex-0.6.4-wad-search-path.patch?rev=1.1&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/3-odamex-0.6.4-wad-search-path.patch?rev=1.1&content-type=text/plain |
18 |
|
19 |
Index: 3-odamex-0.6.4-wad-search-path.patch |
20 |
=================================================================== |
21 |
commit 3a5209e2595e459a31c111f6040dbac347df1967 |
22 |
Author: hasufell <hasufell@g.o> |
23 |
Date: Wed Jul 31 03:38:10 2013 +0200 |
24 |
|
25 |
add odamex.wad install destination to wad search path |
26 |
|
27 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
28 |
index ca01bba..83a0e30 100644 |
29 |
--- a/CMakeLists.txt |
30 |
+++ b/CMakeLists.txt |
31 |
@@ -12,6 +12,16 @@ option(BUILD_SERVER "Build server target" 1) |
32 |
option(BUILD_MASTER "Build master server target" 1) |
33 |
cmake_dependent_option( BUILD_ODALAUNCH "Build odalaunch target" 1 BUILD_CLIENT 0 ) |
34 |
cmake_dependent_option( ENABLE_PORTMIDI "Enable portmidi support" 1 BUILD_CLIENT 0 ) |
35 |
+ |
36 |
+configure_file ( |
37 |
+ "${PROJECT_SOURCE_DIR}/config.h.in" |
38 |
+ "${PROJECT_BINARY_DIR}/config.h" |
39 |
+ ) |
40 |
+ |
41 |
+include_directories( |
42 |
+ ${PROJECT_BINARY_DIR} |
43 |
+) |
44 |
+ |
45 |
set(PROJECT_VERSION 0.6.4) |
46 |
set(PROJECT_COPYRIGHT "2006-2013") |
47 |
|
48 |
diff --git a/common/d_main.cpp b/common/d_main.cpp |
49 |
index 010bdcb..6dc2e5f 100644 |
50 |
--- a/common/d_main.cpp |
51 |
+++ b/common/d_main.cpp |
52 |
@@ -23,6 +23,7 @@ |
53 |
//----------------------------------------------------------------------------- |
54 |
|
55 |
#include "version.h" |
56 |
+#include "config.h" |
57 |
|
58 |
#include <sstream> |
59 |
#include <string> |
60 |
@@ -493,6 +494,7 @@ static std::string BaseFileSearch(std::string file, std::string ext = "", std::s |
61 |
D_AddSearchDir(dirs, getenv("DOOMWADDIR"), separator); |
62 |
D_AddSearchDir(dirs, getenv("DOOMWADPATH"), separator); |
63 |
D_AddSearchDir(dirs, getenv("HOME"), separator); |
64 |
+ D_AddSearchDir(dirs, CMAKE_WADDIR, separator); |
65 |
|
66 |
// [AM] Search additional paths based on platform |
67 |
D_AddPlatformSearchDirs(dirs); |
68 |
diff --git a/config.h.in b/config.h.in |
69 |
new file mode 100644 |
70 |
index 0000000..e91b3a6 |
71 |
--- /dev/null |
72 |
+++ b/config.h.in |
73 |
@@ -0,0 +1,6 @@ |
74 |
+#ifndef CONFIG_H |
75 |
+#define CONFIG_H |
76 |
+ |
77 |
+#define CMAKE_WADDIR "@CMAKE_INSTALL_DATADIR@" |
78 |
+ |
79 |
+#endif |
80 |
|
81 |
|
82 |
|
83 |
1.1 games-engines/odamex/files/2-odamex-0.6.4-cmake-options.patch |
84 |
|
85 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/2-odamex-0.6.4-cmake-options.patch?rev=1.1&view=markup |
86 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/2-odamex-0.6.4-cmake-options.patch?rev=1.1&content-type=text/plain |
87 |
|
88 |
Index: 2-odamex-0.6.4-cmake-options.patch |
89 |
=================================================================== |
90 |
commit 7abf37ed186701f0170bded26df8cbb8a99a21e1 |
91 |
Author: hasufell <hasufell@g.o> |
92 |
Date: Wed Jul 31 03:35:46 2013 +0200 |
93 |
|
94 |
BUILD: add various cmake options |
95 |
|
96 |
to control building client/server/odalaunch |
97 |
|
98 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
99 |
index f49a1e8..ca01bba 100644 |
100 |
--- a/CMakeLists.txt |
101 |
+++ b/CMakeLists.txt |
102 |
@@ -3,7 +3,15 @@ project(Odamex) |
103 |
cmake_minimum_required(VERSION 2.8) |
104 |
|
105 |
# cmake modules |
106 |
+include( CMakeDependentOption ) |
107 |
include( GNUInstallDirs ) |
108 |
+ |
109 |
+# options |
110 |
+option(BUILD_CLIENT "Build client target" 1) |
111 |
+option(BUILD_SERVER "Build server target" 1) |
112 |
+option(BUILD_MASTER "Build master server target" 1) |
113 |
+cmake_dependent_option( BUILD_ODALAUNCH "Build odalaunch target" 1 BUILD_CLIENT 0 ) |
114 |
+cmake_dependent_option( ENABLE_PORTMIDI "Enable portmidi support" 1 BUILD_CLIENT 0 ) |
115 |
set(PROJECT_VERSION 0.6.4) |
116 |
set(PROJECT_COPYRIGHT "2006-2013") |
117 |
|
118 |
@@ -56,10 +64,22 @@ endmacro(define_platform) |
119 |
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) |
120 |
|
121 |
# Subdirectories for individual projects |
122 |
-add_subdirectory(client) |
123 |
-add_subdirectory(server) |
124 |
-add_subdirectory(master) |
125 |
-add_subdirectory(odalaunch) |
126 |
+if(BUILD_CLIENT) |
127 |
+ add_subdirectory(client) |
128 |
+endif() |
129 |
+if(BUILD_SERVER) |
130 |
+ add_subdirectory(server) |
131 |
+endif() |
132 |
+if(BUILD_MASTER) |
133 |
+ add_subdirectory(master) |
134 |
+endif() |
135 |
+if(BUILD_ODALAUNCH) |
136 |
+ add_subdirectory(odalaunch) |
137 |
+endif() |
138 |
+ |
139 |
+if(NOT BUILD_CLIENT AND NOT BUILD_SERVER AND NOT BUILD_MASTER) |
140 |
+ message(FATAL_ERROR "No target chosen, doing nothing.") |
141 |
+endif() |
142 |
|
143 |
# Disable the ag-odalaunch target completely: -DNO_AG-ODALAUNCH_TARGET |
144 |
# This is only really useful when setting up a universal build. |
145 |
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt |
146 |
index 1fde0ff..9f06fa6 100644 |
147 |
--- a/client/CMakeLists.txt |
148 |
+++ b/client/CMakeLists.txt |
149 |
@@ -48,7 +48,7 @@ endif() |
150 |
|
151 |
# PortMidi configuration |
152 |
find_package(PortMidi) |
153 |
-if(PORTMIDI_FOUND) |
154 |
+if(PORTMIDI_FOUND AND ENABLE_PORTMIDI) |
155 |
include_directories(${PORTMIDI_INCLUDE_DIR}) |
156 |
add_definitions(-DPORTMIDI) |
157 |
else() |
158 |
@@ -95,7 +95,7 @@ if(SDL_FOUND AND SDLMIXER_FOUND) |
159 |
target_link_libraries(odamex ${SDL_LIBRARY}) |
160 |
target_link_libraries(odamex ${SDLMIXER_LIBRARY}) |
161 |
|
162 |
- if(PORTMIDI_FOUND) |
163 |
+ if(PORTMIDI_FOUND AND ENABLE_PORTMIDI) |
164 |
target_link_libraries(odamex ${PORTMIDI_LIBRARIES}) |
165 |
endif() |
166 |
|
167 |
|
168 |
|
169 |
|
170 |
1.1 games-engines/odamex/files/1-odamex-0.6.4-install-rules.patch |
171 |
|
172 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/1-odamex-0.6.4-install-rules.patch?rev=1.1&view=markup |
173 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/1-odamex-0.6.4-install-rules.patch?rev=1.1&content-type=text/plain |
174 |
|
175 |
Index: 1-odamex-0.6.4-install-rules.patch |
176 |
=================================================================== |
177 |
commit 04fff802ee72c08d2e1730c6c5506fc2e708d5fe |
178 |
Author: hasufell <hasufell@g.o> |
179 |
Date: Wed Jul 31 03:34:29 2013 +0200 |
180 |
|
181 |
BUILD: add unix install rules |
182 |
|
183 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
184 |
index b77096a..f49a1e8 100644 |
185 |
--- a/CMakeLists.txt |
186 |
+++ b/CMakeLists.txt |
187 |
@@ -2,6 +2,8 @@ |
188 |
project(Odamex) |
189 |
cmake_minimum_required(VERSION 2.8) |
190 |
|
191 |
+# cmake modules |
192 |
+include( GNUInstallDirs ) |
193 |
set(PROJECT_VERSION 0.6.4) |
194 |
set(PROJECT_COPYRIGHT "2006-2013") |
195 |
|
196 |
@@ -64,3 +66,8 @@ add_subdirectory(odalaunch) |
197 |
if(NOT NO_AG-ODALAUNCH_TARGET) |
198 |
add_subdirectory(ag-odalaunch) |
199 |
endif() |
200 |
+ |
201 |
+# global install rules |
202 |
+if(UNIX) |
203 |
+ install(FILES odamex.wad DESTINATION ${CMAKE_INSTALL_DATADIR}) |
204 |
+endif() |
205 |
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt |
206 |
index 5dd5d43..1fde0ff 100644 |
207 |
--- a/client/CMakeLists.txt |
208 |
+++ b/client/CMakeLists.txt |
209 |
@@ -168,5 +168,8 @@ if(SDL_FOUND AND SDLMIXER_FOUND) |
210 |
" ) |
211 |
endif() |
212 |
|
213 |
+ # UNIX install rules |
214 |
+ elseif(UNIX) |
215 |
+ install( TARGETS odamex DESTINATION ${CMAKE_INSTALL_BINDIR} ) |
216 |
endif() |
217 |
endif() |
218 |
diff --git a/master/CMakeLists.txt b/master/CMakeLists.txt |
219 |
index c1c3853..3e94b34 100644 |
220 |
--- a/master/CMakeLists.txt |
221 |
+++ b/master/CMakeLists.txt |
222 |
@@ -12,3 +12,8 @@ if(WIN32) |
223 |
elseif(SOLARIS) |
224 |
target_link_libraries(odamast socket nsl) |
225 |
endif() |
226 |
+ |
227 |
+# install rules |
228 |
+if(UNIX) |
229 |
+ install( TARGETS odamast DESTINATION ${CMAKE_INSTALL_BINDIR} ) |
230 |
+endif() |
231 |
diff --git a/odalaunch/CMakeLists.txt b/odalaunch/CMakeLists.txt |
232 |
index ff9b6e3..d2d2171 100644 |
233 |
--- a/odalaunch/CMakeLists.txt |
234 |
+++ b/odalaunch/CMakeLists.txt |
235 |
@@ -61,3 +61,8 @@ if(wxWidgets_FOUND) |
236 |
) |
237 |
endif() |
238 |
endif() |
239 |
+ |
240 |
+# install rules |
241 |
+if(UNIX) |
242 |
+ install( TARGETS odalaunch DESTINATION ${CMAKE_INSTALL_BINDIR} ) |
243 |
+endif() |
244 |
diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt |
245 |
index 2284a8a..a079434 100644 |
246 |
--- a/server/CMakeLists.txt |
247 |
+++ b/server/CMakeLists.txt |
248 |
@@ -61,3 +61,7 @@ if(UNIX AND NOT APPLE) |
249 |
target_link_libraries(odasrv rt) |
250 |
endif() |
251 |
|
252 |
+# install rules |
253 |
+if(UNIX) |
254 |
+ install( TARGETS odasrv DESTINATION ${CMAKE_INSTALL_BINDIR} ) |
255 |
+endif() |
256 |
|
257 |
|
258 |
|
259 |
1.1 games-engines/odamex/files/4-odamex-0.6.4-odalauncher-bin-path.patch |
260 |
|
261 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/4-odamex-0.6.4-odalauncher-bin-path.patch?rev=1.1&view=markup |
262 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/4-odamex-0.6.4-odalauncher-bin-path.patch?rev=1.1&content-type=text/plain |
263 |
|
264 |
Index: 4-odamex-0.6.4-odalauncher-bin-path.patch |
265 |
=================================================================== |
266 |
commit a6c55c51dc251924be7eccf6637fc719a2b7ace0 |
267 |
Author: hasufell <hasufell@g.o> |
268 |
Date: Wed Jul 31 03:38:24 2013 +0200 |
269 |
|
270 |
use CMAKE_BINDIR as default bin patch in odalauncher |
271 |
|
272 |
diff --git a/config.h.in b/config.h.in |
273 |
index e91b3a6..7019a02 100644 |
274 |
--- a/config.h.in |
275 |
+++ b/config.h.in |
276 |
@@ -2,5 +2,6 @@ |
277 |
#define CONFIG_H |
278 |
|
279 |
#define CMAKE_WADDIR "@CMAKE_INSTALL_DATADIR@" |
280 |
+#define CMAKE_BINDIR "@CMAKE_INSTALL_BINDIR@" |
281 |
|
282 |
#endif |
283 |
diff --git a/odalaunch/src/dlg_main.cpp b/odalaunch/src/dlg_main.cpp |
284 |
index 915b527..f01224a 100644 |
285 |
--- a/odalaunch/src/dlg_main.cpp |
286 |
+++ b/odalaunch/src/dlg_main.cpp |
287 |
@@ -27,6 +27,7 @@ |
288 |
#include "str_utils.h" |
289 |
|
290 |
#include "md5.h" |
291 |
+#include "config.h" |
292 |
|
293 |
#include <wx/settings.h> |
294 |
#include <wx/menu.h> |
295 |
@@ -42,6 +43,7 @@ |
296 |
#include <wx/process.h> |
297 |
#include <wx/toolbar.h> |
298 |
#include <wx/xrc/xmlres.h> |
299 |
+#include <wx/string.h> |
300 |
#include <wx/cmdline.h> |
301 |
|
302 |
#ifdef __WXMSW__ |
303 |
@@ -200,10 +202,12 @@ dlgMain::dlgMain(wxWindow* parent, wxWindowID id) |
304 |
} |
305 |
#endif |
306 |
|
307 |
+ const char *cmake_bindir_str = CMAKE_BINDIR; |
308 |
+ wxString cmake_bindir = wxString::FromAscii(cmake_bindir_str); |
309 |
launchercfg_s.get_list_on_start = 1; |
310 |
launchercfg_s.show_blocked_servers = 0; |
311 |
launchercfg_s.wad_paths = wxGetCwd(); |
312 |
- launchercfg_s.odamex_directory = wxGetCwd(); |
313 |
+ launchercfg_s.odamex_directory = cmake_bindir; |
314 |
|
315 |
m_LstCtrlServers = XRCCTRL(*this, "Id_LstCtrlServers", LstOdaServerList); |
316 |
m_LstCtrlPlayers = XRCCTRL(*this, "Id_LstCtrlPlayers", LstOdaPlayerList); |