diff options
author | Tristan Heaven <nyhm@gentoo.org> | 2007-02-28 16:12:55 +0000 |
---|---|---|
committer | Tristan Heaven <nyhm@gentoo.org> | 2007-02-28 16:12:55 +0000 |
commit | af3d19b661e27caf3f21ee18dd86b3074072901b (patch) | |
tree | 47c025534136c46a8dd26881b285094e862e39e6 | |
parent | Clean out old versions. Resolve bug #163983 with using emake instead of make. (diff) | |
download | gentoo-2-af3d19b661e27caf3f21ee18dd86b3074072901b.tar.gz gentoo-2-af3d19b661e27caf3f21ee18dd86b3074072901b.tar.bz2 gentoo-2-af3d19b661e27caf3f21ee18dd86b3074072901b.zip |
Patch for lua-5.1, bug #158652
(Portage version: 2.1.2-r12)
-rw-r--r-- | games-engines/stratagus/ChangeLog | 6 | ||||
-rw-r--r-- | games-engines/stratagus/files/digest-stratagus-2.2.1 | 3 | ||||
-rw-r--r-- | games-engines/stratagus/files/stratagus-2.2.2-lua.patch | 108 | ||||
-rw-r--r-- | games-engines/stratagus/stratagus-2.2.1.ebuild | 61 | ||||
-rw-r--r-- | games-engines/stratagus/stratagus-2.2.2.ebuild | 5 |
5 files changed, 116 insertions, 67 deletions
diff --git a/games-engines/stratagus/ChangeLog b/games-engines/stratagus/ChangeLog index 369b5ff95f80..f9cc59aa7535 100644 --- a/games-engines/stratagus/ChangeLog +++ b/games-engines/stratagus/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-engines/stratagus # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-engines/stratagus/ChangeLog,v 1.12 2007/01/15 14:09:00 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-engines/stratagus/ChangeLog,v 1.13 2007/02/28 16:12:55 nyhm Exp $ + + 28 Feb 2007; Tristan Heaven <nyhm@gentoo.org> + +files/stratagus-2.2.2-lua.patch, stratagus-2.2.2.ebuild: + Patch for lua-5.1, bug #158652 *stratagus-2.2.2 (15 Jan 2007) diff --git a/games-engines/stratagus/files/digest-stratagus-2.2.1 b/games-engines/stratagus/files/digest-stratagus-2.2.1 deleted file mode 100644 index 2f11c754e4f3..000000000000 --- a/games-engines/stratagus/files/digest-stratagus-2.2.1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 f7c898f0468d37de9261fbe924a43546 stratagus-2.2.1-src.tar.gz 931163 -RMD160 13666296e1846243c2cd38d0c49544f138bbbbcf stratagus-2.2.1-src.tar.gz 931163 -SHA256 ec53f47c3e26fc86fa76e1952b58971c9a8acf6ef6af836a8b946f432526a4a6 stratagus-2.2.1-src.tar.gz 931163 diff --git a/games-engines/stratagus/files/stratagus-2.2.2-lua.patch b/games-engines/stratagus/files/stratagus-2.2.2-lua.patch new file mode 100644 index 000000000000..5bcb2a05c5c3 --- /dev/null +++ b/games-engines/stratagus/files/stratagus-2.2.2-lua.patch @@ -0,0 +1,108 @@ +--- src/tolua/tolua.cpp ++++ src/tolua/tolua.cpp +@@ -16179,7 +16179,12 @@ + 10,115,101,116,109,101,116, 97,116, 97, 98,108,101, 40, 85, + 110,105,116, 84,121,112,101,115, 44, 32,109,116, 41,32 + }; ++#if LUA_VERSION_NUM >= 501 ++ luaL_loadbuffer(tolua_S, (char *)B,sizeof(B),"tolua: embedded Lua code 1"); ++ lua_pcall(tolua_S, 0, 0, lua_gettop(tolua_S)); ++#else + lua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code 1"); ++#endif + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + +@@ -16242,7 +16247,12 @@ + 111,110, 76,105,115,116,101,110,101,114, 58,110,101,119, 40, + 102, 41, 10,101,110,100,32 + }; ++#if LUA_VERSION_NUM >= 501 ++ luaL_loadbuffer(tolua_S, (char *)B,sizeof(B),"tolua: embedded Lua code 1"); ++ lua_pcall(tolua_S, 0, 0, lua_gettop(tolua_S)); ++#else + lua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code 2"); ++#endif + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + +@@ -16490,7 +16500,12 @@ + 105,115,116,101,110,101,114, 40,119, 46, 95, 97, 99,116,105, + 111,110, 99, 98, 41, 10,101,110,100,32 + }; ++#if LUA_VERSION_NUM >= 501 ++ luaL_loadbuffer(tolua_S, (char *)B,sizeof(B),"tolua: embedded Lua code 1"); ++ lua_pcall(tolua_S, 0, 0, lua_gettop(tolua_S)); ++#else + lua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code 3"); ++#endif + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + +@@ -16886,7 +16901,12 @@ + 110,100, 10,114,101,116,117,114,110, 32,109,101,110,117, 10, + 101,110,100,32 + }; ++#if LUA_VERSION_NUM >= 501 ++ luaL_loadbuffer(tolua_S, (char *)B,sizeof(B),"tolua: embedded Lua code 1"); ++ lua_pcall(tolua_S, 0, 0, lua_gettop(tolua_S)); ++#else + lua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code 4"); ++#endif + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + +@@ -17086,7 +17106,12 @@ + 101,110,101,114, 58,110,101,119, 40, 99, 97,108,108, 98, 97, + 99,107, 41, 41, 10,101,110,100,32 + }; ++#if LUA_VERSION_NUM >= 501 ++ luaL_loadbuffer(tolua_S, (char *)B,sizeof(B),"tolua: embedded Lua code 5"); ++ lua_pcall(tolua_S, 0, 0, lua_gettop(tolua_S)); ++#else + lua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code 5"); ++#endif + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + +--- src/tolua/tolua_map.cpp ++++ src/tolua/tolua_map.cpp +@@ -152,7 +152,11 @@ + { + lua_pop(L,1); /* clear metatable off stack */ + /* force garbage collection to avoid C to reuse a to-be-collected address */ ++ #if LUA_VERSION_NUM >= 501 ++ lua_gc(L, LUA_GCCOLLECT, 0); ++ #else + lua_setgcthreshold(L,0); ++ #endif + success = tolua_register_gc(L,1); + } + } +@@ -169,7 +173,11 @@ + { + void* u = *((void**)lua_touserdata(L,1)); + /* force garbage collection to avoid releasing a to-be-collected address */ ++ #if LUA_VERSION_NUM >= 501 ++ lua_gc(L, LUA_GCCOLLECT, 0); ++ #else + lua_setgcthreshold(L,0); ++ #endif + lua_pushstring(L,"tolua_gc"); + lua_rawget(L,LUA_REGISTRYINDEX); + lua_pushlightuserdata(L,u); +--- src/tolua/tolua_to.cpp ++++ src/tolua/tolua_to.cpp +@@ -95,7 +95,11 @@ + void* v; + lua_pushnumber(L,index); + lua_gettable(L,lo); +- v = lua_isnil(L,-1) ? def : lua_unboxpointer(L,-1); ++#if LUA_VERSION_NUM >= 501 ++ v = lua_isnil(L,-1) ? def : lua_touserdata(L,-1); ++#else ++ v = lua_isnil(L,-1) ? def : lua_touserdata(L,-1); ++#endif + lua_pop(L,1); + return v; + } diff --git a/games-engines/stratagus/stratagus-2.2.1.ebuild b/games-engines/stratagus/stratagus-2.2.1.ebuild deleted file mode 100644 index ff27ec1dd1cd..000000000000 --- a/games-engines/stratagus/stratagus-2.2.1.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-engines/stratagus/stratagus-2.2.1.ebuild,v 1.2 2007/01/12 21:53:05 nyhm Exp $ - -inherit games - -DESCRIPTION="A realtime strategy game engine" -HOMEPAGE="http://www.stratagus.org/" -SRC_URI="mirror://sourceforge/stratagus/${P}-src.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="bzip2 debug doc mikmod mng opengl theora vorbis" - -RDEPEND="x11-libs/libX11 - >=dev-lang/lua-5 - media-libs/libpng - media-libs/libsdl - mikmod? ( media-libs/libmikmod ) - mng? ( media-libs/libmng ) - opengl? ( virtual/opengl ) - theora? ( media-libs/libtheora ) - vorbis? ( media-libs/libvorbis )" -DEPEND="${RDEPEND} - doc? ( app-doc/doxygen )" - -src_unpack() { - unpack ${A} - cd "${S}" - sed -i \ - -e '/SDLCONFIG --libs/s:"$: -lX11":' \ - -e 's/-O.*\(-fsigned-char\).*/\1"/' \ - configure \ - || die "sed failed" -} - -src_compile() { - econf \ - $(use_enable debug) \ - $(use_with bzip2) \ - $(use_with mikmod) \ - $(use_with mng) \ - $(use_with opengl) \ - $(use_with theora) \ - $(use_with vorbis) \ - || die - emake -j1 || die "emake failed" - - if use doc ; then - emake doc || die "emake doc failed" - fi -} - -src_install() { - dogamesbin stratagus || die "dogamesbin failed" - dodoc README - dohtml -r doc/* - use doc && dohtml -r srcdoc/html/* - prepgamesdirs -} diff --git a/games-engines/stratagus/stratagus-2.2.2.ebuild b/games-engines/stratagus/stratagus-2.2.2.ebuild index 5f7775f9cef7..3df08f379ac0 100644 --- a/games-engines/stratagus/stratagus-2.2.2.ebuild +++ b/games-engines/stratagus/stratagus-2.2.2.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-engines/stratagus/stratagus-2.2.2.ebuild,v 1.1 2007/01/15 14:09:00 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-engines/stratagus/stratagus-2.2.2.ebuild,v 1.2 2007/02/28 16:12:55 nyhm Exp $ -inherit games +inherit eutils games DESCRIPTION="A realtime strategy game engine" HOMEPAGE="http://www.stratagus.org/" @@ -33,6 +33,7 @@ src_unpack() { -e 's/-O.*\(-fsigned-char\).*/\1"/' \ configure \ || die "sed failed" + epatch "${FILESDIR}"/${P}-lua.patch } src_compile() { |