Bugfixing update to ncmpcpp-0.6.1
This commit is contained in:
parent
429bc7d910
commit
395ca52f0d
@ -1,10 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.21 2014/11/04 10:52:25 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.22 2014/11/07 09:02:29 dcoppa Exp $
|
||||
|
||||
COMMENT = ncurses mpd client inspired by ncmpc
|
||||
|
||||
DISTNAME = ncmpcpp-0.6
|
||||
|
||||
REVISION = 0
|
||||
DISTNAME = ncmpcpp-0.6.1
|
||||
|
||||
EXTRACT_SUFX = .tar.bz2
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (ncmpcpp-0.6.tar.bz2) = DpXa30zQkUJwPLhOFo7Q+JrClJaWGA60Sfuj7NUvJzA=
|
||||
SIZE (ncmpcpp-0.6.tar.bz2) = 417708
|
||||
SHA256 (ncmpcpp-0.6.1.tar.bz2) = FaN+RCpYQFDlCktUebKvJfHzVWp0emBLrRpgICEKagw=
|
||||
SIZE (ncmpcpp-0.6.1.tar.bz2) = 418332
|
||||
|
@ -1,40 +1,15 @@
|
||||
$OpenBSD: patch-src_ncmpcpp_cpp,v 1.6 2014/11/04 10:52:25 dcoppa Exp $
|
||||
|
||||
commit 9e6b8533f1606fdc2535aad88817b50b8e4ad663
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Fri Oct 31 12:10:58 2014 +0100
|
||||
ncmpcpp: ignore SIGPIPE, not SIGINT
|
||||
$OpenBSD: patch-src_ncmpcpp_cpp,v 1.7 2014/11/07 09:02:29 dcoppa Exp $
|
||||
|
||||
OpenBSD lacks sigignore()
|
||||
|
||||
--- src/ncmpcpp.cpp.orig Tue Nov 4 11:00:35 2014
|
||||
+++ src/ncmpcpp.cpp Tue Nov 4 11:03:44 2014
|
||||
@@ -58,12 +58,8 @@ namespace
|
||||
# if !defined(WIN32)
|
||||
void sighandler(int sig)
|
||||
{
|
||||
- if (sig == SIGPIPE)
|
||||
+ if (sig == SIGWINCH)
|
||||
{
|
||||
- Statusbar::print("SIGPIPE (broken pipe signal) received");
|
||||
- }
|
||||
- else if (sig == SIGWINCH)
|
||||
- {
|
||||
run_resize_screen = true;
|
||||
}
|
||||
# if defined(__sun) && defined(__SVR4)
|
||||
@@ -147,10 +143,11 @@ int main(int argc, char **argv)
|
||||
mousemask(ALL_MOUSE_EVENTS, 0);
|
||||
|
||||
# ifndef WIN32
|
||||
- signal(SIGPIPE, sighandler);
|
||||
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
|
||||
signal(SIGPIPE, sighandler);
|
||||
signal(SIGWINCH, sighandler);
|
||||
- // ignore Ctrl-C
|
||||
// ignore Ctrl-C
|
||||
- sigignore(SIGINT);
|
||||
+ // we get it after connection with mpd is broken.
|
||||
+ // just ignore it and wait for the connection to
|
||||
+ // be reestablished.
|
||||
+ signal(SIGPIPE, SIG_IGN);
|
||||
+ signal(SIGINT, SIG_IGN);
|
||||
# endif // !WIN32
|
||||
|
||||
while (!Actions::ExitMainLoop)
|
||||
|
26
audio/ncmpcpp/patches/patch-src_playlist_cpp
Normal file
26
audio/ncmpcpp/patches/patch-src_playlist_cpp
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-src_playlist_cpp,v 1.1 2014/11/07 09:02:29 dcoppa Exp $
|
||||
|
||||
commit bf33a45935eca553f85d047b7a986ccbe769adc5
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Thu Nov 6 20:30:42 2014 +0100
|
||||
|
||||
playlist: initialize timer
|
||||
|
||||
--- src/playlist.cpp.orig Thu Nov 6 19:21:21 2014
|
||||
+++ src/playlist.cpp Fri Nov 7 09:44:10 2014
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/bind.hpp>
|
||||
+#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <sstream>
|
||||
|
||||
#include "display.h"
|
||||
@@ -49,6 +50,7 @@ bool playlistEntryMatcher(const boost::regex &rx, cons
|
||||
|
||||
Playlist::Playlist()
|
||||
: m_total_length(0), m_remaining_time(0), m_scroll_begin(0)
|
||||
+, m_timer(boost::posix_time::from_time_t(0))
|
||||
, m_reload_total_length(false), m_reload_remaining(false)
|
||||
{
|
||||
w = NC::Menu<MPD::Song>(0, MainStartY, COLS, MainHeight, Config.playlist_display_mode == DisplayMode::Columns && Config.titles_visibility ? Display::Columns(COLS) : "", Config.main_color, NC::Border::None);
|
@ -1,47 +0,0 @@
|
||||
$OpenBSD: patch-src_tags_cpp,v 1.1 2014/11/04 10:52:25 dcoppa Exp $
|
||||
|
||||
commit 6402b6f9c9aad20180079d8b35f55267634028f2
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Tue Oct 28 20:07:07 2014 +0100
|
||||
|
||||
tags: writeID3v2Tags: write comment tag properly
|
||||
|
||||
--- src/tags.cpp.orig Sat Oct 25 17:16:07 2014
|
||||
+++ src/tags.cpp Tue Nov 4 10:32:30 2014
|
||||
@@ -31,10 +31,12 @@
|
||||
#include <vorbisfile.h>
|
||||
#include <tag.h>
|
||||
#include <textidentificationframe.h>
|
||||
+#include <commentsframe.h>
|
||||
#include <xiphcomment.h>
|
||||
|
||||
#include "global.h"
|
||||
#include "settings.h"
|
||||
+#include "utility/string.h"
|
||||
#include "utility/wide_string.h"
|
||||
|
||||
namespace {//
|
||||
@@ -151,9 +153,20 @@ void writeID3v2Tags(const MPD::MutableSong &s, TagLib:
|
||||
tag->removeFrames(type);
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
- auto frame = new TagLib::ID3v2::TextIdentificationFrame(type, TagLib::String::UTF8);
|
||||
- frame->setText(list);
|
||||
- tag->addFrame(frame);
|
||||
+ if (type == "COMM") // comment needs to be handled separately
|
||||
+ {
|
||||
+ auto frame = new TagLib::ID3v2::CommentsFrame(TagLib::String::UTF8);
|
||||
+ // apparently there can't be multiple comments,
|
||||
+ // so if there is more than one, join them.
|
||||
+ frame->setText(join(list, TagLib::String(Config.tags_separator, TagLib::String::UTF8)));
|
||||
+ tag->addFrame(frame);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ auto frame = new TagLib::ID3v2::TextIdentificationFrame(type, TagLib::String::UTF8);
|
||||
+ frame->setText(list);
|
||||
+ tag->addFrame(frame);
|
||||
+ }
|
||||
}
|
||||
};
|
||||
writeID3v2("TIT2", tagList(s, &MPD::Song::getTitle));
|
@ -1,38 +0,0 @@
|
||||
$OpenBSD: patch-src_utility_string_h,v 1.1 2014/11/04 10:52:25 dcoppa Exp $
|
||||
|
||||
commit 6402b6f9c9aad20180079d8b35f55267634028f2
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Tue Oct 28 20:07:07 2014 +0100
|
||||
|
||||
tags: writeID3v2Tags: write comment tag properly
|
||||
|
||||
--- src/utility/string.h.orig Sat Oct 25 17:16:07 2014
|
||||
+++ src/utility/string.h Tue Nov 4 10:32:30 2014
|
||||
@@ -31,6 +31,27 @@ template <size_t N> size_t const_strlen(const char (&)
|
||||
return N-1;
|
||||
}
|
||||
|
||||
+// it's present in boost for std::string, but we want more general version.
|
||||
+template <typename CollectionT, typename StringT>
|
||||
+StringT join(CollectionT &&collection, StringT &&separator)
|
||||
+{
|
||||
+ StringT result;
|
||||
+ auto first = std::begin(collection), last = std::end(collection);
|
||||
+ if (first != last)
|
||||
+ {
|
||||
+ while (true)
|
||||
+ {
|
||||
+ result += *first;
|
||||
+ ++first;
|
||||
+ if (first != last)
|
||||
+ result += separator;
|
||||
+ else
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
std::string getBasename(const std::string &path);
|
||||
std::string getParentDirectory(const std::string &path);
|
||||
std::string getSharedDirectory(const std::string &dir1, const std::string &dir2);
|
Loading…
Reference in New Issue
Block a user