Wed Apr 20 17:21:28 2022 UTC ()
textproc: add tree-sitter
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.
(nia)
diff -r1.1304 -r1.1305 pkgsrc/textproc/Makefile
diff -r0 -r1.1 pkgsrc/textproc/tree-sitter/DESCR
diff -r0 -r1.1 pkgsrc/textproc/tree-sitter/Makefile
diff -r0 -r1.1 pkgsrc/textproc/tree-sitter/PLIST
diff -r0 -r1.1 pkgsrc/textproc/tree-sitter/buildlink3.mk
diff -r0 -r1.1 pkgsrc/textproc/tree-sitter/distinfo
diff -r0 -r1.1 pkgsrc/textproc/tree-sitter/patches/patch-Makefile
--- pkgsrc/textproc/Makefile 2022/04/20 10:40:29 1.1304
+++ pkgsrc/textproc/Makefile 2022/04/20 17:21:27 1.1305
| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.1304 2022/04/20 10:40:29 adam Exp $ | | 1 | # $NetBSD: Makefile,v 1.1305 2022/04/20 17:21:27 nia Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | COMMENT= Text processing utilities (does not include desktop publishing) | | 4 | COMMENT= Text processing utilities (does not include desktop publishing) |
5 | | | 5 | |
6 | SUBDIR+= CRF++ | | 6 | SUBDIR+= CRF++ |
7 | SUBDIR+= DWB | | 7 | SUBDIR+= DWB |
8 | SUBDIR+= FlightCrew | | 8 | SUBDIR+= FlightCrew |
9 | SUBDIR+= GutenMark | | 9 | SUBDIR+= GutenMark |
10 | SUBDIR+= GutenMark-words | | 10 | SUBDIR+= GutenMark-words |
11 | SUBDIR+= LDoc | | 11 | SUBDIR+= LDoc |
12 | SUBDIR+= Markdown | | 12 | SUBDIR+= Markdown |
13 | SUBDIR+= OdfConverter | | 13 | SUBDIR+= OdfConverter |
14 | SUBDIR+= PEGTL | | 14 | SUBDIR+= PEGTL |
| @@ -1316,26 +1316,27 @@ SUBDIR+= tex-xindy-doc | | | @@ -1316,26 +1316,27 @@ SUBDIR+= tex-xindy-doc |
1316 | SUBDIR+= tex-xmltex | | 1316 | SUBDIR+= tex-xmltex |
1317 | SUBDIR+= tex-xmltex-doc | | 1317 | SUBDIR+= tex-xmltex-doc |
1318 | SUBDIR+= tex-xmltexconfig | | 1318 | SUBDIR+= tex-xmltexconfig |
1319 | SUBDIR+= texi2html | | 1319 | SUBDIR+= texi2html |
1320 | SUBDIR+= texi2mdoc | | 1320 | SUBDIR+= texi2mdoc |
1321 | SUBDIR+= texi2roff | | 1321 | SUBDIR+= texi2roff |
1322 | SUBDIR+= the_silver_searcher | | 1322 | SUBDIR+= the_silver_searcher |
1323 | SUBDIR+= tinyxml | | 1323 | SUBDIR+= tinyxml |
1324 | SUBDIR+= tinyxml2 | | 1324 | SUBDIR+= tinyxml2 |
1325 | SUBDIR+= tokyodystopia | | 1325 | SUBDIR+= tokyodystopia |
1326 | SUBDIR+= trang | | 1326 | SUBDIR+= trang |
1327 | SUBDIR+= translate-shell | | 1327 | SUBDIR+= translate-shell |
1328 | SUBDIR+= translate-toolkit | | 1328 | SUBDIR+= translate-toolkit |
| | | 1329 | SUBDIR+= tree-sitter |
1329 | SUBDIR+= troffcvt | | 1330 | SUBDIR+= troffcvt |
1330 | SUBDIR+= uchardet | | 1331 | SUBDIR+= uchardet |
1331 | SUBDIR+= ugrep | | 1332 | SUBDIR+= ugrep |
1332 | SUBDIR+= unac | | 1333 | SUBDIR+= unac |
1333 | SUBDIR+= uncrustify | | 1334 | SUBDIR+= uncrustify |
1334 | SUBDIR+= uni2ascii | | 1335 | SUBDIR+= uni2ascii |
1335 | SUBDIR+= unicode-character-database | | 1336 | SUBDIR+= unicode-character-database |
1336 | SUBDIR+= unicode-emoji | | 1337 | SUBDIR+= unicode-emoji |
1337 | SUBDIR+= unroff | | 1338 | SUBDIR+= unroff |
1338 | SUBDIR+= untex | | 1339 | SUBDIR+= untex |
1339 | SUBDIR+= upmendex | | 1340 | SUBDIR+= upmendex |
1340 | SUBDIR+= uriparser | | 1341 | SUBDIR+= uriparser |
1341 | SUBDIR+= urlview | | 1342 | SUBDIR+= urlview |
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.
# $NetBSD: Makefile,v 1.1 2022/04/20 17:21:28 nia Exp $
DISTNAME= tree-sitter-0.20.6
CATEGORIES= textproc
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"
@comment $NetBSD: PLIST,v 1.1 2022/04/20 17:21:28 nia Exp $
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
# $NetBSD: buildlink3.mk,v 1.1 2022/04/20 17:21:28 nia Exp $
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?= ../../textproc/tree-sitter
.endif # TREE_SITTER_BUILDLINK3_MK
BUILDLINK_TREE+= -tree-sitter
$NetBSD: distinfo,v 1.1 2022/04/20 17:21:28 nia Exp $
BLAKE2s (tree-sitter-0.20.6.tar.gz) = c58e8aab485e661d249c94e64b509fa1aa4b42b614a93fc228d7e95fb6522766
SHA512 (tree-sitter-0.20.6.tar.gz) = f0fb1e0073867c2a6e69b230e07e5eec32a2b30d3c711ec188526e287d6a1ef06de266d476482f900ec7c9ff6c11909899fd35a802e96f0befc6e99815502377
Size (tree-sitter-0.20.6.tar.gz) = 2924556 bytes
SHA1 (patch-Makefile) = 6610bddb86c70f8e6f664997e9f56d948887fd6b
$NetBSD: patch-Makefile,v 1.1 2022/04/20 17:21:28 nia Exp $
- 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
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)