pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/time



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun Mar  6 08:58:21 UTC 2022

Modified Files:
        pkgsrc/time: Makefile
Added Files:
        pkgsrc/time/lua-chronos: DESCR Makefile PLIST distinfo
        pkgsrc/time/lua-chronos/files: Makefile test.lua

Log Message:
add time/lua-chronos

High resolution monotonic timers for Lua


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 pkgsrc/time/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/time/lua-chronos/DESCR \
    pkgsrc/time/lua-chronos/Makefile pkgsrc/time/lua-chronos/PLIST \
    pkgsrc/time/lua-chronos/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/time/lua-chronos/files/Makefile \
    pkgsrc/time/lua-chronos/files/test.lua

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/time/Makefile
diff -u pkgsrc/time/Makefile:1.228 pkgsrc/time/Makefile:1.229
--- pkgsrc/time/Makefile:1.228  Fri Dec 24 16:08:52 2021
+++ pkgsrc/time/Makefile        Sun Mar  6 08:58:20 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.228 2021/12/24 16:08:52 wiz Exp $
+# $NetBSD: Makefile,v 1.229 2022/03/06 08:58:20 nia Exp $
 #
 
 COMMENT=       Clocks, calendars, daily planners and other time related applications
@@ -57,6 +57,7 @@ SUBDIR+=      leapsunpack
 SUBDIR+=       libical
 SUBDIR+=       lmclock
 SUBDIR+=       logtime
+SUBDIR+=       lua-chronos
 SUBDIR+=       lua-date
 SUBDIR+=       lua-tz
 SUBDIR+=       memo

Added files:

Index: pkgsrc/time/lua-chronos/DESCR
diff -u /dev/null pkgsrc/time/lua-chronos/DESCR:1.1
--- /dev/null   Sun Mar  6 08:58:21 2022
+++ pkgsrc/time/lua-chronos/DESCR       Sun Mar  6 08:58:21 2022
@@ -0,0 +1 @@
+High resolution monotonic timers for Lua
Index: pkgsrc/time/lua-chronos/Makefile
diff -u /dev/null pkgsrc/time/lua-chronos/Makefile:1.1
--- /dev/null   Sun Mar  6 08:58:21 2022
+++ pkgsrc/time/lua-chronos/Makefile    Sun Mar  6 08:58:21 2022
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1 2022/03/06 08:58:21 nia Exp $
+
+DISTNAME=      chronos-0.2.4
+PKGNAME=       ${LUA_PKGPREFIX}-${DISTNAME}
+CATEGORIES=    time lua
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=ldrumm/}
+GITHUB_PROJECT=        chronos
+GITHUB_TAG=    v0.2-4
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/ldrumm/chronos
+COMMENT=       High resolution monotonic timers for Lua
+LICENSE=       mit
+
+INSTALLATION_DIRS+=    ${LUA_CDIR}
+
+BUILD_DIRS+=           src
+
+pre-build:
+       ${CP} -f ${FILESDIR}/Makefile ${WRKSRC}/src/Makefile
+
+do-install:
+       ${INSTALL_LIB} ${WRKSRC}/src/chronos.so \
+               ${DESTDIR}${PREFIX}/${LUA_CDIR}/chronos.so
+
+do-test:
+       LUA_CPATH=${WRKSRC}/src/?.so \
+           ${LUA_INTERPRETER} ${FILESDIR}/test.lua
+
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/time/lua-chronos/PLIST
diff -u /dev/null pkgsrc/time/lua-chronos/PLIST:1.1
--- /dev/null   Sun Mar  6 08:58:21 2022
+++ pkgsrc/time/lua-chronos/PLIST       Sun Mar  6 08:58:21 2022
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2022/03/06 08:58:21 nia Exp $
+${LUA_CDIR}/chronos.so
Index: pkgsrc/time/lua-chronos/distinfo
diff -u /dev/null pkgsrc/time/lua-chronos/distinfo:1.1
--- /dev/null   Sun Mar  6 08:58:21 2022
+++ pkgsrc/time/lua-chronos/distinfo    Sun Mar  6 08:58:21 2022
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2022/03/06 08:58:21 nia Exp $
+
+BLAKE2s (chronos-0.2.4.tar.gz) = 3e1bf2b49d1ceb18a47a0f665ac7914b5e5c634263f743a64d31aeb3e0a7a12d
+SHA512 (chronos-0.2.4.tar.gz) = b7d88351ce3bac20ef4b5cbaffcee281cbfc8cdb2210c7e9076fc36bfa69a5d81d68da89704c6103bc94e90e591d36b6a1f4fba199da69f03fc26cb5a3f49c6f
+Size (chronos-0.2.4.tar.gz) = 4807 bytes

Index: pkgsrc/time/lua-chronos/files/Makefile
diff -u /dev/null pkgsrc/time/lua-chronos/files/Makefile:1.1
--- /dev/null   Sun Mar  6 08:58:21 2022
+++ pkgsrc/time/lua-chronos/files/Makefile      Sun Mar  6 08:58:21 2022
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2022/03/06 08:58:21 nia Exp $
+
+all: chronos.so
+
+.c.o:
+       $(CC) $(CFLAGS) -fPIC -c $<
+
+chronos.so: chronos.o
+       $(CC) $(LDFLAGS) -shared -o $@ chronos.o
Index: pkgsrc/time/lua-chronos/files/test.lua
diff -u /dev/null pkgsrc/time/lua-chronos/files/test.lua:1.1
--- /dev/null   Sun Mar  6 08:58:21 2022
+++ pkgsrc/time/lua-chronos/files/test.lua      Sun Mar  6 08:58:21 2022
@@ -0,0 +1,8 @@
+local chronos = require("chronos")
+
+
+local start = chronos.nanotime()
+os.execute("sleep 1")
+local stop = chronos.nanotime()
+
+print(("sleep took %s seconds"):format(stop - start))



Home | Main Index | Thread Index | Old Index