git: 8347798606ea - main - devel/tree-sitter: Update to 0.22.1

From: Adam Weinberger <adamw_at_FreeBSD.org>
Date: Mon, 11 Mar 2024 02:56:36 UTC
The branch main has been updated by adamw:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8347798606ea2517538948231191c6e632c8f8c5

commit 8347798606ea2517538948231191c6e632c8f8c5
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2024-03-11 02:56:25 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2024-03-11 02:56:25 +0000

    devel/tree-sitter: Update to 0.22.1
---
 devel/tree-sitter/Makefile             |  2 +-
 devel/tree-sitter/distinfo             |  6 +++---
 devel/tree-sitter/files/patch-Makefile | 13 +++++++++++++
 devel/tree-sitter/pkg-plist            |  2 +-
 4 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/devel/tree-sitter/Makefile b/devel/tree-sitter/Makefile
index 5d2d4a5fa989..d88d8b5d8f63 100644
--- a/devel/tree-sitter/Makefile
+++ b/devel/tree-sitter/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	tree-sitter
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.21.0
+DISTVERSION=	0.22.1
 CATEGORIES=	devel
 
 MAINTAINER=	adamw@FreeBSD.org
diff --git a/devel/tree-sitter/distinfo b/devel/tree-sitter/distinfo
index ebc626799032..92307375908e 100644
--- a/devel/tree-sitter/distinfo
+++ b/devel/tree-sitter/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1708565004
-SHA256 (tree-sitter-tree-sitter-v0.21.0_GH0.tar.gz) = 6bb60e5b63c1dc18aba57a9e7b3ea775b4f9ceec44cc35dac4634d26db4eb69c
-SIZE (tree-sitter-tree-sitter-v0.21.0_GH0.tar.gz) = 3055055
+TIMESTAMP = 1710125226
+SHA256 (tree-sitter-tree-sitter-v0.22.1_GH0.tar.gz) = b21065e78da33e529893c954e712ad15d9ad44a594b74567321d4a3a007d6090
+SIZE (tree-sitter-tree-sitter-v0.22.1_GH0.tar.gz) = 3038644
diff --git a/devel/tree-sitter/files/patch-Makefile b/devel/tree-sitter/files/patch-Makefile
new file mode 100644
index 000000000000..01884c13fd17
--- /dev/null
+++ b/devel/tree-sitter/files/patch-Makefile
@@ -0,0 +1,13 @@
+0.22.1 tries to install api.h before creating the destination.
+Hopefully this can be removed soon...
+
+--- Makefile.orig	2024-03-11 02:52:53 UTC
++++ Makefile
+@@ -67,6 +67,7 @@ install: all
+ 	$(RM) $(OBJ) tree-sitter.pc libtree-sitter.a libtree-sitter.$(SOEXT)
+ 
+ install: all
++	mkdir -p '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter
+ 	install -Dm644 lib/include/tree_sitter/api.h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/api.h
+ 	install -Dm644 tree-sitter.pc '$(DESTDIR)$(PCLIBDIR)'/tree-sitter.pc
+ 	install -Dm644 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a
diff --git a/devel/tree-sitter/pkg-plist b/devel/tree-sitter/pkg-plist
index 2ce5609e8851..3d50c74dadb8 100644
--- a/devel/tree-sitter/pkg-plist
+++ b/devel/tree-sitter/pkg-plist
@@ -2,5 +2,5 @@ include/tree_sitter/api.h
 lib/libtree-sitter.a
 lib/libtree-sitter.so
 lib/libtree-sitter.so.0
-lib/libtree-sitter.so.0.0
+lib/libtree-sitter.so.0.22
 libdata/pkgconfig/tree-sitter.pc