summaryrefslogtreecommitdiff
blob: ffb5e3686d0412ee16ea9c85b4c7929910cc94d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

DESCRIPTION="a search tool that combines the usability of ag with the raw speed of grep"
HOMEPAGE="https://github.com/BurntSushi/ripgrep"
#SRC_URI="https://github.com/BurntSushi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
# custom tarball bundling all deps and index, otherwise cargo fetches from the network
SRC_URI="https://dev.gentoo.org/~radhermit/dist/${P}.tar.xz"

LICENSE="|| ( MIT Unlicense )"
SLOT="0"
KEYWORDS="~amd64 ~x86"

DEPEND="
	dev-util/cargo
	>=dev-lang/rust-1.11
"

src_prepare() {
	default

	# move cache dir where cargo expects it
	mv .cargo "${HOME}" || die
}

src_compile() {
	cargo build --release --verbose || die
}

src_test() {
	cargo test || die "tests failed"
}

src_install() {
	dobin target/release/rg
	doman doc/rg.1
	dodoc CHANGELOG.md README.md
}