Patch for lua-5.1, bug #158652
authorTristan Heaven <tristan@gentoo.org>
Wed, 28 Feb 2007 16:12:55 +0000 (16:12 +0000)
committerTristan Heaven <tristan@gentoo.org>
Wed, 28 Feb 2007 16:12:55 +0000 (16:12 +0000)
Package-Manager: portage-2.1.2-r12

games-engines/stratagus/ChangeLog
games-engines/stratagus/Manifest
games-engines/stratagus/files/digest-stratagus-2.2.1 [deleted file]
games-engines/stratagus/files/stratagus-2.2.2-lua.patch [new file with mode: 0644]
games-engines/stratagus/stratagus-2.2.1.ebuild [deleted file]
games-engines/stratagus/stratagus-2.2.2.ebuild

index 369b5ff95f80564341dc872ca5d289da1d95264f..f9cc59aa7535537b7d46809db3606d8825f6fb16 100644 (file)
@@ -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)
 
index 93037b8ddcd3bc80cc23bfcc699264070c27c2e0..887b59b58db48bac67c88db6ec0a05121ff3677d 100644 (file)
@@ -5,25 +5,24 @@ AUX flac-1.1.3.patch 2332 RMD160 8018503ece12c6a7885a7de564009004b05c32ea SHA1 1
 MD5 7385442b8b647c32e3fe19dd9f68b734 files/flac-1.1.3.patch 2332
 RMD160 8018503ece12c6a7885a7de564009004b05c32ea files/flac-1.1.3.patch 2332
 SHA256 2b10d6657949c9b848129f97eaeee374ba6e5dac6644ec2daad6ca5e441570ab files/flac-1.1.3.patch 2332
+AUX stratagus-2.2.2-lua.patch 3372 RMD160 5232897a40937bb452dd2cebc11802252245cf8b SHA1 6b9e5eb930ba8ab2ebb068b5e727efef217ef5b5 SHA256 5638450e52480fb0f590a74709ad712a6972a5eb88b79183ec1ebc17ec341d75
+MD5 aa51b9c3e63cf5aca831dae6358491bd files/stratagus-2.2.2-lua.patch 3372
+RMD160 5232897a40937bb452dd2cebc11802252245cf8b files/stratagus-2.2.2-lua.patch 3372
+SHA256 5638450e52480fb0f590a74709ad712a6972a5eb88b79183ec1ebc17ec341d75 files/stratagus-2.2.2-lua.patch 3372
 DIST stratagus-2.1-src.tar.gz 995686 RMD160 f5f97854cad9f17104de34613012fd3aa2efbb9b SHA1 33181d57e018825a450f1e8c0ec31b0887cbd39c SHA256 1a5fb943ebc9422a18d165ba57deeae406d3d5e2cba171dfe15608732a22326b
-DIST stratagus-2.2.1-src.tar.gz 931163 RMD160 13666296e1846243c2cd38d0c49544f138bbbbcf SHA1 8442756ef237a0d8cfd47bd7e6551f2c2d54aaf1 SHA256 ec53f47c3e26fc86fa76e1952b58971c9a8acf6ef6af836a8b946f432526a4a6
 DIST stratagus-2.2.2-src.tar.gz 931693 RMD160 75bf6c4e2d7e3082172658087266f7730ff07420 SHA1 e5ae1475278fc007c196c2d10f61295bf50aafac SHA256 b01417a32358a4f234d2d093fff932e3dd526c1bdba1bf0b95fb6aed52e1c9be
 EBUILD stratagus-2.1.ebuild 1488 RMD160 3c7594e437e222bfb3f90524ac036f7427752cc4 SHA1 ace4ab4e79e9bac3d76f4ef8863d9c9c82baf0ba SHA256 3d8c0000934141247ae5b8ac48b92d4ca20560cbdb8aaa0ca01132f8a8383ac9
 MD5 3cd7fdf5ebb09b5ef4d4565586ca99c7 stratagus-2.1.ebuild 1488
 RMD160 3c7594e437e222bfb3f90524ac036f7427752cc4 stratagus-2.1.ebuild 1488
 SHA256 3d8c0000934141247ae5b8ac48b92d4ca20560cbdb8aaa0ca01132f8a8383ac9 stratagus-2.1.ebuild 1488
