summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Heaven <nyhm@gentoo.org>2007-05-22 17:36:41 +0000
committerTristan Heaven <nyhm@gentoo.org>2007-05-22 17:36:41 +0000
commit661f8530cf46bbf5a8df1e7d4e26c68356467bed (patch)
treea0a1654fb0e222f25cad52487b9e3128c8ce1a50 /dev-games/cegui/files
parentFix unknown symbol error when build for 2.6.21 kernel (#179425). (diff)
downloadgentoo-2-661f8530cf46bbf5a8df1e7d4e26c68356467bed.tar.gz
gentoo-2-661f8530cf46bbf5a8df1e7d4e26c68356467bed.tar.bz2
gentoo-2-661f8530cf46bbf5a8df1e7d4e26c68356467bed.zip
Patch for lua 5.1 support from Devils-Hawk, bug #177670
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-games/cegui/files')
-rw-r--r--dev-games/cegui/files/cegui-0.5.0b-lua.patch93
-rw-r--r--dev-games/cegui/files/digest-cegui-0.5.0b-r23
2 files changed, 96 insertions, 0 deletions
diff --git a/dev-games/cegui/files/cegui-0.5.0b-lua.patch b/dev-games/cegui/files/cegui-0.5.0b-lua.patch
new file mode 100644
index 000000000000..f94a50335d29
--- /dev/null
+++ b/dev-games/cegui/files/cegui-0.5.0b-lua.patch
@@ -0,0 +1,93 @@
+--- acinclude.m4
++++ acinclude.m4
+@@ -539,6 +539,17 @@
+ AC_DEFUN([CEGUI_CHECK_LUA],[
+ PKG_CHECK_MODULES(Lua, lua >= 5.0 lua < 5.1, [cegui_found_lua=yes], [cegui_found_lua=no])
+
++ LUA_VERSION_FLAGS="";
++ if test x$cegui_found_lua = xno; then
++ PKG_CHECK_MODULES(Lua, lua >= 5.1, [cegui_found_lua=yes], [cegui_found_lua=no])
++
++ if test x$cegui_found_lua = xyes; then
++ LUA_VERSION_FLAGS="$LUA_VERSION_FLAGS -DLUA51"
++ AC_MSG_NOTICE([Lua version >=5.1])
++ fi
++ fi
++ AC_SUBST(LUA_VERSION_FLAGS)
++
+ AC_ARG_ENABLE([lua-module], AC_HELP_STRING([--disable-lua-module], [Disables building of the Lua scripting module.]),
+ [cegui_with_lua=$enableval], [cegui_with_lua=yes])
+ AC_ARG_ENABLE([toluacegui], AC_HELP_STRING([--enable-toluacegui], [Enables building of our custom tolua++ based binding generator tool, tolua++cegui.]),
+--- ScriptingModules/CEGUILua/LuaScriptModule/src/CEGUILua.cpp
++++ ScriptingModules/CEGUILua/LuaScriptModule/src/CEGUILua.cpp
+@@ -35,12 +35,10 @@
+
+ // include Lua libs and tolua++
+ extern "C" {
+-#include "lua.h"
++#include "tolua++.h"
+ #include "lualib.h"
+-#include "lauxlib.h"
+ }
+
+-#include "tolua++.h"
+
+ // prototype for bindings initialisation function
+ int tolua_CEGUI_open(lua_State* tolua_S);
+@@ -55,11 +53,36 @@
+ *************************************************************************/
+ LuaScriptModule::LuaScriptModule()
+ {
++#ifdef LUA51
++ static const luaL_Reg lualibs[] = {
++ {"", luaopen_base},
++ {LUA_LOADLIBNAME, luaopen_package},
++ {LUA_TABLIBNAME, luaopen_table},
++ {LUA_IOLIBNAME, luaopen_io},
++ {LUA_OSLIBNAME, luaopen_os},
++ {LUA_STRLIBNAME, luaopen_string},
++ {LUA_MATHLIBNAME, luaopen_math},
++#if defined(DEBUG) || defined (_DEBUG)
++ {LUA_DBLIBNAME, luaopen_debug},
++#endif
++ {NULL, NULL}
++ };
++#endif /* LUA51 */
++
+ // create a lua state
+ d_ownsState = true;
+ d_state = lua_open();
+
+ // init all standard libraries
++#ifdef LUA51
++ const luaL_Reg *lib = lualibs;
++ for (; lib->func; lib++)
++ {
++ lua_pushcfunction(d_state, lib->func);
++ lua_pushstring(d_state, lib->name);
++ lua_call(d_state, 1, 0);
++ }
++#else /* LUA51 */
+ luaopen_base(d_state);
+ luaopen_io(d_state);
+ luaopen_string(d_state);
+@@ -68,7 +91,7 @@
+ #if defined(DEBUG) || defined (_DEBUG)
+ luaopen_debug(d_state);
+ #endif
+-
++#endif /* LUA51 */
+ setModuleIdentifierString();
+ }
+
+--- ScriptingModules/CEGUILua/LuaScriptModule/src/Makefile.am
++++ ScriptingModules/CEGUILua/LuaScriptModule/src/Makefile.am
+@@ -1,6 +1,7 @@
+ INCLUDES = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/ScriptingModules/CEGUILua/tolua++ \
+- -I$(top_srcdir)/ScriptingModules/CEGUILua/LuaScriptModule/include
++ -I$(top_srcdir)/ScriptingModules/CEGUILua/LuaScriptModule/include \
++ ${LUA_VERSION_FLAGS}
+ lib_LTLIBRARIES = libCEGUILuaScriptModule.la
+
+ libCEGUILuaScriptModule_la_LDFLAGS = -version-info @CEGUI_VERSION_INFO@
diff --git a/dev-games/cegui/files/digest-cegui-0.5.0b-r2 b/dev-games/cegui/files/digest-cegui-0.5.0b-r2
new file mode 100644
index 000000000000..12103a3d99b2
--- /dev/null
+++ b/dev-games/cegui/files/digest-cegui-0.5.0b-r2
@@ -0,0 +1,3 @@
+MD5 b42322a33c6a06eede76b15f75694a17 CEGUI-0.5.0b.tar.gz 2240192
+RMD160 a60f5ee74315dc83db860cfa91f93449ed7b01f9 CEGUI-0.5.0b.tar.gz 2240192
+SHA256 50c1036f3adc741478966bf29a1e3104b983af8bfd82e201ed35ad2039e166ff CEGUI-0.5.0b.tar.gz 2240192