Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc textproc: Add lua-etlua



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0371c4e47987
branches:  trunk
changeset: 435237:0371c4e47987
user:      nia <nia%pkgsrc.org@localhost>
date:      Thu Jul 02 17:30:22 2020 +0000

description:
textproc: Add lua-etlua

Allows you to render ERB style templates but with Lua. Supports <%
%>, <%= %> and <%- %> tags (with optional newline slurping) for
embedding code.

How it works:

- Templates are transparently translated into Lua code and then
  loaded as a function. Rendering a compiled template is very fast.

- Any compile time errors are rewritten to show the original source
  position in the template.

- The parser is aware of strings so you can put closing tags inside
  of a string literal without any problems.

diffstat:

 textproc/Makefile           |   3 ++-
 textproc/lua-etlua/DESCR    |  14 ++++++++++++++
 textproc/lua-etlua/Makefile |  26 ++++++++++++++++++++++++++
 textproc/lua-etlua/PLIST    |   2 ++
 textproc/lua-etlua/distinfo |   6 ++++++
 5 files changed, 50 insertions(+), 1 deletions(-)

diffs (81 lines):

diff -r b94955d571ad -r 0371c4e47987 textproc/Makefile
--- a/textproc/Makefile Thu Jul 02 17:24:56 2020 +0000
+++ b/textproc/Makefile Thu Jul 02 17:30:22 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1153 2020/07/02 17:13:37 nia Exp $
+# $NetBSD: Makefile,v 1.1154 2020/07/02 17:30:22 nia Exp $
 #
 
 COMMENT=       Text processing utilities (does not include desktop publishing)
@@ -460,6 +460,7 @@
 SUBDIR+=       lq-sp
 SUBDIR+=       lua-cjson
 SUBDIR+=       lua-cmark
+SUBDIR+=       lua-etlua
 SUBDIR+=       lua-expat
 SUBDIR+=       lua-lustache
 SUBDIR+=       lua-markdown
diff -r b94955d571ad -r 0371c4e47987 textproc/lua-etlua/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/lua-etlua/DESCR  Thu Jul 02 17:30:22 2020 +0000
@@ -0,0 +1,14 @@
+Allows you to render ERB style templates but with Lua. Supports <%
+%>, <%= %> and <%- %> tags (with optional newline slurping) for
+embedding code.
+
+How it works:
+
+- Templates are transparently translated into Lua code and then
+  loaded as a function. Rendering a compiled template is very fast.
+
+- Any compile time errors are rewritten to show the original source
+  position in the template.
+
+- The parser is aware of strings so you can put closing tags inside
+  of a string literal without any problems.
diff -r b94955d571ad -r 0371c4e47987 textproc/lua-etlua/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/lua-etlua/Makefile       Thu Jul 02 17:30:22 2020 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2020/07/02 17:30:23 nia Exp $
+
+DISTNAME=      lua-etlua-1.3.0
+PKGNAME=       ${DISTNAME:S/lua-/${LUA_PKGPREFIX}-/1}
+CATEGORIES=    textproc lua
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=leafo/}
+GITHUB_PROJECT=        etlua
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    nia%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/leafo/etlua
+COMMENT=       Embedded templates for Lua
+LICENSE=       mit
+
+WRKSRC=                ${WRKDIR}/${GITHUB_PROJECT}-${PKGVERSION_NOREV}
+USE_LANGUAGES= # none
+NO_BUILD=      yes
+
+INSTALLATION_DIRS+=    ${LUA_LDIR}
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/etlua.lua \
+               ${DESTDIR}${PREFIX}/${LUA_LDIR}/etlua.lua
+
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r b94955d571ad -r 0371c4e47987 textproc/lua-etlua/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/lua-etlua/PLIST  Thu Jul 02 17:30:22 2020 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2020/07/02 17:30:23 nia Exp $
+${LUA_LDIR}/etlua.lua
diff -r b94955d571ad -r 0371c4e47987 textproc/lua-etlua/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/lua-etlua/distinfo       Thu Jul 02 17:30:22 2020 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/07/02 17:30:23 nia Exp $
+
+SHA1 (lua-etlua-1.3.0.tar.gz) = dbf14b221fcd839bded972d954b53b2e3a71ab90
+RMD160 (lua-etlua-1.3.0.tar.gz) = 47515e9fd61115026e3d081798b1dcabf1fcbf9e
+SHA512 (lua-etlua-1.3.0.tar.gz) = 132a5d7d898b791242abc3b95f47f534d0b0e2a3f9848efb95be04f92049b18c919af8c2ac162e11f78b502d346e78a73935c1ad720f5ffbb1efe90355b39a9a
+Size (lua-etlua-1.3.0.tar.gz) = 7673 bytes



Home | Main Index | Thread Index | Old Index