commit:     988b11df874411d82627dea546e6e8f1655c38c5
Author:     Guilherme Parente <guilheparente <AT> gmail <DOT> com>
AuthorDate: Mon Oct 13 20:05:01 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Oct 15 16:57:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=988b11df

media-sound/ncspot: add alternative media-gfx/ueberzugpp

media-gfx/ueberzugpp is a drop-in replacement for media-gfx/ueberzug,
and ncspot does work, showing the cover art for the song

Signed-off-by: Guilherme Parente <guilheparente <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44167
Closes: https://github.com/gentoo/gentoo/pull/44167
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-sound/ncspot/ncspot-1.3.1-r1.ebuild | 98 +++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)

diff --git a/media-sound/ncspot/ncspot-1.3.1-r1.ebuild 
b/media-sound/ncspot/ncspot-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..72d4c09f233c
--- /dev/null
+++ b/media-sound/ncspot/ncspot-1.3.1-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES=""
+PYTHON_COMPAT=( python3_{11..14} )
+
+RUST_MIN_VER="1.85.0"
+
+inherit bash-completion-r1 cargo desktop optfeature python-any-r1 
shell-completion xdg
+
+DESCRIPTION="ncurses Spotify client written in Rust using librespot"
+HOMEPAGE="https://github.com/hrkfdn/ncspot";
+SRC_URI="https://github.com/hrkfdn/ncspot/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" 
https://github.com/gentoo-crate-dist/${PN}/releases/download/v${PV}/${P}-crates.tar.xz";
+
+LICENSE="BSD-2"
+# Dependent crate licenses
+LICENSE+=" Apache-2.0 BSD Boost-1.0 ISC MIT MPL-2.0 openssl Unicode-3.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="clipboard cover mpris ncurses +notify pulseaudio"
+
+RDEPEND="dev-libs/openssl:=
+       sys-apps/dbus
+       clipboard? ( x11-libs/libxcb:= )
+       cover? (
+               || (
+                       media-gfx/ueberzug
+                       media-gfx/ueberzugpp
+               )
+       )
+       ncurses? ( sys-libs/ncurses:= )
+       pulseaudio? ( media-libs/libpulse )
+       !pulseaudio? ( media-libs/alsa-lib )"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}
+       virtual/pkgconfig"
+
+QA_FLAGS_IGNORED="/usr/bin/ncspot"
+
+pkg_setup() {
+       python-any-r1_pkg_setup
+       rust_pkg_setup
+}
+
+src_configure() {
+       local myfeaturesdef=""
+
+       use clipboard && myfeaturesdef+="share_clipboard,share_selection,"
+       use cover && myfeaturesdef+="cover,"
+       use mpris && myfeaturesdef+="mpris,"
+       use ncurses && myfeaturesdef+="ncurses_backend,"
+       use notify && myfeaturesdef+="notify,"
+
+       # It always seems to link to libpulse regardless of this setting if 
libpulse is installed.
+       if use pulseaudio; then
+         myfeaturesdef+="pulseaudio_backend,"
+       else
+         myfeaturesdef+="alsa_backend,"
+       fi
+
+       local myfeatures=( "${myfeaturesdef::-1}" )
+
+       cargo_src_configure --no-default-features
+}
+
+src_compile() {
+       cargo_src_compile
+
+       cargo xtask generate-shell-completion || die
+       cargo xtask generate-manpage || die
+}
+
+src_install() {
+       cargo_src_install
+       einstalldocs
+
+       domenu misc/ncspot.desktop
+       newicon -s scalable images/logo.svg ncspot.svg
+
+       newbashcomp misc/ncspot.bash ncspot
+
+       dofishcomp misc/ncspot.fish
+
+       dozshcomp misc/_ncspot
+
+       doman misc/*.1
+}
+
+pkg_postinst() {
+       xdg_icon_cache_update
+
+       optfeature_header "Optional runtime features:"
+       optfeature "MPRIS song scrobbling support" media-sound/rescrobbled
+}

Reply via email to