1 |
commit: 52cc160503fcb07dfe87595299da9dc8b0349f5b |
2 |
Author: Matthew Smith <matt <AT> offtopica <DOT> uk> |
3 |
AuthorDate: Sun Jan 2 15:06:16 2022 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 2 17:51:03 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52cc1605 |
7 |
|
8 |
dev-libs/tree-sitter: add 0.20.2 |
9 |
|
10 |
Signed-off-by: Matthew Smith <matt <AT> offtopica.uk> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/23632 |
12 |
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org> |
13 |
|
14 |
dev-libs/tree-sitter/Manifest | 1 + |
15 |
dev-libs/tree-sitter/tree-sitter-0.20.2.ebuild | 171 +++++++++++++++++++++++++ |
16 |
2 files changed, 172 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/tree-sitter/Manifest b/dev-libs/tree-sitter/Manifest |
19 |
index 8aaaed52f233..468ce91de5d5 100644 |
20 |
--- a/dev-libs/tree-sitter/Manifest |
21 |
+++ b/dev-libs/tree-sitter/Manifest |
22 |
@@ -83,6 +83,7 @@ DIST tinyvec_macros-0.1.0.crate 1817 BLAKE2B a3d1966bf57c11afcd026269135a6189f14 |
23 |
DIST toml-0.5.8.crate 54219 BLAKE2B b4f9f563e5ba4574d4f2dcbe244378a2e1e984bd9fbbbfa5a06bdd5f8b8d677394f0db9cb8696f6936c80a52caa86b1b3ebaf3885c53855af23f03d318785f19 SHA512 26b7901ee4b7cbb4cf8ea57d365a99ed05e0a76e73452e47d4bcb3b4eeb7bbd393c13eea9ea33dc13622942efcda39acdba9425b74b40c920c9f19673a1f2082 |
24 |
DIST tree-sitter-0.20.0.tar.gz 2876764 BLAKE2B 058f62c2067ce5fcf9440f281c63908f93fda09a6b3604d7196b9c56a15ba88ded7d75f9c21b4c5c4209f587fb5f326ae655cb5f5d84b46bfd783b2147048568 SHA512 a51fa0af45a6a99bb74ff53c15a4d7939eb24c6720e65ec7a96f74ffbce54801f14539e071ec6a4891dae778d7dea5edcecc6dd57716cc70a891c9e6cfa55013 |
25 |
DIST tree-sitter-0.20.1.tar.gz 2903038 BLAKE2B 092b3110ca2dd2dc2f6298dad98c2400064ba7b7bce90cdf7c50bdfabf0bf52629f5315728b578ae46efc1a4c2f71ff024ffae202205a3b563188e3537565359 SHA512 172e9b2fba5d4610f663934dff1cf4580d09631a3d8d5d7249b6a80288aa9fdda9f5eac50a501935a87414563b46f843c3d98a1f7e45302a5c61dd3c08159606 |
26 |
+DIST tree-sitter-0.20.2.tar.gz 2904490 BLAKE2B cae19e3a66778ea72bf5cb0e5153bb6b7dfec0b059c01825377742886fadd52d789f456e82287d71841afad8bd5347361d5ef718b12e20e94c629480c43f4f33 SHA512 4b9a7da47b48b0003daf9af60f9d48aacf7c74d1c9e2645eafd74f62f568bc69e2fb36bb8f0c6b9f1dc85829e146786cc6bf7050ed1402167790b1552990665f |
27 |
DIST unicode-bidi-0.3.4.crate 32228 BLAKE2B 853a85b29d1ac2025b7a28af64ead9387e3b4b1e790ad719d4374e349c1853ddbb5959a2890d9d6c94a5c28e4523fc3324deb6b1ed1aeb5e917f21b0e2516f6c SHA512 170ce083fa82bed13ecc62d85cb882fdd6491ae721e1633d3c1a5d3cee69422153afcf6695765c0e8fc7035440d0370d34afac9e978cb27f7506c07cba300e1e |
28 |
DIST unicode-normalization-0.1.17.crate 100345 BLAKE2B 2579748ab87f6d74ab8e845d88c1990e4ef32e46e38f9a1841e3381d257d973f2f8a9da359c8e3f11790a888acf81f548ed3b749a67bb3e95acf3b744dd063f3 SHA512 727b4844a4eb103375dff7d88d620e1fb581cbdf2523f07a5c1673ff333d772d48ffae7658bfe4816a5bb42de5f68a96e15be9341c540a0f746c2990eeccb3d6 |
29 |
DIST unicode-width-0.1.8.crate 16732 BLAKE2B 5aa7b87eef1322e4151a3fcf981ade311b8fa030527d7561815950e58d3f15156163dfe34da6a708c37dccc3f7652bf7fc2cd899fe8bb0118b67c4113ff3a2d2 SHA512 0abba6da6981a2451e01d93bbd47652c46eb6fb07cc0214f33259fb29945bfd5ee2b302e883ddca8f68e921635f222701b7310e7da2a5e225f854980d1e474b0 |
30 |
|
31 |
diff --git a/dev-libs/tree-sitter/tree-sitter-0.20.2.ebuild b/dev-libs/tree-sitter/tree-sitter-0.20.2.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..f85c79757058 |
34 |
--- /dev/null |
35 |
+++ b/dev-libs/tree-sitter/tree-sitter-0.20.2.ebuild |
36 |
@@ -0,0 +1,171 @@ |
37 |
+# Copyright 1999-2022 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=8 |
41 |
+ |
42 |
+CARGO_OPTIONAL=1 |
43 |
+ |
44 |
+CRATES=" |
45 |
+ aho-corasick-0.7.15 |
46 |
+ ansi_term-0.11.0 |
47 |
+ ansi_term-0.12.1 |
48 |
+ anyhow-1.0.40 |
49 |
+ arrayref-0.3.6 |
50 |
+ arrayvec-0.5.2 |
51 |
+ ascii-1.0.0 |
52 |
+ atty-0.2.14 |
53 |
+ autocfg-1.0.1 |
54 |
+ base64-0.13.0 |
55 |
+ bitflags-1.2.1 |
56 |
+ blake2b_simd-0.5.11 |
57 |
+ bumpalo-3.6.1 |
58 |
+ cc-1.0.67 |
59 |
+ cfg-if-1.0.0 |
60 |
+ chrono-0.4.19 |
61 |
+ chunked_transfer-1.4.0 |
62 |
+ clap-2.33.3 |
63 |
+ constant_time_eq-0.1.5 |
64 |
+ crossbeam-utils-0.8.3 |
65 |
+ ctor-0.1.20 |
66 |
+ diff-0.1.12 |
67 |
+ difference-2.0.0 |
68 |
+ dirs-3.0.1 |
69 |
+ dirs-sys-0.3.5 |
70 |
+ either-1.6.1 |
71 |
+ form_urlencoded-1.0.1 |
72 |
+ getrandom-0.1.16 |
73 |
+ getrandom-0.2.2 |
74 |
+ glob-0.3.0 |
75 |
+ hashbrown-0.9.1 |
76 |
+ hermit-abi-0.1.18 |
77 |
+ html-escape-0.2.6 |
78 |
+ idna-0.2.2 |
79 |
+ indexmap-1.6.1 |
80 |
+ itoa-0.4.7 |
81 |
+ js-sys-0.3.48 |
82 |
+ lazy_static-1.4.0 |
83 |
+ libc-0.2.86 |
84 |
+ libloading-0.7.0 |
85 |
+ log-0.4.14 |
86 |
+ matches-0.1.8 |
87 |
+ memchr-2.3.4 |
88 |
+ num-integer-0.1.44 |
89 |
+ num-traits-0.2.14 |
90 |
+ once_cell-1.7.0 |
91 |
+ output_vt100-0.1.2 |
92 |
+ percent-encoding-2.1.0 |
93 |
+ ppv-lite86-0.2.10 |
94 |
+ pretty_assertions-0.7.2 |
95 |
+ proc-macro2-1.0.24 |
96 |
+ quote-1.0.9 |
97 |
+ rand-0.8.3 |
98 |
+ rand_chacha-0.3.0 |
99 |
+ rand_core-0.6.2 |
100 |
+ rand_hc-0.3.0 |
101 |
+ redox_syscall-0.1.57 |
102 |
+ redox_syscall-0.2.5 |
103 |
+ redox_users-0.3.5 |
104 |
+ regex-1.4.3 |
105 |
+ regex-syntax-0.6.22 |
106 |
+ remove_dir_all-0.5.3 |
107 |
+ rust-argon2-0.8.3 |
108 |
+ rustc-hash-1.1.0 |
109 |
+ ryu-1.0.5 |
110 |
+ same-file-1.0.6 |
111 |
+ serde-1.0.130 |
112 |
+ serde_derive-1.0.130 |
113 |
+ serde_json-1.0.63 |
114 |
+ smallbitvec-2.5.1 |
115 |
+ strsim-0.8.0 |
116 |
+ syn-1.0.67 |
117 |
+ tempfile-3.2.0 |
118 |
+ textwrap-0.11.0 |
119 |
+ thiserror-1.0.25 |
120 |
+ thiserror-impl-1.0.25 |
121 |
+ thread_local-1.1.3 |
122 |
+ time-0.1.43 |
123 |
+ tiny_http-0.8.0 |
124 |
+ tinyvec-1.1.1 |
125 |
+ tinyvec_macros-0.1.0 |
126 |
+ toml-0.5.8 |
127 |
+ unicode-bidi-0.3.4 |
128 |
+ unicode-normalization-0.1.17 |
129 |
+ unicode-width-0.1.8 |
130 |
+ unicode-xid-0.2.1 |
131 |
+ url-2.2.1 |
132 |
+ utf8-width-0.1.4 |
133 |
+ vec_map-0.8.2 |
134 |
+ walkdir-2.3.1 |
135 |
+ wasi-0.9.0+wasi-snapshot-preview1 |
136 |
+ wasi-0.10.2+wasi-snapshot-preview1 |
137 |
+ wasm-bindgen-0.2.71 |
138 |
+ wasm-bindgen-backend-0.2.71 |
139 |
+ wasm-bindgen-macro-0.2.71 |
140 |
+ wasm-bindgen-macro-support-0.2.71 |
141 |
+ wasm-bindgen-shared-0.2.71 |
142 |
+ web-sys-0.3.48 |
143 |
+ webbrowser-0.5.5 |
144 |
+ which-4.1.0 |
145 |
+ widestring-0.4.3 |
146 |
+ winapi-0.3.9 |
147 |
+ winapi-i686-pc-windows-gnu-0.4.0 |
148 |
+ winapi-util-0.1.5 |
149 |
+ winapi-x86_64-pc-windows-gnu-0.4.0 |
150 |
+" |
151 |
+ |
152 |
+inherit toolchain-funcs cargo |
153 |
+ |
154 |
+DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library" |
155 |
+HOMEPAGE="https://github.com/tree-sitter/tree-sitter" |
156 |
+ |
157 |
+if [[ ${PV} == *9999* ]]; then |
158 |
+ inherit git-r3 |
159 |
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}" |
160 |
+else |
161 |
+ SRC_URI=" |
162 |
+ https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz |
163 |
+ ts-cli? ( $(cargo_crate_uris) ) |
164 |
+ " |
165 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
166 |
+fi |
167 |
+ |
168 |
+LICENSE="MIT ts-cli? ( Apache-2.0 BSD-2 CC0-1.0 ISC MIT )" |
169 |
+SLOT="0" |
170 |
+ |
171 |
+IUSE="ts-cli" |
172 |
+ |
173 |
+BDEPEND="ts-cli? ( virtual/rust )" |
174 |
+ |
175 |
+PATCHES=( |
176 |
+ "${FILESDIR}/${PN}-No-static-libs-gentoo.patch" |
177 |
+) |
178 |
+ |
179 |
+src_unpack() { |
180 |
+ if [[ ${PV} == *9999* ]]; then |
181 |
+ git-r3_src_unpack |
182 |
+ use ts-cli && cargo_live_src_unpack |
183 |
+ else |
184 |
+ # behaves as default too, so it is ok to call it unconditonally |
185 |
+ cargo_src_unpack |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+src_prepare() { |
190 |
+ default |
191 |
+ tc-export CC |
192 |
+} |
193 |
+ |
194 |
+src_configure() { |
195 |
+ default |
196 |
+ use ts-cli && cargo_src_configure |
197 |
+} |
198 |
+ |
199 |
+src_compile() { |
200 |
+ default |
201 |
+ use ts-cli && cargo_src_compile |
202 |
+} |
203 |
+ |
204 |
+src_install() { |
205 |
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install |
206 |
+ use ts-cli && cargo_src_install --path "./cli" |
207 |
+} |