dev-python/tree-sitter: fix stable-stable pairing with dev-libs/${PN}

- Stable dev-python/tree-sitter (0.23.1) has a sed that's effective only
   against unstable dev-libs/tree-sitter (>0.25), but which in turn breaks the
   build when still using stable dev-libs/tree-sitter (<0.25). Apply a band-aid
   fix for now. Revbumped to prevent possible runtime issues.

Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
Joonas Niilola
2025-02-19 17:02:24 +02:00
parent ad01820b75
commit fcbb796991

View File

@@ -25,7 +25,7 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
# setuptools is needed for distutils import
DEPEND=">=dev-libs/tree-sitter-0.24.0:="
DEPEND="<dev-libs/tree-sitter-0.25.0:="
RDEPEND="${DEPEND}
$(python_gen_cond_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
@@ -55,8 +55,6 @@ src_unpack() {
src_prepare() {
sed -e 's/ts_node_child_containing_descendant/ts_node_child_with_descendant/' \
-i tree_sitter/binding/node.c || die
sed -e 's/TSInputEncodingUTF16/TSInputEncodingUTF16LE/' \
-i tree_sitter/binding/parser.c || die
distutils-r1_src_prepare
}