diff options
author | Vadim Misbakh-Soloviov <mva@gentoo.org> | 2024-02-22 00:59:50 +0700 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-07-05 13:55:37 +0300 |
commit | fbe4bc7b9dc970271127a5f167c95da78e32e282 (patch) | |
tree | 25c292bc2e10ff38d678c509b9fdd31fb555ea1a /eclass | |
parent | sys-apps/kcheck: remvoe stale live ebuild (diff) | |
download | gentoo-fbe4bc7b9dc970271127a5f167c95da78e32e282.tar.gz gentoo-fbe4bc7b9dc970271127a5f167c95da78e32e282.tar.bz2 gentoo-fbe4bc7b9dc970271127a5f167c95da78e32e282.zip |
tree-sitter-grammar.eclass: extended packaging
1) put grammar library to additional well-known path
2) also put queries
See-Also: https://pkgs.alpinelinux.org/contents?branch=edge&name=tree%2dsitter%2dlua&arch=x86_64&repo=community
See-Also: https://pkgs.alpinelinux.org/contents?branch=edge&name=tree%2dsitter%2dcss&arch=x86_64&repo=community
Refer: https://github.com/gentoo/gentoo/pull/35475
Closes: https://bugs.gentoo.org/933833
Closes: https://bugs.gentoo.org/922146
Signed-off-by: Vadim Misbakh-Soloviov <mva@gentoo.org>
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37122
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/tree-sitter-grammar.eclass | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/eclass/tree-sitter-grammar.eclass b/eclass/tree-sitter-grammar.eclass index 24473fb98b1f..ff0c4cb979e6 100644 --- a/eclass/tree-sitter-grammar.eclass +++ b/eclass/tree-sitter-grammar.eclass @@ -205,6 +205,19 @@ 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 |