tree-sitter/tree-sitter.spec
Matej Cepl 2b164493e4 Accepting request 1077592 from home:mcepl:neovim
- Update to version 0.20.8:
  - 0.20.8 - recovered
  - cicd: fix bug in release workflow
  - Bumps [webbrowser](https://github.com/amodm/webbrowser-rs)
    from 0.5.5 to 0.8.3.
  - cli: Bump tree-sitter dependency to 0.20.10
  - Update python error corpus to reflect grammar changes
  - Improve the performance of running a query in a small range
    of a large file
  - Add API for checking if a pattern in a query is non-local
  - Fix bug in maintenance of query cursor's tree depth
  - Restructure query_cursor_advance to explicitly control which
    hidden nodes it descends into
  - Extract 'internal' versions of tree cursor movement fns that
    allow visiting hidden nodes
  - Group analysis state sets into QueryAnalysis struct
  - Precompute the set of repetition symbols that can match
    rootless patterns
  - Add --row-range, --quiet, and --time flags to query
    subcommand
  - Fix CLI build on windows
  - Clear the parse stack when terminating parsing early due to
    error cost
  - This fixes a bug where the parse tree would not be rebalanced
    if this code path was taken.
  - Add --dot flag to parse subcommand, for printing tree as DOT
    graph
  - Derive Hash for Language
  - docs: apply `scheme` marker for all query syntax snippets
  - fix: possible rollover of nanoseconds in clock.h
  - cli: make error message more specific for building in
    `docker`
  - cli: Improve init-config with respect to TREE_SITTER_DIR
  - docs: merge of all binding and grammar link PRs
  - Exclude huge generated files from `git diff` output
  - loader: use portable way of path joining
  - loader: add TREE_SITTER_LIBDIR; cli: add --libdir to
    `tree-sitter generate`
  - cli: add -b, --build flags for `tree-sitter generate`
  - Remove unused no-minimize arg for the generate command
  - cli: Fix build.rs in case of the current branch ref was
    packed
  - Support SHA lookup in .git/packed-refs
  - fix: possible rollover of nanoseconds in clock.h
  - Fix permanent rebuild triggering in a git worktree due to
    wrong git branch file path
  - fix(cli): Racing on playground webserver port binding
  - Fix test output formatting for rules starting with M/U
  - Allow web-tree-sitter to work with Emscripten 3
  - Add __cxa_atexit to exports
  - Add `memset` to exports
  - Add 'stringToUTF16' and 'AsciiToString' to exported method
  - Configure compiled WASM grammars to not catch rejections
  - Add Erlang to list of Available Parsers
  - Fix test output formatting for rules starting with M/U
  - Previously the rule names could not begin with an uppercase
    M or U because the test output formatter assumed that they
    represent special tokens: MISSING or UEXPECTED.
  - Allow retrieving a tree's list of included ranges, fix some
    included range bugs
  - Add tests that randomly edit files with disjoint included
    ranges
  - Fix suppression of empty tokens during error handling at
    included range boundaries
  - Fix parse error when reusing a node at the end of an included
    range
  - fix(cli): Racing on playground webserver port binding
  - Add doc comments for tree included ranges getter
  - Fix adjustment of trees' included ranges on edits
  - Add D grammar - it is quite complete for D 2.100.
  - Add Erlang to list of Available Parsers
  - Add twig parser in documentation
  - Fix integer size of subtree's child count field
  - Explain in the docs that npm install supports limited
    platforms
- Removed upstreamed patch CVE-2022-45299-update-webbrowser.patch

OBS-URL: https://build.opensuse.org/request/show/1077592
OBS-URL: https://build.opensuse.org/package/show/editors/tree-sitter?expand=0&rev=15
2023-04-05 19:29:14 +00:00

106 lines
3.3 KiB
RPMSpec

#
# spec file for package tree-sitter
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define somajor 0
%define libdirname tree_sitter
Name: tree-sitter
Version: 0.20.8
Release: 0
Summary: An incremental parsing system for programming tools
License: MIT
URL: https://tree-sitter.github.io/
Source0: https://github.com/tree-sitter/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.xz
Source1: vendor.tar.xz
Source2: cargo_config
BuildRequires: cargo-packaging
BuildRequires: rust > 1.40
Requires: lib%{name}%{somajor} = %{version}
%description
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
%package -n lib%{name}%{somajor}
Summary: Asychronous I/O support library
%description -n lib%{name}%{somajor}
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. This is the package with the dynamically linked C library.
%package devel
Summary: Development files for %{name}
Requires: lib%{name}%{somajor} = %{version}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup -p1 -a1
mkdir -p .cargo
cp %{SOURCE2} .cargo/config
# fix VERSION in Makefile
sed -i -e '/^VERSION/s/:= .*$/:= %{version}/' Makefile
%build
%{cargo_build}
export CFLAGS='%{optflags}'
export PREFIX='%{_prefix}' LIBDIR='%{_libdir}'
%make_build
%install
export PREFIX='%{_prefix}' LIBDIR='%{_libdir}' INCLUDEDIR='%{_includedir}'
%make_install
install -p -m 0755 -D %{_builddir}/%{name}-%{version}/target/release/tree-sitter \
%{buildroot}%{_bindir}/tree-sitter
find %{buildroot} -type f \( -name "*.la" -o -name "*.a" \) -delete -print
%post -n lib%{name}%{somajor} -p /sbin/ldconfig
%postun -n lib%{name}%{somajor} -p /sbin/ldconfig
%files
%doc README.md CONTRIBUTING.md
%{_bindir}/tree-sitter
%files -n lib%{name}%{somajor}
%license LICENSE
%{_libdir}/*.so.*
%files devel
%doc docs/
%dir %{_includedir}/%{libdirname}/
%{_includedir}/%{libdirname}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog