media-plugins/waylyrics: new package, add 0.2.12
[gentoo-zh.git] / media-plugins / waylyrics / waylyrics-0.2.12.ebuild
blobe482567566b27814acfba8e11e53e96e822ddd99
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 # Autogenerated by pycargoebuild 0.13.2
6 EAPI=8
8 CRATES="
9         addr2line@0.21.0
10         adler@1.0.2
11         ahash@0.7.8
12         aho-corasick@1.1.2
13         ansi_term@0.12.1
14         anyhow@1.0.80
15         arrayvec@0.7.4
16         assert_float_eq@1.1.3
17         async-channel@2.2.0
18         async-trait@0.1.77
19         atty@0.2.14
20         autocfg@1.1.0
21         backtrace@0.3.69
22         base64@0.21.7
23         bitflags@1.3.2
24         bitflags@2.4.2
25         bitvec@1.0.1
26         block@0.1.6
27         borsh-derive@1.3.1
28         borsh@1.3.1
29         bumpalo@3.15.2
30         bytecheck@0.6.12
31         bytecheck_derive@0.6.12
32         bytes@1.5.0
33         cairo-rs@0.19.2
34         cairo-sys-rs@0.19.2
35         cc@1.0.86
36         cfg-expr@0.15.7
37         cfg-if@1.0.0
38         cfg_aliases@0.1.1
39         clap@2.34.0
40         concurrent-queue@2.4.0
41         cookie@0.17.0
42         cookie@0.18.0
43         cookie_store@0.20.0
44         core-foundation-sys@0.8.6
45         core-foundation@0.9.4
46         crossbeam-utils@0.8.19
47         darling@0.14.4
48         darling_core@0.14.4
49         darling_macro@0.14.4
50         dbus-codegen@0.9.1
51         dbus-dummy@0.1.0
52         dbus-tree@0.9.2
53         dbus@0.9.7
54         deranged@0.3.11
55         derivative@2.2.0
56         derive_is_enum_variant@0.1.1
57         documented-derive@0.3.0
58         documented@0.3.0
59         encoding_rs@0.8.33
60         enum-kinds@0.5.1
61         equivalent@1.0.1
62         errno@0.3.8
63         event-listener-strategy@0.5.0
64         event-listener@5.1.0
65         fastrand@2.0.1
66         field-offset@0.3.6
67         fnv@1.0.7
68         foreign-types-shared@0.1.1
69         foreign-types@0.3.2
70         form_urlencoded@1.2.1
71         from_variants@1.0.2
72         from_variants_impl@1.0.2
73         funty@2.0.0
74         futures-channel@0.3.30
75         futures-core@0.3.30
76         futures-executor@0.3.30
77         futures-io@0.3.30
78         futures-macro@0.3.30
79         futures-sink@0.3.30
80         futures-task@0.3.30
81         futures-util@0.3.30
82         gdk-pixbuf-sys@0.19.0
83         gdk-pixbuf@0.19.2
84         gdk4-sys@0.8.0
85         gdk4@0.8.0
86         getrandom@0.2.12
87         gettext-rs@0.7.0
88         gettext-sys@0.21.3
89         gimli@0.28.1
90         gio-sys@0.19.0
91         gio@0.19.2
92         glib-macros@0.19.2
93         glib-sys@0.19.0
94         glib@0.19.2
95         gobject-sys@0.19.0
96         graphene-rs@0.19.2
97         graphene-sys@0.19.0
98         gsk4-sys@0.8.0
99         gsk4@0.8.0
100         gtk4-macros@0.8.0
101         gtk4-sys@0.8.0
102         gtk4@0.8.0
103         h2@0.3.24
104         hashbrown@0.12.3
105         hashbrown@0.14.3
106         heck@0.3.3
107         heck@0.4.1
108         hermit-abi@0.1.19
109         hermit-abi@0.3.6
110         hex@0.4.3
111         http-body@0.4.6
112         http@0.2.11
113         httparse@1.8.0
114         httpdate@1.0.3
115         hyper-tls@0.5.0
116         hyper@0.14.28
117         ident_case@1.0.1
118         idna@0.3.0
119         idna@0.5.0
120         indexmap@2.2.3
121         ipnet@2.9.0
122         itoa@1.0.10
123         js-sys@0.3.68
124         ksni-dummy@0.1.0
125         ksni@0.2.1
126         lazy_static@1.4.0
127         libc@0.2.153
128         libdbus-sys@0.2.5
129         libmimalloc-sys@0.1.35
130         linux-raw-sys@0.4.13
131         locale_config@0.3.0
132         lock_api@0.4.11
133         log@0.4.20
134         lrc-nom@0.2.0
135         malloc_buf@0.0.6
136         matchers@0.1.0
137         md5@0.7.0
138         memchr@2.7.1
139         memoffset@0.9.0
140         mimalloc@0.1.39
141         mime@0.3.17
142         minimal-lexical@0.2.1
143         miniz_oxide@0.7.2
144         mio@0.8.10
145         mpris@2.0.1
146         native-tls@0.2.11
147         nom@7.1.3
148         nu-ansi-term@0.46.0
149         num-conv@0.1.0
150         num-traits@0.2.18
151         num_cpus@1.16.0
152         objc-foundation@0.1.1
153         objc@0.2.7
154         objc_id@0.1.1
155         object@0.32.2
156         once_cell@1.19.0
157         openssl-macros@0.1.1
158         openssl-probe@0.1.5
159         openssl-src@300.2.3+3.2.1
160         openssl-sys@0.9.101
161         openssl@0.10.64
162         overload@0.1.1
163         pango-sys@0.19.0
164         pango@0.19.2
165         parking@2.2.0
166         parking_lot@0.12.1
167         parking_lot_core@0.9.9
168         percent-encoding@2.3.1
169         phf@0.11.2
170         phf_generator@0.11.2
171         phf_macros@0.11.2
172         phf_shared@0.11.2
173         pin-project-lite@0.2.13
174         pin-utils@0.1.0
175         pkg-config@0.3.30
176         powerfmt@0.2.0
177         ppv-lite86@0.2.17
178         proc-macro-crate@3.1.0
179         proc-macro-error-attr@1.0.4
180         proc-macro-error@1.0.4
181         proc-macro2@1.0.78
182         psl-types@2.0.11
183         ptr_meta@0.1.4
184         ptr_meta_derive@0.1.4
185         publicsuffix@2.2.3
186         quote@0.3.15
187         quote@1.0.35
188         radium@0.7.0
189         rand@0.8.5
190         rand_chacha@0.3.1
191         rand_core@0.6.4
192         redox_syscall@0.4.1
193         regex-automata@0.1.10
194         regex-automata@0.4.5
195         regex-syntax@0.6.29
196         regex-syntax@0.8.2
197         regex@1.10.3
198         rend@0.4.2
199         reqwest@0.11.24
200         rkyv@0.7.44
201         rkyv_derive@0.7.44
202         rust_decimal@1.34.3
203         rust_decimal_macros@1.34.2
204         rustc-demangle@0.1.23
205         rustc_version@0.4.0
206         rustix@0.38.31
207         rustls-pemfile@1.0.4
208         rustversion@1.0.14
209         ryu@1.0.17
210         schannel@0.1.23
211         scopeguard@1.2.0
212         seahash@4.1.0
213         security-framework-sys@2.9.1
214         security-framework@2.9.2
215         semver@1.0.22
216         serde@1.0.197
217         serde_derive@1.0.197
218         serde_json@1.0.114
219         serde_repr@0.1.18
220         serde_spanned@0.6.5
221         serde_urlencoded@0.7.1
222         sharded-slab@0.1.7
223         signal-hook-registry@1.4.1
224         simdutf8@0.1.4
225         siphasher@0.3.11
226         slab@0.4.9
227         smallvec@1.13.1
228         socket2@0.5.5
229         sorensen@0.2.0
230         strsim@0.10.0
231         strsim@0.8.0
232         strum@0.26.1
233         strum_macros@0.26.1
234         syn@0.11.11
235         syn@1.0.109
236         syn@2.0.50
237         syn_derive@0.1.8
238         sync_wrapper@0.1.2
239         synom@0.11.3
240         system-configuration-sys@0.5.0
241         system-configuration@0.5.1
242         system-deps@6.2.0
243         tap@1.0.1
244         target-lexicon@0.12.14
245         temp-dir@0.1.12
246         tempfile@3.10.0
247         textwrap@0.11.0
248         thiserror-impl@1.0.57
249         thiserror@1.0.57
250         thread_local@1.1.8
251         time-core@0.1.2
252         time-macros@0.2.17
253         time@0.3.34
254         tinyvec@1.6.0
255         tinyvec_macros@0.1.1
256         tokio-macros@2.2.0
257         tokio-native-tls@0.3.1
258         tokio-util@0.7.10
259         tokio@1.36.0
260         toml@0.8.10
261         toml_datetime@0.6.5
262         toml_edit@0.21.1
263         toml_edit@0.22.6
264         tower-service@0.3.2
265         tracing-attributes@0.1.27
266         tracing-core@0.1.32
267         tracing-journald@0.3.0
268         tracing-log@0.2.0
269         tracing-subscriber@0.3.18
270         tracing@0.1.40
271         try-lock@0.2.5
272         unicode-bidi@0.3.15
273         unicode-ident@1.0.12
274         unicode-normalization@0.1.23
275         unicode-segmentation@1.11.0
276         unicode-width@0.1.11
277         unicode-xid@0.0.4
278         url@2.5.0
279         uuid@1.7.0
280         valuable@0.1.0
281         vcpkg@0.2.15
282         vec_map@0.8.2
283         version-compare@0.1.1
284         version_check@0.9.4
285         want@0.3.1
286         wasi@0.11.0+wasi-snapshot-preview1
287         wasm-bindgen-backend@0.2.91
288         wasm-bindgen-futures@0.4.41
289         wasm-bindgen-macro-support@0.2.91
290         wasm-bindgen-macro@0.2.91
291         wasm-bindgen-shared@0.2.91
292         wasm-bindgen@0.2.91
293         web-sys@0.3.68
294         winapi-i686-pc-windows-gnu@0.4.0
295         winapi-x86_64-pc-windows-gnu@0.4.0
296         winapi@0.3.9
297         windows-sys@0.48.0
298         windows-sys@0.52.0
299         windows-targets@0.48.5
300         windows-targets@0.52.0
301         windows_aarch64_gnullvm@0.48.5
302         windows_aarch64_gnullvm@0.52.0
303         windows_aarch64_msvc@0.48.5
304         windows_aarch64_msvc@0.52.0
305         windows_i686_gnu@0.48.5
306         windows_i686_gnu@0.52.0
307         windows_i686_msvc@0.48.5
308         windows_i686_msvc@0.52.0
309         windows_x86_64_gnu@0.48.5
310         windows_x86_64_gnu@0.52.0
311         windows_x86_64_gnullvm@0.48.5
312         windows_x86_64_gnullvm@0.52.0
313         windows_x86_64_msvc@0.48.5
314         windows_x86_64_msvc@0.52.0
315         winnow@0.5.40
316         winnow@0.6.2
317         winreg@0.50.0
318         wyz@0.5.1
319         xdg@2.5.2
320         xml-rs@0.8.19
323 declare -A GIT_CRATES=(
324         [ncmapi]='https://github.com/waylyrics/ncmapi-rs;51b4d121235823e8040feb3a9c9052da0559fe75;ncmapi-rs-%commit%'
325         [qqmusic-rs]='https://github.com/waylyrics/qqmusic-rs;22e66ba62e63d97c6dffb45400655404e6f06b93;qqmusic-rs-%commit%'
328 PLOCALES="zh_CN"
329 inherit cargo desktop gnome2-utils plocale xdg
331 DESCRIPTION="Simple On Screen lyrics Display for linux/unix"
332 HOMEPAGE="
333         https://waylyrics.github.io/waylyrics/waylyrics
334         https://github.com/waylyrics/waylyrics
337 if [[ "${PV}" == *9999* ]]; then
338         inherit git-r3
339         EGIT_REPO_URI="https://github.com/waylyrics/waylyrics.git"
340 else
341         SRC_URI="
342                 https://github.com/waylyrics/waylyrics/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
343                 ${CARGO_CRATE_URIS}
344         "
345         KEYWORDS="~amd64"
348 LICENSE="MIT"
349 # Dependent crate licenses
350 LICENSE+="
351         Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD GPL-3+ MIT
352         Unicode-DFS-2016 Unlicense
354 SLOT="0"
356 DEPEND="
357         dev-libs/glib:2
358         gui-libs/gtk:4
359         dev-libs/openssl:=
360         sys-apps/dbus
361         sys-devel/gettext
362         x11-libs/cairo
364 RDEPEND="${DEPEND}"
365 BDEPEND="
366         app-misc/jq
367         dev-libs/mimalloc
368         >=virtual/rust-1.73:*
371 src_compile() {
372         export WAYLYRICS_THEME_PRESETS_DIR="/usr/share/${PN}/themes"
373         cargo_src_compile --all-targets --all-features
376 src_install() {
377         cargo_src_install
379         doicon -s scalable "${S}/res/icons/hicolor/scalable/apps/io.poly000.waylyrics.svg"
380         domenu "${S}/io.poly000.waylyrics.desktop"
382         insinto "/usr/share/glib-2.0/schemas"
383         doins "io.poly000.waylyrics.gschema.xml"
385         insinto "/usr/share/${PN}"
386         doins -r themes
388         cd "${S}/locales"
389         install_locale() {
390                 for file in ${1}/LC_MESSAGES/waylyrics.po; do
391                         msgfmt "${file}" -o "${file%.po}.mo" || die
392                         insinto /usr/share/locale/${1}/LC_MESSAGES
393                         doins "${file%.po}.mo"
394                 done
395         }
396         plocale_for_each_locale install_locale
399 pkg_postinst() {
400         gnome2_schemas_update
401         xdg_pkg_postinst
404 pkg_postrm() {
405         gnome2_schemas_update
406         xdg_pkg_postrm