Hey, this is my first diff to the ports tree. How does this look? I don't program in Lua (yet), but I followed the porting guide and from what I can tell, this seems alright.
Some quick notes: - HOMEPAGE and GH_ACCOUNT changed. - The do-install hook is changed to a post-install hook because it had been said to be less fragile. - Regression testing is now supported with a do-test hook, and so NO_TEST was removed. - USE_GMAKE was removed because the port appears to build and work without it. - Some version strings were still 3.0.0 rather than 3.1.0 so they were patched accordingly. I can see if upstream will fix this. - Other patches that renamed 'buffer_*' to 'ls_buffer_*' were removed and replaced with a post-patch hook. Does this seem like an alright way to approach this problem? - An INSTALL_TARGET is supplied so that everything is installed properly. In the future, it may be worth looking into src/makefile and adding an OpenBSD section (FreeBSD has one). Index: Makefile =================================================================== RCS file: /cvs/ports/net/luasocket/Makefile,v retrieving revision 1.37 diff -u -p -r1.37 Makefile --- Makefile 11 Mar 2022 19:46:18 -0000 1.37 +++ Makefile 4 Jan 2023 02:07:06 -0000 @@ -1,13 +1,12 @@ COMMENT= network support for the lua language -V= 3.0-rc1 -GH_ACCOUNT= diegonehab +V= 3.1.0 +GH_ACCOUNT= lunarmodules GH_PROJECT= luasocket GH_TAGNAME= v$V -REVISION= 1 PKGNAME= ${DISTNAME:S/-rc/rc/} CATEGORIES= net -HOMEPAGE= http://w3.impa.br/~diego/software/luasocket/ +HOMEPAGE= https://lunarmodules.github.io/luasocket/index.html # MIT PERMIT_PACKAGE= Yes @@ -17,10 +16,6 @@ MODULES= lang/lua FLAVORS= lua52 lua53 FLAVOR?= -NO_TEST= Yes - -USE_GMAKE= Yes - MAKE_FILE= makefile MAKE_FLAGS= CC_linux=${CC} \ @@ -30,20 +25,25 @@ MAKE_FLAGS= CC_linux=${CC} \ -DLUA_COMPAT_APIINTCASTS" \ LDFLAGS_linux="${LDFLAGS} -shared -fPIC -o " -do-install: - ${INSTALL_DATA_DIR} ${MODLUA_DATADIR}/socket ${MODLUA_DATADIR}/mime - ${INSTALL_DATA_DIR} ${MODLUA_LIBDIR}/socket ${MODLUA_LIBDIR}/mime +# Needed so that Unix specific components are installed. +INSTALL_TARGET= install install-unix + +# Consult ${WRKSRC}/makefile and ${WRKSRC}/test/README to make sure this test is +# up to date. +do-test: + ${MODLUA_BIN} ${WRKSRC}/test/hello.lua + +# This replaces all buffer_* functions with ls_buffer_* instead. +# +# "luasocket defines buffer_init(); which is common enough to be defined +# elsewhere and it is defined in mod_magnet, so you end up with a SIGSEGV. +# So rename buffer_* funcs to ls_buffer_*." +post-patch: + cd ${WRKSRC}/src; sed -i -e 's/[[:<:]]buffer_/ls_buffer_/g' ./* + +post-install: ${INSTALL_DATA_DIR} ${MODLUA_DOCDIR} ${MODLUA_EXAMPLEDIR} - ${INSTALL_DATA} ${WRKSRC}/src/socket.so ${MODLUA_LIBDIR}/socket/core.so - ${INSTALL_DATA} ${WRKSRC}/src/unix.so ${MODLUA_LIBDIR}/socket/unix.so - ${INSTALL_DATA} ${WRKSRC}/src/mime.so ${MODLUA_LIBDIR}/mime/core.so -.for l in ltn12 socket mime - ${INSTALL_DATA} ${WRKSRC}/src/$l.lua ${MODLUA_DATADIR} -.endfor -.for l in http url tp ftp headers smtp - ${INSTALL_DATA} ${WRKSRC}/src/$l.lua ${MODLUA_DATADIR}/socket -.endfor - ${INSTALL_DATA} ${WRKSRC}/doc/* ${MODLUA_DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/* ${MODLUA_DOCDIR} ${INSTALL_DATA} ${WRKSRC}/samples/* ${MODLUA_EXAMPLEDIR} .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/net/luasocket/distinfo,v retrieving revision 1.9 diff -u -p -r1.9 distinfo --- distinfo 25 Nov 2013 15:27:56 -0000 1.9 +++ distinfo 4 Jan 2023 02:07:06 -0000 @@ -1,2 +1,2 @@ -SHA256 (luasocket-3.0-rc1.tar.gz) = i2fZtbVF4baUdT2re9bNvCTCkPKyG6HhTHezKBfqEkk= -SIZE (luasocket-3.0-rc1.tar.gz) = 328598 +SHA256 (luasocket-3.1.0.tar.gz) = vwM6655ivKqNAH32jBGclmQY6Mnvfk8tfpa93sqcym4= +SIZE (luasocket-3.1.0.tar.gz) = 336542 Index: patches/patch-docs_installation_html =================================================================== RCS file: patches/patch-docs_installation_html diff -N patches/patch-docs_installation_html --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-docs_installation_html 4 Jan 2023 02:07:06 -0000 @@ -0,0 +1,12 @@ +Index: docs/installation.html +--- docs/installation.html.orig ++++ docs/installation.html +@@ -89,7 +89,7 @@ it should be easy to use LuaSocket. Just fire the inte + Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio + > socket = require("socket") + > print(socket._VERSION) +---> LuaSocket 3.0.0 ++--> LuaSocket 3.1.0 + </pre> + + <p> Each module loads their dependencies automatically, so you only need to Index: patches/patch-makefile_dist =================================================================== RCS file: patches/patch-makefile_dist diff -N patches/patch-makefile_dist --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-makefile_dist 4 Jan 2023 02:07:06 -0000 @@ -0,0 +1,12 @@ +Index: makefile.dist +--- makefile.dist.orig ++++ makefile.dist +@@ -1,7 +1,7 @@ + #-------------------------------------------------------------------------- + # Distribution makefile + #-------------------------------------------------------------------------- +-DIST = luasocket-3.0.0 ++DIST = luasocket-3.1.0 + + TEST = \ + test/README \ Index: patches/patch-src_buffer_c =================================================================== RCS file: patches/patch-src_buffer_c diff -N patches/patch-src_buffer_c --- patches/patch-src_buffer_c 11 Mar 2022 19:46:18 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,83 +0,0 @@ ---- 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 - \*-------------------------------------------------------------------------*/ --int buffer_open(lua_State *L) { -+int ls_buffer_open(lua_State *L) { - (void) L; - return 0; - } -@@ -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->io = io; - buf->tm = 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, (lua_Number) buf->received); - lua_pushnumber(L, (lua_Number) buf->sent); - lua_pushnumber(L, timeout_gettime() - buf->birthday); -@@ -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, (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); -@@ -71,7 +71,7 @@ int buffer_meth_setstats(lua_State *L, p_buffer buf) { - /*-------------------------------------------------------------------------*\ - * object:send() interface - \*-------------------------------------------------------------------------*/ --int buffer_meth_send(lua_State *L, p_buffer buf) { -+int ls_buffer_meth_send(lua_State *L, p_buffer buf) { - int top = lua_gettop(L); - int err = IO_DONE; - size_t size = 0, sent = 0; -@@ -106,7 +106,7 @@ int buffer_meth_send(lua_State *L, p_buffer buf) { - /*-------------------------------------------------------------------------*\ - * object:receive() interface - \*-------------------------------------------------------------------------*/ --int buffer_meth_receive(lua_State *L, p_buffer buf) { -+int ls_buffer_meth_receive(lua_State *L, p_buffer buf) { - int err = IO_DONE, top = lua_gettop(L); - luaL_Buffer b; - size_t size; -@@ -157,7 +157,7 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) { - /*-------------------------------------------------------------------------*\ - * Determines if there is any data in the read buffer - \*-------------------------------------------------------------------------*/ --int buffer_isempty(p_buffer buf) { -+int ls_buffer_isempty(p_buffer buf) { - return buf->first >= buf->last; - } - -@@ -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; -- if (buffer_isempty(buf)) -+ if (ls_buffer_isempty(buf)) - buf->first = buf->last = 0; - } - -@@ -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; -- if (buffer_isempty(buf)) { -+ if (ls_buffer_isempty(buf)) { - size_t got; - err = io->recv(io->ctx, buf->data, BUF_SIZE, &got, tm); - buf->first = 0; Index: patches/patch-src_buffer_h =================================================================== RCS file: patches/patch-src_buffer_h diff -N patches/patch-src_buffer_h --- patches/patch-src_buffer_h 11 Mar 2022 19:46:18 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,22 +0,0 @@ ---- 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; - --int buffer_open(lua_State *L); --void buffer_init(p_buffer buf, p_io io, p_timeout tm); --int buffer_meth_send(lua_State *L, p_buffer buf); --int buffer_meth_receive(lua_State *L, p_buffer buf); --int buffer_meth_getstats(lua_State *L, p_buffer buf); --int buffer_meth_setstats(lua_State *L, p_buffer buf); --int buffer_isempty(p_buffer buf); -+int ls_buffer_open(lua_State *L); -+void ls_buffer_init(p_buffer buf, p_io io, p_timeout tm); -+int ls_buffer_meth_send(lua_State *L, p_buffer buf); -+int ls_buffer_meth_receive(lua_State *L, p_buffer buf); -+int ls_buffer_meth_getstats(lua_State *L, p_buffer buf); -+int ls_buffer_meth_setstats(lua_State *L, p_buffer buf); -+int ls_buffer_isempty(p_buffer buf); - - #endif /* BUF_H */ Index: patches/patch-src_luasocket_c =================================================================== RCS file: patches/patch-src_luasocket_c diff -N patches/patch-src_luasocket_c --- patches/patch-src_luasocket_c 11 Mar 2022 19:46:18 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- 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}, -- {"buffer", buffer_open}, -+ {"buffer", ls_buffer_open}, - {"inet", inet_open}, - {"tcp", tcp_open}, - {"udp", udp_open}, Index: patches/patch-src_makefile =================================================================== RCS file: /cvs/ports/net/luasocket/patches/patch-src_makefile,v retrieving revision 1.6 diff -u -p -r1.6 patch-src_makefile --- patches/patch-src_makefile 11 Mar 2022 19:46:18 -0000 1.6 +++ patches/patch-src_makefile 4 Jan 2023 02:07:06 -0000 @@ -1,50 +1,12 @@ ---- src/makefile.orig Fri Jun 14 13:27:32 2013 -+++ src/makefile Mon Nov 25 17:05:50 2013 -@@ -144,15 +144,15 @@ SOCKET_macosx=usocket.o - # for Linux - SO_linux=so - O_linux=o --CC_linux=gcc -+CC_linux?=gcc - 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 \ -+CFLAGS_linux?= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \ - -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden --LDFLAGS_linux=-O -shared -fpic -o --LD_linux=gcc -+LDFLAGS_linux?=-O -shared -fpic -o -+LD_linux?=gcc - SOCKET_linux=usocket.o - - #------ -@@ -202,12 +202,12 @@ SOCKET_win32=wsocket.obj +Index: src/makefile +--- src/makefile.orig ++++ src/makefile +@@ -272,7 +272,7 @@ SOCKET_win64=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 +307,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) $(SOCKET_OBJS) $(LDFLAGS)$@ +-SOCKET_V=3.0.0 ++SOCKET_V=3.1.0 + MIME_V=1.0.3 + SOCKET_SO=socket-$(SOCKET_V).$(SO) + MIME_SO=mime-$(MIME_V).$(SO) Index: patches/patch-src_mime_c =================================================================== RCS file: patches/patch-src_mime_c diff -N patches/patch-src_mime_c --- patches/patch-src_mime_c 11 Mar 2022 19:46:18 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- 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) --#include "compat-5.1.h" -+#include <luacompat.h> - #endif - - #include "mime.h" Index: patches/patch-src_serial_c =================================================================== RCS file: patches/patch-src_serial_c diff -N patches/patch-src_serial_c --- patches/patch-src_serial_c 11 Mar 2022 19:46:18 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,54 +0,0 @@ ---- 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; - } Index: patches/patch-src_tcp_c =================================================================== RCS file: patches/patch-src_tcp_c diff -N patches/patch-src_tcp_c --- patches/patch-src_tcp_c 11 Mar 2022 19:46:18 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,65 +0,0 @@ ---- 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); -- return buffer_meth_send(L, &tcp->buf); -+ return ls_buffer_meth_send(L, &tcp->buf); - } - - static int meth_receive(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); -- return buffer_meth_receive(L, &tcp->buf); -+ return ls_buffer_meth_receive(L, &tcp->buf); - } - - static int meth_getstats(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); -- return buffer_meth_getstats(L, &tcp->buf); -+ return ls_buffer_meth_getstats(L, &tcp->buf); - } - - static int meth_setstats(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); -- return buffer_meth_setstats(L, &tcp->buf); -+ return ls_buffer_meth_setstats(L, &tcp->buf); - } - - /*-------------------------------------------------------------------------*\ -@@ -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); -- lua_pushboolean(L, !buffer_isempty(&tcp->buf)); -+ lua_pushboolean(L, !ls_buffer_isempty(&tcp->buf)); - return 1; - } - -@@ -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 { -@@ -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 { -@@ -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 */ Index: patches/patch-src_unix_c =================================================================== RCS file: patches/patch-src_unix_c diff -N patches/patch-src_unix_c --- patches/patch-src_unix_c 11 Mar 2022 19:46:18 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,56 +0,0 @@ ---- 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); -- 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, "unix{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, "unix{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, "unix{client}", 1); -- return buffer_meth_setstats(L, &un->buf); -+ return ls_buffer_meth_setstats(L, &un->buf); - } - - /*-------------------------------------------------------------------------*\ -@@ -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); -- lua_pushboolean(L, !buffer_isempty(&un->buf)); -+ lua_pushboolean(L, !ls_buffer_isempty(&un->buf)); - 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, - (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); - return 1; - } else { - lua_pushnil(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); -- buffer_init(&un->buf, &un->io, &un->tm); -+ ls_buffer_init(&un->buf, &un->io, &un->tm); - return 1; - } else { - lua_pushnil(L); Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/net/luasocket/pkg/PLIST,v retrieving revision 1.11 diff -u -p -r1.11 PLIST --- pkg/PLIST 11 Mar 2022 19:46:19 -0000 1.11 +++ pkg/PLIST 4 Jan 2023 02:07:06 -0000 @@ -1,8 +1,9 @@ lib/lua/${MODLUA_VERSION}/mime/ -lib/lua/${MODLUA_VERSION}/mime/core.so +@so lib/lua/${MODLUA_VERSION}/mime/core.so lib/lua/${MODLUA_VERSION}/socket/ -lib/lua/${MODLUA_VERSION}/socket/core.so -lib/lua/${MODLUA_VERSION}/socket/unix.so +@so lib/lua/${MODLUA_VERSION}/socket/core.so +@so lib/lua/${MODLUA_VERSION}/socket/serial.so +@so lib/lua/${MODLUA_VERSION}/socket/unix.so share/doc/${FULLPKGNAME}/ share/doc/${FULLPKGNAME}/dns.html share/doc/${FULLPKGNAME}/ftp.html @@ -34,7 +35,6 @@ share/examples/${FULLPKGNAME}/mcsend.lua share/examples/${FULLPKGNAME}/talker.lua share/examples/${FULLPKGNAME}/tinyirc.lua share/lua/${MODLUA_VERSION}/ltn12.lua -share/lua/${MODLUA_VERSION}/mime/ share/lua/${MODLUA_VERSION}/mime.lua share/lua/${MODLUA_VERSION}/socket/ share/lua/${MODLUA_VERSION}/socket.lua