Gentoo Archives: gentoo-commits

From: Matthew Smith <matthew@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/tree-sitter/
Date: Sun, 27 Feb 2022 16:14:32
Message-Id: 1645978434.7a89ddd17a5cee5991d3ee6596a0e9720e794750.matthew@gentoo
1 commit: 7a89ddd17a5cee5991d3ee6596a0e9720e794750
2 Author: Matthew Smith <matthew <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 27 16:07:33 2022 +0000
4 Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 27 16:13:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a89ddd1
7
8 dev-libs/tree-sitter: remove ts-cli USE flag
9
10 Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
11
12 dev-libs/tree-sitter/tree-sitter-0.20.2-r1.ebuild | 37 +++++++++++++++++++++++
13 1 file changed, 37 insertions(+)
14
15 diff --git a/dev-libs/tree-sitter/tree-sitter-0.20.2-r1.ebuild b/dev-libs/tree-sitter/tree-sitter-0.20.2-r1.ebuild
16 new file mode 100644
17 index 000000000000..9800235d12bc
18 --- /dev/null
19 +++ b/dev-libs/tree-sitter/tree-sitter-0.20.2-r1.ebuild
20 @@ -0,0 +1,37 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +inherit optfeature toolchain-funcs
26 +
27 +DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
28 +HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
29 +
30 +if [[ ${PV} == *9999* ]]; then
31 + inherit git-r3
32 + EGIT_REPO_URI="https://github.com/${PN}/${PN}"
33 +else
34 + SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
35 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
36 +fi
37 +
38 +LICENSE="MIT"
39 +SLOT="0"
40 +
41 +PATCHES=( "${FILESDIR}/${PN}-No-static-libs-gentoo.patch" )
42 +
43 +src_prepare() {
44 + default
45 + tc-export CC
46 +}
47 +
48 +src_install() {
49 + emake DESTDIR="${D}" \
50 + PREFIX="${EPREFIX}/usr" \
51 + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
52 + install
53 +}
54 +
55 +pkg_postinst() {
56 + optfeature "building and testing grammars" dev-util/tree-sitter-cli
57 +}