Install this version:
emerge -a =dev-libs/tree-sitter-swift-0.7.3
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-libs/tree-sitter-swift-0.7.3
Or alternatively:
emerge --autounmask-write -a =dev-libs/tree-sitter-swift-0.7.3
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 0.7.3 | 8 | ~amd64 | 0 |
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
TS_BINDINGS=( python )
# Upstream tags plain releases without pre-generated parser.c; only the
# "-with-generated-files" tag variant ships src/parser.c, which the ebuild
# needs (we don't run tree-sitter generate at build time).
TS_PV="${PV}-with-generated-files"
inherit tree-sitter-grammar
DESCRIPTION="Swift grammar for Tree-sitter"
HOMEPAGE="https://github.com/alex-pinkus/tree-sitter-swift"
# Not under the tree-sitter org, unlike most grammars the eclass defaults
# to; also no "v" tag prefix (see TS_PV above).
SRC_URI="https://github.com/alex-pinkus/${PN}/archive/${TS_PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
src_prepare() {
tree-sitter-grammar_src_prepare
# The top-level Makefile's `SRC := $(wildcard src/*.c)` blindly grabs
# every .c file, including these two alternate-ABI parser variants
# (each defining its own tree_sitter_swift() symbol), so linking the
# shared lib fails with "duplicate symbol: tree_sitter_swift". They're
# for other consumers targeting older/newer ABIs specifically; our own
# ABI comes from plain src/parser.c, which upstream's own setup.py also
# builds against exclusively.
rm src/parser_abi13.c src/parser_abi14.c || die
}
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | tree-sitter-swift-0.7.3.tar.gz | 3544212 bytes | https://github.com/alex-pinkus/tree-sitter-swift/archive/0.7.3-with-generated-files.tar.gz |