From 4187bba080530c5ca1c7dae9c233e88f3fc8f535 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 6 Jul 2024 08:06:16 +0100 Subject: gentoo auto-resync : 06:07:2024 - 08:06:15 --- eclass/Manifest.gz | Bin 39215 -> 39217 bytes eclass/flag-o-matic.eclass | 4 ++++ eclass/tree-sitter-grammar.eclass | 17 ++++++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 641abbe27db0..84f8c239877d 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index ecac452aa0ef..c6b1ad80e12e 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -129,6 +129,10 @@ _setup-allowed-flags() { # needed for arm64 (and in particular SCS) -ffixed-x18 + # needed for riscv (to prevent unaligned vector access) + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115789 + -mstrict-align -mvector-strict-align + # gcc 4.5 -mno-fma4 -mno-movbe -mno-xop -mno-lwp # gcc 4.6 diff --git a/eclass/tree-sitter-grammar.eclass b/eclass/tree-sitter-grammar.eclass index 24473fb98b1f..e5797fca8a16 100644 --- a/eclass/tree-sitter-grammar.eclass +++ b/eclass/tree-sitter-grammar.eclass @@ -47,7 +47,7 @@ for _BINDING in "${TS_BINDINGS[@]}"; do DISTUTILS_EXT=1 DISTUTILS_OPTIONAL=1 DISTUTILS_USE_PEP517=setuptools - PYTHON_COMPAT=( python3_{10..12} ) + PYTHON_COMPAT=( python3_{10..13} ) inherit distutils-r1 IUSE+=" python" @@ -162,6 +162,8 @@ tree-sitter-grammar_src_compile() { if [[ -f "${S}/pyproject.toml" ]]; then sed -e "/SONAME_MINOR :=/s/:=.*$/:= $(_get_tsg_abi_ver)/" -i "${S}/Makefile" || die emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ STRIP="" \ PREFIX="${EPREFIX}/usr" \ LIBDIR="${EPREFIX}/usr/$(get_libdir)" @@ -205,6 +207,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 -- cgit v1.2.3