summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/lua
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-03-14 05:24:05 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-03-14 05:24:05 (GMT)
commitc70a79c1e2deec8d508f34776befe11dab701e49 (patch)
treee316035b1059e5e4c3985fa64e7a3fa98ad697db /abs/extra-testing/community/lua
parentc7d4d0ec62e50c879908ab9f5e6b82c59124d338 (diff)
downloadlinhes_pkgbuild-c70a79c1e2deec8d508f34776befe11dab701e49.zip
linhes_pkgbuild-c70a79c1e2deec8d508f34776befe11dab701e49.tar.gz
linhes_pkgbuild-c70a79c1e2deec8d508f34776befe11dab701e49.tar.bz2
Adding missing PKGBUILDS, needed for VLC.
fluidsynth libdvbpsi libmatroska libmodplug libmpcded libshout libv4l lua zvbi
Diffstat (limited to 'abs/extra-testing/community/lua')
-rw-r--r--abs/extra-testing/community/lua/PKGBUILD30
-rw-r--r--abs/extra-testing/community/lua/lua-5.1-cflags.diff13
-rw-r--r--abs/extra-testing/community/lua/lua-5.1.3-official-patch1.diff12
-rw-r--r--abs/extra-testing/community/lua/lua-5.1.3-official-patch2.diff11
-rw-r--r--abs/extra-testing/community/lua/lua-5.1.3-official-patch3.diff21
-rw-r--r--abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff18
-rw-r--r--abs/extra-testing/community/lua/lua-arch.patch55
7 files changed, 160 insertions, 0 deletions
diff --git a/abs/extra-testing/community/lua/PKGBUILD b/abs/extra-testing/community/lua/PKGBUILD
new file mode 100644
index 0000000..ff0b435
--- /dev/null
+++ b/abs/extra-testing/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-testing/community/lua/lua-5.1-cflags.diff b/abs/extra-testing/community/lua/lua-5.1-cflags.diff
new file mode 100644
index 0000000..db658ae
--- /dev/null
+++ b/abs/extra-testing/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-testing/community/lua/lua-5.1.3-official-patch1.diff b/abs/extra-testing/community/lua/lua-5.1.3-official-patch1.diff
new file mode 100644
index 0000000..dec8fba
--- /dev/null
+++ b/abs/extra-testing/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-testing/community/lua/lua-5.1.3-official-patch2.diff b/abs/extra-testing/community/lua/lua-5.1.3-official-patch2.diff
new file mode 100644
index 0000000..05ac244
--- /dev/null
+++ b/abs/extra-testing/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-testing/community/lua/lua-5.1.3-official-patch3.diff b/abs/extra-testing/community/lua/lua-5.1.3-official-patch3.diff
new file mode 100644
index 0000000..8126ff5
--- /dev/null
+++ b/abs/extra-testing/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-testing/community/lua/lua-5.1.3-official-patch4.diff b/abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff
new file mode 100644
index 0000000..1d03f37
--- /dev/null
+++ b/abs/extra-testing/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-testing/community/lua/lua-arch.patch b/abs/extra-testing/community/lua/lua-arch.patch
new file mode 100644
index 0000000..7d6d331
--- /dev/null
+++ b/abs/extra-testing/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 \