luacopas-1.0b, coroutine oriented portable asynchronous services for lua

from pedro@
This commit is contained in:
jolan 2005-05-15 00:49:08 +00:00
parent 062b1f9125
commit 04e7d65452
5 changed files with 66 additions and 0 deletions

37
devel/luacopas/Makefile Normal file
View File

@ -0,0 +1,37 @@
# $OpenBSD: Makefile,v 1.1.1.1 2005/05/15 00:49:08 jolan Exp $
COMMENT= "coroutine oriented portable asynchronous services for lua"
DISTNAME= copas-1.0b
PKGNAME= luacopas-1.0b
CATEGORIES= devel
MASTER_SITES= http://luaforge.net/frs/download.php/461/
HOMEPAGE= http://www.keplerproject.org/copas/
MAINTAINER= Pedro Martelletto <pedro@openbsd.org>
# MIT
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
NO_BUILD= Yes
NO_REGRESS= Yes
RUN_DEPENDS= ::lang/lua ::devel/luacompat ::net/luasocket
WRKDIST= ${WRKDIR}/copas
post-extract:
@sed -e "s:@copaspath@:${PREFIX}/lua/luacopas/?.lua:g" \
${FILESDIR}/init.lua > ${WRKSRC}/init.lua
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/lua/luacopas
${INSTALL_DATA} ${WRKSRC}/init.lua ${PREFIX}/lua/luacopas
${INSTALL_DATA} ${WRKSRC}/copas.lua ${PREFIX}/lua/luacopas
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/luacopas
${INSTALL_DATA} ${WRKSRC}/*.html ${WRKSRC}/*.png \
${PREFIX}/share/doc/luacopas
.include <bsd.port.mk>

4
devel/luacopas/distinfo Normal file
View File

@ -0,0 +1,4 @@
MD5 (copas-1.0b.tar.gz) = 77e734eca49856368fd04e05b719fad6
RMD160 (copas-1.0b.tar.gz) = fa7b4a5c05d37a246979f34c159e67c47f261650
SHA1 (copas-1.0b.tar.gz) = c4f7c139ba8c3b2ea559fe0abc96c854c21d3a89
SIZE (copas-1.0b.tar.gz) = 17335

View File

@ -0,0 +1,3 @@
-- $OpenBSD: init.lua,v 1.1.1.1 2005/05/15 00:49:08 jolan Exp $
-- luacopas' initialization steps
lua_addpath("@copaspath@")

12
devel/luacopas/pkg/DESCR Normal file
View File

@ -0,0 +1,12 @@
Copas is a dispatcher based on coroutines that can be used by TCP/IP
socket request/response servers. It uses LuaSocket as the interface with
the TCP/IP stack.
A server registered with Copas should provide a handler for requests and
use Copas socket functions to send the response. Copas loops through
requests and invokes the corresponding handlers.
Since Copas is coroutine based, using it within a pcall or xpcall context
does not work with Lua 5.0 yielding. If you need to use those functions
we strongly suggest using Xavante's coxpcall, a coroutine safe version
of the Lua 5.0 protected calls.

10
devel/luacopas/pkg/PLIST Normal file
View File

@ -0,0 +1,10 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/05/15 00:49:08 jolan Exp $
@unexec lua ${SYSCONFDIR}/lua/luapkg.lua del luacopas
lua/luacopas/
lua/luacopas/copas.lua
lua/luacopas/init.lua
@exec lua ${SYSCONFDIR}/lua/luapkg.lua add luacopas ${PREFIX}/lua/luacopas/init.lua
share/doc/luacopas/
share/doc/luacopas/copas.png
share/doc/luacopas/index.html
share/doc/luacopas/license.html