aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2025-07-18 01:11:54 +0000
committerKyle Evans <kevans@FreeBSD.org>2025-07-26 18:50:53 +0000
commitc648a3cebd96f286cc307cb2ee0aae653c4fad1e (patch)
tree2994089e329ed5da081ecc80c5356d11911a0298
parent40e03c5f8770e92755d0b3b7cbaa9487adb6248b (diff)
devel/lua-luastatic: add new port
luastatic builds a standalone executable from a lua script, obviating the need for lua proper rto be installed on the target system. This is used by newer versions of luacheck, which we use for sanity checking lua scripts in the base system.
-rw-r--r--devel/Makefile1
-rw-r--r--devel/lua-luastatic/Makefile30
-rw-r--r--devel/lua-luastatic/distinfo3
-rw-r--r--devel/lua-luastatic/pkg-descr3
4 files changed, 37 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index b979cdbd9757..5004714c4cc7 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1619,6 +1619,7 @@
SUBDIR += lua-lpeg
SUBDIR += lua-luacheck
SUBDIR += lua-luarocks
+ SUBDIR += lua-luastatic
SUBDIR += lua-lunit
SUBDIR += lua-lunitx
SUBDIR += lua-mode
diff --git a/devel/lua-luastatic/Makefile b/devel/lua-luastatic/Makefile
new file mode 100644
index 000000000000..6d47eb734934
--- /dev/null
+++ b/devel/lua-luastatic/Makefile
@@ -0,0 +1,30 @@
+PORTNAME= luastatic
+PORTVERSION= 0.0.12
+CATEGORIES= devel
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
+
+MAINTAINER= kevans@FreeBSD.org
+COMMENT= Build a standalone executable from a Lua program
+WWW= https://github.com/ers35/luastatic
+
+LICENSE= CC0-1.0
+LICENSE_FILE= ${WRKSRC}/license.txt
+
+USES= gmake lua
+
+USE_GITHUB= yes
+GH_ACCOUNT= ers35
+
+MAKE_ENV+= LUA=${LUA_CMD}
+MAKE_ENV+= LIBLUA_A=${LOCALBASE}/lib/liblua-${LUA_VER}.a
+MAKE_ENV+= LUA_INCLUDE=${LUA_INCDIR}
+
+PLIST_FILES= bin/luastatic
+ALL_TARGET= luastatic
+TEST_TARGET= run_test
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/luastatic ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/devel/lua-luastatic/distinfo b/devel/lua-luastatic/distinfo
new file mode 100644
index 000000000000..c6fd7b33891f
--- /dev/null
+++ b/devel/lua-luastatic/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1752800790
+SHA256 (ers35-luastatic-0.0.12_GH0.tar.gz) = 9cf817f9bb95d7d3b62a0ccffc14124ac5f8e0df1e1c482b9bf49e0473e02797
+SIZE (ers35-luastatic-0.0.12_GH0.tar.gz) = 11689
diff --git a/devel/lua-luastatic/pkg-descr b/devel/lua-luastatic/pkg-descr
new file mode 100644
index 000000000000..7d8359b3a656
--- /dev/null
+++ b/devel/lua-luastatic/pkg-descr
@@ -0,0 +1,3 @@
+luastatic is a command line tool that builds a standalone executable from a Lua
+program. The resulting executable is intended to run on systems that do not
+otherwise have Lua installed.