View | Details | Raw Unified | Return to bug 191524 | Differences between
and this patch

Collapse All | Expand All

(-)audio/alsa-lib/Makefile (-11 / +9 lines)
Lines 2-36 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	alsa-lib
4
PORTNAME=	alsa-lib
5
PORTVERSION=	1.0.27.2
5
PORTVERSION=	1.0.28
6
PORTREVISION=	2
7
CATEGORIES=	audio
6
CATEGORIES=	audio
8
MASTER_SITES=	ALSA/lib \
7
MASTER_SITES=	ALSA/lib \
9
		GENTOO/distfiles
8
		GENTOO/distfiles
10
9
11
MAINTAINER=	aragon@phat.za.net
10
MAINTAINER=	jbeich@vfemail.net
12
COMMENT=	ALSA compatibility library
11
COMMENT=	ALSA compatibility library
13
12
13
LICENSE=	LGPL21 # or any later version
14
14
USES=		tar:bzip2 libtool:keepla
15
USES=		tar:bzip2 libtool:keepla
15
USE_LDCONFIG=	yes
16
USE_LDCONFIG=	yes
16
GNU_CONFIGURE=	yes
17
GNU_CONFIGURE=	yes
17
CONFIGURE_ARGS=	--with-pkgconfdir="\$${prefix}/libdata/pkgconfig"
18
CONFIGURE_ARGS=	--with-pkgconfdir="\$${prefix}/libdata/pkgconfig"
18
INSTALL_TARGET=	install-strip
19
INSTALL_TARGET=	install-strip
20
CPPFLAGS+=	-I${FILESDIR}
19
21
20
OPTIONS_DEFINE=	PYTHON
22
OPTIONS_DEFINE=	PYTHON
21
OPTIONS_SUB=	${OPTIONS_DEFINE}
23
OPTIONS_SUB=	yes
22
24
23
.include <bsd.port.options.mk>
25
PYTHON_CONFIGURE_ENABLE=python
26
PYTHON_USE=	PYTHON=2
24
27
25
.if ${PORT_OPTIONS:MPYTHON}
26
USE_PYTHON=	2
27
.else
28
CONFIGURE_ARGS+=--disable-python
29
.endif
30
31
post-patch:	.SILENT
28
post-patch:	.SILENT
32
	${REINPLACE_CMD} -e '/LIBS/ { s/-ldl//g; s/-lrt//g; }' \
29
	${REINPLACE_CMD} -e '/LIBS/ { s/-ldl//g; s/-lrt//g; }' \
33
		-e 's/python-config/${PYTHON_CMD:T}-config/g' \
30
		-e 's/python-config/${PYTHON_CMD:T}-config/g' \
31
		-e '/pythonlibs/s/--libs/--ldflags/' \
34
		-e '/-D_GNU_SOURCE/d' \
32
		-e '/-D_GNU_SOURCE/d' \
35
		-e '/lt_cv_dlopen/s/-ldl//g' ${WRKSRC}/configure
33
		-e '/lt_cv_dlopen/s/-ldl//g' ${WRKSRC}/configure
36
	${REINPLACE_CMD} '/LIBADD/s/-ldl//g' \
34
	${REINPLACE_CMD} '/LIBADD/s/-ldl//g' \
