summaryrefslogtreecommitdiff
path: root/user/xmoto/stupid-lua.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-10-01 00:25:50 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-10-01 00:26:20 +0000
commit9d2575759e27dfb59bd4bb52e6550d0db3e22433 (patch)
tree2c4c92c750e3665f5c8b3e9dcab40d7360d61ab7 /user/xmoto/stupid-lua.patch
parent56ebf9f5ea4febf3cebd848efa2b57b2b78a61b7 (diff)
downloadpackages-9d2575759e27dfb59bd4bb52e6550d0db3e22433.tar.gz
packages-9d2575759e27dfb59bd4bb52e6550d0db3e22433.tar.bz2
packages-9d2575759e27dfb59bd4bb52e6550d0db3e22433.tar.xz
packages-9d2575759e27dfb59bd4bb52e6550d0db3e22433.zip
user/xmoto: new package
Diffstat (limited to 'user/xmoto/stupid-lua.patch')
-rw-r--r--user/xmoto/stupid-lua.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/user/xmoto/stupid-lua.patch b/user/xmoto/stupid-lua.patch
new file mode 100644
index 000000000..d99a1ed4a
--- /dev/null
+++ b/user/xmoto/stupid-lua.patch
@@ -0,0 +1,41 @@
+--- xmoto-0.5.11/configure.in.old 2014-03-29 10:35:24.000000000 +0000
++++ xmoto-0.5.11/configure.in 2018-09-29 03:51:05.210000000 +0000
+@@ -174,6 +174,7 @@
+ AC_CHECK_HEADER(lua50/lua.h, AC_DEFINE(HAVE_LUA50_LUA_H) [USE_LUA_VERSION="5.0"])
+ AC_CHECK_HEADER(lua51/lua.h, AC_DEFINE(HAVE_LUA51_LUA_H) [USE_LUA_VERSION="5.1"])
+ AC_CHECK_HEADER(lua5.1/lua.h, AC_DEFINE(HAVE_LUA5_1_LUA_H)[USE_LUA_VERSION="5.1"])
++AC_CHECK_HEADER(lua5.3/lua.h, AC_DEFINE(HAVE_LUA5_3_LUA_H)[USE_LUA_VERSION="5.3"])
+ AC_DEFINE(LUA_COMPAT_MODULE, 1)
+
+ AC_LANG_PUSH([C++])
+--- xmoto-0.5.11/src/include/xm_lua.h.old 2011-10-11 20:18:17.000000000 +0000
++++ xmoto-0.5.11/src/include/xm_lua.h 2018-09-29 03:51:49.230000000 +0000
+@@ -4,7 +4,11 @@
+ #include "lauxlib.h"
+ #include "lualib.h"
+ #else
+- #if defined(HAVE_LUA5_1_LUA_H)
++ #if defined(HAVE_LUA5_3_LUA_H)
++ #include <lua5.3/lua.h>
++ #include <lua5.3/lauxlib.h>
++ #include <lua5.3/lualib.h>
++ #elif defined(HAVE_LUA5_1_LUA_H)
+ #include <lua5.1/lua.h>
+ #include <lua5.1/lauxlib.h>
+ #include <lua5.1/lualib.h>
+--- xmoto-0.5.11/src/LuaLibBase.cpp.old 2014-03-29 09:46:24.000000000 +0000
++++ xmoto-0.5.11/src/LuaLibBase.cpp 2018-09-30 23:34:51.800000000 +0000
+@@ -42,7 +42,13 @@
+ luaL_requiref(m_pL, LUA_TABLIBNAME, luaopen_table, 1);
+ #endif
+
++#if LUA_VERSION_NUM < 503
+ luaL_openlib(m_pL, i_libname.c_str(), i_reg, 0);
++#else
++ lua_newtable(m_pL);
++ luaL_setfuncs(m_pL, i_reg, 0);
++ lua_setglobal(m_pL, i_libname.c_str());
++#endif
+ }
+
+ LuaLibBase::~LuaLibBase() {