head 1.6; access; symbols OPENPKG_E1_MP_HEAD:1.2 OPENPKG_E1_MP:1.2 OPENPKG_E1_MP_2_STABLE:1.1 OPENPKG_E1_FP:1.1 OPENPKG_2_STABLE_MP:1.1 OPENPKG_2_STABLE_20061018:1.1 OPENPKG_2_STABLE_20060622:1.1 OPENPKG_2_STABLE:1.1.0.2 OPENPKG_2_STABLE_BP:1.1; locks; strict; comment @# @; 1.6 date 2008.01.25.16.35.37; author rse; state Exp; branches; next 1.5; commitid uACfHsrjJCtgCOOs; 1.5 date 2008.01.25.15.47.57; author cs; state Exp; branches; next 1.4; commitid GsJgot0buTiUlOOs; 1.4 date 2007.08.25.08.12.27; author rse; state Exp; branches; next 1.3; commitid CvPBPcp0Gh9zK6vs; 1.3 date 2007.04.02.15.11.23; author cs; state Exp; branches; next 1.2; commitid RSCYbaKNzzJfJvcs; 1.2 date 2006.12.11.07.35.28; author rse; state Exp; branches; next 1.1; commitid 4wOEqMPu4xY2O4Yr; 1.1 date 2006.06.17.20.46.11; author rse; state Exp; branches; next ; commitid h90FuAIFnsA3SoBr; desc @@ 1.6 log @update the patch to apply more cleanly (it is indirectly used on rpm5.org for building RPM against Lua) @ text @Index: src/Makefile --- src/Makefile.orig 2008-01-19 20:37:58 +0100 +++ src/Makefile 2008-01-25 17:33:43 +0100 @@@@ -14,9 +14,9 @@@@ RM= rm -f LIBS= -lm $(MYLIBS) -MYCFLAGS= -MYLDFLAGS= -MYLIBS= +MYCFLAGS ?= +MYLDFLAGS ?= +MYLIBS ?= # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= @@@@ -87,16 +87,16 @@@@ $(MAKE) all MYCFLAGS=-DLUA_ANSI bsd: - $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E" + $(MAKE) all MYCFLAGS="$(MYCFLAGS) -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="$(MYLIBS) -Wl,-E" freebsd: - $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline" + $(MAKE) all MYCFLAGS="$(MYCFLAGS) -DLUA_USE_LINUX" MYLIBS="$(MYLIBS) -Wl,-E -lreadline" generic: $(MAKE) all MYCFLAGS= linux: - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" + $(MAKE) all MYCFLAGS="$(MYCFLAGS) -DLUA_USE_LINUX" MYLIBS="$(MYLIBS) -Wl,-E -ldl -lreadline -lhistory -lncurses" macosx: $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" @@@@ -110,10 +110,10 @@@@ $(MAKE) "LUAC_T=luac.exe" luac.exe posix: - $(MAKE) all MYCFLAGS=-DLUA_USE_POSIX + $(MAKE) all MYCFLAGS="$(MYCFLAGS) -DLUA_USE_POSIX" solaris: - $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" + $(MAKE) all MYCFLAGS="$(MYCFLAGS) -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="$(MYLIBS) -ldl" # list targets that do not create files (but not all makes understand .PHONY) .PHONY: all $(PLATS) default o a clean depend echo none Index: src/luaconf.h --- src/luaconf.h.orig 2008-01-18 18:07:48 +0100 +++ src/luaconf.h 2008-01-25 17:33:43 +0100 @@@@ -36,7 +36,6 @@@@ #if defined(LUA_USE_LINUX) #define LUA_USE_POSIX #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ -#define LUA_USE_READLINE /* needs some extra libraries */ #endif #if defined(LUA_USE_MACOSX) @ 1.5 log @upgrading package: lua 5.1.2 -> 5.1.3 @ text @d2 2 a3 2 --- src/Makefile.orig 2007-03-25 16:49:23 +0200 +++ src/Makefile 2007-04-02 16:58:27 +0200 d36 1 a36 1 $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX d51 2 a52 2 --- src/luaconf.h.orig 2006-04-10 20:27:23 +0200 +++ src/luaconf.h 2006-12-11 08:28:55 +0100 @ 1.4 log @apply upstream vendor patches 1-7 @ text @a60 76 ----------------------------------------------------------------------------- Lua 5.1.2 patches 1-7 http://www.lua.org/bugs.html Index: src/lcode.c --- src/lcode.c 15 Jul 2007 17:56:10 -0000 1.3 +++ src/lcode.c 25 Aug 2007 08:09:13 -0000 @@@@ -699,7 +699,7 @@@@ e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0; switch (op) { case OPR_MINUS: { - if (e->k == VK) + if (!isnumeral(e)) luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */ codearith(fs, OP_UNM, e, &e2); break; Index: src/ldebug.c --- src/ldebug.c 15 Jul 2007 17:56:10 -0000 1.3 +++ src/ldebug.c 25 Aug 2007 08:09:14 -0000 @@@@ -563,8 +563,8 @@@@ void luaG_concaterror (lua_State *L, StkId p1, StkId p2) { - if (ttisstring(p1)) p1 = p2; - lua_assert(!ttisstring(p1)); + if (ttisstring(p1) || ttisnumber(p1)) p1 = p2; + lua_assert(!ttisstring(p1) && !ttisnumber(p1)); luaG_typeerror(L, p1, "concatenate"); } Index: src/lparser.c --- src/lparser.c 15 Jul 2007 17:56:10 -0000 1.4 +++ src/lparser.c 25 Aug 2007 08:09:14 -0000 @@@@ -938,6 +938,8 @@@@ primaryexp(ls, &nv.v); if (nv.v.k == VLOCAL) check_conflict(ls, lh, &nv.v); + luaY_checklimit(ls->fs, nvars, LUAI_MAXCCALLS - ls->L->nCcalls, + "variable names"); assignment(ls, &nv, nvars+1); } else { /* assignment -> `=' explist1 */ Index: src/ltable.c --- src/ltable.c 15 Jul 2007 17:56:11 -0000 1.3 +++ src/ltable.c 25 Aug 2007 08:09:14 -0000 @@@@ -84,8 +84,8 @@@@ static Node *hashnum (const Table *t, lua_Number n) { unsigned int a[numints]; int i; - n += 1; /* normalize number (avoid -0) */ - lua_assert(sizeof(a) <= sizeof(n)); + if (luai_numeq(n, 0)) /* avoid problems with -0 */ + return gnode(t, 0); memcpy(a, &n, sizeof(a)); for (i = 1; i < numints; i++) a[0] += a[i]; return hashmod(t, a[0]); Index: src/lvm.c --- src/lvm.c 15 Jul 2007 17:56:11 -0000 1.4 +++ src/lvm.c 25 Aug 2007 08:09:14 -0000 @@@@ -61,11 +61,9 @@@@ lu_byte mask = L->hookmask; const Instruction *oldpc = L->savedpc; L->savedpc = pc; - if (mask > LUA_MASKLINE) { /* instruction-hook set? */ - if (L->hookcount == 0) { - resethookcount(L); - luaD_callhook(L, LUA_HOOKCOUNT, -1); - } + if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) { + resethookcount(L); + luaD_callhook(L, LUA_HOOKCOUNT, -1); } if (mask & LUA_MASKLINE) { Proto *p = ci_func(L->ci)->l.p; @ 1.3 log @upgrading package: lua 5.1.1 -> 5.1.2 @ text @d61 76 @ 1.2 log @fix build flag passing and use it to add optional readline support @ text @d2 2 a3 2 --- src/Makefile.orig 2006-03-22 01:41:49 +0100 +++ src/Makefile 2006-12-11 08:32:12 +0100 d17 1 a17 1 @@@@ -86,13 +86,13 @@@@ d24 4 d33 1 a33 1 + $(MAKE) all MYCFLAGS="$(MYCFLAGS -DLUA_USE_LINUX" MYLIBS="$(MYLIBS) -Wl,-E -ldl" d37 2 a38 2 @@@@ -105,10 +105,10 @@@@ "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe @ 1.1 log @remove readline dependency under Linux @ text @d3 22 a24 2 +++ src/Makefile 2006-06-17 22:42:28 +0200 @@@@ -92,7 +92,7 @@@@ d29 1 a29 1 + $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl" d33 13 d48 1 a48 1 +++ src/luaconf.h 2006-06-17 22:42:15 +0200 @