--- /dev/null
+Tree-sitter is a parser generator tool and an incremental parsing
+library. It can build a concrete syntax tree for a source file and
+efficiently update the syntax tree as the source file is edited.
+Tree-sitter aims to be:
+
+ * General: enough to parse any programming language
+ * Fast: enough to parse on every keystroke in a text editor
+ * Robust: enough to provide useful results even in the presence
+ of syntax errors
+ * Dependency-free: so that the runtime library (which is written in pure C)
+ can be embedded in any application
--- /dev/null
+# $NetBSD$
+
+DISTNAME= tree-sitter-0.20.0
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=tree-sitter/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://tree-sitter.github.io/
+COMMENT= Incremental parsing system for programming tools
+LICENSE= mit
+
+USE_TOOLS+= gmake
+
+PKGCONFIG_OVERRIDE+= tree-sitter.pc.in
+
+.include "../../mk/bsd.pkg.mk"
--- /dev/null
+@comment $NetBSD$
+include/tree_sitter/api.h
+include/tree_sitter/parser.h
+lib/libtree-sitter.a
+lib/libtree-sitter.so
+lib/libtree-sitter.so.0
+lib/libtree-sitter.so.0.0
+lib/pkgconfig/tree-sitter.pc
--- /dev/null
+# $NetBSD$
+
+BUILDLINK_TREE+= tree-sitter
+
+.if !defined(TREE_SITTER_BUILDLINK3_MK)
+TREE_SITTER_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.tree-sitter+= tree-sitter>=0.20.0
+BUILDLINK_PKGSRCDIR.tree-sitter?= ../../wip/tree-sitter
+.endif # TREE_SITTER_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -tree-sitter
--- /dev/null
+$NetBSD$
+
+SHA1 (tree-sitter-0.20.0.tar.gz) = 8f4332cf35059717ce3129373a4b10d8dd278327
+RMD160 (tree-sitter-0.20.0.tar.gz) = 8563780e6f33137b7d36e7db3abfd379ba866f66
+SHA512 (tree-sitter-0.20.0.tar.gz) = a51fa0af45a6a99bb74ff53c15a4d7939eb24c6720e65ec7a96f74ffbce54801f14539e071ec6a4891dae778d7dea5edcecc6dd57716cc70a891c9e6cfa55013
+Size (tree-sitter-0.20.0.tar.gz) = 2876764 bytes
+SHA1 (patch-Makefile) = 9dcde8bb8924cfe80ff4e24fad56528b271a86cf
--- /dev/null
+$NetBSD$
+
+- Avoid to possibly pass extra optimization CFLAGS
+- Do not override PCLIBDIR for FreeBSD, NetBSD and DragonFly
+
+--- Makefile.orig 2021-06-30 00:18:39.000000000 +0000
++++ Makefile
+@@ -18,7 +18,7 @@ endif
+ OBJ := $(SRC:.c=.o)
+
+ # define default flags, and override to append mandatory flags
+-CFLAGS ?= -O3 -Wall -Wextra -Werror
++CFLAGS ?= -Wall -Wextra -Werror
+ override CFLAGS += -std=gnu99 -fPIC -Ilib/src -Ilib/include
+
+ # ABI versioning
+@@ -37,9 +37,6 @@ else
+ SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR)
+ LINKSHARED += -shared -Wl,-soname,libtree-sitter.so.$(SONAME_MAJOR)
+ endif
+-ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly))
+- PCLIBDIR := $(PREFIX)/libdata/pkgconfig
+-endif
+
+ all: libtree-sitter.a libtree-sitter.$(SOEXTVER)
+