From 5f8a0b85177e9b8b4d4802ef7459fdc0033c4b0a Mon Sep 17 00:00:00 2001 From: Omar Zeghouani Date: Sun, 17 Oct 2021 10:38:19 +0100 Subject: [PATCH] New package: ncspot-0.9.5 --- .../patches/patch-src_ui_listview.patch | 23 ++++++++++++ srcpkgs/ncspot/template | 35 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 srcpkgs/ncspot/patches/patch-src_ui_listview.patch create mode 100644 srcpkgs/ncspot/template diff --git a/srcpkgs/ncspot/patches/patch-src_ui_listview.patch b/srcpkgs/ncspot/patches/patch-src_ui_listview.patch new file mode 100644 index 000000000000..a4dca94c8ccd --- /dev/null +++ b/srcpkgs/ncspot/patches/patch-src_ui_listview.patch @@ -0,0 +1,23 @@ +Fix build with rust =< 1.58.0 +Patch provided by upstream + +index 17fead7..e6c72b6 100644 +--- a/src/ui/listview.rs ++++ b/src/ui/listview.rs +@@ -85,7 +85,7 @@ impl ListView { + + pub fn content_height_with_paginator(&self) -> usize { + let content_len = self.content.read().unwrap().len(); +- log::info!("content len: {content_len}"); ++ log::info!("content len: {}", content_len); + + // add 1 more row for paginator if we can paginate + if self.can_paginate() { +@@ -97,7 +97,7 @@ impl ListView { + + fn can_paginate(&self) -> bool { + let loaded = self.get_pagination().loaded_content(); +- log::info!("can paginate: {loaded}"); ++ log::info!("can paginate: {}", loaded); + self.get_pagination().max_content().unwrap_or(0) > self.get_pagination().loaded_content() + } diff --git a/srcpkgs/ncspot/template b/srcpkgs/ncspot/template new file mode 100644 index 000000000000..65d3bb2b7c93 --- /dev/null +++ b/srcpkgs/ncspot/template @@ -0,0 +1,35 @@ +# Template file for 'ncspot' +pkgname=ncspot +version=0.9.5 +revision=1 +build_style=cargo +configure_args="--no-default-features" +hostmakedepends="pkg-config python3" +makedepends="openssl-devel $(vopt_if libxcb libxcb-devel) + $(vopt_if dbus dbus-devel) $(vopt_if alsa alsa-lib-devel) + $(vopt_if pulseaudio pulseaudio-devel)" +short_desc="Cross-platform ncurses Spotify client" +maintainer="Omar Zeghouani " +license="BSD-2-Clause" +homepage="https://github.com/hrkfdn/ncspot" +distfiles="https://github.com/hrkfdn/ncspot/archive/v${version}.tar.gz" +checksum=aff3fb952834dd657cf4a2dbcf6171c620273d6b8b6372cefcbe257c230f17f5 + +build_options="libxcb dbus alsa pulseaudio notify cover" +build_options_default="libxcb dbus alsa pulseaudio notify" +desc_option_libxcb="Enable support for X clipboard access" +desc_option_cover="Enable support for cover art" + +_features="cursive/termion-backend" +_features+="$(vopt_if libxcb ',share_clipboard,share_selection')" +_features+="$(vopt_if dbus ',mpris')" +_features+="$(vopt_if alsa ',alsa_backend')" +_features+="$(vopt_if pulseaudio ',pulseaudio_backend')" +_features+="$(vopt_if notify ',notify')" +_features+="$(vopt_if cover ',cover')" + +configure_args+=" --features $_features" + +post_install() { + vlicense LICENSE +}