-EBUILD stratagus-2.2.1.ebuild 1387 RMD160 2f4c93420595351c818946f52a2ee1bf9329734f SHA1 f3959d4fbb819c986098ae5ff40dc069581bdf51 SHA256 8a0cfe932dbfcc91a4fc51e4791fca75e4a759daba3042958fbd0eea330adfab
-MD5 c70c0fec22399f4654404674d9479c26 stratagus-2.2.1.ebuild 1387
-RMD160 2f4c93420595351c818946f52a2ee1bf9329734f stratagus-2.2.1.ebuild 1387
-SHA256 8a0cfe932dbfcc91a4fc51e4791fca75e4a759daba3042958fbd0eea330adfab stratagus-2.2.1.ebuild 1387
-EBUILD stratagus-2.2.2.ebuild 1387 RMD160 326d3f6ceb1ccd6730aea5d2a8d121e1b0aaf3b0 SHA1 45c4d8cb059598e422383f9ee073d96097669b59 SHA256 cc59c4a3846ff5cdf3de41e743f390629cfad30a9f3af6721c0fdf532a1f5e11
-MD5 93101863d07edff93b0ad7b36950cf1a stratagus-2.2.2.ebuild 1387
-RMD160 326d3f6ceb1ccd6730aea5d2a8d121e1b0aaf3b0 stratagus-2.2.2.ebuild 1387
-SHA256 cc59c4a3846ff5cdf3de41e743f390629cfad30a9f3af6721c0fdf532a1f5e11 stratagus-2.2.2.ebuild 1387
-MISC ChangeLog 1758 RMD160 f8f1cfcfbcaa2554a477d4e7ca009dd27594be89 SHA1 3eca348fc9413f25678bb65efa7cb587048f8f39 SHA256 bdf6720132952b3355d8b1a41201a903b892df851ccd8668142ab3d982b14c92
-MD5 5ca2779f37a88cb36bdb48edef913320 ChangeLog 1758
-RMD160 f8f1cfcfbcaa2554a477d4e7ca009dd27594be89 ChangeLog 1758
-SHA256 bdf6720132952b3355d8b1a41201a903b892df851ccd8668142ab3d982b14c92 ChangeLog 1758
+EBUILD stratagus-2.2.2.ebuild 1431 RMD160 5fdabc5488f2d8203488817488ca33f74fe28d87 SHA1 f1d1ee946db0999e700dba654f1e92dd7a12bdc7 SHA256 4d051b3bc7e1b28a871ac6833b89605d3892eb193dc8e32a474dda42cd9621f8
+MD5 e1115d75f793ed20f6d660d45bd8ca00 stratagus-2.2.2.ebuild 1431
+RMD160 5fdabc5488f2d8203488817488ca33f74fe28d87 stratagus-2.2.2.ebuild 1431
+SHA256 4d051b3bc7e1b28a871ac6833b89605d3892eb193dc8e32a474dda42cd9621f8 stratagus-2.2.2.ebuild 1431
+MISC ChangeLog 1900 RMD160 69f7132a918f5982668e5019b369c012d23112cf SHA1 d8c6caf2e9e99030d49b07fcf38f024bfd204279 SHA256 e334d6c017c49ac3bdb643002aa8e84c6f2e426fb68404a4369f735c7a627ddf
+MD5 649e5d3372ee86cc946e0efdca2776b4 ChangeLog 1900
+RMD160 69f7132a918f5982668e5019b369c012d23112cf ChangeLog 1900
+SHA256 e334d6c017c49ac3bdb643002aa8e84c6f2e426fb68404a4369f735c7a627ddf ChangeLog 1900
 MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3
 MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea metadata.xml 158
@@ -31,16 +30,13 @@ SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3 metadata
 MD5 141d5838b904cda2e3a88ebda4ab3bcd files/digest-stratagus-2.1 253
 RMD160 07fd4259c4ee74b7414c07c1a578e083622dd421 files/digest-stratagus-2.1 253
 SHA256 ceadacde233f36a29b09ea539172dad0496d303884c9c41f7b39a8b5c00d8642 files/digest-stratagus-2.1 253
-MD5 95568f1a3ce4e181a957077d91409d89 files/digest-stratagus-2.2.1 259
-RMD160 4152e798d137dcdee9486d4015604eb92ec7d378 files/digest-stratagus-2.2.1 259
-SHA256 b723040c1302690d5b171dfcced890f133a5aaab62a3e4234d47fefacde9a712 files/digest-stratagus-2.2.1 259
 MD5 2b96508e7b92e3f40dc61e742cfd1592 files/digest-stratagus-2.2.2 259
 RMD160 d939ad9b9fe9fa2ba2b0de8563fa3b1cf73e0416 files/digest-stratagus-2.2.2 259
 SHA256 df94bb9aa699c26c45c2f3f1ba236d0b345977064f396009475b4386f0871e1f files/digest-stratagus-2.2.2 259
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.1 (GNU/Linux)
+Version: GnuPG v2.0.2 (GNU/Linux)
 
-iD8DBQFFq4sDdz7hIScOURERAvlmAKC6ie35FROO49AzHewnfAH05iRd8wCeKiYF
-R53QFdRyx6Z6xYVGdivkwYI=
-=5vss
+iD8DBQFF5aoOdz7hIScOURERAgPsAKDpu+yo9VbeSafrHhFTL0t5mpzQ8gCg6xlm
+XPOfR6es94NKxhJtBMc0j8I=
+=Wycw
 -----END PGP SIGNATURE-----
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 (file)
index 2f11c75..0000000
+++ /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 (file)
index 0000000..5bcb2a0
--- /dev/null
@@ -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 (file)
index ff27ec1..0000000
+++ /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
-}
index 5f7775f9cef77f80bd69253c0c89d0349436cd4a..3df08f379ac02786917dcb8ffb45a38c4bfa0a5d 100644 (file)
@@ -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() {