diff options
author | Tristan Heaven <nyhm@gentoo.org> | 2007-05-22 17:36:41 +0000 |
---|---|---|
committer | Tristan Heaven <nyhm@gentoo.org> | 2007-05-22 17:36:41 +0000 |
commit | 661f8530cf46bbf5a8df1e7d4e26c68356467bed (patch) | |
tree | a0a1654fb0e222f25cad52487b9e3128c8ce1a50 /dev-games/cegui | |
parent | Fix unknown symbol error when build for 2.6.21 kernel (#179425). (diff) | |
download | gentoo-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')
-rw-r--r-- | dev-games/cegui/ChangeLog | 8 | ||||
-rw-r--r-- | dev-games/cegui/cegui-0.5.0b-r2.ebuild | 83 | ||||
-rw-r--r-- | dev-games/cegui/files/cegui-0.5.0b-lua.patch | 93 | ||||
-rw-r--r-- | dev-games/cegui/files/digest-cegui-0.5.0b-r2 | 3 |
4 files changed, 186 insertions, 1 deletions
diff --git a/dev-games/cegui/ChangeLog b/dev-games/cegui/ChangeLog index f476b8d669a0..5bebff4bfc8f 100644 --- a/dev-games/cegui/ChangeLog +++ b/dev-games/cegui/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-games/cegui # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-games/cegui/ChangeLog,v 1.13 2007/05/04 16:51:30 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-games/cegui/ChangeLog,v 1.14 2007/05/22 17:36:41 nyhm Exp $ + +*cegui-0.5.0b-r2 (22 May 2007) + + 22 May 2007; Tristan Heaven <nyhm@gentoo.org> + +files/cegui-0.5.0b-lua.patch, +cegui-0.5.0b-r2.ebuild: + Patch for lua 5.1 support from Devils-Hawk, bug #177670 04 May 2007; Matti Bickel <mabi@gentoo.org> cegui-0.5.0b-r1.ebuild: ~ppc readded (bug #174055) diff --git a/dev-games/cegui/cegui-0.5.0b-r2.ebuild b/dev-games/cegui/cegui-0.5.0b-r2.ebuild new file mode 100644 index 000000000000..a45bf0df8196 --- /dev/null +++ b/dev-games/cegui/cegui-0.5.0b-r2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-games/cegui/cegui-0.5.0b-r2.ebuild,v 1.1 2007/05/22 17:36:41 nyhm Exp $ + +inherit autotools eutils + +MY_P=CEGUI-${PV} +DESCRIPTION="Crazy Eddie's GUI System" +HOMEPAGE="http://www.cegui.org.uk/" +SRC_URI="mirror://sourceforge/crayzedsgui/${MY_P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="devil doc examples expat freeimage lua opengl xerces-c xml" + +RDEPEND="dev-libs/libpcre + =media-libs/freetype-2* + devil? ( media-libs/devil ) + expat? ( dev-libs/expat ) + freeimage? ( media-libs/freeimage ) + lua? ( dev-lang/lua ) + opengl? ( virtual/opengl + virtual/glu + virtual/glut ) + xerces-c? ( dev-libs/xerces-c ) + xml? ( dev-libs/libxml2 )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + doc? ( app-doc/doxygen )" + +S=${WORKDIR}/${MY_P/b} + +src_unpack() { + unpack ${A} + cd "${S}" + if use examples ; then + cp -r Samples Samples.clean + rm -f $(find Samples.clean -name 'Makefile*') + rm -rf Samples.clean/bin + fi + epatch "${FILESDIR}"/${P}-lua.patch + eautoreconf +} + +src_compile() { + econf \ + $(use_enable devil) \ + $(use_enable examples samples) \ + $(use_enable expat) \ + $(use_enable freeimage) \ + $(use_enable lua lua-module) \ + $(use_enable lua toluacegui) \ + $(use_enable opengl opengl-renderer) \ + $(use_enable xerces-c) \ + $(use_enable xml libxml) \ + --enable-static \ + --enable-tga \ + --enable-tinyxml \ + --disable-corona \ + --disable-dependency-tracking \ + --disable-irrlicht-renderer \ + --disable-samples \ + --disable-silly \ + --without-gtk2 \ + --without-ogre-renderer \ + || die + emake || die "emake failed" + if use doc ; then + mkdir -p documentation/api_reference + doxygen || die "doxygen failed" + fi +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc AUTHORS ChangeLog README TODO + use doc && dohtml -r documentation/api_reference + if use examples ; then + insinto /usr/share/doc/${PF}/Samples + doins -r Samples.clean/* || die "doins failed" + fi +} 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 |