diff --git a/net/luasocket/Makefile b/net/luasocket/Makefile index 395c70dfe2e..4a997bfb0fb 100644 --- a/net/luasocket/Makefile +++ b/net/luasocket/Makefile @@ -1,14 +1,17 @@ -# $OpenBSD: Makefile,v 1.24 2013/05/30 16:17:11 jasper Exp $ +# $OpenBSD: Makefile,v 1.25 2013/11/25 15:27:56 dcoppa Exp $ SHARED_ONLY= Yes COMMENT= network support for the lua language -DISTNAME= luasocket-2.0.2 -REVISION= 3 +GH_VER= v3.0-rc1 +DISTNAME= luasocket-${GH_VER:S/v//} +PKGNAME= ${DISTNAME:S/-rc/rc/} CATEGORIES= net -MASTER_SITES= http://luaforge.net/frs/download.php/2664/ -HOMEPAGE= http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/ +MASTER_SITES= https://github.com/diegonehab/luasocket/archive/ +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}{${GH_VER}${EXTRACT_SUFX}} + +HOMEPAGE= http://w3.impa.br/~diego/software/luasocket/ # MIT PERMIT_PACKAGE_CDROM= Yes @@ -16,12 +19,12 @@ PERMIT_PACKAGE_CDROM= Yes MODULES= lang/lua NO_TEST= Yes +USE_GMAKE= Yes + MAKE_FILE= makefile pre-configure: - ${SUBST_CMD} ${WRKSRC}/config - # Prevent patching every single file.. - perl -pi -e 's,luaL_reg,luaL_Reg,g' ${WRKSRC}/src/*.[ch] + ${SUBST_CMD} ${WRKSRC}/src/makefile do-install: ${INSTALL_DATA_DIR} ${MODLUA_DATADIR}/socket ${MODLUA_DATADIR}/mime diff --git a/net/luasocket/distinfo b/net/luasocket/distinfo index 5455e453c0b..fa0e2385eed 100644 --- a/net/luasocket/distinfo +++ b/net/luasocket/distinfo @@ -1,5 +1,2 @@ -MD5 (luasocket-2.0.2.tar.gz) = QURbE43re8/pe/+VdQPajg== -RMD160 (luasocket-2.0.2.tar.gz) = JNfk+xyc8MPZT4s26C1JSuki4mg= -SHA1 (luasocket-2.0.2.tar.gz) = XOUh/Fxu+3weun823+r6nk10VGQ= -SHA256 (luasocket-2.0.2.tar.gz) = T9nHdc/ZiEEpmFHimzAXbK8ok3D+of8eALtnwtaELKY= -SIZE (luasocket-2.0.2.tar.gz) = 115443 +SHA256 (luasocket-3.0-rc1.tar.gz) = i2fZtbVF4baUdT2re9bNvCTCkPKyG6HhTHezKBfqEkk= +SIZE (luasocket-3.0-rc1.tar.gz) = 328598 diff --git a/net/luasocket/patches/patch-config b/net/luasocket/patches/patch-config deleted file mode 100644 index d62f93b399c..00000000000 --- a/net/luasocket/patches/patch-config +++ /dev/null @@ -1,44 +0,0 @@ -$OpenBSD: patch-config,v 1.6 2012/07/10 15:22:45 jasper Exp $ ---- config.orig Mon Oct 15 06:21:05 2007 -+++ config Sun Jul 8 20:27:56 2012 -@@ -6,17 +6,17 @@ - # Output file names - # - EXT=so --SOCKET_V=2.0.2 --MIME_V=1.0.2 --SOCKET_SO=socket.$(EXT).$(SOCKET_V) --MIME_SO=mime.$(EXT).$(MIME_V) --UNIX_SO=unix.$(EXT) -+SOCKET_V=2.0 -+MIME_V=1.0 -+SOCKET_SO=socket.so -+MIME_SO=mime.so -+UNIX_SO=unix.so - - #------ - # Lua includes and libraries - # - #LUAINC=-I/usr/local/include/lua50 --#LUAINC=-I/usr/local/include/lua5.1 -+LUAINC=-I${MODLUA_INCL_DIR} - #LUAINC=-Ilua-5.1.1/src - - #------ -@@ -49,11 +49,12 @@ INSTALL_EXEC=cp - #------ - # Compiler and linker settings - # for Linux --CC=gcc -+CC=cc - DEF=-DLUASOCKET_DEBUG --CFLAGS= $(LUAINC) $(DEF) -pedantic -Wall -O2 -fpic --LDFLAGS=-O -shared -fpic --LD=gcc -+CFLAGS+= $(LUAINC) -fPIC -DPIC -DUNIX_HAS_SUN_LEN -+LDFLAGS=-O -shared -fPIC -+LD=cc -+ - - #------ - # End of makefile configuration diff --git a/net/luasocket/patches/patch-src_buffer_c b/net/luasocket/patches/patch-src_buffer_c index c653fa375bb..0fc8e82fe34 100644 --- a/net/luasocket/patches/patch-src_buffer_c +++ b/net/luasocket/patches/patch-src_buffer_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_buffer_c,v 1.3 2009/09/06 13:46:58 jolan Exp $ ---- src/buffer.c.orig Sun Oct 14 23:21:05 2007 -+++ src/buffer.c Sun Sep 6 08:17:20 2009 -@@ -33,7 +33,7 @@ static int sendraw(p_buffer buf, const char *data, siz +$OpenBSD: patch-src_buffer_c,v 1.4 2013/11/25 15:27:56 dcoppa Exp $ +--- src/buffer.c.orig Fri Nov 15 10:51:53 2013 ++++ src/buffer.c Fri Nov 15 10:54:02 2013 +@@ -31,7 +31,7 @@ static int sendraw(p_buffer buf, const char *data, siz /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ @@ -10,34 +10,34 @@ $OpenBSD: patch-src_buffer_c,v 1.3 2009/09/06 13:46:58 jolan Exp $ (void) L; return 0; } -@@ -41,7 +41,7 @@ int buffer_open(lua_State *L) { +@@ -39,7 +39,7 @@ int buffer_open(lua_State *L) { /*-------------------------------------------------------------------------*\ * Initializes C structure \*-------------------------------------------------------------------------*/ -void buffer_init(p_buffer buf, p_io io, p_timeout tm) { +void ls_buffer_init(p_buffer buf, p_io io, p_timeout tm) { - buf->first = buf->last = 0; + buf->first = buf->last = 0; buf->io = io; buf->tm = tm; -@@ -52,7 +52,7 @@ void buffer_init(p_buffer buf, p_io io, p_timeout tm) +@@ -50,7 +50,7 @@ void buffer_init(p_buffer buf, p_io io, p_timeout tm) /*-------------------------------------------------------------------------*\ * object:getstats() interface \*-------------------------------------------------------------------------*/ -int buffer_meth_getstats(lua_State *L, p_buffer buf) { +int ls_buffer_meth_getstats(lua_State *L, p_buffer buf) { - lua_pushnumber(L, buf->received); - lua_pushnumber(L, buf->sent); + lua_pushnumber(L, (lua_Number) buf->received); + lua_pushnumber(L, (lua_Number) buf->sent); lua_pushnumber(L, timeout_gettime() - buf->birthday); -@@ -62,7 +62,7 @@ int buffer_meth_getstats(lua_State *L, p_buffer buf) { +@@ -60,7 +60,7 @@ int buffer_meth_getstats(lua_State *L, p_buffer buf) { /*-------------------------------------------------------------------------*\ * object:setstats() interface \*-------------------------------------------------------------------------*/ -int buffer_meth_setstats(lua_State *L, p_buffer buf) { +int ls_buffer_meth_setstats(lua_State *L, p_buffer buf) { - buf->received = (long) luaL_optnumber(L, 2, buf->received); - buf->sent = (long) luaL_optnumber(L, 3, buf->sent); + buf->received = (long) luaL_optnumber(L, 2, (lua_Number) buf->received); + buf->sent = (long) luaL_optnumber(L, 3, (lua_Number) buf->sent); if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4); -@@ -73,7 +73,7 @@ int buffer_meth_setstats(lua_State *L, p_buffer buf) { +@@ -71,7 +71,7 @@ int buffer_meth_setstats(lua_State *L, p_buffer buf) { /*-------------------------------------------------------------------------*\ * object:send() interface \*-------------------------------------------------------------------------*/ @@ -55,7 +55,7 @@ $OpenBSD: patch-src_buffer_c,v 1.3 2009/09/06 13:46:58 jolan Exp $ int err = IO_DONE, top = lua_gettop(L); luaL_Buffer b; size_t size; -@@ -149,7 +149,7 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) { +@@ -157,7 +157,7 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) { /*-------------------------------------------------------------------------*\ * Determines if there is any data in the read buffer \*-------------------------------------------------------------------------*/ @@ -64,7 +64,7 @@ $OpenBSD: patch-src_buffer_c,v 1.3 2009/09/06 13:46:58 jolan Exp $ return buf->first >= buf->last; } -@@ -244,7 +244,7 @@ static int recvline(p_buffer buf, luaL_Buffer *b) { +@@ -252,7 +252,7 @@ static int recvline(p_buffer buf, luaL_Buffer *b) { static void buffer_skip(p_buffer buf, size_t count) { buf->received += count; buf->first += count; @@ -73,7 +73,7 @@ $OpenBSD: patch-src_buffer_c,v 1.3 2009/09/06 13:46:58 jolan Exp $ buf->first = buf->last = 0; } -@@ -256,7 +256,7 @@ static int buffer_get(p_buffer buf, const char **data, +@@ -264,7 +264,7 @@ static int buffer_get(p_buffer buf, const char **data, int err = IO_DONE; p_io io = buf->io; p_timeout tm = buf->tm; diff --git a/net/luasocket/patches/patch-src_buffer_h b/net/luasocket/patches/patch-src_buffer_h index 47768bc476b..c30811f1a39 100644 --- a/net/luasocket/patches/patch-src_buffer_h +++ b/net/luasocket/patches/patch-src_buffer_h @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_buffer_h,v 1.1 2009/08/22 20:28:40 robert Exp $ ---- src/buffer.h.orig Thu Apr 27 05:23:22 2006 -+++ src/buffer.h Sat Aug 22 22:19:02 2009 -@@ -36,12 +36,12 @@ typedef struct t_buffer_ { +$OpenBSD: patch-src_buffer_h,v 1.2 2013/11/25 15:27:56 dcoppa Exp $ +--- src/buffer.h.orig Fri Jun 14 13:27:32 2013 ++++ src/buffer.h Fri Nov 15 10:48:31 2013 +@@ -34,12 +34,12 @@ typedef struct t_buffer_ { } t_buffer; typedef t_buffer *p_buffer; diff --git a/net/luasocket/patches/patch-src_http_lua b/net/luasocket/patches/patch-src_http_lua deleted file mode 100644 index 73177999847..00000000000 --- a/net/luasocket/patches/patch-src_http_lua +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-src_http_lua,v 1.2 2009/09/06 13:46:58 jolan Exp $ ---- src/http.lua.orig Sun Oct 14 23:21:05 2007 -+++ src/http.lua Sun Sep 6 08:17:20 2009 -@@ -254,7 +254,7 @@ local function shouldredirect(reqt, code, headers) - return headers.location and - string.gsub(headers.location, "%s", "") ~= "" and - (reqt.redirect ~= false) and -- (code == 301 or code == 302) and -+ (code == 301 or code == 302 or code == 303 or code == 307) and - (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD") - and (not reqt.nredirects or reqt.nredirects < 5) - end diff --git a/net/luasocket/patches/patch-src_luasocket_c b/net/luasocket/patches/patch-src_luasocket_c index 3644fe3c4ca..233531fe908 100644 --- a/net/luasocket/patches/patch-src_luasocket_c +++ b/net/luasocket/patches/patch-src_luasocket_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_luasocket_c,v 1.2 2009/08/22 20:28:40 robert Exp $ ---- src/luasocket.c.orig Sat Aug 22 22:18:38 2009 -+++ src/luasocket.c Sat Aug 22 22:19:02 2009 -@@ -51,7 +51,7 @@ static const luaL_reg mod[] = { +$OpenBSD: patch-src_luasocket_c,v 1.3 2013/11/25 15:27:56 dcoppa Exp $ +--- src/luasocket.c.orig Fri Jun 14 13:27:32 2013 ++++ src/luasocket.c Fri Nov 15 10:48:31 2013 +@@ -46,7 +46,7 @@ static const luaL_Reg mod[] = { {"auxiliar", auxiliar_open}, {"except", except_open}, {"timeout", timeout_open}, diff --git a/net/luasocket/patches/patch-src_makefile b/net/luasocket/patches/patch-src_makefile index 2f9f10295bb..5f25cf57627 100644 --- a/net/luasocket/patches/patch-src_makefile +++ b/net/luasocket/patches/patch-src_makefile @@ -1,12 +1,60 @@ -$OpenBSD: patch-src_makefile,v 1.3 2009/09/06 13:46:58 jolan Exp $ ---- src/makefile.orig Sun Oct 14 23:21:05 2007 -+++ src/makefile Sun Sep 6 08:27:43 2009 -@@ -47,7 +47,7 @@ UNIX_OBJS:=\ - usocket.o \ - unix.o +$OpenBSD: patch-src_makefile,v 1.4 2013/11/25 15:27:56 dcoppa Exp $ +--- src/makefile.orig Fri Jun 14 13:27:32 2013 ++++ src/makefile Fri Nov 15 11:17:12 2013 +@@ -47,7 +47,7 @@ LDIR_macosx?=share/lua/$(LUAV) + # /usr/local/include/lua$(LUAV) + # where lua headers are found for linux builds + LUAINC_linux_base?=/usr/include +-LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV) ++LUAINC_linux?=${MODLUA_INCL_DIR} + LUAPREFIX_linux?=/usr/local + CDIR_linux?=lib/lua/$(LUAV) + LDIR_linux?=share/lua/$(LUAV) +@@ -144,15 +144,14 @@ SOCKET_macosx=usocket.o + # for Linux + SO_linux=so + O_linux=o +-CC_linux=gcc ++CC_linux=cc + DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \ + -DLUASOCKET_API='__attribute__((visibility("default")))' \ + -DUNIX_API='__attribute__((visibility("default")))' \ + -DMIME_API='__attribute__((visibility("default")))' +-CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \ +- -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden +-LDFLAGS_linux=-O -shared -fpic -o +-LD_linux=gcc ++CFLAGS_linux= -I$(LUAINC) -fPIC -DPIC -DUNIX_HAS_SUN_LEN ++LDFLAGS_linux=-shared -fPIC -o ++LD_linux=cc + SOCKET_linux=usocket.o --all: $(SOCKET_SO) $(MIME_SO) + #------ +@@ -202,12 +201,12 @@ SOCKET_win32=wsocket.obj + # + SO=$(SO_$(PLAT)) + O=$(O_$(PLAT)) +-SOCKET_V=3.0-rc1 +-MIME_V=1.0.3 +-SOCKET_SO=socket.$(SO).$(SOCKET_V) +-MIME_SO=mime.$(SO).$(MIME_V) +-UNIX_SO=unix.$(SO) +-SERIAL_SO=serial.$(SO) ++SOCKET_V=3.0 ++MIME_V=1.0 ++SOCKET_SO=socket.so ++MIME_SO=mime.so ++UNIX_SO=unix.so ++SERIAL_SO=serial.so + SOCKET=$(SOCKET_$(PLAT)) + + #------ +@@ -307,7 +306,7 @@ none: + @echo "where PLATFORM is one of these:" + @echo " $(PLATS)" + +-all: $(SOCKET_SO) $(MIME_SO) +all: $(SOCKET_SO) $(MIME_SO) $(UNIX_SO) $(SOCKET_SO): $(SOCKET_OBJS) - $(LD) $(LDFLAGS) -o $@ $(SOCKET_OBJS) + $(LD) $(SOCKET_OBJS) $(LDFLAGS)$@ diff --git a/net/luasocket/patches/patch-src_mime_c b/net/luasocket/patches/patch-src_mime_c index 3aa484485b3..75add5cc879 100644 --- a/net/luasocket/patches/patch-src_mime_c +++ b/net/luasocket/patches/patch-src_mime_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_mime_c,v 1.1 2005/11/25 15:09:44 pedro Exp $ ---- src/mime.c.orig Wed Nov 23 21:40:59 2005 -+++ src/mime.c Wed Nov 23 21:41:54 2005 -@@ -10,7 +10,7 @@ +$OpenBSD: patch-src_mime_c,v 1.2 2013/11/25 15:27:56 dcoppa Exp $ +--- src/mime.c.orig Fri Jun 14 13:27:32 2013 ++++ src/mime.c Fri Nov 15 10:48:31 2013 +@@ -8,7 +8,7 @@ #include "lauxlib.h" #if !defined(LUA_VERSION_NUM) || (LUA_VERSION_NUM < 501) diff --git a/net/luasocket/patches/patch-src_serial_c b/net/luasocket/patches/patch-src_serial_c new file mode 100644 index 00000000000..bd6594f0e39 --- /dev/null +++ b/net/luasocket/patches/patch-src_serial_c @@ -0,0 +1,55 @@ +$OpenBSD: patch-src_serial_c,v 1.1 2013/11/25 15:27:56 dcoppa Exp $ +--- src/serial.c.orig Fri Jun 14 13:27:32 2013 ++++ src/serial.c Fri Nov 15 11:22:38 2013 +@@ -6,6 +6,7 @@ + + #include "lua.h" + #include "lauxlib.h" ++#include "luasocket.h" + + #include "auxiliar.h" + #include "socket.h" +@@ -90,22 +91,22 @@ LUASOCKET_API int luaopen_socket_serial(lua_State *L) + \*-------------------------------------------------------------------------*/ + static int meth_send(lua_State *L) { + p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); +- return buffer_meth_send(L, &un->buf); ++ return ls_buffer_meth_send(L, &un->buf); + } + + static int meth_receive(lua_State *L) { + p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); +- return buffer_meth_receive(L, &un->buf); ++ return ls_buffer_meth_receive(L, &un->buf); + } + + static int meth_getstats(lua_State *L) { + p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); +- return buffer_meth_getstats(L, &un->buf); ++ return ls_buffer_meth_getstats(L, &un->buf); + } + + static int meth_setstats(lua_State *L) { + p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); +- return buffer_meth_setstats(L, &un->buf); ++ return ls_buffer_meth_setstats(L, &un->buf); + } + + /*-------------------------------------------------------------------------*\ +@@ -126,7 +127,7 @@ static int meth_setfd(lua_State *L) { + + static int meth_dirty(lua_State *L) { + p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); +- lua_pushboolean(L, !buffer_isempty(&un->buf)); ++ lua_pushboolean(L, !ls_buffer_isempty(&un->buf)); + return 1; + } + +@@ -183,6 +184,6 @@ static int global_create(lua_State *L) { + io_init(&un->io, (p_send) socket_write, (p_recv) socket_read, + (p_error) socket_ioerror, &un->sock); + timeout_init(&un->tm, -1, -1); +- buffer_init(&un->buf, &un->io, &un->tm); ++ ls_buffer_init(&un->buf, &un->io, &un->tm); + return 1; + } diff --git a/net/luasocket/patches/patch-src_tcp_c b/net/luasocket/patches/patch-src_tcp_c index 4b5fc49a2ee..9b232e1ee3a 100644 --- a/net/luasocket/patches/patch-src_tcp_c +++ b/net/luasocket/patches/patch-src_tcp_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_tcp_c,v 1.1 2009/08/22 20:28:40 robert Exp $ ---- src/tcp.c.orig Thu Apr 27 05:23:21 2006 -+++ src/tcp.c Sat Aug 22 22:19:02 2009 -@@ -104,22 +104,22 @@ int tcp_open(lua_State *L) +$OpenBSD: patch-src_tcp_c,v 1.2 2013/11/25 15:27:56 dcoppa Exp $ +--- src/tcp.c.orig Fri Nov 15 10:55:01 2013 ++++ src/tcp.c Fri Nov 15 10:56:14 2013 +@@ -124,22 +124,22 @@ int tcp_open(lua_State *L) \*-------------------------------------------------------------------------*/ static int meth_send(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); @@ -28,7 +28,7 @@ $OpenBSD: patch-src_tcp_c,v 1.1 2009/08/22 20:28:40 robert Exp $ } /*-------------------------------------------------------------------------*\ -@@ -152,7 +152,7 @@ static int meth_setfd(lua_State *L) +@@ -178,7 +178,7 @@ static int meth_setfd(lua_State *L) static int meth_dirty(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); @@ -37,21 +37,30 @@ $OpenBSD: patch-src_tcp_c,v 1.1 2009/08/22 20:28:40 robert Exp $ return 1; } -@@ -176,7 +176,7 @@ static int meth_accept(lua_State *L) - io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv, +@@ -203,7 +203,7 @@ static int meth_accept(lua_State *L) + io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv, (p_error) socket_ioerror, &clnt->sock); timeout_init(&clnt->tm, -1, -1); - buffer_init(&clnt->buf, &clnt->io, &clnt->tm); + ls_buffer_init(&clnt->buf, &clnt->io, &clnt->tm); + clnt->family = server->family; return 1; } else { - lua_pushnil(L); -@@ -329,7 +329,7 @@ static int global_create(lua_State *L) - io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, +@@ -375,7 +375,7 @@ static int tcp_create(lua_State *L, int family) { + io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, (p_error) socket_ioerror, &tcp->sock); timeout_init(&tcp->tm, -1, -1); - buffer_init(&tcp->buf, &tcp->io, &tcp->tm); + ls_buffer_init(&tcp->buf, &tcp->io, &tcp->tm); + tcp->family = family; return 1; } else { - lua_pushnil(L); +@@ -454,7 +454,7 @@ static int global_connect(lua_State *L) { + io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, + (p_error) socket_ioerror, &tcp->sock); + timeout_init(&tcp->tm, -1, -1); +- buffer_init(&tcp->buf, &tcp->io, &tcp->tm); ++ ls_buffer_init(&tcp->buf, &tcp->io, &tcp->tm); + tcp->sock = SOCKET_INVALID; + tcp->family = PF_UNSPEC; + /* allow user to pick local address and port */ diff --git a/net/luasocket/patches/patch-src_unix_c b/net/luasocket/patches/patch-src_unix_c index 828d80a316d..f7865921df1 100644 --- a/net/luasocket/patches/patch-src_unix_c +++ b/net/luasocket/patches/patch-src_unix_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_unix_c,v 1.1 2009/08/22 20:28:40 robert Exp $ ---- src/unix.c.orig Thu Apr 27 05:23:21 2006 -+++ src/unix.c Sat Aug 22 22:19:02 2009 -@@ -105,22 +105,22 @@ int luaopen_socket_unix(lua_State *L) { +$OpenBSD: patch-src_unix_c,v 1.2 2013/11/25 15:27:56 dcoppa Exp $ +--- src/unix.c.orig Fri Nov 15 10:56:41 2013 ++++ src/unix.c Fri Nov 15 10:57:41 2013 +@@ -109,22 +109,22 @@ int luaopen_socket_unix(lua_State *L) { \*-------------------------------------------------------------------------*/ static int meth_send(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1); @@ -28,7 +28,7 @@ $OpenBSD: patch-src_unix_c,v 1.1 2009/08/22 20:28:40 robert Exp $ } /*-------------------------------------------------------------------------*\ -@@ -149,7 +149,7 @@ static int meth_setfd(lua_State *L) { +@@ -153,7 +153,7 @@ static int meth_setfd(lua_State *L) { static int meth_dirty(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1); @@ -37,7 +37,7 @@ $OpenBSD: patch-src_unix_c,v 1.1 2009/08/22 20:28:40 robert Exp $ return 1; } -@@ -172,7 +172,7 @@ static int meth_accept(lua_State *L) { +@@ -176,7 +176,7 @@ static int meth_accept(lua_State *L) { io_init(&clnt->io, (p_send)socket_send, (p_recv)socket_recv, (p_error) socket_ioerror, &clnt->sock); timeout_init(&clnt->tm, -1, -1); @@ -46,7 +46,7 @@ $OpenBSD: patch-src_unix_c,v 1.1 2009/08/22 20:28:40 robert Exp $ return 1; } else { lua_pushnil(L); -@@ -346,7 +346,7 @@ static int global_create(lua_State *L) { +@@ -336,7 +336,7 @@ static int global_create(lua_State *L) { io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv, (p_error) socket_ioerror, &un->sock); timeout_init(&un->tm, -1, -1); diff --git a/net/luasocket/pkg/PLIST b/net/luasocket/pkg/PLIST index 9c29bc8668e..af1dd8745dc 100644 --- a/net/luasocket/pkg/PLIST +++ b/net/luasocket/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.8 2012/05/15 20:36:28 jasper Exp $ +@comment $OpenBSD: PLIST,v 1.9 2013/11/25 15:27:56 dcoppa Exp $ lib/lua/${MODLUA_VERSION}/mime/ lib/lua/${MODLUA_VERSION}/mime/core.so lib/lua/${MODLUA_VERSION}/socket/ @@ -12,6 +12,7 @@ share/doc/${FULLPKGNAME}/index.html share/doc/${FULLPKGNAME}/installation.html share/doc/${FULLPKGNAME}/introduction.html share/doc/${FULLPKGNAME}/ltn12.html +share/doc/${FULLPKGNAME}/lua05.ppt share/doc/${FULLPKGNAME}/luasocket.png share/doc/${FULLPKGNAME}/mime.html share/doc/${FULLPKGNAME}/reference.css @@ -29,6 +30,8 @@ share/examples/${FULLPKGNAME}/echoclnt.lua share/examples/${FULLPKGNAME}/echosrvr.lua share/examples/${FULLPKGNAME}/listener.lua share/examples/${FULLPKGNAME}/lpr.lua +share/examples/${FULLPKGNAME}/mclisten.lua +share/examples/${FULLPKGNAME}/mcsend.lua share/examples/${FULLPKGNAME}/talker.lua share/examples/${FULLPKGNAME}/tinyirc.lua share/lua/${MODLUA_VERSION}/ltn12.lua