Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:RedDwarf:multimedia:games
funguloids
lua-5_2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lua-5_2.patch of Package funguloids
diff --git a/configure.ac b/configure.ac index 26febf5..3c5abdd 100644 --- a/configure.ac +++ b/configure.ac @@ -54,31 +54,12 @@ AC_CHECK_LIB(boost_system-gcc-mt, main, , [ ]) # LUA ---------------------------------------------------- -AC_LANG_PUSH(C) -AC_ARG_WITH(lua, -[ --with-lua[[=DIR]] specify the path to the Lua 5.1 include files [[autodetect]]], -[ - if test "x$withval" != "x"; then - lua_dir="$withval" - fi -],[ - lua_dir= +PKG_CHECK_MODULES(LUA, [lua >= 5.1],[],[ + PKG_CHECK_MODULES(LUA, [lua5.1 >= 5.1],[],[ + AC_MSG_ERROR(Lua 5.1 not found) + ]) ]) -FUNGU_SEARCH_HEADER( [lua.h], [$lua_dir /usr/local /usr], [ include/lua5.1 include/lua / ] ) -if test "x$FUNGU_FOUND_HEADER" = "xno"; then - PKG_CHECK_MODULES(LUA, [lua >= 5.1],[],[ - PKG_CHECK_MODULES(LUA, [lua5.1 >= 5.1],[],[ - AC_MSG_ERROR(Lua 5.1 not found. You can specify its location with [[--with-lua=/path/to/include/lua51]]) - ]) - ]) -else - CFLAGS="$CFLAGS $FUNGU_FOUND_HEADER" - CPPFLAGS="$CPPFLAGS $FUNGU_FOUND_HEADER" - LIBS="$LIBS -llua5.1" -fi -AC_LANG_POP - AC_SUBST(LUA_CFLAGS) AC_SUBST(LUA_LIBS) diff --git a/src/scriptsystem.cpp b/src/scriptsystem.cpp index 14600e1..4b00213 100644 --- a/src/scriptsystem.cpp +++ b/src/scriptsystem.cpp @@ -38,6 +38,11 @@ #include "mpakogre.h" #include <vector> +// Lua dropped with Lua5.2 +#ifndef lua_open +#define lua_open() luaL_newstate() +#endif + template<> ScriptSystem* Singleton<ScriptSystem>::msSingleton = 0; @@ -519,6 +524,7 @@ void ScriptSystem::destroyScriptLights() { // Execute a single string of script bool ScriptSystem::executeString(const char *str) { assert(mLuaVM); + luaL_openlibs(mLuaVM); if(luaL_dostring(mLuaVM, str)) return false; return true;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor