summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorhans <hans@pkgsrc.org>2012-02-15 22:09:31 +0000
committerhans <hans@pkgsrc.org>2012-02-15 22:09:31 +0000
commitec578a8dfe7eec0c9d905c58f72f95b6c9e2da1a (patch)
treea8bfd509271438878469998f74bb35c22fca8d4f /audio
parent96ad965bb2d7af917697a20e5a6509d6c99edb0c (diff)
downloadpkgsrc-ec578a8dfe7eec0c9d905c58f72f95b6c9e2da1a.tar.gz
Fix build on SunOS.
Diffstat (limited to 'audio')
-rw-r--r--audio/mad123/distinfo7
-rw-r--r--audio/mad123/patches/patch-aa13
-rw-r--r--audio/mad123/patches/patch-ab44
-rw-r--r--audio/mad123/patches/patch-mp3__stream.c16
-rw-r--r--audio/maplay/Makefile4
5 files changed, 76 insertions, 8 deletions
diff --git a/audio/mad123/distinfo b/audio/mad123/distinfo
index 871606415d9..f719c74841b 100644
--- a/audio/mad123/distinfo
+++ b/audio/mad123/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.7 2012/02/05 20:39:50 sbd Exp $
+$NetBSD: distinfo,v 1.8 2012/02/15 22:09:31 hans Exp $
SHA1 (mad123-0.8.5.tar.gz) = 97c5d6185a54e2262d52a687ff3a3714ff260af8
RMD160 (mad123-0.8.5.tar.gz) = bd2bf0b79a3c9d3513583daccdfc182a2d17cc41
Size (mad123-0.8.5.tar.gz) = 24836 bytes
-SHA1 (patch-aa) = 16aecc1f75178cb62bca7d5012cea4dffe393f9c
-SHA1 (patch-ab) = d4522da4a3d11d6f758930a46be967b4e0fcd640
+SHA1 (patch-aa) = c2b6eb6eb4b23151c31ae7031150baae403aefad
+SHA1 (patch-ab) = 2384933ec17a47fc677a93f3fc8eeca32c1168b9
SHA1 (patch-ac) = 7c150b2f15cbc00876c8619b80ee29c73b0b71df
SHA1 (patch-audio__dev.h) = 699760f797aa4b90a5672b42b24e08443fe0ae69
+SHA1 (patch-mp3__stream.c) = bfd36ec13ab8f78e65007692195ed12275ffc0d8
diff --git a/audio/mad123/patches/patch-aa b/audio/mad123/patches/patch-aa
index 4d0684a8ab9..0e56b9851bf 100644
--- a/audio/mad123/patches/patch-aa
+++ b/audio/mad123/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1 2005/11/11 18:58:18 joerg Exp $
+$NetBSD: patch-aa,v 1.2 2012/02/15 22:09:31 hans Exp $
--- mad123.c.orig 2005-11-11 18:19:59.000000000 +0000
+++ mad123.c
@@ -10,3 +10,14 @@ $NetBSD: patch-aa,v 1.1 2005/11/11 18:58:18 joerg Exp $
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/poll.h>
+@@ -33,6 +34,10 @@
+ #include <unistd.h>
+ #include <mad.h>
+
++#ifdef __sun
++#include <sys/stropts.h>
++#endif
++
+ #include "audio_dev.h"
+ #include "mp3_stream.h"
+
diff --git a/audio/mad123/patches/patch-ab b/audio/mad123/patches/patch-ab
index c01c28464ec..fab7aa2f342 100644
--- a/audio/mad123/patches/patch-ab
+++ b/audio/mad123/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.2 2012/02/05 20:39:50 sbd Exp $
+$NetBSD: patch-ab,v 1.3 2012/02/15 22:09:31 hans Exp $
--- audio_dev.c.orig 2004-09-22 09:23:43.000000000 +0000
+++ audio_dev.c
@@ -12,7 +12,18 @@ $NetBSD: patch-ab,v 1.2 2012/02/05 20:39:50 sbd Exp $
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/wait.h>
-@@ -43,6 +45,10 @@
+@@ -35,6 +35,10 @@
+ #include <unistd.h>
+ #include <mad.h>
+
++#ifdef __sun
++#include <sys/stropts.h>
++#endif
++
+ #include "audio_dev.h"
+
+ #if (BYTE_ORDER == BIG_ENDIAN)
+@@ -43,6 +47,10 @@
#undef WORDS_BIGENDIAN
#endif
@@ -23,7 +34,25 @@ $NetBSD: patch-ab,v 1.2 2012/02/05 20:39:50 sbd Exp $
#define PCM_BUFFSIZE ((sizeof(((struct mad_pcm *)0)->samples) / \
sizeof(mad_fixed_t)) * 2)
struct pcm_data {
-@@ -97,8 +103,12 @@ static void audio_convert_dither(unsigne
+@@ -58,7 +66,7 @@ struct pcm_data {
+ #define PCM_LOW_WATER 32
+ struct pcm_buffer {
+ volatile int pb_command;
+- u_int64_t pb_playsamples;
++ uint64_t pb_playsamples;
+ int pb_rate;
+ int pb_nchannels;
+ volatile int pb_purge;
+@@ -74,7 +82,7 @@ struct audio_dev_ctx {
+ int ac_paused;
+ int ac_peerread;
+ int ac_peerwrite;
+- u_int64_t ac_buffersamples;
++ uint64_t ac_buffersamples;
+ void (*ac_readcallback)(void *);
+ void *ac_cbarg;
+ struct pcm_buffer *ac_pcm;
+@@ -97,8 +105,12 @@ static void audio_convert_dither(unsigne
static const struct audio_dev_backend *audio_dev_backends[] = {
@@ -36,3 +65,12 @@ $NetBSD: patch-ab,v 1.2 2012/02/05 20:39:50 sbd Exp $
#ifndef NOARTS
&audio_dev_arts,
#endif
+@@ -326,7 +338,7 @@ audio_dev_output(struct audio_dev_ctx *a
+ pd->pd_len = len;
+
+ written /= pd->pd_nchannels;
+- written /= sizeof(u_int16_t);
++ written /= sizeof(uint16_t);
+ ac->ac_pcm->pb_playsamples += written;
+
+ return ((rv >= 0) ? 0 : -1);
diff --git a/audio/mad123/patches/patch-mp3__stream.c b/audio/mad123/patches/patch-mp3__stream.c
new file mode 100644
index 00000000000..33678b511ba
--- /dev/null
+++ b/audio/mad123/patches/patch-mp3__stream.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-mp3__stream.c,v 1.1 2012/02/15 22:09:31 hans Exp $
+
+--- mp3_stream.c.orig 2004-10-21 11:11:42.000000000 +0200
++++ mp3_stream.c 2012-01-11 19:53:46.065401047 +0100
+@@ -41,6 +41,11 @@
+ #endif /* NOTAGLIB */
+ #include <unistd.h> /* Move *after* curl.h, 'cos it's braindamaged */
+
++#ifdef __sun
++#define madvise posix_madvise
++#define MAP_FILE 0
++#endif
++
+ #include "mp3_stream.h"
+
+ static void *mps_file_open(const char *, int);
diff --git a/audio/maplay/Makefile b/audio/maplay/Makefile
index e27bf73fd94..8ac5b875d53 100644
--- a/audio/maplay/Makefile
+++ b/audio/maplay/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2011/11/22 20:57:34 wiz Exp $
+# $NetBSD: Makefile,v 1.24 2012/02/15 22:11:04 hans Exp $
DISTNAME= maplay1_2
PKGNAME= maplay-1.2
@@ -20,6 +20,8 @@ NOT_FOR_PLATFORM= Interix-*-*
INSTALLATION_DIRS= bin
+MAKE_ENV+= INSTALL=${TOOLS_PATH.install:Q}
+
pre-configure:
cd ${WRKSRC} && ${MAKE} pre-install