diff --git a/net/luasocket/Makefile b/net/luasocket/Makefile index 2c8eb697eca..7c0a6a45823 100644 --- a/net/luasocket/Makefile +++ b/net/luasocket/Makefile @@ -1,14 +1,14 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $ +# $OpenBSD: Makefile,v 1.2 2005/04/19 15:14:38 pedro Exp $ NOT_FOR_ARCHS= ${NO_SHARED_ARCHS} COMMENT= "network support for the lua language" -DISTNAME= luasocket-2.0-beta2 +DISTNAME= luasocket-2.0-beta3 PKGNAME= ${DISTNAME:S/0-b/0b/} CATEGORIES= net MASTER_SITES= ${HOMEPAGE} -HOMEPAGE= http://www.tecgraf.puc-rio.br/~diego/luasocket/ +HOMEPAGE= http://www.cs.princeton.edu/~diego/professional/luasocket/ MAINTAINER= Pedro Martelletto @@ -20,25 +20,33 @@ PERMIT_DISTFILES_FTP= Yes NO_REGRESS= Yes -BUILD_DEPENDS= ::lang/lua +BUILD_DEPENDS= ::lang/lua ::devel/luacompat RUN_DEPENDS= ${BUILD_DEPENDS} MAKE_FILE= makefile.Linux # heh, yeah, linux, sure... post-extract: @sed -e "s:@socketpath@:${PREFIX}/lua/luasocket/?.lua:g" \ + -e "s:@socketcpath@:${PREFIX}/lib/?.so:g" \ ${FILESDIR}/init.lua > ${WRKSRC}/init.lua - + do-install: ${INSTALL_DATA_DIR} ${PREFIX}/lua/luasocket + ${INSTALL_DATA_DIR} ${PREFIX}/lua/luasocket/socket ${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}/luamime*.so* ${PREFIX}/lib/luamime.so + ${INSTALL_DATA} ${WRKSRC}/init.lua ${PREFIX}/lua/luasocket + ${INSTALL_DATA} ${WRKSRC}/lua/socket.lua ${PREFIX}/lua/luasocket + ${INSTALL_DATA} ${WRKSRC}/lua/ltn12.lua ${PREFIX}/lua/luasocket + ${INSTALL_DATA} ${WRKSRC}/lua/mime.lua ${PREFIX}/lua/luasocket + ${INSTALL_DATA} ${WRKSRC}/lua/ftp.lua ${PREFIX}/lua/luasocket/socket + ${INSTALL_DATA} ${WRKSRC}/lua/http.lua ${PREFIX}/lua/luasocket/socket + ${INSTALL_DATA} ${WRKSRC}/lua/smtp.lua ${PREFIX}/lua/luasocket/socket + ${INSTALL_DATA} ${WRKSRC}/lua/tp.lua ${PREFIX}/lua/luasocket/socket + ${INSTALL_DATA} ${WRKSRC}/lua/url.lua ${PREFIX}/lua/luasocket/socket ${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 diff --git a/net/luasocket/distinfo b/net/luasocket/distinfo index abf5118fbed..9c463aa6675 100644 --- a/net/luasocket/distinfo +++ b/net/luasocket/distinfo @@ -1,4 +1,4 @@ -MD5 (luasocket-2.0-beta2.tar.gz) = d65c3eba249866716f913ee019c347ba -RMD160 (luasocket-2.0-beta2.tar.gz) = 3cecfd21d92eb7a3a8705295c7a8c3d8118ebbad -SHA1 (luasocket-2.0-beta2.tar.gz) = c27e8b20f3e1119f5d6bbf947ecacfdad27b4330 -SIZE (luasocket-2.0-beta2.tar.gz) = 109897 +MD5 (luasocket-2.0-beta3.tar.gz) = ba32118746205cb088ce7fed06d8d1b7 +RMD160 (luasocket-2.0-beta3.tar.gz) = 49deb7b7050f831717b7e34852cf044745f0e62a +SHA1 (luasocket-2.0-beta3.tar.gz) = e49638ea4dee174dba26af58d9bb37b93a12bd14 +SIZE (luasocket-2.0-beta3.tar.gz) = 115472 diff --git a/net/luasocket/files/init.lua b/net/luasocket/files/init.lua index 2eaf1970aea..21c81f99235 100644 --- a/net/luasocket/files/init.lua +++ b/net/luasocket/files/init.lua @@ -1,4 +1,4 @@ --- $OpenBSD: init.lua,v 1.2 2005/04/19 14:31:27 pedro Exp $ +-- $OpenBSD: init.lua,v 1.3 2005/04/19 15:14:38 pedro Exp $ -- luasocket's initialization steps lua_addpath("@socketpath@") -require("lua") +lua_addcpath("@socketcpath@") diff --git a/net/luasocket/patches/patch-etc_lua_lua b/net/luasocket/patches/patch-etc_lua_lua deleted file mode 100644 index 012e32e7fc5..00000000000 --- a/net/luasocket/patches/patch-etc_lua_lua +++ /dev/null @@ -1,13 +0,0 @@ -$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 - diff --git a/net/luasocket/patches/patch-lua_mime_lua b/net/luasocket/patches/patch-lua_mime_lua new file mode 100644 index 00000000000..b5bfc7f3843 --- /dev/null +++ b/net/luasocket/patches/patch-lua_mime_lua @@ -0,0 +1,12 @@ +$OpenBSD: patch-lua_mime_lua,v 1.1 2005/04/19 15:14:38 pedro Exp $ +--- lua/mime.lua.orig Sat Apr 16 18:09:59 2005 ++++ lua/mime.lua Sat Apr 16 18:10:05 2005 +@@ -10,7 +10,7 @@ + ----------------------------------------------------------------------------- + local base = require("base") + local ltn12 = require("ltn12") +-local mime = require("lmime") ++local mime = require("luamime") + module("mime") + + -- encode, decode and wrap algorithm tables diff --git a/net/luasocket/patches/patch-lua_socket_lua b/net/luasocket/patches/patch-lua_socket_lua new file mode 100644 index 00000000000..3858aae4302 --- /dev/null +++ b/net/luasocket/patches/patch-lua_socket_lua @@ -0,0 +1,12 @@ +$OpenBSD: patch-lua_socket_lua,v 1.1 2005/04/19 15:14:38 pedro Exp $ +--- lua/socket.lua.orig Sat Apr 16 17:37:22 2005 ++++ lua/socket.lua Sat Apr 16 17:37:31 2005 +@@ -10,7 +10,7 @@ + local base = require("base") + local string = require("string") + local math = require("math") +-local socket = require("lsocket") ++local socket = require("luasocket") + module("socket") + + ----------------------------------------------------------------------------- diff --git a/net/luasocket/patches/patch-luasocket_c b/net/luasocket/patches/patch-luasocket_c new file mode 100644 index 00000000000..3d9dadef8f8 --- /dev/null +++ b/net/luasocket/patches/patch-luasocket_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-luasocket_c,v 1.1 2005/04/19 15:14:38 pedro Exp $ +--- luasocket.c.orig Sat Jan 15 20:52:38 2005 ++++ luasocket.c Sat Apr 16 17:40:26 2005 +@@ -19,7 +19,7 @@ + \*=========================================================================*/ + #include + #include +-#include "compat-5.1.h" ++#include + #include "luasocket.h" + + /*=========================================================================*\ +@@ -108,7 +108,7 @@ static int base_open(lua_State *L) { + /*-------------------------------------------------------------------------*\ + * Initializes all library modules. + \*-------------------------------------------------------------------------*/ +-LUASOCKET_API int luaopen_lsocket(lua_State *L) { ++LUASOCKET_API int luaopen_luasocket(lua_State *L) { + int i; + base_open(L); + for (i = 0; mod[i].name; i++) mod[i].func(L); diff --git a/net/luasocket/patches/patch-makefile_Linux b/net/luasocket/patches/patch-makefile_Linux index 7a940a7446e..697f1133ce8 100644 --- a/net/luasocket/patches/patch-makefile_Linux +++ b/net/luasocket/patches/patch-makefile_Linux @@ -1,12 +1,12 @@ -$OpenBSD: patch-makefile_Linux,v 1.2 2004/12/29 07:29:16 pvalchev Exp $ ---- makefile.Linux.orig Mon Jul 26 14:17:35 2004 -+++ makefile.Linux Wed Dec 29 00:29:02 2004 -@@ -3,28 +3,13 @@ MV=1.0 +$OpenBSD: patch-makefile_Linux,v 1.3 2005/04/19 15:14:38 pedro Exp $ +--- makefile.Linux.orig Sat Jan 15 20:52:38 2005 ++++ makefile.Linux Sat Apr 16 17:23:40 2005 +@@ -5,42 +5,26 @@ COMPAT=compat-5.1r2 LUAC=luac BIN2C=bin2c -CC=gcc --OPT=-O2 +-OPT=-O2 $(INC) -DEF = -DLUASOCKET_DEBUG #-Dsocklen_t=int -LOBJS= \ @@ -21,29 +21,35 @@ $OpenBSD: patch-makefile_Linux,v 1.2 2004/12/29 07:29:16 pvalchev Exp $ - 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 +- usocket.o \ +- $(COMPAT)/compat-5.1.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 +- mime.o \ +- $(COMPAT)/compat-5.1.o ++MOBJS= mime.o --CFLAGS=-I../../include $(PROF) $(OPT) $(DBG) $(DEF) -pedantic -W -Wall +-CFLAGS=-I../../include -I$(COMPAT) $(PROF) $(OPT) $(DBG) $(DEF) -pedantic -W -Wall +CFLAGS+= -I$(LOCALBASE)/include -fPIC -DPIC ++LDFLAGS+= -L$(LOCALBASE)/lib -lluacompat - LDYN=luasocket.so.$(LV) +-LDYN=lsocket.so ++LDYN=luasocket.so.$(LV) + +-MDYN=lmime.so ++MDYN=luamime.so.$(LV) -@@ -33,10 +18,10 @@ MDYN=mime.so.$(MV) all: $(LDYN) $(MDYN) $(LDYN): $(LOBJS) - gcc -shared -o $(LDYN) $(LOBJS) -+ $(CC) -shared -fPIC -o $(LDYN) $(LOBJS) ++ $(CC) -shared $(LDFLAGS) -fPIC -o $(LDYN) $(LOBJS) $(MDYN): $(MOBJS) - gcc -shared -o $(MDYN) $(MOBJS) -+ $(CC) -shared -fPIC -o $(MDYN) $(MOBJS) ++ $(CC) -shared $(LDFLAGS) -fPIC -o $(MDYN) $(MOBJS) - # dependencies auxiliar.o: auxiliar.c auxiliar.h + buffer.o: buffer.c buffer.h io.h timeout.h diff --git a/net/luasocket/patches/patch-mime_c b/net/luasocket/patches/patch-mime_c new file mode 100644 index 00000000000..22c1647fcb6 --- /dev/null +++ b/net/luasocket/patches/patch-mime_c @@ -0,0 +1,22 @@ +$OpenBSD: patch-mime_c,v 1.1 2005/04/19 15:14:38 pedro Exp $ +--- mime.c.orig Sat Jan 15 20:52:38 2005 ++++ mime.c Sat Apr 16 18:06:59 2005 +@@ -8,8 +8,7 @@ + + #include + #include +- +-#include "compat-5.1.h" ++#include + #include "mime.h" + + /*=========================================================================*\ +@@ -78,7 +77,7 @@ static UC b64unbase[256]; + /*-------------------------------------------------------------------------*\ + * Initializes module + \*-------------------------------------------------------------------------*/ +-MIME_API int luaopen_lmime(lua_State *L) ++MIME_API int luaopen_luamime(lua_State *L) + { + luaL_module(L, "mime", func, 0); + /* initialize lookup tables */ diff --git a/net/luasocket/pkg/PFRAG.shared b/net/luasocket/pkg/PFRAG.shared index 1805b0db242..ecfaa5845fe 100644 --- a/net/luasocket/pkg/PFRAG.shared +++ b/net/luasocket/pkg/PFRAG.shared @@ -1,3 +1,3 @@ -@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $ +@comment $OpenBSD: PFRAG.shared,v 1.2 2005/04/19 15:14:38 pedro Exp $ +lib/luamime.so lib/luasocket.so -lib/mime.so diff --git a/net/luasocket/pkg/PLIST b/net/luasocket/pkg/PLIST index 028ce5fd2af..883d230c619 100644 --- a/net/luasocket/pkg/PLIST +++ b/net/luasocket/pkg/PLIST @@ -1,27 +1,23 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2004/12/16 13:38:12 pedro Exp $ +@comment $OpenBSD: PLIST,v 1.2 2005/04/19 15:14:38 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/luasocket/socket.lua -lua/luasocket/tftp.lua -lua/luasocket/tp.lua -lua/luasocket/url.lua +lua/luasocket/socket/ftp.lua +lua/luasocket/socket/http.lua +lua/luasocket/socket/smtp.lua +lua/luasocket/socket/tp.lua +lua/luasocket/socket/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/installation.html share/doc/luasocket/introduction.html share/doc/luasocket/ltn12.html share/doc/luasocket/luasocket.png