diff options
-rw-r--r-- | devel/LuaLS/Makefile | 53 | ||||
-rw-r--r-- | devel/LuaLS/distinfo | 0 | ||||
-rw-r--r-- | devel/LuaLS/pkg-descr | 1 |
3 files changed, 54 insertions, 0 deletions
diff --git a/devel/LuaLS/Makefile b/devel/LuaLS/Makefile new file mode 100644 index 000000000000..d473789fedcc --- /dev/null +++ b/devel/LuaLS/Makefile @@ -0,0 +1,53 @@ +PORTNAME= LuaLS +DISTVERSION= 3.9.3cos0 +CATEGORIES= devel + +# Unfortunately upstream has a crippling bug making it completely useless +# unpatched. So is a bit pointless to set something like MASTER_SITES or +# GH_PROJECT. Luckily the bug is trivial to solve, for details please see: +# https://github.com/LuaLS/lua-language-server/issues/2318 +# +# Set custom GIT_ variables to retrieve a patched working LuaLS version. +GIT_REPO= ssh://anonymous@git.netizen.se/lua-language-server/ +GIT_BRANCH= fix/honour_configuration_capability-3.9.3 + +BUILD_DEPENDS= ninja:devel/ninja +PLIST_FILES= ${PREFIX}/bin/lua-language-server + +MAINTAINER= cos +COMMENT= A language server that offers Lua language support +WWW= https://github.com/LuaLS/lua-language-server/ + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +# "NO_CHECKSUM is a user variable and is not to be set in a port's Makefile." +# Lets do it anyways! +NO_CHECKSUM= yes +BROKEN= Experimental packaging of upstream-buggy software + +# "NEVER override the "regular" targets unless you want to open a major can of +# worms." +do-fetch: + git clone "${GIT_REPO}" "${DISTDIR}/${PORTNAME}.git" + +do-extract: + # LuaLS lacks a proper release process. Due to these submodules, it can only be built from git. + mv "${DISTDIR}/${PORTNAME}.git" "${BUILD_WRKSRC}" + @(cd "${BUILD_WRKSRC}"; git checkout "${GIT_BRANCH}"; git submodule init; git submodule update) + +do-patch: + # https://github.com/LuaLS/lua-language-server/issues/2361 + :> "${BUILD_WRKSRC}/3rd/bee.lua/test/test.lua" + :> "${BUILD_WRKSRC}/test.lua" + +do-build: + @(cd ${BUILD_WRKSRC}; ./make.sh) + +do-install: + # The installed bin will fail to launch, due to not finding `bootstrap.lua`. + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/bin/lua-language-server ${STAGEDIR}/${PREFIX}/bin/ + # ...and it also seems LuaLS expects the user to have write permissions where the langserv lives. +# Can opened, worms everywhere! + +.include <bsd.port.mk> diff --git a/devel/LuaLS/distinfo b/devel/LuaLS/distinfo new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/devel/LuaLS/distinfo diff --git a/devel/LuaLS/pkg-descr b/devel/LuaLS/pkg-descr new file mode 100644 index 000000000000..b79fed60af8e --- /dev/null +++ b/devel/LuaLS/pkg-descr @@ -0,0 +1 @@ +The Lua Language Server uses the Language Server Protocol to provide various features for Lua in your favourite code editors , making development easier, safer, and faster! |