Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/ncspot ncspot: Call libc::setlocale() to fix pri...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8c3931d8b8e7
branches: trunk
changeset: 437402:8c3931d8b8e7
user: kamil <kamil%pkgsrc.org@localhost>
date: Sun Aug 23 14:57:42 2020 +0000
description:
ncspot: Call libc::setlocale() to fix printing of non-ASCII characters
Upstream bug report:
https://github.com/hrkfdn/ncspot/issues/221
Analysis done by rvp @ UnitedBSD
https://www.unitedbsd.com/d/233-spotify/54
diffstat:
audio/ncspot/Makefile | 3 ++-
audio/ncspot/distinfo | 5 +++--
audio/ncspot/patches/patch-Cargo.toml | 16 +++++++++++++---
audio/ncspot/patches/patch-src_main.rs | 26 ++++++++++++++++++++++++++
4 files changed, 44 insertions(+), 6 deletions(-)
diffs (85 lines):
diff -r 934e0020a8e3 -r 8c3931d8b8e7 audio/ncspot/Makefile
--- a/audio/ncspot/Makefile Sun Aug 23 13:32:13 2020 +0000
+++ b/audio/ncspot/Makefile Sun Aug 23 14:57:42 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2020/08/20 16:24:59 pin Exp $
+# $NetBSD: Makefile,v 1.2 2020/08/23 14:57:42 kamil Exp $
DISTNAME= ncspot-0.2.1
+PKGREVISION= 1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_GITHUB:=hrkfdn/}
GITHUB_TAG= v${PKGVERSION_NOREV}
diff -r 934e0020a8e3 -r 8c3931d8b8e7 audio/ncspot/distinfo
--- a/audio/ncspot/distinfo Sun Aug 23 13:32:13 2020 +0000
+++ b/audio/ncspot/distinfo Sun Aug 23 14:57:42 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2020/08/20 17:56:10 pin Exp $
+$NetBSD: distinfo,v 1.2 2020/08/23 14:57:42 kamil Exp $
SHA1 (addr2line-0.13.0.crate) = c7a6843df774a95b4db5a5511b58ab22c44f228a
RMD160 (addr2line-0.13.0.crate) = 22c733c5358313e9ca7fb95d1dbd695d03fcb552
@@ -1560,4 +1560,5 @@
RMD160 (xi-unicode-0.2.1.crate) = 1d50fd64d44638e4d44f154c4dc4f56bb7f3ce50
SHA512 (xi-unicode-0.2.1.crate) = cd5dde20cde2c9180247df4f6912139a436f7ab71ef86dac66418c0459df665c09fc3c5b497f8157a6209da32b3e9fda5f50d1ef06c1c8cc2557c4b90363e586
Size (xi-unicode-0.2.1.crate) = 88229 bytes
-SHA1 (patch-Cargo.toml) = 67719b3b51ecbb424b67d34b53688a71bcf480f1
+SHA1 (patch-Cargo.toml) = df5ac3791121c92707f34df5cc0ef31cab7785df
+SHA1 (patch-src_main.rs) = 3e9dcb8341463460c480e309cc782f23edece48c
diff -r 934e0020a8e3 -r 8c3931d8b8e7 audio/ncspot/patches/patch-Cargo.toml
--- a/audio/ncspot/patches/patch-Cargo.toml Sun Aug 23 13:32:13 2020 +0000
+++ b/audio/ncspot/patches/patch-Cargo.toml Sun Aug 23 14:57:42 2020 +0000
@@ -1,10 +1,20 @@
-$NetBSD: patch-Cargo.toml,v 1.1 2020/08/20 16:24:59 pin Exp $
+$NetBSD: patch-Cargo.toml,v 1.2 2020/08/23 14:57:43 kamil Exp $
Use portaudio by default
---- Cargo.toml.orig 2020-07-17 22:02:08.000000000 +0000
+Use libc for setlocale() to fix non-ASCII character printing.
+https://github.com/hrkfdn/ncspot/issues/221
+
+--- Cargo.toml.orig 2020-08-13 08:27:21.000000000 +0000
+++ Cargo.toml
-@@ -48,11 +48,5 @@ version = "0.15"
+@@ -42,17 +42,12 @@ clipboard = { version = "0.5", optional
+ url = "1.7"
+ strum = "0.17.1"
+ strum_macros = "0.17.1"
++libc = "0.2"
+
+ [dependencies.cursive]
+ version = "0.15"
default-features = false
[features]
diff -r 934e0020a8e3 -r 8c3931d8b8e7 audio/ncspot/patches/patch-src_main.rs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ncspot/patches/patch-src_main.rs Sun Aug 23 14:57:42 2020 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_main.rs,v 1.1 2020/08/23 14:57:43 kamil Exp $
+
+Use libc for setlocale() to fix non-ASCII character printing.
+https://github.com/hrkfdn/ncspot/issues/221
+
+--- src/main.rs.orig 2020-08-13 08:27:21.000000000 +0000
++++ src/main.rs
+@@ -47,6 +47,8 @@ use clap::{App, Arg};
+ use cursive::traits::Identifiable;
+ use cursive::{Cursive, CursiveExt};
+
++use std::ffi::CString;
++
+ use librespot_core::authentication::Credentials;
+ use librespot_core::cache::Cache;
+ use librespot_playback::audio_backend;
+@@ -141,6 +143,9 @@ struct UserDataInner {
+ }
+
+ fn main() {
++ unsafe {
++ libc::setlocale(libc::LC_ALL, CString::new("").unwrap().as_ptr());
++ }
+ let backends = {
+ let backends: Vec<&str> = audio_backend::BACKENDS.iter().map(|b| b.0).collect();
+ format!("Audio backends: {}", backends.join(", "))
Home |
Main Index |
Thread Index |
Old Index