1 |
commit: 4537150b88d5799fa8d0553c859233faa3f03bbd |
2 |
Author: Matthew Smith <matthew <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 2 20:51:27 2022 +0000 |
4 |
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 2 20:52:22 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4537150b |
7 |
|
8 |
dev-util/tree-sitter-cli: link with dev-libs/tree-sitter |
9 |
|
10 |
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org> |
11 |
|
12 |
.../files/tree-sitter-cli-0.20.2-r1-build.rs | 3 + |
13 |
.../tree-sitter-cli-0.20.2-r1.ebuild | 143 +++++++++++++++++++++ |
14 |
2 files changed, 146 insertions(+) |
15 |
|
16 |
diff --git a/dev-util/tree-sitter-cli/files/tree-sitter-cli-0.20.2-r1-build.rs b/dev-util/tree-sitter-cli/files/tree-sitter-cli-0.20.2-r1-build.rs |
17 |
new file mode 100644 |
18 |
index 000000000000..7ea9d2cd34f5 |
19 |
--- /dev/null |
20 |
+++ b/dev-util/tree-sitter-cli/files/tree-sitter-cli-0.20.2-r1-build.rs |
21 |
@@ -0,0 +1,3 @@ |
22 |
+fn main() { |
23 |
+ println!("cargo:rustc-link-lib=dylib=tree-sitter"); |
24 |
+} |
25 |
|
26 |
diff --git a/dev-util/tree-sitter-cli/tree-sitter-cli-0.20.2-r1.ebuild b/dev-util/tree-sitter-cli/tree-sitter-cli-0.20.2-r1.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..7b497d81917f |
29 |
--- /dev/null |
30 |
+++ b/dev-util/tree-sitter-cli/tree-sitter-cli-0.20.2-r1.ebuild |
31 |
@@ -0,0 +1,143 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+MY_PN=tree-sitter |
38 |
+MY_P=tree-sitter-${PV} |
39 |
+CRATES=" |
40 |
+ aho-corasick-0.7.15 |
41 |
+ ansi_term-0.11.0 |
42 |
+ ansi_term-0.12.1 |
43 |
+ anyhow-1.0.40 |
44 |
+ arrayref-0.3.6 |
45 |
+ arrayvec-0.5.2 |
46 |
+ ascii-1.0.0 |
47 |
+ atty-0.2.14 |
48 |
+ autocfg-1.0.1 |
49 |
+ base64-0.13.0 |
50 |
+ bitflags-1.2.1 |
51 |
+ blake2b_simd-0.5.11 |
52 |
+ bumpalo-3.6.1 |
53 |
+ cc-1.0.67 |
54 |
+ cfg-if-1.0.0 |
55 |
+ chrono-0.4.19 |
56 |
+ chunked_transfer-1.4.0 |
57 |
+ clap-2.33.3 |
58 |
+ constant_time_eq-0.1.5 |
59 |
+ crossbeam-utils-0.8.3 |
60 |
+ ctor-0.1.20 |
61 |
+ diff-0.1.12 |
62 |
+ difference-2.0.0 |
63 |
+ dirs-3.0.1 |
64 |
+ dirs-sys-0.3.5 |
65 |
+ either-1.6.1 |
66 |
+ form_urlencoded-1.0.1 |
67 |
+ getrandom-0.1.16 |
68 |
+ getrandom-0.2.2 |
69 |
+ glob-0.3.0 |
70 |
+ hashbrown-0.9.1 |
71 |
+ hermit-abi-0.1.18 |
72 |
+ html-escape-0.2.6 |
73 |
+ idna-0.2.2 |
74 |
+ indexmap-1.6.1 |
75 |
+ itoa-0.4.7 |
76 |
+ js-sys-0.3.48 |
77 |
+ lazy_static-1.4.0 |
78 |
+ libc-0.2.86 |
79 |
+ libloading-0.7.0 |
80 |
+ log-0.4.14 |
81 |
+ matches-0.1.8 |
82 |
+ memchr-2.3.4 |
83 |
+ num-integer-0.1.44 |
84 |
+ num-traits-0.2.14 |
85 |
+ once_cell-1.7.0 |
86 |
+ output_vt100-0.1.2 |
87 |
+ percent-encoding-2.1.0 |
88 |
+ ppv-lite86-0.2.10 |
89 |
+ pretty_assertions-0.7.2 |
90 |
+ proc-macro2-1.0.24 |
91 |
+ quote-1.0.9 |
92 |
+ rand-0.8.3 |
93 |
+ rand_chacha-0.3.0 |
94 |
+ rand_core-0.6.2 |
95 |
+ rand_hc-0.3.0 |
96 |
+ redox_syscall-0.1.57 |
97 |
+ redox_syscall-0.2.5 |
98 |
+ redox_users-0.3.5 |
99 |
+ regex-1.4.3 |
100 |
+ regex-syntax-0.6.22 |
101 |
+ remove_dir_all-0.5.3 |
102 |
+ rust-argon2-0.8.3 |
103 |
+ rustc-hash-1.1.0 |
104 |
+ ryu-1.0.5 |
105 |
+ same-file-1.0.6 |
106 |
+ serde-1.0.130 |
107 |
+ serde_derive-1.0.130 |
108 |
+ serde_json-1.0.63 |
109 |
+ smallbitvec-2.5.1 |
110 |
+ strsim-0.8.0 |
111 |
+ syn-1.0.67 |
112 |
+ tempfile-3.2.0 |
113 |
+ textwrap-0.11.0 |
114 |
+ thiserror-1.0.25 |
115 |
+ thiserror-impl-1.0.25 |
116 |
+ thread_local-1.1.3 |
117 |
+ time-0.1.43 |
118 |
+ tiny_http-0.8.0 |
119 |
+ tinyvec-1.1.1 |
120 |
+ tinyvec_macros-0.1.0 |
121 |
+ toml-0.5.8 |
122 |
+ unicode-bidi-0.3.4 |
123 |
+ unicode-normalization-0.1.17 |
124 |
+ unicode-width-0.1.8 |
125 |
+ unicode-xid-0.2.1 |
126 |
+ url-2.2.1 |
127 |
+ utf8-width-0.1.4 |
128 |
+ vec_map-0.8.2 |
129 |
+ walkdir-2.3.1 |
130 |
+ wasi-0.9.0+wasi-snapshot-preview1 |
131 |
+ wasi-0.10.2+wasi-snapshot-preview1 |
132 |
+ wasm-bindgen-0.2.71 |
133 |
+ wasm-bindgen-backend-0.2.71 |
134 |
+ wasm-bindgen-macro-0.2.71 |
135 |
+ wasm-bindgen-macro-support-0.2.71 |
136 |
+ wasm-bindgen-shared-0.2.71 |
137 |
+ web-sys-0.3.48 |
138 |
+ webbrowser-0.5.5 |
139 |
+ which-4.1.0 |
140 |
+ widestring-0.4.3 |
141 |
+ winapi-0.3.9 |
142 |
+ winapi-i686-pc-windows-gnu-0.4.0 |
143 |
+ winapi-util-0.1.5 |
144 |
+ winapi-x86_64-pc-windows-gnu-0.4.0 |
145 |
+" |
146 |
+ |
147 |
+inherit cargo |
148 |
+ |
149 |
+DESCRIPTION="Command-line tool for creating and testing tree-sitter grammars" |
150 |
+HOMEPAGE="https://github.com/tree-sitter/tree-sitter" |
151 |
+SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz |
152 |
+$(cargo_crate_uris)" |
153 |
+S="${WORKDIR}"/${MY_P}/cli |
154 |
+ |
155 |
+LICENSE="Apache-2.0 BSD-2 CC0-1.0 ISC MIT" |
156 |
+SLOT="0" |
157 |
+KEYWORDS="~amd64" |
158 |
+ |
159 |
+# Test seems to require files (grammar definitions) that we don't have. |
160 |
+RESTRICT="test" |
161 |
+ |
162 |
+BDEPEND="dev-libs/tree-sitter" |
163 |
+RDEPEND="dev-libs/tree-sitter[-ts-cli(-)]" |
164 |
+ |
165 |
+QA_FLAGS_IGNORED="usr/bin/${MY_PN}" |
166 |
+ |
167 |
+src_prepare() { |
168 |
+ default |
169 |
+ |
170 |
+ # Existing build.rs file invokes cc to rebuild the tree-sitter library. |
171 |
+ # Link with the system one instead. |
172 |
+ cp "${FILESDIR}"/tree-sitter-cli-0.20.2-r1-build.rs \ |
173 |
+ "${WORKDIR}"/${MY_P}/lib/binding_rust/build.rs || die |
174 |
+} |