From ca108923a4889893cbc24fa8f46850745f22b3a3 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Mon, 2 May 2011 19:00:32 +0200 Subject: [PATCH] lua-posix: Updated (5.0-t2 -> 5.1.11) --- lua/lua-posix/clk_tck.patch | 38 ---------------- lua/lua-posix/lua-posix.desc | 15 ++++--- lua/lua-posix/makefile.patch | 77 -------------------------------- lua/lua-posix/t2-ext-glob.patch | 59 ------------------------ lua/lua-posix/update-lua51.patch | 74 ------------------------------ 5 files changed, 8 insertions(+), 255 deletions(-) delete mode 100644 lua/lua-posix/clk_tck.patch delete mode 100644 lua/lua-posix/makefile.patch delete mode 100644 lua/lua-posix/t2-ext-glob.patch delete mode 100644 lua/lua-posix/update-lua51.patch diff --git a/lua/lua-posix/clk_tck.patch b/lua/lua-posix/clk_tck.patch deleted file mode 100644 index 68c678b8d..000000000 --- a/lua/lua-posix/clk_tck.patch +++ /dev/null @@ -1,38 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../lua-posix/clk_tck.patch -# Copyright (C) 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - - -diff -ur posix/lposix.c posix-t2/lposix.c ---- posix/lposix.c 2003-11-06 01:23:48.000000000 +0100 -+++ posix-t2/lposix.c 2006-02-01 22:15:50.000000000 +0100 -@@ -599,7 +599,7 @@ - clock_t elapsed; - }; - --#define pushtime(L,x) lua_pushnumber(L,((lua_Number)x)/CLK_TCK) -+#define pushtime(L,x) lua_pushnumber(L,((lua_Number)x)/CLOCKS_PER_SEC) - - static int Ftimes(lua_State *L, int i, const void *data) - { -@@ -620,7 +620,7 @@ - "utime", "stime", "cutime", "cstime", "elapsed", NULL - }; - --#define storetime(L,name,x) storenumber(L,name,(lua_Number)x/CLK_TCK) -+#define storetime(L,name,x) storenumber(L,name,(lua_Number)x/CLOCKS_PER_SEC) - - static int Ptimes(lua_State *L) /** times() */ - { diff --git a/lua/lua-posix/lua-posix.desc b/lua/lua-posix/lua-posix.desc index 2666b5267..473e587d6 100644 --- a/lua/lua-posix/lua-posix.desc +++ b/lua/lua-posix/lua-posix.desc @@ -2,7 +2,7 @@ [COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. [COPY] [COPY] Filename: package/.../lua-posix/lua-posix.desc -[COPY] Copyright (C) 2006 The OpenSDE Project +[COPY] Copyright (C) 2006 - 2011 The OpenSDE Project [COPY] Copyright (C) 2004 - 2006 The T2 SDE Project [COPY] [COPY] More information can be found in the files COPYING and README. @@ -12,22 +12,23 @@ [COPY] the Free Software Foundation; version 2 of the License. A copy of the [COPY] GNU General Public License can be found in the file COPYING. [COPY] --- SDE-COPYRIGHT-NOTE-END --- + [I] A POSIX library for Lua [T] A library for lua containing POSIX commands: [T] setenv,getenv,mkdir,chmod,fork, etc.. -[U] http://luaforge.net/projects/lposix/ +[U] http://luaforge.net/projects/luaposix/ -[A] Luiz Henrique de Figueiredo +[A] Natanael Copa {maintainer} +[A] Luiz Henrique de Figueiredo {old maintainer} [M] The OpenSDE Community [C] extra/development -[L] PublicDomain +[L] MIT [S] Stable -[V] 5.0-t2 +[V] 5.1.11 [P] X -----5---9 800.000 -[D] 4160754093 lposix-5.0.tar.gz !http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/lposix.tar.gz - +[D] 3623417252 luaposix-5.1.11.tar.gz http://luaforge.net/frs/download.php/4813/ diff --git a/lua/lua-posix/makefile.patch b/lua/lua-posix/makefile.patch deleted file mode 100644 index d84c3e56e..000000000 --- a/lua/lua-posix/makefile.patch +++ /dev/null @@ -1,77 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../lua-posix/makefile.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- ---- posix/Makefile 2003-11-06 01:26:49.000000000 +0100 -+++ posix-5.1-alpha/Makefile 2005-09-04 14:17:03.000000000 +0200 -@@ -1,10 +1,20 @@ - # makefile for POSIX library for Lua - - # change these to reflect your Lua installation --LUA= /tmp/lhf/lua-5.0 --LUAINC= $(LUA)/include --LUALIB= $(LUA)/lib --LUABIN= $(LUA)/bin -+LUA= lua -+ -+LUAINC= $(LUA_ROOT)/include -+LUALIB= $(LUA_ROOT)/lib -+LUABIN= $(LUA_ROOT)/bin -+ -+# installation path -+LUA_ROOT= $(shell pkg-config --variable prefix lua) -+LUA_CDIR= $(shell pkg-config --variable INSTALL_CMOD lua) -+LUA_LDIR= $(shell pkg-config --variable INSTALL_LMOD lua) -+ -+INSTALL = install -+INSTALL_DATA = $(INSTALL) -m 644 -+INSTALL_EXEC = $(INSTALL) -m 755 - - # no need to change anything below here - CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G -@@ -16,23 +26,25 @@ - - OBJS= $(MYLIB).o - --T= $(MYLIB).so -+all: $(MYLIB).so - --all: test -+test: $(MYLIB).so -+ $(LUA) -l$(MYNAME) test.lua - --test: $T -- $(LUABIN)/lua -l$(MYNAME) test.lua -+$(MYLIB).so: $(OBJS) -+ $(CC) $(LDFLAGS) -o $@ -shared $(OBJS) - --$T: $(OBJS) -- $(CC) -o $@ -shared $(OBJS) -+install: -+ $(INSTALL_EXEC) $(MYLIB).so $(LUA_CDIR)/ -+ $(INSTALL_DATA) $(MYNAME).lua $(LUA_LDIR)/ - - $(OBJS): modemuncher.c - --tree: $T -+tree: $(MYLIB).so - $(LUABIN)/lua -l$(MYNAME) tree.lua . - - clean: -- rm -f $(OBJS) $T core core.* a.out -+ rm -f $(OBJS) $(MYLIB).so core core.* a.out - - x: - @echo "$(MYNAME) library:" diff --git a/lua/lua-posix/t2-ext-glob.patch b/lua/lua-posix/t2-ext-glob.patch deleted file mode 100644 index c9778cfb8..000000000 --- a/lua/lua-posix/t2-ext-glob.patch +++ /dev/null @@ -1,59 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../lua-posix/t2-ext-glob.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- ---- posix/lposix.c 2005-09-08 21:50:42.445019600 +0200 -+++ posix-t2/lposix.c 2005-09-08 21:49:14.994723494 +0200 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - #define MYNAME "posix" - #define MYVERSION MYNAME " library for " LUA_VERSION " / Nov 2003" -@@ -177,6 +178,25 @@ - } - - -+static int Pglob(lua_State *L) /** glob(pattern) */ -+{ -+ const char *pattern = luaL_optstring(L, 1, "."); -+ glob_t globres; -+ -+ if (glob(pattern, GLOB_MARK, NULL, &globres)) -+ return pusherror(L, pattern); -+ else -+ { -+ int i; -+ lua_newtable(L); -+ for (i=1; i<=globres.gl_pathc; i++) -+ storeindex(L, i, globres.gl_pathv[i-1]); -+ globfree(&globres); -+ return 1; -+ } -+} -+ -+ - static int aux_files(lua_State *L) - { - DIR *d = lua_touserdata(L, lua_upvalueindex(1)); -@@ -773,6 +793,7 @@ - {"getlogin", Pgetlogin}, - {"getpasswd", Pgetpasswd}, - {"getprocessid", Pgetprocessid}, -+ {"glob", Pglob}, - {"kill", Pkill}, - {"link", Plink}, - {"mkdir", Pmkdir}, diff --git a/lua/lua-posix/update-lua51.patch b/lua/lua-posix/update-lua51.patch deleted file mode 100644 index 60ad39a2b..000000000 --- a/lua/lua-posix/update-lua51.patch +++ /dev/null @@ -1,74 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../lua-posix/update-lua51.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- ---- posix/lposix.c 2003-11-06 01:23:48.000000000 +0100 -+++ posix-5.1-alpha/lposix.c 2005-09-04 13:59:15.000000000 +0200 -@@ -64,7 +64,7 @@ - } - else - { -- int j=luaL_findstring(luaL_checkstring(L, i), S); -+ int j=luaL_checkoption(L, i, NULL, S); - if (j==-1) luaL_argerror(L, i, "unknown selector"); - return F(L, j, data); - } -@@ -802,7 +802,7 @@ - {NULL, NULL} - }; - --LUALIB_API int luaopen_posix (lua_State *L) -+LUALIB_API int luaopen_lposix (lua_State *L) - { - luaL_openlib(L, MYNAME, R, 0); - lua_pushliteral(L,"version"); /** version */ ---- posix/posix.lua 2003-06-18 14:47:44.000000000 +0200 -+++ posix-5.1-alpha/posix.lua 2005-09-04 14:15:14.000000000 +0200 -@@ -1,10 +1,4 @@ - -- posix.lua - -- support code for posix library ---- usage lua -lposix ... - --local function so(x) -- local SOPATH= os.getenv"LUA_SOPATH" or "./" -- assert(loadlib(SOPATH.."l"..x..".so","luaopen_"..x))() --end -- --so"posix" -+require"lposix" ---- posix/test.lua 2003-11-07 12:42:30.000000000 +0100 -+++ posix-5.1-alpha/test.lua 2005-09-04 13:51:39.000000000 +0200 -@@ -41,7 +41,7 @@ - f"HOME" - f"SHELL" - f"absent" --for k in ox.getenv() do io.write(k,"\t") end io.write"\n" -+for k,_ in pairs(ox.getenv()) do io.write(k,"\t") end io.write"\n" - - ------------------------------------------------------------------------------ - testing"putenv" -@@ -179,11 +179,11 @@ - ------------------------------------------------------------------------------ - testing"times" - a=ox.times() --for k,v in a do print(k,v) end -+for k,v in pairs(a) do print(k,v) end - print"sleeping 10 seconds..." - ox.sleep(10) - b=ox.times() --for k,v in b do print(k,v) end -+for k,v in pairs(b) do print(k,v) end - print"" - print("elapsed",b.elapsed-a.elapsed) - print("clock",os.clock())