summaryrefslogtreecommitdiff
path: root/community/cmus
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-10-01 03:07:25 -0700
committerroot <root@rshg054.dnsready.net>2013-10-01 03:07:25 -0700
commita1792bae6f21dd0cca9e5a0d5cfad55edc1c4955 (patch)
tree1c6225df5977b18e7eb68340f773a18bd26dc500 /community/cmus
parenta1ba981700ea6943bedc5d7bb769b1f893088c7f (diff)
Tue Oct 1 03:05:59 PDT 2013
Diffstat (limited to 'community/cmus')
-rw-r--r--community/cmus/PKGBUILD38
-rw-r--r--community/cmus/cdio-git.patch137
2 files changed, 162 insertions, 13 deletions
diff --git a/community/cmus/PKGBUILD b/community/cmus/PKGBUILD
index eccd1eee4..5d54d3c79 100644
--- a/community/cmus/PKGBUILD
+++ b/community/cmus/PKGBUILD
@@ -1,18 +1,21 @@
-# $Id: PKGBUILD 94872 2013-08-01 06:54:46Z bpiotrowski $
-# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# $Id: PKGBUILD 97815 2013-09-30 02:36:29Z xyne $
+# Maintainer: Xyne <ca dot archlinux at xyne, backwards>
+# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>
pkgname=cmus
pkgver=2.5.0
-pkgrel=3
+pkgrel=4
pkgdesc='Very feature-rich ncurses-based music player'
arch=('i686' 'x86_64')
url="http://cmus.sourceforge.net/"
license=('GPL')
depends=('ncurses')
-makedepends=('faad2' 'ffmpeg' 'flac' 'libao' 'libmad' 'libmodplug'
- 'libmp4v2' 'libmpcdec' 'libpulse' 'libvorbis' 'opusfile' 'wavpack')
+makedepends=(
+ 'faad2' 'ffmpeg' 'flac' 'libao' 'libmad' 'libmodplug' 'libcdio-paranoia'
+ 'libmp4v2' 'libmpcdec' 'libpulse' 'libvorbis' 'opusfile' 'wavpack'
+)
optdepends=('alsa-lib: for ALSA output plugin support'
'libao: for AO output plugin support'
'libpulse: for PulseAudio output plugin support'
@@ -24,23 +27,32 @@ optdepends=('alsa-lib: for ALSA output plugin support'
'libmp4v2: for mp4 input plugin support'
'libmpcdec: for musepack input plugin support'
'libvorbis: for vorbis input plugin support'
+ 'libcdio-paranoia: for cdio support'
'opusfile: for opus input plugin support'
'wavpack: for wavpack input plugin support')
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-v$pkgver.tar.bz2
- cmus-2.5.0-opus-support.patch)
+ cmus-2.5.0-opus-support.patch
+ cdio-git.patch)
sha1sums=('244975a5ff642567acb047f6bd518e4a3271c25b'
- '5e524f54d565dfa30760562c223bc0e2e8ed00a0')
+ '5e524f54d565dfa30760562c223bc0e2e8ed00a0'
+ '77738acc7d4e71f6d396a5cd464dbbce0168b6b7')
+
+prepare() {
+ cd "$srcdir/$pkgname-v$pkgver"
+ # Inherited from Bart or earlier.
+ patch -Np1 -i "$srcdir/cmus-2.5.0-opus-support.patch"
+ # Include changes from git for compatibility with new cdio.
+ patch -N -i "$srcdir/cdio-git.patch"
+}
build() {
- cd $srcdir/$pkgname-v$pkgver
- patch -Np1 -i $srcdir/cmus-2.5.0-opus-support.patch
+ cd "$srcdir/$pkgname-v$pkgver"
./configure prefix=/usr
make
}
package() {
- cd $srcdir/$pkgname-v$pkgver
- make DESTDIR=$pkgdir install
-
- install -Dm 644 contrib/_cmus $pkgdir/usr/share/zsh/site-functions/_cmus
+ cd "$srcdir/$pkgname-v$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 contrib/_cmus "$pkgdir"/usr/share/zsh/site-functions/_cmus
}
diff --git a/community/cmus/cdio-git.patch b/community/cmus/cdio-git.patch
new file mode 100644
index 000000000..8c549bee7
--- /dev/null
+++ b/community/cmus/cdio-git.patch
@@ -0,0 +1,137 @@
+*** cdio.c 2012-11-07 08:46:17.000000000 +0000
+--- cmus-git/src/cmus/cdio.c 2013-09-30 02:21:10.518785946 +0000
+***************
+*** 1,5 ****
+ /*
+! * Copyright 2011 Various Authors
+ * Copyright 2011 Johannes Weißl
+ *
+ * Based on cdda.c from XMMS2.
+--- 1,5 ----
+ /*
+! * Copyright 2011-2013 Various Authors
+ * Copyright 2011 Johannes Weißl
+ *
+ * Based on cdda.c from XMMS2.
+***************
+*** 27,35 ****
+ #include "comment.h"
+ #include "discid.h"
+
+- #include <cdio/cdda.h>
+ #include <cdio/cdio.h>
+ #include <cdio/logging.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--- 27,40 ----
+ #include "comment.h"
+ #include "discid.h"
+
+ #include <cdio/cdio.h>
+ #include <cdio/logging.h>
++ #if LIBCDIO_VERSION_NUM >= 90
++ #include <cdio/paranoia/cdda.h>
++ #else
++ #include <cdio/cdda.h>
++ #endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+***************
+*** 352,375 ****
+ GROWING_KEYVALS(c);
+ const char *artist = NULL, *albumartist = NULL, *album = NULL,
+ *title = NULL, *genre = NULL, *comment = NULL;
+! const cdtext_t *cdtext_track, *cdtext_album;
+ #ifdef HAVE_CDDB
+ cddb_conn_t *cddb_conn = NULL;
+ cddb_disc_t *cddb_disc = NULL;
+ #endif
+ char buf[64];
+
+! cdtext_track = cdio_get_cdtext(priv->cdio, priv->track);
+! if (cdtext_track) {
+! char * const *field = cdtext_track->field;
+ artist = field[CDTEXT_PERFORMER];
+ title = field[CDTEXT_TITLE];
+ genre = field[CDTEXT_GENRE];
+ comment = field[CDTEXT_MESSAGE];
+ }
+! cdtext_album = cdio_get_cdtext(priv->cdio, 0);
+! if (cdtext_album) {
+! char * const *field = cdtext_album->field;
+ album = field[CDTEXT_TITLE];
+ albumartist = field[CDTEXT_PERFORMER];
+ if (!artist)
+--- 357,403 ----
+ GROWING_KEYVALS(c);
+ const char *artist = NULL, *albumartist = NULL, *album = NULL,
+ *title = NULL, *genre = NULL, *comment = NULL;
+! int track_comments_found = 0;
+! const cdtext_t *cdt;
+ #ifdef HAVE_CDDB
+ cddb_conn_t *cddb_conn = NULL;
+ cddb_disc_t *cddb_disc = NULL;
+ #endif
+ char buf[64];
+
+! #if LIBCDIO_VERSION_NUM >= 90
+! cdt = cdio_get_cdtext(priv->cdio);
+! if (cdt) {
+! artist = cdtext_get(cdt, CDTEXT_FIELD_PERFORMER, priv->track);
+! title = cdtext_get(cdt, CDTEXT_FIELD_TITLE, priv->track);
+! genre = cdtext_get(cdt, CDTEXT_FIELD_GENRE, priv->track);
+! comment = cdtext_get(cdt, CDTEXT_FIELD_MESSAGE, priv->track);
+!
+! if (title)
+! track_comments_found = 1;
+!
+! album = cdtext_get(cdt, CDTEXT_FIELD_TITLE, 0);
+! albumartist = cdtext_get(cdt, CDTEXT_FIELD_PERFORMER, 0);
+! if (!artist)
+! artist = albumartist;
+! if (!genre)
+! genre = cdtext_get(cdt, CDTEXT_FIELD_GENRE, 0);
+! if (!comment)
+! comment = cdtext_get(cdt, CDTEXT_FIELD_MESSAGE, 0);
+! }
+! #else
+! cdt = cdio_get_cdtext(priv->cdio, priv->track);
+! if (cdt) {
+! track_comments_found = 1;
+! char * const *field = cdt->field;
+ artist = field[CDTEXT_PERFORMER];
+ title = field[CDTEXT_TITLE];
+ genre = field[CDTEXT_GENRE];
+ comment = field[CDTEXT_MESSAGE];
+ }
+! cdt = cdio_get_cdtext(priv->cdio, 0);
+! if (cdt) {
+! char * const *field = cdt->field;
+ album = field[CDTEXT_TITLE];
+ albumartist = field[CDTEXT_PERFORMER];
+ if (!artist)
+***************
+*** 379,387 ****
+ if (!comment)
+ comment = field[CDTEXT_MESSAGE];
+ }
+
+ #ifdef HAVE_CDDB
+! if (!cdtext_track && cddb_url && cddb_url[0]) {
+ cddb_track_t *cddb_track;
+ track_t i_tracks = cdio_get_num_tracks(priv->cdio);
+ track_t i_first_track = cdio_get_first_track_num(priv->cdio);
+--- 407,416 ----
+ if (!comment)
+ comment = field[CDTEXT_MESSAGE];
+ }
++ #endif
+
+ #ifdef HAVE_CDDB
+! if (!track_comments_found && cddb_url && cddb_url[0]) {
+ cddb_track_t *cddb_track;
+ track_t i_tracks = cdio_get_num_tracks(priv->cdio);
+ track_t i_first_track = cdio_get_first_track_num(priv->cdio);