sys-kernel/xanmod-sources: update Manifest
[gentoo-zh.git] / media-sound / netease-cloud-music-gtk / netease-cloud-music-gtk-2.3.0.ebuild
blob82feb3f0cbd58627f0f2f5b67dcf13e067017cba
1 # Copyright 2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 # Autogenerated by pycargoebuild 0.12.1
6 EAPI=8
8 CRATES="
9         adler@1.0.2
10         aho-corasick@1.1.2
11         android-tzdata@0.1.1
12         android_system_properties@0.1.5
13         anyhow@1.0.75
14         async-broadcast@0.5.1
15         async-channel@1.9.0
16         async-channel@2.1.1
17         async-executor@1.8.0
18         async-fs@1.6.0
19         async-io@1.13.0
20         async-io@2.2.2
21         async-lock@2.8.0
22         async-lock@3.2.0
23         async-process@1.8.1
24         async-recursion@1.0.5
25         async-signal@0.2.5
26         async-task@4.5.0
27         async-trait@0.1.74
28         atomic-waker@1.1.2
29         atomic_refcell@0.1.13
30         autocfg@1.1.0
31         base64@0.21.5
32         bitflags@1.3.2
33         bitflags@2.4.1
34         block-buffer@0.10.4
35         block@0.1.6
36         blocking@1.5.1
37         bumpalo@3.14.0
38         bytemuck@1.14.0
39         byteorder@1.5.0
40         bytes@1.5.0
41         cairo-rs@0.18.3
42         cairo-sys-rs@0.18.2
43         castaway@0.1.2
44         cc@1.0.83
45         cfg-expr@0.15.5
46         cfg-if@1.0.0
47         chrono@0.4.31
48         color_quant@1.1.0
49         concurrent-queue@2.4.0
50         cookie@0.17.0
51         cookie_store@0.20.0
52         core-foundation-sys@0.8.6
53         cpufeatures@0.2.11
54         crc32fast@1.3.2
55         crossbeam-utils@0.8.16
56         crypto-common@0.1.6
57         curl-sys@0.4.70+curl-8.5.0
58         curl@0.4.44
59         deranged@0.3.10
60         derivative@2.2.0
61         digest@0.10.7
62         either@1.9.0
63         encoding_rs@0.8.33
64         enumflags2@0.7.8
65         enumflags2_derive@0.7.8
66         env_logger@0.10.1
67         equivalent@1.0.1
68         errno@0.3.8
69         event-listener-strategy@0.4.0
70         event-listener@2.5.3
71         event-listener@3.1.0
72         event-listener@4.0.0
73         fastrand@1.9.0
74         fastrand@2.0.1
75         fdeflate@0.3.1
76         field-offset@0.3.6
77         flate2@1.0.28
78         fnv@1.0.7
79         foreign-types-shared@0.1.1
80         foreign-types@0.3.2
81         form_urlencoded@1.2.1
82         futures-channel@0.3.29
83         futures-core@0.3.29
84         futures-executor@0.3.29
85         futures-io@0.3.29
86         futures-lite@1.13.0
87         futures-lite@2.1.0
88         futures-macro@0.3.29
89         futures-sink@0.3.29
90         futures-task@0.3.29
91         futures-util@0.3.29
92         gdk-pixbuf-sys@0.18.0
93         gdk-pixbuf@0.18.3
94         gdk4-sys@0.7.2
95         gdk4@0.7.3
96         generic-array@0.14.7
97         getrandom@0.2.11
98         gettext-rs@0.7.0
99         gettext-sys@0.21.3
100         gio-sys@0.18.1
101         gio@0.18.4
102         glib-macros@0.18.3
103         glib-sys@0.18.1
104         glib@0.18.4
105         gobject-sys@0.18.0
106         graphene-rs@0.18.1
107         graphene-sys@0.18.1
108         gsk4-sys@0.7.3
109         gsk4@0.7.3
110         gstreamer-base-sys@0.21.1
111         gstreamer-base@0.21.2
112         gstreamer-play-sys@0.21.0
113         gstreamer-play@0.21.2
114         gstreamer-sys@0.21.2
115         gstreamer-video-sys@0.21.2
116         gstreamer-video@0.21.2
117         gstreamer@0.21.2
118         gtk4-macros@0.7.2
119         gtk4-sys@0.7.3
120         gtk4@0.7.3
121         hashbrown@0.14.3
122         heck@0.4.1
123         hermit-abi@0.3.3
124         hex@0.4.3
125         html-escape@0.2.13
126         http@0.2.11
127         httpdate@1.0.3
128         humantime@2.1.0
129         iana-time-zone-haiku@0.1.2
130         iana-time-zone@0.1.58
131         idna@0.3.0
132         idna@0.5.0
133         image@0.24.7
134         indexmap@2.1.0
135         instant@0.1.12
136         io-lifetimes@1.0.11
137         is-terminal@0.4.9
138         isahc@1.7.2
139         itertools@0.11.0
140         itoa@1.0.10
141         js-sys@0.3.66
142         lazy_static@1.4.0
143         libadwaita-sys@0.5.3
144         libadwaita@0.5.3
145         libc@0.2.151
146         libnghttp2-sys@0.1.8+1.55.1
147         libz-sys@1.1.12
148         linux-raw-sys@0.3.8
149         linux-raw-sys@0.4.12
150         locale_config@0.3.0
151         log@0.4.20
152         malloc_buf@0.0.6
153         memchr@2.6.4
154         memoffset@0.7.1
155         memoffset@0.9.0
156         mime@0.3.17
157         miniz_oxide@0.7.1
158         mpris-server@0.6.0
159         muldiv@1.0.1
160         nix@0.26.4
161         num-integer@0.1.45
162         num-rational@0.4.1
163         num-traits@0.2.17
164         objc-foundation@0.1.1
165         objc@0.2.7
166         objc_id@0.1.1
167         once_cell@1.18.0
168         openssl-macros@0.1.1
169         openssl-probe@0.1.5
170         openssl-sys@0.9.97
171         openssl@0.10.61
172         option-operations@0.5.0
173         ordered-stream@0.2.0
174         pango-sys@0.18.0
175         pango@0.18.3
176         parking@2.2.0
177         paste@1.0.14
178         percent-encoding@2.3.1
179         pin-project-internal@1.1.3
180         pin-project-lite@0.2.13
181         pin-project@1.1.3
182         pin-utils@0.1.0
183         piper@0.2.1
184         pkg-config@0.3.27
185         png@0.17.10
186         polling@2.8.0
187         polling@3.3.1
188         powerfmt@0.2.0
189         ppv-lite86@0.2.17
190         pretty-hex@0.3.0
191         proc-macro-crate@1.3.1
192         proc-macro-crate@2.0.1
193         proc-macro-error-attr@1.0.4
194         proc-macro-error@1.0.4
195         proc-macro2@1.0.70
196         psl-types@2.0.11
197         publicsuffix@2.2.3
198         qrcode-generator@4.1.9
199         qrcodegen@1.8.0
200         quote@1.0.33
201         rand@0.8.5
202         rand_chacha@0.3.1
203         rand_core@0.6.4
204         redox_syscall@0.4.1
205         regex-automata@0.4.3
206         regex-syntax@0.8.2
207         regex@1.10.2
208         rustc_version@0.4.0
209         rustix@0.37.27
210         rustix@0.38.28
211         ryu@1.0.16
212         schannel@0.1.22
213         semver@1.0.20
214         serde@1.0.193
215         serde_derive@1.0.193
216         serde_json@1.0.108
217         serde_repr@0.1.17
218         serde_spanned@0.6.4
219         sha1@0.10.6
220         signal-hook-registry@1.4.1
221         simd-adler32@0.3.7
222         slab@0.4.9
223         sluice@0.5.5
224         smallvec@1.11.2
225         socket2@0.4.10
226         static_assertions@1.1.0
227         syn@1.0.109
228         syn@2.0.40
229         system-deps@6.2.0
230         target-lexicon@0.12.12
231         temp-dir@0.1.11
232         tempfile@3.8.1
233         termcolor@1.4.0
234         thiserror-impl@1.0.50
235         thiserror@1.0.50
236         time-core@0.1.2
237         time-macros@0.2.15
238         time@0.3.30
239         tinyvec@1.6.0
240         tinyvec_macros@0.1.1
241         toml@0.8.2
242         toml_datetime@0.6.3
243         toml_edit@0.19.15
244         toml_edit@0.20.2
245         tracing-attributes@0.1.27
246         tracing-core@0.1.32
247         tracing-futures@0.2.5
248         tracing@0.1.40
249         typenum@1.17.0
250         uds_windows@1.0.2
251         unicode-bidi@0.3.14
252         unicode-ident@1.0.12
253         unicode-normalization@0.1.22
254         url@2.5.0
255         urlqstring@0.3.5
256         utf8-width@0.1.7
257         vcpkg@0.2.15
258         version-compare@0.1.1
259         version_check@0.9.4
260         waker-fn@1.1.1
261         wasi@0.11.0+wasi-snapshot-preview1
262         wasm-bindgen-backend@0.2.89
263         wasm-bindgen-macro-support@0.2.89
264         wasm-bindgen-macro@0.2.89
265         wasm-bindgen-shared@0.2.89
266         wasm-bindgen@0.2.89
267         winapi-i686-pc-windows-gnu@0.4.0
268         winapi-util@0.1.6
269         winapi-x86_64-pc-windows-gnu@0.4.0
270         winapi@0.3.9
271         windows-core@0.51.1
272         windows-sys@0.48.0
273         windows-sys@0.52.0
274         windows-targets@0.48.5
275         windows-targets@0.52.0
276         windows_aarch64_gnullvm@0.48.5
277         windows_aarch64_gnullvm@0.52.0
278         windows_aarch64_msvc@0.48.5
279         windows_aarch64_msvc@0.52.0
280         windows_i686_gnu@0.48.5
281         windows_i686_gnu@0.52.0
282         windows_i686_msvc@0.48.5
283         windows_i686_msvc@0.52.0
284         windows_x86_64_gnu@0.48.5
285         windows_x86_64_gnu@0.52.0
286         windows_x86_64_gnullvm@0.48.5
287         windows_x86_64_gnullvm@0.52.0
288         windows_x86_64_msvc@0.48.5
289         windows_x86_64_msvc@0.52.0
290         winnow@0.5.28
291         xdg-home@1.0.0
292         zbus@3.14.1
293         zbus_macros@3.14.1
294         zbus_names@2.6.0
295         zvariant@3.15.0
296         zvariant_derive@3.15.0
297         zvariant_utils@1.0.1
300 NCM_API_TAG='1.3.0'
301 NCM_API_COMMIT='ac6b43d8dcdf2454b4538ac508ecf1df043896ad'
302 declare -A GIT_CRATES=(
303         [netease-cloud-music-api]="https://github.com/gmg137/netease-cloud-music-api;${NCM_API_COMMIT};netease-cloud-music-api-%commit%"
306 CARGO_OPTIONAL=1
307 inherit cargo gnome2-utils meson optfeature xdg
309 DESCRIPTION="netease cloud music player based on Rust & GTK for Linux"
310 HOMEPAGE="https://github.com/gmg137/netease-cloud-music-gtk"
312 if [[ ${PV} == *_p* ]]; then
313         P_COMMIT=""
314         SRC_URI="https://github.com/gmg137/netease-cloud-music-gtk/archive/${P_COMMIT}.tar.gz -> ${P}.tar.gz"
315         S="${WORKDIR}/${PN}-${P_COMMIT}"
316 else
317         SRC_URI="https://github.com/gmg137/netease-cloud-music-gtk/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
320 SRC_URI+=" ${CARGO_CRATE_URIS} "
322 LICENSE="GPL-3"
323 # Dependent crate licenses
324 LICENSE+="
325         Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD GPL-3+ MIT
326         Unicode-DFS-2016
328 SLOT="0"
329 KEYWORDS="~amd64"
330 RESTRICT="mirror"
332 DEPEND="
333         dev-libs/glib:2
334         dev-libs/openssl:*
335         media-libs/gst-plugins-bad:1.0
336         media-libs/gst-plugins-base:1.0
337         media-libs/gst-plugins-good
338         media-libs/gst-plugins-ugly
339         media-libs/gstreamer:1.0
340         media-plugins/gst-plugins-libav
341         media-plugins/gst-plugins-soup
342         sys-apps/dbus
343         sys-libs/zlib
344         x11-libs/cairo
345         x11-libs/gdk-pixbuf:2
346         gui-libs/gtk:4
347         gui-libs/libadwaita:1
348         x11-libs/pango
350 RDEPEND="
351         ${DEPEND}
353 BDEPEND="virtual/rust"
355 src_unpack() {
356         cargo_src_unpack
359 src_prepare() {
360         # cargo will try to update crates online despite
361         # cargo_gen_config set [patch] table in cargo config
362         # modify Cargo.toml with unpacked git crate (ncm-api)
363         local ncm_api_git="git = \"https://github.com/gmg137/netease-cloud-music-api.git\", tag = \"${NCM_API_TAG}\""
364         local ncm_api_path="path = \"${WORKDIR}/netease-cloud-music-api-${NCM_API_COMMIT}\""
366         sed -i -E "s#${ncm_api_git}#${ncm_api_path}#g" "${S}/Cargo.toml" || die "ncm-api workaround failed"
368         default
371 src_configure() {
372         local emesonargs=(
373                 -Dlocaledir=share/locale
374                 -Ddatadir=share
375         )
376         use debug || EMESON_BUILDTYPE=release
377         meson_src_configure
380 pkg_postinst() {
381         optfeature "osdlyrics integration" media-plugins/osdlyrics
383         xdg_pkg_postinst
384         gnome2_schemas_update
385         gnome2_gdk_pixbuf_update
386         gnome2_giomodule_cache_update
389 pkg_postrm() {
390         xdg_pkg_postrm
391         gnome2_schemas_update
392         gnome2_giomodule_cache_update