/
Portfile
68 lines (52 loc) · 1.99 KB
/
Portfile
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
PortGroup legacysupport 1.1
github.setup LuaLS lua-language-server 3.7.4
github.tarball_from releases
revision 0
categories lua devel
license MIT
maintainers {judaew @judaew} openmaintainer
description A language server that offers Lua language support
long_description {*}${description}
use_zip yes
extract.mkdir yes
distname ${name}-${version}-submodules
checksums rmd160 dd1b98bdcf9a76e5850d98485065466b27109666 \
sha256 4993365d2fd34ea460d5614927c752f27294181a6304901c3198a9defced673b \
size 31527026
depends_build port:luamake
compiler.c_standard 2011
compiler.cxx_standard 2017
configure {
# see https://trac.macports.org/wiki/UsingTheRightCompiler
set makefile [open "${worksrcpath}/make.lua" "a"]
puts $makefile ""
puts $makefile "lm.cc = '${configure.cc}'"
close $makefile
}
pre-build {
copy ${filespath}/wrapper ${worksrcpath}
reinplace "s,@@PREFIX@@,${prefix},g" ${worksrcpath}/wrapper
}
build.cmd ${prefix}/bin/luamake rebuild
destroot {
xinstall -m 0755 ${worksrcpath}/wrapper ${destroot}${prefix}/bin/${name}
xinstall -d ${destroot}${prefix}/lib/${name}
move ${worksrcpath}/bin ${destroot}${prefix}/lib/${name}
move \
${worksrcpath}/debugger.lua \
${worksrcpath}/main.lua \
${worksrcpath}/locale \
${worksrcpath}/meta \
${worksrcpath}/script \
${destroot}${prefix}/lib/${name}
}
notes "
To use in Neovim, it is sufficient to specify cmd in lspconfig:
require'lspconfig'.lua_ls.setup \{
cmd = \{\"${prefix}/bin/${name}\"\};
\}
See more https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sumneko_lua
"