From 44a17d7188631b27a3438c0faf65026870952d46 Mon Sep 17 00:00:00 2001 From: sunpoet Date: Fri, 20 Jul 2012 03:03:56 +0000 Subject: - Update to 1.0.25 - Convert to new options framework - alsa-plugins: - Add option: ARIFF_OSS for FreeBSD-specific patch - Revert ports/165247 per regression in ports/169767 - Unbreak arcam-av and usb_stream plugins - While I'm here, pet portlint by removing ABI version number from LIB_DEPENDS Changes: http://www.alsa-project.org/main/index.php/Changes_v1.0.24_v1.0.25 http://www.alsa-project.org/main/index.php/Changes_v1.0.23_v1.0.24 PR: ports/169841 Submitted by: Jan Beich (maintainer) --- audio/alsa-lib/Makefile | 8 +- audio/alsa-lib/distinfo | 4 +- audio/alsa-lib/files/patch-alsa-lib | 18 ++- audio/alsa-lib/files/patch-versionsort | 157 +++++++++++++++++++++ audio/alsa-lib/pkg-plist | 6 + audio/alsa-plugins/Makefile | 55 +++----- audio/alsa-plugins/distinfo | 4 +- audio/alsa-plugins/files/alsa-plugins.patch | 30 +--- audio/alsa-plugins/files/patch-arcam-av-arcam_av.c | 19 +++ audio/alsa-plugins/files/patch-configure | 59 ++------ audio/alsa-plugins/files/patch-jack-pcm_jack.c | 12 ++ audio/alsa-plugins/files/patch-oss-ctl_oss.c | 14 ++ audio/alsa-plugins/files/patch-oss-pcm_oss.c | 29 ++++ .../files/patch-usb_stream-pcm_usb_stream.c | 96 +++++++++++++ audio/alsa-plugins/pkg-plist | 6 + audio/alsa-utils/Makefile | 19 ++- audio/alsa-utils/distinfo | 4 +- audio/alsa-utils/files/patch-alsa-utils | 71 +++++++++- audio/alsa-utils/pkg-plist | 3 + 19 files changed, 484 insertions(+), 130 deletions(-) create mode 100644 audio/alsa-lib/files/patch-versionsort create mode 100644 audio/alsa-plugins/files/patch-arcam-av-arcam_av.c create mode 100644 audio/alsa-plugins/files/patch-jack-pcm_jack.c create mode 100644 audio/alsa-plugins/files/patch-oss-ctl_oss.c create mode 100644 audio/alsa-plugins/files/patch-oss-pcm_oss.c create mode 100644 audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile index dc5be0b..279b697 100644 --- a/audio/alsa-lib/Makefile +++ b/audio/alsa-lib/Makefile @@ -6,7 +6,7 @@ # PORTNAME= alsa-lib -PORTVERSION= 1.0.23 +PORTVERSION= 1.0.25 CATEGORIES= audio MASTER_SITES= ftp://ftp.silug.org/pub/alsa/lib/ \ ftp://gd.tuwien.ac.at/opsys/linux/alsa/lib/ \ @@ -19,7 +19,8 @@ COMMENT= ALSA compatibility library USE_BZIP2= yes USE_LDCONFIG= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --disable-aload --disable-python +CONFIGURE_ARGS+=--disable-aload --disable-python \ + --with-pkgconfdir="${PREFIX}/libdata/pkgconfig" post-patch: .SILENT ${REINPLACE_CMD} -e '/LIBS/ { s/-ldl//g; s/-lrt//g; }' \ @@ -28,9 +29,6 @@ post-patch: .SILENT ${WRKSRC}/modules/mixer/simple/Makefile.in ${REINPLACE_CMD} 's|/etc|${PREFIX}&|g' \ ${WRKSRC}/src/conf/alsa.conf - ${REINPLACE_CMD} \ - '/pkgconfigdir/s|$$(libdir)|$$(prefix)/libdata|g' \ - ${WRKSRC}/utils/Makefile.in post-install: ${INSTALL_DATA} ${FILESDIR}/asound.conf.sample ${PREFIX}/etc diff --git a/audio/alsa-lib/distinfo b/audio/alsa-lib/distinfo index 0082916..9586722 100644 --- a/audio/alsa-lib/distinfo +++ b/audio/alsa-lib/distinfo @@ -1,2 +1,2 @@ -SHA256 (alsa-lib-1.0.23.tar.bz2) = b4238ecaba5e4a1383af06180611a57ef29f9bf47bc177136dba1bb5b70ff423 -SIZE (alsa-lib-1.0.23.tar.bz2) = 808271 +SHA256 (alsa-lib-1.0.25.tar.bz2) = 5a1a805cf04106316d549ec650116ce6711a162e107ba8b3c551866680e286e6 +SIZE (alsa-lib-1.0.25.tar.bz2) = 838403 diff --git a/audio/alsa-lib/files/patch-alsa-lib b/audio/alsa-lib/files/patch-alsa-lib index 79a6c46..4bae5af 100644 --- a/audio/alsa-lib/files/patch-alsa-lib +++ b/audio/alsa-lib/files/patch-alsa-lib @@ -102,7 +102,7 @@ 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 -@@ -62,6 +62,31 @@ +@@ -62,6 +62,33 @@ #include #endif @@ -110,6 +110,8 @@ +#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) @@ -182,6 +184,20 @@ #include #define __USE_GNU +--- src/conf.c.orig ++++ src/conf.c +@@ -428,7 +428,11 @@ beginning:

+ + #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 @@ diff --git a/audio/alsa-lib/files/patch-versionsort b/audio/alsa-lib/files/patch-versionsort new file mode 100644 index 0000000..8009c8c --- /dev/null +++ b/audio/alsa-lib/files/patch-versionsort @@ -0,0 +1,157 @@ +based on https://bugs.busybox.net/show_bug.cgi?id=3529 + +--- include/local.h.orig ++++ include/local.h +@@ -285,4 +285,125 @@ int snd_config_search_alias_hooks(snd_co + const char *base, const char *key, + snd_config_t **result); + ++#ifdef NEED_VERSIONSORT ++ ++/* Compare strings while treating digits characters numerically. ++ Copyright (C) 1997, 2002 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Jean-François Bignolles , 1997. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++ ++/* states: S_N: normal, S_I: comparing integral part, S_F: comparing ++ fractionnal parts, S_Z: idem but with leading Zeroes only */ ++#define S_N 0x0 ++#define S_I 0x4 ++#define S_F 0x8 ++#define S_Z 0xC ++ ++/* result_type: CMP: return diff; LEN: compare using len_diff/diff */ ++#define CMP 2 ++#define LEN 3 ++ ++/* Compare S1 and S2 as strings holding indices/version numbers, ++ returning less than, equal to or greater than zero if S1 is less than, ++ equal to or greater than S2 (for more info, see the texinfo doc). ++*/ ++static inline ++int strverscmp (s1, s2) ++ const char *s1; ++ const char *s2; ++{ ++ const unsigned char *p1 = (const unsigned char *) s1; ++ const unsigned char *p2 = (const unsigned char *) s2; ++ unsigned char c1, c2; ++ int state; ++ int diff; ++ ++ /* Symbol(s) 0 [1-9] others (padding) ++ Transition (10) 0 (01) d (00) x (11) - */ ++ static const unsigned int next_state[] = ++ { ++ /* state x d 0 - */ ++ /* S_N */ S_N, S_I, S_Z, S_N, ++ /* S_I */ S_N, S_I, S_I, S_I, ++ /* S_F */ S_N, S_F, S_F, S_F, ++ /* S_Z */ S_N, S_F, S_Z, S_Z ++ }; ++ ++ static const int result_type[] = ++ { ++ /* state x/x x/d x/0 x/- d/x d/d d/0 d/- ++ 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */ ++ ++ /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, ++ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, ++ /* S_I */ CMP, -1, -1, CMP, +1, LEN, LEN, CMP, ++ +1, LEN, LEN, CMP, CMP, CMP, CMP, CMP, ++ /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, ++ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, ++ /* S_Z */ CMP, +1, +1, CMP, -1, CMP, CMP, CMP, ++ -1, CMP, CMP, CMP ++ }; ++ ++ if (p1 == p2) ++ return 0; ++ ++ c1 = *p1++; ++ c2 = *p2++; ++ /* Hint: '0' is a digit too. */ ++ state = S_N | ((c1 == '0') + (isdigit (c1) != 0)); ++ ++ while ((diff = c1 - c2) == 0 && c1 != '\0') ++ { ++ state = next_state[state]; ++ c1 = *p1++; ++ c2 = *p2++; ++ state |= (c1 == '0') + (isdigit (c1) != 0); ++ } ++ ++ state = result_type[state << 2 | (((c2 == '0') + (isdigit (c2) != 0)))]; ++ ++ switch (state) ++ { ++ case CMP: ++ return diff; ++ ++ case LEN: ++ while (isdigit (*p1++)) ++ if (!isdigit (*p2++)) ++ return 1; ++ ++ return isdigit (*p2) ? -1 : diff; ++ ++ default: ++ return state; ++ } ++} ++ ++static inline ++int versionsort(const void * a, const void * b) ++{ ++ return strverscmp ((*(const struct dirent **) a)->d_name, ++ (*(const struct dirent **) b)->d_name); ++} ++ ++#endif + #endif +--- src/conf.c.orig ++++ src/conf.c +@@ -419,6 +419,9 @@ beginning:

+ #include + #include + #include ++#if defined(__FreeBSD__) || __UCLIBC_MAJOR__ == 0 && __UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 30 ++#define NEED_VERSIONSORT ++#endif + #include "local.h" + #ifdef HAVE_LIBPTHREAD + #include +--- src/ucm/parser.c.orig ++++ src/ucm/parser.c +@@ -30,8 +30,11 @@ + * Jaroslav Kysela + */ + +-#include "ucm_local.h" + #include ++#if defined(__FreeBSD__) || __UCLIBC_MAJOR__ == 0 && __UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 30 ++#define NEED_VERSIONSORT ++#endif ++#include "ucm_local.h" + + /** The name of the environment variable containing the UCM directory */ + #define ALSA_CONFIG_UCM_VAR "ALSA_CONFIG_UCM" diff --git a/audio/alsa-lib/pkg-plist b/audio/alsa-lib/pkg-plist index 1acf9a8..3de2b72 100644 --- a/audio/alsa-lib/pkg-plist +++ b/audio/alsa-lib/pkg-plist @@ -28,10 +28,12 @@ include/alsa/seqmid.h include/alsa/sound/asound_fm.h include/alsa/sound/emu10k1.h include/alsa/sound/hdsp.h +include/alsa/sound/hdspm.h include/alsa/sound/sb16_csp.h include/alsa/sound/sscape_ioctl.h include/alsa/sound/type_compat.h include/alsa/timer.h +include/alsa/use-case.h include/alsa/version.h include/sys/asoundlib.h lib/alsa-lib/smixer/smixer-ac97.la @@ -46,6 +48,7 @@ lib/libasound.so.2 libdata/pkgconfig/alsa.pc share/aclocal/alsa.m4 share/alsa/alsa.conf +share/alsa/alsa.conf.d/README share/alsa/cards/AACI.conf share/alsa/cards/ATIIXP-MODEM.conf share/alsa/cards/ATIIXP-SPDMA.conf @@ -70,6 +73,8 @@ share/alsa/cards/ENS1370.conf share/alsa/cards/ENS1371.conf share/alsa/cards/ES1968.conf share/alsa/cards/FM801.conf +share/alsa/cards/FWSpeakers.conf +share/alsa/cards/FireWave.conf share/alsa/cards/GUS.conf share/alsa/cards/HDA-Intel.conf share/alsa/cards/ICE1712.conf @@ -125,6 +130,7 @@ etc/asound.conf.sample @dirrm share/alsa/pcm @dirrm share/alsa/cards/SI7018 @dirrm share/alsa/cards +@dirrm share/alsa/alsa.conf.d @dirrm share/alsa @dirrm lib/alsa-lib/smixer @dirrm lib/alsa-lib diff --git a/audio/alsa-plugins/Makefile b/audio/alsa-plugins/Makefile index ca0194f..858c316 100644 --- a/audio/alsa-plugins/Makefile +++ b/audio/alsa-plugins/Makefile @@ -6,92 +6,83 @@ # PORTNAME= alsa-plugins -PORTVERSION= 1.0.23 -PORTREVISION= 3 +PORTVERSION= 1.0.25 CATEGORIES= audio MASTER_SITES= ftp://ftp.silug.org/pub/alsa/plugins/ \ ftp://gd.tuwien.ac.at/opsys/linux/alsa/plugins/ \ http://dl.ambiweb.de/mirrors/ftp.alsa-project.org/plugins/ \ ftp://ftp.alsa-project.org/pub/plugins/ + MAINTAINER= aragon@phat.za.net COMMENT= ALSA compatibility library plugins -LIB_DEPENDS= asound.2:${PORTSDIR}/audio/alsa-lib +LIB_DEPENDS= asound:${PORTSDIR}/audio/alsa-lib + USE_BZIP2= yes GNU_CONFIGURE= yes USE_GNOME= pkgconfig LDFLAGS+= -L${LOCALBASE}/lib +USE_LDCONFIG= ${PREFIX}/lib/alsa-lib -OPTIONS= JACK "JACK audio support (requires SAMPLERATE)" Off \ - LAVC "libavcodec support" Off \ - SAMPLERATE "libsamplerate support" Off \ - PULSE "PulseAudio support" Off \ - SPEEX "Speex support" Off +OPTIONS_DEFINE= ARIFF_OSS JACK FFMPEG PULSEAUDIO SAMPLERATE SPEEX +OPTIONS_DEFAULT=ARIFF_OSS +ARIFF_OSS_DESC= FreeBSD-specific OSS plugin .include -.if defined(WITH_JACK) -.if defined(WITHOUT_SAMPLERATE) +.if ${PORT_OPTIONS:MARIFF_OSS} +EXTRA_PATCHES+= ${FILESDIR}/alsa-plugins.patch +.endif + +.if ${PORT_OPTIONS:MJACK} +.if empty(PORT_OPTIONS:MSAMPLERATE) IGNORE= JACK audio support requires SAMPLERATE .endif -LIB_DEPENDS+= jack.0:${PORTSDIR}/audio/jack +LIB_DEPENDS+= jack:${PORTSDIR}/audio/jack PLIST_SUB+= JACK="" .else PLIST_SUB+= JACK="@comment " CONFIGURE_ARGS+= --disable-jack .endif -.if defined(WITH_LAVC) +.if ${PORT_OPTIONS:MFFMPEG} CONFIGURE_ARGS+= --enable-avcodec CFLAGS+= -I${LOCALBASE}/include -LIB_DEPENDS+= avcodec.1:${PORTSDIR}/multimedia/ffmpeg +LIB_DEPENDS+= avcodec:${PORTSDIR}/multimedia/ffmpeg PLIST_SUB+= LAVC="" .else CONFIGURE_ARGS+= --disable-avcodec PLIST_SUB+= LAVC="@comment " .endif -.if defined(WITH_PULSE) -LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio +.if ${PORT_OPTIONS:MPULSEAUDIO} +LIB_DEPENDS+= pulse:${PORTSDIR}/audio/pulseaudio PLIST_SUB+= PULSE="" .else PLIST_SUB+= PULSE="@comment " CONFIGURE_ARGS+= --disable-pulseaudio .endif -.if defined(WITH_SAMPLERATE) -LIB_DEPENDS+= samplerate.1:${PORTSDIR}/audio/libsamplerate +.if ${PORT_OPTIONS:MSAMPLERATE} +LIB_DEPENDS+= samplerate:${PORTSDIR}/audio/libsamplerate PLIST_SUB+= SAMPLERATE="" .else PLIST_SUB+= SAMPLERATE="@comment " CONFIGURE_ARGS+= --disable-samplerate .endif -.if defined(WITH_SPEEX) +.if ${PORT_OPTIONS:MSPEEX} CONFIGURE_ARGS+= --with-speex=lib -LIB_DEPENDS+= speex.1:${PORTSDIR}/audio/speex +LIB_DEPENDS+= speex:${PORTSDIR}/audio/speex PLIST_SUB+= SPEEX="" .else CONFIGURE_ARGS+= --without-speex PLIST_SUB+= SPEEX="@comment " .endif -.if ${OSVERSION} > 900036 \ - || ${OSVERSION} > 802503 && ${OSVERSION} < 900000 \ - || ${OSVERSION} > 704000 && ${OSVERSION} < 800000 -EXTRA_PATCHES+= ${FILESDIR}/alsa-plugins-getiptrfix.patch -.else # ${OSVERSION} <= 704000 -EXTRA_PATCHES+= ${FILESDIR}/alsa-plugins.patch -.endif - post-patch: .SILENT ${REINPLACE_CMD} -e '/LIBS/s/-ldl//g' \ -e '/lt_cv_dlopen/s/-ldl//g' \ - -Ee '/ac_config_files/s:(usb_stream|arcam-av)/Makefile::g' \ - -e '/CONFIG_FILES/ { /usb_stream/d; /arcam-av/d; }' \ ${WRKSRC}/configure - ${REINPLACE_CMD} \ - '/SUBDIRS/ { s/usb_stream//g; s/arcam-av//g; }' \ - ${WRKSRC}/Makefile.in .include diff --git a/audio/alsa-plugins/distinfo b/audio/alsa-plugins/distinfo index e3f87e1..4ae658b 100644 --- a/audio/alsa-plugins/distinfo +++ b/audio/alsa-plugins/distinfo @@ -1,2 +1,2 @@ -SHA256 (alsa-plugins-1.0.23.tar.bz2) = 5c1b2791ad33ef01f0f4f040004c931310da05e45aaa8d4146024c586f2b3183 -SIZE (alsa-plugins-1.0.23.tar.bz2) = 326504 +SHA256 (alsa-plugins-1.0.25.tar.bz2) = a0e374fd6d5ee9683473a5b6e73dadde61d54851065ed670d6627d344b565aab +SIZE (alsa-plugins-1.0.25.tar.bz2) = 331568 diff --git a/audio/alsa-plugins/files/alsa-plugins.patch b/audio/alsa-plugins/files/alsa-plugins.patch index b285aa3..c7ebabd 100644 --- a/audio/alsa-plugins/files/alsa-plugins.patch +++ b/audio/alsa-plugins/files/alsa-plugins.patch @@ -1,29 +1,5 @@ ---- 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 -+#endif - #include - #include - #include --- oss/ctl_oss.c.orig 2009-08-31 21:09:41.000000000 +0800 +++ oss/ctl_oss.c 2009-09-15 01:07:51.000000000 +0800 -@@ -26,7 +26,11 @@ - #include - #include - #include -+#ifdef __FreeBSD__ -+#include -+#else - #include -+#endif - - typedef struct snd_ctl_oss { - snd_ctl_ext_t ext; @@ -362,7 +366,9 @@ { snd_config_iterator_t it, next; @@ -66,15 +42,13 @@ 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,57 @@ +@@ -22,17 +22,55 @@ #include #include #include + #include +#ifdef __FreeBSD__ +#include -+#include -+#else - #include +#endif + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) diff --git a/audio/alsa-plugins/files/patch-arcam-av-arcam_av.c b/audio/alsa-plugins/files/patch-arcam-av-arcam_av.c new file mode 100644 index 0000000..2826201 --- /dev/null +++ b/audio/alsa-plugins/files/patch-arcam-av-arcam_av.c @@ -0,0 +1,19 @@ +--- arcam-av/arcam_av.c.orig ++++ arcam-av/arcam_av.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -37,6 +38,8 @@ + #include + #include + ++#define AF_FILE AF_UNIX ++ + #define MIN(a, b) ((a) < (b) ? (a) : (b)) + #define MAX(a, b) ((a) > (b) ? (a) : (b)) + diff --git a/audio/alsa-plugins/files/patch-configure b/audio/alsa-plugins/files/patch-configure index 3580160..a0da753 100644 --- a/audio/alsa-plugins/files/patch-configure +++ b/audio/alsa-plugins/files/patch-configure @@ -1,31 +1,10 @@ --- configure.orig 2010-04-16 13:18:56.000000000 +0200 +++ configure 2010-05-11 00:08:29.000000000 +0200 -@@ -21249,6 +21249,20 @@ - - - -+ -+ -+ -+# Check whether --with-speex was given. -+if test "${with_speex+set}" = set; then -+ withval=$with_speex; PPH=$withval -+else -+ PPH="lib" -+fi -+ -+ -+USE_LIBSPEEX="" -+HAVE_SPEEXDSP="" -+if test "$PPH" = "lib"; then - pkg_failed=no - { echo "$as_me:$LINENO: checking for speexdsp" >&5 - echo $ECHO_N "checking for speexdsp... $ECHO_C" >&6; } -@@ -21319,26 +21333,6 @@ +@@ -19608,14 +19608,6 @@ else + $as_echo "yes" >&6; } + HAVE_SPEEXDSP="yes" fi - - --if test "$HAVE_SPEEXDSP" = "yes"; then +- if test "$HAVE_SPEEXDSP" = "yes"; then - HAVE_SPEEXDSP_TRUE= - HAVE_SPEEXDSP_FALSE='#' -else @@ -33,32 +12,22 @@ - HAVE_SPEEXDSP_FALSE= -fi - -- -- --# Check whether --with-speex was given. --if test "${with_speex+set}" = set; then -- withval=$with_speex; PPH=$withval --else -- PPH="lib" --fi -- -- --USE_LIBSPEEX="" --if test "$PPH" = "lib"; then - if test "$HAVE_SPEEXDSP" = "yes"; then - { echo "$as_me:$LINENO: checking for speex_resampler_init in -lspeexdsp" >&5 - echo $ECHO_N "checking for speex_resampler_init in -lspeexdsp... $ECHO_C" >&6; } -@@ -21437,6 +21431,13 @@ + + + # Check whether --with-speex was given. +@@ -19626,6 +19618,15 @@ else fi -+if test "$HAVE_SPEEXDSP" = "yes"; then ++ if test "$HAVE_SPEEXDSP" = "yes" -a "$PPH" != "no"; then + HAVE_SPEEXDSP_TRUE= + HAVE_SPEEXDSP_FALSE='#' +else + HAVE_SPEEXDSP_TRUE='#' + HAVE_SPEEXDSP_FALSE= +fi - - if test "$PPH" = "builtin" -o "$PPH" = "lib"; then - HAVE_PPH_TRUE= ++ ++ + USE_LIBSPEEX="" + if test "$PPH" = "lib"; then + if test "$HAVE_SPEEXDSP" = "yes"; then diff --git a/audio/alsa-plugins/files/patch-jack-pcm_jack.c b/audio/alsa-plugins/files/patch-jack-pcm_jack.c new file mode 100644 index 0000000..6439547 --- /dev/null +++ b/audio/alsa-plugins/files/patch-jack-pcm_jack.c @@ -0,0 +1,12 @@ +--- 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 ++#endif + #include + #include + #include diff --git a/audio/alsa-plugins/files/patch-oss-ctl_oss.c b/audio/alsa-plugins/files/patch-oss-ctl_oss.c new file mode 100644 index 0000000..09b9b30 --- /dev/null +++ b/audio/alsa-plugins/files/patch-oss-ctl_oss.c @@ -0,0 +1,14 @@ +--- oss/ctl_oss.c.orig 2008-10-29 08:42:13.000000000 -0400 ++++ oss/ctl_oss.c +@@ -26,7 +26,11 @@ + #include + #include + #include ++#ifdef __linux__ + #include ++#else ++#include ++#endif + + typedef struct snd_ctl_oss { + snd_ctl_ext_t ext; diff --git a/audio/alsa-plugins/files/patch-oss-pcm_oss.c b/audio/alsa-plugins/files/patch-oss-pcm_oss.c new file mode 100644 index 0000000..98de34b --- /dev/null +++ b/audio/alsa-plugins/files/patch-oss-pcm_oss.c @@ -0,0 +1,29 @@ +--- oss/pcm_oss.c.orig 2008-10-29 08:42:13.000000000 -0400 ++++ oss/pcm_oss.c +@@ -22,4 +22,8 @@ + #include + #include + #include ++#ifdef __linux__ + #include ++#else ++#include ++#endif +@@ -116,7 +120,7 @@ static int oss_drain(snd_pcm_ioplug_t *i + snd_pcm_oss_t *oss = io->private_data; + + if (io->stream == SND_PCM_STREAM_PLAYBACK) +- ioctl(oss->fd, SNDCTL_DSP_SYNC); ++ ioctl(oss->fd, SNDCTL_DSP_SYNC, NULL); + return 0; + } + +@@ -125,7 +129,7 @@ static int oss_prepare(snd_pcm_ioplug_t + snd_pcm_oss_t *oss = io->private_data; + int tmp; + +- ioctl(oss->fd, SNDCTL_DSP_RESET); ++ ioctl(oss->fd, SNDCTL_DSP_RESET, NULL); + + tmp = io->channels; + if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) { 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 new file mode 100644 index 0000000..ebb3d7d --- /dev/null +++ b/audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c @@ -0,0 +1,96 @@ +based on https://github.com/dankamongmen/libdank/blob/master/libdank/compat-FreeBSD.c + +--- usb_stream/pcm_usb_stream.c.orig ++++ usb_stream/pcm_usb_stream.c +@@ -18,7 +18,9 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++#ifndef __FreeBSD__ + #include ++#endif + #define _GNU_SOURCE + #include + #include +@@ -79,6 +81,69 @@ typedef struct { + static struct user_usb_stream *uus; + static pthread_mutex_t uus_mutex = PTHREAD_MUTEX_INITIALIZER; + ++#ifdef __FreeBSD__ ++/* ++ * Copyright (c) 2000-2011, Nick Black et al ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of Nick Black nor the names of other contributors may ++ * be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ++ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND ++ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ++ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++// This is suitable really only for use with libdank's mremap_and_ftruncate(), ++// due to assumptions it makes about the flags to pass to mmap(2). The only ++// mremap(2) use case addressed is that of MREMAP_MAYMOVE. oldaddr must be a ++// valid previous return from mmap(); NULL is not acceptable (ala Linux's ++// mremap(2)), resulting in undefined behavior, despite realloc(3) semantics. ++// Similarly, oldlen and newlen must be non-zero (and page-aligned). ++void *mremap_compat(int fd,void *oldaddr,size_t oldlen, ++ size_t newlen,int prot,int flags){ ++ void *ret; ++ ++ // From mmap(2) on freebsd 6.3: A successful FIXED mmap deletes any ++ // previous mapping in the allocated address range. This means: ++ // remapping over a current map will blow it away (unless FIXED isn't ++ // provided, in which case it can't overlap an old mapping. See bug ++ // 733 for extensive discussion of this issue for Linux and FreeBSD). ++ if((ret = mmap((char *)oldaddr + oldlen,newlen - oldlen,prot,flags,fd,oldlen)) == MAP_FAILED){ ++ // We couldn't get the memory whatsoever (or we were a fresh ++ // allocation that succeeded). Return the immediate result... ++ return ret; ++ } // ret != MAP_FAILED. Did we squash? ++ if(ret != (char *)oldaddr + oldlen){ ++ // We got the memory, but not where we wanted it. Copy over the ++ // old map, and then free it up... ++ munmap(ret,newlen - oldlen); ++ if((ret = mmap(NULL,newlen,prot,flags,fd,0)) == MAP_FAILED){ ++ return ret; ++ } ++ memcpy(ret,oldaddr,oldlen); ++ munmap(oldaddr,oldlen); // Free the old mapping ++ return ret; ++ } // We successfully squashed. Return a pointer to the first buf. ++ return oldaddr; ++} ++#endif ++ + static struct user_usb_stream *get_uus(const char *card) + { + pthread_mutex_lock(&uus_mutex); +@@ -219,7 +284,11 @@ static int snd_pcm_us_prepare(snd_pcm_io + } + + ++#ifndef __FreeBSD__ + 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); ++#endif + if (MAP_FAILED == uus->s) { + perror("ALSA/USX2Y: mmap"); + return -EPERM; diff --git a/audio/alsa-plugins/pkg-plist b/audio/alsa-plugins/pkg-plist index 280dbda..0512573 100644 --- a/audio/alsa-plugins/pkg-plist +++ b/audio/alsa-plugins/pkg-plist @@ -1,5 +1,7 @@ %%PULSE%%lib/alsa-lib/libasound_module_conf_pulse.la %%PULSE%%lib/alsa-lib/libasound_module_conf_pulse.so +lib/alsa-lib/libasound_module_ctl_arcam_av.la +lib/alsa-lib/libasound_module_ctl_arcam_av.so lib/alsa-lib/libasound_module_ctl_oss.la lib/alsa-lib/libasound_module_ctl_oss.so %%PULSE%%lib/alsa-lib/libasound_module_ctl_pulse.la @@ -16,6 +18,8 @@ lib/alsa-lib/libasound_module_pcm_oss.so %%SPEEX%%lib/alsa-lib/libasound_module_pcm_speex.so lib/alsa-lib/libasound_module_pcm_upmix.la lib/alsa-lib/libasound_module_pcm_upmix.so +lib/alsa-lib/libasound_module_pcm_usb_stream.la +lib/alsa-lib/libasound_module_pcm_usb_stream.so lib/alsa-lib/libasound_module_pcm_vdownmix.la lib/alsa-lib/libasound_module_pcm_vdownmix.so %%LAVC%%lib/alsa-lib/libasound_module_rate_lavcrate.la @@ -34,3 +38,5 @@ lib/alsa-lib/libasound_module_pcm_vdownmix.so %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate.so %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_best.so %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_medium.so +%%PULSE%%share/alsa/alsa.conf.d/50-pulseaudio.conf +%%PULSE%%share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example diff --git a/audio/alsa-utils/Makefile b/audio/alsa-utils/Makefile index 417bc81..fc40ca8 100644 --- a/audio/alsa-utils/Makefile +++ b/audio/alsa-utils/Makefile @@ -6,8 +6,7 @@ # PORTNAME= alsa-utils -PORTVERSION= 1.0.23 -PORTREVISION= 1 +PORTVERSION= 1.0.25 CATEGORIES= audio MASTER_SITES= ftp://ftp.silug.org/pub/alsa/utils/ \ ftp://gd.tuwien.ac.at/opsys/linux/alsa/utils/ \ @@ -17,31 +16,34 @@ MASTER_SITES= ftp://ftp.silug.org/pub/alsa/utils/ \ MAINTAINER= aragon@phat.za.net COMMENT= ALSA compatibility utils -LIB_DEPENDS= asound.2:${PORTSDIR}/audio/alsa-lib +LIB_DEPENDS= asound:${PORTSDIR}/audio/alsa-lib RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins + USE_BZIP2= yes USE_GMAKE= yes GNU_CONFIGURE= yes CFLAGS+= -I${LOCALBASE}/include -MAN1_EN= aconnect.1 alsactl.1 alsamixer.1 amidi.1 amixer.1 aplay.1 aplaymidi.1 \ +MAN1_EN= aconnect.1 alsactl.1 alsaloop.1 alsamixer.1 amidi.1 amixer.1 aplay.1 aplaymidi.1 \ arecordmidi.1 aseqdump.1 aseqnet.1 iecset.1 speaker-test.1 MAN8= alsaconf.8 MLINKS= aplay.1 arecord.1 _MANPAGES+= ${PREFIX}/man/fr/man8/${MAN8} -OPTIONS= XMLTO "Generate alsactl_init(7) man page using xmlto(1)" On +OPTIONS_DEFINE= XMLTO NLS +OPTIONS_DEFAULT=XMLTO +XMLTO_DESC= Generate alsactl_init(7) man page using xmlto(1) .include -.if defined(WITH_XMLTO) +.if ${PORT_OPTIONS:MXMLTO} BUILD_DEPENDS+= xmlto:${PORTSDIR}/textproc/xmlto MAN7_EN+= alsactl_init.7 .else CONFIGURE_ARGS+=--disable-xmlto .endif -.if defined(WITHOUT_NLS) +.if empty(PORT_OPTIONS:MNLS) LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS+=--disable-nls PLIST_SUB+= NLS="@comment " @@ -53,6 +55,9 @@ PLIST_SUB+= NLS="" post-patch: .SILENT ${REINPLACE_CMD} '/LIBS/s/-ldl//g' ${WRKSRC}/configure + ${REINPLACE_CMD} -e '/install-data-am:/,/^$$/ \ + s/install-dist_udevrulesDATA//' \ + ${WRKSRC}/alsactl/Makefile.in ${FIND} -E ${WRKSRC} -type f -regex \ '.*\.([[:digit:]]|spec\.in|csv|xml)' -exec \ ${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \ diff --git a/audio/alsa-utils/distinfo b/audio/alsa-utils/distinfo index 1c8e824..d44e201 100644 --- a/audio/alsa-utils/distinfo +++ b/audio/alsa-utils/distinfo @@ -1,2 +1,2 @@ -SHA256 (alsa-utils-1.0.23.tar.bz2) = b7d05e915e25f8540ad151c6dd558cf0fc1e9bb0ee23052d531c983666a1f7b0 -SIZE (alsa-utils-1.0.23.tar.bz2) = 1076937 +SHA256 (alsa-utils-1.0.25.tar.bz2) = 2e676a2f634bbfe279b260e10a96f617cb72ee63c5bbf6c5f96bb615705b302c +SIZE (alsa-utils-1.0.25.tar.bz2) = 1132780 diff --git a/audio/alsa-utils/files/patch-alsa-utils b/audio/alsa-utils/files/patch-alsa-utils index efd3ecd..7e6207f 100644 --- a/audio/alsa-utils/files/patch-alsa-utils +++ b/audio/alsa-utils/files/patch-alsa-utils @@ -1,3 +1,62 @@ +--- alsaloop/alsaloop.c.orig ++++ alsaloop/alsaloop.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #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 . + */ + ++#ifndef __FreeBSD__ + #define _C99_SOURCE /* lrint() */ ++#endif + #include "aconfig.h" + #include + #include +--- alsamixer/volume_mapping.c.orig ++++ alsamixer/volume_mapping.c +@@ -37,7 +37,7 @@ + #include + #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 @@ @@ -10,14 +69,14 @@ #include #include #include -@@ -45,7 +47,11 @@ - #include - #include +@@ -48,7 +50,11 @@ #include -+#ifndef __FreeBSD__ - #include + #include + #include ++#ifdef __FreeBSD__ ++#include +#else -+#include + #include +#endif #include "aconfig.h" #include "gettext.h" diff --git a/audio/alsa-utils/pkg-plist b/audio/alsa-utils/pkg-plist index 8bf6e61..7f0d560 100644 --- a/audio/alsa-utils/pkg-plist +++ b/audio/alsa-utils/pkg-plist @@ -1,5 +1,7 @@ bin/aconnect +bin/alsaloop bin/alsamixer +bin/alsaucm bin/amidi bin/amixer bin/aplay @@ -20,6 +22,7 @@ share/alsa/init/info share/alsa/init/test share/alsa/speaker-test/sample_map.csv %%NLS%%share/locale/de/LC_MESSAGES/alsa-utils.mo +%%NLS%%share/locale/fr/LC_MESSAGES/alsa-utils.mo %%NLS%%share/locale/ja/LC_MESSAGES/alsa-utils.mo %%NLS%%share/locale/ja/LC_MESSAGES/alsaconf.mo %%NLS%%share/locale/ru/LC_MESSAGES/alsaconf.mo -- cgit v1.1