pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc textproc: add tree-sitter
details: https://anonhg.NetBSD.org/pkgsrc/rev/9c7c9fd2a057
branches: trunk
changeset: 377396:9c7c9fd2a057
user: nia <nia%pkgsrc.org@localhost>
date: Wed Apr 20 17:21:27 2022 +0000
description:
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.
diffstat:
textproc/Makefile | 3 ++-
textproc/tree-sitter/DESCR | 3 +++
textproc/tree-sitter/Makefile | 17 +++++++++++++++++
textproc/tree-sitter/PLIST | 8 ++++++++
textproc/tree-sitter/buildlink3.mk | 12 ++++++++++++
textproc/tree-sitter/distinfo | 6 ++++++
textproc/tree-sitter/patches/patch-Makefile | 26 ++++++++++++++++++++++++++
7 files changed, 74 insertions(+), 1 deletions(-)
diffs (113 lines):
diff -r e27c010f6091 -r 9c7c9fd2a057 textproc/Makefile
--- a/textproc/Makefile Wed Apr 20 17:14:33 2022 +0000
+++ b/textproc/Makefile Wed Apr 20 17:21:27 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1304 2022/04/20 10:40:29 adam Exp $
+# $NetBSD: Makefile,v 1.1305 2022/04/20 17:21:27 nia Exp $
#
COMMENT= Text processing utilities (does not include desktop publishing)
@@ -1326,6 +1326,7 @@
SUBDIR+= trang
SUBDIR+= translate-shell
SUBDIR+= translate-toolkit
+SUBDIR+= tree-sitter
SUBDIR+= troffcvt
SUBDIR+= uchardet
SUBDIR+= ugrep
diff -r e27c010f6091 -r 9c7c9fd2a057 textproc/tree-sitter/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/tree-sitter/DESCR Wed Apr 20 17:21:27 2022 +0000
@@ -0,0 +1,3 @@
+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.
diff -r e27c010f6091 -r 9c7c9fd2a057 textproc/tree-sitter/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/tree-sitter/Makefile Wed Apr 20 17:21:27 2022 +0000
@@ -0,0 +1,17 @@
+# $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@localhost
+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"
diff -r e27c010f6091 -r 9c7c9fd2a057 textproc/tree-sitter/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/tree-sitter/PLIST Wed Apr 20 17:21:27 2022 +0000
@@ -0,0 +1,8 @@
+@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
diff -r e27c010f6091 -r 9c7c9fd2a057 textproc/tree-sitter/buildlink3.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/tree-sitter/buildlink3.mk Wed Apr 20 17:21:27 2022 +0000
@@ -0,0 +1,12 @@
+# $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
diff -r e27c010f6091 -r 9c7c9fd2a057 textproc/tree-sitter/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/tree-sitter/distinfo Wed Apr 20 17:21:27 2022 +0000
@@ -0,0 +1,6 @@
+$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
diff -r e27c010f6091 -r 9c7c9fd2a057 textproc/tree-sitter/patches/patch-Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/tree-sitter/patches/patch-Makefile Wed Apr 20 17:21:27 2022 +0000
@@ -0,0 +1,26 @@
+$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)
+
Home |
Main Index |
Thread Index |
Old Index