# Copyright 2017-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Auto-Generated by cargo-ebuild 0.3.1 EAPI=7 CRATES=" aes-0.3.2 aes-ctr-0.3.0 aes-soft-0.3.3 aesni-0.6.0 alga-0.9.3 alsa-0.2.2 alsa-sys-0.1.2 approx-0.3.2 arc-swap-0.4.7 atty-0.2.14 autocfg-0.1.7 autocfg-1.0.0 autocfg-1.0.1 base64-0.10.1 base64-0.9.3 bindgen-0.53.3 bindgen-0.56.0 bit-set-0.5.2 bit-vec-0.6.2 bit-vec-0.6.3 bitflags-0.7.0 bitflags-0.9.1 bitflags-1.2.1 block-buffer-0.7.3 block-cipher-trait-0.6.2 block-modes-0.3.3 block-padding-0.1.5 byte-tools-0.3.1 byteorder-1.3.4 byteorder-1.4.2 bytes-0.4.12 c_linked_list-1.1.1 cc-1.0.58 cc-1.0.66 cexpr-0.4.0 cfg-if-0.1.10 cfg-if-1.0.0 chrono-0.4.13 chrono-0.4.19 clang-sys-0.29.3 clang-sys-1.0.3 cloudabi-0.0.3 core-foundation-sys-0.5.1 coreaudio-rs-0.9.1 coreaudio-sys-0.2.5 coreaudio-sys-0.2.8 cpal-0.8.2 crossbeam-deque-0.7.3 crossbeam-epoch-0.8.2 crossbeam-queue-0.1.2 crossbeam-queue-0.2.3 crossbeam-utils-0.6.6 crossbeam-utils-0.7.2 crypto-mac-0.7.0 ctr-0.3.2 digest-0.8.1 dns-sd-0.1.3 env_logger-0.6.2 error-chain-0.12.2 error-chain-0.12.4 fake-simd-0.1.2 fnv-1.0.7 fuchsia-cprng-0.1.1 fuchsia-zircon-0.3.3 fuchsia-zircon-sys-0.3.3 futures-0.1.29 futures-0.1.30 futures-channel-0.3.5 futures-channel-0.3.12 futures-core-0.3.5 futures-core-0.3.12 futures-cpupool-0.1.8 futures-executor-0.3.5 futures-executor-0.3.12 futures-macro-0.3.5 futures-macro-0.3.12 futures-sink-0.3.5 futures-sink-0.3.12 futures-task-0.3.5 futures-task-0.3.12 futures-util-0.3.5 futures-util-0.3.12 gcc-0.3.55 generic-array-0.12.3 get_if_addrs-0.5.3 get_if_addrs-sys-0.1.1 getopts-0.2.21 getrandom-0.1.14 getrandom-0.1.16 getrandom-0.2.2 glib-0.9.3 glib-sys-0.9.1 glob-0.3.0 gobject-sys-0.9.1 gstreamer-0.15.7 gstreamer-app-0.15.6 gstreamer-app-sys-0.8.1 gstreamer-base-0.15.4 gstreamer-base-sys-0.8.1 gstreamer-sys-0.8.1 hermit-abi-0.1.15 hermit-abi-0.1.18 hex-0.3.2 hmac-0.7.1 hostname-0.3.1 httparse-1.3.4 humantime-1.3.0 hyper-0.11.27 hyper-proxy-0.4.1 idna-0.1.5 if-addrs-0.6.5 if-addrs-sys-0.3.2 iovec-0.1.4 itoa-0.4.6 itoa-0.4.7 jack-0.5.7 jack-sys-0.2.0 jack-sys-0.2.1 kernel32-sys-0.2.2 language-tags-0.2.2 lazy_static-1.4.0 lazycell-1.2.1 lazycell-1.3.0 lewton-0.9.4 libc-0.2.73 libc-0.2.83 libloading-0.4.3 libloading-0.5.2 libloading-0.6.7 libm-0.2.1 libmdns-0.2.6 libmdns-0.2.7 libpulse-sys-0.0.0 librespot-0.1.3 librespot-audio-0.1.3 librespot-connect-0.1.3 librespot-core-0.1.3 librespot-metadata-0.1.3 librespot-playback-0.1.3 librespot-protocol-0.1.3 librespot-tremor-0.1.0 linear-map-1.2.0 lock_api-0.3.4 log-0.3.9 log-0.4.11 log-0.4.14 match_cfg-0.1.0 matches-0.1.8 matrixmultiply-0.2.3 matrixmultiply-0.2.4 maybe-uninit-2.0.0 memchr-2.3.3 memchr-2.3.4 memoffset-0.5.5 memoffset-0.5.6 mime-0.3.16 mio-0.6.22 mio-0.6.23 mio-named-pipes-0.1.7 mio-uds-0.6.8 miow-0.2.1 miow-0.2.2 miow-0.3.5 miow-0.3.6 muldiv-0.2.1 multimap-0.8.1 multimap-0.8.2 nalgebra-0.18.1 net2-0.2.34 net2-0.2.37 nix-0.9.0 nom-5.1.2 num-0.1.42 num-bigint-0.2.6 num-complex-0.2.4 num-integer-0.1.43 num-integer-0.1.44 num-iter-0.1.41 num-iter-0.1.42 num-rational-0.2.4 num-traits-0.2.12 num-traits-0.2.14 num_cpus-1.13.0 ogg-0.7.0 ogg-0.7.1 ogg-sys-0.0.9 once_cell-1.4.0 once_cell-1.5.2 opaque-debug-0.2.3 parking_lot-0.9.0 parking_lot_core-0.6.2 paste-0.1.18 paste-impl-0.1.18 pbkdf2-0.3.0 peeking_take_while-0.1.2 percent-encoding-1.0.1 pin-project-0.4.22 pin-project-internal-0.4.22 pin-project-lite-0.2.4 pin-utils-0.1.0 pkg-config-0.3.18 pkg-config-0.3.19 portaudio-rs-0.3.2 portaudio-sys-0.1.1 ppv-lite86-0.2.8 ppv-lite86-0.2.10 proc-macro-hack-0.5.16 proc-macro-hack-0.5.19 proc-macro-nested-0.1.6 proc-macro-nested-0.1.7 proc-macro2-0.4.30 proc-macro2-1.0.16 proc-macro2-1.0.19 proc-macro2-1.0.24 protobuf-2.14.0 protobuf-codegen-2.14.0 protobuf-codegen-pure-2.14.0 quick-error-1.2.3 quote-0.6.13 quote-1.0.7 quote-1.0.8 rand-0.3.23 rand-0.4.6 rand-0.5.6 rand-0.6.5 rand-0.7.3 rand-0.8.3 rand_chacha-0.1.1 rand_chacha-0.2.2 rand_chacha-0.3.0 rand_core-0.3.1 rand_core-0.4.2 rand_core-0.5.1 rand_core-0.6.1 rand_hc-0.1.0 rand_hc-0.2.0 rand_hc-0.3.0 rand_isaac-0.1.1 rand_jitter-0.1.4 rand_os-0.1.3 rand_pcg-0.1.2 rand_xorshift-0.1.1 rawpointer-0.2.1 rdrand-0.4.0 redox_syscall-0.1.57 redox_syscall-0.2.4 regex-1.3.9 regex-1.4.3 regex-syntax-0.6.18 regex-syntax-0.6.22 relay-0.1.1 remove_dir_all-0.5.3 rodio-0.9.0 rpassword-3.0.2 rustc-hash-1.1.0 rustc_version-0.2.3 ryu-1.0.5 safemem-0.3.3 scoped-tls-0.1.2 scopeguard-1.1.0 sdl2-0.32.2 sdl2-sys-0.32.6 semver-0.9.0 semver-parser-0.7.0 serde-1.0.114 serde-1.0.123 serde_derive-1.0.114 serde_derive-1.0.123 serde_json-1.0.56 serde_json-1.0.61 sha-1-0.8.2 sha2-0.8.2 shannon-0.2.0 shell-words-0.1.0 shlex-0.1.1 signal-hook-registry-1.2.0 signal-hook-registry-1.3.0 slab-0.3.0 slab-0.4.2 smallvec-0.2.1 smallvec-0.6.13 smallvec-0.6.14 socket2-0.3.12 socket2-0.3.19 stdweb-0.1.3 stream-cipher-0.3.2 subtle-1.0.0 syn-0.15.44 syn-1.0.35 syn-1.0.60 synstructure-0.10.2 take-0.1.0 tempfile-3.1.0 tempfile-3.2.0 termcolor-1.1.0 termcolor-1.1.2 time-0.1.43 tinyvec-0.3.3 tinyvec-1.1.1 tinyvec_macros-0.1.0 tokio-0.1.22 tokio-codec-0.1.2 tokio-core-0.1.17 tokio-core-0.1.18 tokio-current-thread-0.1.7 tokio-executor-0.1.10 tokio-fs-0.1.7 tokio-io-0.1.13 tokio-process-0.2.5 tokio-proto-0.1.1 tokio-reactor-0.1.12 tokio-service-0.1.0 tokio-signal-0.2.9 tokio-sync-0.1.8 tokio-tcp-0.1.4 tokio-threadpool-0.1.18 tokio-timer-0.2.13 tokio-udp-0.1.6 tokio-uds-0.2.7 try-lock-0.1.0 typenum-1.12.0 unicase-2.6.0 unicode-bidi-0.3.4 unicode-normalization-0.1.13 unicode-normalization-0.1.16 unicode-width-0.1.8 unicode-xid-0.1.0 unicode-xid-0.2.1 url-1.7.2 uuid-0.7.4 vergen-3.1.0 version_check-0.9.2 void-1.0.2 vorbis-0.0.14 vorbis-sys-0.1.0 vorbis-sys-0.1.1 vorbisfile-sys-0.0.8 want-0.0.4 wasi-0.10.2+wasi-snapshot-preview1 wasi-0.9.0+wasi-snapshot-preview1 winapi-0.2.8 winapi-0.3.9 winapi-build-0.1.1 winapi-i686-pc-windows-gnu-0.4.0 winapi-util-0.1.5 winapi-x86_64-pc-windows-gnu-0.4.0 ws2_32-sys-0.2.1 zerocopy-0.2.8 zerocopy-derive-0.1.4 " inherit cargo systemd DESCRIPTION="An open source client library for Spotify, with support for Spotify Connect" # Double check the homepage as the cargo_metadata crate # does not provide this value so instead repository is used HOMEPAGE="https://github.com/librespot-org/librespot" SRC_URI="$(cargo_crate_uris ${CRATES})" RESTRICT="mirror" # License set may be more restrictive as OR is not respected # use cargo-license for a more accurate license picture LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm64" IUSE="alsa pulseaudio portaudio jack sdl" get_features() { local out=( ) if use alsa; then out+=( alsa-backend ) fi if use pulseaudio; then out+=( pulseaudio-backend ) fi if use portaudio; then out+=( portaudio-backend ) fi if use jack; then out+=( jackaudio-backend ) fi if use sdl; then out+=( sdl-backend ) fi printf "%s," "${out[@]}" | sed 's/,$//g' } DEPEND=" media-libs/alsa-lib pulseaudio? ( media-sound/pulseaudio ) portaudio? ( media-libs/portaudio ) jack? ( virtual/jack ) sdl? ( media-libs/libsdl2 ) " RDEPEND="" src_compile() { debug-print-function ${FUNCNAME} "$@" local features="$(get_features)" if [[ "${features}" ]]; then cargo_src_compile --features "${features}" else cargo_src_compile fi } src_install() { debug-print-function ${FUNCNAME} "$@" local features="$(get_features)" if [[ "${features}" ]]; then cargo_src_install --features "${features}" else cargo_src_install fi systemd_dounit "${FILESDIR}"/"${PN}".service systemd_install_serviced "${FILESDIR}"/"${PN}".service.conf }