Hi ports@, update for textproc/tree-sitter to the latest version 0.24.4 Homepage: https://github.com/tree-sitter/tree-sitter
- update Makefile and distinfo for this version - bump minor for SHARED_LIBS (new functions added in API) - update patch for Makefile => fix path substitutions for pkgconfig/tree-sitter.pc Build OK on current/amd64 and tests OK using Neovim with tree-sitter plugin. Tests 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 10 Nov 2024 11:03:57 -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.24.4 -SHARED_LIBS += tree-sitter 4.0 # 0.22.6 +SHARED_LIBS += tree-sitter 4.1 # 0.24.4 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 10 Nov 2024 11:03:57 -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.24.4.tar.gz) = 1wSDKmv6rIs8vKO113PK1hMYO6jAQWZjivLG5d+54tI= +SIZE (tree-sitter-0.24.4.tar.gz) = 3019387 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 10 Nov 2024 11:03:57 -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 +@@ -42,8 +42,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)|' $< > $@ +@@ -66,7 +66,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 +@@ -77,8 +77,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)