Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel devel: Add lua-event
details: https://anonhg.NetBSD.org/pkgsrc/rev/566f0458103f
branches: trunk
changeset: 435655:566f0458103f
user: nia <nia%pkgsrc.org@localhost>
date: Sat Jul 11 12:37:25 2020 +0000
description:
devel: Add lua-event
This is a binding of libevent to Lua. It includes a higher level wrapper
mimicking copas, and an interface to core libevent functions.
diffstat:
devel/Makefile | 3 +-
devel/lua-event/DESCR | 2 +
devel/lua-event/Makefile | 48 ++++++++++++++++++++++++++++++++++++++++++
devel/lua-event/PLIST | 9 +++++++
devel/lua-event/distinfo | 6 +++++
devel/lua-event/files/Makefile | 18 +++++++++++++++
6 files changed, 85 insertions(+), 1 deletions(-)
diffs (120 lines):
diff -r 30abea81f4bb -r 566f0458103f devel/Makefile
--- a/devel/Makefile Sat Jul 11 11:57:12 2020 +0000
+++ b/devel/Makefile Sat Jul 11 12:37:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3170 2020/07/10 11:18:01 nia Exp $
+# $NetBSD: Makefile,v 1.3171 2020/07/11 12:37:25 nia Exp $
#
COMMENT= Development utilities
@@ -858,6 +858,7 @@
SUBDIR+= lua-cov
SUBDIR+= lua-coxpcall
SUBDIR+= lua-cqueues
+SUBDIR+= lua-event
SUBDIR+= lua-fifo
SUBDIR+= lua-filesystem
SUBDIR+= lua-gi
diff -r 30abea81f4bb -r 566f0458103f devel/lua-event/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-event/DESCR Sat Jul 11 12:37:25 2020 +0000
@@ -0,0 +1,2 @@
+This is a binding of libevent to Lua. It includes a higher level wrapper
+mimicking copas, and an interface to core libevent functions.
diff -r 30abea81f4bb -r 566f0458103f devel/lua-event/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-event/Makefile Sat Jul 11 12:37:25 2020 +0000
@@ -0,0 +1,48 @@
+# $NetBSD: Makefile,v 1.1 2020/07/11 12:37:25 nia Exp $
+
+DISTNAME= luaevent-0.4.6
+PKGNAME= ${LUA_PKGPREFIX}-${DISTNAME:S/^lua//1}
+CATEGORIES= devel lua
+MASTER_SITES= ${MASTER_SITE_GITHUB:=harningt/}
+GITHUB_PROJECT= luaevent
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/harningt/luaevent
+COMMENT= Binding of libevent to Lua, with drop-in replacement for copas
+LICENSE= mit
+
+BUILD_DIRS+= src
+
+INSTALLATION_DIRS+= ${LUA_DOCDIR}
+INSTALLATION_DIRS+= ${LUA_DOCDIR}/modules
+INSTALLATION_DIRS+= ${LUA_CDIR}/luaevent
+INSTALLATION_DIRS+= ${LUA_LDIR}
+
+pre-build:
+ # There's an included Makefile, but doing it this way is better:
+ # - The included Makefile does not benefit from make -j
+ # - The included Makefile does not respect the environment
+ # - The included Makefile requires gmake
+ ${CP} -f ${FILESDIR}/Makefile ${WRKSRC}/src/Makefile
+
+do-install:
+ ${INSTALL_LIB} ${WRKSRC}/src/core.so \
+ ${DESTDIR}${PREFIX}/${LUA_CDIR}/luaevent/core.so
+ ${INSTALL_DATA} ${WRKSRC}/lua/*.lua \
+ ${DESTDIR}${PREFIX}/${LUA_LDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/*.mdwn \
+ ${DESTDIR}${PREFIX}/${LUA_DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/modules/*.mdwn \
+ ${DESTDIR}${PREFIX}/${LUA_DOCDIR}/modules
+
+do-test:
+ # Set up the directory layout so Lua finds core.so without it
+ # being installed system-wide.
+ ${MKDIR} -p ${WRKSRC}/test/luaevent
+ ${CP} -f ${WRKSRC}/src/core.so ${WRKSRC}/test/luaevent
+ cd ${WRKSRC}/test && LUA_PATH=${WRKSRC}/lua/?.lua ${LUA_INTERPRETER} basic.lua
+
+.include "../../lang/lua/module.mk"
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 30abea81f4bb -r 566f0458103f devel/lua-event/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-event/PLIST Sat Jul 11 12:37:25 2020 +0000
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2020/07/11 12:37:25 nia Exp $
+${LUA_CDIR}/luaevent/core.so
+${LUA_DOCDIR}/api.mdwn
+${LUA_DOCDIR}/index.mdwn
+${LUA_DOCDIR}/modules/luaevent.core.buffer.mdwn
+${LUA_DOCDIR}/modules/luaevent.core.bufferevent.mdwn
+${LUA_DOCDIR}/modules/luaevent.core.mdwn
+${LUA_DOCDIR}/modules/luaevent.mdwn
+${LUA_LDIR}/luaevent.lua
diff -r 30abea81f4bb -r 566f0458103f devel/lua-event/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-event/distinfo Sat Jul 11 12:37:25 2020 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/07/11 12:37:25 nia Exp $
+
+SHA1 (luaevent-0.4.6.tar.gz) = bdeed4c612ed7b2cf4e86d3ccc9ba80730537aad
+RMD160 (luaevent-0.4.6.tar.gz) = 348cfb3381519b72f64a5a96b82f4418f6814664
+SHA512 (luaevent-0.4.6.tar.gz) = 21e222d5bba75fd2e623a8abf20fc3cd38505bf7d3fe94d8781ed626556c398a8501775eb423f0567918cc75f2d846026d4aa559ac5129eca8261f0c73427913
+Size (luaevent-0.4.6.tar.gz) = 22599 bytes
diff -r 30abea81f4bb -r 566f0458103f devel/lua-event/files/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-event/files/Makefile Sat Jul 11 12:37:25 2020 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2020/07/11 12:37:25 nia Exp $
+
+CFLAGS+= -fPIC -Wall -I../include
+LDFLAGS+= -levent -shared
+
+OBJS+= buffer_event.o
+OBJS+= event_buffer.o
+OBJS+= event_callback.o
+OBJS+= luaevent.o
+OBJS+= utility.o
+
+all: core.so
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
+core.so: $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS)
Home |
Main Index |
Thread Index |
Old Index