diff options
Diffstat (limited to 'games-action/minetest/files')
5 files changed, 364 insertions, 0 deletions
diff --git a/games-action/minetest/files/minetest-0.4.9-as-needed.patch b/games-action/minetest/files/minetest-0.4.9-as-needed.patch new file mode 100644 index 000000000000..803ea0284827 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-as-needed.patch @@ -0,0 +1,35 @@ +commit a88bfd5b77fa0b5c60e438c0011dbdcee5e14dfd +Author: hasufell <hasufell@gentoo.org> +Date: Mon Nov 25 00:28:55 2013 +0100 + + CMAKE: fix linking order + + this also fixes linking with as-needed wrt + https://github.com/minetest/minetest/issues/617 + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a1fee7a..a72bd4a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -427,18 +427,18 @@ if(BUILD_CLIENT) + target_link_libraries( + ${PROJECT_NAME} + ${ZLIB_LIBRARIES} +- ${IRRLICHT_LIBRARY} ++ ${X11_LIBRARIES} + ${OPENGL_LIBRARIES} ++ ${OPENGLES2_LIBRARIES} + ${JPEG_LIBRARIES} + ${BZIP2_LIBRARIES} + ${PNG_LIBRARIES} +- ${X11_LIBRARIES} ++ ${IRRLICHT_LIBRARY} + ${GETTEXT_LIBRARY} + ${SOUND_LIBRARIES} + ${SQLITE3_LIBRARY} + ${LUA_LIBRARY} + ${JSON_LIBRARY} +- ${OPENGLES2_LIBRARIES} + ${PLATFORM_LIBS} + ${CLIENT_PLATFORM_LIBS} + ) diff --git a/games-action/minetest/files/minetest-0.4.9-freetype.patch b/games-action/minetest/files/minetest-0.4.9-freetype.patch new file mode 100644 index 000000000000..9ca8e68f862b --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-freetype.patch @@ -0,0 +1,87 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Sun Dec 8 19:28:11 UTC 2013 +Subject: prefer pkg-config for freetype2 detection + +https://github.com/minetest/minetest/pull/1042 + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -173,7 +173,22 @@ + find_package(OpenGLES2) + + if(USE_FREETYPE) +- find_package(Freetype REQUIRED) ++ if(UNIX) ++ include(FindPkgConfig) ++ if(PKG_CONFIG_FOUND) ++ pkg_check_modules(FREETYPE QUIET freetype2) ++ if(FREETYPE_FOUND) ++ SET(FREETYPE_PKGCONFIG_FOUND TRUE) ++ SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) ++ # because cmake is idiotic ++ string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS}) ++ string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS}) ++ endif(FREETYPE_FOUND) ++ endif(PKG_CONFIG_FOUND) ++ endif(UNIX) ++ if(NOT FREETYPE_FOUND) ++ find_package(Freetype REQUIRED) ++ endif(NOT FREETYPE_FOUND) + set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont") + set(CGUITTFONT_LIBRARY cguittfont) + endif(USE_FREETYPE) +@@ -446,6 +461,12 @@ + ) + endif(USE_CURL) + if(USE_FREETYPE) ++ if(FREETYPE_PKGCONFIG_FOUND) ++ set_target_properties(${PROJECT_NAME} ++ PROPERTIES ++ COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}" ++ ) ++ endif(FREETYPE_PKGCONFIG_FOUND) + target_link_libraries( + ${PROJECT_NAME} + ${FREETYPE_LIBRARY} +--- a/src/cguittfont/CMakeLists.txt ++++ b/src/cguittfont/CMakeLists.txt +@@ -1,17 +1,29 @@ +-include_directories( +- ${IRRLICHT_INCLUDE_DIR} +- ${FREETYPE_INCLUDE_DIRS} +-) +- + # CGUITTFont authors, y u no include headers you use? + # Do not add CGUITTFont.cpp to the line below. + # xCGUITTFont.cpp is a wrapper file that includes + # additional required headers. + add_library(cguittfont xCGUITTFont.cpp) + ++if(FREETYPE_PKGCONFIG_FOUND) ++ set_target_properties(cguittfont ++ PROPERTIES ++ COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}" ++ LINK_FLAGS "${FREETYPE_LDFLAGS_STR}" ++ ) ++ ++ include_directories( ++ ${IRRLICHT_INCLUDE_DIR} ++ ) ++else(FREETYPE_PKGCONFIG_FOUND) ++ include_directories( ++ ${IRRLICHT_INCLUDE_DIR} ++ ${FREETYPE_INCLUDE_DIRS} ++ ) ++endif(FREETYPE_PKGCONFIG_FOUND) ++ + target_link_libraries( +- cguittfont +- ${IRRLICHT_LIBRARY} +- ${FREETYPE_LIBRARY} +- ${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety +-) ++ cguittfont ++ ${IRRLICHT_LIBRARY} ++ ${FREETYPE_LIBRARY} ++ ${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety ++ ) diff --git a/games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch b/games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch new file mode 100644 index 000000000000..8603c50343c2 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch @@ -0,0 +1,56 @@ +commit d8dbda3636a91eba52c97450b58f767d5a4a376e +Author: hasufell <hasufell@gentoo.org> +Date: Mon Nov 25 00:25:55 2013 +0100 + + add USE_LUAJIT option + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a30dc98..a1fee7a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -179,24 +179,29 @@ if(USE_FREETYPE) + endif(USE_FREETYPE) + + +-find_library(LUA_LIBRARY luajit +- NAMES luajit-5.1) +-find_path(LUA_INCLUDE_DIR luajit.h +- NAMES luajit.h +- PATH_SUFFIXES luajit-2.0) +-message (STATUS "LuaJIT library: ${LUA_LIBRARY}") +-message (STATUS "LuaJIT headers: ${LUA_INCLUDE_DIR}") ++option(USE_LUAJIT "Use luajit instead of lua" OFF) + + set(USE_LUAJIT 0) +-if(LUA_LIBRARY AND LUA_INCLUDE_DIR) +- message (STATUS "LuaJIT found.") +- set(USE_LUAJIT 1) +-else(LUA_LIBRARY AND LUA_INCLUDE_DIR) +- message (STATUS "LuaJIT not found, using bundled Lua.") +- set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") +- set(LUA_LIBRARY "lua") +- add_subdirectory(lua) +-endif(LUA_LIBRARY AND LUA_INCLUDE_DIR) ++if(USE_LUAJIT) ++ find_library(LUA_LIBRARY luajit ++ NAMES luajit-5.1) ++ find_path(LUA_INCLUDE_DIR luajit.h ++ NAMES luajit.h ++ PATH_SUFFIXES luajit-2.0) ++ if(LUA_LIBRARY AND LUA_INCLUDE_DIR) ++ message (STATUS "LuaJIT found") ++ set(USE_LUAJIT 1) ++ else(LUA_LIBRARY AND LUA_INCLUDE_DIR) ++ message (FATAL_ERROR "LuaJIT not found!") ++ endif(LUA_LIBRARY AND LUA_INCLUDE_DIR) ++else(USE_LUAJIT) ++ find_package(Lua51) ++ if(LUA51_FOUND) ++ message (STATUS "Lua51 found") ++ else(LUA51_FOUND) ++ message (FATAL_ERROR "Lua51 not found!") ++ endif(LUA51_FOUND) ++endif(USE_LUAJIT) + + mark_as_advanced(LUA_LIBRARY) + mark_as_advanced(LUA_INCLUDE_DIR) diff --git a/games-action/minetest/files/minetest-0.4.9-opengles.patch b/games-action/minetest/files/minetest-0.4.9-opengles.patch new file mode 100644 index 000000000000..eebfe280f967 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-opengles.patch @@ -0,0 +1,163 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Fri Nov 29 19:34:37 UTC 2013 + +This patch is currently not needed in this form, because gentoo irrlicht +does not yet have gles2 support. However this will be needed +once it does, so we can add a gles2 useflag. + +Also fixes +https://bugs.gentoo.org/show_bug.cgi?id=492804 + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -7,6 +7,7 @@ + mark_as_advanced(JSON_INCLUDE_DIR JSON_LIBRARY) + + option(ENABLE_CURL "Enable cURL support for fetching media" 1) ++option(ENABLE_GLES2 "Enable GLES2 support with irrlicht" 0) + + if (NOT ENABLE_CURL) + mark_as_advanced(CLEAR CURL_LIBRARY CURL_INCLUDE_DIR) +@@ -170,7 +171,10 @@ + + find_package(Sqlite3 REQUIRED) + find_package(Json REQUIRED) +-find_package(OpenGLES2) ++if(ENABLE_GLES2 AND BUILD_CLIENT) ++ find_package(OpenGLES2 REQUIRED) ++ add_definitions( -DWITH_GLES2 ) ++endif(ENABLE_GLES2 AND BUILD_CLIENT) + + if(USE_FREETYPE) + find_package(Freetype REQUIRED) +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -1331,10 +1331,12 @@ + else if(driverstring == "ogles1") + driverType = video::EDT_OGLES1; + #endif ++#ifdef WITH_GLES2 + #ifdef _IRR_COMPILE_WITH_OGLES2_ + else if(driverstring == "ogles2") + driverType = video::EDT_OGLES2; + #endif ++#endif + else + { + errorstream<<"WARNING: Invalid video_driver specified; defaulting " +--- a/cmake/Modules/FindOpenGLES2.cmake ++++ b/cmake/Modules/FindOpenGLES2.cmake +@@ -19,6 +19,7 @@ + # win32, apple, android NOT TESED + # linux tested and works + ++ + IF (WIN32) + IF (CYGWIN) + +@@ -47,51 +48,57 @@ + + ELSE(APPLE) + +- FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h +- /usr/openwin/share/include +- /opt/graphics/OpenGL/include /usr/X11R6/include +- /usr/include +- ) +- +- FIND_LIBRARY(OPENGLES2_gl_LIBRARY +- NAMES GLESv2 +- PATHS /opt/graphics/OpenGL/lib ++ # prefer pkg-config ++ INCLUDE(FindPkgConfig) ++ IF (PKG_CONFIG_FOUND) ++ pkg_check_modules(OPENGLES2 QUIET glesv2 egl) ++ ELSE (PKG_CONFIG_FOUND) ++ FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h ++ /usr/openwin/share/include ++ /opt/graphics/OpenGL/include /usr/X11R6/include ++ /usr/include ++ ) ++ ++ FIND_LIBRARY(OPENGLES2_gl_LIBRARY ++ NAMES GLESv2 ++ PATHS /opt/graphics/OpenGL/lib + /usr/openwin/lib + /usr/shlib /usr/X11R6/lib + /usr/lib +- ) ++ ) + +- IF (NOT BUILD_ANDROID) +- FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h +- /usr/openwin/share/include +- /opt/graphics/OpenGL/include /usr/X11R6/include +- /usr/include +- ) +- +- FIND_LIBRARY(EGL_egl_LIBRARY +- NAMES EGL +- PATHS /opt/graphics/OpenGL/lib +- /usr/openwin/lib +- /usr/shlib /usr/X11R6/lib +- /usr/lib +- ) +- +- # On Unix OpenGL most certainly always requires X11. +- # Feel free to tighten up these conditions if you don't +- # think this is always true. +- # It's not true on OSX. +- +- IF (OPENGLES2_gl_LIBRARY) +- IF(NOT X11_FOUND) +- INCLUDE(FindX11) +- ENDIF(NOT X11_FOUND) +- IF (X11_FOUND) +- IF (NOT APPLE) +- SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES}) +- ENDIF (NOT APPLE) +- ENDIF (X11_FOUND) +- ENDIF (OPENGLES2_gl_LIBRARY) +- ENDIF () ++ IF (NOT BUILD_ANDROID) ++ FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h ++ /usr/openwin/share/include ++ /opt/graphics/OpenGL/include /usr/X11R6/include ++ /usr/include ++ ) ++ ++ FIND_LIBRARY(EGL_egl_LIBRARY ++ NAMES EGL ++ PATHS /opt/graphics/OpenGL/lib ++ /usr/openwin/lib ++ /usr/shlib /usr/X11R6/lib ++ /usr/lib ++ ) ++ ++ # On Unix OpenGL most certainly always requires X11. ++ # Feel free to tighten up these conditions if you don't ++ # think this is always true. ++ # It's not true on OSX. ++ ++ IF (OPENGLES2_gl_LIBRARY) ++ IF(NOT X11_FOUND) ++ INCLUDE(FindX11) ++ ENDIF(NOT X11_FOUND) ++ IF (X11_FOUND) ++ IF (NOT APPLE) ++ SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES}) ++ ENDIF (NOT APPLE) ++ ENDIF (X11_FOUND) ++ ENDIF (OPENGLES2_gl_LIBRARY) ++ ENDIF (NOT BUILD_ANDROID) ++ ENDIF (PKG_CONFIG_FOUND) + + ENDIF(APPLE) + ENDIF (WIN32) +@@ -126,5 +133,5 @@ + IF(OPENGLES2_FOUND) + MESSAGE(STATUS "Found system opengles2 library ${OPENGLES2_LIBRARIES}") + ELSE () +- SET(OPENGLES2_LIBRARIES "") ++ MESSAGE(FATAL_ERROR "OpenGLES2 not found!") + ENDIF () diff --git a/games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch b/games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch new file mode 100644 index 000000000000..b552c0937039 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch @@ -0,0 +1,23 @@ +commit 11d35e62fe13b47c5b34139559e650dfe6ebbd84 +Author: hasufell <julian.ospald@googlemail.com> +Date: Sat Jun 8 13:40:30 2013 +0200 + + CMAKE: use shared lib from Irrlicht + +diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake +index bd00422..4632993 100644 +--- a/cmake/Modules/FindIrrlicht.cmake ++++ b/cmake/Modules/FindIrrlicht.cmake +@@ -50,10 +50,11 @@ else() + /usr/include/irrlicht + ) + +- FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht ++ FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.so Irrlicht + PATHS + /usr/local/lib + /usr/lib ++ /usr/lib64 + ) + endif() + |