1 |
hasufell 14/01/03 15:24:25 |
2 |
|
3 |
Added: minetest-0.4.9-shared-irrlicht.patch |
4 |
minetest-0.4.9-lua-luajit-option.patch |
5 |
minetest-0.4.9-as-needed.patch |
6 |
minetest-0.4.9-opengles.patch |
7 |
minetest-0.4.9-freetype.patch |
8 |
Log: |
9 |
version bump wrt #496820 |
10 |
|
11 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3) |
12 |
|
13 |
Revision Changes Path |
14 |
1.1 games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch?rev=1.1&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch?rev=1.1&content-type=text/plain |
18 |
|
19 |
Index: minetest-0.4.9-shared-irrlicht.patch |
20 |
=================================================================== |
21 |
commit 11d35e62fe13b47c5b34139559e650dfe6ebbd84 |
22 |
Author: hasufell <julian.ospald@××××××××××.com> |
23 |
Date: Sat Jun 8 13:40:30 2013 +0200 |
24 |
|
25 |
CMAKE: use shared lib from Irrlicht |
26 |
|
27 |
diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake |
28 |
index bd00422..4632993 100644 |
29 |
--- a/cmake/Modules/FindIrrlicht.cmake |
30 |
+++ b/cmake/Modules/FindIrrlicht.cmake |
31 |
@@ -50,10 +50,11 @@ else() |
32 |
/usr/include/irrlicht |
33 |
) |
34 |
|
35 |
- FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht |
36 |
+ FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.so Irrlicht |
37 |
PATHS |
38 |
/usr/local/lib |
39 |
/usr/lib |
40 |
+ /usr/lib64 |
41 |
) |
42 |
endif() |
43 |
|
44 |
|
45 |
|
46 |
|
47 |
1.1 games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch |
48 |
|
49 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch?rev=1.1&view=markup |
50 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch?rev=1.1&content-type=text/plain |
51 |
|
52 |
Index: minetest-0.4.9-lua-luajit-option.patch |
53 |
=================================================================== |
54 |
commit d8dbda3636a91eba52c97450b58f767d5a4a376e |
55 |
Author: hasufell <hasufell@g.o> |
56 |
Date: Mon Nov 25 00:25:55 2013 +0100 |
57 |
|
58 |
add USE_LUAJIT option |
59 |
|
60 |
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
61 |
index a30dc98..a1fee7a 100644 |
62 |
--- a/src/CMakeLists.txt |
63 |
+++ b/src/CMakeLists.txt |
64 |
@@ -179,24 +179,29 @@ if(USE_FREETYPE) |
65 |
endif(USE_FREETYPE) |
66 |
|
67 |
|
68 |
-find_library(LUA_LIBRARY luajit |
69 |
- NAMES luajit-5.1) |
70 |
-find_path(LUA_INCLUDE_DIR luajit.h |
71 |
- NAMES luajit.h |
72 |
- PATH_SUFFIXES luajit-2.0) |
73 |
-message (STATUS "LuaJIT library: ${LUA_LIBRARY}") |
74 |
-message (STATUS "LuaJIT headers: ${LUA_INCLUDE_DIR}") |
75 |
+option(USE_LUAJIT "Use luajit instead of lua" OFF) |
76 |
|
77 |
set(USE_LUAJIT 0) |
78 |
-if(LUA_LIBRARY AND LUA_INCLUDE_DIR) |
79 |
- message (STATUS "LuaJIT found.") |
80 |
- set(USE_LUAJIT 1) |
81 |
-else(LUA_LIBRARY AND LUA_INCLUDE_DIR) |
82 |
- message (STATUS "LuaJIT not found, using bundled Lua.") |
83 |
- set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") |
84 |
- set(LUA_LIBRARY "lua") |
85 |
- add_subdirectory(lua) |
86 |
-endif(LUA_LIBRARY AND LUA_INCLUDE_DIR) |
87 |
+if(USE_LUAJIT) |
88 |
+ find_library(LUA_LIBRARY luajit |
89 |
+ NAMES luajit-5.1) |
90 |
+ find_path(LUA_INCLUDE_DIR luajit.h |
91 |
+ NAMES luajit.h |
92 |
+ PATH_SUFFIXES luajit-2.0) |
93 |
+ if(LUA_LIBRARY AND LUA_INCLUDE_DIR) |
94 |
+ message (STATUS "LuaJIT found") |
95 |
+ set(USE_LUAJIT 1) |
96 |
+ else(LUA_LIBRARY AND LUA_INCLUDE_DIR) |
97 |
+ message (FATAL_ERROR "LuaJIT not found!") |
98 |
+ endif(LUA_LIBRARY AND LUA_INCLUDE_DIR) |
99 |
+else(USE_LUAJIT) |
100 |
+ find_package(Lua51) |
101 |
+ if(LUA51_FOUND) |
102 |
+ message (STATUS "Lua51 found") |
103 |
+ else(LUA51_FOUND) |
104 |
+ message (FATAL_ERROR "Lua51 not found!") |
105 |
+ endif(LUA51_FOUND) |
106 |
+endif(USE_LUAJIT) |
107 |
|
108 |
mark_as_advanced(LUA_LIBRARY) |
109 |
mark_as_advanced(LUA_INCLUDE_DIR) |
110 |
|
111 |
|
112 |
|
113 |
1.1 games-action/minetest/files/minetest-0.4.9-as-needed.patch |
114 |
|
115 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-as-needed.patch?rev=1.1&view=markup |
116 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-as-needed.patch?rev=1.1&content-type=text/plain |
117 |
|
118 |
Index: minetest-0.4.9-as-needed.patch |
119 |
=================================================================== |
120 |
commit a88bfd5b77fa0b5c60e438c0011dbdcee5e14dfd |
121 |
Author: hasufell <hasufell@g.o> |
122 |
Date: Mon Nov 25 00:28:55 2013 +0100 |
123 |
|
124 |
CMAKE: fix linking order |
125 |
|
126 |
this also fixes linking with as-needed wrt |
127 |
https://github.com/minetest/minetest/issues/617 |
128 |
|
129 |
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
130 |
index a1fee7a..a72bd4a 100644 |
131 |
--- a/src/CMakeLists.txt |
132 |
+++ b/src/CMakeLists.txt |
133 |
@@ -427,18 +427,18 @@ if(BUILD_CLIENT) |
134 |
target_link_libraries( |
135 |
${PROJECT_NAME} |
136 |
${ZLIB_LIBRARIES} |
137 |
- ${IRRLICHT_LIBRARY} |
138 |
+ ${X11_LIBRARIES} |
139 |
${OPENGL_LIBRARIES} |
140 |
+ ${OPENGLES2_LIBRARIES} |
141 |
${JPEG_LIBRARIES} |
142 |
${BZIP2_LIBRARIES} |
143 |
${PNG_LIBRARIES} |
144 |
- ${X11_LIBRARIES} |
145 |
+ ${IRRLICHT_LIBRARY} |
146 |
${GETTEXT_LIBRARY} |
147 |
${SOUND_LIBRARIES} |
148 |
${SQLITE3_LIBRARY} |
149 |
${LUA_LIBRARY} |
150 |
${JSON_LIBRARY} |
151 |
- ${OPENGLES2_LIBRARIES} |
152 |
${PLATFORM_LIBS} |
153 |
${CLIENT_PLATFORM_LIBS} |
154 |
) |
155 |
|
156 |
|
157 |
|
158 |
1.1 games-action/minetest/files/minetest-0.4.9-opengles.patch |
159 |
|
160 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-opengles.patch?rev=1.1&view=markup |
161 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-opengles.patch?rev=1.1&content-type=text/plain |
162 |
|
163 |
Index: minetest-0.4.9-opengles.patch |
164 |
=================================================================== |
165 |
From: Julian Ospald <hasufell@g.o> |
166 |
Date: Fri Nov 29 19:34:37 UTC 2013 |
167 |
|
168 |
This patch is currently not needed in this form, because gentoo irrlicht |
169 |
does not yet have gles2 support. However this will be needed |
170 |
once it does, so we can add a gles2 useflag. |
171 |
|
172 |
Also fixes |
173 |
https://bugs.gentoo.org/show_bug.cgi?id=492804 |
174 |
|
175 |
--- a/src/CMakeLists.txt |
176 |
+++ b/src/CMakeLists.txt |
177 |
@@ -7,6 +7,7 @@ |
178 |
mark_as_advanced(JSON_INCLUDE_DIR JSON_LIBRARY) |
179 |
|
180 |
option(ENABLE_CURL "Enable cURL support for fetching media" 1) |
181 |
+option(ENABLE_GLES2 "Enable GLES2 support with irrlicht" 0) |
182 |
|
183 |
if (NOT ENABLE_CURL) |
184 |
mark_as_advanced(CLEAR CURL_LIBRARY CURL_INCLUDE_DIR) |
185 |
@@ -170,7 +171,10 @@ |
186 |
|
187 |
find_package(Sqlite3 REQUIRED) |
188 |
find_package(Json REQUIRED) |
189 |
-find_package(OpenGLES2) |
190 |
+if(ENABLE_GLES2 AND BUILD_CLIENT) |
191 |
+ find_package(OpenGLES2 REQUIRED) |
192 |
+ add_definitions( -DWITH_GLES2 ) |
193 |
+endif(ENABLE_GLES2 AND BUILD_CLIENT) |
194 |
|
195 |
if(USE_FREETYPE) |
196 |
find_package(Freetype REQUIRED) |
197 |
--- a/src/main.cpp |
198 |
+++ b/src/main.cpp |
199 |
@@ -1331,10 +1331,12 @@ |
200 |
else if(driverstring == "ogles1") |
201 |
driverType = video::EDT_OGLES1; |
202 |
#endif |
203 |
+#ifdef WITH_GLES2 |
204 |
#ifdef _IRR_COMPILE_WITH_OGLES2_ |
205 |
else if(driverstring == "ogles2") |
206 |
driverType = video::EDT_OGLES2; |
207 |
#endif |
208 |
+#endif |
209 |
else |
210 |
{ |
211 |
errorstream<<"WARNING: Invalid video_driver specified; defaulting " |
212 |
--- a/cmake/Modules/FindOpenGLES2.cmake |
213 |
+++ b/cmake/Modules/FindOpenGLES2.cmake |
214 |
@@ -19,6 +19,7 @@ |
215 |
# win32, apple, android NOT TESED |
216 |
# linux tested and works |
217 |
|
218 |
+ |
219 |
IF (WIN32) |
220 |
IF (CYGWIN) |
221 |
|
222 |
@@ -47,51 +48,57 @@ |
223 |
|
224 |
ELSE(APPLE) |
225 |
|
226 |
- FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h |
227 |
- /usr/openwin/share/include |
228 |
- /opt/graphics/OpenGL/include /usr/X11R6/include |
229 |
- /usr/include |
230 |
- ) |
231 |
- |
232 |
- FIND_LIBRARY(OPENGLES2_gl_LIBRARY |
233 |
- NAMES GLESv2 |
234 |
- PATHS /opt/graphics/OpenGL/lib |
235 |
+ # prefer pkg-config |
236 |
+ INCLUDE(FindPkgConfig) |
237 |
+ IF (PKG_CONFIG_FOUND) |
238 |
+ pkg_check_modules(OPENGLES2 QUIET glesv2 egl) |
239 |
+ ELSE (PKG_CONFIG_FOUND) |
240 |
+ FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h |
241 |
+ /usr/openwin/share/include |
242 |
+ /opt/graphics/OpenGL/include /usr/X11R6/include |
243 |
+ /usr/include |
244 |
+ ) |
245 |
+ |
246 |
+ FIND_LIBRARY(OPENGLES2_gl_LIBRARY |
247 |
+ NAMES GLESv2 |
248 |
+ PATHS /opt/graphics/OpenGL/lib |
249 |
/usr/openwin/lib |
250 |
/usr/shlib /usr/X11R6/lib |
251 |
/usr/lib |
252 |
- ) |
253 |
+ ) |
254 |
|
255 |
- IF (NOT BUILD_ANDROID) |
256 |
- FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h |
257 |
- /usr/openwin/share/include |
258 |
- /opt/graphics/OpenGL/include /usr/X11R6/include |
259 |
- /usr/include |
260 |
- ) |
261 |
- |
262 |
- FIND_LIBRARY(EGL_egl_LIBRARY |
263 |
- NAMES EGL |
264 |
- PATHS /opt/graphics/OpenGL/lib |
265 |
- /usr/openwin/lib |
266 |
- /usr/shlib /usr/X11R6/lib |
267 |
- /usr/lib |
268 |
- ) |
269 |
- |
270 |
- # On Unix OpenGL most certainly always requires X11. |
271 |
- # Feel free to tighten up these conditions if you don't |
272 |
- # think this is always true. |
273 |
- # It's not true on OSX. |
274 |
- |
275 |
- IF (OPENGLES2_gl_LIBRARY) |
276 |
- IF(NOT X11_FOUND) |
277 |
- INCLUDE(FindX11) |
278 |
- ENDIF(NOT X11_FOUND) |
279 |
- IF (X11_FOUND) |
280 |
- IF (NOT APPLE) |
281 |
- SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES}) |
282 |
- ENDIF (NOT APPLE) |
283 |
- ENDIF (X11_FOUND) |
284 |
- ENDIF (OPENGLES2_gl_LIBRARY) |
285 |
- ENDIF () |
286 |
+ IF (NOT BUILD_ANDROID) |
287 |
+ FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h |
288 |
+ /usr/openwin/share/include |
289 |
+ /opt/graphics/OpenGL/include /usr/X11R6/include |
290 |
+ /usr/include |
291 |
+ ) |
292 |
+ |
293 |
+ FIND_LIBRARY(EGL_egl_LIBRARY |
294 |
+ NAMES EGL |
295 |
+ PATHS /opt/graphics/OpenGL/lib |
296 |
+ /usr/openwin/lib |
297 |
+ /usr/shlib /usr/X11R6/lib |
298 |
+ /usr/lib |
299 |
+ ) |
300 |
+ |
301 |
+ # On Unix OpenGL most certainly always requires X11. |
302 |
+ # Feel free to tighten up these conditions if you don't |
303 |
+ # think this is always true. |
304 |
+ # It's not true on OSX. |
305 |
+ |
306 |
+ IF (OPENGLES2_gl_LIBRARY) |
307 |
+ IF(NOT X11_FOUND) |
308 |
+ INCLUDE(FindX11) |
309 |
+ ENDIF(NOT X11_FOUND) |
310 |
+ IF (X11_FOUND) |
311 |
+ IF (NOT APPLE) |
312 |
+ SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES}) |
313 |
+ ENDIF (NOT APPLE) |
314 |
+ ENDIF (X11_FOUND) |
315 |
+ ENDIF (OPENGLES2_gl_LIBRARY) |
316 |
+ ENDIF (NOT BUILD_ANDROID) |
317 |
+ ENDIF (PKG_CONFIG_FOUND) |
318 |
|
319 |
ENDIF(APPLE) |
320 |
ENDIF (WIN32) |
321 |
@@ -126,5 +133,5 @@ |
322 |
IF(OPENGLES2_FOUND) |
323 |
MESSAGE(STATUS "Found system opengles2 library ${OPENGLES2_LIBRARIES}") |
324 |
ELSE () |
325 |
- SET(OPENGLES2_LIBRARIES "") |
326 |
+ MESSAGE(FATAL_ERROR "OpenGLES2 not found!") |
327 |
ENDIF () |
328 |
|
329 |
|
330 |
|
331 |
1.1 games-action/minetest/files/minetest-0.4.9-freetype.patch |
332 |
|
333 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-freetype.patch?rev=1.1&view=markup |
334 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-action/minetest/files/minetest-0.4.9-freetype.patch?rev=1.1&content-type=text/plain |
335 |
|
336 |
Index: minetest-0.4.9-freetype.patch |
337 |
=================================================================== |
338 |
From: Julian Ospald <hasufell@g.o> |
339 |
Date: Sun Dec 8 19:28:11 UTC 2013 |
340 |
Subject: prefer pkg-config for freetype2 detection |
341 |
|
342 |
https://github.com/minetest/minetest/pull/1042 |
343 |
|
344 |
--- a/src/CMakeLists.txt |
345 |
+++ b/src/CMakeLists.txt |
346 |
@@ -173,7 +173,22 @@ |
347 |
find_package(OpenGLES2) |
348 |
|
349 |
if(USE_FREETYPE) |
350 |
- find_package(Freetype REQUIRED) |
351 |
+ if(UNIX) |
352 |
+ include(FindPkgConfig) |
353 |
+ if(PKG_CONFIG_FOUND) |
354 |
+ pkg_check_modules(FREETYPE QUIET freetype2) |
355 |
+ if(FREETYPE_FOUND) |
356 |
+ SET(FREETYPE_PKGCONFIG_FOUND TRUE) |
357 |
+ SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) |
358 |
+ # because cmake is idiotic |
359 |
+ string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS}) |
360 |
+ string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS}) |
361 |
+ endif(FREETYPE_FOUND) |
362 |
+ endif(PKG_CONFIG_FOUND) |
363 |
+ endif(UNIX) |
364 |
+ if(NOT FREETYPE_FOUND) |
365 |
+ find_package(Freetype REQUIRED) |
366 |
+ endif(NOT FREETYPE_FOUND) |
367 |
set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont") |
368 |
set(CGUITTFONT_LIBRARY cguittfont) |
369 |
endif(USE_FREETYPE) |
370 |
@@ -446,6 +461,12 @@ |
371 |
) |
372 |
endif(USE_CURL) |
373 |
if(USE_FREETYPE) |
374 |
+ if(FREETYPE_PKGCONFIG_FOUND) |
375 |
+ set_target_properties(${PROJECT_NAME} |
376 |
+ PROPERTIES |
377 |
+ COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}" |
378 |
+ ) |
379 |
+ endif(FREETYPE_PKGCONFIG_FOUND) |
380 |
target_link_libraries( |
381 |
${PROJECT_NAME} |
382 |
${FREETYPE_LIBRARY} |
383 |
--- a/src/cguittfont/CMakeLists.txt |
384 |
+++ b/src/cguittfont/CMakeLists.txt |
385 |
@@ -1,17 +1,29 @@ |
386 |
-include_directories( |
387 |
- ${IRRLICHT_INCLUDE_DIR} |
388 |
- ${FREETYPE_INCLUDE_DIRS} |
389 |
-) |
390 |
- |
391 |
# CGUITTFont authors, y u no include headers you use? |
392 |
# Do not add CGUITTFont.cpp to the line below. |
393 |
# xCGUITTFont.cpp is a wrapper file that includes |
394 |
# additional required headers. |
395 |
add_library(cguittfont xCGUITTFont.cpp) |
396 |
|
397 |
+if(FREETYPE_PKGCONFIG_FOUND) |
398 |
+ set_target_properties(cguittfont |
399 |
+ PROPERTIES |
400 |
+ COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}" |
401 |
+ LINK_FLAGS "${FREETYPE_LDFLAGS_STR}" |
402 |
+ ) |
403 |
+ |
404 |
+ include_directories( |
405 |
+ ${IRRLICHT_INCLUDE_DIR} |
406 |
+ ) |
407 |
+else(FREETYPE_PKGCONFIG_FOUND) |
408 |
+ include_directories( |
409 |
+ ${IRRLICHT_INCLUDE_DIR} |
410 |
+ ${FREETYPE_INCLUDE_DIRS} |
411 |
+ ) |
412 |
+endif(FREETYPE_PKGCONFIG_FOUND) |
413 |
+ |
414 |
target_link_libraries( |
415 |
- cguittfont |
416 |
- ${IRRLICHT_LIBRARY} |
417 |
- ${FREETYPE_LIBRARY} |
418 |
- ${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety |
419 |
-) |
420 |
+ cguittfont |
421 |
+ ${IRRLICHT_LIBRARY} |
422 |
+ ${FREETYPE_LIBRARY} |
423 |
+ ${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety |
424 |
+ ) |