sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / x11-terms / alacritty / alacritty-0.4.3_rc1.ebuild
1 # Copyright 2017-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 CRATES="
7 adler32-1.0.4
8 aho-corasick-0.7.10
9 andrew-0.2.1
10 android_glue-0.2.3
11 android_log-sys-0.1.2
12 ansi_term-0.11.0
13 approx-0.3.2
14 arc-swap-0.4.6
15 arrayref-0.3.6
16 arrayvec-0.4.12
17 arrayvec-0.5.1
18 atty-0.2.14
19 autocfg-1.0.0
20 base64-0.11.0
21 bindgen-0.53.2
22 bitflags-1.2.1
23 blake2b_simd-0.5.10
24 block-0.1.6
25 bytemuck-1.2.0
26 byteorder-1.3.4
27 bzip2-0.3.3
28 bzip2-sys-0.1.8+1.0.8
29 calloop-0.4.4
30 cc-1.0.53
31 cexpr-0.4.0
32 cfg-if-0.1.10
33 cgl-0.3.2
34 clang-sys-0.29.3
35 clap-2.33.1
36 clipboard-win-2.2.0
37 cloudabi-0.0.3
38 cmake-0.1.43
39 cocoa-0.19.1
40 cocoa-0.20.0
41 constant_time_eq-0.1.5
42 copypasta-0.6.3
43 core-foundation-0.6.4
44 core-foundation-0.7.0
45 core-foundation-sys-0.6.2
46 core-foundation-sys-0.7.0
47 core-graphics-0.17.3
48 core-graphics-0.19.0
49 core-text-15.0.0
50 core-video-sys-0.1.4
51 crc32fast-1.2.0
52 crossbeam-utils-0.7.2
53 deflate-0.8.4
54 derivative-2.1.1
55 dirs-2.0.2
56 dirs-sys-0.3.4
57 dispatch-0.2.0
58 dlib-0.4.1
59 downcast-rs-1.1.1
60 dtoa-0.4.5
61 dwrote-0.9.0
62 embed-resource-1.3.3
63 env_logger-0.7.1
64 euclid-0.20.11
65 expat-sys-2.1.6
66 filetime-0.2.10
67 flate2-1.0.14
68 fnv-1.0.7
69 font-0.1.0
70 foreign-types-0.3.2
71 foreign-types-0.5.0
72 foreign-types-macros-0.2.1
73 foreign-types-shared-0.1.1
74 foreign-types-shared-0.3.0
75 freetype-rs-0.23.0
76 freetype-sys-0.9.0
77 fsevent-0.4.0
78 fsevent-sys-2.0.1
79 fuchsia-zircon-0.3.3
80 fuchsia-zircon-sys-0.3.3
81 getrandom-0.1.14
82 gl_generator-0.13.1
83 gl_generator-0.14.0
84 glob-0.3.0
85 glutin-0.24.0
86 glutin_egl_sys-0.1.4
87 glutin_emscripten_sys-0.1.1
88 glutin_gles2_sys-0.1.4
89 glutin_glx_sys-0.1.6
90 glutin_wgl_sys-0.1.4
91 hermit-abi-0.1.13
92 http_req-0.5.5
93 humantime-1.3.0
94 idna-0.2.0
95 image-0.23.4
96 inflate-0.4.5
97 inotify-0.7.0
98 inotify-sys-0.1.3
99 instant-0.1.3
100 iovec-0.1.4
101 itoa-0.4.5
102 jni-sys-0.3.0
103 jobserver-0.1.21
104 kernel32-sys-0.2.2
105 khronos_api-3.1.0
106 lazy_static-1.4.0
107 lazycell-1.2.1
108 lexical-core-0.6.2
109 libc-0.2.70
110 libloading-0.5.2
111 libz-sys-1.0.25
112 line_drawing-0.7.0
113 linked-hash-map-0.5.3
114 lock_api-0.3.4
115 log-0.4.8
116 malloc_buf-0.0.6
117 matches-0.1.8
118 maybe-uninit-2.0.0
119 memchr-2.3.3
120 memmap-0.7.0
121 miniz_oxide-0.3.6
122 mio-0.6.22
123 mio-anonymous-pipes-0.1.0
124 mio-extras-2.0.6
125 mio-named-pipes-0.1.6
126 miow-0.2.1
127 miow-0.3.3
128 native-tls-0.2.4
129 ndk-0.1.0
130 ndk-glue-0.1.0
131 ndk-sys-0.1.0
132 net2-0.2.34
133 nix-0.14.1
134 nix-0.17.0
135 nodrop-0.1.14
136 nom-5.1.1
137 notify-4.0.15
138 num-integer-0.1.42
139 num-iter-0.1.40
140 num-rational-0.2.4
141 num-traits-0.2.11
142 num_enum-0.4.3
143 num_enum_derive-0.4.3
144 objc-0.2.7
145 objc-foundation-0.1.1
146 objc_id-0.1.1
147 openssl-0.10.29
148 openssl-probe-0.1.2
149 openssl-sys-0.9.56
150 ordered-float-1.0.2
151 osmesa-sys-0.1.2
152 parking_lot-0.10.2
153 parking_lot_core-0.7.2
154 peeking_take_while-0.1.2
155 percent-encoding-2.1.0
156 phf-0.8.0
157 phf_codegen-0.8.0
158 phf_generator-0.8.0
159 phf_shared-0.8.0
160 pkg-config-0.3.17
161 png-0.16.3
162 podio-0.1.6
163 ppv-lite86-0.2.7
164 proc-macro-crate-0.1.4
165 proc-macro2-0.4.30
166 proc-macro2-1.0.13
167 quick-error-1.2.3
168 quote-0.6.13
169 quote-1.0.5
170 rand-0.7.3
171 rand_chacha-0.2.2
172 rand_core-0.5.1
173 rand_hc-0.2.0
174 rand_pcg-0.2.1
175 raw-window-handle-0.3.3
176 redox_syscall-0.1.56
177 redox_users-0.3.4
178 regex-1.3.7
179 regex-syntax-0.6.17
180 remove_dir_all-0.5.2
181 rust-argon2-0.7.0
182 rustc-hash-1.1.0
183 rustc_tools_util-0.2.0
184 rustc_version-0.2.3
185 rusttype-0.7.9
186 rusttype-0.8.3
187 ryu-1.0.4
188 same-file-1.0.6
189 schannel-0.1.19
190 scopeguard-1.1.0
191 security-framework-0.4.4
192 security-framework-sys-0.4.3
193 semver-0.9.0
194 semver-parser-0.7.0
195 serde-1.0.110
196 serde_derive-1.0.110
197 serde_json-1.0.53
198 serde_yaml-0.8.12
199 servo-fontconfig-0.4.0
200 servo-fontconfig-sys-4.0.9
201 servo-freetype-sys-4.0.3
202 shared_library-0.1.9
203 shlex-0.1.1
204 signal-hook-0.1.15
205 signal-hook-registry-1.2.0
206 siphasher-0.3.3
207 slab-0.4.2
208 smallvec-1.4.0
209 smithay-client-toolkit-0.6.6
210 smithay-clipboard-0.4.0
211 socket2-0.3.12
212 spsc-buffer-0.1.1
213 static_assertions-0.3.4
214 stb_truetype-0.3.1
215 strsim-0.8.0
216 syn-1.0.22
217 tempfile-3.1.0
218 termcolor-1.1.0
219 terminfo-0.7.2
220 textwrap-0.11.0
221 thread_local-1.0.1
222 time-0.1.43
223 toml-0.5.6
224 unicase-2.6.0
225 unicode-bidi-0.3.4
226 unicode-normalization-0.1.12
227 unicode-width-0.1.7
228 unicode-xid-0.1.0
229 unicode-xid-0.2.0
230 url-2.1.1
231 urlocator-0.1.3
232 utf8parse-0.2.0
233 vcpkg-0.2.8
234 vec_map-0.8.2
235 version_check-0.9.1
236 void-1.0.2
237 vswhom-0.1.0
238 vswhom-sys-0.1.0
239 vte-0.8.0
240 vte_generate_state_changes-0.1.1
241 walkdir-2.3.1
242 wasi-0.9.0+wasi-snapshot-preview1
243 wayland-client-0.23.6
244 wayland-commons-0.23.6
245 wayland-protocols-0.23.6
246 wayland-scanner-0.23.6
247 wayland-sys-0.23.6
248 which-3.1.1
249 winapi-0.2.8
250 winapi-0.3.8
251 winapi-build-0.1.1
252 winapi-i686-pc-windows-gnu-0.4.0
253 winapi-util-0.1.5
254 winapi-x86_64-pc-windows-gnu-0.4.0
255 winit-0.22.2
256 winpty-0.2.0
257 winpty-sys-0.5.0
258 winreg-0.6.2
259 ws2_32-sys-0.2.1
260 x11-clipboard-0.5.1
261 x11-dl-2.18.5
262 xcb-0.9.0
263 xdg-2.2.0
264 xml-rs-0.8.0
265 yaml-rust-0.4.3
266 zip-0.5.5
267 "
268
269 MY_PV="${PV//_rc/-rc}"
270 # https://bugs.gentoo.org/725962
271 PYTHON_COMPAT=( python3_{7,8} )
272
273 inherit bash-completion-r1 cargo desktop python-any-r1
274
275 DESCRIPTION="GPU-accelerated terminal emulator"
276 HOMEPAGE="https://github.com/alacritty/alacritty"
277
278 if [ ${PV} == "9999" ] ; then
279         inherit git-r3
280         EGIT_REPO_URI="https://github.com/jwilm/alacritty"
281 else
282         SRC_URI="https://github.com/alacritty/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz
283         $(cargo_crate_uris ${CRATES})"
284         KEYWORDS="~amd64 ~ppc64"
285 fi
286
287 LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions Boost-1.0 BSD BSD-2 CC0-1.0 FTL ISC MIT MPL-2.0 Unlicense WTFPL-2 ZLIB"
288 SLOT="0"
289 IUSE="wayland +X"
290
291 REQUIRED_USE="|| ( wayland X )"
292
293 DEPEND="${PYTHON_DEPS}"
294
295 COMMON_DEPEND="
296         media-libs/fontconfig:=
297         media-libs/freetype:2
298         X? ( x11-libs/libxcb:=[xkb] )
299 "
300
301 RDEPEND="${COMMON_DEPEND}
302         media-libs/mesa[X?,wayland?]
303         sys-libs/zlib
304         sys-libs/ncurses:0
305         wayland? ( dev-libs/wayland )
306         X? (
307                 x11-libs/libXcursor
308                 x11-libs/libXi
309                 x11-libs/libXrandr
310         )
311 "
312
313 BDEPEND="dev-util/cmake"
314
315 DOCS=( CHANGELOG.md docs/ansicode.txt INSTALL.md README.md alacritty.yml )
316
317 QA_FLAGS_IGNORED="usr/bin/alacritty"
318
319 S="${WORKDIR}/${PN}-${MY_PV}"
320
321 src_unpack() {
322         if [[ "${PV}" == *9999* ]]; then
323                 git-r3_src_unpack
324                 cargo_live_src_unpack
325         else
326                 cargo_src_unpack
327         fi
328 }
329
330 src_configure() {
331         myfeatures=(
332                 $(usex X x11 '')
333                 $(usev wayland)
334         )
335 }
336
337 src_compile() {
338         cd alacritty || die
339         cargo_src_compile ${myfeatures:+--features "${myfeatures[*]}"} --no-default-features
340 }
341
342 src_install() {
343         CARGO_INSTALL_PATH="alacritty" cargo_src_install ${myfeatures:+--features "${myfeatures[*]}"} --no-default-features
344
345         newman extra/alacritty.man alacritty.1
346
347         newbashcomp extra/completions/alacritty.bash alacritty
348
349         insinto /usr/share/fish/vendor_completions.d/
350         doins extra/completions/alacritty.fish
351
352         insinto /usr/share/zsh/site-functions
353         doins extra/completions/_alacritty
354
355         domenu extra/linux/Alacritty.desktop
356         newicon extra/logo/alacritty-term.svg Alacritty.svg
357
358         newman extra/alacritty.man alacritty.1
359
360         insinto /usr/share/metainfo
361         doins extra/linux/io.alacritty.Alacritty.appdata.xml
362
363         insinto /usr/share/alacritty/scripts
364         doins -r scripts/*
365
366         einstalldocs
367 }
368
369 src_test() {
370         cd alacritty || die
371         cargo_src_test ${myfeatures:+--features "${myfeatures[*]}"} --no-default-features
372 }