Remove myself from maintainers
[gentoo.git] / sys-apps / ripgrep / ripgrep-12.0.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 CRATES="
7 aho-corasick-0.7.10
8 atty-0.2.14
9 autocfg-1.0.0
10 base64-0.11.0
11 bitflags-1.2.1
12 bstr-0.2.12
13 bytecount-0.6.0
14 byteorder-1.3.4
15 cc-1.0.50
16 cfg-if-0.1.10
17 clap-2.33.0
18 crossbeam-channel-0.4.2
19 crossbeam-utils-0.7.2
20 encoding_rs-0.8.22
21 encoding_rs_io-0.1.7
22 fnv-1.0.6
23 fs_extra-1.1.0
24 glob-0.3.0
25 globset-0.4.5
26 grep-0.2.5
27 grep-cli-0.1.4
28 grep-matcher-0.1.4
29 grep-pcre2-0.1.4
30 grep-printer-0.1.4
31 grep-regex-0.1.7
32 grep-searcher-0.1.7
33 hermit-abi-0.1.9
34 ignore-0.4.14
35 itoa-0.4.5
36 jemalloc-sys-0.3.2
37 jemallocator-0.3.2
38 lazy_static-1.4.0
39 libc-0.2.68
40 log-0.4.8
41 maybe-uninit-2.0.0
42 memchr-2.3.3
43 memmap-0.7.0
44 num_cpus-1.12.0
45 packed_simd-0.3.3
46 pcre2-0.2.3
47 pcre2-sys-0.2.2
48 pkg-config-0.3.17
49 proc-macro2-1.0.9
50 quote-1.0.3
51 regex-1.3.6
52 regex-automata-0.1.9
53 regex-syntax-0.6.17
54 ryu-1.0.3
55 same-file-1.0.6
56 serde-1.0.105
57 serde_derive-1.0.105
58 serde_json-1.0.50
59 strsim-0.8.0
60 syn-1.0.17
61 termcolor-1.1.0
62 textwrap-0.11.0
63 thread_local-1.0.1
64 unicode-width-0.1.7
65 unicode-xid-0.2.0
66 walkdir-2.3.1
67 winapi-0.3.8
68 winapi-i686-pc-windows-gnu-0.4.0
69 winapi-util-0.1.3
70 winapi-x86_64-pc-windows-gnu-0.4.0
71 "
72
73 inherit cargo bash-completion-r1
74
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})"
79
80 LICENSE="Apache-2.0 BSD-2 Boost-1.0 || ( MIT Unlicense )"
81 SLOT="0"
82 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
83 IUSE="+man pcre"
84
85 DEPEND=""
86
87 RDEPEND="pcre? ( dev-libs/libpcre2 )"
88
89 BDEPEND="${RDEPEND}
90         virtual/pkgconfig
91         >=virtual/rust-1.34
92         man? ( app-text/asciidoc )"
93
94 QA_FLAGS_IGNORED="usr/bin/rg"
95
96 src_compile() {
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" "")
101 }
102
103 src_install() {
104         cargo_src_install $(usex pcre "--features pcre2" "")
105
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))"
110
111         if use man ; then
112             doman "${BUILD_DIR}"/rg.1
113         fi
114
115         newbashcomp "${BUILD_DIR}"/rg.bash rg
116
117         insinto /usr/share/fish/vendor_completions.d
118         doins "${BUILD_DIR}"/rg.fish
119
120         insinto /usr/share/zsh/site-functions
121         doins complete/_rg
122
123         dodoc CHANGELOG.md FAQ.md GUIDE.md README.md
124 }