summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>