From f3814257bca0c12ed373ea8a4300d9ba6f73216a Mon Sep 17 00:00:00 2001 From: jolan Date: Sat, 15 Aug 2009 17:34:36 +0000 Subject: [PATCH] coxpcall-1.13.0 - encapsulate protected Lua calls with a coroutine based loop; from scott vokes --- devel/coxpcall/Makefile | 27 +++++++++++++++++++++++++++ devel/coxpcall/distinfo | 5 +++++ devel/coxpcall/pkg/DESCR | 6 ++++++ devel/coxpcall/pkg/PLIST | 2 ++ 4 files changed, 40 insertions(+) create mode 100644 devel/coxpcall/Makefile create mode 100644 devel/coxpcall/distinfo create mode 100644 devel/coxpcall/pkg/DESCR create mode 100644 devel/coxpcall/pkg/PLIST diff --git a/devel/coxpcall/Makefile b/devel/coxpcall/Makefile new file mode 100644 index 00000000000..817e5bb8db9 --- /dev/null +++ b/devel/coxpcall/Makefile @@ -0,0 +1,27 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2009/08/15 17:34:36 jolan Exp $ + +COMMENT = encapsulate protected Lua calls with a coroutine based loop + +DISTNAME = coxpcall-1.13.0 +CATEGORIES = devel +HOMEPAGE = http://coxpcall.luaforge.net/ + +MAINTAINER = Scott Vokes + +# MIT +PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_FTP = Yes +PERMIT_DISTFILES_CDROM =Yes +PERMIT_DISTFILES_FTP = Yes + +MASTER_SITES = http://luaforge.net/frs/download.php/3406/ + +MODULES = lang/lua +NO_BUILD = Yes +NO_REGRESS = Yes + +do-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/lua/5.1/ + ${INSTALL_DATA} ${WRKSRC}/src/coxpcall.lua ${PREFIX}/share/lua/5.1/ + +.include diff --git a/devel/coxpcall/distinfo b/devel/coxpcall/distinfo new file mode 100644 index 00000000000..31291e5d978 --- /dev/null +++ b/devel/coxpcall/distinfo @@ -0,0 +1,5 @@ +MD5 (coxpcall-1.13.0.tar.gz) = 0+BVTcQmp6JONyeAs91f5g== +RMD160 (coxpcall-1.13.0.tar.gz) = H0dpHvojPW9YTBByZH+xMwqZnEo= +SHA1 (coxpcall-1.13.0.tar.gz) = izMhqbdDBbE0fOJUPpmKEYyoJwE= +SHA256 (coxpcall-1.13.0.tar.gz) = BZHr2hY2eYZJ1uvWWeusNc5GGLk134q972M/Ndcq9w0= +SIZE (coxpcall-1.13.0.tar.gz) = 17761 diff --git a/devel/coxpcall/pkg/DESCR b/devel/coxpcall/pkg/DESCR new file mode 100644 index 00000000000..3cfd55ec5ae --- /dev/null +++ b/devel/coxpcall/pkg/DESCR @@ -0,0 +1,6 @@ +Coxpcall encapsulates the protected calls with a coroutine based loop, +so errors can be handled without the usual pcall/xpcall issues with +coroutines. + +Using Coxpcall usually consists in simply loading the module and then +replacing Lua pcall and xpcall by copcall and coxpcall. diff --git a/devel/coxpcall/pkg/PLIST b/devel/coxpcall/pkg/PLIST new file mode 100644 index 00000000000..f1290b065fb --- /dev/null +++ b/devel/coxpcall/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2009/08/15 17:34:36 jolan Exp $ +share/lua/5.1/coxpcall.lua