blob: d473789fedcc546b13520b5878831342794f67e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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>
|