blob: cb5a4dffdb680a4cf9148b946a26511cb28ce0cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PN=tree-sitter
MY_P=${MY_PN}-${PV}
# It would be nice to drop GIT_CRATES for these optional/unused deps.
# Ref: https://github.com/rust-lang/cargo/issues/10801
declare -A GIT_CRATES=(
[wasmtime]="https://github.com/bytecodealliance/wasmtime;fa6fcd946b8f6d60c2d191a1b14b9399e261a76d;wasmtime-%commit%/crates/wasmtime"
[wasmtime-c-api-impl]="https://github.com/bytecodealliance/wasmtime;fa6fcd946b8f6d60c2d191a1b14b9399e261a76d;wasmtime-%commit%/crates/c-api"
)
CRATES="
ahash@0.8.6
aho-corasick@1.1.2
ansi_term@0.12.1
anyhow@1.0.75
arbitrary@1.3.1
ascii@1.1.0
atty@0.2.14
autocfg@1.1.0
bincode@1.3.3
bindgen@0.66.1
bitflags@1.3.2
bitflags@2.4.1
bumpalo@3.14.0
bytes@1.5.0
cc@1.0.83
cesu8@1.1.0
cexpr@0.6.0
cfg-if@1.0.0
chunked_transfer@1.4.1
clang-sys@1.6.1
clap@2.34.0
combine@4.6.6
core-foundation@0.9.3
core-foundation-sys@0.8.4
crc32fast@1.3.2
ctor@0.2.5
ctrlc@3.4.1
diff@0.1.13
difference@2.0.0
dirs@3.0.2
dirs@5.0.1
dirs-sys@0.3.7
dirs-sys@0.4.1
either@1.9.0
equivalent@1.0.1
errno@0.3.5
fallible-iterator@0.3.0
fastrand@2.0.1
form_urlencoded@1.2.0
getrandom@0.2.10
gimli@0.28.0
glob@0.3.1
hashbrown@0.13.2
hashbrown@0.14.2
hermit-abi@0.1.19
home@0.5.5
html-escape@0.2.13
httpdate@1.0.3
idna@0.4.0
indexmap@2.0.2
indoc@2.0.4
itertools@0.10.5
itoa@1.0.9
jni@0.21.1
jni-sys@0.3.0
js-sys@0.3.64
lazy_static@1.4.0
lazycell@1.3.0
leb128@0.2.5
libc@0.2.149
libloading@0.7.4
linux-raw-sys@0.4.10
log@0.4.20
mach@0.3.2
malloc_buf@0.0.6
memchr@2.6.4
memfd@0.6.4
memoffset@0.9.0
minimal-lexical@0.2.1
ndk-context@0.1.1
nix@0.27.1
nom@7.1.3
objc@0.2.7
object@0.32.1
once_cell@1.18.0
option-ext@0.2.0
paste@1.0.14
path-slash@0.2.1
peeking_take_while@0.1.2
percent-encoding@2.3.0
pin-project-lite@0.2.13
ppv-lite86@0.2.17
pretty_assertions@1.4.0
prettyplease@0.2.15
proc-macro2@1.0.69
psm@0.1.21
quote@1.0.33
rand@0.8.5
rand_chacha@0.3.1
rand_core@0.6.4
raw-window-handle@0.5.2
redox_syscall@0.2.16
redox_syscall@0.4.1
redox_users@0.4.3
regalloc2@0.9.3
regex@1.10.2
regex-automata@0.4.3
regex-syntax@0.7.5
regex-syntax@0.8.2
rustc-hash@1.1.0
rustix@0.38.21
ryu@1.0.15
same-file@1.0.6
semver@1.0.20
serde@1.0.190
serde_derive@1.0.190
serde_json@1.0.107
serde_spanned@0.6.4
shlex@1.2.0
slice-group-by@0.3.1
smallbitvec@2.5.1
smallvec@1.11.1
sptr@0.3.2
stable_deref_trait@1.2.0
strsim@0.8.0
syn@1.0.109
syn@2.0.38
target-lexicon@0.12.12
tempfile@3.8.1
textwrap@0.11.0
thiserror@1.0.50
thiserror-impl@1.0.50
tiny_http@0.12.0
tinyvec@1.6.0
tinyvec_macros@0.1.1
toml@0.7.8
toml_datetime@0.6.5
toml_edit@0.19.15
tracing@0.1.40
tracing-attributes@0.1.27
tracing-core@0.1.32
unicode-bidi@0.3.13
unicode-ident@1.0.12
unicode-normalization@0.1.22
unicode-width@0.1.11
unindent@0.2.3
url@2.4.1
utf8-width@0.1.6
vec_map@0.8.2
version_check@0.9.4
walkdir@2.4.0
wasi@0.11.0+wasi-snapshot-preview1
wasm-bindgen@0.2.87
wasm-bindgen-backend@0.2.87
wasm-bindgen-macro@0.2.87
wasm-bindgen-macro-support@0.2.87
wasm-bindgen-shared@0.2.87
wasm-encoder@0.35.0
wasmparser@0.115.0
web-sys@0.3.64
webbrowser@0.8.12
which@4.4.2
winapi@0.3.9
winapi-i686-pc-windows-gnu@0.4.0
winapi-util@0.1.6
winapi-x86_64-pc-windows-gnu@0.4.0
windows-sys@0.45.0
windows-sys@0.48.0
windows-targets@0.42.2
windows-targets@0.48.5
windows_aarch64_gnullvm@0.42.2
windows_aarch64_gnullvm@0.48.5
windows_aarch64_msvc@0.42.2
windows_aarch64_msvc@0.48.5
windows_i686_gnu@0.42.2
windows_i686_gnu@0.48.5
windows_i686_msvc@0.42.2
windows_i686_msvc@0.48.5
windows_x86_64_gnu@0.42.2
windows_x86_64_gnu@0.48.5
windows_x86_64_gnullvm@0.42.2
windows_x86_64_gnullvm@0.48.5
windows_x86_64_msvc@0.42.2
windows_x86_64_msvc@0.48.5
winnow@0.5.17
yansi@0.5.1
zerocopy@0.7.15
zerocopy-derive@0.7.15
"
inherit cargo
DESCRIPTION="Command-line tool for creating and testing tree-sitter grammars"
HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz
${CARGO_CRATE_URIS}"
S="${WORKDIR}"/${MY_P}/cli
LICENSE="Apache-2.0 BSD-2 CC0-1.0 ISC MIT"
SLOT="0"
KEYWORDS="~amd64 arm arm64 ~loong ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
# Test seems to require files (grammar definitions) that we don't have.
RESTRICT="test"
BDEPEND="~dev-libs/tree-sitter-${PV}"
RDEPEND="${BDEPEND}"
QA_FLAGS_IGNORED="usr/bin/${MY_PN}"
src_prepare() {
default
# Existing build.rs file invokes cc to rebuild the tree-sitter library.
# Link with the system one instead.
cp "${FILESDIR}"/tree-sitter-cli-0.20.2-r1-build.rs \
"${WORKDIR}"/${MY_P}/lib/binding_rust/build.rs || die
}
|