aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-08-09 15:20:35 +0000
committerJohn Marino <marino@FreeBSD.org>2014-08-09 15:20:35 +0000
commit46b7762a82cdc0c94eeafd3a686bad427433ccb4 (patch)
treee69277546fcd8c9ef3f433ee70374b1ae0d9db62 /audio
parentc9c0fba3555ebe2bc14b5a4b9a85b7922a1c5083 (diff)
downloadports-46b7762a82cdc0c94eeafd3a686bad427433ccb4.tar.gz
ports-46b7762a82cdc0c94eeafd3a686bad427433ccb4.zip
Notes
Diffstat (limited to 'audio')
-rw-r--r--audio/alsa-lib/Makefile20
-rw-r--r--audio/alsa-lib/distinfo4
-rw-r--r--audio/alsa-lib/files/asound.conf.sample68
-rw-r--r--audio/alsa-lib/files/byteswap.h13
-rw-r--r--audio/alsa-lib/files/linux/ioctl.h4
-rw-r--r--audio/alsa-lib/files/linux/types.h11
-rw-r--r--audio/alsa-lib/files/malloc.h4
-rw-r--r--audio/alsa-lib/files/patch-alsa-lib561
-rw-r--r--audio/alsa-lib/files/patch-include__pcm.h16
-rw-r--r--audio/alsa-lib/files/patch-src__async.c28
-rw-r--r--audio/alsa-lib/files/patch-src__pcm__pcm_direct.c19
-rw-r--r--audio/alsa-lib/files/patch-src__timer__timer_hw.c15
-rw-r--r--audio/alsa-lib/pkg-plist2
-rw-r--r--audio/alsa-plugins/Makefile79
-rw-r--r--audio/alsa-plugins/distinfo4
-rw-r--r--audio/alsa-plugins/files/alsa-plugins.patch9
-rw-r--r--audio/alsa-plugins/files/patch-ffmpeg-version13
-rw-r--r--audio/alsa-plugins/files/patch-jack-pcm_jack.c12
-rw-r--r--audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c14
-rw-r--r--audio/alsa-plugins/pkg-plist3
-rw-r--r--audio/alsa-utils/Makefile38
-rw-r--r--audio/alsa-utils/distinfo4
-rw-r--r--audio/alsa-utils/files/patch-alsa-utils136
-rw-r--r--audio/alsa-utils/files/patch-alsaloop__alsaloop.c14
-rw-r--r--audio/alsa-utils/files/patch-alsamixer__mixer_display.c12
-rw-r--r--audio/alsa-utils/files/patch-alsamixer__volume_mapping.c11
-rw-r--r--audio/alsa-utils/files/patch-aplay__aplay.c23
-rw-r--r--audio/alsa-utils/files/patch-aplay__formats.h10
-rw-r--r--audio/alsa-utils/pkg-plist2
29 files changed, 261 insertions, 888 deletions
diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile
index e4e1ac8fd26b..70debbc7eba1 100644
--- a/audio/alsa-lib/Makefile
+++ b/audio/alsa-lib/Makefile
@@ -2,35 +2,33 @@
# $FreeBSD$
PORTNAME= alsa-lib
-PORTVERSION= 1.0.27.2
-PORTREVISION= 2
+PORTVERSION= 1.0.28
CATEGORIES= audio
MASTER_SITES= ALSA/lib \
GENTOO/distfiles
-MAINTAINER= aragon@phat.za.net
+MAINTAINER= jbeich@vfemail.net
COMMENT= ALSA compatibility library
+LICENSE= LGPL21 # or any later version
+
USES= tar:bzip2 libtool:keepla
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-pkgconfdir="\$${prefix}/libdata/pkgconfig"
INSTALL_TARGET= install-strip
+CPPFLAGS+= -I${FILESDIR}
OPTIONS_DEFINE= PYTHON
-OPTIONS_SUB= ${OPTIONS_DEFINE}
-
-.include <bsd.port.options.mk>
+OPTIONS_SUB= yes
-.if ${PORT_OPTIONS:MPYTHON}
-USE_PYTHON= 2
-.else
-CONFIGURE_ARGS+=--disable-python
-.endif
+PYTHON_CONFIGURE_ENABLE=python
+PYTHON_USE= PYTHON=2
post-patch: .SILENT
${REINPLACE_CMD} -e '/LIBS/ { s/-ldl//g; s/-lrt//g; }' \
-e 's/python-config/${PYTHON_CMD:T}-config/g' \
+ -e '/pythonlibs/s/--libs/--ldflags/' \
-e '/-D_GNU_SOURCE/d' \
-e '/lt_cv_dlopen/s/-ldl//g' ${WRKSRC}/configure
${REINPLACE_CMD} '/LIBADD/s/-ldl//g' \
diff --git a/audio/alsa-lib/distinfo b/audio/alsa-lib/distinfo
index c993b60aefee..bdd89f50dc87 100644
--- a/audio/alsa-lib/distinfo
+++ b/audio/alsa-lib/distinfo
@@ -1,2 +1,2 @@
-SHA256 (alsa-lib-1.0.27.2.tar.bz2) = 690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19
-SIZE (alsa-lib-1.0.27.2.tar.bz2) = 906844
+SHA256 (alsa-lib-1.0.28.tar.bz2) = 3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d
+SIZE (alsa-lib-1.0.28.tar.bz2) = 903786
diff --git a/audio/alsa-lib/files/asound.conf.sample b/audio/alsa-lib/files/asound.conf.sample
index f6fb895f08a1..686fca0b0445 100644
--- a/audio/alsa-lib/files/asound.conf.sample
+++ b/audio/alsa-lib/files/asound.conf.sample
@@ -1,13 +1,9 @@
#
# FreeBSD/OSS
#
-pcm_slave.oss {
- pcm.type oss
-}
-
pcm.!default {
type plug
- slave oss
+ slave.pcm.type oss
}
ctl.!default {
@@ -15,54 +11,6 @@ ctl.!default {
}
#
-# Remap all possible surround stuffs.
-#
-pcm.!front {
- type plug
- slave oss
-}
-
-pcm.!rear {
- type plug
- slave oss
-}
-
-pcm.!center_lfe {
- type plug
- slave oss
-}
-
-pcm.!side {
- type plug
- slave oss
-}
-
-pcm.!surround40 {
- type plug
- slave oss
-}
-
-pcm.!surround41 {
- type plug
- slave oss
-}
-
-pcm.!surround50 {
- type plug
- slave oss
-}
-
-pcm.!surround51 {
- type plug
- slave oss
-}
-
-pcm.!surround71 {
- type plug
- slave oss
-}
-
-#
# Pulseaudio
#
# pcm.!default {
@@ -72,3 +20,17 @@ pcm.!surround71 {
# ctl.!default {
# type pulse
# }
+
+#
+# Remap all possible surround stuffs.
+#
+pcm.!front pcm.default
+pcm.!rear pcm.default
+pcm.!center_lfe pcm.default
+pcm.!side pcm.default
+pcm.!surround21 pcm.default
+pcm.!surround40 pcm.default
+pcm.!surround41 pcm.default
+pcm.!surround50 pcm.default
+pcm.!surround51 pcm.default
+pcm.!surround71 pcm.default
diff --git a/audio/alsa-lib/files/byteswap.h b/audio/alsa-lib/files/byteswap.h
new file mode 100644
index 000000000000..0d28973e52e9
--- /dev/null
+++ b/audio/alsa-lib/files/byteswap.h
@@ -0,0 +1,13 @@
+#ifndef _BYTESWAP_H
+#define _BYTESWAP_H
+
+#ifdef __OpenBSD__
+#define bswap_16(x) swap16(x)
+#define bswap_32(x) swap32(x)
+#define bswap_64(x) swap64(x)
+#else
+#define bswap_16(x) bswap16(x)
+#define bswap_32(x) bswap32(x)
+#define bswap_64(x) bswap64(x)
+#endif
+#endif /* _BYTESWAP_H */
diff --git a/audio/alsa-lib/files/linux/ioctl.h b/audio/alsa-lib/files/linux/ioctl.h
new file mode 100644
index 000000000000..6b07139219da
--- /dev/null
+++ b/audio/alsa-lib/files/linux/ioctl.h
@@ -0,0 +1,4 @@
+#ifndef _LINUX_IOCTL_H
+#define _LINUX_IOCTL_H
+#include <sys/ioccom.h>
+#endif /* _LINUX_IOCTL_H */
diff --git a/audio/alsa-lib/files/linux/types.h b/audio/alsa-lib/files/linux/types.h
new file mode 100644
index 000000000000..3fb397037f72
--- /dev/null
+++ b/audio/alsa-lib/files/linux/types.h
@@ -0,0 +1,11 @@
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
+
+#define __bitwise
+
+typedef int __kernel_pid_t;
+typedef off_t __kernel_off_t;
+
+typedef uint32_t __u32;
+typedef uint64_t __u64;
+#endif /* _LINUX_TYPES_H */
diff --git a/audio/alsa-lib/files/malloc.h b/audio/alsa-lib/files/malloc.h
new file mode 100644
index 000000000000..23ab45e7fca0
--- /dev/null
+++ b/audio/alsa-lib/files/malloc.h
@@ -0,0 +1,4 @@
+#ifndef _MALLOC_H
+#define _MALLOC_H
+#include <stdlib.h>
+#endif /* _MALLOC_H */
diff --git a/audio/alsa-lib/files/patch-alsa-lib b/audio/alsa-lib/files/patch-alsa-lib
deleted file mode 100644
index 9897548a2113..000000000000
--- a/audio/alsa-lib/files/patch-alsa-lib
+++ /dev/null
@@ -1,561 +0,0 @@
---- include/asoundlib-head.h.orig 2009-09-09 20:34:54.000000000 +0800
-+++ include/asoundlib-head.h 2009-09-15 00:35:55.000000000 +0800
-@@ -34,7 +34,11 @@
- #include <string.h>
- #include <fcntl.h>
- #include <assert.h>
-+#ifdef __FreeBSD__
-+#include <sys/endian.h>
-+#else
- #include <endian.h>
-+#endif
- #include <sys/poll.h>
- #include <errno.h>
- #include <stdarg.h>
-@@ -46,3 +50,31 @@
- #include <alsa/output.h>
- #include <alsa/error.h>
- #include <alsa/conf.h>
-+
-+#ifdef __FreeBSD__
-+
-+#define ESTRPIPE 0x7a69 /* Linux PCM suspend errno, fehh?! */
-+#define EBADFD EBADF
-+
-+#define bswap_16(x) bswap16(x)
-+#define bswap_32(x) bswap32(x)
-+#define bswap_64(x) bswap64(x)
-+
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+#define __cpu_to_le32(x) (x)
-+#define __cpu_to_be32(x) bswap_32(x)
-+#define __cpu_to_le16(x) (x)
-+#define __cpu_to_be16(x) bswap_16(x)
-+#else
-+#define __cpu_to_le32(x) bswap_32(x)
-+#define __cpu_to_be32(x) (x)
-+#define __cpu_to_le16(x) bswap_16(x)
-+#define __cpu_to_be16(x) (x)
-+#endif
-+
-+#define __le32_to_cpu __cpu_to_le32
-+#define __be32_to_cpu __cpu_to_be32
-+#define __le16_to_cpu __cpu_to_le16
-+#define __be16_to_cpu __cpu_to_be16
-+
-+#endif /* !__FreeBSD__ */
---- include/global.h.orig 2009-09-09 20:34:54.000000000 +0800
-+++ include/global.h 2009-09-15 00:39:54.000000000 +0800
-@@ -133,7 +133,7 @@
-
- int snd_user_file(const char *file, char **result);
-
--#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
-+#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE) && !defined(__FreeBSD__)
- struct timeval {
- time_t tv_sec; /* seconds */
- long tv_usec; /* microseconds */
---- include/local.h.orig 2009-09-09 20:34:54.000000000 +0800
-+++ include/local.h 2009-09-15 00:26:08.000000000 +0800
-@@ -28,11 +28,19 @@
- #include <string.h>
- #include <fcntl.h>
- #include <assert.h>
-+#ifdef __FreeBSD__
-+#include <sys/endian.h>
-+#else
- #include <endian.h>
-+#endif
- #include <stdarg.h>
- #include <sys/poll.h>
- #include <errno.h>
-+#ifdef __linux__
- #include <linux/ioctl.h>
-+#else
-+#include <sys/ioctl.h>
-+#endif
-
- #include "config.h"
- #ifdef SUPPORT_RESMGR
---- include/search.h.orig 2009-09-09 20:34:54.000000000 +0800
-+++ include/search.h 2009-09-15 00:49:10.000000000 +0800
-@@ -20,7 +20,9 @@
- #ifndef _SEARCH_H
- #define _SEARCH_H 1
-
-+#ifndef __FreeBSD__
- #include <features.h>
-+#endif
-
- #define __need_size_t
- #include <stddef.h>
-@@ -49,10 +51,18 @@
- #endif
-
-
-+#ifdef __FreeBSD__
-+#define __PMT __P
-+#endif
-+
- /* For use with hsearch(3). */
- #ifndef __COMPAR_FN_T
- # define __COMPAR_FN_T
-+#ifdef __FreeBSD__
-+typedef int (*__compar_fn_t) __PMT ((__const void *, __const void *));
-+#else
- typedef int (*__compar_fn_t) __PMT ((__const __ptr_t, __const __ptr_t));
-+#endif
-
- # ifdef __USE_GNU
- typedef __compar_fn_t comparison_fn_t;
---- include/sound/asound.h.orig 2009-09-09 20:34:54.000000000 +0800
-+++ include/sound/asound.h 2009-09-15 00:44:37.000000000 +0800
-@@ -23,9 +23,42 @@
- #ifndef _UAPI__SOUND_ASOUND_H
- #define _UAPI__SOUND_ASOUND_H
-
-+#ifdef __linux__
- #include <linux/types.h>
-+#else
-+#define __bitwise
-+typedef uint32_t __u32;
-+typedef int __kernel_pid_t;
-+#endif
-+
-
-+#ifdef __FreeBSD__
-+#define ESTRPIPE 0x7a69 /* Linux PCM suspend errno, fehh?! */
-+#define EBADFD EBADF
-+
-+typedef uint64_t __u64;
-+
-+#define bswap_16(x) bswap16(x)
-+#define bswap_32(x) bswap32(x)
-+#define bswap_64(x) bswap64(x)
-+
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+#define __cpu_to_le32(x) (x)
-+#define __cpu_to_be32(x) bswap_32(x)
-+#define __cpu_to_le16(x) (x)
-+#define __cpu_to_be16(x) bswap_16(x)
-+#else
-+#define __cpu_to_le32(x) bswap_32(x)
-+#define __cpu_to_be32(x) (x)
-+#define __cpu_to_le16(x) bswap_16(x)
-+#define __cpu_to_be16(x) (x)
-+#endif
-
-+#define __le32_to_cpu __cpu_to_le32
-+#define __be32_to_cpu __cpu_to_be32
-+#define __le16_to_cpu __cpu_to_le16
-+#define __be16_to_cpu __cpu_to_be16
-+#endif
- /*
- * protocol version
- */
---- include/sound/type_compat.h.orig 2009-09-09 20:34:54.000000000 +0800
-+++ include/sound/type_compat.h 2009-09-15 00:36:14.000000000 +0800
-@@ -10,8 +10,15 @@
- typedef int16_t __s16;
- typedef int32_t __s32;
-
-+#ifdef __FreeBSD__
-+#include <sys/endian.h>
-+#define bswap_16(x) bswap16(x)
-+#define bswap_32(x) bswap32(x)
-+#define bswap_64(x) bswap64(x)
-+#else
- #include <endian.h>
- #include <byteswap.h>
-+#endif
- #if __BYTE_ORDER == __LITTLE_ENDIAN
- #define __cpu_to_le32(x) (x)
- #define __cpu_to_be32(x) bswap_32(x)
-$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
-
---- src/async.c.orig 2008-12-25 08:18:22 +0200
-+++ src/async.c 2008-12-25 08:20:39 +0200
-@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
-
- static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
- {
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+ /* XXX XXX XXX */
-+ struct list_head *i;
-+ list_for_each(i, &snd_async_handlers) {
-+ snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
-+ if (h->callback)
-+ h->callback(h);
-+ }
-+#else
- int fd;
- struct list_head *i;
- //assert(siginfo->si_code == SI_SIGIO);
-@@ -60,6 +61,7 @@
- if (h->fd == fd && h->callback)
- h->callback(h);
- }
-+#endif
- }
-
- /**
---- src/compat/hsearch_r.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/compat/hsearch_r.c 2009-09-15 00:22:11.000000000 +0800
-@@ -18,7 +18,11 @@
- Boston, MA 02111-1307, USA. */
-
- #include <errno.h>
-+#ifdef __GLIBC__
- #include <malloc.h>
-+#else
-+#include <stdlib.h>
-+#endif
- #include <string.h>
-
- #define __USE_GNU
---- src/conf.c.orig
-+++ src/conf.c
-@@ -428,7 +428,11 @@ beginning:</P>
-
- #ifdef HAVE_LIBPTHREAD
- static pthread_mutex_t snd_config_update_mutex =
-+#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-+#else
-+ PTHREAD_MUTEX_INITIALIZER;
-+#endif
- #endif
-
- struct _snd_config {
---- src/pcm/pcm.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm.c 2009-09-15 00:19:09.000000000 +0800
-@@ -630,7 +630,9 @@
-
- #include <stdio.h>
- #include <string.h>
-+#ifndef __FreeBSD__
- #include <malloc.h>
-+#endif
- #include <stdarg.h>
- #include <signal.h>
- #include <sys/poll.h>
---- src/pcm/pcm_adpcm.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_adpcm.c 2009-09-15 00:19:14.000000000 +0800
-@@ -56,7 +56,9 @@
- come across a good description of XA yet.
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-
---- src/pcm/pcm_alaw.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_alaw.c 2009-09-15 00:19:19.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-
---- src/pcm/pcm_copy.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_copy.c 2009-09-15 00:21:29.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-
---- src/pcm/pcm_direct.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_direct.c 2009-09-15 00:45:34.000000000 +0800
-@@ -44,12 +44,14 @@
- *
- */
-
-+#ifndef __FreeBSD__
- union semun {
- int val; /* Value for SETVAL */
- struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
- unsigned short *array; /* Array for GETALL, SETALL */
- struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */
- };
-+#endif
-
- /*
- * FIXME:
---- src/pcm/pcm_dmix_generic.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_dmix_generic.c 2009-09-15 00:18:52.000000000 +0800
-@@ -125,7 +125,9 @@
- (1ULL << SND_PCM_FORMAT_S24_3LE) | \
- (1ULL << SND_PCM_FORMAT_U8))
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
-
- static void generic_mix_areas_16_native(unsigned int size,
- volatile signed short *dst,
---- src/pcm/pcm_file.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_file.c 2009-09-15 00:21:10.000000000 +0800
-@@ -26,8 +26,12 @@
- *
- */
-
-+#ifdef __FreeBSD__
-+#include <sys/endian.h>
-+#else
- #include <endian.h>
- #include <byteswap.h>
-+#endif
- #include <ctype.h>
- #include <string.h>
- #include "pcm_local.h"
---- src/pcm/pcm_iec958.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_iec958.c 2009-09-15 00:19:44.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-
---- src/pcm/pcm_lfloat.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_lfloat.c 2009-09-15 00:21:48.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-
---- src/pcm/pcm_linear.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_linear.c 2009-09-15 00:21:37.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-
---- src/pcm/pcm_meter.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_meter.c 2009-09-15 00:18:38.000000000 +0800
-@@ -27,7 +27,9 @@
- */
-
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <time.h>
- #include <pthread.h>
- #include <dlfcn.h>
---- src/pcm/pcm_misc.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_misc.c 2009-09-15 00:18:31.000000000 +0800
-@@ -23,7 +23,9 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
-
-
---- src/pcm/pcm_mmap.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_mmap.c 2009-09-15 00:17:43.000000000 +0800
-@@ -19,7 +19,9 @@
- */
-
- #include <stdio.h>
-+#ifndef __FreeBSD__
- #include <malloc.h>
-+#endif
- #include <string.h>
- #include <sys/poll.h>
- #include <sys/mman.h>
---- src/pcm/pcm_mulaw.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_mulaw.c 2009-09-15 00:21:21.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
-
---- src/pcm/pcm_null.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_null.c 2009-09-15 00:19:32.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <limits.h>
- #include <sys/shm.h>
- #include "pcm_local.h"
---- src/pcm/pcm_rate.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_rate.c 2009-09-15 00:21:43.000000000 +0800
-@@ -28,7 +28,9 @@
- *
- */
- #include <inttypes.h>
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
- #include "pcm_rate.h"
---- src/pcm/pcm_rate_linear.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_rate_linear.c 2009-09-15 00:19:26.000000000 +0800
-@@ -21,7 +21,9 @@
- */
-
- #include <inttypes.h>
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include "pcm_local.h"
- #include "pcm_plugin.h"
- #include "pcm_rate.h"
---- src/pcm/pcm_route.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_route.c 2009-09-15 00:19:38.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <math.h>
- #include "pcm_local.h"
- #include "pcm_plugin.h"
---- src/pcm/pcm_softvol.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/pcm/pcm_softvol.c 2009-09-15 00:19:02.000000000 +0800
-@@ -26,7 +26,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <math.h>
- #include "pcm_local.h"
- #include "pcm_plugin.h"
---- src/seq/seq_midi_event.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/seq/seq_midi_event.c 2009-09-15 00:21:55.000000000 +0800
-@@ -28,7 +28,9 @@
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-+#ifndef __FreeBSD__
- #include <malloc.h>
-+#endif
- #include "local.h"
-
- #ifndef DOC_HIDDEN
---- src/shmarea.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/shmarea.c 2009-09-15 00:22:00.000000000 +0800
-@@ -19,7 +19,11 @@
- */
-
- #include <stdio.h>
-+#ifdef __GLIBC__
- #include <malloc.h>
-+#else
-+#include <stdlib.h>
-+#endif
- #include <string.h>
- #include <errno.h>
- #include <sys/poll.h>
---- src/userfile.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/userfile.c 2009-09-18 00:57:22.000000000 +0800
-@@ -19,9 +19,47 @@
- */
-
- #include <config.h>
-+#ifdef __FreeBSD__
-+#include <stdlib.h>
-+#endif
- #include <string.h>
- #include <errno.h>
-
-+/*
-+ * XXX Something is definitely wrong, very very wrong, here or there.
-+ * Apparently mplayer (so far) is the only app that break, returning
-+ * WRDE_SYNTAX. For now, this simple home/path expansion should work.
-+ * I'll investigate this further in future.
-+ */
-+#ifdef __FreeBSD__
-+int snd_user_file(const char *file, char **result)
-+{
-+
-+ if (file == NULL)
-+ return -EINVAL;
-+
-+ if (strlen(file) > 2 && strncmp(file, "~/", 2) == 0) {
-+ char *homedir, *path;
-+
-+ homedir = getenv("HOME");
-+ if (homedir == NULL)
-+ return -EINVAL;
-+
-+ /* offset -1 by removing '~' */
-+ path = malloc(strlen(homedir) + strlen(file));
-+ if (path == NULL)
-+ return -ENOMEM;
-+
-+ strcpy(path, homedir); /* copy home directory */
-+ strcat(path, file + 1); /* discard '~', start with '/' */
-+
-+ *result = path;
-+ } else
-+ *result = strdup(file);
-+
-+ return 0;
-+}
-+#else
- /**
- * \brief Get the full file name
- * \param file The file name string to parse
-@@ -70,3 +108,4 @@
- return 0;
- }
- #endif /* HAVE_WORDEXP_H */
-+#endif /* __FreeBSD__ */
---- src/timer/timer_hw.c.orig 2009-09-09 20:34:54.000000000 +0800
-+++ src/timer/timer_hw.c 2009-09-15 00:46:06.000000000 +0800
-@@ -92,10 +92,12 @@
- }
- if (sig < 0)
- return 0;
-+#ifndef __FreeBSD__
- if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
- SYSERR("F_SETSIG failed");
- return -errno;
- }
-+#endif
- if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
- SYSERR("F_SETOWN failed");
- return -errno;
diff --git a/audio/alsa-lib/files/patch-include__pcm.h b/audio/alsa-lib/files/patch-include__pcm.h
new file mode 100644
index 000000000000..ab9f6709a3dd
--- /dev/null
+++ b/audio/alsa-lib/files/patch-include__pcm.h
@@ -0,0 +1,16 @@
+--- include/pcm.h~
++++ include/pcm.h
+@@ -29,6 +29,13 @@
+ #ifndef __ALSA_PCM_H
+ #define __ALSA_PCM_H
+
++#ifndef ESTRPIPE
++#define ESTRPIPE EPIPE
++#endif
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
diff --git a/audio/alsa-lib/files/patch-src__async.c b/audio/alsa-lib/files/patch-src__async.c
new file mode 100644
index 000000000000..09d019004c13
--- /dev/null
+++ b/audio/alsa-lib/files/patch-src__async.c
@@ -0,0 +1,28 @@
+$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
+
+--- src/async.c~
++++ src/async.c
+@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
+
+ static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
+ {
++#if defined(__DragonFly__) || defined(__FreeBSD__)
++ /* XXX XXX XXX */
++ struct list_head *i;
++ list_for_each(i, &snd_async_handlers) {
++ snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
++ if (h->callback)
++ h->callback(h);
++ }
++#else
+ int fd;
+ struct list_head *i;
+ //assert(siginfo->si_code == SI_SIGIO);
+@@ -60,6 +69,7 @@ static void snd_async_handler(int signo
+ if (h->fd == fd && h->callback)
+ h->callback(h);
+ }
++#endif
+ }
+
+ /**
diff --git a/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c b/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c
new file mode 100644
index 000000000000..ba2ee2b2e6af
--- /dev/null
+++ b/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c
@@ -0,0 +1,19 @@
+--- src/pcm/pcm_direct.c~
++++ src/pcm/pcm_direct.c
+@@ -44,12 +44,16 @@
+ *
+ */
+
++#if defined(__NetBSD__)
++typedef __semun semun;
++#elif !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+ union semun {
+ int val; /* Value for SETVAL */
+ struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
+ unsigned short *array; /* Array for GETALL, SETALL */
+ struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */
+ };
++#endif
+
+ /*
+ * FIXME:
diff --git a/audio/alsa-lib/files/patch-src__timer__timer_hw.c b/audio/alsa-lib/files/patch-src__timer__timer_hw.c
new file mode 100644
index 000000000000..8f21d3cd4139
--- /dev/null
+++ b/audio/alsa-lib/files/patch-src__timer__timer_hw.c
@@ -0,0 +1,15 @@
+--- src/timer/timer_hw.c~
++++ src/timer/timer_hw.c
+@@ -91,10 +91,12 @@ static int snd_timer_hw_async(snd_timer_
+ }
+ if (sig < 0)
+ return 0;
++#ifdef F_SETSIG
+ if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
+ SYSERR("F_SETSIG failed");
+ return -errno;
+ }
++#endif
+ if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
+ SYSERR("F_SETOWN failed");
+ return -errno;
diff --git a/audio/alsa-lib/pkg-plist b/audio/alsa-lib/pkg-plist
index d612ead86aba..b01c7efd3e5e 100644
--- a/audio/alsa-lib/pkg-plist
+++ b/audio/alsa-lib/pkg-plist
@@ -86,6 +86,7 @@ share/alsa/cards/ICE1724.conf
share/alsa/cards/ICH-MODEM.conf
share/alsa/cards/ICH.conf
share/alsa/cards/ICH4.conf
+share/alsa/cards/Loopback.conf
share/alsa/cards/Maestro3.conf
share/alsa/cards/NFORCE.conf
share/alsa/cards/PC-Speaker.conf
@@ -121,6 +122,7 @@ share/alsa/pcm/iec958.conf
share/alsa/pcm/modem.conf
share/alsa/pcm/rear.conf
share/alsa/pcm/side.conf
+share/alsa/pcm/surround21.conf
share/alsa/pcm/surround40.conf
share/alsa/pcm/surround41.conf
share/alsa/pcm/surround50.conf
diff --git a/audio/alsa-plugins/Makefile b/audio/alsa-plugins/Makefile
index 613aab2c828f..807cad449d66 100644
--- a/audio/alsa-plugins/Makefile
+++ b/audio/alsa-plugins/Makefile
@@ -2,86 +2,63 @@
# $FreeBSD$
PORTNAME= alsa-plugins
-PORTVERSION= 1.0.27
-PORTREVISION= 3
+PORTVERSION= 1.0.28
CATEGORIES= audio
MASTER_SITES= ALSA/plugins \
GENTOO/distfiles
-MAINTAINER= aragon@phat.za.net
+MAINTAINER= jbeich@vfemail.net
COMMENT= ALSA compatibility library plugins
+LICENSE= LGPL21 # or any later version
+
LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib
GNU_CONFIGURE= yes
USES= tar:bzip2 pkgconfig libtool:keepla
-LDFLAGS+= -L${LOCALBASE}/lib
EXTRA_PATCHES+= ${FILESDIR}/alsa-plugins.patch
+INSTALL_TARGET= install-strip
+CPPFLAGS+= -I${.CURDIR}/../alsa-lib/files
+LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_DEFAULT=BUFSZ_P2 IO_PTR
OPTIONS_DEFINE= JACK FFMPEG PULSEAUDIO SAMPLERATE SPEEX
-OPTIONS_SUB= ${OPTIONS_DEFINE}
+OPTIONS_SUB= yes
OPTIONS_GROUP= OSS
OPTIONS_GROUP_OSS=IO_PTR BLKCNT_P2 BUFSZ_P2 VERBOSE
IO_PTR_DESC= Precise playback/recording pointer
BLKCNT_P2_DESC= Restrict number of fragments to ^2 aligned
-BUFSZ_P2_DESC= Restrict buffer size to ^2 aligned (breaks aplay)
+BUFSZ_P2_DESC= Restrict buffer size to ^2 aligned
VERBOSE_DESC= Print debugging messages
-.include <bsd.port.options.mk>
+IO_PTR_CFLAGS= -DFREEBSD_OSS_USE_IO_PTR
+BLKCNT_P2_CFLAGS=-DFREEBSD_OSS_BLKCNT_P2
+BUFSZ_P2_CFLAGS=-DFREEBSD_OSS_BUFSZ_P2
+VERBOSE_CFLAGS= -DFREEBSD_OSS_DEBUG_VERBOSE
-.if ${PORT_OPTIONS:MIO_PTR}
-CFLAGS+= -DFREEBSD_OSS_USE_IO_PTR
-.endif
-
-.if ${PORT_OPTIONS:MBLKCNT_P2}
-CFLAGS+= -DFREEBSD_OSS_BLKCNT_P2
-.endif
-
-.if ${PORT_OPTIONS:MBUFSZ_P2}
-CFLAGS+= -DFREEBSD_OSS_BUFSZ_P2
-.endif
+JACK_LIB_DEPENDS= libjack.so:${PORTSDIR}/audio/jack
+JACK_CONFIGURE_ENABLE= jack
-.if ${PORT_OPTIONS:MVERBOSE}
-CFLAGS+= -DFREEBSD_OSS_DEBUG_VERBOSE
-.endif
+FFMPEG_LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
+FFMPEG_CONFIGURE_ENABLE=avcodec
+FFMPEG_CPPFLAGS= -I${LOCALBASE}/include
-.if ${PORT_OPTIONS:MJACK}
-.if empty(PORT_OPTIONS:MSAMPLERATE)
-IGNORE= JACK audio support requires SAMPLERATE
-.endif
-LIB_DEPENDS+= libjack.so:${PORTSDIR}/audio/jack
-.else
-CONFIGURE_ARGS+= --disable-jack
-.endif
+PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
+PULSEAUDIO_CONFIGURE_ENABLE=pulseaudio
-.if ${PORT_OPTIONS:MFFMPEG}
-CONFIGURE_ARGS+= --enable-avcodec
-CFLAGS+= -I${LOCALBASE}/include
-LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
-.else
-CONFIGURE_ARGS+= --disable-avcodec
-.endif
+SAMPLERATE_LIB_DEPENDS= libsamplerate.so:${PORTSDIR}/audio/libsamplerate
+SAMPLERATE_CONFIGURE_ENABLE=samplerate
-.if ${PORT_OPTIONS:MPULSEAUDIO}
-LIB_DEPENDS+= libpulse.so:${PORTSDIR}/audio/pulseaudio
-.else
-CONFIGURE_ARGS+= --disable-pulseaudio
-.endif
+SPEEX_LIB_DEPENDS= libspeex.so:${PORTSDIR}/audio/speex
+SPEEX_CONFIGURE_ON= --with-speex=lib
+SPEEX_CONFIGURE_OFF= --without-speex
-.if ${PORT_OPTIONS:MSAMPLERATE}
-LIB_DEPENDS+= libsamplerate.so:${PORTSDIR}/audio/libsamplerate
-.else
-CONFIGURE_ARGS+= --disable-samplerate
-.endif
+.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MSPEEX}
-CONFIGURE_ARGS+= --with-speex=lib
-LIB_DEPENDS+= libspeex.so:${PORTSDIR}/audio/speex
-.else
-CONFIGURE_ARGS+= --without-speex
+.if ${PORT_OPTIONS:MJACK} && empty(PORT_OPTIONS:MSAMPLERATE)
+IGNORE= JACK audio support requires SAMPLERATE
.endif
post-patch: .SILENT
diff --git a/audio/alsa-plugins/distinfo b/audio/alsa-plugins/distinfo
index ca8889a1cd48..afa467fb8906 100644
--- a/audio/alsa-plugins/distinfo
+++ b/audio/alsa-plugins/distinfo
@@ -1,2 +1,2 @@
-SHA256 (alsa-plugins-1.0.27.tar.bz2) = 0bbd0c37c2dd7baf16363afb2e58169ffb0f9c0a70031b3b6235594630f3ab35
-SIZE (alsa-plugins-1.0.27.tar.bz2) = 363593
+SHA256 (alsa-plugins-1.0.28.tar.bz2) = 426f8af1a07ee9d8c06449524d1f0bd59a06e0331a51aa3d59d343a7c6d03120
+SIZE (alsa-plugins-1.0.28.tar.bz2) = 366023
diff --git a/audio/alsa-plugins/files/alsa-plugins.patch b/audio/alsa-plugins/files/alsa-plugins.patch
index 0e3c21e2dca4..227ca5a0c43e 100644
--- a/audio/alsa-plugins/files/alsa-plugins.patch
+++ b/audio/alsa-plugins/files/alsa-plugins.patch
@@ -42,14 +42,11 @@
oss->ext.private_data = oss;
--- oss/pcm_oss.c.orig 2009-08-31 21:09:41.000000000 +0800
+++ oss/pcm_oss.c 2009-09-28 14:54:12.000000000 +0800
-@@ -22,17 +22,48 @@
+@@ -22,17 +22,41 @@
#include <sys/ioctl.h>
#include <alsa/asoundlib.h>
#include <alsa/pcm_external.h>
#include <linux/soundcard.h>
-+#ifdef __FreeBSD__
-+#include <sys/param.h>
-+#endif
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
+
@@ -58,11 +55,7 @@
+#define FREEBSD_OSS_RATE_MAX 384000
+
+#define FREEBSD_OSS_CHANNELS_MIN 1
-+#ifndef __DragonFly__
+#define FREEBSD_OSS_CHANNELS_MAX 8
-+#else
-+#define FREEBSD_OSS_CHANNELS_MAX 2
-+#endif
+
+#define FREEBSD_OSS_BUFSZ_MAX 131072
+#define FREEBSD_OSS_BLKCNT_MIN 2
diff --git a/audio/alsa-plugins/files/patch-ffmpeg-version b/audio/alsa-plugins/files/patch-ffmpeg-version
deleted file mode 100644
index f8cdb292280a..000000000000
--- a/audio/alsa-plugins/files/patch-ffmpeg-version
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: a52/pcm_a52.c
-===================================================================
---- a52/pcm_a52.c
-+++ a52/pcm_a52.c
-@@ -27,7 +27,7 @@
- #include <alsa/pcm_plugin.h>
- #include AVCODEC_HEADER
-
--#if LIBAVCODEC_VERSION_MAJOR >= 53 && LIBAVCODEC_VERSION_MINOR >= 34
-+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,34,0)
- #include <libavutil/audioconvert.h>
- #include <libavutil/mem.h>
- #define USE_AVCODEC_FRAME
diff --git a/audio/alsa-plugins/files/patch-jack-pcm_jack.c b/audio/alsa-plugins/files/patch-jack-pcm_jack.c
deleted file mode 100644
index 643954784152..000000000000
--- a/audio/alsa-plugins/files/patch-jack-pcm_jack.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- jack/pcm_jack.c.orig 2009-09-16 04:33:36.000000000 +0800
-+++ jack/pcm_jack.c 2009-09-16 04:33:55.000000000 +0800
-@@ -20,7 +20,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <sys/shm.h>
- #include <sys/types.h>
- #include <sys/socket.h>
diff --git a/audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c b/audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c
index 57f7f13f525d..5dd11f5555ce 100644
--- a/audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c
+++ b/audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c
@@ -2,21 +2,11 @@ based on https://github.com/dankamongmen/libdank/blob/master/libdank/compat-Free
--- usb_stream/pcm_usb_stream.c.orig
+++ usb_stream/pcm_usb_stream.c
-@@ -19,7 +19,9 @@
- */
-
- #define _GNU_SOURCE
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <sys/mman.h>
- #include <sys/shm.h>
- #include <sys/ioctl.h>
@@ -79,6 +81,69 @@ typedef struct {
static struct user_usb_stream *uus;
static pthread_mutex_t uus_mutex = PTHREAD_MUTEX_INITIALIZER;
-+#ifdef __FreeBSD__
++#ifndef __linux__
+/*
+ * Copyright (c) 2000-2011, Nick Black et al
+ * All rights reserved.
@@ -86,7 +76,7 @@ based on https://github.com/dankamongmen/libdank/blob/master/libdank/compat-Free
}
-+#ifndef __FreeBSD__
++#ifdef __linux__
uus->s = mremap(uus->s, sizeof(struct usb_stream), uus->s->read_size, MREMAP_MAYMOVE);
+#else
+ uus->s = mremap_compat(us->pfd.fd, uus->s, sizeof(struct usb_stream), uus->s->read_size, PROT_READ, MAP_SHARED);
diff --git a/audio/alsa-plugins/pkg-plist b/audio/alsa-plugins/pkg-plist
index a7a8b1d3dbdb..2902c173a459 100644
--- a/audio/alsa-plugins/pkg-plist
+++ b/audio/alsa-plugins/pkg-plist
@@ -40,3 +40,6 @@ lib/alsa-lib/libasound_module_pcm_vdownmix.so
%%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_medium.so
%%PULSEAUDIO%%share/alsa/alsa.conf.d/50-pulseaudio.conf
%%PULSEAUDIO%%share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example
+%%PULSEAUDIO%%@dirrmtry share/alsa/alsa.conf.d
+%%PULSEAUDIO%%@dirrmtry share/alsa
+@dirrmtry lib/alsa-lib
diff --git a/audio/alsa-utils/Makefile b/audio/alsa-utils/Makefile
index 8c69e164c1bc..f1409f3c54ef 100644
--- a/audio/alsa-utils/Makefile
+++ b/audio/alsa-utils/Makefile
@@ -2,47 +2,37 @@
# $FreeBSD$
PORTNAME= alsa-utils
-PORTVERSION= 1.0.27.2
-PORTREVISION= 2
+PORTVERSION= 1.0.28
CATEGORIES= audio
MASTER_SITES= ALSA/utils \
GENTOO/distfiles
-MAINTAINER= aragon@phat.za.net
+MAINTAINER= jbeich@vfemail.net
COMMENT= ALSA compatibility utils
+LICENSE= GPLv2 # or any later version
+
LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib
RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
USES= gmake tar:bzip2 shebangfix
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-udev-rules-dir="\$${prefix}/lib/udev"
-CFLAGS+= -I${LOCALBASE}/include
SHEBANG_FILES= alsaconf/alsaconf.in
+INSTALL_TARGET= install-strip
+CPPFLAGS+= -I${LOCALBASE}/include -I${.CURDIR}/../alsa-lib/files
+LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_SUB= yes
-OPTIONS_DEFINE= XMLTO NLS
-OPTIONS_DEFAULT=XMLTO
-XMLTO_DESC= Generate alsactl_init(7) man page using xmlto(1)
+OPTIONS_DEFINE= MANPAGES NLS
+OPTIONS_DEFAULT=MANPAGES
-.include <bsd.port.options.mk>
+MANPAGES_BUILD_DEPENDS= xmlto:${PORTSDIR}/textproc/xmlto
+MANPAGES_CONFIGURE_ENABLE=xmlto
-.if ${PORT_OPTIONS:MXMLTO}
-BUILD_DEPENDS+= xmlto:${PORTSDIR}/textproc/xmlto
-MAN7_EN+= alsactl_init.7
-.else
-CONFIGURE_ARGS+=--disable-xmlto
-.endif
-
-.if empty(PORT_OPTIONS:MNLS)
-LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+= NLS="@comment "
-.else
-LDFLAGS+= -L${LOCALBASE}/lib -lintl
-USES+= gettext
-PLIST_SUB+= NLS=""
-.endif
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE=nls
+NLS_LDFLAGS= -lintl
post-patch: .SILENT
${REINPLACE_CMD} -e '/LIBS/s/-ldl//g; /LIBRT/s/-lrt//g;' \
diff --git a/audio/alsa-utils/distinfo b/audio/alsa-utils/distinfo
index 815a81f0b3b9..0d9c6a4063d9 100644
--- a/audio/alsa-utils/distinfo
+++ b/audio/alsa-utils/distinfo
@@ -1,2 +1,2 @@
-SHA256 (alsa-utils-1.0.27.2.tar.bz2) = 02bfac39092f3b68d743c23ad3d688d6c5aa8df69f2ccd692c5b8282edb352ea
-SIZE (alsa-utils-1.0.27.2.tar.bz2) = 1143802
+SHA256 (alsa-utils-1.0.28.tar.bz2) = f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc
+SIZE (alsa-utils-1.0.28.tar.bz2) = 1146887
diff --git a/audio/alsa-utils/files/patch-alsa-utils b/audio/alsa-utils/files/patch-alsa-utils
deleted file mode 100644
index 66f4780055f0..000000000000
--- a/audio/alsa-utils/files/patch-alsa-utils
+++ /dev/null
@@ -1,136 +0,0 @@
---- alsaloop/alsaloop.c.orig
-+++ alsaloop/alsaloop.c
-@@ -30,6 +30,7 @@
- #include <sys/time.h>
- #include <math.h>
- #include <pthread.h>
-+#include <signal.h>
- #include <syslog.h>
- #include <sys/signal.h>
- #include "alsaloop.h"
-@@ -749,7 +750,11 @@ static void thread_job1(void *_data)
- snd_output_printf(output, "pool took %lius\n", timediff(tv2, tv1));
- }
- if (err < 0) {
-+#ifndef __FreeBSD__
- if (err == -EINTR || err == -ERESTART)
-+#else
-+ if (err == -EINTR)
-+#endif
- continue;
- logit(LOG_CRIT, "Poll failed: %s\n", strerror(-err));
- my_exit(thread, EXIT_FAILURE);
---- alsaloop/pcmjob.c.orig
-+++ alsaloop/pcmjob.c
-@@ -63,7 +63,11 @@ static const char *src_types[] = {
- #endif
-
- static pthread_mutex_t pcm_open_mutex =
-+#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-+#else
-+ PTHREAD_MUTEX_INITIALIZER;
-+#endif
-
- static inline void pcm_open_lock(void)
- {
---- alsamixer/mixer_display.c.orig
-+++ alsamixer/mixer_display.c
-@@ -17,7 +17,9 @@
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-+#ifndef __FreeBSD__
- #define _C99_SOURCE /* lrint() */
-+#endif
- #include "aconfig.h"
- #include <stdlib.h>
- #include <string.h>
---- alsamixer/volume_mapping.c.orig
-+++ alsamixer/volume_mapping.c
-@@ -37,7 +37,7 @@
- #include <stdbool.h>
- #include "volume_mapping.h"
-
--#ifdef __UCLIBC__
-+#if defined(__UCLIBC__) || defined(__FreeBSD__)
- /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
- #define exp10(x) (exp((x) * log(10)))
- #endif /* __UCLIBC__ */
---- aplay/aplay.c.orig 2010-04-16 13:11:06.000000000 +0200
-+++ aplay/aplay.c 2010-04-23 04:17:13.000000000 +0200
-@@ -28,7 +28,9 @@
-
- #define _GNU_SOURCE
- #include <stdio.h>
-+#ifndef __FreeBSD__
- #include <malloc.h>
-+#endif
- #include <unistd.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -48,7 +50,11 @@
- #include <sys/signal.h>
- #include <sys/stat.h>
- #include <sys/types.h>
-+#ifdef __FreeBSD__
-+#include <sys/endian.h>
-+#else
- #include <endian.h>
-+#endif
- #include "aconfig.h"
- #include "gettext.h"
- #include "formats.h"
-@@ -116,6 +122,11 @@
- static int use_strftime = 0;
- volatile static int recycle_capture_file = 0;
-
-+typedef off_t off64_t;
-+
-+#define lseek64 lseek
-+#define open64 open
-+
- static int fd = -1;
- static off64_t pbrec_count = LLONG_MAX, fdcount;
- static int vocmajor, vocminor;
-@@ -1086,8 +1097,8 @@
- err = snd_pcm_hw_params_get_buffer_time_max(params,
- &buffer_time, 0);
- assert(err >= 0);
-- if (buffer_time > 500000)
-- buffer_time = 500000;
-+ /* if (buffer_time > 500000) XXX WHO CARES?!?!?
-+ buffer_time = 500000; */
- }
- if (period_time == 0 && period_frames == 0) {
- if (buffer_time > 0)
---- aplay/formats.h.orig 2009-08-31 23:13:36.000000000 +0800
-+++ aplay/formats.h 2009-09-15 01:22:05.000000000 +0800
-@@ -1,8 +1,15 @@
- #ifndef FORMATS_H
- #define FORMATS_H 1
-
-+#ifdef __FreeBSD__
-+#include <sys/endian.h>
-+#define bswap_16(x) bswap16(x)
-+#define bswap_32(x) bswap32(x)
-+#define bswap_64(x) bswap64(x)
-+#else
- #include <endian.h>
- #include <byteswap.h>
-+#endif
-
- /* Definitions for .VOC files */
-
---- speaker-test/speaker-test.c.orig 2009-08-31 23:13:36.000000000 +0800
-+++ speaker-test/speaker-test.c 2009-09-15 01:22:48.000000000 +0800
-@@ -44,7 +44,9 @@
- #include <getopt.h>
- #include <inttypes.h>
- #include <ctype.h>
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <signal.h>
-
- #define ALSA_PCM_NEW_HW_PARAMS_API
diff --git a/audio/alsa-utils/files/patch-alsaloop__alsaloop.c b/audio/alsa-utils/files/patch-alsaloop__alsaloop.c
new file mode 100644
index 000000000000..22b0102aecb5
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsaloop__alsaloop.c
@@ -0,0 +1,14 @@
+--- alsaloop/alsaloop.c~
++++ alsaloop/alsaloop.c
+@@ -760,7 +761,11 @@ static void thread_job1(void *_data)
+ snd_output_printf(output, "pool took %lius\n", timediff(tv2, tv1));
+ }
+ if (err < 0) {
++#ifdef ERESTART
+ if (err == -EINTR || err == -ERESTART)
++#else
++ if (err == -EINTR)
++#endif
+ continue;
+ logit(LOG_CRIT, "Poll failed: %s\n", strerror(-err));
+ my_exit(thread, EXIT_FAILURE);
diff --git a/audio/alsa-utils/files/patch-alsamixer__mixer_display.c b/audio/alsa-utils/files/patch-alsamixer__mixer_display.c
new file mode 100644
index 000000000000..f3c645dcbf90
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsamixer__mixer_display.c
@@ -0,0 +1,12 @@
+--- alsamixer/mixer_display.c~
++++ alsamixer/mixer_display.c
+@@ -17,7 +17,9 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++#ifdef __GLIBC__
+ #define _C99_SOURCE /* lrint() */
++#endif
+ #include "aconfig.h"
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c b/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c
new file mode 100644
index 000000000000..ba1dd03ad509
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c
@@ -0,0 +1,11 @@
+--- alsamixer/volume_mapping.c~
++++ alsamixer/volume_mapping.c
+@@ -37,7 +37,7 @@
+ #include <stdbool.h>
+ #include "volume_mapping.h"
+
+-#ifdef __UCLIBC__
++#ifndef __GLIBC__
+ /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
+ #define exp10(x) (exp((x) * log(10)))
+ #endif /* __UCLIBC__ */
diff --git a/audio/alsa-utils/files/patch-aplay__aplay.c b/audio/alsa-utils/files/patch-aplay__aplay.c
new file mode 100644
index 000000000000..3cccaaa39c45
--- /dev/null
+++ b/audio/alsa-utils/files/patch-aplay__aplay.c
@@ -0,0 +1,23 @@
+--- aplay/aplay.c~
++++ aplay/aplay.c
+@@ -48,7 +48,6 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <endian.h>
+ #include "aconfig.h"
+ #include "gettext.h"
+ #include "formats.h"
+@@ -70,6 +69,12 @@
+ #define be32toh(x) __be32_to_cpu(x)
+ #endif
+
++#ifndef _LARGEFILE64_SOURCE
++/* assume modern system */
++typedef off_t off64_t;
++#define lseek64 lseek
++#endif
++
+ #define DEFAULT_FORMAT SND_PCM_FORMAT_U8
+ #define DEFAULT_SPEED 8000
+
diff --git a/audio/alsa-utils/files/patch-aplay__formats.h b/audio/alsa-utils/files/patch-aplay__formats.h
new file mode 100644
index 000000000000..56309d22103f
--- /dev/null
+++ b/audio/alsa-utils/files/patch-aplay__formats.h
@@ -0,0 +1,10 @@
+--- aplay/formats.h~
++++ aplay/formats.h
+@@ -1,7 +1,6 @@
+ #ifndef FORMATS_H
+ #define FORMATS_H 1
+
+-#include <endian.h>
+ #include <byteswap.h>
+
+ /* Definitions for .VOC files */
diff --git a/audio/alsa-utils/pkg-plist b/audio/alsa-utils/pkg-plist
index e4dd33d1fad9..24946bf38acb 100644
--- a/audio/alsa-utils/pkg-plist
+++ b/audio/alsa-utils/pkg-plist
@@ -29,7 +29,7 @@ man/man1/aseqdump.1.gz
man/man1/aseqnet.1.gz
man/man1/iecset.1.gz
man/man1/speaker-test.1.gz
-%%XMLTO%%man/man7/alsactl_init.7.gz
+%%MANPAGES%%man/man7/alsactl_init.7.gz
man/man8/alsaconf.8.gz
sbin/alsaconf
sbin/alsactl