commit:     2efcfefd9943f41b4d4f7e0d03581c247f80f7c9
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 27 16:21:18 2022 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Sun Feb 27 16:46:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2efcfefd

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 <AT> gentoo.org>

 dev-libs/tree-sitter/tree-sitter-9999.ebuild | 50 +++++++---------------------
 1 file 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
 }

Reply via email to