You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
dfe7cf60e8
However, the lua-language-server project uses a specific, unversioned development snapshot of luamake bundled in its 3rd/ directory. The system-installed luamake package (which is versioned) is incompatible with the build system expectations.
81 lines
2.5 KiB
Tcl
81 lines
2.5 KiB
Tcl
# -*- 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.16.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 51409f6fba5be72be792a3e9ac4c091579c0bf45 \
|
|
sha256 de8d82d3e368a064190b6c335e77c28bc50446f50cd0c421be4a823d77d0b019 \
|
|
size 32006835
|
|
|
|
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
|
|
}
|
|
|
|
# FIXME: Using luamake from source tree instead of system package
|
|
#
|
|
# Normally, we would declare luamake as a build dependency:
|
|
# depends_build port:luamake
|
|
# build.cmd ${prefix}/bin/luamake rebuild
|
|
#
|
|
# However, the lua-language-server project uses a specific, unversioned
|
|
# development snapshot of luamake bundled in its 3rd/ directory.
|
|
# The system-installed luamake package (which is versioned) is incompatible
|
|
# with the build system expectations.
|
|
build {
|
|
system -W ${worksrcpath}/3rd/luamake "./compile/build.sh"
|
|
system -W ${worksrcpath} "3rd/luamake/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
|
|
"
|