[arch-commits] Commit in cmus/trunk (PKGBUILD cdio-git.patch)

Xyne xyne at nymeria.archlinux.org
Mon Sep 30 02:35:56 UTC 2013


    Date: Monday, September 30, 2013 @ 04:35:56
  Author: xyne
Revision: 97814

upgpkg: cmus 2.5.0-4

Update after Bart's departure.

Added:
  cmus/trunk/cdio-git.patch
Modified:
  cmus/trunk/PKGBUILD

----------------+
 PKGBUILD       |   36 +++++++++-----
 cdio-git.patch |  137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 161 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-09-30 02:07:53 UTC (rev 97813)
+++ PKGBUILD	2013-09-30 02:35:56 UTC (rev 97814)
@@ -1,18 +1,21 @@
 # $Id$
-# Maintainer:  Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
+# Maintainer: Xyne <ca dot archlinux at xyne, backwards>
+# Contributor:  Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
 # Contributor: Aaron Griffin <aaron at archlinux.org>
 # Contributor: dorphell <dorphell at 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 @@
             '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
 }

Added: cdio-git.patch
===================================================================
--- cdio-git.patch	                        (rev 0)
+++ cdio-git.patch	2013-09-30 02:35:56 UTC (rev 97814)
@@ -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);




More information about the arch-commits mailing list