diff options
author | Matti Bickel <mabi@gentoo.org> | 2008-05-15 11:35:17 +0000 |
---|---|---|
committer | Matti Bickel <mabi@gentoo.org> | 2008-05-15 11:35:17 +0000 |
commit | 7622cbd2065f3c1d6633882ed312f2da11af5c56 (patch) | |
tree | 1f73f53f20bcc7884a243c0a9db9728e0f744e94 /dev-lang/lua | |
parent | Removed net-wireless/rt2x00 wrt bug 207697. (diff) | |
download | historical-7622cbd2065f3c1d6633882ed312f2da11af5c56.tar.gz historical-7622cbd2065f3c1d6633882ed312f2da11af5c56.tar.bz2 historical-7622cbd2065f3c1d6633882ed312f2da11af5c56.zip |
bump including some serious crash fixes
Package-Manager: portage-2.1.5_rc10
Diffstat (limited to 'dev-lang/lua')
-rw-r--r-- | dev-lang/lua/ChangeLog | 11 | ||||
-rw-r--r-- | dev-lang/lua/Manifest | 17 | ||||
-rw-r--r-- | dev-lang/lua/files/5.1.3/05_validator.upstream.patch | 44 | ||||
-rw-r--r-- | dev-lang/lua/files/5.1.3/06_c_stack.upstream.patch | 21 | ||||
-rw-r--r-- | dev-lang/lua/files/5.1.3/07_validator2.upstream.patch | 25 | ||||
-rw-r--r-- | dev-lang/lua/files/5.1.3/08_code_injection.upstream.patch | 12 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.1.3-r2.ebuild | 109 |
7 files changed, 237 insertions, 2 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog index ee9d7e53f043..6f2bf6ac87b7 100644 --- a/dev-lang/lua/ChangeLog +++ b/dev-lang/lua/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-lang/lua # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.98 2008/02/21 20:38:22 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.99 2008/05/15 11:35:16 mabi Exp $ + +*lua-5.1.3-r2 (15 May 2008) + + 15 May 2008; Matti Bickel <mabi@gentoo.org> + +files/5.1.3/05_validator.upstream.patch, + +files/5.1.3/06_c_stack.upstream.patch, + +files/5.1.3/07_validator2.upstream.patch, + +files/5.1.3/08_code_injection.upstream.patch, +lua-5.1.3-r2.ebuild: + bump including some serious crash fixes. see http://www.lua.org/bugs.html 21 Feb 2008; Jeroen Roovers <jer@gentoo.org> lua-5.1.2-r2.ebuild: Stable for HPPA (bug #210517). diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest index b2689fd338b3..25c588651c0b 100644 --- a/dev-lang/lua/Manifest +++ b/dev-lang/lua/Manifest @@ -1,7 +1,14 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX 5.1.3/01_all_LUAI_MAXCSTACK.upstream.patch 685 RMD160 5e82432ff598210a1c3bbda5d60c46622fe4254c SHA1 7c40bb5f0aa73f93d4e58ec061fd9b41df63b6f9 SHA256 e99f4e7c481d4ab3b6773f7255e55da3fb6e37f0da51f00db93dd0cd8d10e47a AUX 5.1.3/02_all_coroutine.resume.upstream.patch 531 RMD160 1acef8e4257bf1cb96844fc210d3cd9ffab03fd6 SHA1 f70429a1b517c3f9b132b428abacf51a2a02d9e4 SHA256 ede1d6684c29b5710881def9c4edb429434321085c0478db7a1e5faaf4054c5c AUX 5.1.3/03_all_lua_checkstack.upstream.patch 668 RMD160 b22b556f656cdd20743821d59f73b0e0f2f42167 SHA1 a13e42918f25f3c595a41a1eac6716e943fad00c SHA256 89c8aa6e4e65f1c7dfd2be7992ce9d6df27ead7dc661bddf94d3049b8bf714df AUX 5.1.3/04_all_unpack.upstream.patch 878 RMD160 20241153fa5da7aa8b2fc598d292bdbaa5ad4a85 SHA1 24fa9d049f24600969f0f289c4c6f9cbeab8befc SHA256 cfbb531a9478d2091466d4fc18b5b0ab4b10c4460d225c6ffcdd3caa3f4b95bd +AUX 5.1.3/05_validator.upstream.patch 1571 RMD160 288a9ffaf53847c8bc6fce1483002fc639512624 SHA1 762963bac7242ed86d31b1f3f387b6bb0b528bc9 SHA256 015ae3ffc49957c41a35752599a49cd9729e17e844cbcf447522ab66a926ad95 +AUX 5.1.3/06_c_stack.upstream.patch 687 RMD160 8d40785667bb2325e6351be5a29e763eee2cd699 SHA1 66b208f77a55cc42166153e437c00f30dc8c97a7 SHA256 57f42771904b85af6b188143e14a61536a14f400e6370c08b75d3d8ace4cbbb0 +AUX 5.1.3/07_validator2.upstream.patch 1173 RMD160 644c141234f34c8bcf58dab833b6e6f9ba60414b SHA1 3d3395a79a8ec67d4bde83ce12f80b589b60992e SHA256 3ed0d8b61933ade959ae480067c345a2939e3e5191026caed0f0db9eec934449 +AUX 5.1.3/08_code_injection.upstream.patch 394 RMD160 199f6c4feff370ef892cdc2b21fab42f64bf78b6 SHA1 3d7a7c5b2b581cb5568799af81e0e91ca7659719 SHA256 6183ac486a90f81250dbecbcaae91ac4882c5dba19dae2d7385b5d1bc3fbccee AUX lua-5.1-make.patch 2154 RMD160 1e206468e137806a6c697ba040471d76948552c9 SHA1 c0dee37792e824265d4a9cd95d41df8654cbd647 SHA256 468a00db23bec0f6ddff3a9debf011bd3df0c95eae55b606315f9ed984227e23 AUX lua-5.1-make_static.patch 552 RMD160 1ca1c74daee2845369f13a80773755301b1d5184 SHA1 2d49989dbfd730edafac1444fd09a824a8f649b5 SHA256 dac0400c15e5ad9b77ade7e981acde3c111b51e834427280e9fdcdbbcef05812 AUX lua-5.1-module_paths.patch 1078 RMD160 31a3f13af427bdcae784e21a9456f9197c59379e SHA1 50cb1438b7c50536ebf712d16d153eac40599562 SHA256 1115b6aa00eb4e918156ae70c763534bd2f603ba888da75e4908c19c2ac3e5f7 @@ -13,6 +20,14 @@ DIST lua-5.1.3.tar.gz 215817 RMD160 1c5979dd4986057fef325aa2af0c872bbecab92e SHA EBUILD lua-5.1.1-r2.ebuild 2710 RMD160 7bbb61441726d96daef4137a756c9b03464a16ae SHA1 47c1f20bad74033c278e1e7573354fe0940526e4 SHA256 9aa83b2dc6c1c7e881868820496deeef4e130190c23a61479d26e38e85ffdb39 EBUILD lua-5.1.2-r2.ebuild 2836 RMD160 60e58213c93f4ba8e8fb6c7eee940cd707da7ab7 SHA1 d3482902c29d56853157bcef6f981f0dbf6b3241 SHA256 0fbdf5bac259359c42a031dbd14a2c564fb5d1583ec8b1cebb86d9dc62d89cd7 EBUILD lua-5.1.3-r1.ebuild 2952 RMD160 f27312dc9dd7daeab54ee501f0b7f89a36265400 SHA1 afd8d3a5167a95257823058b693dd1bf8bf0ad62 SHA256 49baa477db01d36587ec9b2851252c4975a964263435661111c0355ec64990b4 +EBUILD lua-5.1.3-r2.ebuild 2952 RMD160 854ffcc2ff020993410a057eeaad6ff16f82319c SHA1 68624ef88ff1133db0260c6eda026019f841e69c SHA256 e15c07e8804cf862bfe4b465a6ecb44caefd88c89fb71078533b27d613388e9e EBUILD lua-5.1.3.ebuild 2687 RMD160 64d582b7bdce73475522a2b3f89e6cd5cd143928 SHA1 3118f33c2b02ab8f793fd49cf871e1a0150a4cff SHA256 064fcb32f083e9563f62b3f351c2e78356e6db93f69122b0cd26697c1f435e0f -MISC ChangeLog 14149 RMD160 5079ce99afea266ae2c1a74c49ac54d1e9d54af1 SHA1 ca77c128baf32101a341fbd635c2aa3d5b88b386 SHA256 c0704c2d93bfd4ab05ebacd71fd79d54fd9d6c88b86a73edc79730cbfa8310aa +MISC ChangeLog 14504 RMD160 98d3438279f7964682265dd650dcf67af6594913 SHA1 3673a7fdf35c6ef73055ef0a91d25f37e8c4a22e SHA256 b1829e9097f48f83deaf5f971caed3253180bda7fc7c8727752067a65d8dccb1 MISC metadata.xml 246 RMD160 d8be15833db0ddabf74171f9e87a2a930ad6bcd2 SHA1 76fdc0af8e2d1dbb1214b95c49f8cd2da3d3832a SHA256 6a089a75a70b3b69d4cae78762fdc69afa25678c5b8692c61245f50bc49ab531 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkgsIH4ACgkQfNMcoUhJ7GwZGACfUSW3OPvIpcgFVq6m5X6OKTKc +WH0AoJvv+Qgj2neHLF29zaabworfDtGv +=sxUy +-----END PGP SIGNATURE----- diff --git a/dev-lang/lua/files/5.1.3/05_validator.upstream.patch b/dev-lang/lua/files/5.1.3/05_validator.upstream.patch new file mode 100644 index 000000000000..3a32d06eac23 --- /dev/null +++ b/dev-lang/lua/files/5.1.3/05_validator.upstream.patch @@ -0,0 +1,44 @@ +diff -rdu lua-5.1.3.orig/src/ldebug.c lua-5.1.3/src/ldebug.c +--- lua-5.1.3.orig/src/ldebug.c 2008-02-12 16:17:59.000000000 +0000 ++++ lua-5.1.3/src/ldebug.c 2008-02-12 16:26:32.000000000 +0000 +@@ -275,12 +275,12 @@ + + static int precheck (const Proto *pt) { + check(pt->maxstacksize <= MAXSTACK); +- lua_assert(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize); +- lua_assert(!(pt->is_vararg & VARARG_NEEDSARG) || ++ check(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize); ++ check(!(pt->is_vararg & VARARG_NEEDSARG) || + (pt->is_vararg & VARARG_HASARG)); + check(pt->sizeupvalues <= pt->nups); + check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0); +- check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); ++ check(pt->sizecode > 0 && GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); + return 1; + } + +@@ -363,7 +363,11 @@ + } + switch (op) { + case OP_LOADBOOL: { +- check(c == 0 || pc+2 < pt->sizecode); /* check its jump */ ++ if (c == 1) { /* does it jump? */ ++ check(pc+2 < pt->sizecode); /* check its jump */ ++ check(GET_OPCODE(pt->code[pc+1]) != OP_SETLIST || ++ GETARG_C(pt->code[pc+1]) != 0); ++ } + break; + } + case OP_LOADNIL: { +@@ -428,7 +432,10 @@ + } + case OP_SETLIST: { + if (b > 0) checkreg(pt, a + b); +- if (c == 0) pc++; ++ if (c == 0) { ++ pc++; ++ check(pc < pt->sizecode - 1); ++ } + break; + } + case OP_CLOSURE: { diff --git a/dev-lang/lua/files/5.1.3/06_c_stack.upstream.patch b/dev-lang/lua/files/5.1.3/06_c_stack.upstream.patch new file mode 100644 index 000000000000..746acbf58972 --- /dev/null +++ b/dev-lang/lua/files/5.1.3/06_c_stack.upstream.patch @@ -0,0 +1,21 @@ +diff -rdu lua-5.1.3.orig/src/lundump.c lua-5.1.3/src/lundump.c +--- lua-5.1.3.orig/src/lundump.c 2008-02-12 16:17:59.000000000 +0000 ++++ lua-5.1.3/src/lundump.c 2008-02-12 16:26:32.000000000 +0000 +@@ -161,7 +160,9 @@ + + static Proto* LoadFunction(LoadState* S, TString* p) + { +- Proto* f=luaF_newproto(S->L); ++ Proto* f; ++ if (++S->L->nCcalls > LUAI_MAXCCALLS) error(S,"code too deep"); ++ f=luaF_newproto(S->L); + setptvalue2s(S->L,S->L->top,f); incr_top(S->L); + f->source=LoadString(S); if (f->source==NULL) f->source=p; + f->linedefined=LoadInt(S); +@@ -175,6 +176,7 @@ + LoadDebug(S,f); + IF (!luaG_checkcode(f), "bad code"); + S->L->top--; ++ S->L->nCcalls--; + return f; + } diff --git a/dev-lang/lua/files/5.1.3/07_validator2.upstream.patch b/dev-lang/lua/files/5.1.3/07_validator2.upstream.patch new file mode 100644 index 000000000000..209d9ab30784 --- /dev/null +++ b/dev-lang/lua/files/5.1.3/07_validator2.upstream.patch @@ -0,0 +1,25 @@ +diff -rdu lua-5.1.3.orig/src/ldebug.c lua-5.1.3/src/ldebug.c +--- lua-5.1.3.orig/src/ldebug.c 2008-02-12 16:17:59.000000000 +0000 ++++ lua-5.1.3/src/ldebug.c 2008-02-12 16:26:32.000000000 +0000 +@@ -346,9 +346,18 @@ + int dest = pc+1+b; + check(0 <= dest && dest < pt->sizecode); + if (dest > 0) { +- /* cannot jump to a setlist count */ +- Instruction d = pt->code[dest-1]; +- check(!(GET_OPCODE(d) == OP_SETLIST && GETARG_C(d) == 0)); ++ int j; ++ /* check that it does not jump to a setlist count; this ++ is tricky, because the count from a previous setlist may ++ have the same value of an invalid setlist; so, we must ++ go all the way back to the first of them (if any) */ ++ for (j = 0; j < dest; j++) { ++ Instruction d = pt->code[dest-1-j]; ++ if (!(GET_OPCODE(d) == OP_SETLIST && GETARG_C(d) == 0)) break; ++ } ++ /* if 'j' is even, previous value is not a setlist (even if ++ it looks like one) */ ++ check((j&1) == 0); + } + } + break; diff --git a/dev-lang/lua/files/5.1.3/08_code_injection.upstream.patch b/dev-lang/lua/files/5.1.3/08_code_injection.upstream.patch new file mode 100644 index 000000000000..4d605cdb0c16 --- /dev/null +++ b/dev-lang/lua/files/5.1.3/08_code_injection.upstream.patch @@ -0,0 +1,12 @@ +diff -ur lua-5.1.3.orig/src/lundump.c lua-5.1.3/src/lundump.c +--- lua-5.1.3.orig/src/lundump.c 2008-05-15 09:24:32.000000000 +0200 ++++ lua-5.1.3/src/lundump.c 2008-05-15 09:25:18.000000000 +0200 +@@ -115,7 +115,7 @@ + setnilvalue(o); + break; + case LUA_TBOOLEAN: +- setbvalue(o,LoadChar(S)); ++ setbvalue(o,LoadChar(S)!=0); + break; + case LUA_TNUMBER: + setnvalue(o,LoadNumber(S)); diff --git a/dev-lang/lua/lua-5.1.3-r2.ebuild b/dev-lang/lua/lua-5.1.3-r2.ebuild new file mode 100644 index 000000000000..96b96e6aa226 --- /dev/null +++ b/dev-lang/lua/lua-5.1.3-r2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.1.3-r2.ebuild,v 1.1 2008/05/15 11:35:16 mabi Exp $ + +inherit eutils portability versionator + +DESCRIPTION="A powerful light-weight programming language designed for extending applications" +HOMEPAGE="http://www.lua.org/" +SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="deprecated readline static" + +DEPEND="readline? ( sys-libs/readline )" + +src_unpack() { + local PATCH_PV=$(get_version_component_range 1-2) + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch + + EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch + + # correct lua versioning + sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:3:1/' src/Makefile + + sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html + + if ! use deprecated ; then + epatch "${FILESDIR}"/${P}-deprecated.patch + fi + + if ! use readline ; then + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch + fi + + # Using dynamic linked lua is not recommended upstream for performance + # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 + # Mainly, this is of concern if your arch is poor with GPRs, like x86 + # Not that this only affects the interpreter binary (named lua), not the lua + # compiler (built statically) nor the lua libraries (both shared and static + # are installed) + if use static ; then + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static.patch + fi + + # We want packages to find our things... + sed -i -e 's:/usr/local:/usr:' etc/lua.pc +} + +src_compile() { + myflags= + # what to link to liblua + liblibs="-lm" + mycflags="${mycflags} -DLUA_USE_LINUX" + liblibs="${liblibs} $(dlopen_lib)" + + # what to link to the executables + mylibs= + if use readline; then + mylibs="-lreadline" + fi + + cd src + emake CFLAGS="${mycflags} ${CFLAGS}" \ + RPATH="/usr/$(get_libdir)/" \ + LUA_LIBS="${mylibs}" \ + LIB_LIBS="${liblibs}" \ + V=${PV} \ + gentoo_all || die "emake failed" + + mv lua_test ../test/lua.static +} + +src_install() { + emake INSTALL_TOP="${D}/usr/" INSTALL_LIB="${D}/usr/$(get_libdir)/" \ + V=${PV} gentoo_install \ + || die "emake install gentoo_install failed" + + dodoc HISTORY README + dohtml doc/*.html doc/*.gif + + insinto /usr/share/pixmaps + doins etc/lua.ico + insinto /usr/$(get_libdir)/pkgconfig + doins etc/lua.pc + + doman doc/lua.1 doc/luac.1 +} + +src_test() { + local positive="bisect cf echo env factorial fib fibfor hello printf sieve + sort trace-calls trace-globals" + local negative="readonly" + local test + + cd "${S}" + for test in ${positive}; do + test/lua.static test/${test}.lua &> /dev/null || die "test $test failed" + done + + for test in ${negative}; do + test/lua.static test/${test}.lua &> /dev/null && die "test $test failed" + done +} |