(-)audio/alsa-lib/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (alsa-lib-1.0.27.2.tar.bz2) = 690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19
1
SHA256 (alsa-lib-1.0.28.tar.bz2) = 3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d
2
SIZE (alsa-lib-1.0.27.2.tar.bz2) = 906844
2
SIZE (alsa-lib-1.0.28.tar.bz2) = 903786
(-)audio/alsa-lib/files/asound.conf.sample (-53 / +15 lines)
Lines 1-13 Link Here
1
#
1
#
2
# FreeBSD/OSS
2
# FreeBSD/OSS
3
#
3
#
4
pcm_slave.oss {
5
	pcm.type oss
6
}
7
8
pcm.!default {
4
pcm.!default {
9
	type plug
5
	type plug
10
	slave oss
6
	slave.pcm.type oss
11
}
7
}
12
8
13
ctl.!default {
9
ctl.!default {
Lines 15-68 ctl.!default { Link Here
15
}
11
}
16
12
17
#
13
#
18
# Remap all possible surround stuffs.
19
#
20
pcm.!front {
21
	type plug
22
	slave oss
23
}
24
25
pcm.!rear {
26
	type plug
27
	slave oss
28
}
29
30
pcm.!center_lfe {
31
	type plug
32
	slave oss
33
}
34
35
pcm.!side {
36
	type plug
37
	slave oss
38
}
39
40
pcm.!surround40 {
41
	type plug
42
	slave oss
43
}
44
45
pcm.!surround41 {
46
	type plug
47
	slave oss
48
}
49
50
pcm.!surround50 {
51
	type plug
52
	slave oss
53
}
54
55
pcm.!surround51 {
56
	type plug
57
	slave oss
58
}
59
60
pcm.!surround71 {
61
	type plug
62
	slave oss
63
}
64
65
#
66
# Pulseaudio
14
# Pulseaudio
67
#
15
#
68
# pcm.!default {
16
# pcm.!default {
Lines 72-74 ctl.!default { Link Here
72
# ctl.!default {
20
# ctl.!default {
73
# 	type pulse
21
# 	type pulse
74
# }
22
# }
23
24
#
25
# Remap all possible surround stuffs.
26
#
27
pcm.!front pcm.default
28
pcm.!rear pcm.default
29
pcm.!center_lfe pcm.default
30
pcm.!side pcm.default
31
pcm.!surround21 pcm.default
32
pcm.!surround40 pcm.default
33
pcm.!surround41 pcm.default
34
pcm.!surround50 pcm.default
35
pcm.!surround51 pcm.default
36
pcm.!surround71 pcm.default
(-)audio/alsa-lib/files/byteswap.h (+13 lines)
Line 0 Link Here
1
#ifndef _BYTESWAP_H
2
#define _BYTESWAP_H
3
4
#ifdef __OpenBSD__
5
#define bswap_16(x)	swap16(x)
6
#define bswap_32(x)	swap32(x)
7
#define bswap_64(x)	swap64(x)
8
#else
9
#define bswap_16(x)	bswap16(x)
10
#define bswap_32(x)	bswap32(x)
11
#define bswap_64(x)	bswap64(x)
12
#endif
13
#endif /* _BYTESWAP_H */
(-)audio/alsa-lib/files/linux/ioctl.h (+4 lines)
Line 0 Link Here
1
#ifndef _LINUX_IOCTL_H
2
#define _LINUX_IOCTL_H
3
#include <sys/ioccom.h>
4
#endif /* _LINUX_IOCTL_H */
(-)audio/alsa-lib/files/linux/types.h (+11 lines)
Line 0 Link Here
1
#ifndef _LINUX_TYPES_H
2
#define _LINUX_TYPES_H
3
4
#define __bitwise
5
6
typedef int __kernel_pid_t;
7
typedef off_t __kernel_off_t;
8
9
typedef uint32_t __u32;
10
typedef uint64_t __u64;
11
#endif /* _LINUX_TYPES_H */
(-)audio/alsa-lib/files/malloc.h (+4 lines)
Line 0 Link Here
1
#ifndef _MALLOC_H
2
#define	_MALLOC_H
3
#include <stdlib.h>
4
#endif /* _MALLOC_H */
(-)audio/alsa-lib/files/patch-alsa-lib (-561 lines)
Lines 1-561 Link Here
1
--- include/asoundlib-head.h.orig	2009-09-09 20:34:54.000000000 +0800
2
+++ include/asoundlib-head.h	2009-09-15 00:35:55.000000000 +0800
3
@@ -34,7 +34,11 @@
4
 #include <string.h>
5
 #include <fcntl.h>
6
 #include <assert.h>
7
+#ifdef __FreeBSD__
8
+#include <sys/endian.h>
9
+#else
10
 #include <endian.h>
11
+#endif
12
 #include <sys/poll.h>
13
 #include <errno.h>
14
 #include <stdarg.h>
15
@@ -46,3 +50,31 @@
16
 #include <alsa/output.h>
17
 #include <alsa/error.h>
18
 #include <alsa/conf.h>
19
+
20
+#ifdef __FreeBSD__
21
+
22
+#define ESTRPIPE	0x7a69	/* Linux PCM suspend errno, fehh?! */
23
+#define EBADFD		EBADF
24
+
25
+#define bswap_16(x)	bswap16(x)
26
+#define bswap_32(x)	bswap32(x)
27
+#define bswap_64(x)	bswap64(x)
28
+
29
+#if __BYTE_ORDER == __LITTLE_ENDIAN
30
+#define __cpu_to_le32(x) (x)
31
+#define __cpu_to_be32(x) bswap_32(x)
32
+#define __cpu_to_le16(x) (x)
33
+#define __cpu_to_be16(x) bswap_16(x)
34
+#else
35
+#define __cpu_to_le32(x) bswap_32(x)
36
+#define __cpu_to_be32(x) (x)
37
+#define __cpu_to_le16(x) bswap_16(x)
38
+#define __cpu_to_be16(x) (x)
39
+#endif
40
+
41
+#define __le32_to_cpu __cpu_to_le32
42
+#define __be32_to_cpu __cpu_to_be32
43
+#define __le16_to_cpu __cpu_to_le16
44
+#define __be16_to_cpu __cpu_to_be16
45
+
46
+#endif	/* !__FreeBSD__ */
47
--- include/global.h.orig	2009-09-09 20:34:54.000000000 +0800
48
+++ include/global.h	2009-09-15 00:39:54.000000000 +0800
49
@@ -133,7 +133,7 @@
50
 
51
 int snd_user_file(const char *file, char **result);
52
 
53
-#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
54
+#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE) && !defined(__FreeBSD__)
55
 struct timeval {
56
 	time_t		tv_sec;		/* seconds */
57
 	long		tv_usec;	/* microseconds */
58
--- include/local.h.orig	2009-09-09 20:34:54.000000000 +0800
59
+++ include/local.h	2009-09-15 00:26:08.000000000 +0800
60
@@ -28,11 +28,19 @@
61
 #include <string.h>
62
 #include <fcntl.h>
63
 #include <assert.h>
64
+#ifdef __FreeBSD__
65
+#include <sys/endian.h>
66
+#else
67
 #include <endian.h>
68
+#endif
69
 #include <stdarg.h>
70
 #include <sys/poll.h>
71
 #include <errno.h>
72
+#ifdef __linux__
73
 #include <linux/ioctl.h>
74
+#else
75
+#include <sys/ioctl.h>
76
+#endif
77
 
78
 #include "config.h"
79
 #ifdef SUPPORT_RESMGR
80
--- include/search.h.orig	2009-09-09 20:34:54.000000000 +0800
81
+++ include/search.h	2009-09-15 00:49:10.000000000 +0800
82
@@ -20,7 +20,9 @@
83
 #ifndef _SEARCH_H
84
 #define	_SEARCH_H 1
85
 
86
+#ifndef __FreeBSD__
87
 #include <features.h>
88
+#endif
89
 
90
 #define __need_size_t
91
 #include <stddef.h>
92
@@ -49,10 +51,18 @@
93
 #endif
94
 
95
 
96
+#ifdef __FreeBSD__
97
+#define __PMT	__P
98
+#endif
99
+
100
 /* For use with hsearch(3).  */
101
 #ifndef __COMPAR_FN_T
102
 # define __COMPAR_FN_T
103
+#ifdef __FreeBSD__
104
+typedef int (*__compar_fn_t) __PMT ((__const void *, __const void *));
105
+#else
106
 typedef int (*__compar_fn_t) __PMT ((__const __ptr_t, __const __ptr_t));
107
+#endif
108
 
109
 # ifdef	__USE_GNU
110
 typedef __compar_fn_t comparison_fn_t;
111
--- include/sound/asound.h.orig	2009-09-09 20:34:54.000000000 +0800
112
+++ include/sound/asound.h	2009-09-15 00:44:37.000000000 +0800
113
@@ -23,9 +23,42 @@
114
 #ifndef _UAPI__SOUND_ASOUND_H
115
 #define _UAPI__SOUND_ASOUND_H
116
 
117
+#ifdef __linux__
118
 #include <linux/types.h>
119
+#else
120
+#define __bitwise
121
+typedef uint32_t __u32;
122
+typedef int __kernel_pid_t;
123
+#endif
124
+
125
 
126
+#ifdef __FreeBSD__
127
+#define ESTRPIPE	0x7a69	/* Linux PCM suspend errno, fehh?! */
128
+#define EBADFD		EBADF
129
+
130
+typedef uint64_t __u64;
131
+
132
+#define bswap_16(x)	bswap16(x)
133
+#define bswap_32(x)	bswap32(x)
134
+#define bswap_64(x)	bswap64(x)
135
+
136
+#if __BYTE_ORDER == __LITTLE_ENDIAN
137
+#define __cpu_to_le32(x) (x)
138
+#define __cpu_to_be32(x) bswap_32(x)
139
+#define __cpu_to_le16(x) (x)
140
+#define __cpu_to_be16(x) bswap_16(x)
141
+#else
142
+#define __cpu_to_le32(x) bswap_32(x)
143
+#define __cpu_to_be32(x) (x)
144
+#define __cpu_to_le16(x) bswap_16(x)
145
+#define __cpu_to_be16(x) (x)
146
+#endif
147
 
148
+#define __le32_to_cpu __cpu_to_le32
149
+#define __be32_to_cpu __cpu_to_be32
150
+#define __le16_to_cpu __cpu_to_le16
151
+#define __be16_to_cpu __cpu_to_be16
152
+#endif
153
 /*
154
  *  protocol version
155
  */
156
--- include/sound/type_compat.h.orig	2009-09-09 20:34:54.000000000 +0800
157
+++ include/sound/type_compat.h	2009-09-15 00:36:14.000000000 +0800
158
@@ -10,8 +10,15 @@
159
 typedef int16_t __s16;
160
 typedef int32_t __s32;
161
 
162
+#ifdef __FreeBSD__
163
+#include <sys/endian.h>
164
+#define bswap_16(x)	bswap16(x)
165
+#define bswap_32(x)	bswap32(x)
166
+#define bswap_64(x)	bswap64(x)
167
+#else
168
 #include <endian.h>
169
 #include <byteswap.h>
170
+#endif
171
 #if __BYTE_ORDER == __LITTLE_ENDIAN
172
 #define __cpu_to_le32(x) (x)
173
 #define __cpu_to_be32(x) bswap_32(x)
174
$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
175
176
--- src/async.c.orig	2008-12-25 08:18:22 +0200
177
+++ src/async.c	2008-12-25 08:20:39 +0200
178
@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
179
 
180
 static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
181
 {
182
+#if defined(__DragonFly__) || defined(__FreeBSD__)
183
+	/* XXX XXX XXX */
184
+	struct list_head *i;
185
+	list_for_each(i, &snd_async_handlers) {
186
+		snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
187
+		if (h->callback)
188
+			h->callback(h);
189
+	}
190
+#else
191
 	int fd;
192
 	struct list_head *i;
193
 	//assert(siginfo->si_code == SI_SIGIO);
194
@@ -60,6 +61,7 @@
195
 		if (h->fd == fd && h->callback)
196
 			h->callback(h);
197
 	}
198
+#endif
199
 }
200
 
201
 /**
202
--- src/compat/hsearch_r.c.orig	2009-09-09 20:34:54.000000000 +0800
203
+++ src/compat/hsearch_r.c	2009-09-15 00:22:11.000000000 +0800
204
@@ -18,7 +18,11 @@
205
    Boston, MA 02111-1307, USA.  */
206
 
207
 #include <errno.h>
208
+#ifdef __GLIBC__
209
 #include <malloc.h>
210
+#else
211
+#include <stdlib.h>
212
+#endif
213
 #include <string.h>
214
 
215
 #define __USE_GNU
216
--- src/conf.c.orig
217
+++ src/conf.c
218
@@ -428,7 +428,11 @@ beginning:</P>
219
 
220
 #ifdef HAVE_LIBPTHREAD
221
 static pthread_mutex_t snd_config_update_mutex =
222
+#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
223
 				PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
224
+#else
225
+				PTHREAD_MUTEX_INITIALIZER;
226
+#endif
227
 #endif
228
 
229
 struct _snd_config {
230
--- src/pcm/pcm.c.orig	2009-09-09 20:34:54.000000000 +0800
231
+++ src/pcm/pcm.c	2009-09-15 00:19:09.000000000 +0800
232
@@ -630,7 +630,9 @@
233
 
234
 #include <stdio.h>
235
 #include <string.h>
236
+#ifndef __FreeBSD__
237
 #include <malloc.h>
238
+#endif
239
 #include <stdarg.h>
240
 #include <signal.h>
241
 #include <sys/poll.h>
242
--- src/pcm/pcm_adpcm.c.orig	2009-09-09 20:34:54.000000000 +0800
243
+++ src/pcm/pcm_adpcm.c	2009-09-15 00:19:14.000000000 +0800
244
@@ -56,7 +56,9 @@
245
   come across a good description of XA yet.
246
  */
247
 
248
+#ifndef __FreeBSD__
249
 #include <byteswap.h>
250
+#endif
251
 #include "pcm_local.h"
252
 #include "pcm_plugin.h"
253
 
254
--- src/pcm/pcm_alaw.c.orig	2009-09-09 20:34:54.000000000 +0800
255
+++ src/pcm/pcm_alaw.c	2009-09-15 00:19:19.000000000 +0800
256
@@ -26,7 +26,9 @@
257
  *
258
  */
259
   
260
+#ifndef __FreeBSD__
261
 #include <byteswap.h>
262
+#endif
263
 #include "pcm_local.h"
264
 #include "pcm_plugin.h"
265
 
266
--- src/pcm/pcm_copy.c.orig	2009-09-09 20:34:54.000000000 +0800
267
+++ src/pcm/pcm_copy.c	2009-09-15 00:21:29.000000000 +0800
268
@@ -26,7 +26,9 @@
269
  *
270
  */
271
   
272
+#ifndef __FreeBSD__
273
 #include <byteswap.h>
274
+#endif
275
 #include "pcm_local.h"
276
 #include "pcm_plugin.h"
277
 
278
--- src/pcm/pcm_direct.c.orig	2009-09-09 20:34:54.000000000 +0800
279
+++ src/pcm/pcm_direct.c	2009-09-15 00:45:34.000000000 +0800
280
@@ -44,12 +44,14 @@
281
  *
282
  */
283
  
284
+#ifndef __FreeBSD__
285
 union semun {
286
 	int              val;    /* Value for SETVAL */
287
 	struct semid_ds *buf;    /* Buffer for IPC_STAT, IPC_SET */
288
 	unsigned short  *array;  /* Array for GETALL, SETALL */
289
 	struct seminfo  *__buf;  /* Buffer for IPC_INFO (Linux specific) */
290
 };
291
+#endif
292
  
293
 /*
294
  * FIXME:
295
--- src/pcm/pcm_dmix_generic.c.orig	2009-09-09 20:34:54.000000000 +0800
296
+++ src/pcm/pcm_dmix_generic.c	2009-09-15 00:18:52.000000000 +0800
297
@@ -125,7 +125,9 @@
298
 	 (1ULL << SND_PCM_FORMAT_S24_3LE) | \
299
 	 (1ULL << SND_PCM_FORMAT_U8))
300
 
301
+#ifndef __FreeBSD__
302
 #include <byteswap.h>
303
+#endif
304
 
305
 static void generic_mix_areas_16_native(unsigned int size,
306
 					volatile signed short *dst,
307
--- src/pcm/pcm_file.c.orig	2009-09-09 20:34:54.000000000 +0800
308
+++ src/pcm/pcm_file.c	2009-09-15 00:21:10.000000000 +0800
309
@@ -26,8 +26,12 @@
310
  *
311
  */
312
   
313
+#ifdef __FreeBSD__
314
+#include <sys/endian.h>
315
+#else
316
 #include <endian.h>
317
 #include <byteswap.h>
318
+#endif
319
 #include <ctype.h>
320
 #include <string.h>
321
 #include "pcm_local.h"
322
--- src/pcm/pcm_iec958.c.orig	2009-09-09 20:34:54.000000000 +0800
323
+++ src/pcm/pcm_iec958.c	2009-09-15 00:19:44.000000000 +0800
324
@@ -26,7 +26,9 @@
325
  *
326
  */
327
   
328
+#ifndef __FreeBSD__
329
 #include <byteswap.h>
330
+#endif
331
 #include "pcm_local.h"
332
 #include "pcm_plugin.h"
333
 
334
--- src/pcm/pcm_lfloat.c.orig	2009-09-09 20:34:54.000000000 +0800
335
+++ src/pcm/pcm_lfloat.c	2009-09-15 00:21:48.000000000 +0800
336
@@ -26,7 +26,9 @@
337
  *
338
  */
339
   
340
+#ifndef __FreeBSD__
341
 #include <byteswap.h>
342
+#endif
343
 #include "pcm_local.h"
344
 #include "pcm_plugin.h"
345
 
346
--- src/pcm/pcm_linear.c.orig	2009-09-09 20:34:54.000000000 +0800
347
+++ src/pcm/pcm_linear.c	2009-09-15 00:21:37.000000000 +0800
348
@@ -26,7 +26,9 @@
349
  *
350
  */
351
   
352
+#ifndef __FreeBSD__
353
 #include <byteswap.h>
354
+#endif
355
 #include "pcm_local.h"
356
 #include "pcm_plugin.h"
357
 
358
--- src/pcm/pcm_meter.c.orig	2009-09-09 20:34:54.000000000 +0800
359
+++ src/pcm/pcm_meter.c	2009-09-15 00:18:38.000000000 +0800
360
@@ -27,7 +27,9 @@
361
  */
362
   
363
 
364
+#ifndef __FreeBSD__
365
 #include <byteswap.h>
366
+#endif
367
 #include <time.h>
368
 #include <pthread.h>
369
 #include <dlfcn.h>
370
--- src/pcm/pcm_misc.c.orig	2009-09-09 20:34:54.000000000 +0800
371
+++ src/pcm/pcm_misc.c	2009-09-15 00:18:31.000000000 +0800
372
@@ -23,7 +23,9 @@
373
 #include <stdlib.h>
374
 #include <unistd.h>
375
 #include <string.h>
376
+#ifndef __FreeBSD__
377
 #include <byteswap.h>
378
+#endif
379
 #include "pcm_local.h"
380
 
381
 
382
--- src/pcm/pcm_mmap.c.orig	2009-09-09 20:34:54.000000000 +0800
383
+++ src/pcm/pcm_mmap.c	2009-09-15 00:17:43.000000000 +0800
384
@@ -19,7 +19,9 @@
385
  */
386
   
387
 #include <stdio.h>
388
+#ifndef __FreeBSD__
389
 #include <malloc.h>
390
+#endif
391
 #include <string.h>
392
 #include <sys/poll.h>
393
 #include <sys/mman.h>
394
--- src/pcm/pcm_mulaw.c.orig	2009-09-09 20:34:54.000000000 +0800
395
+++ src/pcm/pcm_mulaw.c	2009-09-15 00:21:21.000000000 +0800
396
@@ -26,7 +26,9 @@
397
  *
398
  */
399
   
400
+#ifndef __FreeBSD__
401
 #include <byteswap.h>
402
+#endif
403
 #include "pcm_local.h"
404
 #include "pcm_plugin.h"
405
 
406
--- src/pcm/pcm_null.c.orig	2009-09-09 20:34:54.000000000 +0800
407
+++ src/pcm/pcm_null.c	2009-09-15 00:19:32.000000000 +0800
408
@@ -26,7 +26,9 @@
409
  *
410
  */
411
   
412
+#ifndef __FreeBSD__
413
 #include <byteswap.h>
414
+#endif
415
 #include <limits.h>
416
 #include <sys/shm.h>
417
 #include "pcm_local.h"
418
--- src/pcm/pcm_rate.c.orig	2009-09-09 20:34:54.000000000 +0800
419
+++ src/pcm/pcm_rate.c	2009-09-15 00:21:43.000000000 +0800
420
@@ -28,7 +28,9 @@
421
  *
422
  */
423
 #include <inttypes.h>
424
+#ifndef __FreeBSD__
425
 #include <byteswap.h>
426
+#endif
427
 #include "pcm_local.h"
428
 #include "pcm_plugin.h"
429
 #include "pcm_rate.h"
430
--- src/pcm/pcm_rate_linear.c.orig	2009-09-09 20:34:54.000000000 +0800
431
+++ src/pcm/pcm_rate_linear.c	2009-09-15 00:19:26.000000000 +0800
432
@@ -21,7 +21,9 @@
433
  */
434
 
435
 #include <inttypes.h>
436
+#ifndef __FreeBSD__
437
 #include <byteswap.h>
438
+#endif
439
 #include "pcm_local.h"
440
 #include "pcm_plugin.h"
441
 #include "pcm_rate.h"
442
--- src/pcm/pcm_route.c.orig	2009-09-09 20:34:54.000000000 +0800
443
+++ src/pcm/pcm_route.c	2009-09-15 00:19:38.000000000 +0800
444
@@ -26,7 +26,9 @@
445
  *
446
  */
447
   
448
+#ifndef __FreeBSD__
449
 #include <byteswap.h>
450
+#endif
451
 #include <math.h>
452
 #include "pcm_local.h"
453
 #include "pcm_plugin.h"
454
--- src/pcm/pcm_softvol.c.orig	2009-09-09 20:34:54.000000000 +0800
455
+++ src/pcm/pcm_softvol.c	2009-09-15 00:19:02.000000000 +0800
456
@@ -26,7 +26,9 @@
457
  *
458
  */
459
 
460
+#ifndef __FreeBSD__
461
 #include <byteswap.h>
462
+#endif
463
 #include <math.h>
464
 #include "pcm_local.h"
465
 #include "pcm_plugin.h"
466
--- src/seq/seq_midi_event.c.orig	2009-09-09 20:34:54.000000000 +0800
467
+++ src/seq/seq_midi_event.c	2009-09-15 00:21:55.000000000 +0800
468
@@ -28,7 +28,9 @@
469
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
470
  */
471
 
472
+#ifndef __FreeBSD__
473
 #include <malloc.h>
474
+#endif
475
 #include "local.h"
476
 
477
 #ifndef DOC_HIDDEN
478
--- src/shmarea.c.orig	2009-09-09 20:34:54.000000000 +0800
479
+++ src/shmarea.c	2009-09-15 00:22:00.000000000 +0800
480
@@ -19,7 +19,11 @@
481
  */
482
   
483
 #include <stdio.h>
484
+#ifdef __GLIBC__
485
 #include <malloc.h>
486
+#else
487
+#include <stdlib.h>
488
+#endif
489
 #include <string.h>
490
 #include <errno.h>
491
 #include <sys/poll.h>
492
--- src/userfile.c.orig	2009-09-09 20:34:54.000000000 +0800
493
+++ src/userfile.c	2009-09-18 00:57:22.000000000 +0800
494
@@ -19,9 +19,47 @@
495
  */
496
   
497
 #include <config.h>
498
+#ifdef __FreeBSD__
499
+#include <stdlib.h>
500
+#endif
501
 #include <string.h>
502
 #include <errno.h>
503
 
504
+/*
505
+ * XXX Something is definitely wrong, very very wrong, here or there.
506
+ *     Apparently mplayer (so far) is the only app that break, returning
507
+ *     WRDE_SYNTAX. For now, this simple home/path expansion should work.
508
+ *     I'll investigate this further in future.
509
+ */
510
+#ifdef __FreeBSD__
511
+int snd_user_file(const char *file, char **result)
512
+{
513
+
514
+	if (file == NULL)
515
+		return -EINVAL;
516
+
517
+	if (strlen(file) > 2 && strncmp(file, "~/", 2) == 0) {
518
+		char *homedir, *path;
519
+
520
+		homedir = getenv("HOME");
521
+		if (homedir == NULL)
522
+			return -EINVAL;
523
+
524
+		/* offset -1 by removing '~' */
525
+		path = malloc(strlen(homedir) + strlen(file));
526
+		if (path == NULL)
527
+			return -ENOMEM;
528
+
529
+		strcpy(path, homedir);	/* copy home directory */
530
+		strcat(path, file + 1);	/* discard '~', start with '/' */
531
+
532
+		*result = path;
533
+	} else
534
+		*result = strdup(file);
535
+
536
+	return 0;
537
+}
538
+#else
539
 /**
540
  * \brief Get the full file name
541
  * \param file The file name string to parse
542
@@ -70,3 +108,4 @@
543
 	return 0;
544
 }
545
 #endif /* HAVE_WORDEXP_H */
546
+#endif /* __FreeBSD__ */
547
--- src/timer/timer_hw.c.orig	2009-09-09 20:34:54.000000000 +0800
548
+++ src/timer/timer_hw.c	2009-09-15 00:46:06.000000000 +0800
549
@@ -92,10 +92,12 @@
550
 	}
551
 	if (sig < 0)
552
 		return 0;
553
+#ifndef __FreeBSD__
554
 	if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
555
 		SYSERR("F_SETSIG failed");
556
 		return -errno;
557
 	}
558
+#endif
559
 	if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
560
 		SYSERR("F_SETOWN failed");
561
 		return -errno;
(-)audio/alsa-lib/files/patch-include__pcm.h (+16 lines)
Line 0 Link Here
1
--- include/pcm.h~
2
+++ include/pcm.h
3
@@ -29,6 +29,13 @@
4
 #ifndef __ALSA_PCM_H
5
 #define __ALSA_PCM_H
6
 
7
+#ifndef ESTRPIPE
8
+#define ESTRPIPE EPIPE
9
+#endif
10
+#ifndef EBADFD
11
+#define EBADFD EBADF
12
+#endif
13
+
14
 #ifdef __cplusplus
15
 extern "C" {
16
 #endif
(-)audio/alsa-lib/files/patch-src__async.c (+28 lines)
Line 0 Link Here
1
$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
2
3
--- src/async.c~
4
+++ src/async.c
5
@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
6
 
7
 static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
8
 {
9
+#if defined(__DragonFly__) || defined(__FreeBSD__)
10
+	/* XXX XXX XXX */
11
+	struct list_head *i;
12
+	list_for_each(i, &snd_async_handlers) {
13
+		snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
14
+		if (h->callback)
15
+			h->callback(h);
16
+	}
17
+#else
18
 	int fd;
19
 	struct list_head *i;
20
 	//assert(siginfo->si_code == SI_SIGIO);
21
@@ -60,6 +69,7 @@ static void snd_async_handler(int signo 
22
 		if (h->fd == fd && h->callback)
23
 			h->callback(h);
24
 	}
25
+#endif
26
 }
27
 
28
 /**
(-)audio/alsa-lib/files/patch-src__pcm__pcm_direct.c (+19 lines)
Line 0 Link Here
1
--- src/pcm/pcm_direct.c~
2
+++ src/pcm/pcm_direct.c
3
@@ -44,12 +44,16 @@
4
  *
5
  */
6
  
7
+#if defined(__NetBSD__)
8
+typedef __semun semun;
9
+#elif !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
10
 union semun {
11
 	int              val;    /* Value for SETVAL */
12
 	struct semid_ds *buf;    /* Buffer for IPC_STAT, IPC_SET */
13
 	unsigned short  *array;  /* Array for GETALL, SETALL */
14
 	struct seminfo  *__buf;  /* Buffer for IPC_INFO (Linux specific) */
15
 };
16
+#endif
17
  
18
 /*
19
  * FIXME:
(-)audio/alsa-lib/files/patch-src__timer__timer_hw.c (+15 lines)
Line 0 Link Here
1
--- src/timer/timer_hw.c~
2
+++ src/timer/timer_hw.c
3
@@ -91,10 +91,12 @@ static int snd_timer_hw_async(snd_timer_
4
 	}
5
 	if (sig < 0)
6
 		return 0;
7
+#ifdef F_SETSIG
8
 	if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
9
 		SYSERR("F_SETSIG failed");
10
 		return -errno;
11
 	}
12
+#endif
13
 	if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
14
 		SYSERR("F_SETOWN failed");
15
 		return -errno;
(-)audio/alsa-lib/pkg-plist (+2 lines)
Lines 86-91 share/alsa/cards/ICE1724.conf Link Here
86
share/alsa/cards/ICH-MODEM.conf
86
share/alsa/cards/ICH-MODEM.conf
87
share/alsa/cards/ICH.conf
87
share/alsa/cards/ICH.conf
88
share/alsa/cards/ICH4.conf
88
share/alsa/cards/ICH4.conf
89
share/alsa/cards/Loopback.conf
89
share/alsa/cards/Maestro3.conf
90
share/alsa/cards/Maestro3.conf
90
share/alsa/cards/NFORCE.conf
91
share/alsa/cards/NFORCE.conf
91
share/alsa/cards/PC-Speaker.conf
92
share/alsa/cards/PC-Speaker.conf
Lines 121-126 share/alsa/pcm/iec958.conf Link Here
121
share/alsa/pcm/modem.conf
122
share/alsa/pcm/modem.conf
122
share/alsa/pcm/rear.conf
123
share/alsa/pcm/rear.conf
123
share/alsa/pcm/side.conf
124
share/alsa/pcm/side.conf
125
share/alsa/pcm/surround21.conf
124
share/alsa/pcm/surround40.conf
126
share/alsa/pcm/surround40.conf
125
share/alsa/pcm/surround41.conf
127
share/alsa/pcm/surround41.conf
126
share/alsa/pcm/surround50.conf
128
share/alsa/pcm/surround50.conf
(-)audio/alsa-plugins/Makefile (-51 / +28 lines)
Lines 2-26 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	alsa-plugins
4
PORTNAME=	alsa-plugins
5
PORTVERSION=	1.0.27
5
PORTVERSION=	1.0.28
6
PORTREVISION=	3
7
CATEGORIES=	audio
6
CATEGORIES=	audio
8
MASTER_SITES=	ALSA/plugins \
7
MASTER_SITES=	ALSA/plugins \
9
		GENTOO/distfiles
8
		GENTOO/distfiles
10
9
11
MAINTAINER=	aragon@phat.za.net
10
MAINTAINER=	jbeich@vfemail.net
12
COMMENT=	ALSA compatibility library plugins
11
COMMENT=	ALSA compatibility library plugins
13
12
13
LICENSE=	LGPL21 # or any later version
14
14
LIB_DEPENDS=	libasound.so:${PORTSDIR}/audio/alsa-lib
15
LIB_DEPENDS=	libasound.so:${PORTSDIR}/audio/alsa-lib
15
16
16
GNU_CONFIGURE=	yes
17
GNU_CONFIGURE=	yes
17
USES=		tar:bzip2 pkgconfig libtool:keepla
18
USES=		tar:bzip2 pkgconfig libtool:keepla
19
EXTRA_PATCHES+=	${FILESDIR}/alsa-plugins.patch
20
INSTALL_TARGET=	install-strip
21
CPPFLAGS+=	-I${.CURDIR}/../alsa-lib/files
18
LDFLAGS+=	-L${LOCALBASE}/lib
22
LDFLAGS+=	-L${LOCALBASE}/lib
19
EXTRA_PATCHES+=	${FILESDIR}/alsa-plugins.patch
20
23
21
OPTIONS_DEFAULT=BUFSZ_P2 IO_PTR
24
OPTIONS_DEFAULT=BUFSZ_P2 IO_PTR
22
OPTIONS_DEFINE=	JACK FFMPEG PULSEAUDIO SAMPLERATE SPEEX
25
OPTIONS_DEFINE=	JACK FFMPEG PULSEAUDIO SAMPLERATE SPEEX
23
OPTIONS_SUB=	${OPTIONS_DEFINE}
26
OPTIONS_SUB=	yes
24
27
25
OPTIONS_GROUP=	OSS
28
OPTIONS_GROUP=	OSS
26
OPTIONS_GROUP_OSS=IO_PTR BLKCNT_P2 BUFSZ_P2 VERBOSE
29
OPTIONS_GROUP_OSS=IO_PTR BLKCNT_P2 BUFSZ_P2 VERBOSE
Lines 27-89 OPTIONS_GROUP_OSS=IO_PTR BLKCNT_P2 BUFSZ_P2 VERBOS Link Here
27
30
28
IO_PTR_DESC=	Precise playback/recording pointer
31
IO_PTR_DESC=	Precise playback/recording pointer
29
BLKCNT_P2_DESC=	Restrict number of fragments to ^2 aligned
32
BLKCNT_P2_DESC=	Restrict number of fragments to ^2 aligned
30
BUFSZ_P2_DESC=	Restrict buffer size to ^2 aligned (breaks aplay)
33
BUFSZ_P2_DESC=	Restrict buffer size to ^2 aligned
31
VERBOSE_DESC=	Print debugging messages
34
VERBOSE_DESC=	Print debugging messages
32
35
33
.include <bsd.port.options.mk>
36
IO_PTR_CFLAGS=	-DFREEBSD_OSS_USE_IO_PTR
37
BLKCNT_P2_CFLAGS=-DFREEBSD_OSS_BLKCNT_P2
38
BUFSZ_P2_CFLAGS=-DFREEBSD_OSS_BUFSZ_P2
39
VERBOSE_CFLAGS=	-DFREEBSD_OSS_DEBUG_VERBOSE
34
40
35
.if ${PORT_OPTIONS:MIO_PTR}
41
JACK_LIB_DEPENDS=	libjack.so:${PORTSDIR}/audio/jack
36
CFLAGS+=	-DFREEBSD_OSS_USE_IO_PTR
42
JACK_CONFIGURE_ENABLE=	jack
37
.endif
38
43
39
.if ${PORT_OPTIONS:MBLKCNT_P2}
44
FFMPEG_LIB_DEPENDS=	libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
40
CFLAGS+=	-DFREEBSD_OSS_BLKCNT_P2
45
FFMPEG_CONFIGURE_ENABLE=avcodec
41
.endif
46
FFMPEG_CPPFLAGS=	-I${LOCALBASE}/include
42
47
43
.if ${PORT_OPTIONS:MBUFSZ_P2}
48
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:${PORTSDIR}/audio/pulseaudio
44
CFLAGS+=	-DFREEBSD_OSS_BUFSZ_P2
49
PULSEAUDIO_CONFIGURE_ENABLE=pulseaudio
45
.endif
46
50
47
.if ${PORT_OPTIONS:MVERBOSE}
51
SAMPLERATE_LIB_DEPENDS=	libsamplerate.so:${PORTSDIR}/audio/libsamplerate
48
CFLAGS+=	-DFREEBSD_OSS_DEBUG_VERBOSE
52
SAMPLERATE_CONFIGURE_ENABLE=samplerate
49
.endif
50
53
51
.if ${PORT_OPTIONS:MJACK}
54
SPEEX_LIB_DEPENDS=	libspeex.so:${PORTSDIR}/audio/speex
52
.if empty(PORT_OPTIONS:MSAMPLERATE)
55
SPEEX_CONFIGURE_ON=	--with-speex=lib
53
IGNORE=			JACK audio support requires SAMPLERATE
56
SPEEX_CONFIGURE_OFF=	--without-speex
54
.endif
55
LIB_DEPENDS+=		libjack.so:${PORTSDIR}/audio/jack
56
.else
57
CONFIGURE_ARGS+=	--disable-jack
58
.endif
59
57
60
.if ${PORT_OPTIONS:MFFMPEG}
58
.include <bsd.port.options.mk>
61
CONFIGURE_ARGS+=	--enable-avcodec
62
CFLAGS+=		-I${LOCALBASE}/include
63
LIB_DEPENDS+=		libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
64
.else
65
CONFIGURE_ARGS+=	--disable-avcodec
66
.endif
67
59
68
.if ${PORT_OPTIONS:MPULSEAUDIO}
60
.if ${PORT_OPTIONS:MJACK} && empty(PORT_OPTIONS:MSAMPLERATE)
69
LIB_DEPENDS+=		libpulse.so:${PORTSDIR}/audio/pulseaudio
61
IGNORE=			JACK audio support requires SAMPLERATE
70
.else
71
CONFIGURE_ARGS+=	--disable-pulseaudio
72
.endif
62
.endif
73
63
74
.if ${PORT_OPTIONS:MSAMPLERATE}
75
LIB_DEPENDS+=		libsamplerate.so:${PORTSDIR}/audio/libsamplerate
76
.else
77
CONFIGURE_ARGS+=	--disable-samplerate
78
.endif
79
80
.if ${PORT_OPTIONS:MSPEEX}
81
CONFIGURE_ARGS+=	--with-speex=lib
82
LIB_DEPENDS+=		libspeex.so:${PORTSDIR}/audio/speex
83
.else
84
CONFIGURE_ARGS+=	--without-speex
85
.endif
86
87
post-patch:	.SILENT
64
post-patch:	.SILENT
88
	${REINPLACE_CMD} -e '/LIBS/s/-ldl//g' \
65
	${REINPLACE_CMD} -e '/LIBS/s/-ldl//g' \
89
		-e '/lt_cv_dlopen/s/-ldl//g' \
66
		-e '/lt_cv_dlopen/s/-ldl//g' \
(-)audio/alsa-plugins/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (alsa-plugins-1.0.27.tar.bz2) = 0bbd0c37c2dd7baf16363afb2e58169ffb0f9c0a70031b3b6235594630f3ab35
1
SHA256 (alsa-plugins-1.0.28.tar.bz2) = 426f8af1a07ee9d8c06449524d1f0bd59a06e0331a51aa3d59d343a7c6d03120
2
SIZE (alsa-plugins-1.0.27.tar.bz2) = 363593
2
SIZE (alsa-plugins-1.0.28.tar.bz2) = 366023
(-)audio/alsa-plugins/files/alsa-plugins.patch (-8 / +1 lines)
Lines 42-55 Link Here
42
 	oss->ext.private_data = oss;
42
 	oss->ext.private_data = oss;
43
--- oss/pcm_oss.c.orig	2009-08-31 21:09:41.000000000 +0800
43
--- oss/pcm_oss.c.orig	2009-08-31 21:09:41.000000000 +0800
44
+++ oss/pcm_oss.c	2009-09-28 14:54:12.000000000 +0800
44
+++ oss/pcm_oss.c	2009-09-28 14:54:12.000000000 +0800
45
@@ -22,17 +22,48 @@
45
@@ -22,17 +22,41 @@
46
 #include <sys/ioctl.h>
46
 #include <sys/ioctl.h>
47
 #include <alsa/asoundlib.h>
47
 #include <alsa/asoundlib.h>
48
 #include <alsa/pcm_external.h>
48
 #include <alsa/pcm_external.h>
49
 #include <linux/soundcard.h>
49
 #include <linux/soundcard.h>
50
+#ifdef __FreeBSD__
51
+#include <sys/param.h>
52
+#endif
53
+
50
+
54
+#define ARRAY_SIZE(x)	(sizeof(x) / sizeof(*(x)))
51
+#define ARRAY_SIZE(x)	(sizeof(x) / sizeof(*(x)))
55
+
52
+
Lines 58-68 Link Here
58
+#define FREEBSD_OSS_RATE_MAX	384000
55
+#define FREEBSD_OSS_RATE_MAX	384000
59
+
56
+
60
+#define FREEBSD_OSS_CHANNELS_MIN	1
57
+#define FREEBSD_OSS_CHANNELS_MIN	1
61
+#ifndef __DragonFly__
62
+#define FREEBSD_OSS_CHANNELS_MAX	8
58
+#define FREEBSD_OSS_CHANNELS_MAX	8
63
+#else
64
+#define FREEBSD_OSS_CHANNELS_MAX	2
65
+#endif
66
+
59
+
67
+#define FREEBSD_OSS_BUFSZ_MAX	131072
60
+#define FREEBSD_OSS_BUFSZ_MAX	131072
68
+#define FREEBSD_OSS_BLKCNT_MIN	2
61
+#define FREEBSD_OSS_BLKCNT_MIN	2
(-)audio/alsa-plugins/files/patch-ffmpeg-version (-13 lines)
Lines 1-13 Link Here
1
Index: a52/pcm_a52.c
2
===================================================================
3
--- a52/pcm_a52.c
4
+++ a52/pcm_a52.c
5
@@ -27,7 +27,7 @@
6
 #include <alsa/pcm_plugin.h>
7
 #include AVCODEC_HEADER
8
 
9
-#if LIBAVCODEC_VERSION_MAJOR >= 53 && LIBAVCODEC_VERSION_MINOR >= 34
10
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,34,0)
11
 #include <libavutil/audioconvert.h>
12
 #include <libavutil/mem.h>
13
 #define USE_AVCODEC_FRAME
(-)audio/alsa-plugins/files/patch-jack-pcm_jack.c (-12 lines)
Lines 1-12 Link Here
1
--- jack/pcm_jack.c.orig	2009-09-16 04:33:36.000000000 +0800
2
+++ jack/pcm_jack.c	2009-09-16 04:33:55.000000000 +0800
3
@@ -20,7 +20,9 @@
4
  *
5
  */
6
 
7
+#ifndef __FreeBSD__
8
 #include <byteswap.h>
9
+#endif
10
 #include <sys/shm.h>
11
 #include <sys/types.h>
12
 #include <sys/socket.h>
(-)audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c (-12 / +2 lines)
Lines 2-22 based on https://github.com/dankamongmen/libdank/b Link Here
2
2
3
--- usb_stream/pcm_usb_stream.c.orig
3
--- usb_stream/pcm_usb_stream.c.orig
4
+++ usb_stream/pcm_usb_stream.c
4
+++ usb_stream/pcm_usb_stream.c
5
@@ -19,7 +19,9 @@
6
  */
7
 
8
 #define _GNU_SOURCE
9
+#ifndef __FreeBSD__
10
 #include <byteswap.h>
11
+#endif
12
 #include <sys/mman.h>
13
 #include <sys/shm.h>
14
 #include <sys/ioctl.h>
15
@@ -79,6 +81,69 @@ typedef struct {
5
@@ -79,6 +81,69 @@ typedef struct {
16
 static struct user_usb_stream *uus;
6
 static struct user_usb_stream *uus;
17
 static pthread_mutex_t uus_mutex = PTHREAD_MUTEX_INITIALIZER;
7
 static pthread_mutex_t uus_mutex = PTHREAD_MUTEX_INITIALIZER;
18
 
8
 
19
+#ifdef __FreeBSD__
9
+#ifndef __linux__
20
+/*
10
+/*
21
+ * Copyright (c) 2000-2011, Nick Black et al
11
+ * Copyright (c) 2000-2011, Nick Black et al
22
+ * All rights reserved.
12
+ * All rights reserved.
Lines 86-92 based on https://github.com/dankamongmen/libdank/b Link Here
86
 		}
76
 		}
87
 
77
 
88
 
78
 
89
+#ifndef __FreeBSD__
79
+#ifdef __linux__
90
 		uus->s = mremap(uus->s, sizeof(struct usb_stream), uus->s->read_size, MREMAP_MAYMOVE);
80
 		uus->s = mremap(uus->s, sizeof(struct usb_stream), uus->s->read_size, MREMAP_MAYMOVE);
91
+#else
81
+#else
92
+		uus->s = mremap_compat(us->pfd.fd, uus->s, sizeof(struct usb_stream), uus->s->read_size, PROT_READ, MAP_SHARED);
82
+		uus->s = mremap_compat(us->pfd.fd, uus->s, sizeof(struct usb_stream), uus->s->read_size, PROT_READ, MAP_SHARED);
(-)audio/alsa-plugins/pkg-plist (+3 lines)
Lines 40-42 lib/alsa-lib/libasound_module_pcm_vdownmix.so Link Here
40
%%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_medium.so
40
%%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_medium.so
41
%%PULSEAUDIO%%share/alsa/alsa.conf.d/50-pulseaudio.conf
41
%%PULSEAUDIO%%share/alsa/alsa.conf.d/50-pulseaudio.conf
42
%%PULSEAUDIO%%share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example
42
%%PULSEAUDIO%%share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example
43
%%PULSEAUDIO%%@dirrmtry share/alsa/alsa.conf.d
44
%%PULSEAUDIO%%@dirrmtry share/alsa
45
@dirrmtry lib/alsa-lib
(-)audio/alsa-utils/Makefile (-24 / +14 lines)
Lines 2-16 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	alsa-utils
4
PORTNAME=	alsa-utils
5
PORTVERSION=	1.0.27.2
5
PORTVERSION=	1.0.28
6
PORTREVISION=	2
7
CATEGORIES=	audio
6
CATEGORIES=	audio
8
MASTER_SITES=	ALSA/utils \
7
MASTER_SITES=	ALSA/utils \
9
		GENTOO/distfiles
8
		GENTOO/distfiles
10
9
11
MAINTAINER=	aragon@phat.za.net
10
MAINTAINER=	jbeich@vfemail.net
12
COMMENT=	ALSA compatibility utils
11
COMMENT=	ALSA compatibility utils
13
12
13
LICENSE=	GPLv2 # or any later version
14
14
LIB_DEPENDS=	libasound.so:${PORTSDIR}/audio/alsa-lib
15
LIB_DEPENDS=	libasound.so:${PORTSDIR}/audio/alsa-lib
15
RUN_DEPENDS=	${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
16
RUN_DEPENDS=	${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
16
17
Lines 17-49 RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_m Link Here
17
USES=		gmake tar:bzip2 shebangfix
18
USES=		gmake tar:bzip2 shebangfix
18
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
19
CONFIGURE_ARGS=	--with-udev-rules-dir="\$${prefix}/lib/udev"
20
CONFIGURE_ARGS=	--with-udev-rules-dir="\$${prefix}/lib/udev"
20
CFLAGS+=	-I${LOCALBASE}/include
21
SHEBANG_FILES=	alsaconf/alsaconf.in
21
SHEBANG_FILES=	alsaconf/alsaconf.in
22
INSTALL_TARGET=	install-strip
23
CPPFLAGS+=	-I${LOCALBASE}/include -I${.CURDIR}/../alsa-lib/files
24
LDFLAGS+=	-L${LOCALBASE}/lib
22
25
23
OPTIONS_SUB=	yes
26
OPTIONS_SUB=	yes
24
OPTIONS_DEFINE=	XMLTO NLS
27
OPTIONS_DEFINE=	MANPAGES NLS
25
OPTIONS_DEFAULT=XMLTO
28
OPTIONS_DEFAULT=MANPAGES
26
XMLTO_DESC=	Generate alsactl_init(7) man page using xmlto(1)
27
29
28
.include <bsd.port.options.mk>
30
MANPAGES_BUILD_DEPENDS=	xmlto:${PORTSDIR}/textproc/xmlto
31
MANPAGES_CONFIGURE_ENABLE=xmlto
29
32
30
.if ${PORT_OPTIONS:MXMLTO}
33
NLS_USES=	gettext
31
BUILD_DEPENDS+=	xmlto:${PORTSDIR}/textproc/xmlto
34
NLS_CONFIGURE_ENABLE=nls
32
MAN7_EN+=	alsactl_init.7
35
NLS_LDFLAGS=	-lintl
33
.else
34
CONFIGURE_ARGS+=--disable-xmlto
35
.endif
36
36
37
.if empty(PORT_OPTIONS:MNLS)
38
LDFLAGS+=	-L${LOCALBASE}/lib
39
CONFIGURE_ARGS+=--disable-nls
40
PLIST_SUB+=	NLS="@comment "
41
.else
42
LDFLAGS+=	-L${LOCALBASE}/lib -lintl
43
USES+=		gettext
44
PLIST_SUB+=	NLS=""
45
.endif
46
47
post-patch:	.SILENT
37
post-patch:	.SILENT
48
	${REINPLACE_CMD} -e '/LIBS/s/-ldl//g; /LIBRT/s/-lrt//g;' \
38
	${REINPLACE_CMD} -e '/LIBS/s/-ldl//g; /LIBRT/s/-lrt//g;' \
49
		${WRKSRC}/configure
39
		${WRKSRC}/configure
(-)audio/alsa-utils/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (alsa-utils-1.0.27.2.tar.bz2) = 02bfac39092f3b68d743c23ad3d688d6c5aa8df69f2ccd692c5b8282edb352ea
1
SHA256 (alsa-utils-1.0.28.tar.bz2) = f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc
2
SIZE (alsa-utils-1.0.27.2.tar.bz2) = 1143802
2
SIZE (alsa-utils-1.0.28.tar.bz2) = 1146887
(-)audio/alsa-utils/files/patch-alsa-utils (-136 lines)
Lines 1-136 Link Here
1
--- alsaloop/alsaloop.c.orig
2
+++ alsaloop/alsaloop.c
3
@@ -30,6 +30,7 @@
4
 #include <sys/time.h>
5
 #include <math.h>
6
 #include <pthread.h>
7
+#include <signal.h>
8
 #include <syslog.h>
9
 #include <sys/signal.h>
10
 #include "alsaloop.h"
11
@@ -749,7 +750,11 @@ static void thread_job1(void *_data)
12
 			snd_output_printf(output, "pool took %lius\n", timediff(tv2, tv1));
13
 		}
14
 		if (err < 0) {
15
+#ifndef __FreeBSD__
16
 			if (err == -EINTR || err == -ERESTART)
17
+#else
18
+			if (err == -EINTR)
19
+#endif
20
 				continue;
21
 			logit(LOG_CRIT, "Poll failed: %s\n", strerror(-err));
22
 			my_exit(thread, EXIT_FAILURE);
23
--- alsaloop/pcmjob.c.orig
24
+++ alsaloop/pcmjob.c
25
@@ -63,7 +63,11 @@ static const char *src_types[] = {
26
 #endif
27
 
28
 static pthread_mutex_t pcm_open_mutex =
29
+#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
30
                                 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
31
+#else
32
+                                PTHREAD_MUTEX_INITIALIZER;
33
+#endif
34
 
35
 static inline void pcm_open_lock(void)
36
 {
37
--- alsamixer/mixer_display.c.orig
38
+++ alsamixer/mixer_display.c
39
@@ -17,7 +17,9 @@
40
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
41
  */
42
 
43
+#ifndef __FreeBSD__
44
 #define _C99_SOURCE /* lrint() */
45
+#endif
46
 #include "aconfig.h"
47
 #include <stdlib.h>
48
 #include <string.h>
49
--- alsamixer/volume_mapping.c.orig
50
+++ alsamixer/volume_mapping.c
51
@@ -37,7 +37,7 @@
52
 #include <stdbool.h>
53
 #include "volume_mapping.h"
54
 
55
-#ifdef __UCLIBC__
56
+#if defined(__UCLIBC__) || defined(__FreeBSD__)
57
 /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
58
 #define exp10(x) (exp((x) * log(10)))
59
 #endif /* __UCLIBC__ */
60
--- aplay/aplay.c.orig	2010-04-16 13:11:06.000000000 +0200
61
+++ aplay/aplay.c	2010-04-23 04:17:13.000000000 +0200
62
@@ -28,7 +28,9 @@
63
 
64
 #define _GNU_SOURCE
65
 #include <stdio.h>
66
+#ifndef __FreeBSD__
67
 #include <malloc.h>
68
+#endif
69
 #include <unistd.h>
70
 #include <stdlib.h>
71
 #include <string.h>
72
@@ -48,7 +50,11 @@
73
 #include <sys/signal.h>
74
 #include <sys/stat.h>
75
 #include <sys/types.h>
76
+#ifdef __FreeBSD__
77
+#include <sys/endian.h>
78
+#else
79
 #include <endian.h>
80
+#endif
81
 #include "aconfig.h"
82
 #include "gettext.h"
83
 #include "formats.h"
84
@@ -116,6 +122,11 @@
85
 static int use_strftime = 0;
86
 volatile static int recycle_capture_file = 0;
87
 
88
+typedef off_t off64_t;
89
+
90
+#define lseek64 lseek
91
+#define open64 open
92
+
93
 static int fd = -1;
94
 static off64_t pbrec_count = LLONG_MAX, fdcount;
95
 static int vocmajor, vocminor;
96
@@ -1086,8 +1097,8 @@
97
 		err = snd_pcm_hw_params_get_buffer_time_max(params,
98
 							    &buffer_time, 0);
99
 		assert(err >= 0);
100
-		if (buffer_time > 500000)
101
-			buffer_time = 500000;
102
+		/* if (buffer_time > 500000) XXX WHO CARES?!?!?
103
+			buffer_time = 500000; */
104
 	}
105
 	if (period_time == 0 && period_frames == 0) {
106
 		if (buffer_time > 0)
107
--- aplay/formats.h.orig	2009-08-31 23:13:36.000000000 +0800
108
+++ aplay/formats.h	2009-09-15 01:22:05.000000000 +0800
109
@@ -1,8 +1,15 @@
110
 #ifndef FORMATS_H
111
 #define FORMATS_H		1
112
 
113
+#ifdef __FreeBSD__
114
+#include <sys/endian.h>
115
+#define bswap_16(x)	bswap16(x)
116
+#define bswap_32(x)	bswap32(x)
117
+#define bswap_64(x)	bswap64(x)
118
+#else
119
 #include <endian.h>
120
 #include <byteswap.h>
121
+#endif
122
 
123
 /* Definitions for .VOC files */
124
 
125
--- speaker-test/speaker-test.c.orig	2009-08-31 23:13:36.000000000 +0800
126
+++ speaker-test/speaker-test.c	2009-09-15 01:22:48.000000000 +0800
127
@@ -44,7 +44,9 @@
128
 #include <getopt.h>
129
 #include <inttypes.h>
130
 #include <ctype.h>
131
+#ifndef __FreeBSD__
132
 #include <byteswap.h>
133
+#endif
134
 #include <signal.h>
135
 
136
 #define ALSA_PCM_NEW_HW_PARAMS_API
(-)audio/alsa-utils/files/patch-alsaloop__alsaloop.c (+14 lines)
Line 0 Link Here
1
--- alsaloop/alsaloop.c~
2
+++ alsaloop/alsaloop.c
3
@@ -760,7 +761,11 @@ static void thread_job1(void *_data)
4
 			snd_output_printf(output, "pool took %lius\n", timediff(tv2, tv1));
5
 		}
6
 		if (err < 0) {
7
+#ifdef ERESTART
8
 			if (err == -EINTR || err == -ERESTART)
9
+#else
10
+			if (err == -EINTR)
11
+#endif
12
 				continue;
13
 			logit(LOG_CRIT, "Poll failed: %s\n", strerror(-err));
14
 			my_exit(thread, EXIT_FAILURE);
(-)audio/alsa-utils/files/patch-alsamixer__mixer_display.c (+12 lines)
Line 0 Link Here
1
--- alsamixer/mixer_display.c~
2
+++ alsamixer/mixer_display.c
3
@@ -17,7 +17,9 @@
4
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
5
  */
6
 
7
+#ifdef __GLIBC__
8
 #define _C99_SOURCE /* lrint() */
9
+#endif
10
 #include "aconfig.h"
11
 #include <stdlib.h>
12
 #include <string.h>
(-)audio/alsa-utils/files/patch-alsamixer__volume_mapping.c (+11 lines)
Line 0 Link Here
1
--- alsamixer/volume_mapping.c~
2
+++ alsamixer/volume_mapping.c
3
@@ -37,7 +37,7 @@
4
 #include <stdbool.h>
5
 #include "volume_mapping.h"
6
 
7
-#ifdef __UCLIBC__
8
+#ifndef __GLIBC__
9
 /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
10
 #define exp10(x) (exp((x) * log(10)))
11
 #endif /* __UCLIBC__ */
(-)audio/alsa-utils/files/patch-aplay__aplay.c (+23 lines)
Line 0 Link Here
1
--- aplay/aplay.c~
2
+++ aplay/aplay.c
3
@@ -48,7 +48,6 @@
4
 #include <sys/time.h>
5
 #include <sys/stat.h>
6
 #include <sys/types.h>
7
-#include <endian.h>
8
 #include "aconfig.h"
9
 #include "gettext.h"
10
 #include "formats.h"
11
@@ -70,6 +69,12 @@
12
 #define be32toh(x) __be32_to_cpu(x)
13
 #endif
14
 
15
+#ifndef _LARGEFILE64_SOURCE
16
+/* assume modern system */
17
+typedef off_t off64_t;
18
+#define lseek64 lseek
19
+#endif
20
+
21
 #define DEFAULT_FORMAT		SND_PCM_FORMAT_U8
22
 #define DEFAULT_SPEED 		8000
23
 
(-)audio/alsa-utils/files/patch-aplay__formats.h (+10 lines)
Line 0 Link Here
1
--- aplay/formats.h~
2
+++ aplay/formats.h
3
@@ -1,7 +1,6 @@
4
 #ifndef FORMATS_H
5
 #define FORMATS_H		1
6
 
7
-#include <endian.h>
8
 #include <byteswap.h>
9
 
10
 /* Definitions for .VOC files */
(-)audio/alsa-utils/pkg-plist (-1 / +1 lines)
Lines 29-35 man/man1/aseqdump.1.gz Link Here
29
man/man1/aseqnet.1.gz
29
man/man1/aseqnet.1.gz
30
man/man1/iecset.1.gz
30
man/man1/iecset.1.gz
31
man/man1/speaker-test.1.gz
31
man/man1/speaker-test.1.gz
32
%%XMLTO%%man/man7/alsactl_init.7.gz
32
%%MANPAGES%%man/man7/alsactl_init.7.gz
33
man/man8/alsaconf.8.gz
33
man/man8/alsaconf.8.gz
34
sbin/alsaconf
34
sbin/alsaconf
35
sbin/alsactl
35
sbin/alsactl

Return to bug 191524