network support for the lua language, ok jolan@
This commit is contained in:
parent
e18b21c32d
commit
e51b0c693c
44
net/luasocket/Makefile
Normal file
44
net/luasocket/Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $
|
||||
|
||||
NOT_FOR_ARCHS= ${NO_SHARED_ARCHS}
|
||||
|
||||
COMMENT= "network support for the lua language"
|
||||
DISTNAME= luasocket-2.0-beta2
|
||||
PKGNAME= ${DISTNAME:S/0-b/0b/}
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= ${HOMEPAGE}
|
||||
|
||||
HOMEPAGE= http://www.tecgraf.puc-rio.br/~diego/luasocket/
|
||||
|
||||
MAINTAINER= Pedro Martelletto <pedro@openbsd.org>
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
NO_REGRESS= Yes
|
||||
|
||||
BUILD_DEPENDS= ::lang/lua
|
||||
RUN_DEPENDS= ${BUILD_DEPENDS}
|
||||
|
||||
MAKE_FILE= makefile.Linux # heh, yeah, linux, sure...
|
||||
|
||||
post-extract:
|
||||
@sed -e "s:@socketpath@:${PREFIX}/lua/luasocket/?.lua:g" \
|
||||
${FILESDIR}/init.lua > ${WRKSRC}/init.lua
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lua/luasocket
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/luasocket
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/luasocket
|
||||
${INSTALL_DATA} ${WRKSRC}/luasocket*.so.*.* ${PREFIX}/lib/luasocket.so
|
||||
${INSTALL_DATA} ${WRKSRC}/mime*.so* ${PREFIX}/lib/mime.so
|
||||
${INSTALL_DATA} ${WRKSRC}/lua/*.lua ${PREFIX}/lua/luasocket
|
||||
${INSTALL_DATA} ${WRKSRC}/etc/*.lua ${PREFIX}/lua/luasocket
|
||||
${INSTALL_DATA} ${WRKSRC}/manual/* ${PREFIX}/share/doc/luasocket
|
||||
${INSTALL_DATA} ${WRKSRC}/examples/* ${PREFIX}/share/examples/luasocket
|
||||
${INSTALL_DATA} ${WRKSRC}/init.lua ${PREFIX}/lua/luasocket
|
||||
|
||||
.include <bsd.port.mk>
|
3
net/luasocket/distinfo
Normal file
3
net/luasocket/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (luasocket-2.0-beta2.tar.gz) = d65c3eba249866716f913ee019c347ba
|
||||
RMD160 (luasocket-2.0-beta2.tar.gz) = 3cecfd21d92eb7a3a8705295c7a8c3d8118ebbad
|
||||
SHA1 (luasocket-2.0-beta2.tar.gz) = c27e8b20f3e1119f5d6bbf947ecacfdad27b4330
|
4
net/luasocket/files/init.lua
Normal file
4
net/luasocket/files/init.lua
Normal file
@ -0,0 +1,4 @@
|
||||
-- $OpenBSD: init.lua,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $
|
||||
-- luasocket's initialization steps
|
||||
LUA_PATH = lua_addpath(LUA_PATH, "@socketpath@")
|
||||
require("lua")
|
23
net/luasocket/patches/patch-buffer_c
Normal file
23
net/luasocket/patches/patch-buffer_c
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-buffer_c,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $
|
||||
--- buffer.c.orig Mon Jul 26 17:17:35 2004
|
||||
+++ buffer.c Tue Aug 10 21:11:45 2004
|
||||
@@ -75,7 +75,9 @@ int buf_meth_setstats(lua_State *L, p_bu
|
||||
\*-------------------------------------------------------------------------*/
|
||||
int buf_meth_send(lua_State *L, p_buf buf) {
|
||||
int top = lua_gettop(L);
|
||||
+#ifdef LUASOCKET_DEBUG
|
||||
p_tm tm = tm_markstart(buf->tm);
|
||||
+#endif
|
||||
int err = IO_DONE;
|
||||
size_t size, sent;
|
||||
const char *data = luaL_checklstring(L, 2, &size);
|
||||
@@ -108,7 +110,9 @@ int buf_meth_send(lua_State *L, p_buf bu
|
||||
\*-------------------------------------------------------------------------*/
|
||||
int buf_meth_receive(lua_State *L, p_buf buf) {
|
||||
int err = IO_DONE, top = lua_gettop(L);
|
||||
+#ifdef LUASOCKET_DEBUG
|
||||
p_tm tm = tm_markstart(buf->tm);
|
||||
+#endif
|
||||
luaL_Buffer b;
|
||||
size_t size;
|
||||
const char *part = luaL_optlstring(L, 3, "", &size);
|
13
net/luasocket/patches/patch-etc_lua_lua
Normal file
13
net/luasocket/patches/patch-etc_lua_lua
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-etc_lua_lua,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $
|
||||
--- etc/lua.lua.orig Mon Jul 26 17:17:36 2004
|
||||
+++ etc/lua.lua Fri Oct 15 00:17:54 2004
|
||||
@@ -7,6 +7,9 @@ local function find(lib)
|
||||
f, e1 = loadfile(n)
|
||||
if f then break end
|
||||
end
|
||||
+ if not f then
|
||||
+ e1 = string.format("could not load package `%s' from path %s", lib, path)
|
||||
+ end
|
||||
return f, e1
|
||||
end
|
||||
|
49
net/luasocket/patches/patch-makefile_Linux
Normal file
49
net/luasocket/patches/patch-makefile_Linux
Normal file
@ -0,0 +1,49 @@
|
||||
$OpenBSD: patch-makefile_Linux,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $
|
||||
--- makefile.Linux.orig Mon Jul 26 17:17:35 2004
|
||||
+++ makefile.Linux Tue Aug 10 21:16:32 2004
|
||||
@@ -3,28 +3,13 @@ MV=1.0
|
||||
|
||||
LUAC=luac
|
||||
BIN2C=bin2c
|
||||
-CC=gcc
|
||||
-OPT=-O2
|
||||
-DEF = -DLUASOCKET_DEBUG #-Dsocklen_t=int
|
||||
|
||||
-LOBJS= \
|
||||
- luasocket.o \
|
||||
- timeout.o \
|
||||
- buffer.o \
|
||||
- io.o \
|
||||
- auxiliar.o \
|
||||
- except.o \
|
||||
- select.o \
|
||||
- options.o \
|
||||
- inet.o \
|
||||
- tcp.o \
|
||||
- udp.o \
|
||||
- usocket.o
|
||||
+LOBJS= luasocket.o timeout.o buffer.o io.o auxiliar.o except.o select.o\
|
||||
+ options.o inet.o tcp.o udp.o usocket.o
|
||||
|
||||
-MOBJS= \
|
||||
- mime.o
|
||||
+MOBJS= mime.o
|
||||
|
||||
-CFLAGS=-I../../include $(PROF) $(OPT) $(DBG) $(DEF) -pedantic -W -Wall
|
||||
+CFLAGS+= -I$(LOCALBASE)/include
|
||||
|
||||
LDYN=luasocket.so.$(LV)
|
||||
|
||||
@@ -33,10 +18,10 @@ MDYN=mime.so.$(MV)
|
||||
all: $(LDYN) $(MDYN)
|
||||
|
||||
$(LDYN): $(LOBJS)
|
||||
- gcc -shared -o $(LDYN) $(LOBJS)
|
||||
+ $(CC) -shared -o $(LDYN) $(LOBJS)
|
||||
|
||||
$(MDYN): $(MOBJS)
|
||||
- gcc -shared -o $(MDYN) $(MOBJS)
|
||||
+ $(CC) -shared -o $(MDYN) $(MOBJS)
|
||||
|
||||
# dependencies
|
||||
auxiliar.o: auxiliar.c auxiliar.h
|
4
net/luasocket/pkg/DESCR
Normal file
4
net/luasocket/pkg/DESCR
Normal file
@ -0,0 +1,4 @@
|
||||
LuaSocket is a Lua extension library that is composed by two parts: a C
|
||||
core that provides support for the TCP and UDP transport layers, and a
|
||||
set of Lua modules that add support for functionality commonly needed by
|
||||
applications that deal with the Internet.
|
3
net/luasocket/pkg/PFRAG.shared
Normal file
3
net/luasocket/pkg/PFRAG.shared
Normal file
@ -0,0 +1,3 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $
|
||||
lib/luasocket.so
|
||||
lib/mime.so
|
51
net/luasocket/pkg/PLIST
Normal file
51
net/luasocket/pkg/PLIST
Normal file
@ -0,0 +1,51 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $
|
||||
@unexec lua ${SYSCONFDIR}/lua/luapkg.lua del luasocket
|
||||
lua/
|
||||
lua/luasocket/
|
||||
lua/luasocket/check-links.lua
|
||||
lua/luasocket/dict.lua
|
||||
lua/luasocket/ftp.lua
|
||||
lua/luasocket/get.lua
|
||||
lua/luasocket/http.lua
|
||||
lua/luasocket/init.lua
|
||||
lua/luasocket/lp.lua
|
||||
lua/luasocket/ltn12.lua
|
||||
lua/luasocket/lua.lua
|
||||
lua/luasocket/mime.lua
|
||||
lua/luasocket/smtp.lua
|
||||
lua/luasocket/socket.lua
|
||||
lua/luasocket/tftp.lua
|
||||
lua/luasocket/tp.lua
|
||||
lua/luasocket/url.lua
|
||||
share/doc/luasocket/
|
||||
share/doc/luasocket/dns.html
|
||||
share/doc/luasocket/ftp.html
|
||||
share/doc/luasocket/home.html
|
||||
share/doc/luasocket/http.html
|
||||
share/doc/luasocket/introduction.html
|
||||
share/doc/luasocket/ltn12.html
|
||||
share/doc/luasocket/luasocket.png
|
||||
share/doc/luasocket/mime.html
|
||||
share/doc/luasocket/reference.css
|
||||
share/doc/luasocket/reference.html
|
||||
share/doc/luasocket/smtp.html
|
||||
share/doc/luasocket/socket.html
|
||||
share/doc/luasocket/tcp.html
|
||||
share/doc/luasocket/udp.html
|
||||
share/doc/luasocket/url.html
|
||||
share/examples/luasocket/
|
||||
share/examples/luasocket/README
|
||||
share/examples/luasocket/b64.lua
|
||||
share/examples/luasocket/cddb.lua
|
||||
share/examples/luasocket/check-memory.lua
|
||||
share/examples/luasocket/daytimeclnt.lua
|
||||
share/examples/luasocket/echoclnt.lua
|
||||
share/examples/luasocket/echosrvr.lua
|
||||
share/examples/luasocket/eol.lua
|
||||
share/examples/luasocket/listener.lua
|
||||
share/examples/luasocket/lpr.lua
|
||||
share/examples/luasocket/qp.lua
|
||||
share/examples/luasocket/talker.lua
|
||||
share/examples/luasocket/tinyirc.lua
|
||||
@exec lua ${SYSCONFDIR}/lua/luapkg.lua add luasocket ${PREFIX}/lua/luasocket/init.lua
|
||||
%%SHARED%%
|
Loading…
Reference in New Issue
Block a user