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