summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/Makefile3
-rw-r--r--lang/lua-moonscript/DESCR15
-rw-r--r--lang/lua-moonscript/Makefile46
-rw-r--r--lang/lua-moonscript/PLIST40
-rw-r--r--lang/lua-moonscript/distinfo6
5 files changed, 109 insertions, 1 deletions
diff --git a/lang/Makefile b/lang/Makefile
index c83e9384797..f9718667b54 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.570 2020/07/07 23:43:58 nia Exp $
+# $NetBSD: Makefile,v 1.571 2020/07/11 11:56:59 nia Exp $
#
COMMENT= Programming languages
@@ -145,6 +145,7 @@ SUBDIR+= libunwind
SUBDIR+= likepython
SUBDIR+= llvm
#SUBDIR+= lua # only contains Makefile fragments
+SUBDIR+= lua-moonscript
SUBDIR+= lua51
SUBDIR+= lua52
SUBDIR+= lua53
diff --git a/lang/lua-moonscript/DESCR b/lang/lua-moonscript/DESCR
new file mode 100644
index 00000000000..b20baf347ec
--- /dev/null
+++ b/lang/lua-moonscript/DESCR
@@ -0,0 +1,15 @@
+MoonScript is a dynamic scripting language that compiles into Lua. It gives
+you the power of one of the fastest scripting languages combined with a rich
+set of features.
+
+MoonScript can either be compiled into Lua and run at a later time, or it
+can be dynamically compiled and run using the moonloader. It's as simple as
+require "moonscript" in order to have Lua understand how to load and run
+any MoonScript file.
+
+Because it compiles right into Lua code, it is completely compatible with
+alternative Lua implementations like LuaJIT, and it is also compatible with
+all existing Lua code and libraries.
+
+The command line tools also let you run MoonScript directly from the command
+line, like any first-class scripting language.
diff --git a/lang/lua-moonscript/Makefile b/lang/lua-moonscript/Makefile
new file mode 100644
index 00000000000..b5696ce80ee
--- /dev/null
+++ b/lang/lua-moonscript/Makefile
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.1 2020/07/11 11:56:59 nia Exp $
+
+DISTNAME= moonscript-0.5.0
+PKGNAME= ${LUA_PKGPREFIX}-${DISTNAME}
+CATEGORIES= lang lua
+MASTER_SITES= ${MASTER_SITE_GITHUB:=leafo/}
+GITHUB_PROJECT= moonscript
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://moonscript.org/
+COMMENT= Dynamic scripting language that compiles into Lua
+LICENSE= mit
+
+DEPENDS+= ${LUA_PKGPREFIX}-alt-getopt>=0.7:../../devel/lua-alt-getopt
+DEPENDS+= ${LUA_PKGPREFIX}-lpeg>=0.12:../../devel/lua-lpeg
+DEPENDS+= ${LUA_PKGPREFIX}-filesystem>=1.5:../../devel/lua-filesystem
+
+NO_BUILD= yes
+USE_LANGUAGES= # none
+
+PLIST_SUBST+= LUADOTVER=${_LUA_DOT_VERSION}
+
+REPLACE_LUA+= bin/moon bin/moonc
+
+INSTALLATION_DIRS+= bin
+INSTALLATION_DIRS+= ${LUA_DOCDIR}
+INSTALLATION_DIRS+= ${LUA_LDIR}/moon
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/moon \
+ ${DESTDIR}${PREFIX}/bin/moon${_LUA_DOT_VERSION}
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/moonc \
+ ${DESTDIR}${PREFIX}/bin/moonc${_LUA_DOT_VERSION}
+ cd ${WRKSRC}/moonscript && ${FIND} * -type d -exec \
+ ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${LUA_LDIR}/moonscript/'{}' ';'
+ cd ${WRKSRC}/moonscript && ${FIND} * -name '*.lua' -exec \
+ ${INSTALL_DATA} '{}' ${DESTDIR}${PREFIX}/${LUA_LDIR}/moonscript/'{}' ';'
+ ${INSTALL_DATA} ${WRKSRC}/moon/*.lua \
+ ${DESTDIR}${PREFIX}/${LUA_LDIR}/moon
+ ${INSTALL_DATA} ${WRKSRC}/docs/*.md \
+ ${DESTDIR}${PREFIX}/${LUA_DOCDIR}
+
+.include "../../lang/lua/application.mk"
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/lua-moonscript/PLIST b/lang/lua-moonscript/PLIST
new file mode 100644
index 00000000000..d6ddd63a5b5
--- /dev/null
+++ b/lang/lua-moonscript/PLIST
@@ -0,0 +1,40 @@
+@comment $NetBSD: PLIST,v 1.1 2020/07/11 11:56:59 nia Exp $
+bin/moon${LUADOTVER}
+bin/moonc${LUADOTVER}
+${LUA_DOCDIR}/api.md
+${LUA_DOCDIR}/command_line.md
+${LUA_DOCDIR}/reference.md
+${LUA_DOCDIR}/standard_lib.md
+${LUA_LDIR}/moon/all.lua
+${LUA_LDIR}/moon/init.lua
+${LUA_LDIR}/moonscript/base.lua
+${LUA_LDIR}/moonscript/cmd/args.lua
+${LUA_LDIR}/moonscript/cmd/coverage.lua
+${LUA_LDIR}/moonscript/cmd/lint.lua
+${LUA_LDIR}/moonscript/cmd/moonc.lua
+${LUA_LDIR}/moonscript/cmd/watchers.lua
+${LUA_LDIR}/moonscript/compile.lua
+${LUA_LDIR}/moonscript/compile/statement.lua
+${LUA_LDIR}/moonscript/compile/value.lua
+${LUA_LDIR}/moonscript/data.lua
+${LUA_LDIR}/moonscript/dump.lua
+${LUA_LDIR}/moonscript/errors.lua
+${LUA_LDIR}/moonscript/init.lua
+${LUA_LDIR}/moonscript/line_tables.lua
+${LUA_LDIR}/moonscript/parse.lua
+${LUA_LDIR}/moonscript/parse/env.lua
+${LUA_LDIR}/moonscript/parse/literals.lua
+${LUA_LDIR}/moonscript/parse/util.lua
+${LUA_LDIR}/moonscript/transform.lua
+${LUA_LDIR}/moonscript/transform/accumulator.lua
+${LUA_LDIR}/moonscript/transform/class.lua
+${LUA_LDIR}/moonscript/transform/comprehension.lua
+${LUA_LDIR}/moonscript/transform/destructure.lua
+${LUA_LDIR}/moonscript/transform/names.lua
+${LUA_LDIR}/moonscript/transform/statement.lua
+${LUA_LDIR}/moonscript/transform/statements.lua
+${LUA_LDIR}/moonscript/transform/transformer.lua
+${LUA_LDIR}/moonscript/transform/value.lua
+${LUA_LDIR}/moonscript/types.lua
+${LUA_LDIR}/moonscript/util.lua
+${LUA_LDIR}/moonscript/version.lua
diff --git a/lang/lua-moonscript/distinfo b/lang/lua-moonscript/distinfo
new file mode 100644
index 00000000000..e44ef2b3e7e
--- /dev/null
+++ b/lang/lua-moonscript/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/07/11 11:56:59 nia Exp $
+
+SHA1 (moonscript-0.5.0.tar.gz) = b46fddd3ff93676d17636b0deaca144c8b177cb6
+RMD160 (moonscript-0.5.0.tar.gz) = ad9cf1f54e660423ad1eb714289afe822102dfe0
+SHA512 (moonscript-0.5.0.tar.gz) = f573f9a96502662987de637f7f62b935fab93aa775122c9ae20d98029394e3136e6b519908ce76e1e77c51fbcee162c3ad0aa58eeb1ee56a2b07951437987941
+Size (moonscript-0.5.0.tar.gz) = 124093 bytes