net-misc/alist: add 3.42.0, drop 3.41.0
[gentoo-zh.git] / net-proxy / shadowsocks-rust / shadowsocks-rust-1.21.2.ebuild
blob4d1cfe08c23b7e0b4649d2fdc2c03ac858a0d354
1 # Copyright 2022-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 # Autogenerated by pycargoebuild 0.13.3
6 EAPI=8
7 CRATES="
8         addr2line@0.24.2
9         adler2@2.0.0
10         aead@0.5.2
11         aes-gcm-siv@0.11.1
12         aes-gcm@0.10.3
13         aes@0.8.4
14         ahash@0.8.11
15         aho-corasick@1.1.3
16         alloc-no-stdlib@2.0.4
17         alloc-stdlib@0.2.2
18         android-tzdata@0.1.1
19         android_system_properties@0.1.5
20         anstream@0.6.15
21         anstyle-parse@0.2.5
22         anstyle-query@1.1.1
23         anstyle-wincon@3.0.4
24         anstyle@1.0.8
25         anyhow@1.0.91
26         arc-swap@1.7.1
27         arrayref@0.3.9
28         arrayvec@0.7.6
29         async-channel@2.3.1
30         async-task@4.7.1
31         async-trait@0.1.83
32         atomic-waker@1.1.2
33         autocfg@1.4.0
34         backtrace@0.3.74
35         base16ct@0.2.0
36         base64@0.13.1
37         base64@0.21.7
38         base64@0.22.1
39         base64ct@1.6.0
40         bit-vec@0.7.0
41         bitflags@1.3.2
42         bitflags@2.6.0
43         bitvec@1.0.1
44         blake3@1.5.4
45         block-buffer@0.10.4
46         blocking@1.6.1
47         bloomfilter@1.0.14
48         brotli-decompressor@4.0.1
49         brotli@7.0.0
50         bson@2.13.0
51         build-time@0.1.3
52         bumpalo@3.16.0
53         byte_string@1.0.0
54         byteorder@1.5.0
55         bytes@1.8.0
56         c2rust-bitfields-derive@0.19.0
57         c2rust-bitfields@0.19.0
58         camellia@0.1.0
59         cc@1.1.31
60         ccm@0.5.0
61         cfg-if@1.0.0
62         cfg_aliases@0.2.1
63         chacha20@0.9.1
64         chacha20poly1305@0.10.1
65         chrono@0.4.38
66         cipher@0.4.4
67         clap@4.5.20
68         clap_builder@4.5.20
69         clap_lex@0.7.2
70         cmake@0.1.51
71         colorchoice@1.0.2
72         concurrent-queue@2.5.0
73         const-oid@0.9.6
74         constant_time_eq@0.3.1
75         core-foundation-sys@0.8.7
76         core-foundation@0.9.4
77         cpufeatures@0.2.14
78         crc32fast@1.4.2
79         crossbeam-channel@0.5.13
80         crossbeam-epoch@0.9.18
81         crossbeam-utils@0.8.20
82         crypto-bigint@0.5.5
83         crypto-common@0.1.6
84         ctr@0.9.2
85         daemonize@0.5.0
86         data-encoding@2.6.0
87         defmt-macros@0.3.9
88         defmt-parser@0.3.4
89         defmt@0.3.8
90         der@0.7.9
91         deranged@0.3.11
92         derivative@2.2.0
93         destructure_traitobject@0.2.0
94         digest@0.10.7
95         directories@5.0.1
96         dirs-sys@0.4.1
97         displaydoc@0.2.5
98         ecdsa@0.16.9
99         ed25519@2.2.3
100         elliptic-curve@0.13.8
101         encoding_rs@0.8.35
102         enum-as-inner@0.6.1
103         env_filter@0.1.2
104         env_logger@0.11.5
105         equivalent@1.0.1
106         errno@0.3.9
107         etherparse@0.16.0
108         event-listener-strategy@0.5.2
109         event-listener@5.3.1
110         fastrand@1.9.0
111         fastrand@2.1.1
112         ff@0.13.0
113         filetime@0.2.25
114         flate2@1.0.34
115         fnv@1.0.7
116         foreign-types-shared@0.1.1
117         foreign-types@0.3.2
118         form_urlencoded@1.2.1
119         fs2@0.4.3
120         fsevent-sys@4.1.0
121         funty@2.0.0
122         futures-channel@0.3.31
123         futures-core@0.3.31
124         futures-executor@0.3.31
125         futures-io@0.3.31
126         futures-lite@2.3.0
127         futures-macro@0.3.31
128         futures-sink@0.3.31
129         futures-task@0.3.31
130         futures-util@0.3.31
131         futures@0.3.31
132         fxhash@0.2.1
133         generic-array@0.14.7
134         getrandom@0.2.15
135         ghash@0.5.1
136         gimli@0.31.1
137         group@0.13.0
138         h2@0.3.26
139         h2@0.4.6
140         h3-quinn@0.0.3
141         h3@0.0.2
142         hash32@0.3.1
143         hashbrown@0.15.0
144         heapless@0.8.0
145         heck@0.5.0
146         hermit-abi@0.3.9
147         hex@0.4.3
148         hickory-proto@0.24.1
149         hickory-resolver@0.24.1
150         hkdf@0.12.4
151         hmac@0.12.1
152         hostname@0.3.1
153         http-body-util@0.1.2
154         http-body@1.0.1
155         http@0.2.12
156         http@1.1.0
157         httparse@1.9.5
158         httpdate@1.0.3
159         humantime@2.1.0
160         hyper-rustls@0.27.3
161         hyper-tls@0.6.0
162         hyper-util@0.1.9
163         hyper@1.5.0
164         iana-time-zone-haiku@0.1.2
165         iana-time-zone@0.1.61
166         icu_collections@1.5.0
167         icu_locid@1.5.0
168         icu_locid_transform@1.5.0
169         icu_locid_transform_data@1.5.0
170         icu_normalizer@1.5.0
171         icu_normalizer_data@1.5.0
172         icu_properties@1.5.1
173         icu_properties_data@1.5.0
174         icu_provider@1.5.0
175         icu_provider_macros@1.5.0
176         idna@0.4.0
177         idna@0.5.0
178         idna@1.0.2
179         indexmap@2.6.0
180         inotify-sys@0.1.5
181         inotify@0.9.6
182         inout@0.1.3
183         instant@0.1.13
184         ipconfig@0.3.2
185         ipnet@2.10.1
186         iprange@0.6.7
187         is_terminal_polyfill@1.70.1
188         itoa@1.0.11
189         jemalloc-sys@0.5.4+5.3.0-patched
190         jemallocator@0.5.4
191         jobserver@0.1.32
192         js-sys@0.3.72
193         json5@0.4.1
194         kqueue-sys@1.0.4
195         kqueue@1.0.8
196         lazy_static@1.5.0
197         libc@0.2.161
198         libloading@0.8.5
199         libmimalloc-sys@0.1.39
200         libredox@0.1.3
201         linked-hash-map@0.5.6
202         linux-raw-sys@0.4.14
203         litemap@0.7.3
204         lock_api@0.4.12
205         log-mdc@0.1.0
206         log4rs@1.3.0
207         log@0.4.22
208         lru-cache@0.1.2
209         lru_time_cache@0.11.11
210         managed@0.8.0
211         match_cfg@0.1.0
212         matchers@0.1.0
213         md-5@0.10.6
214         memchr@2.7.4
215         mimalloc@0.1.43
216         mime@0.3.17
217         miniz_oxide@0.8.0
218         mio@0.8.11
219         mio@1.0.2
220         native-tls@0.2.12
221         nix@0.29.0
222         notify@6.1.1
223         nu-ansi-term@0.46.0
224         num-conv@0.1.0
225         num-traits@0.2.19
226         num_threads@0.1.7
227         object@0.36.5
228         once_cell@1.20.2
229         opaque-debug@0.3.1
230         openssl-macros@0.1.1
231         openssl-probe@0.1.5
232         openssl-src@300.4.0+3.4.0
233         openssl-sys@0.9.104
234         openssl@0.10.68
235         option-ext@0.2.0
236         ordered-float@2.10.1
237         overload@0.1.1
238         p256@0.13.2
239         p384@0.13.0
240         parking@2.2.1
241         parking_lot@0.11.2
242         parking_lot@0.12.3
243         parking_lot_core@0.8.6
244         parking_lot_core@0.9.10
245         percent-encoding@2.3.1
246         pest@2.7.14
247         pest_derive@2.7.14
248         pest_generator@2.7.14
249         pest_meta@2.7.14
250         pin-project-internal@1.1.7
251         pin-project-lite@0.2.15
252         pin-project@1.1.7
253         pin-utils@0.1.0
254         piper@0.2.4
255         pkcs8@0.10.2
256         pkg-config@0.3.31
257         poly1305@0.8.0
258         polyval@0.6.2
259         powerfmt@0.2.0
260         ppv-lite86@0.2.20
261         primeorder@0.13.6
262         proc-macro-error-attr@1.0.4
263         proc-macro-error@1.0.4
264         proc-macro2@1.0.89
265         qrcode@0.14.1
266         quick-error@1.2.3
267         quinn-proto@0.10.6
268         quinn-proto@0.11.8
269         quinn-udp@0.4.1
270         quinn-udp@0.5.5
271         quinn@0.10.2
272         quinn@0.11.5
273         quote@1.0.37
274         radium@0.7.0
275         rand@0.8.5
276         rand_chacha@0.3.1
277         rand_core@0.6.4
278         redox_syscall@0.2.16
279         redox_syscall@0.5.7
280         redox_users@0.4.6
281         regex-automata@0.1.10
282         regex-automata@0.4.8
283         regex-syntax@0.6.29
284         regex-syntax@0.8.5
285         regex@1.11.1
286         reqwest@0.12.8
287         resolv-conf@0.7.0
288         ring-compat@0.8.0
289         ring@0.16.20
290         ring@0.17.8
291         rpassword@7.3.1
292         rpmalloc-sys@0.2.3+b097fd0
293         rpmalloc@0.2.2
294         rtoolbox@0.0.2
295         rustc-demangle@0.1.24
296         rustc-hash@1.1.0
297         rustc-hash@2.0.0
298         rustix@0.38.37
299         rustls-native-certs@0.6.3
300         rustls-native-certs@0.8.0
301         rustls-pemfile@1.0.4
302         rustls-pemfile@2.2.0
303         rustls-pki-types@1.10.0
304         rustls-webpki@0.101.7
305         rustls-webpki@0.102.8
306         rustls@0.21.12
307         rustls@0.23.15
308         ryu@1.0.18
309         same-file@1.0.6
310         schannel@0.1.26
311         scopeguard@1.2.0
312         sct@0.7.1
313         sec1@0.7.3
314         security-framework-sys@2.12.0
315         security-framework@2.11.1
316         sendfd@0.4.3
317         serde-value@0.7.0
318         serde@1.0.213
319         serde_bytes@0.11.15
320         serde_derive@1.0.213
321         serde_json@1.0.132
322         serde_urlencoded@0.7.1
323         serde_yaml@0.9.34+deprecated
324         sha1@0.10.6
325         sha2@0.10.8
326         shadowsocks-crypto@0.5.5
327         sharded-slab@0.1.7
328         shlex@1.3.0
329         signal-hook-registry@1.4.2
330         signature@2.2.0
331         siphasher@1.0.1
332         slab@0.4.9
333         sled@0.34.7
334         sm4@0.5.1
335         smallvec@1.13.2
336         smoltcp@0.11.0
337         snmalloc-rs@0.3.6
338         snmalloc-sys@0.3.6
339         socket2@0.5.7
340         spin@0.5.2
341         spin@0.9.8
342         spki@0.7.3
343         stable_deref_trait@1.2.0
344         strsim@0.11.1
345         subtle@2.6.1
346         syn@1.0.109
347         syn@2.0.85
348         sync_wrapper@1.0.1
349         synstructure@0.13.1
350         sysexits@0.8.2
351         system-configuration-sys@0.6.0
352         system-configuration@0.6.1
353         tap@1.0.1
354         tcmalloc-sys@0.3.0
355         tcmalloc@0.3.0
356         tempfile@3.13.0
357         terminal_size@0.4.0
358         thiserror-impl@1.0.65
359         thiserror@1.0.65
360         thread-id@4.2.2
361         thread_local@1.1.8
362         time-core@0.1.2
363         time-macros@0.2.18
364         time@0.3.36
365         tinystr@0.7.6
366         tinyvec@1.8.0
367         tinyvec_macros@0.1.1
368         tokio-macros@2.4.0
369         tokio-native-tls@0.3.1
370         tokio-rustls@0.24.1
371         tokio-rustls@0.26.0
372         tokio-tfo@0.3.1
373         tokio-util@0.7.12
374         tokio@1.41.0
375         tower-service@0.3.3
376         tracing-attributes@0.1.27
377         tracing-core@0.1.32
378         tracing-log@0.2.0
379         tracing-subscriber@0.3.18
380         tracing@0.1.40
381         try-lock@0.2.5
382         tun2@3.1.8
383         typemap-ors@1.0.0
384         typenum@1.17.0
385         ucd-trie@0.1.7
386         unicode-bidi@0.3.17
387         unicode-ident@1.0.13
388         unicode-normalization@0.1.24
389         universal-hash@0.5.1
390         unsafe-any-ors@1.0.0
391         unsafe-libyaml@0.2.11
392         untrusted@0.7.1
393         untrusted@0.9.0
394         url@2.5.2
395         utf16_iter@1.0.5
396         utf8_iter@1.0.4
397         utf8parse@0.2.2
398         uuid@1.11.0
399         valuable@0.1.0
400         vcpkg@0.2.15
401         version_check@0.9.5
402         walkdir@2.5.0
403         want@0.3.1
404         wasi@0.11.0+wasi-snapshot-preview1
405         wasm-bindgen-backend@0.2.95
406         wasm-bindgen-futures@0.4.45
407         wasm-bindgen-macro-support@0.2.95
408         wasm-bindgen-macro@0.2.95
409         wasm-bindgen-shared@0.2.95
410         wasm-bindgen@0.2.95
411         web-sys@0.3.72
412         webpki-roots@0.25.4
413         webpki-roots@0.26.6
414         widestring@1.1.0
415         winapi-i686-pc-windows-gnu@0.4.0
416         winapi-util@0.1.9
417         winapi-x86_64-pc-windows-gnu@0.4.0
418         winapi@0.3.9
419         windows-core@0.52.0
420         windows-registry@0.2.0
421         windows-result@0.2.0
422         windows-service@0.7.0
423         windows-strings@0.1.0
424         windows-sys@0.48.0
425         windows-sys@0.52.0
426         windows-sys@0.59.0
427         windows-targets@0.48.5
428         windows-targets@0.52.6
429         windows_aarch64_gnullvm@0.48.5
430         windows_aarch64_gnullvm@0.52.6
431         windows_aarch64_msvc@0.48.5
432         windows_aarch64_msvc@0.52.6
433         windows_i686_gnu@0.48.5
434         windows_i686_gnu@0.52.6
435         windows_i686_gnullvm@0.52.6
436         windows_i686_msvc@0.48.5
437         windows_i686_msvc@0.52.6
438         windows_x86_64_gnu@0.48.5
439         windows_x86_64_gnu@0.52.6
440         windows_x86_64_gnullvm@0.48.5
441         windows_x86_64_gnullvm@0.52.6
442         windows_x86_64_msvc@0.48.5
443         windows_x86_64_msvc@0.52.6
444         winreg@0.50.0
445         wintun-bindings@0.7.16
446         write16@1.0.0
447         writeable@0.5.5
448         wyz@0.5.1
449         xdg@2.5.2
450         yoke-derive@0.7.4
451         yoke@0.7.4
452         zerocopy-derive@0.7.35
453         zerocopy@0.7.35
454         zerofrom-derive@0.1.4
455         zerofrom@0.1.4
456         zeroize@1.8.1
457         zerovec-derive@0.10.3
458         zerovec@0.10.4
459         zstd-safe@7.2.1
460         zstd-sys@2.0.13+zstd.1.5.6
461         zstd@0.13.2
464 inherit cargo linux-info systemd
466 MY_PV=${PV/_alpha/-alpha.}
468 DESCRIPTION="shadowsocks is a fast tunnel proxy that helps you bypass firewalls."
469 HOMEPAGE="https://github.com/shadowsocks/shadowsocks-rust"
470 SRC_URI="https://github.com/shadowsocks/shadowsocks-rust/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz
471         ${CARGO_CRATE_URIS}"
473 S="${WORKDIR}/${PN}-${MY_PV}"
475 LICENSE="MIT"
476 # Dependent crate licenses
477 LICENSE+="
478         0BSD Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MPL-2.0 Unicode-3.0
479         Unicode-DFS-2016 WTFPL-2
481 SLOT="0"
482 KEYWORDS="~amd64 ~arm64"
483 IUSE="redir tun"
485 QA_FLAGS_IGNORED="
486         usr/bin/sslocal
487         usr/bin/ssmanager
488         usr/bin/ssurl
489         usr/bin/ssservice
490         usr/bin/ssserver
493 pkg_setup() {
494         if use tun; then
495                 CONFIG_CHECK="~TUN"
496                 linux-info_pkg_setup
497         fi
498         rust_pkg_setup
501 src_configure() {
502         local myfeatures=(
503                 $(usex redir local-redir "")
504                 $(usex tun local-tun "")
505         )
506         cargo_src_configure
509 src_install() {
510         cargo_src_install
512         newconfd "${FILESDIR}/shadowsocks-rust.confd" shadowsocks-rust
513         dosym shadowsocks-rust /etc/conf.d/shadowsocks-rust.server
514         dosym shadowsocks-rust /etc/conf.d/shadowsocks-rust.local
515         newinitd "${FILESDIR}/shadowsocks-rust.initd" shadowsocks-rust
516         dosym shadowsocks-rust /etc/init.d/shadowsocks-rust.server
517         dosym shadowsocks-rust /etc/init.d/shadowsocks-rust.local
519         systemd_newunit "${FILESDIR}/shadowsocks-rust_at.service" shadowsocks-rust@.service
520         systemd_newunit "${FILESDIR}/shadowsocks-rust-server_at.service" shadowsocks-rust-server@.service
522         insinto "/etc/${PN}"
523         doins examples/*.json
526 pkg_postinst() {
527         if has_version "<sys-apps/openrc-0.56[-caps]"; then
528                         einfo ""
529                         einfo "For OpenRC users using old version(<0.56):"
530                         einfo "Capabilities support for old version is needed."
531                         einfo "Enable it by set useflag [caps] for <sys-apps/openrc-0.56."
532                         einfo ""
533         fi