summaryrefslogtreecommitdiff
path: root/audio/cmus
diff options
context:
space:
mode:
Diffstat (limited to 'audio/cmus')
-rw-r--r--audio/cmus/Makefile4
-rw-r--r--audio/cmus/distinfo4
-rw-r--r--audio/cmus/patches/patch-mixer__sun.c51
-rw-r--r--audio/cmus/patches/patch-sun.c57
4 files changed, 114 insertions, 2 deletions
diff --git a/audio/cmus/Makefile b/audio/cmus/Makefile
index 6919b5d265c..df74f52f621 100644
--- a/audio/cmus/Makefile
+++ b/audio/cmus/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2012/02/06 12:39:20 wiz Exp $
+# $NetBSD: Makefile,v 1.36 2012/02/15 20:15:42 hans Exp $
#
DISTNAME= cmus-v2.4.3
@@ -20,6 +20,8 @@ PKG_DESTDIR_SUPPORT= user-destdir
HAS_CONFIGURE= yes
USE_TOOLS+= gmake pkg-config
+REPLACE_SH+= cmus-status-display
+
CONFIGURE_ARGS+= prefix=${PREFIX}
CONFIGURE_ARGS+= CONFIG_ALSA=n
CONFIGURE_ARGS+= mandir=${PREFIX}/${PKGMANDIR}/
diff --git a/audio/cmus/distinfo b/audio/cmus/distinfo
index c104d71f9b0..a89a4621a86 100644
--- a/audio/cmus/distinfo
+++ b/audio/cmus/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.14 2012/01/22 12:23:51 gls Exp $
+$NetBSD: distinfo,v 1.15 2012/02/15 20:15:42 hans Exp $
SHA1 (cmus-v2.4.3.tar.bz2) = ba63a417b0df42fa9a4850dd8b922a95a426f7f5
RMD160 (cmus-v2.4.3.tar.bz2) = e41adbda28db529b245447f7bdf22cf8de118a62
Size (cmus-v2.4.3.tar.bz2) = 204508 bytes
+SHA1 (patch-mixer__sun.c) = ffab27aa6c24715d78757015f4dcb2a53f2920b0
+SHA1 (patch-sun.c) = b3abbd3446b695c8d0aec9d9132328e92511b475
diff --git a/audio/cmus/patches/patch-mixer__sun.c b/audio/cmus/patches/patch-mixer__sun.c
new file mode 100644
index 00000000000..6fcb3e8d2fc
--- /dev/null
+++ b/audio/cmus/patches/patch-mixer__sun.c
@@ -0,0 +1,51 @@
+$NetBSD: patch-mixer__sun.c,v 1.1 2012/02/15 20:15:42 hans Exp $
+
+--- mixer_sun.c.orig 2011-11-30 09:57:20.000000000 +0100
++++ mixer_sun.c 2012-02-15 21:12:05.691072986 +0100
+@@ -55,6 +55,7 @@ static int sun_mixer_get_option(int, cha
+
+ static int mixer_open(const char *dev)
+ {
++#ifdef AUDIO_MIXER_DEVINFO
+ struct mixer_devinfo minf;
+ int output_class;
+
+@@ -100,6 +101,7 @@ static int mixer_open(const char *dev)
+
+ if (sun_mixer_volume_delta == 0)
+ sun_mixer_volume_delta = 1;
++#endif
+
+ return 0;
+
+@@ -192,6 +194,7 @@ static int sun_mixer_close(void)
+
+ static int sun_mixer_set_volume(int l, int r)
+ {
++#ifdef AUDIO_MIXER_DEVINFO
+ struct mixer_ctrl minf;
+ int ovall, ovalr;
+
+@@ -215,12 +218,14 @@ static int sun_mixer_set_volume(int l, i
+
+ if (ioctl(mixer_fd, AUDIO_MIXER_WRITE, &minf) == -1)
+ return -1;
++#endif
+
+ return 0;
+ }
+
+ static int sun_mixer_get_volume(int *l, int *r)
+ {
++#ifdef AUDIO_MIXER_DEVINFO
+ struct mixer_ctrl minf;
+
+ minf.dev = sun_mixer_device_id;
+@@ -237,6 +242,7 @@ static int sun_mixer_get_volume(int *l,
+ *l = minf.un.value.level[AUDIO_MIXER_LEVEL_LEFT];
+ *r = minf.un.value.level[AUDIO_MIXER_LEVEL_RIGHT];
+ }
++#endif
+
+ return 0;
+ }
diff --git a/audio/cmus/patches/patch-sun.c b/audio/cmus/patches/patch-sun.c
new file mode 100644
index 00000000000..7323c0068a3
--- /dev/null
+++ b/audio/cmus/patches/patch-sun.c
@@ -0,0 +1,57 @@
+$NetBSD: patch-sun.c,v 1.1 2012/02/15 20:15:42 hans Exp $
+
+--- sun.c.orig 2011-11-30 09:57:20.000000000 +0100
++++ sun.c 2012-02-15 21:12:09.658462551 +0100
+@@ -32,6 +32,26 @@
+ #include "sf.h"
+ #include "xmalloc.h"
+
++/* Compatibility defines, for old *BSD or SunOS systems */
++#ifndef AUDIO_ENCODING_SLINEAR_LE
++#define AUDIO_ENCODING_SLINEAR_LE AUDIO_ENCODING_LINEAR
++#endif
++#ifndef AUDIO_ENCODING_SLINEAR_BE
++#define AUDIO_ENCODING_SLINEAR_BE AUDIO_ENCODING_LINEAR
++#endif
++#ifndef AUDIO_ENCODING_ULINEAR_BE
++#define AUDIO_ENCODING_ULINEAR_BE AUDIO_ENCODING_LINEAR
++#endif
++#ifndef AUDIO_ENCODING_ULINEAR_LE
++#define AUDIO_ENCODING_ULINEAR_LE AUDIO_ENCODING_LINEAR
++#endif
++#ifndef AUDIO_ENCODING_SLINEAR
++#define AUDIO_ENCODING_SLINEAR AUDIO_ENCODING_LINEAR8
++#endif
++#ifndef AUDIO_ENCODING_ULINEAR
++#define AUDIO_ENCODING_ULINEAR AUDIO_ENCODING_LINEAR8
++#endif
++
+ static sample_format_t sun_sf;
+ static int sun_fd = -1;
+
+@@ -39,7 +59,11 @@ static char *sun_audio_device = NULL;
+
+ static int sun_reset(void)
+ {
++#if defined(AUDIO_FLUSH) /* BSD extension */
+ if (ioctl(sun_fd, AUDIO_FLUSH, NULL) == -1)
++#elif defined(I_FLUSH) && defined(FLUSHW)
++ if (ioctl(sun_fd, I_FLUSH, FLUSHW) == -1)
++#endif
+ return -1;
+
+ return 0;
+@@ -57,7 +81,13 @@ static int sun_set_sf(sample_format_t sf
+ ainf.play.channels = sf_get_channels(sun_sf);
+ ainf.play.sample_rate = sf_get_rate(sun_sf);
+ ainf.play.pause = 0;
++#if defined __NetBSD__ || defined __OpenBSD__
++#if defined AUMODE_PLAY_ALL
++ ainf.mode = AUMODE_PLAY | AUMODE_PLAY_ALL;
++#else
+ ainf.mode = AUMODE_PLAY;
++#endif
++#endif
+
+ switch (sf_get_bits(sun_sf)) {
+ case 16: