diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-11-09 10:41:26 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-11-09 10:41:26 +0000 |
commit | bbaa3499a8032234fb44af5b951e8e73d10c57e2 (patch) | |
tree | 6e7ff2dca33a2696784b23fcede912ae42769e4f /community/minetest/shared-lua.patch | |
parent | 4491f635313e9c287c6b3789aae7fcdac3130c51 (diff) | |
download | aports-bbaa3499a8032234fb44af5b951e8e73d10c57e2.tar.bz2 aports-bbaa3499a8032234fb44af5b951e8e73d10c57e2.tar.xz |
community/minetest: move from main
Diffstat (limited to 'community/minetest/shared-lua.patch')
-rw-r--r-- | community/minetest/shared-lua.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/community/minetest/shared-lua.patch b/community/minetest/shared-lua.patch new file mode 100644 index 0000000000..c31c8514ea --- /dev/null +++ b/community/minetest/shared-lua.patch @@ -0,0 +1,37 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -215,8 +215,6 @@ + message (STATUS "LuaJIT headers: ${LUA_INCLUDE_DIR}") + else (NOT ${DISABLE_LUAJIT} MATCHES "1") + message (STATUS "LuaJIT detection disabled! (DISABLE_LUAJIT=1)") +- set(LUA_LIBRARY "") +- set(LUA_INCLUDE_DIR "") + endif (NOT DISABLE_LUAJIT) + + set(USE_LUAJIT 0) +@@ -267,11 +265,22 @@ + endif (VALID_LUAJIT_VERSION) + endif (LUA_LIBRARY AND LUA_INCLUDE_DIR) + ++OPTION(WITH_BUNDLED_LUA "Use bundled lua") ++ + if(NOT USE_LUAJIT) + message (STATUS "LuaJIT not found, using bundled Lua.") +- set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") +- set(LUA_LIBRARY "lua") +- add_subdirectory(lua) ++ if (WITH_BUNDLED_LUA) ++ set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") ++ set(LUA_LIBRARY "lua") ++ add_subdirectory(lua) ++ else (WITH_BUNDLED_LUA) ++ find_package(Lua51) ++ if(LUA51_FOUND) ++ message (STATUS "Lua51 found") ++ else(LUA51_FOUND) ++ message (FATAL_ERROR "Lua51 not found!") ++ endif(LUA51_FOUND) ++ endif(WITH_BUNDLED_LUA) + endif(NOT USE_LUAJIT) + + mark_as_advanced(LUA_LIBRARY) |