Update for cmus to 2.5.0:

Two further changes:
  * I added CONFIG_ALSA=n back. Someone added it, I don't really know
    why, but I see that some other ports are explicitely disabling ALSA
    support, too. So I'll continue doing the same.
  * I added a patch from upstream which fixes a segfault.

From maintainer Donovan Watteau, Thanks!

Ok aja@
This commit is contained in:
gonzalo 2012-12-27 12:02:33 +00:00
parent 7614ffa97a
commit 02a7f070d1
7 changed files with 56 additions and 22 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.6 2011/12/20 16:00:26 shadchin Exp $
# $OpenBSD: Makefile,v 1.7 2012/12/27 12:02:33 gonzalo Exp $
COMMENT-main= ncurses-based music player
COMMENT-flac= FLAC input plugin for cmus
COMMENT-wavpack= Wavpack input plugin for cmus
V= 2.4.3
V= 2.5.0
DISTNAME= cmus-v$(V)
PKGNAME-main= cmus-$(V)
PKGNAME-flac= cmus-flac-$(V)
@ -29,9 +29,10 @@ MULTI_PACKAGES= -main -flac -wavpack
MODULES= converters/libiconv
WANTLIB-main= c m pthread sndio ncursesw mad>=2 ${MODLIBICONV_WANTLIB}
WANTLIB-main= c cdio cdio_cdda cue m mad>=2 ncursesw pthread sndio
WANTLIB-main+= ${MODLIBICONV_WANTLIB}
LIB_DEPENDS= audio/libmad
LIB_DEPENDS= audio/libcdio audio/libcue audio/libmad
LIB_DEPENDS-flac= audio/flac audio/libogg
RUN_DEPENDS-flac= audio/cmus
@ -44,6 +45,7 @@ USE_GMAKE= Yes
CONFIGURE_STYLE= simple
CONFIGURE_ENV= HOSTCC="${CC}" HOSTLD="${CC}" HOST_CFLAGS="${CFLAGS}"
# Note: We're explicitly disabling CONFIG_CDDB as it gets undef'd in cdio.c
CONFIGURE_ARGS= prefix=${PREFIX} \
exampledir=${PREFIX}/share/examples/cmus \
mandir=${PREFIX}/man \
@ -59,7 +61,9 @@ CONFIGURE_ARGS= prefix=${PREFIX} \
CONFIG_PULSE=n \
CONFIG_ALSA=n \
CONFIG_ROAR=n \
CONFIG_SNDIO=y
CONFIG_SNDIO=y \
CONFIG_DISCID=n \
CONFIG_CDDB=n
.if ${MACHINE_ARCH} == "arm"
CONFIGURE_ARGS+= CONFIG_TREMOR=y

View File

@ -1,5 +1,2 @@
MD5 (cmus-v2.4.3.tar.bz2) = dUUs8AdjchTEq1RE4HYRSw==
RMD160 (cmus-v2.4.3.tar.bz2) = 5Brb2ijbUpskVEf3vfIs+N4RimI=
SHA1 (cmus-v2.4.3.tar.bz2) = umOkF7DfQvqaSFDdi5IqlaQm9/U=
SHA256 (cmus-v2.4.3.tar.bz2) = yLhT1sxN5sxij+HPSPWoQasjDYGL2/ORMbadiIRLz/4=
SIZE (cmus-v2.4.3.tar.bz2) = 204508
SHA256 (cmus-v2.5.0.tar.bz2) = ICH6tkCIiY1i0UOVJew0XiGfWNkanpM9yF6E7aIcjd8=
SIZE (cmus-v2.5.0.tar.bz2) = 224675

View File

