File perl-Text-Treesitter.spec of Package perl-Text-Treesitter

#
# spec file for package perl-Text-Treesitter
#
# Copyright (c) 2024 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 cpan_name Text-Treesitter
Name:           perl-Text-Treesitter
Version:        0.13
Release:        0
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Perl binding for F<tree-sitter>
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(ExtUtils::CBuilder)
BuildRequires:  perl(ExtUtils::CppGuess)
BuildRequires:  perl(File::Slurper)
BuildRequires:  perl(JSON::MaybeUTF8)
BuildRequires:  perl(List::Util) >= 1.29
BuildRequires:  perl(Module::Build) >= 0.4004
BuildRequires:  perl(Module::Build::Using::PkgConfig)
BuildRequires:  perl(Object::Pad) >= 0.805
BuildRequires:  perl(Sublike::Extended)
BuildRequires:  perl(Syntax::Keyword::Match)
BuildRequires:  perl(Test2::V0)
Requires:       perl(ExtUtils::CppGuess)
Requires:       perl(File::Slurper)
Requires:       perl(JSON::MaybeUTF8)
Requires:       perl(List::Util) >= 1.29
Requires:       perl(Object::Pad) >= 0.805
Requires:       perl(Sublike::Extended)
Requires:       perl(Syntax::Keyword::Match)
%{perl_requires}

%description
This module provides several classes and utilities that wrap the
_tree-sitter_ parser library. A toplevel class is provided by this module
which wraps the functionallity of several other classes, which are also
available directly in the following modules:

  * Text::Treesitter::Language - represents a _tree-sitter_ language grammar

  * Text::Treesitter::Node - an element of a _tree-sitter_ parse result

  * Text::Treesitter::Parser - parse some input text according to a
_tree-sitter_ grammar

  * Text::Treesitter::Query - represents a set of _tree-sitter_ query patterns

  * Text::Treesitter::QueryCursor - stores the result of a _tree-sitter_ node
query

  * Text::Treesitter::QueryMatch - stores the result of a _tree-sitter_ query
pattern match

  * Text::Treesitter::Tree - holds the result of a _tree-sitter_ parse
operation

%prep
%autosetup  -n %{cpan_name}-%{version}

%build
perl Build.PL --installdirs=vendor optimize="%{optflags}"
./Build build --flags=%{?_smp_mflags}

%check
./Build test

%install
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist

%files -f %{name}.files
%doc Changes examples README
%license LICENSE

%changelog
openSUSE Build Service is sponsored by