aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2024-06-23 18:58:41 +0530
committerBrahmajit Das <brahmajit.xyz@gmail.com>2024-06-23 18:58:41 +0530
commita04a904c6357ad6fc92b9edf819f6727a62fbd13 (patch)
tree7849cb04bfe7e4d0dae76d23f0f37b0f5607e00a /dev-util
parentgames-util/legendary: disable py3.12 (diff)
downloadguru-a04a904c6357ad6fc92b9edf819f6727a62fbd13.tar.gz
guru-a04a904c6357ad6fc92b9edf819f6727a62fbd13.tar.bz2
guru-a04a904c6357ad6fc92b9edf819f6727a62fbd13.zip
dev-util/lua-language-server: add 3.9.3
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/lua-language-server/Manifest1
-rw-r--r--dev-util/lua-language-server/lua-language-server-3.9.3.ebuild88
2 files changed, 89 insertions, 0 deletions
diff --git a/dev-util/lua-language-server/Manifest b/dev-util/lua-language-server/Manifest
index 0deeaf219..d84f03379 100644
--- a/dev-util/lua-language-server/Manifest
+++ b/dev-util/lua-language-server/Manifest
@@ -1 +1,2 @@
DIST lua-language-server-3.9.1.zip 32595453 BLAKE2B 53e13639a6b60805c074b617c53503360388da3c6ee1c887845bff472dfea7048b5b8793968df068c747c925648feb3f851a2eca42c6a21e33b0f6242b1b80e7 SHA512 305b036d804d3864a0baecabf4cc9bf46f0bd9ffcf3cb5ced9f57b0b29b8d9231b7283970ef38bd1669be05da795f08627a56a5eb83a70d71e2768254cf497bc
+DIST lua-language-server-3.9.3.zip 32597071 BLAKE2B aa7bf85304e0dafda3b573f8569961e05b99849a513799d4f295346d4dd6d27e9ddd53dccf30facf71549199fd46b989a402768e35f1381ab382a3c2c1a607f6 SHA512 40c5dbdfc05c7ab65524f3dd8f238a77c1be2a9631877a8a83a137b3005d91e266e42526a59856d0c8b40d69b7345e6780c368e10e0d54252b01f5889b334a8c
diff --git a/dev-util/lua-language-server/lua-language-server-3.9.3.ebuild b/dev-util/lua-language-server/lua-language-server-3.9.3.ebuild
new file mode 100644
index 000000000..5e90591cb
--- /dev/null
+++ b/dev-util/lua-language-server/lua-language-server-3.9.3.ebuild
@@ -0,0 +1,88 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua{5-{1,3,4},jit} )
+
+inherit ninja-utils toolchain-funcs lua-single prefix
+
+DESCRIPTION="Lua language server"
+HOMEPAGE="https://github.com/LuaLS/lua-language-server"
+SRC_URI="https://github.com/LuaLS/lua-language-server/releases/download/${PV}/${P}-submodules.zip -> ${P}.zip"
+S="${WORKDIR}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+REQUIRE_USE="${LUA_REQUIRED_USE}"
+
+DEPEND="${LUA_DEPS}"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ app-alternatives/ninja
+ app-arch/unzip
+"
+RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}/linux.ninja.patch"
+ "${FILESDIR}/build.ninja.patch"
+)
+
+src_prepare() {
+ # Remove hardcoded gcc references
+ sed -i "/lm.cxx/a lm.cc = '$(tc-getCC)'" \
+ make.lua || die
+ sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
+ 3rd/lpeglabel/makefile || die
+ # Shipped file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
+ eapply "${FILESDIR}/linux.ninja.patch"
+ eapply_user
+ sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
+ -e "s/^ar = REPLACE_AR/ar = $(tc-getAR)/" \
+ -e "s/CFLAGS/${CFLAGS}/" \
+ -e "s/CXXFLAGS/${CXXFLAGS}/" \
+ -e "s/LDFLAGS/${LDFLAGS}/" \
+ 3rd/luamake/compile/ninja/linux.ninja || die
+
+ prefixify_ro "${FILESDIR}/wrapper.sh"
+}
+
+src_compile() {
+ eninja -C 3rd/luamake -f compile/ninja/linux.ninja "$(usex test "test" "luamake")"
+ use test && eninja -C 3rd/luamake -f compile/ninja/linux.ninja luamake
+ ./3rd/luamake/luamake init || die
+
+ # Generated file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
+ sed -i -e "s/^cc =.*./cc = REPLACE_ME/" \
+ -e "s/^ar =.*./ar = REPLACE_AR/" \
+ build/build.ninja || die
+
+ eapply "${FILESDIR}/build.ninja.patch"
+ sed -i -e "s/REPLACE_ME/$(tc-getCC)/" \
+ -e "s/REPLACE_AR/$(tc-getAR)/" \
+ -e "s|LUAMAKE_PATH|${S}/3rd/luamake/luamake|" \
+ -e "s/CFLAGS/${CFLAGS}/" \
+ -e "s/CXXFLAGS/${CXXFLAGS}/" \
+ -e "s/LDFLAGS/${LDFLAGS}/" \
+ build/build.ninja || die
+
+ use test && eninja -f build/build.ninja || eninja -f build/build.ninja all
+ rm -rf meta/198256b1
+}
+
+src_install() {
+ newbin "${T}/wrapper.sh" ${PN}
+
+ into /opt/${PN}
+ dobin bin/${PN}
+
+ insinto /opt/${PN}/bin
+ doins bin/main.lua
+
+ insinto /opt/${PN}
+ doins -r debugger.lua main.lua locale meta script
+
+ einstalldocs
+}