@ -131,7 +131,7 @@ static int sndio_close(void)
return 0;
}
static int sndio_open(sample_format_t sf)
static int sndio_open(sample_format_t sf, const channel_position_t *channel_map)
{
hdl = sio_open(NULL, SIO_PLAY, 0);
if (hdl == NULL)

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-configure,v 1.1.1.1 2011/09/06 07:10:56 landry Exp $
$OpenBSD: patch-configure,v 1.2 2012/12/27 12:02:33 gonzalo Exp $
Remove -Wredundant-decls which makes a lot of useless noise on
OpenBSD because of some problems in system headers.
(+ sndio support)
--- configure.orig Sun Jul 24 11:42:22 2011
+++ configure Tue Aug 30 12:28:26 2011
--- configure.orig Wed Nov 7 09:46:17 2012
+++ configure Wed Nov 7 19:18:57 2012
@@ -5,7 +5,7 @@
check_cflags()
{
@ -13,14 +13,14 @@ OpenBSD because of some problems in system headers.
-Wextra -Wno-sign-compare -Wformat-security
for i in -Wdeclaration-after-statement \
@@ -276,6 +276,16 @@ check_sun()
@@ -307,6 +307,16 @@ check_sun()
fi
}
+check_sndio()
+{
+ case `uname -s` in
+ *BSD)
+ OpenBSD)
+ check_library SNDIO "" "-lsndio"
+ return $?
+ esac
@ -30,15 +30,15 @@ OpenBSD because of some problems in system headers.
check_waveout()
{
case `uname -s` in
@@ -365,6 +375,7 @@ Optional Features: y/n
@@ -438,6 +448,7 @@ Optional Features: y/n
CONFIG_ARTS ARTS [auto]
CONFIG_OSS Open Sound System [auto]
CONFIG_SUN Sun Audio [auto]
+ CONFIG_SNDIO Sndio [auto]
+ CONFIG_SNDIO Sndio [auto]
CONFIG_WAVEOUT Windows Wave Out [auto]
USE_FALLBACK_IP Use a specific IP for every unrecognized [n]
input format. Currently set to FFMPEG.
@@ -421,6 +432,7 @@ check check_ao CONFIG_AO
@@ -499,6 +510,7 @@ check check_ao CONFIG_AO
check check_arts CONFIG_ARTS
check check_oss CONFIG_OSS
check check_sun CONFIG_SUN
@ -46,10 +46,10 @@ OpenBSD because of some problems in system headers.
check check_waveout CONFIG_WAVEOUT
check check_roar CONFIG_ROAR
@@ -442,6 +454,6 @@ config_header config/iconv.h HAVE_ICONV
@@ -535,6 +547,6 @@ CFLAGS="${CFLAGS} -DHAVE_CONFIG"
makefile_vars bindir datadir libdir mandir exampledir
makefile_vars CONFIG_FLAC CONFIG_MAD CONFIG_MIKMOD CONFIG_MODPLUG CONFIG_MPC CONFIG_VORBIS CONFIG_WAVPACK CONFIG_WAV CONFIG_MP4 CONFIG_AAC CONFIG_FFMPEG
makefile_vars CONFIG_CDIO CONFIG_FLAC CONFIG_MAD CONFIG_MIKMOD CONFIG_MODPLUG CONFIG_MPC CONFIG_VORBIS CONFIG_WAVPACK CONFIG_WAV CONFIG_MP4 CONFIG_AAC CONFIG_FFMPEG CONFIG_CUE
-makefile_vars CONFIG_ROAR CONFIG_PULSE CONFIG_ALSA CONFIG_AO CONFIG_ARTS CONFIG_OSS CONFIG_SUN CONFIG_WAVEOUT
+makefile_vars CONFIG_ROAR CONFIG_PULSE CONFIG_ALSA CONFIG_AO CONFIG_ARTS CONFIG_OSS CONFIG_SUN CONFIG_SNDIO CONFIG_WAVEOUT

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-discid_c,v 1.1 2012/12/27 12:02:33 gonzalo Exp $
Hard-code /dev/rcd0c, until we make this use libdiscid.
--- discid.c.orig Wed Nov 7 09:46:17 2012
+++ discid.c Wed Nov 7 21:07:19 2012
@@ -40,7 +40,7 @@ char *get_default_cdda_device(void)
dev = discid_get_default_device();
#endif
if (!dev)
- dev = "/dev/cdrom";
+ dev = "/dev/rcd0c";
return xstrdup(dev);
}

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-lib_c,v 1.1 2012/12/27 12:02:33 gonzalo Exp $
Commit 2b3144f69d upstream ("lib: fix segfault caused by player-prev")
--- lib.c.orig Wed Nov 7 09:46:17 2012
+++ lib.c Sun Nov 18 19:45:38 2012
@@ -271,7 +271,7 @@ static struct tree_track *normal_get_prev(void)
if (!repeat)
return NULL;
/* last track of the album */
- return to_tree_track(rb_prev(&CUR_ALBUM->tree_node));
+ return album_last_track(CUR_ALBUM);
}
/* not first album of the artist? */

View File

@ -1,8 +1,10 @@
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2011/09/06 07:10:56 landry Exp $
@comment $OpenBSD: PLIST-main,v 1.2 2012/12/27 12:02:33 gonzalo Exp $
@bin bin/cmus
@bin bin/cmus-remote
lib/cmus/
lib/cmus/ip/
lib/cmus/ip/cdio.so
lib/cmus/ip/cue.so
lib/cmus/ip/mad.so
lib/cmus/ip/vorbis.so
lib/cmus/ip/wav.so
@ -19,5 +21,6 @@ share/cmus/green-mono-88.theme
share/cmus/green.theme
share/cmus/rc
share/cmus/xterm-white.theme
share/cmus/zenburn.theme
share/examples/cmus/
share/examples/cmus/cmus-status-display