summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-06 08:06:16 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-06 08:06:16 +0100
commit4187bba080530c5ca1c7dae9c233e88f3fc8f535 (patch)
treeb6f535e053876097ced1b6bda14a4da890c730d4 /eclass
parent2a8d2f71d1d9963368e0ef3d641d75979a689d12 (diff)
gentoo auto-resync : 06:07:2024 - 08:06:15
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39215 -> 39217 bytes
-rw-r--r--eclass/flag-o-matic.eclass4
-rw-r--r--eclass/tree-sitter-grammar.eclass17
3 files changed, 20 insertions, 1 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 641abbe27db0..84f8c239877d 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files 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