diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) |
commit | 7b29169fff9e7c624890c5edffe85def8a293136 (patch) | |
tree | 47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/extra/community/lua | |
parent | c491dea779dac29afff3578bf8245943817c2339 (diff) | |
download | linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2 |
LinHES 6.01.00
Diffstat (limited to 'abs/extra/community/lua')
-rw-r--r-- | abs/extra/community/lua/PKGBUILD | 30 | ||||
-rw-r--r-- | abs/extra/community/lua/lua-5.1-cflags.diff | 13 | ||||
-rw-r--r-- | abs/extra/community/lua/lua-5.1.3-official-patch1.diff | 12 | ||||
-rw-r--r-- | abs/extra/community/lua/lua-5.1.3-official-patch2.diff | 11 | ||||
-rw-r--r-- | abs/extra/community/lua/lua-5.1.3-official-patch3.diff | 21 | ||||
-rw-r--r-- | abs/extra/community/lua/lua-5.1.3-official-patch4.diff | 18 | ||||
-rw-r--r-- | abs/extra/community/lua/lua-arch.patch | 55 |
7 files changed, 160 insertions, 0 deletions
diff --git a/abs/extra/community/lua/PKGBUILD b/abs/extra/community/lua/PKGBUILD new file mode 100644 index 0000000..ff0b435 --- /dev/null +++ b/abs/extra/community/lua/PKGBUILD @@ -0,0 +1,30 @@ +# $Id: PKGBUILD 10401 2008-08-29 00:31:46Z allan $ +# Maintainer: Juergen Hoetzel <juergen@archlinux.org> +# Contributor: Damir Perisa <damir.perisa@bluewin.ch> + +pkgname=lua +pkgver=5.1.4 +pkgrel=3 +pkgdesc="A powerful light-weight programming language designed for extending applications." +arch=(i686 x86_64) +url="http://www.lua.org/" +depends=('readline' 'ncurses') +license=(MIT) +options=('!makeflags') +source=($url/ftp/$pkgname-$pkgver.tar.gz $pkgname-arch.patch 'lua-5.1-cflags.diff') +md5sums=('d0870f2de55d59c1c8419f36e8fac150' + '1bd1164a19abf9165e231ba0d8a0bbc7' + '249582bf1fd861ccf492d2c35a9fe732') + +build() { + cd $startdir/src/$pkgname-$pkgver + patch -p1 -i $startdir/src/$pkgname-arch.patch || return 1 + + [ "$CARCH" == "x86_64" ] && patch -Np1 -i ../lua-5.1-cflags.diff + [ "$CARCH" == "x86_64" ] && export CFLAGS="$CFLAGS -fPIC" + make INSTALL_DATA="cp -d" TO_LIB="liblua.a liblua.so liblua.so.5.1" LUA_SO=liblua.so INSTALL_TOP=$startdir/pkg/usr INSTALL_MAN=$startdir/pkg/usr/share/man/man1 \ + linux install || return 1 + install -D -m 644 etc/lua.pc $startdir/pkg/usr/lib/pkgconfig/lua.pc + install -D -m644 COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/COPYRIGHT +} +# vim: ts=2 sw=2 et ft=sh diff --git a/abs/extra/community/lua/lua-5.1-cflags.diff b/abs/extra/community/lua/lua-5.1-cflags.diff new file mode 100644 index 0000000..db658ae --- /dev/null +++ b/abs/extra/community/lua/lua-5.1-cflags.diff @@ -0,0 +1,13 @@ +diff -Naur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile +--- lua-5.1.orig/src/Makefile 2006-02-16 16:45:09.000000000 +0100 ++++ lua-5.1/src/Makefile 2006-03-01 14:55:29.000000000 +0100 +@@ -8,7 +8,8 @@ + PLAT= none + + CC= gcc +-CFLAGS= -O2 -Wall $(MYCFLAGS) ++CFLAGS ?= -O2 -Wall ++CFLAGS += $(MYCFLAGS) + AR= ar rcu + RANLIB= ranlib + RM= rm -f diff --git a/abs/extra/community/lua/lua-5.1.3-official-patch1.diff b/abs/extra/community/lua/lua-5.1.3-official-patch1.diff new file mode 100644 index 0000000..dec8fba --- /dev/null +++ b/abs/extra/community/lua/lua-5.1.3-official-patch1.diff @@ -0,0 +1,12 @@ +--- src/lbaselib.c ++++ src/lbaselib.c +443c443,444 +< ** functions to consume unlimited stack space. +--- +> ** functions to consume unlimited stack space. (must be smaller than +> ** -LUA_REGISTRYINDEX) +445,446c446 +< #define LUAI_MCS_AUX ((int)(INT_MAX / (4*sizeof(LUA_NUMBER)))) +< #define LUAI_MAXCSTACK (LUAI_MCS_AUX > SHRT_MAX ? SHRT_MAX : LUAI_MCS_AUX) +--- +> #define LUAI_MAXCSTACK 8000 diff --git a/abs/extra/community/lua/lua-5.1.3-official-patch2.diff b/abs/extra/community/lua/lua-5.1.3-official-patch2.diff new file mode 100644 index 0000000..05ac244 --- /dev/null +++ b/abs/extra/community/lua/lua-5.1.3-official-patch2.diff @@ -0,0 +1,11 @@ +--- src/lbaselib.c (old) ++++ src/lbaselib.c (new) +@@ -526,7 +526,7 @@ + status = lua_resume(co, narg); + if (status == 0 || status == LUA_YIELD) { + int nres = lua_gettop(co); +- if (!lua_checkstack(L, nres)) ++ if (!lua_checkstack(L, nres + 1)) + luaL_error(L, "too many results to resume"); + lua_xmove(co, L, nres); /* move yielded values */ + return nres; diff --git a/abs/extra/community/lua/lua-5.1.3-official-patch3.diff b/abs/extra/community/lua/lua-5.1.3-official-patch3.diff new file mode 100644 index 0000000..8126ff5 --- /dev/null +++ b/abs/extra/community/lua/lua-5.1.3-official-patch3.diff @@ -0,0 +1,21 @@ +--- src/lapi.c (old) ++++ src/lapi.c (new) +@@ -93,15 +93,14 @@ + + + LUA_API int lua_checkstack (lua_State *L, int size) { +- int res; ++ int res = 1; + lua_lock(L); +- if ((L->top - L->base + size) > LUAI_MAXCSTACK) ++ if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) + res = 0; /* stack overflow */ +- else { ++ else if (size > 0) { + luaD_checkstack(L, size); + if (L->ci->top < L->top + size) + L->ci->top = L->top + size; +- res = 1; + } + lua_unlock(L); + return res; diff --git a/abs/extra/community/lua/lua-5.1.3-official-patch4.diff b/abs/extra/community/lua/lua-5.1.3-official-patch4.diff new file mode 100644 index 0000000..1d03f37 --- /dev/null +++ b/abs/extra/community/lua/lua-5.1.3-official-patch4.diff @@ -0,0 +1,18 @@ +--- src/lbaselib.c (old) ++++ src/lbaselib.c (new) +@@ -344,10 +344,12 @@ + luaL_checktype(L, 1, LUA_TTABLE); + i = luaL_optint(L, 2, 1); + e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1)); ++ if (i > e) return 0; /* empty range */ + n = e - i + 1; /* number of elements */ +- if (n <= 0) return 0; /* empty range */ +- luaL_checkstack(L, n, "table too big to unpack"); +- for (; i<=e; i++) /* push arg[i...e] */ ++ if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arith. overflow */ ++ return luaL_error(L, "too many results to unpack"); ++ lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */ ++ while (i++ < e) /* push arg[i + 1...e] */ + lua_rawgeti(L, 1, i); + return n; + } diff --git a/abs/extra/community/lua/lua-arch.patch b/abs/extra/community/lua/lua-arch.patch new file mode 100644 index 0000000..7d6d331 --- /dev/null +++ b/abs/extra/community/lua/lua-arch.patch @@ -0,0 +1,55 @@ +diff -ur lua-5.1.orig/etc/lua.pc lua-5.1/etc/lua.pc +--- lua-5.1.orig/etc/lua.pc 2006-03-21 11:51:53.000000000 +0100 ++++ lua-5.1/etc/lua.pc 2006-03-21 11:52:05.000000000 +0100 +@@ -6,7 +6,7 @@ + V= 5.1 + + # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' +-prefix= /usr/local ++prefix= /usr + INSTALL_BIN= ${prefix}/bin + INSTALL_INC= ${prefix}/include + INSTALL_LIB= ${prefix}/lib +diff -ur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile +--- lua-5.1.orig/src/Makefile 2006-03-21 11:51:53.000000000 +0100 ++++ lua-5.1/src/Makefile 2006-03-21 11:52:09.000000000 +0100 +@@ -23,6 +23,7 @@ + PLATS= aix ansi bsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ + lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ + lundump.o lvm.o lzio.o +@@ -36,7 +37,7 @@ + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) + ALL_A= $(LUA_A) + + default: $(PLAT) +@@ -51,6 +52,10 @@ + $(AR) $@ $? + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS) ++ ln -s $@.5.1 $@ ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +diff -ur lua-5.1.orig/src/luaconf.h lua-5.1/src/luaconf.h +--- lua-5.1.orig/src/luaconf.h 2006-03-21 11:51:53.000000000 +0100 ++++ lua-5.1/src/luaconf.h 2006-03-21 11:52:05.000000000 +0100 +@@ -82,7 +82,7 @@ + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" + + #else +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \ |