[arch-commits] Commit in lua/trunk (6 files)
Eric Bélanger
eric at archlinux.org
Sun Jul 4 22:01:42 UTC 2010
Date: Sunday, July 4, 2010 @ 18:01:41
Author: eric
Revision: 84843
upgpkg: lua 5.1.4-5
Fixed undefined symbols in liblua.so, Removed old patches
Modified:
lua/trunk/PKGBUILD
lua/trunk/lua-arch.patch
Deleted:
lua/trunk/lua-5.1.3-official-patch1.diff
lua/trunk/lua-5.1.3-official-patch2.diff
lua/trunk/lua-5.1.3-official-patch3.diff
lua/trunk/lua-5.1.3-official-patch4.diff
--------------------------------+
PKGBUILD | 33 ++++++++++++++++++---------------
lua-5.1.3-official-patch1.diff | 12 ------------
lua-5.1.3-official-patch2.diff | 11 -----------
lua-5.1.3-official-patch3.diff | 21 ---------------------
lua-5.1.3-official-patch4.diff | 18 ------------------
lua-arch.patch | 2 +-
6 files changed, 19 insertions(+), 78 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-07-04 20:57:42 UTC (rev 84842)
+++ PKGBUILD 2010-07-04 22:01:41 UTC (rev 84843)
@@ -4,31 +4,34 @@
pkgname=lua
pkgver=5.1.4
-pkgrel=4
+pkgrel=5
pkgdesc="A powerful light-weight programming language designed for extending applications."
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
url="http://www.lua.org/"
depends=('readline' 'ncurses')
-license=(MIT)
+license=('MIT')
options=('!makeflags')
-source=($url/ftp/$pkgname-$pkgver.tar.gz $pkgname-arch.patch 'lua-5.1-cflags.diff')
-md5sums=('d0870f2de55d59c1c8419f36e8fac150'
- '1bd1164a19abf9165e231ba0d8a0bbc7'
+source=(http://www.lua.org/ftp/${pkgname}-${pkgver}.tar.gz lua-arch.patch lua-5.1-cflags.diff)
+md5sums=('d0870f2de55d59c1c8419f36e8fac150' '6c5953f63904bf20a0183cdab05b80de'\
'249582bf1fd861ccf492d2c35a9fe732')
+sha1sums=('2b11c8e60306efb7f0734b747588f57995493db7' '780a41f93987462a2acd6e338ac648c6b9c01d16'\
+ '0d5d6b2aeab1ca8bde5f65d77d40d5a23b79b2c8')
build() {
- cd $startdir/src/$pkgname-$pkgver
- patch -p1 -i $startdir/src/$pkgname-arch.patch || return 1
-
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i "${srcdir}/lua-arch.patch"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
[ "$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 \
+ make INSTALL_DATA="cp -d" TO_LIB="liblua.a liblua.so liblua.so.5.1" LUA_SO=liblua.so INSTALL_TOP="${pkgdir}/usr" INSTALL_MAN="${pkgdir}/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
+ install -D -m 644 etc/lua.pc "${pkgdir}/usr/lib/pkgconfig/lua.pc"
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"
# Install the documentation
- mkdir -p $pkgdir/usr/share/doc/lua
- cp -R doc/* $pkgdir/usr/share/doc/lua
+ mkdir -p "${pkgdir}/usr/share/doc/lua"
+ cp -R doc/* "${pkgdir}/usr/share/doc/lua"
}
-# vim: ts=2 sw=2 et ft=sh
Deleted: lua-5.1.3-official-patch1.diff
===================================================================
--- lua-5.1.3-official-patch1.diff 2010-07-04 20:57:42 UTC (rev 84842)
+++ lua-5.1.3-official-patch1.diff 2010-07-04 22:01:41 UTC (rev 84843)
@@ -1,12 +0,0 @@
---- 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
Deleted: lua-5.1.3-official-patch2.diff
===================================================================
--- lua-5.1.3-official-patch2.diff 2010-07-04 20:57:42 UTC (rev 84842)
+++ lua-5.1.3-official-patch2.diff 2010-07-04 22:01:41 UTC (rev 84843)
@@ -1,11 +0,0 @@
---- 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;
Deleted: lua-5.1.3-official-patch3.diff
===================================================================
--- lua-5.1.3-official-patch3.diff 2010-07-04 20:57:42 UTC (rev 84842)
+++ lua-5.1.3-official-patch3.diff 2010-07-04 22:01:41 UTC (rev 84843)
@@ -1,21 +0,0 @@
---- 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;
Deleted: lua-5.1.3-official-patch4.diff
===================================================================
--- lua-5.1.3-official-patch4.diff 2010-07-04 20:57:42 UTC (rev 84842)
+++ lua-5.1.3-official-patch4.diff 2010-07-04 22:01:41 UTC (rev 84843)
@@ -1,18 +0,0 @@
---- 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;
- }
Modified: lua-arch.patch
===================================================================
--- lua-arch.patch 2010-07-04 20:57:42 UTC (rev 84842)
+++ lua-arch.patch 2010-07-04 22:01:41 UTC (rev 84843)
@@ -35,7 +35,7 @@
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
-+ $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS)
++ $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? -lm $(MYLDFLAGS)
+ ln -s $@.5.1 $@
+
$(LUA_T): $(LUA_O) $(LUA_A)
More information about the arch-commits
mailing list