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