aboutsummaryrefslogtreecommitdiffstats
path: root/community/ncmpc
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2017-10-19 11:42:23 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2017-10-19 12:19:07 +0200
commit1d66089542ba7c70c85ad56bf71972b009690cd3 (patch)
treea8532e816867f1c34abb9a4a33f1b3c1928698a7 /community/ncmpc
parent5e15f7cfb012720adb56bc085947f98fc3f8effa (diff)
downloadaports-1d66089542ba7c70c85ad56bf71972b009690cd3.tar.bz2
aports-1d66089542ba7c70c85ad56bf71972b009690cd3.tar.xz
community/ncmpc: move from main
Diffstat (limited to 'community/ncmpc')
-rw-r--r--community/ncmpc/0001-Make-lyrics_plugin_dir-configurable-again.patch39
-rw-r--r--community/ncmpc/0002-mpdclient-check-source-again-after-mpd_glib_leave.patch32
-rw-r--r--community/ncmpc/APKBUILD51
3 files changed, 122 insertions, 0 deletions
diff --git a/community/ncmpc/0001-Make-lyrics_plugin_dir-configurable-again.patch b/community/ncmpc/0001-Make-lyrics_plugin_dir-configurable-again.patch
new file mode 100644
index 0000000000..903627d7d1
--- /dev/null
+++ b/community/ncmpc/0001-Make-lyrics_plugin_dir-configurable-again.patch
@@ -0,0 +1,39 @@
+From c1b7a2d4372dff90e4952a9f137f685b777d073e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
+Date: Sat, 23 Sep 2017 11:09:38 +0200
+Subject: [PATCH 1/2] Make lyrics_plugin_dir configurable again
+
+See: https://github.com/MusicPlayerDaemon/ncmpc/issues/7
+---
+ meson.build | 2 +-
+ meson_options.txt | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index b2fd42a..5255b2a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -271,7 +271,7 @@ conf.set('ENABLE_LYRICS_SCREEN', enable_lyrics_screen)
+ if enable_lyrics_screen
+ sources += ['src/screen_lyrics.c', 'src/lyrics.c']
+
+- lyrics_plugin_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'lyrics')
++ lyrics_plugin_dir = join_paths(get_option('prefix'), get_option('lyrics_plugin_dir'))
+ conf.set_quoted('LYRICS_PLUGIN_DIR', lyrics_plugin_dir)
+ install_data(
+ 'lyrics/10-hd.sh',
+diff --git a/meson_options.txt b/meson_options.txt
+index 4f58ed3..92e83e6 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -79,3 +79,7 @@ option('chat_screen', type: 'boolean',
+ option('documentation', type: 'boolean',
+ value: false,
+ description: 'Build API documentation')
++
++option('lyrics_plugin_dir', type: 'string',
++ value: 'lib/ncmpc/lyrics',
++ description: 'Directory where lyrics plugins are stored')
+--
+2.14.2
+
diff --git a/community/ncmpc/0002-mpdclient-check-source-again-after-mpd_glib_leave.patch b/community/ncmpc/0002-mpdclient-check-source-again-after-mpd_glib_leave.patch
new file mode 100644
index 0000000000..6dc7d7cf7f
--- /dev/null
+++ b/community/ncmpc/0002-mpdclient-check-source-again-after-mpd_glib_leave.patch
@@ -0,0 +1,32 @@
+From 058f2d23321839e4aca1af7eb4537883fe7dd92a Mon Sep 17 00:00:00 2001
+From: Max Kellermann <max.kellermann@gmail.com>
+Date: Tue, 17 Oct 2017 15:56:06 +0200
+Subject: [PATCH 2/2] mpdclient: check source again after mpd_glib_leave()
+
+Just in case mpd_glib_leave() has found an error and had to close the
+connection, check it again to avoid an assertion failure (or crash) in
+mpdclient_schedule_enter_idle().
+
+Closes #9
+---
+ NEWS | 1 +
+ src/mpdclient.c | 3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/mpdclient.c b/src/mpdclient.c
+index 6a81a0b..1801ad2 100644
+--- a/src/mpdclient.c
++++ b/src/mpdclient.c
+@@ -490,7 +490,8 @@ mpdclient_get_connection(struct mpdclient *c)
+ c->idle = false;
+ mpd_glib_leave(c->source);
+
+- mpdclient_schedule_enter_idle(c);
++ if (c->source != NULL)
++ mpdclient_schedule_enter_idle(c);
+ }
+
+ return c->connection;
+--
+2.14.2
+
diff --git a/community/ncmpc/APKBUILD b/community/ncmpc/APKBUILD
new file mode 100644
index 0000000000..45cd99d137
--- /dev/null
+++ b/community/ncmpc/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
+# Maintainer: Peter Bui <pnutzh4x0r@gmail.com>
+pkgname=ncmpc
+pkgver=0.28
+pkgrel=1
+pkgdesc="Fully featured MPD client using ncurses"
+url="http://www.musicpd.org/clients/ncmpc/"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends="ncurses-dev glib-dev libmpdclient-dev meson"
+install=""
+subpackages="$pkgname-doc $pkgname-lang $pkgname-dbg"
+source="http://www.musicpd.org/download/${pkgname}/0/${pkgname}-${pkgver}.tar.xz
+ 0001-Make-lyrics_plugin_dir-configurable-again.patch
+ 0002-mpdclient-check-source-again-after-mpd_glib_leave.patch"
+builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ meson \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --buildtype=release \
+ -Dcurses=ncurses \
+ -Dlyrics_screen=true \
+ -Dlyrics_plugin_dir=share/$pkgname/lyrics \
+ . output
+ ninja -C output
+}
+
+package() {
+ cd "$builddir"
+ DESTDIR="$pkgdir" ninja -C output install
+
+ mkdir -p "$pkgdir"/usr/share/$pkgname/lyrics
+ install -m755 lyrics/* \
+ "$pkgdir"/usr/share/$pkgname/lyrics
+
+ mkdir -p "$pkgdir"/usr/share/licenses/$pkgname/
+ mv "$pkgdir"/usr/share/doc/$pkgname/COPYING \
+ "$pkgdir"/usr/share/licenses/$pkgname/
+}
+
+sha512sums="d5cf890fc72b3c8c3391ddbcae49d494d9504eb237dcef1277b3b34eaecdce20611b1a874a2d248722b66e932a0ec7ace5bedc0dafbb0afe0d3476d4af520e0c ncmpc-0.28.tar.xz
+3e04693161caa14d7e470241fd1c965767eea71cda5a67a029a9ddf75aefd80848ea582a0bc85e8b304b8e1272ad4b5404d369053fab03da59557a4ac42a9e99 0001-Make-lyrics_plugin_dir-configurable-again.patch
+a297ca0c2da1ebcaa01af8c2c211f9d99529891cb8c9dfb28eaf169186330b83d9a4120006e91bc2c0c272313501d4fd4812c9df707a8c03d6dace1b7fb469c5 0002-mpdclient-check-source-again-after-mpd_glib_leave.patch"