1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
18 crossbeam-channel-0.4.2
68 winapi-i686-pc-windows-gnu-0.4.0
70 winapi-x86_64-pc-windows-gnu-0.4.0
73 inherit cargo bash-completion-r1
75 DESCRIPTION="a search tool that combines the usability of ag with the raw speed of grep"
76 HOMEPAGE="https://github.com/BurntSushi/ripgrep"
77 SRC_URI="https://github.com/BurntSushi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
78 $(cargo_crate_uris ${CRATES})"
80 LICENSE="Apache-2.0 BSD-2 Boost-1.0 || ( MIT Unlicense )"
82 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
87 RDEPEND="pcre? ( dev-libs/libpcre2 )"
92 man? ( app-text/asciidoc )"
94 QA_FLAGS_IGNORED="usr/bin/rg"
97 # allow building on musl with dynamic linking support
98 # https://github.com/BurntSushi/rust-pcre2/issues/7
99 use elibc_musl && export PCRE2_SYS_STATIC=0
100 cargo_src_compile $(usex pcre "--features pcre2" "")
104 cargo_src_install $(usex pcre "--features pcre2" "")
106 # hack to find/install generated files
107 # stamp file can be present in multiple dirs if we build additional features
108 # so grab fist match only
109 local BUILD_DIR="$(dirname $(find target/release -name ripgrep-stamp -print -quit))"
112 doman "${BUILD_DIR}"/rg.1
115 newbashcomp "${BUILD_DIR}"/rg.bash rg
117 insinto /usr/share/fish/vendor_completions.d
118 doins "${BUILD_DIR}"/rg.fish
120 insinto /usr/share/zsh/site-functions
123 dodoc CHANGELOG.md FAQ.md GUIDE.md README.md