Revert "tree-sitter-grammar.eclass: extended packaging"

This reverts commit fbe4bc7b9d.

The previous change does not install the NeoVim symlinks correctly as they
point to /usr/lib/tree-sitter/liblang.so instead of /usr/lib/liblang.so.

Also the query files are not installed in per-package directories and have
common names (e.g. highlight.scm) which is causing file collisions.

To be fixed in a follow up commit which will introduce
tree-sitter-grammar-r1.eclass, so that ebuilds can be rev-bumped so that
users can rebuild and get the changes.

Bug: https://bugs.gentoo.org/935631
Bug: https://bugs.gentoo.org/935641
Signed-off-by: Matthew Smith <matthew@gentoo.org>
This commit is contained in:
Matthew Smith
2024-07-07 06:42:17 +00:00
parent b39058e5d4
commit cd426afc7f

View File

@@ -207,19 +207,6 @@ tree-sitter-grammar_src_install() {
dolib.so "${WORKDIR}/${soname}"
dosym "${soname}" /usr/$(get_libdir)/lib${PN}$(get_libname)
# Install symlinks to grammars so that they can be found by NeoVim.
# /usr/$(get_libdir)/tree-sitter gets added to the NeoVim runtimepath.
# See neovim/runtime/doc/treesitter.txt for info.
keepdir /usr/$(get_libdir)/tree-sitter
dosym ../"${soname}" \
/usr/$(get_libdir)/tree-sitter/parser/${PN##tree-sitter-}$(get_libname)
# Install queries (e.g. highlight.scm) so that they can be found by NeoVim.
if [[ -d "${S}/../queries" ]]; then
keepdir /usr/share/tree-sitter
insinto /usr/share/tree-sitter
doins -r "${S}/../queries"
fi
fi
local binding