summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* eclass: canonicalize debug-print-function callsDavid Seifert2024-10-081-5/+5
| | | | | Closes: https://github.com/gentoo/gentoo/pull/37652 Signed-off-by: David Seifert <soap@gentoo.org>
* Revert "tree-sitter-grammar.eclass: extended packaging"Matthew Smith2024-07-071-13/+0
| | | | | | | | | | | | | | | | | | This reverts commit fbe4bc7b9dc970271127a5f167c95da78e32e282. 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>
* tree-sitter-grammar.eclass: enable py3.13 bindingsArthur Zamarin2024-07-051-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* tree-sitter-grammar.eclass: respect CC & ARArthur Zamarin2024-07-051-0/+2
| | | | | | | | Closes: https://bugs.gentoo.org/932626 Signed-off-by: Arthur Zamarin <arthurzam@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>
* tree-sitter-grammar.eclass: extended packagingVadim Misbakh-Soloviov2024-07-051-0/+13
| | | | | | | | | | | | | | | | 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>
* tree-sitter-grammar.eclass: drop myself as a maintainerNick Sarnie2024-06-121-1/+0
| | | | Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
* tree-sitter-grammar.eclass: don't pre-strip libraryArthur Zamarin2024-03-231-0/+1
| | | | | | | | | | When STRIP is set to anon empty value, it is called during build of the shared library. By unsetting it, the strip isn't called during compile but by the portage strip phase. Closes: https://bugs.gentoo.org/927571 Closes: https://bugs.gentoo.org/927572 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* tree-sitter-grammar.eclass: support opt in python bindingsArthur Zamarin2024-03-231-1/+85
| | | | | | | | | | | | | | | New tree-sitter cli generated bindings and code around grammars and parsers now support bulding a python wheel which supply much better API and library for consumers in python bindings. Currently I've added only python as a binding languages, even though rust, swift, and go are also available. We should add them when we see a request for them. Python will be needed for pkgcheck. When we opt in into python bindings, we call the matching distutils phase functions when `use python` is true. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* tree-sitter-grammar.eclass: support for new upstream makefileArthur Zamarin2024-03-231-21/+43
| | | | | | | | | | | The build system for tree-sitters now generates a much better Makefile we can use to build the parser and grammar into a good C library. This also matches the build procedure used by upstream, making our reports easier for them to debug (we hit this issue in an old bug report on memory leak with tree-sitter-bash). Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* tree-sitter-grammar.eclass: force use of local parser.hSam James2023-08-271-5/+4
| | | | | | | | | | | | | | | There shouldn't be a system-wide copy of parser.h and upstream plan on dropping this from dev-libs/tree-sitter as it can cause issues if there's a mismatch between the version used for the bundled generated parser vs the header used to build the library. Force use of the correct one in the dist tarball at src/tree_sitter/parser.h instead. Drop the dependency on dev-libs/tree-sitter given we were only depending on it for this header. Bug: https://github.com/tree-sitter/tree-sitter-bash/issues/199 Bug: https://bugs.gentoo.org/912716 Signed-off-by: Sam James <sam@gentoo.org>
* eclass: standardize prologue/epilogueDavid Seifert2023-03-171-10/+9
| | | | | Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
* tree-sitter-grammar.eclass: Add src_test implementationMatoro Mahri2022-12-051-1/+15
| | | | | | | | | | | | These packages have a standard way of implementing a test corpus that can be invoked by "tree-sitter test" from dev-util/tree-sitter-cli. Some have additional platform-specific tests that are invoked in a custom manner, but these are on top of the basic test corpus. See: https://tree-sitter.github.io/tree-sitter/creating-parsers#command-test Bug: https://bugs.gentoo.org/844223 Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com> Signed-off-by: Matthew Smith <matthew@gentoo.org>
* tree-sitter-grammar.eclass: use -Wl,-install_name on DarwinSam James2022-07-281-2/+8
| | | | | | Closes: https://bugs.gentoo.org/860828 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Matthew Smith <matthew@gentoo.org>
* tree-sitter-grammar.eclass: use edo when linkingMatthew Smith2022-04-191-1/+3
| | | | Signed-off-by: Matthew Smith <matthew@gentoo.org>
* *.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLEUlrich Müller2022-03-241-1/+1
| | | | | Bug: https://bugs.gentoo.org/835396 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* tree-sitter-grammar.eclass: Re-assign maintainerMatthew Smith2022-02-121-3/+3
| | | | Signed-off-by: Matthew Smith <matthew@gentoo.org>
* tree-sitter-grammar.eclass: Fix compatibility with lldMatthew Smith2021-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | -soname <soname> is only accepted by GNU ld, but --soname=<soname> is accepted by both GNU ld and LLVM lld. Closes: https://bugs.gentoo.org/829667 Closes: https://bugs.gentoo.org/829668 Closes: https://bugs.gentoo.org/829669 Closes: https://bugs.gentoo.org/829670 Closes: https://bugs.gentoo.org/829671 Closes: https://bugs.gentoo.org/829672 Closes: https://bugs.gentoo.org/829673 Closes: https://bugs.gentoo.org/829674 Closes: https://bugs.gentoo.org/829675 Closes: https://bugs.gentoo.org/829676 Closes: https://bugs.gentoo.org/829677 Signed-off-by: Matthew Smith <matt@offtopica.uk> Closes: https://github.com/gentoo/gentoo/pull/23436 Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
* eclass/tree-sitter-grammar: fix ABI autodetectonVadim Misbakh-Soloviov2021-12-201-10/+10
| | | | | | | | | | | | | | | | | | | Some grammars packages (like, for example, tree-sitter-agda) uses different versioning scheme from vast majority of grammars in tree-sitter github organization. Also, third-party grammars doesn't follow tree-sitter versioning. Also, some grammars (like tree-sitter-haskell, for example) only had old release tagged, but having compatible and useful grammars in current HEAD. Also, some grammars like tree-sitter-verilog, even have only v0.0 tag. So, instead of assuming grammar ABI version based on ${PV} (ver_test) we decided to take ABI version drectly from source code. Signed-off-by: Vadim Misbakh-Soloviov <mva@gentoo.org>
* tree-sitter-grammar.eclass: InitMatt Smith2021-10-211-0/+96
Signed-off-by: Matt Smith <matt@offtopica.uk> Signed-off-by: Nick Sarnie <sarnex@gentoo.org>