summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Smith <matthew@gentoo.org>2022-02-27 16:21:18 +0000
committerMatthew Smith <matthew@gentoo.org>2022-02-27 16:46:46 +0000
commit2efcfefd9943f41b4d4f7e0d03581c247f80f7c9 (patch)
treefee0d68840fec6721c762e15db2f952cc984b7fc
parentdev-python/send2trash: mark ALLARCHES (diff)
downloadgentoo-2efcfefd.tar.gz
gentoo-2efcfefd.tar.bz2
gentoo-2efcfefd.zip
dev-libs/tree-sitter: remove USE=ts-cli from live ebuild
Should have been part of previous commit, 7a89ddd17a5cee5991d3ee6596a0e9720e794750. Signed-off-by: Matthew Smith <matthew@gentoo.org>
-rw-r--r--dev-libs/tree-sitter/tree-sitter-9999.ebuild50
1 files changed, 12 insertions, 38 deletions
diff --git a/dev-libs/tree-sitter/tree-sitter-9999.ebuild b/dev-libs/tree-sitter/tree-sitter-9999.ebuild
index 74713d7aef17..9800235d12bc 100644
--- a/dev-libs/tree-sitter/tree-sitter-9999.ebuild
+++ b/dev-libs/tree-sitter/tree-sitter-9999.ebuild
@@ -1,11 +1,8 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-
-CARGO_OPTIONAL=1
-
-inherit toolchain-funcs cargo
+inherit optfeature toolchain-funcs
DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
@@ -14,50 +11,27 @@ if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/${PN}/${PN}"
else
- SRC_URI="
- https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
- ts-cli? ( $(cargo_crate_uris) )
- "
+ SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
-LICENSE="MIT ts-cli? ( Apache-2.0 BSD-2 CC0-1.0 ISC MIT )"
+LICENSE="MIT"
SLOT="0"
-IUSE="ts-cli"
-
-BDEPEND="ts-cli? ( virtual/rust )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-No-static-libs-gentoo.patch"
-)
-
-src_unpack() {
- if [[ ${PV} == *9999* ]]; then
- git-r3_src_unpack
- use ts-cli && cargo_live_src_unpack
- else
- # behaves as default too, so it is ok to call it unconditonally
- cargo_src_unpack
- fi
-}
+PATCHES=( "${FILESDIR}/${PN}-No-static-libs-gentoo.patch" )
src_prepare() {
default
tc-export CC
}
-src_configure() {
- default
- use ts-cli && cargo_src_configure
-}
-
-src_compile() {
- default
- use ts-cli && cargo_src_compile
+src_install() {
+ emake DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
}
-src_install() {
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
- use ts-cli && cargo_src_install --path "./cli"
+pkg_postinst() {
+ optfeature "building and testing grammars" dev-util/tree-sitter-cli
}