pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
tree-sitter: Import tree-sitter-0.20.0
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Tue Aug 10 19:11:38 2021 +0200
Changeset: 4fb4f6219d4a6190b624b2e0b34abe514e74e888
Added Files:
tree-sitter/DESCR
tree-sitter/Makefile
tree-sitter/PLIST
tree-sitter/buildlink3.mk
tree-sitter/distinfo
tree-sitter/patches/patch-Makefile
Log Message:
tree-sitter: Import tree-sitter-0.20.0
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
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4fb4f6219d4a6190b624b2e0b34abe514e74e888
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
tree-sitter/DESCR | 11 +++++++++++
tree-sitter/Makefile | 17 +++++++++++++++++
tree-sitter/PLIST | 8 ++++++++
tree-sitter/buildlink3.mk | 12 ++++++++++++
tree-sitter/distinfo | 7 +++++++
tree-sitter/patches/patch-Makefile | 26 ++++++++++++++++++++++++++
6 files changed, 81 insertions(+)
diffs:
diff --git a/tree-sitter/DESCR b/tree-sitter/DESCR
new file mode 100644
index 0000000000..c90f609adc
--- /dev/null
+++ b/tree-sitter/DESCR
@@ -0,0 +1,11 @@
+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
diff --git a/tree-sitter/Makefile b/tree-sitter/Makefile
new file mode 100644
index 0000000000..bce3aec772
--- /dev/null
+++ b/tree-sitter/Makefile
@@ -0,0 +1,17 @@
+# $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@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 --git a/tree-sitter/PLIST b/tree-sitter/PLIST
new file mode 100644
index 0000000000..bebbf67df0
--- /dev/null
+++ b/tree-sitter/PLIST
@@ -0,0 +1,8 @@
+@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
diff --git a/tree-sitter/buildlink3.mk b/tree-sitter/buildlink3.mk
new file mode 100644
index 0000000000..d6631175e5
--- /dev/null
+++ b/tree-sitter/buildlink3.mk
@@ -0,0 +1,12 @@
+# $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
diff --git a/tree-sitter/distinfo b/tree-sitter/distinfo
new file mode 100644
index 0000000000..f619cde753
--- /dev/null
+++ b/tree-sitter/distinfo
@@ -0,0 +1,7 @@
+$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
diff --git a/tree-sitter/patches/patch-Makefile b/tree-sitter/patches/patch-Makefile
new file mode 100644
index 0000000000..f85255c27f
--- /dev/null
+++ b/tree-sitter/patches/patch-Makefile
@@ -0,0 +1,26 @@
+$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)
+
Home |
Main Index |
Thread Index |
Old Index