The package rpms/rust-tree-sitter-tags.git has added or updated architecture specific
content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-tree-sitter-tags.git/commit/....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 458cd94e4eb42e997a35a2f0d5edb0b970a62128
Author: Aleksei Bavshin <alebastr(a)fedoraproject.org>
Date: Wed Mar 9 08:07:35 2022 -0800
Initial import (#2028897)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1e13678
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.crate
+*.src.rpm
+results_*/
diff --git a/LICENSE.upstream b/LICENSE.upstream
new file mode 100644
index 0000000..4c22002
--- /dev/null
+++ b/LICENSE.upstream
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018-2021 Max Brunsfeld
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/rust-tree-sitter-tags.spec b/rust-tree-sitter-tags.spec
new file mode 100644
index 0000000..58f9770
--- /dev/null
+++ b/rust-tree-sitter-tags.spec
@@ -0,0 +1,77 @@
+# Generated by rust2rpm 21
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate tree-sitter-tags
+
+Name: rust-%{crate}
+Version: 0.20.2
+Release: %autorelease
+Summary: Library for extracting tag information
+
+# Upstream license specification: MIT
+License: MIT
+URL:
https://crates.io/crates/tree-sitter-tags
+Source: %{crates_source}
+# Upstream license file - tree-sitter/tree-sitter#1520
+Source1:
https://github.com/tree-sitter/tree-sitter/raw/v%{version}/LICENSE#/LICEN...
+# Fix tree-sitter-cli tests on non-x86 architectures
+# Part of tree-sitter/tree-sitter#1524
+Patch0: tags-use-platform-independent-c_char-instead-of-i8.patch
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging >= 21
+
+%global _description %{expand:
+Library for extracting tag information.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p2
+%cargo_prep
+cp %{SOURCE1} LICENSE
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..35eae6e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (tree-sitter-tags-0.20.2.crate) =
b378f384c6be67b357550920d137e33988b269da9467b4978fbd21091efcab4af7658777ad9f837514d1897979979c0006594e09a66512e82f422d982487c7c5
diff --git a/tags-use-platform-independent-c_char-instead-of-i8.patch
b/tags-use-platform-independent-c_char-instead-of-i8.patch
new file mode 100644
index 0000000..ed97e25
--- /dev/null
+++ b/tags-use-platform-independent-c_char-instead-of-i8.patch
@@ -0,0 +1,45 @@
+From 42e2956bc3fde6a16b303737256f3edd415479b3 Mon Sep 17 00:00:00 2001
+From: Aleksei Bavshin <alebastr89(a)gmail.com>
+Date: Sun, 5 Dec 2021 20:29:31 -0800
+Subject: [PATCH] tags: use platform-independent c_char instead of i8
+
+Fixes build on aarch64, ppc64le and other platforms that have different
+definition of c_char.
+---
+ tags/src/c_lib.rs | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tags/src/c_lib.rs b/tags/src/c_lib.rs
+index 8f689a9a8..088cc7bca 100644
+--- a/tags/src/c_lib.rs
++++ b/tags/src/c_lib.rs
+@@ -215,9 +215,9 @@ pub extern "C" fn ts_tags_buffer_tags_len(this: *const
TSTagsBuffer) -> u32 {
+ }
+
+ #[no_mangle]
+-pub extern "C" fn ts_tags_buffer_docs(this: *const TSTagsBuffer) -> *const
i8 {
++pub extern "C" fn ts_tags_buffer_docs(this: *const TSTagsBuffer) -> *const
c_char {
+ let buffer = unwrap_ptr(this);
+- buffer.docs.as_ptr() as *const i8
++ buffer.docs.as_ptr() as *const c_char
+ }
+
+ #[no_mangle]
+@@ -237,7 +237,7 @@ pub extern "C" fn ts_tagger_syntax_kinds_for_scope_name(
+ this: *mut TSTagger,
+ scope_name: *const c_char,
+ len: *mut u32,
+-) -> *const *const i8 {
++) -> *const *const c_char {
+ let tagger = unwrap_mut_ptr(this);
+ let scope_name = unsafe { unwrap(CStr::from_ptr(scope_name).to_str()) };
+ let len = unwrap_mut_ptr(len);
+@@ -245,7 +245,7 @@ pub extern "C" fn ts_tagger_syntax_kinds_for_scope_name(
+ *len = 0;
+ if let Some(config) = tagger.languages.get(scope_name) {
+ *len = config.c_syntax_type_names.len() as u32;
+- return config.c_syntax_type_names.as_ptr() as *const *const i8;
++ return config.c_syntax_type_names.as_ptr() as *const *const c_char;
+ }
+ std::ptr::null()
+ }