1 |
commit: 2efcfefd9943f41b4d4f7e0d03581c247f80f7c9 |
2 |
Author: Matthew Smith <matthew <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 27 16:21:18 2022 +0000 |
4 |
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 27 16:46:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2efcfefd |
7 |
|
8 |
dev-libs/tree-sitter: remove USE=ts-cli from live ebuild |
9 |
|
10 |
Should have been part of previous commit, |
11 |
7a89ddd17a5cee5991d3ee6596a0e9720e794750. |
12 |
|
13 |
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org> |
14 |
|
15 |
dev-libs/tree-sitter/tree-sitter-9999.ebuild | 50 +++++++--------------------- |
16 |
1 file changed, 12 insertions(+), 38 deletions(-) |
17 |
|
18 |
diff --git a/dev-libs/tree-sitter/tree-sitter-9999.ebuild b/dev-libs/tree-sitter/tree-sitter-9999.ebuild |
19 |
index 74713d7aef17..9800235d12bc 100644 |
20 |
--- a/dev-libs/tree-sitter/tree-sitter-9999.ebuild |
21 |
+++ b/dev-libs/tree-sitter/tree-sitter-9999.ebuild |
22 |
@@ -1,11 +1,8 @@ |
23 |
-# Copyright 1999-2021 Gentoo Authors |
24 |
+# Copyright 1999-2022 Gentoo Authors |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI=8 |
28 |
- |
29 |
-CARGO_OPTIONAL=1 |
30 |
- |
31 |
-inherit toolchain-funcs cargo |
32 |
+inherit optfeature toolchain-funcs |
33 |
|
34 |
DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library" |
35 |
HOMEPAGE="https://github.com/tree-sitter/tree-sitter" |
36 |
@@ -14,50 +11,27 @@ if [[ ${PV} == *9999* ]]; then |
37 |
inherit git-r3 |
38 |
EGIT_REPO_URI="https://github.com/${PN}/${PN}" |
39 |
else |
40 |
- SRC_URI=" |
41 |
- https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz |
42 |
- ts-cli? ( $(cargo_crate_uris) ) |
43 |
- " |
44 |
+ SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
45 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
46 |
fi |
47 |
|
48 |
-LICENSE="MIT ts-cli? ( Apache-2.0 BSD-2 CC0-1.0 ISC MIT )" |
49 |
+LICENSE="MIT" |
50 |
SLOT="0" |
51 |
|
52 |
-IUSE="ts-cli" |
53 |
- |
54 |
-BDEPEND="ts-cli? ( virtual/rust )" |
55 |
- |
56 |
-PATCHES=( |
57 |
- "${FILESDIR}/${PN}-No-static-libs-gentoo.patch" |
58 |
-) |
59 |
- |
60 |
-src_unpack() { |
61 |
- if [[ ${PV} == *9999* ]]; then |
62 |
- git-r3_src_unpack |
63 |
- use ts-cli && cargo_live_src_unpack |
64 |
- else |
65 |
- # behaves as default too, so it is ok to call it unconditonally |
66 |
- cargo_src_unpack |
67 |
- fi |
68 |
-} |
69 |
+PATCHES=( "${FILESDIR}/${PN}-No-static-libs-gentoo.patch" ) |
70 |
|
71 |
src_prepare() { |
72 |
default |
73 |
tc-export CC |
74 |
} |
75 |
|
76 |
-src_configure() { |
77 |
- default |
78 |
- use ts-cli && cargo_src_configure |
79 |
-} |
80 |
- |
81 |
-src_compile() { |
82 |
- default |
83 |
- use ts-cli && cargo_src_compile |
84 |
+src_install() { |
85 |
+ emake DESTDIR="${D}" \ |
86 |
+ PREFIX="${EPREFIX}/usr" \ |
87 |
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ |
88 |
+ install |
89 |
} |
90 |
|
91 |
-src_install() { |
92 |
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install |
93 |
- use ts-cli && cargo_src_install --path "./cli" |
94 |
+pkg_postinst() { |
95 |
+ optfeature "building and testing grammars" dev-util/tree-sitter-cli |
96 |
} |