Download raw body.
[update] textproc/tree-sitter 0.25.3
Hi ports@
update for textproc/tree-sitter port to the latest version 0.25.3
Changelog: https://github.com/tree-sitter/tree-sitter/releases
- update Makefile, distinfo for this version
- bump major version: new functions added and one deleted vs the latest version 0.22.6 of this port
- update patches/patch-Makefile to fix paths for pkgconfig
Build OK on current/amd64
Tests OK using tree-sitter with Neovim (plugin and grammars for different languages).
Tests and comments welcome. And please commit if OK.
Laurent
Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/tree-sitter/Makefile,v
diff -u -p -r1.16 Makefile
--- Makefile 28 May 2024 19:05:21 -0000 1.16
+++ Makefile 7 Mar 2025 10:12:50 -0000
@@ -5,9 +5,9 @@ COMMENT = parser generator tool and incr
GH_ACCOUNT = tree-sitter
GH_PROJECT = tree-sitter
-GH_TAGNAME = v0.22.6
+GH_TAGNAME = v0.25.3
-SHARED_LIBS += tree-sitter 4.0 # 0.22.6
+SHARED_LIBS += tree-sitter 5.0 # 0.25.3
CATEGORIES = textproc
Index: distinfo
===================================================================
RCS file: /cvs/ports/textproc/tree-sitter/distinfo,v
diff -u -p -r1.8 distinfo
--- distinfo 28 May 2024 19:05:21 -0000 1.8
+++ distinfo 7 Mar 2025 10:12:50 -0000
@@ -1,2 +1,2 @@
-SHA256 (tree-sitter-0.22.6.tar.gz) = 4raH90NYq2QEcwt/saHO192zeAIC03WV7NeyCo9Bhh8=
-SIZE (tree-sitter-0.22.6.tar.gz) = 3036954
+SHA256 (tree-sitter-0.25.3.tar.gz) = hi+sUmU7x7ydLNBjBIPmvfPQK80j2pVsoyZjxHmKk+M=
+SIZE (tree-sitter-0.25.3.tar.gz) = 856455
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/textproc/tree-sitter/patches/patch-Makefile,v
diff -u -p -r1.4 patch-Makefile
--- patches/patch-Makefile 28 May 2024 19:05:21 -0000 1.4
+++ patches/patch-Makefile 7 Mar 2025 10:12:50 -0000
@@ -1,32 +1,40 @@
Remove forced SONAME so it does not disagree with lib file name.
-Also remove useless symlinks for the shared lib and fix the substitutions on
-the pkg-config file
+Also remove useless symlinks for the shared lib and fix the substitutions on the
+pkg-config file.
Index: Makefile
--- Makefile.orig
+++ Makefile
-@@ -38,8 +38,8 @@ else ifeq ($(shell uname),Darwin)
+@@ -7,7 +7,7 @@ DESCRIPTION := An incremental parsing system for progr
+ HOMEPAGE_URL := https://tree-sitter.github.io/tree-sitter/
+
+ # install directory layout
+-PREFIX ?= /usr/local
++PREFIX ?= ${LOCALBASE}
+ INCLUDEDIR ?= $(PREFIX)/include
+ LIBDIR ?= $(PREFIX)/lib
+ PCLIBDIR ?= $(LIBDIR)/pkgconfig
+@@ -43,8 +43,8 @@ ifneq ($(findstring darwin,$(shell $(CC) -dumpmachine)
else
SOEXT = so
- SOEXTVER_MAJOR = so.$(SONAME_MAJOR)
-- SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR)
-- LINKSHARED += -shared -Wl,-soname,libtree-sitter.so.$(SONAME_MAJOR)
+ SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR)
+- SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR)
+- LINKSHARED += -shared -Wl,-soname,libtree-sitter.$(SOEXTVER)
+ SOEXTVER = so.${LIBtree-sitter_VERSION}
+ LINKSHARED += -shared
endif
ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),)
PCLIBDIR := $(PREFIX)/libdata/pkgconfig
-@@ -60,8 +60,7 @@ tree-sitter.pc: tree-sitter.pc.in
- sed -e 's|@VERSION@|$(VERSION)|' \
- -e 's|@LIBDIR@|$(LIBDIR)|' \
- -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
-- -e 's|=$(PREFIX)|=$${prefix}|' \
-- -e 's|@PREFIX@|$(PREFIX)|' $< > $@
-+ -e 's|@PREFIX@|$(LOCALBASE)|' $< > $@
+@@ -67,7 +67,7 @@ tree-sitter.pc: lib/tree-sitter.pc.in
+ -e 's|@CMAKE_INSTALL_INCLUDEDIR@|$(INCLUDEDIR:$(PREFIX)/%=%)|' \
+ -e 's|@PROJECT_DESCRIPTION@|$(DESCRIPTION)|' \
+ -e 's|@PROJECT_HOMEPAGE_URL@|$(HOMEPAGE_URL)|' \
+- -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' $< > $@
++ -e 's|@CMAKE_INSTALL_PREFIX@|$(LOCALBASE)|' $< > $@
clean:
$(RM) $(OBJ) tree-sitter.pc libtree-sitter.a libtree-sitter.$(SOEXT)
-@@ -72,8 +71,6 @@ install: all
+@@ -78,8 +78,6 @@ install: all
install -m644 tree-sitter.pc '$(DESTDIR)$(PCLIBDIR)'/tree-sitter.pc
install -m644 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a
install -m755 libtree-sitter.$(SOEXT) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER)
[update] textproc/tree-sitter 0.25.3