Remove myself from maintainers
[gentoo.git] / sys-apps / ripgrep / ripgrep-11.0.2.ebuild
1 # Copyright 1999-2019 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.4
8 atty-0.2.13
9 base64-0.10.1
10 bitflags-1.1.0
11 bstr-0.2.6
12 bytecount-0.5.1
13 byteorder-1.3.2
14 c2-chacha-0.2.2
15 cc-1.0.38
16 cfg-if-0.1.9
17 clap-2.33.0
18 crossbeam-channel-0.3.9
19 crossbeam-utils-0.6.6
20 encoding_rs-0.8.17
21 encoding_rs_io-0.1.6
22 fnv-1.0.6
23 fs_extra-1.1.0
24 getrandom-0.1.7
25 glob-0.3.0
26 itoa-0.4.4
27 jemallocator-0.3.2
28 jemalloc-sys-0.3.2
29 lazy_static-1.3.0
30 libc-0.2.60
31 log-0.4.8
32 memchr-2.2.1
33 memmap-0.7.0
34 num_cpus-1.10.1
35 packed_simd-0.3.3
36 pcre2-0.2.1
37 pcre2-sys-0.2.2
38 pkg-config-0.3.15
39 ppv-lite86-0.2.5
40 proc-macro2-0.4.30
41 quote-0.6.13
42 rand-0.7.0
43 rand_chacha-0.2.1
44 rand_core-0.5.0
45 rand_hc-0.2.0
46 redox_syscall-0.1.56
47 regex-1.2.0
48 regex-automata-0.1.8
49 regex-syntax-0.6.10
50 remove_dir_all-0.5.2
51 ryu-1.0.0
52 same-file-1.0.5
53 serde-1.0.98
54 serde_derive-1.0.98
55 serde_json-1.0.40
56 strsim-0.8.0
57 syn-0.15.42
58 tempfile-3.1.0
59 termcolor-1.0.5
60 textwrap-0.11.0
61 thread_local-0.3.6
62 ucd-util-0.1.5
63 unicode-width-0.1.5
64 unicode-xid-0.1.0
65 utf8-ranges-1.0.3
66 walkdir-2.2.9
67 winapi-0.3.7
68 winapi-i686-pc-windows-gnu-0.4.0
69 winapi-util-0.1.2
70 winapi-x86_64-pc-windows-gnu-0.4.0
71 wincolor-1.0.1
72 "
73
74 inherit cargo bash-completion-r1
75
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})"
80
81 LICENSE="Apache-2.0 BSD-2 Boost-1.0 || ( MIT Unlicense )"
82 SLOT="0"
83 KEYWORDS="amd64 ~arm64 ppc64 ~x86"
84 IUSE="+man pcre"
85
86 DEPEND=""
87
88 RDEPEND="pcre? ( dev-libs/libpcre2 )"
89
90 BDEPEND="${RDEPEND}
91         virtual/pkgconfig
92         >=virtual/rust-1.34
93         man? ( app-text/asciidoc )"
94
95 QA_FLAGS_IGNORED="usr/bin/rg"
96
97 src_compile() {
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" "")
102 }
103
104 src_install() {
105         cargo_src_install $(usex pcre "--features pcre2" "")
106
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))"
111
112         if use man ; then
113             doman "${BUILD_DIR}"/rg.1
114         fi
115
116         newbashcomp "${BUILD_DIR}"/rg.bash rg
117
118         insinto /usr/share/fish/vendor_completions.d
119         doins "${BUILD_DIR}"/rg.fish
120
121         insinto /usr/share/zsh/site-functions
122         doins complete/_rg
123
124         dodoc CHANGELOG.md FAQ.md GUIDE.md README.md
125 }