From 80bffc958a0dff7ac6d6aebd74fd748aaaced073 Mon Sep 17 00:00:00 2001 From: landry Date: Mon, 5 Apr 2010 19:05:11 +0000 Subject: [PATCH] Update to ncmpc 0.16.1, from maintainer Tobias Ulmer, thanks! --- audio/ncmpc/Makefile | 37 +++++--------- audio/ncmpc/distinfo | 10 ++-- audio/ncmpc/patches/patch-doc_Makefile_am | 11 ----- audio/ncmpc/patches/patch-src_colors_c | 23 +++++++++ audio/ncmpc/patches/patch-src_libmpdclient_c | 13 ----- audio/ncmpc/patches/patch-src_main_c | 33 ------------- audio/ncmpc/patches/patch-src_mpdclient_c | 28 ----------- audio/ncmpc/patches/patch-src_screen_c | 52 ++++++++------------ audio/ncmpc/patches/patch-src_screen_file_c | 21 -------- audio/ncmpc/patches/patch-src_support_c | 30 ----------- audio/ncmpc/pkg/PLIST | 16 ++++-- 11 files changed, 73 insertions(+), 201 deletions(-) delete mode 100644 audio/ncmpc/patches/patch-doc_Makefile_am create mode 100644 audio/ncmpc/patches/patch-src_colors_c delete mode 100644 audio/ncmpc/patches/patch-src_libmpdclient_c delete mode 100644 audio/ncmpc/patches/patch-src_main_c delete mode 100644 audio/ncmpc/patches/patch-src_mpdclient_c delete mode 100644 audio/ncmpc/patches/patch-src_screen_file_c delete mode 100644 audio/ncmpc/patches/patch-src_support_c diff --git a/audio/ncmpc/Makefile b/audio/ncmpc/Makefile index e005d281c3c..bf5ea60aad4 100644 --- a/audio/ncmpc/Makefile +++ b/audio/ncmpc/Makefile @@ -1,45 +1,34 @@ -# $OpenBSD: Makefile,v 1.11 2010/02/13 13:17:03 jasper Exp $ +# $OpenBSD: Makefile,v 1.12 2010/04/05 19:05:11 landry Exp $ COMMENT= curses based frontend for mpd -DISTNAME= ncmpc-20070917 -PKGNAME= ${DISTNAME}p1 +DISTNAME= ncmpc-0.16.1 +PKGNAME= ${DISTNAME}v0 CATEGORIES= audio -HOMEPAGE= http://hem.bredband.net/kaw/ncmpc/ +HOMEPAGE= http://mpd.wikia.com/wiki/Client:Ncmpc MAINTAINER= Tobias Ulmer -# GPL +# GPLv2 PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes WANTLIB= c ncurses -LIB_DEPENDS= glib-2.0::devel/glib2 - -USE_LIBTOOL= Yes - -BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} \ - ${MODGNU_AUTOMAKE_DEPENDS} - +LIB_DEPENDS= glib-2.0::devel/glib2 mpdclient::audio/libmpdclient MODULES= devel/gettext -MASTER_SITES= http://www.phil.uu.nl/~lievisse/distfiles/ +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=musicpd/} CONFIGURE_STYLE= gnu -AUTOMAKE_VERSION= 1.8 -AUTOCONF_VERSION= 2.61 -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" +CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include \ + LDFLAGS=-L${LOCALBASE}/lib -CFLAGS+= -ftrampolines - -WRKDIST= ${WRKDIR}/ncmpc - -pre-configure: - cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \ - AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ncmpc + mv ${PREFIX}/share/doc/ncmpc/{config.sample,keys.sample,ncmpc.lirc} \ + ${PREFIX}/share/examples/ncmpc/ .include diff --git a/audio/ncmpc/distinfo b/audio/ncmpc/distinfo index f481edbfb12..c06385a251a 100644 --- a/audio/ncmpc/distinfo +++ b/audio/ncmpc/distinfo @@ -1,5 +1,5 @@ -MD5 (ncmpc-20070917.tar.gz) = OqGlggazd/isBhJYbw/oBg== -RMD160 (ncmpc-20070917.tar.gz) = wIIALvJO/u0mkGUzj+YuhRySxoQ= -SHA1 (ncmpc-20070917.tar.gz) = GhgwMJZ4bsQEsb7Cu3jc0xQ+8Pg= -SHA256 (ncmpc-20070917.tar.gz) = kM/BD6vSt/KT64PQ2HEw8RGkgMG0nrxzcrl0w7lHzaA= -SIZE (ncmpc-20070917.tar.gz) = 247962 +MD5 (ncmpc-0.16.1.tar.gz) = NahCXVZwjIYx5Hcabsu5Wg== +RMD160 (ncmpc-0.16.1.tar.gz) = KuRO+r/4JkXhv9tgDiEzWK420Ug= +SHA1 (ncmpc-0.16.1.tar.gz) = 58cxX+ZUH8LYzoJ+5arZF6RZfvo= +SHA256 (ncmpc-0.16.1.tar.gz) = H4lLoXsPq22q5B4wGI+x8yrABZ7Yj/9uRxGr8nstrl8= +SIZE (ncmpc-0.16.1.tar.gz) = 326156 diff --git a/audio/ncmpc/patches/patch-doc_Makefile_am b/audio/ncmpc/patches/patch-doc_Makefile_am deleted file mode 100644 index e7c320ba70e..00000000000 --- a/audio/ncmpc/patches/patch-doc_Makefile_am +++ /dev/null @@ -1,11 +0,0 @@ -$OpenBSD: patch-doc_Makefile_am,v 1.1 2007/09/19 19:15:12 jasper Exp $ ---- doc/Makefile.am.orig Wed Sep 19 19:34:17 2007 -+++ doc/Makefile.am Wed Sep 19 19:34:30 2007 -@@ -3,6 +3,6 @@ - # - - man_MANS = ncmpc.1 --docdir = $(prefix)/share/doc/$(PACKAGE) -+docdir = $(prefix)/share/examples/$(PACKAGE) - doc_DATA = config.sample keys.sample ncmpc.lirc - EXTRA_DIST = $(man_MANS) $(doc_DATA) diff --git a/audio/ncmpc/patches/patch-src_colors_c b/audio/ncmpc/patches/patch-src_colors_c new file mode 100644 index 00000000000..2a1b5b24e29 --- /dev/null +++ b/audio/ncmpc/patches/patch-src_colors_c @@ -0,0 +1,23 @@ +$OpenBSD: patch-src_colors_c,v 1.1 2010/04/05 19:05:11 landry Exp $ +"Fix" screen corruption in ncmpc. Colors and attributes can not be mixed. +Colors are in the low 8 bit, mask them in the appropriate places. +--- src/colors.c.orig Sat Mar 20 11:00:32 2010 ++++ src/colors.c Sat Mar 20 11:02:03 2010 +@@ -86,7 +86,7 @@ colors_update_pair(enum color id) + + assert(id > 0 && id < COLOR_END); + +- fg = colors[id].color; ++ fg = colors[id].color & 0xff; + bg = colors[COLOR_BACKGROUND].color; + + /* If color == COLOR_NONE (negative), +@@ -273,7 +273,7 @@ colors_use(WINDOW *w, enum color id) + if (options.enable_colors) { + /* color mode */ + if ((int)attrs != entry->color || (short)id != pair) +- wattr_set(w, entry->color, id, NULL); ++ wattr_set(w, entry->color & ~0xff, id, NULL); + } else { + #endif + /* mono mode */ diff --git a/audio/ncmpc/patches/patch-src_libmpdclient_c b/audio/ncmpc/patches/patch-src_libmpdclient_c deleted file mode 100644 index 7d9340c7acc..00000000000 --- a/audio/ncmpc/patches/patch-src_libmpdclient_c +++ /dev/null @@ -1,13 +0,0 @@ -$OpenBSD: patch-src_libmpdclient_c,v 1.1 2007/10/31 06:34:55 jasper Exp $ ---- src/libmpdclient.c.orig Wed Sep 19 18:27:39 2007 -+++ src/libmpdclient.c Thu Oct 25 13:04:31 2007 -@@ -197,6 +197,9 @@ mpd_Connection * mpd_newConnection(const char * host, - connection->sock = 0; - continue; - } -+ -+ /* success! */ -+ break; - } - } - diff --git a/audio/ncmpc/patches/patch-src_main_c b/audio/ncmpc/patches/patch-src_main_c deleted file mode 100644 index 8c9cd54b631..00000000000 --- a/audio/ncmpc/patches/patch-src_main_c +++ /dev/null @@ -1,33 +0,0 @@ -$OpenBSD: patch-src_main_c,v 1.1 2008/07/21 07:53:03 bernd Exp $ ---- src/main.c.orig Wed Sep 19 19:27:39 2007 -+++ src/main.c Sat Jul 12 10:45:07 2008 -@@ -153,6 +153,13 @@ sigstop(void) - kill(0, SIGSTOP); /* issue SIGSTOP */ - } - -+void -+catch_sigwinch(int x) -+{ -+ (void)x; -+ screen_resize(); -+} -+ - #ifdef DEBUG - void - D(char *format, ...) -@@ -237,6 +244,15 @@ main(int argc, const char *argv[]) - if( sigaction(SIGCONT, &act, NULL)<0 ) - { - perror("sigaction(SIGCONT)"); -+ exit(EXIT_FAILURE); -+ } -+ -+ sigemptyset(&act.sa_mask); -+ act.sa_flags = 0; -+ act.sa_handler = catch_sigwinch; -+ if( sigaction(SIGWINCH, &act, NULL)<0 ) -+ { -+ perror("sigaction(SIGWINCH)"); - exit(EXIT_FAILURE); - } - diff --git a/audio/ncmpc/patches/patch-src_mpdclient_c b/audio/ncmpc/patches/patch-src_mpdclient_c deleted file mode 100644 index f294e977e05..00000000000 --- a/audio/ncmpc/patches/patch-src_mpdclient_c +++ /dev/null @@ -1,28 +0,0 @@ -$OpenBSD: patch-src_mpdclient_c,v 1.2 2007/09/19 19:15:13 jasper Exp $ ---- src/mpdclient.c.orig Wed Sep 19 19:27:39 2007 -+++ src/mpdclient.c Wed Sep 19 19:37:41 2007 -@@ -848,10 +848,9 @@ mpdclient_filelist_get(mpdclient_t *c, gchar *path) - { - mpdclient_filelist_t *filelist; - mpd_InfoEntity *entity; -- gchar *path_utf8 = locale_to_utf8(path); - -- D("mpdclient_filelist_get(%s)\n", path); -- mpd_sendLsInfoCommand(c->connection, path_utf8); -+ D("mpdclient_filelist_get(%s)\n", utf8_to_locale(path)); -+ mpd_sendLsInfoCommand(c->connection, path); - filelist = g_malloc0(sizeof(mpdclient_filelist_t)); - if( path && path[0] && strcmp(path, "/") ) - { -@@ -873,11 +872,9 @@ mpdclient_filelist_get(mpdclient_t *c, gchar *path) - - if( mpdclient_finish_command(c) ) - { -- g_free(path_utf8); - return mpdclient_filelist_free(filelist); - } - -- g_free(path_utf8); - filelist->path = g_strdup(path); - filelist->updated = TRUE; - diff --git a/audio/ncmpc/patches/patch-src_screen_c b/audio/ncmpc/patches/patch-src_screen_c index c67bd83bf91..c24af511f35 100644 --- a/audio/ncmpc/patches/patch-src_screen_c +++ b/audio/ncmpc/patches/patch-src_screen_c @@ -1,37 +1,25 @@ -$OpenBSD: patch-src_screen_c,v 1.1 2008/07/21 07:53:03 bernd Exp $ ---- src/screen.c.orig Wed Sep 19 19:27:39 2007 -+++ src/screen.c Sat Jul 12 10:53:09 2008 -@@ -23,6 +23,7 @@ - #include +$OpenBSD: patch-src_screen_c,v 1.2 2010/04/05 19:05:11 landry Exp $ +--- src/screen.c.orig Sun Jan 17 16:54:56 2010 ++++ src/screen.c Sun Mar 21 08:36:06 2010 +@@ -47,6 +47,7 @@ #include #include -+#include #include - #include - #include -@@ -449,13 +450,22 @@ void - screen_resize(void) ++#include + + #ifndef NCMPC_MINI + /** welcome message time [s] */ +@@ -200,6 +201,13 @@ screen_exit(void) + void + screen_resize(struct mpdclient *c) { - gint i; -+ struct winsize ws; - -+ if (ioctl(fileno(stdout), TIOCGWINSZ, &ws) == 0) { -+ LINES = ws.ws_row; -+ COLS = ws.ws_col; -+ } ++ struct winsize ws; + - D("Resize rows %d->%d, cols %d->%d\n",screen->rows,LINES,screen->cols,COLS); - if( COLSinfo.directory; -- path = utf8_to_locale(dir->path); -+ path = g_strdup(dir->path); - /* save current list window state */ - list_window_push_state(lw_state,lw); - } -@@ -549,7 +549,7 @@ browse_close(void) - static char * - browse_title(char *str, size_t size) - { -- g_snprintf(str, size, _("Browse: %s"), basename(filelist->path)); -+ g_snprintf(str, size, _("Browse: %s"), utf8_to_locale(basename(filelist->path))); - return str; - } - diff --git a/audio/ncmpc/patches/patch-src_support_c b/audio/ncmpc/patches/patch-src_support_c deleted file mode 100644 index 255227128e9..00000000000 --- a/audio/ncmpc/patches/patch-src_support_c +++ /dev/null @@ -1,30 +0,0 @@ -$OpenBSD: patch-src_support_c,v 1.2 2007/09/19 19:15:13 jasper Exp $ ---- src/support.c.orig Wed Sep 19 19:27:39 2007 -+++ src/support.c Wed Sep 19 19:37:42 2007 -@@ -168,6 +168,7 @@ utf8_to_locale(char *utf8str) - gchar *str; - gsize rb, wb; - GError *error; -+ const char *charset; - - if( noconvert ) - return g_strdup(utf8str); -@@ -175,15 +176,11 @@ utf8_to_locale(char *utf8str) - rb = 0; /* bytes read */ - wb = 0; /* bytes written */ - error = NULL; -- str=g_locale_from_utf8(utf8str, -- strlen(utf8str), -- &wb, &rb, -- &error); -+ g_get_charset(&charset); -+ str = g_convert_with_fallback( -+ utf8str, -1, charset, "UTF-8", "?", &rb, &wb, &error); - if( error ) - { -- const char *charset; -- -- g_get_charset(&charset); - screen_status_printf(_("Error: Unable to convert characters to %s"), - charset); - D("utf8_to_locale(): %s\n", error->message); diff --git a/audio/ncmpc/pkg/PLIST b/audio/ncmpc/pkg/PLIST index a008c7025ea..727aeb51bd0 100644 --- a/audio/ncmpc/pkg/PLIST +++ b/audio/ncmpc/pkg/PLIST @@ -1,5 +1,5 @@ -@comment $OpenBSD: PLIST,v 1.2 2007/09/19 19:15:13 jasper Exp $ -bin/ncmpc +@comment $OpenBSD: PLIST,v 1.3 2010/04/05 19:05:11 landry Exp $ +@bin bin/ncmpc @man man/man1/ncmpc.1 share/doc/ncmpc/ share/doc/ncmpc/AUTHORS @@ -9,12 +9,20 @@ share/examples/ncmpc/ share/examples/ncmpc/config.sample share/examples/ncmpc/keys.sample share/examples/ncmpc/ncmpc.lirc +share/locale/cs/LC_MESSAGES/ncmpc.mo share/locale/da/LC_MESSAGES/ncmpc.mo share/locale/de/LC_MESSAGES/ncmpc.mo +share/locale/eo/LC_MESSAGES/ncmpc.mo share/locale/es/LC_MESSAGES/ncmpc.mo share/locale/fr/LC_MESSAGES/ncmpc.mo share/locale/gl/LC_MESSAGES/ncmpc.mo -share/locale/no/LC_MESSAGES/ncmpc.mo +share/locale/he/LC_MESSAGES/ncmpc.mo +share/locale/hu/LC_MESSAGES/ncmpc.mo +share/locale/ko/LC_MESSAGES/ncmpc.mo +share/locale/nb/LC_MESSAGES/ncmpc.mo +share/locale/nl/LC_MESSAGES/ncmpc.mo share/locale/ru/LC_MESSAGES/ncmpc.mo +share/locale/sk/LC_MESSAGES/ncmpc.mo share/locale/sv/LC_MESSAGES/ncmpc.mo -@comment share/ncmpc/ +share/locale/uk/LC_MESSAGES/ncmpc.mo +share/locale/zh_CN/LC_MESSAGES/ncmpc.mo