*/*: bump feeluown (#4757)
[gentoo-zh.git] / media-sound / netease-cloud-music-gtk / netease-cloud-music-gtk-2.3.1.ebuild
blob9973b57bafa43eb00f8054d1fcdc13742e9017ff
1 # Copyright 2023-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         adler@1.0.2
10         aho-corasick@1.1.2
11         android-tzdata@0.1.1
12         android_system_properties@0.1.5
13         anstream@0.6.13
14         anstyle-parse@0.2.3
15         anstyle-query@1.0.2
16         anstyle-wincon@3.0.2
17         anstyle@1.0.6
18         anyhow@1.0.80
19         async-broadcast@0.5.1
20         async-channel@1.9.0
21         async-channel@2.2.0
22         async-executor@1.8.0
23         async-fs@1.6.0
24         async-io@1.13.0
25         async-io@2.3.1
26         async-lock@2.8.0
27         async-lock@3.3.0
28         async-process@1.8.1
29         async-recursion@1.0.5
30         async-signal@0.2.5
31         async-task@4.7.0
32         async-trait@0.1.77
33         atomic-waker@1.1.2
34         atomic_refcell@0.1.13
35         autocfg@1.1.0
36         base64@0.22.0
37         bitflags@1.3.2
38         bitflags@2.4.2
39         block-buffer@0.10.4
40         block@0.1.6
41         blocking@1.5.1
42         bumpalo@3.15.3
43         bytemuck@1.14.3
44         byteorder@1.5.0
45         bytes@1.5.0
46         cairo-rs@0.19.2
47         cairo-sys-rs@0.19.2
48         castaway@0.1.2
49         cc@1.0.89
50         cfg-expr@0.15.7
51         cfg-if@1.0.0
52         chrono@0.4.34
53         color_quant@1.1.0
54         colorchoice@1.0.0
55         concurrent-queue@2.4.0
56         cookie@0.18.0
57         cookie_store@0.21.0
58         core-foundation-sys@0.8.6
59         cpufeatures@0.2.12
60         crc32fast@1.4.0
61         crossbeam-utils@0.8.19
62         crypto-common@0.1.6
63         curl-sys@0.4.72+curl-8.6.0
64         curl@0.4.46
65         deranged@0.3.11
66         derivative@2.2.0
67         digest@0.10.7
68         either@1.10.0
69         encoding_rs@0.8.33
70         enumflags2@0.7.9
71         enumflags2_derive@0.7.9
72         env_filter@0.1.0
73         env_logger@0.11.2
74         equivalent@1.0.1
75         errno@0.3.8
76         event-listener-strategy@0.4.0
77         event-listener-strategy@0.5.0
78         event-listener@2.5.3
79         event-listener@3.1.0
80         event-listener@4.0.3
81         event-listener@5.2.0
82         fastrand@1.9.0
83         fastrand@2.0.1
84         fdeflate@0.3.4
85         field-offset@0.3.6
86         flate2@1.0.28
87         fnv@1.0.7
88         foreign-types-shared@0.1.1
89         foreign-types@0.3.2
90         form_urlencoded@1.2.1
91         futures-channel@0.3.30
92         futures-core@0.3.30
93         futures-executor@0.3.30
94         futures-io@0.3.30
95         futures-lite@1.13.0
96         futures-lite@2.2.0
97         futures-macro@0.3.30
98         futures-sink@0.3.30
99         futures-task@0.3.30
100         futures-util@0.3.30
101         gdk-pixbuf-sys@0.19.0
102         gdk-pixbuf@0.19.2
103         gdk4-sys@0.8.0
104         gdk4@0.8.0
105         generic-array@0.14.7
106         getrandom@0.2.12
107         gettext-rs@0.7.0
108         gettext-sys@0.21.3
109         gio-sys@0.19.0
110         gio@0.19.2
111         glib-macros@0.19.2
112         glib-sys@0.19.0
113         glib@0.19.2
114         gobject-sys@0.19.0
115         graphene-rs@0.19.2
116         graphene-sys@0.19.0
117         gsk4-sys@0.8.0
118         gsk4@0.8.0
119         gstreamer-base-sys@0.22.0
120         gstreamer-base@0.22.0
121         gstreamer-play-sys@0.22.0
122         gstreamer-play@0.22.0
123         gstreamer-sys@0.22.2
124         gstreamer-video-sys@0.22.1
125         gstreamer-video@0.22.1
126         gstreamer@0.22.2
127         gtk4-macros@0.8.0
128         gtk4-sys@0.8.0
129         gtk4@0.8.0
130         hashbrown@0.14.3
131         heck@0.4.1
132         hermit-abi@0.3.9
133         hex@0.4.3
134         html-escape@0.2.13
135         http@0.2.11
136         httpdate@1.0.3
137         humantime@2.1.0
138         iana-time-zone-haiku@0.1.2
139         iana-time-zone@0.1.60
140         idna@0.3.0
141         idna@0.5.0
142         image@0.24.9
143         indexmap@2.2.5
144         instant@0.1.12
145         io-lifetimes@1.0.11
146         isahc@1.7.2
147         itertools@0.12.1
148         itoa@1.0.10
149         js-sys@0.3.68
150         lazy_static@1.4.0
151         libadwaita-sys@0.6.0
152         libadwaita@0.6.0
153         libc@0.2.153
154         libnghttp2-sys@0.1.9+1.58.0
155         libz-sys@1.1.15
156         linux-raw-sys@0.3.8
157         linux-raw-sys@0.4.13
158         locale_config@0.3.0
159         log@0.4.21
160         malloc_buf@0.0.6
161         memchr@2.7.1
162         memoffset@0.7.1
163         memoffset@0.9.0
164         mime@0.3.17
165         miniz_oxide@0.7.2
166         mpris-server@0.7.0
167         muldiv@1.0.1
168         nix@0.26.4
169         num-conv@0.1.0
170         num-integer@0.1.46
171         num-rational@0.4.1
172         num-traits@0.2.18
173         objc-foundation@0.1.1
174         objc@0.2.7
175         objc_id@0.1.1
176         once_cell@1.19.0
177         openssl-macros@0.1.1
178         openssl-probe@0.1.5
179         openssl-sys@0.9.101
180         openssl@0.10.64
181         option-operations@0.5.0
182         ordered-stream@0.2.0
183         pango-sys@0.19.0
184         pango@0.19.2
185         parking@2.2.0
186         paste@1.0.14
187         percent-encoding@2.3.1
188         pin-project-internal@1.1.4
189         pin-project-lite@0.2.13
190         pin-project@1.1.4
191         pin-utils@0.1.0
192         piper@0.2.1
193         pkg-config@0.3.30
194         png@0.17.13
195         polling@2.8.0
196         polling@3.5.0
197         powerfmt@0.2.0
198         ppv-lite86@0.2.17
199         proc-macro-crate@1.3.1
200         proc-macro-crate@3.1.0
201         proc-macro-error-attr@1.0.4
202         proc-macro-error@1.0.4
203         proc-macro2@1.0.78
204         psl-types@2.0.11
205         publicsuffix@2.2.3
206         qrcode-generator@4.1.9
207         qrcodegen@1.8.0
208         quote@1.0.35
209         rand@0.8.5
210         rand_chacha@0.3.1
211         rand_core@0.6.4
212         regex-automata@0.4.6
213         regex-syntax@0.8.2
214         regex@1.10.3
215         rustc_version@0.4.0
216         rustix@0.37.27
217         rustix@0.38.31
218         ryu@1.0.17
219         schannel@0.1.23
220         semver@1.0.22
221         serde@1.0.197
222         serde_derive@1.0.197
223         serde_json@1.0.114
224         serde_repr@0.1.18
225         serde_spanned@0.6.5
226         sha1@0.10.6
227         signal-hook-registry@1.4.1
228         simd-adler32@0.3.7
229         slab@0.4.9
230         sluice@0.5.5
231         smallvec@1.13.1
232         socket2@0.4.10
233         socket2@0.5.6
234         static_assertions@1.1.0
235         syn@1.0.109
236         syn@2.0.52
237         system-deps@6.2.0
238         target-lexicon@0.12.14
239         temp-dir@0.1.12
240         tempfile@3.10.1
241         thiserror-impl@1.0.57
242         thiserror@1.0.57
243         time-core@0.1.2
244         time-macros@0.2.17
245         time@0.3.34
246         tinyvec@1.6.0
247         tinyvec_macros@0.1.1
248         toml@0.8.10
249         toml_datetime@0.6.5
250         toml_edit@0.19.15
251         toml_edit@0.21.1
252         toml_edit@0.22.6
253         tracing-attributes@0.1.27
254         tracing-core@0.1.32
255         tracing-futures@0.2.5
256         tracing@0.1.40
257         typenum@1.17.0
258         uds_windows@1.1.0
259         unicode-bidi@0.3.15
260         unicode-ident@1.0.12
261         unicode-normalization@0.1.23
262         url@2.5.0
263         urlqstring@0.3.5
264         utf8-width@0.1.7
265         utf8parse@0.2.1
266         vcpkg@0.2.15
267         version-compare@0.1.1
268         version_check@0.9.4
269         waker-fn@1.1.1
270         wasi@0.11.0+wasi-snapshot-preview1
271         wasm-bindgen-backend@0.2.91
272         wasm-bindgen-macro-support@0.2.91
273         wasm-bindgen-macro@0.2.91
274         wasm-bindgen-shared@0.2.91
275         wasm-bindgen@0.2.91
276         winapi-i686-pc-windows-gnu@0.4.0
277         winapi-x86_64-pc-windows-gnu@0.4.0
278         winapi@0.3.9
279         windows-core@0.52.0
280         windows-sys@0.48.0
281         windows-sys@0.52.0
282         windows-targets@0.48.5
283         windows-targets@0.52.4
284         windows_aarch64_gnullvm@0.48.5
285         windows_aarch64_gnullvm@0.52.4
286         windows_aarch64_msvc@0.48.5
287         windows_aarch64_msvc@0.52.4
288         windows_i686_gnu@0.48.5
289         windows_i686_gnu@0.52.4
290         windows_i686_msvc@0.48.5
291         windows_i686_msvc@0.52.4
292         windows_x86_64_gnu@0.48.5
293         windows_x86_64_gnu@0.52.4
294         windows_x86_64_gnullvm@0.48.5
295         windows_x86_64_gnullvm@0.52.4
296         windows_x86_64_msvc@0.48.5
297         windows_x86_64_msvc@0.52.4
298         winnow@0.5.40
299         winnow@0.6.5
300         xdg-home@1.1.0
301         zbus@3.15.2
302         zbus_macros@3.15.2
303         zbus_names@2.6.1
304         zvariant@3.15.2
305         zvariant_derive@3.15.2
306         zvariant_utils@1.0.1
309 NCM_API_TAG='1.3.1'
310 NCM_API_COMMIT='fa13ca1fb89a97fff0bab58493ec353e4200ecd2'
311 declare -A GIT_CRATES=(
312         [netease-cloud-music-api]="https://github.com/gmg137/netease-cloud-music-api;${NCM_API_COMMIT};netease-cloud-music-api-%commit%"
315 CARGO_OPTIONAL=1
316 inherit cargo gnome2-utils meson optfeature xdg
318 DESCRIPTION="netease cloud music player based on Rust & GTK for Linux"
319 HOMEPAGE="https://github.com/gmg137/netease-cloud-music-gtk"
321 SRC_URI="
322         https://github.com/gmg137/netease-cloud-music-gtk/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
323         ${CARGO_CRATE_URIS}
326 LICENSE="GPL-3"
327 # Dependent crate licenses
328 LICENSE+="
329         Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD GPL-3+ MIT
330         Unicode-DFS-2016
332 SLOT="0"
333 KEYWORDS="~amd64"
334 RESTRICT="mirror"
336 DEPEND="
337         dev-libs/glib:2
338         dev-libs/openssl:*
339         media-libs/gst-plugins-bad:1.0
340         media-libs/gst-plugins-base:1.0
341         media-libs/gst-plugins-good
342         media-libs/gst-plugins-ugly
343         media-libs/gstreamer:1.0
344         media-plugins/gst-plugins-libav
345         media-plugins/gst-plugins-soup
346         sys-apps/dbus
347         sys-libs/zlib
348         x11-libs/cairo
349         x11-libs/gdk-pixbuf:2
350         gui-libs/gtk:4
351         gui-libs/libadwaita:1
352         x11-libs/pango
354 RDEPEND="${DEPEND}"
355 BDEPEND="virtual/rust"
357 src_unpack() {
358         cargo_src_unpack
361 src_prepare() {
362         # cargo will try to update crates online despite
363         # cargo_gen_config set [patch] table in cargo config
364         # modify Cargo.toml with unpacked git crate (ncm-api)
365         #local ncm_api_git="git = \"https://github.com/gmg137/netease-cloud-music-api.git\", tag = \"${NCM_API_TAG}\""
366         local ncm_api_git="git = \"https://gitee.com/gmg137/netease-cloud-music-api.git\", tag = \"${NCM_API_TAG}\""
367         local ncm_api_path="path = \"${WORKDIR}/netease-cloud-music-api-${NCM_API_COMMIT}\""
369         sed -i -E "s#${ncm_api_git}#${ncm_api_path}#g" "${S}/Cargo.toml" || die "ncm-api workaround failed"
371         default
374 src_configure() {
375         local emesonargs=(
376                 -Dlocaledir=share/locale
377                 -Ddatadir=share
378         )
379         use debug || EMESON_BUILDTYPE=release
380         meson_src_configure
383 pkg_postinst() {
384         optfeature "osdlyrics integration" media-plugins/osdlyrics
386         xdg_pkg_postinst
387         gnome2_schemas_update
388         gnome2_gdk_pixbuf_update
389         gnome2_giomodule_cache_update
392 pkg_postrm() {
393         xdg_pkg_postrm
394         gnome2_schemas_update
395         gnome2_giomodule_cache_update