diff --git a/common/shlibs b/common/shlibs index 33b0c543d26417..94e6d0b64c3126 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4225,7 +4225,7 @@ libsword-1.9.0.so libsword-1.9.0_1 libgivaro.so.9 givaro-4.1.1_1 liblinbox.so.0 linbox-1.6.3_1 libpari-gmp-tls.so.9 pari-2.17.0_1 -libtree-sitter.so.0.25 tree-sitter-0.25.2_1 +libtree-sitter.so.0.26 tree-sitter-0.26.3_1 libplanarity.so.2 planarity-4.0.0.0_1 libgap.so.11 gap-4.16.0_1 libgtkdatabox.so.1 gtkdatabox3-1.0.0_1 diff --git a/srcpkgs/emacs/patches/tree-sitter-0.26.patch b/srcpkgs/emacs/patches/tree-sitter-0.26.patch new file mode 100644 index 00000000000000..a81ec4ff24bffb --- /dev/null +++ b/srcpkgs/emacs/patches/tree-sitter-0.26.patch @@ -0,0 +1,100 @@ +Based on the following patch: + From d587ce8c65a0e22ab0a63ef2873a3dfcfbeba166 Mon Sep 17 00:00:00 2001 + From: Eli Zaretskii + Date: Fri, 17 Oct 2025 14:15:41 +0300 + Subject: [PATCH] Support Tree-sitter version 0.26 and later + +diff --git a/src/treesit.c b/src/treesit.c +index bf982de580bd..69751b5ea106 100644 +--- a/emacs-30.2/src/treesit.c ++++ b/emacs-30.2/src/treesit.c +@@ -34,7 +34,11 @@ along with GNU Emacs. If not, see = 15 ++#undef ts_language_abi_version ++#else + #undef ts_language_version ++#endif + #undef ts_node_child + #undef ts_node_child_by_field_name + #undef ts_node_child_count +@@ -89,7 +93,11 @@ along with GNU Emacs. If not, see = 15 ++DEF_DLL_FN (uint32_t, ts_language_abi_version, (const TSLanguage *)); ++#else + DEF_DLL_FN (uint32_t, ts_language_version, (const TSLanguage *)); ++#endif + DEF_DLL_FN (TSNode, ts_node_child, (TSNode, uint32_t)); + DEF_DLL_FN (TSNode, ts_node_child_by_field_name, + (TSNode, const char *, uint32_t)); +@@ -166,7 +174,11 @@ init_treesit_functions (void) + if (!library) + return false; + ++#if TREE_SITTER_LANGUAGE_VERSION >= 15 ++ LOAD_DLL_FN (library, ts_language_abi_version); ++#else + LOAD_DLL_FN (library, ts_language_version); ++#endif + LOAD_DLL_FN (library, ts_node_child); + LOAD_DLL_FN (library, ts_node_child_by_field_name); + LOAD_DLL_FN (library, ts_node_child_count); +@@ -224,7 +236,11 @@ init_treesit_functions (void) + return true; + } + ++#if TREE_SITTER_LANGUAGE_VERSION >= 15 ++#define ts_language_abi_version fn_ts_language_abi_version ++#else + #define ts_language_version fn_ts_language_version ++#endif + #define ts_node_child fn_ts_node_child + #define ts_node_child_by_field_name fn_ts_node_child_by_field_name + #define ts_node_child_count fn_ts_node_child_count +@@ -632,6 +648,22 @@ treesit_load_language_push_for_each_suff + } + } + ++/* This function is a compatibility shim. Tree-sitter 0.25 introduced ++ ts_language_abi_version as a replacement for ts_language_version, and ++ tree-sitter 0.26 removed ts_language_version. Here we use the fact ++ that 0.25 bumped TREE_SITTER_LANGUAGE_VERSION to 15, to use the new ++ function instead of the old one, when Emacs is compiled against ++ tree-sitter version 0.25 or newer. */ ++static uint32_t ++treesit_language_abi_version (const TSLanguage *ts_lang) ++{ ++#if TREE_SITTER_LANGUAGE_VERSION >= 15 ++ return ts_language_abi_version (ts_lang); ++#else ++ return ts_language_version (ts_lang); ++#endif ++} ++ + /* Load the dynamic library of LANGUAGE_SYMBOL and return the pointer + to the language definition. + +@@ -746,7 +778,7 @@ treesit_load_language (Lisp_Object langu + { + *signal_symbol = Qtreesit_load_language_error; + *signal_data = list2 (Qversion_mismatch, +- make_fixnum (ts_language_version (lang))); ++ make_fixnum (treesit_language_abi_version (lang))); + return NULL; + } + return lang; +@@ -817,7 +849,7 @@ Return nil if a grammar library for LANG + &signal_data); + if (ts_language == NULL) + return Qnil; +- uint32_t version = ts_language_version (ts_language); ++ uint32_t version = treesit_language_abi_version (ts_language); + return make_fixnum((ptrdiff_t) version); + } + } + diff --git a/srcpkgs/emacs/template b/srcpkgs/emacs/template index 8c45a94403c231..547aff04334e9f 100644 --- a/srcpkgs/emacs/template +++ b/srcpkgs/emacs/template @@ -50,7 +50,7 @@ desc_option_xpm="Enable support for XPM images" build_options_default="cairo gif gmp gnutls harfbuzz jpeg m17n nativecomp png sound sqlite svg tiff treesitter webp xml xpm" -post_extract() { +post_patch() { # Just configuring in different directories results in # spurious emacs rebuilds with incompatible build numbers. cp -a emacs-* nox diff --git a/srcpkgs/neovim/template b/srcpkgs/neovim/template index e641bf1b0f3b0c..19b7826fe7b3e9 100644 --- a/srcpkgs/neovim/template +++ b/srcpkgs/neovim/template @@ -1,7 +1,7 @@ # Template file for 'neovim' pkgname=neovim version=0.12.5 -revision=1 +revision=2 build_style=cmake build_helper="qemu" configure_args="-DCOMPILE_LUA=OFF -DENABLE_TRANSLATIONS=ON -DPREFER_LUA=$(vopt_if luajit OFF ON)" diff --git a/srcpkgs/rizin/template b/srcpkgs/rizin/template index 9a09e601cee0a1..0c771217fdfd84 100644 --- a/srcpkgs/rizin/template +++ b/srcpkgs/rizin/template @@ -3,7 +3,7 @@ # Rebuild cutter on update pkgname=rizin version=0.7.3 -revision=5 +revision=6 build_style=meson configure_args="-D use_sys_capstone=enabled -D use_capstone_version=v5 -D use_sys_magic=enabled -D use_sys_libzip=enabled -D use_sys_zlib=enabled diff --git a/srcpkgs/tree-sitter/template b/srcpkgs/tree-sitter/template index 249667350ac912..863487d8966747 100644 --- a/srcpkgs/tree-sitter/template +++ b/srcpkgs/tree-sitter/template @@ -1,16 +1,17 @@ # Template file for 'tree-sitter' pkgname=tree-sitter -version=0.25.10 +version=0.26.8 revision=2 build_style=cargo -make_install_args="--path=cli" +make_install_args="--path=crates/cli" +hostmakedepends="clang19-devel" short_desc="Parser generator tool and incremental parsing library" maintainer="Érico Nogueira " license="MIT" homepage="https://tree-sitter.github.io" changelog="https://github.com/tree-sitter/tree-sitter/releases" distfiles="https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v${version}.tar.gz" -checksum=ad5040537537012b16ef6e1210a572b927c7cdc2b99d1ee88d44a7dcdc3ff44c +checksum=e6826b7533ec3a885aba598377a6d20b5a6321ff3db76968e960c2352d3a5077 make_check=no # tests require generating fixtures from remote repositories post_build() {