ports/145964: New port: audio/alsa-lib Compatibility layer for ALSA support

Aragon Gouveia aragon at phat.za.net
Fri Apr 23 03:30:02 UTC 2010


>Number:         145964
>Category:       ports
>Synopsis:       New port: audio/alsa-lib Compatibility layer for ALSA support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 23 03:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Aragon Gouveia
>Release:        FreeBSD 8.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD igor.geek.sh 8.0-STABLE FreeBSD 8.0-STABLE #0: Mon Mar 8 01:27:41 SAST 2010 toor at igor.geek.sh:/usr/obj/usr/src/sys/IGOR amd64


	
>Description:
	This port provides FreeBSD with a compatibility layer for software that depends on ALSA support.  It is based entirely on ariff@'s work at http://people.freebsd.org/~ariff/libasound/, but has been updated for the latest version of ALSA.

	Chromium for FreeBSD is an immediate beneficiary of this library.

	Special thanks to sprewell at jaggeri.com for testing this.
>How-To-Repeat:
	
>Fix:

	

--- alsa-lib.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	alsa-lib
#	alsa-lib/files
#	alsa-lib/files/patch-alsa-lib
#	alsa-lib/files/asound.conf.sample
#	alsa-lib/Makefile
#	alsa-lib/distinfo
#	alsa-lib/pkg-descr
#	alsa-lib/pkg-plist
#
echo c - alsa-lib
mkdir -p alsa-lib > /dev/null 2>&1
echo c - alsa-lib/files
mkdir -p alsa-lib/files > /dev/null 2>&1
echo x - alsa-lib/files/patch-alsa-lib
sed 's/^X//' >alsa-lib/files/patch-alsa-lib << 'e8a65b05ca0ac6badd38a50917522dcb'
X--- configure.orig	2009-09-09 20:36:11.000000000 +0800
X+++ configure	2009-09-15 00:38:20.000000000 +0800
X@@ -9728,7 +9728,7 @@
X   echo $ECHO_N "(cached) $ECHO_C" >&6
X else
X   ac_check_lib_save_LIBS=$LIBS
X-LIBS="-ldl  $LIBS"
X+LIBS="$LIBS"
X cat >conftest.$ac_ext <<_ACEOF
X /* confdefs.h.  */
X _ACEOF
X@@ -9800,7 +9800,7 @@
X { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
X echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
X if test $ac_cv_lib_dl_dlopen = yes; then
X-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
X+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs=""
X else
X 
X     lt_cv_dlopen="dyld"
X@@ -10098,7 +10098,7 @@
X   echo $ECHO_N "(cached) $ECHO_C" >&6
X else
X   ac_check_lib_save_LIBS=$LIBS
X-LIBS="-ldl  $LIBS"
X+LIBS="$LIBS"
X cat >conftest.$ac_ext <<_ACEOF
X /* confdefs.h.  */
X _ACEOF
X@@ -10170,7 +10170,7 @@
X { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
X echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
X if test $ac_cv_lib_dl_dlopen = yes; then
X-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
X+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs=""
X else
X   { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
X echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
X@@ -20859,7 +20859,7 @@
X   echo $ECHO_N "(cached) $ECHO_C" >&6
X else
X   ac_check_lib_save_LIBS=$LIBS
X-LIBS="-ldl  $LIBS"
X+LIBS="$LIBS"
X cat >conftest.$ac_ext <<_ACEOF
X /* confdefs.h.  */
X _ACEOF
X@@ -20935,7 +20935,7 @@
X fi
X 
X   if test "$HAVE_LIBDL" = "yes" ; then
X-    ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
X+    ALSA_DEPLIBS="$ALSA_DEPLIBS"
X 
X cat >>confdefs.h <<\_ACEOF
X #define HAVE_LIBDL 1
X--- include/asoundlib-head.h.orig	2009-09-09 20:34:54.000000000 +0800
X+++ include/asoundlib-head.h	2009-09-15 00:35:55.000000000 +0800
X@@ -34,7 +34,11 @@
X #include <string.h>
X #include <fcntl.h>
X #include <assert.h>
X+#ifdef __FreeBSD__
X+#include <sys/endian.h>
X+#else
X #include <endian.h>
X+#endif
X #include <sys/poll.h>
X #include <errno.h>
X #include <stdarg.h>
X@@ -46,3 +50,31 @@
X #include <alsa/output.h>
X #include <alsa/error.h>
X #include <alsa/conf.h>
X+
X+#ifdef __FreeBSD__
X+
X+#define ESTRPIPE	0x7a69	/* Linux PCM suspend errno, fehh?! */
X+#define EBADFD		EBADF
X+
X+#define bswap_16(x)	bswap16(x)
X+#define bswap_32(x)	bswap32(x)
X+#define bswap_64(x)	bswap64(x)
X+
X+#if __BYTE_ORDER == __LITTLE_ENDIAN
X+#define __cpu_to_le32(x) (x)
X+#define __cpu_to_be32(x) bswap_32(x)
X+#define __cpu_to_le16(x) (x)
X+#define __cpu_to_be16(x) bswap_16(x)
X+#else
X+#define __cpu_to_le32(x) bswap_32(x)
X+#define __cpu_to_be32(x) (x)
X+#define __cpu_to_le16(x) bswap_16(x)
X+#define __cpu_to_be16(x) (x)
X+#endif
X+
X+#define __le32_to_cpu __cpu_to_le32
X+#define __be32_to_cpu __cpu_to_be32
X+#define __le16_to_cpu __cpu_to_le16
X+#define __be16_to_cpu __cpu_to_be16
X+
X+#endif	/* !__FreeBSD__ */
X--- include/global.h.orig	2009-09-09 20:34:54.000000000 +0800
X+++ include/global.h	2009-09-15 00:39:54.000000000 +0800
X@@ -133,7 +133,7 @@
X 
X int snd_user_file(const char *file, char **result);
X 
X-#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
X+#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE) && !defined(__FreeBSD__)
X struct timeval {
X 	time_t		tv_sec;		/* seconds */
X 	long		tv_usec;	/* microseconds */
X--- include/local.h.orig	2009-09-09 20:34:54.000000000 +0800
X+++ include/local.h	2009-09-15 00:26:08.000000000 +0800
X@@ -28,7 +28,11 @@
X #include <string.h>
X #include <fcntl.h>
X #include <assert.h>
X+#ifdef __FreeBSD__
X+#include <sys/endian.h>
X+#else
X #include <endian.h>
X+#endif
X #include <stdarg.h>
X #include <sys/poll.h>
X #include <errno.h>
X--- include/search.h.orig	2009-09-09 20:34:54.000000000 +0800
X+++ include/search.h	2009-09-15 00:49:10.000000000 +0800
X@@ -20,7 +20,9 @@
X #ifndef _SEARCH_H
X #define	_SEARCH_H 1
X 
X+#ifndef __FreeBSD__
X #include <features.h>
X+#endif
X 
X #define __need_size_t
X #include <stddef.h>
X@@ -49,10 +51,18 @@
X #endif
X 
X 
X+#ifdef __FreeBSD__
X+#define __PMT	__P
X+#endif
X+
X /* For use with hsearch(3).  */
X #ifndef __COMPAR_FN_T
X # define __COMPAR_FN_T
X+#ifdef __FreeBSD__
X+typedef int (*__compar_fn_t) __PMT ((__const void *, __const void *));
X+#else
X typedef int (*__compar_fn_t) __PMT ((__const __ptr_t, __const __ptr_t));
X+#endif
X 
X # ifdef	__USE_GNU
X typedef __compar_fn_t comparison_fn_t;
X--- include/sound/asound.h.orig	2009-09-09 20:34:54.000000000 +0800
X+++ include/sound/asound.h	2009-09-15 00:44:37.000000000 +0800
X@@ -62,6 +62,31 @@
X #include <sys/ioctl.h>
X #endif
X 
X+#ifdef __FreeBSD__
X+#define ESTRPIPE	0x7a69	/* Linux PCM suspend errno, fehh?! */
X+#define EBADFD		EBADF
X+
X+#define bswap_16(x)	bswap16(x)
X+#define bswap_32(x)	bswap32(x)
X+#define bswap_64(x)	bswap64(x)
X+
X+#if __BYTE_ORDER == __LITTLE_ENDIAN
X+#define __cpu_to_le32(x) (x)
X+#define __cpu_to_be32(x) bswap_32(x)
X+#define __cpu_to_le16(x) (x)
X+#define __cpu_to_be16(x) bswap_16(x)
X+#else
X+#define __cpu_to_le32(x) bswap_32(x)
X+#define __cpu_to_be32(x) (x)
X+#define __cpu_to_le16(x) bswap_16(x)
X+#define __cpu_to_be16(x) (x)
X+#endif
X+
X+#define __le32_to_cpu __cpu_to_le32
X+#define __be32_to_cpu __cpu_to_be32
X+#define __le16_to_cpu __cpu_to_le16
X+#define __be16_to_cpu __cpu_to_be16
X+#endif
X /*
X  *  protocol version
X  */
X--- include/sound/type_compat.h.orig	2009-09-09 20:34:54.000000000 +0800
X+++ include/sound/type_compat.h	2009-09-15 00:36:14.000000000 +0800
X@@ -10,8 +10,15 @@
X typedef int16_t __s16;
X typedef int32_t __s32;
X 
X+#ifdef __FreeBSD__
X+#include <sys/endian.h>
X+#define bswap_16(x)	bswap16(x)
X+#define bswap_32(x)	bswap32(x)
X+#define bswap_64(x)	bswap64(x)
X+#else
X #include <endian.h>
X #include <byteswap.h>
X+#endif
X #if __BYTE_ORDER == __LITTLE_ENDIAN
X #define __cpu_to_le32(x) (x)
X #define __cpu_to_be32(x) bswap_32(x)
X--- modules/mixer/simple/Makefile.in.orig	2009-09-09 20:36:09.000000000 +0800
X+++ modules/mixer/simple/Makefile.in	2009-09-15 00:37:19.000000000 +0800
X@@ -308,10 +308,10 @@
X smixer_sbase_la_LIBADD = ../../../src/libasound.la
X smixer_ac97_la_SOURCES = ac97.c sbasedl.c
X smixer_ac97_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
X-smixer_ac97_la_LIBADD = ../../../src/libasound.la -ldl
X+smixer_ac97_la_LIBADD = ../../../src/libasound.la
X smixer_hda_la_SOURCES = hda.c sbasedl.c
X smixer_hda_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
X-smixer_hda_la_LIBADD = ../../../src/libasound.la -ldl
X+smixer_hda_la_LIBADD = ../../../src/libasound.la
X @BUILD_PYTHON_TRUE at smixer_python_la_SOURCES = python.c
X @BUILD_PYTHON_TRUE at smixer_python_la_LDFLAGS = -module -avoid-version $(LDFLAGS_NOUNDEFINED)
X @BUILD_PYTHON_TRUE at smixer_python_la_CFLAGS = $(PYTHON_INCLUDES)
X--- src/async.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/async.c	2009-09-15 00:49:34.000000000 +0800
X@@ -51,6 +51,7 @@
X 
X static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
X {
X+#ifndef __FreeBSD__
X 	int fd;
X 	struct list_head *i;
X 	//assert(siginfo->si_code == SI_SIGIO);
X@@ -60,6 +61,7 @@
X 		if (h->fd == fd && h->callback)
X 			h->callback(h);
X 	}
X+#endif
X }
X 
X /**
X--- src/compat/hsearch_r.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/compat/hsearch_r.c	2009-09-15 00:22:11.000000000 +0800
X@@ -18,7 +18,9 @@
X    Boston, MA 02111-1307, USA.  */
X 
X #include <errno.h>
X+#ifndef __FreeBSD__
X #include <malloc.h>
X+#endif
X #include <string.h>
X 
X #define __USE_GNU
X--- src/pcm/pcm.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm.c	2009-09-15 00:19:09.000000000 +0800
X@@ -630,7 +630,9 @@
X 
X #include <stdio.h>
X #include <string.h>
X+#ifndef __FreeBSD__
X #include <malloc.h>
X+#endif
X #include <stdarg.h>
X #include <signal.h>
X #include <sys/poll.h>
X--- src/pcm/pcm_adpcm.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_adpcm.c	2009-09-15 00:19:14.000000000 +0800
X@@ -56,7 +56,9 @@
X   come across a good description of XA yet.
X  */
X 
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X 
X--- src/pcm/pcm_alaw.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_alaw.c	2009-09-15 00:19:19.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X   
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X 
X--- src/pcm/pcm_copy.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_copy.c	2009-09-15 00:21:29.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X   
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X 
X--- src/pcm/pcm_direct.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_direct.c	2009-09-15 00:45:34.000000000 +0800
X@@ -44,12 +44,14 @@
X  *
X  */
X  
X+#ifndef __FreeBSD__
X union semun {
X 	int              val;    /* Value for SETVAL */
X 	struct semid_ds *buf;    /* Buffer for IPC_STAT, IPC_SET */
X 	unsigned short  *array;  /* Array for GETALL, SETALL */
X 	struct seminfo  *__buf;  /* Buffer for IPC_INFO (Linux specific) */
X };
X+#endif
X  
X /*
X  * FIXME:
X--- src/pcm/pcm_dmix_generic.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_dmix_generic.c	2009-09-15 00:18:52.000000000 +0800
X@@ -125,7 +125,9 @@
X 	 (1ULL << SND_PCM_FORMAT_S24_3LE) | \
X 	 (1ULL << SND_PCM_FORMAT_U8))
X 
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X 
X static void generic_mix_areas_16_native(unsigned int size,
X 					volatile signed short *dst,
X--- src/pcm/pcm_file.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_file.c	2009-09-15 00:21:10.000000000 +0800
X@@ -26,8 +26,12 @@
X  *
X  */
X   
X+#ifdef __FreeBSD__
X+#include <sys/endian.h>
X+#else
X #include <endian.h>
X #include <byteswap.h>
X+#endif
X #include <ctype.h>
X #include <string.h>
X #include "pcm_local.h"
X--- src/pcm/pcm_iec958.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_iec958.c	2009-09-15 00:19:44.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X   
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X 
X--- src/pcm/pcm_lfloat.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_lfloat.c	2009-09-15 00:21:48.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X   
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X 
X--- src/pcm/pcm_linear.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_linear.c	2009-09-15 00:21:37.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X   
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X 
X--- src/pcm/pcm_meter.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_meter.c	2009-09-15 00:18:38.000000000 +0800
X@@ -27,7 +27,9 @@
X  */
X   
X 
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include <time.h>
X #include <pthread.h>
X #include <dlfcn.h>
X--- src/pcm/pcm_misc.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_misc.c	2009-09-15 00:18:31.000000000 +0800
X@@ -23,7 +23,9 @@
X #include <stdlib.h>
X #include <unistd.h>
X #include <string.h>
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X 
X 
X--- src/pcm/pcm_mmap.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_mmap.c	2009-09-15 00:17:43.000000000 +0800
X@@ -19,7 +19,9 @@
X  */
X   
X #include <stdio.h>
X+#ifndef __FreeBSD__
X #include <malloc.h>
X+#endif
X #include <string.h>
X #include <sys/poll.h>
X #include <sys/mman.h>
X--- src/pcm/pcm_mulaw.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_mulaw.c	2009-09-15 00:21:21.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X   
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X 
X--- src/pcm/pcm_null.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_null.c	2009-09-15 00:19:32.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X   
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include <limits.h>
X #include <sys/shm.h>
X #include "pcm_local.h"
X--- src/pcm/pcm_rate.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_rate.c	2009-09-15 00:21:43.000000000 +0800
X@@ -28,7 +28,9 @@
X  *
X  */
X #include <inttypes.h>
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X #include "pcm_rate.h"
X--- src/pcm/pcm_rate_linear.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_rate_linear.c	2009-09-15 00:19:26.000000000 +0800
X@@ -21,7 +21,9 @@
X  */
X 
X #include <inttypes.h>
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X #include "pcm_rate.h"
X--- src/pcm/pcm_route.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_route.c	2009-09-15 00:19:38.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X   
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include <math.h>
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X--- src/pcm/pcm_softvol.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/pcm/pcm_softvol.c	2009-09-15 00:19:02.000000000 +0800
X@@ -26,7 +26,9 @@
X  *
X  */
X 
X+#ifndef __FreeBSD__
X #include <byteswap.h>
X+#endif
X #include <math.h>
X #include "pcm_local.h"
X #include "pcm_plugin.h"
X--- src/seq/seq_midi_event.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/seq/seq_midi_event.c	2009-09-15 00:21:55.000000000 +0800
X@@ -28,7 +28,9 @@
X  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
X  */
X 
X+#ifndef __FreeBSD__
X #include <malloc.h>
X+#endif
X #include "local.h"
X 
X #ifndef DOC_HIDDEN
X--- src/shmarea.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/shmarea.c	2009-09-15 00:22:00.000000000 +0800
X@@ -19,7 +19,9 @@
X  */
X   
X #include <stdio.h>
X+#ifndef __FreeBSD__
X #include <malloc.h>
X+#endif
X #include <string.h>
X #include <errno.h>
X #include <sys/poll.h>
X--- src/userfile.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/userfile.c	2009-09-18 00:57:22.000000000 +0800
X@@ -19,9 +19,47 @@
X  */
X   
X #include <config.h>
X+#ifdef __FreeBSD__
X+#include <stdlib.h>
X+#endif
X #include <string.h>
X #include <errno.h>
X 
X+/*
X+ * XXX Something is definitely wrong, very very wrong, here or there.
X+ *     Apparently mplayer (so far) is the only app that break, returning
X+ *     WRDE_SYNTAX. For now, this simple home/path expansion should work.
X+ *     I'll investigate this further in future.
X+ */
X+#ifdef __FreeBSD__
X+int snd_user_file(const char *file, char **result)
X+{
X+
X+	if (file == NULL)
X+		return -EINVAL;
X+
X+	if (strlen(file) > 2 && strncmp(file, "~/", 2) == 0) {
X+		char *homedir, *path;
X+
X+		homedir = getenv("HOME");
X+		if (homedir == NULL)
X+			return -EINVAL;
X+
X+		/* offset -1 by removing '~' */
X+		path = malloc(strlen(homedir) + strlen(file));
X+		if (path == NULL)
X+			return -ENOMEM;
X+
X+		strcpy(path, homedir);	/* copy home directory */
X+		strcat(path, file + 1);	/* discard '~', start with '/' */
X+
X+		*result = path;
X+	} else
X+		*result = strdup(file);
X+
X+	return 0;
X+}
X+#else
X /**
X  * \brief Get the full file name
X  * \param file The file name string to parse
X@@ -70,3 +108,4 @@
X 	return 0;
X }
X #endif /* HAVE_WORDEXP_H */
X+#endif /* __FreeBSD__ */
X--- src/timer/timer_hw.c.orig	2009-09-09 20:34:54.000000000 +0800
X+++ src/timer/timer_hw.c	2009-09-15 00:46:06.000000000 +0800
X@@ -92,10 +92,12 @@
X 	}
X 	if (sig < 0)
X 		return 0;
X+#ifndef __FreeBSD__
X 	if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
X 		SYSERR("F_SETSIG failed");
X 		return -errno;
X 	}
X+#endif
X 	if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
X 		SYSERR("F_SETOWN failed");
X 		return -errno;
X--- src/conf/alsa.conf.orig	2009-09-15 04:25:00.000000000 +0800
X+++ src/conf/alsa.conf	2009-09-15 04:25:07.000000000 +0800
X@@ -8,7 +8,7 @@
X 	{
X 		func load
X 		files [
X-			"/etc/asound.conf"
X+			"/usr/local/etc/asound.conf"
X 			"~/.asoundrc"
X 		]
X 		errors false
e8a65b05ca0ac6badd38a50917522dcb
echo x - alsa-lib/files/asound.conf.sample
sed 's/^X//' >alsa-lib/files/asound.conf.sample << 'd7dbcd689c6b58fa61b93927c7573a70'
X#
X# FreeBSD/OSS
X#
Xpcm.!default {
X	type oss
X	device /dev/dsp
X}
X
Xctl.!default {
X	type oss
X	device /dev/mixer
X}
X
X#
X# Remap all possible surround stuffs.
X#
Xpcm.!surround40 {
X	type oss
X	device /dev/dsp
X}
X
Xpcm.!surround41 {
X	type oss
X	device /dev/dsp
X}
X
Xpcm.!surround50 {
X	type oss
X	device /dev/dsp
X}
X
Xpcm.!surround51 {
X	type oss
X	device /dev/dsp
X}
X
Xpcm.!surround71 {
X	type oss
X	device /dev/dsp
X}
X
X#
X# Pulseaudio
X#
X# pcm.!default {
X# 	type pulse
X# }
X# 
X# ctl.!default {
X# 	type pulse
X# }
d7dbcd689c6b58fa61b93927c7573a70
echo x - alsa-lib/Makefile
sed 's/^X//' >alsa-lib/Makefile << '4d8ec2672e053cb2307a554b8d4672f6'
X# New ports collection makefile for:   alsa-lib
X# Date created:                June 29, 2009
X# Whom:                        Aragon Gouveia <aragon at phat.za.net>
X#
X
XPORTNAME=	alsa-lib
XPORTVERSION=	1.0.23
XCATEGORIES=	audio
XMASTER_SITES=	ftp://ftp.silug.org/pub/alsa/lib/ \
X		ftp://gd.tuwien.ac.at/opsys/linux/alsa/lib/ \
X		http://dl.ambiweb.de/mirrors/ftp.alsa-project.org/lib/ \
X		ftp://ftp.alsa-project.org/pub/lib/
X
XMAINTAINER=	aragon at phat.za.net
XCOMMENT=	ALSA compatibility library
XUSE_BZIP2=	yes
XUSE_LDCONFIG=	yes
XHAS_CONFIGURE=	yes
XGNU_CONFIGURE=	yes
XCONFIGURE_ARGS+= --disable-aload --disable-python
X
Xpost-install:
X	${INSTALL_DATA} ${FILESDIR}/asound.conf.sample ${PREFIX}/etc/asound.conf.sample
X	@if [ ! -f ${PREFIX}/etc/asound.conf ]; then \
X		${CP} -p ${PREFIX}/etc/asound.conf.sample ${PREFIX}/etc/asound.conf ; \
X	fi
X
X.include <bsd.port.mk>
4d8ec2672e053cb2307a554b8d4672f6
echo x - alsa-lib/distinfo
sed 's/^X//' >alsa-lib/distinfo << 'a9dc7b4dddcf71f20a402750bb9361f8'
XMD5 (alsa-lib-1.0.23.tar.bz2) = f48b50421d8a69d2d806d9c47e534f0d
XSHA256 (alsa-lib-1.0.23.tar.bz2) = b4238ecaba5e4a1383af06180611a57ef29f9bf47bc177136dba1bb5b70ff423
XSIZE (alsa-lib-1.0.23.tar.bz2) = 808271
a9dc7b4dddcf71f20a402750bb9361f8
echo x - alsa-lib/pkg-descr
sed 's/^X//' >alsa-lib/pkg-descr << '559f534e7b83744df337600365b4f3f6'
XThe Advanced Linux Sound Architecture (ALSA) library
X
XWWW: http://www.alsa-project.org/
559f534e7b83744df337600365b4f3f6
echo x - alsa-lib/pkg-plist
sed 's/^X//' >alsa-lib/pkg-plist << 'c313aa653c9c81a5177ccb9192d162e9'
Xbin/aserver
Xinclude/alsa/alisp.h
Xinclude/alsa/asoundef.h
Xinclude/alsa/asoundlib.h
Xinclude/alsa/conf.h
Xinclude/alsa/control.h
Xinclude/alsa/control_external.h
Xinclude/alsa/error.h
Xinclude/alsa/global.h
Xinclude/alsa/hwdep.h
Xinclude/alsa/iatomic.h
Xinclude/alsa/input.h
Xinclude/alsa/mixer.h
Xinclude/alsa/mixer_abst.h
Xinclude/alsa/output.h
Xinclude/alsa/pcm.h
Xinclude/alsa/pcm_external.h
Xinclude/alsa/pcm_extplug.h
Xinclude/alsa/pcm_ioplug.h
Xinclude/alsa/pcm_old.h
Xinclude/alsa/pcm_plugin.h
Xinclude/alsa/pcm_rate.h
Xinclude/alsa/rawmidi.h
Xinclude/alsa/seq.h
Xinclude/alsa/seq_event.h
Xinclude/alsa/seq_midi_event.h
Xinclude/alsa/seqmid.h
Xinclude/alsa/sound/asound_fm.h
Xinclude/alsa/sound/emu10k1.h
Xinclude/alsa/sound/hdsp.h
Xinclude/alsa/sound/sb16_csp.h
Xinclude/alsa/sound/sscape_ioctl.h
Xinclude/alsa/sound/type_compat.h
Xinclude/alsa/timer.h
Xinclude/alsa/version.h
Xinclude/sys/asoundlib.h
Xlib/alsa-lib/smixer/smixer-ac97.la
Xlib/alsa-lib/smixer/smixer-ac97.so
Xlib/alsa-lib/smixer/smixer-hda.la
Xlib/alsa-lib/smixer/smixer-hda.so
Xlib/alsa-lib/smixer/smixer-sbase.la
Xlib/alsa-lib/smixer/smixer-sbase.so
Xlib/libasound.la
Xlib/libasound.so
Xlib/libasound.so.2
Xlib/pkgconfig/alsa.pc
Xshare/aclocal/alsa.m4
Xshare/alsa/alsa.conf
Xshare/alsa/cards/AACI.conf
Xshare/alsa/cards/ATIIXP-MODEM.conf
Xshare/alsa/cards/ATIIXP-SPDMA.conf
Xshare/alsa/cards/ATIIXP.conf
Xshare/alsa/cards/AU8810.conf
Xshare/alsa/cards/AU8820.conf
Xshare/alsa/cards/AU8830.conf
Xshare/alsa/cards/Audigy.conf
Xshare/alsa/cards/Audigy2.conf
Xshare/alsa/cards/Aureon51.conf
Xshare/alsa/cards/Aureon71.conf
Xshare/alsa/cards/CA0106.conf
Xshare/alsa/cards/CMI8338-SWIEC.conf
Xshare/alsa/cards/CMI8338.conf
Xshare/alsa/cards/CMI8738-MC6.conf
Xshare/alsa/cards/CMI8738-MC8.conf
Xshare/alsa/cards/CMI8788.conf
Xshare/alsa/cards/CS46xx.conf
Xshare/alsa/cards/EMU10K1.conf
Xshare/alsa/cards/EMU10K1X.conf
Xshare/alsa/cards/ENS1370.conf
Xshare/alsa/cards/ENS1371.conf
Xshare/alsa/cards/ES1968.conf
Xshare/alsa/cards/FM801.conf
Xshare/alsa/cards/GUS.conf
Xshare/alsa/cards/HDA-Intel.conf
Xshare/alsa/cards/ICE1712.conf
Xshare/alsa/cards/ICE1724.conf
Xshare/alsa/cards/ICH-MODEM.conf
Xshare/alsa/cards/ICH.conf
Xshare/alsa/cards/ICH4.conf
Xshare/alsa/cards/Maestro3.conf
Xshare/alsa/cards/NFORCE.conf
Xshare/alsa/cards/PC-Speaker.conf
Xshare/alsa/cards/PMac.conf
Xshare/alsa/cards/PMacToonie.conf
Xshare/alsa/cards/PS3.conf
Xshare/alsa/cards/RME9636.conf
Xshare/alsa/cards/RME9652.conf
Xshare/alsa/cards/SB-XFi.conf
Xshare/alsa/cards/SI7018.conf
Xshare/alsa/cards/SI7018/sndoc-mixer.alisp
Xshare/alsa/cards/SI7018/sndop-mixer.alisp
Xshare/alsa/cards/TRID4DWAVENX.conf
Xshare/alsa/cards/USB-Audio.conf
Xshare/alsa/cards/VIA686A.conf
Xshare/alsa/cards/VIA8233.conf
Xshare/alsa/cards/VIA8233A.conf
Xshare/alsa/cards/VIA8237.conf
Xshare/alsa/cards/VX222.conf
Xshare/alsa/cards/VXPocket.conf
Xshare/alsa/cards/VXPocket440.conf
Xshare/alsa/cards/YMF744.conf
Xshare/alsa/cards/aliases.alisp
Xshare/alsa/cards/aliases.conf
Xshare/alsa/pcm/center_lfe.conf
Xshare/alsa/pcm/default.conf
Xshare/alsa/pcm/dmix.conf
Xshare/alsa/pcm/dpl.conf
Xshare/alsa/pcm/dsnoop.conf
Xshare/alsa/pcm/front.conf
Xshare/alsa/pcm/hdmi.conf
Xshare/alsa/pcm/iec958.conf
Xshare/alsa/pcm/modem.conf
Xshare/alsa/pcm/rear.conf
Xshare/alsa/pcm/side.conf
Xshare/alsa/pcm/surround40.conf
Xshare/alsa/pcm/surround41.conf
Xshare/alsa/pcm/surround50.conf
Xshare/alsa/pcm/surround51.conf
Xshare/alsa/pcm/surround71.conf
Xshare/alsa/smixer.conf
Xshare/alsa/sndo-mixer.alisp
X at unexec if cmp -s %D/etc/asound.conf.sample %D/etc/asound.conf; then rm -f %D/etc/asound.conf; else echo "If permanently deleting this package, %D/etc/asound.conf must be removed manually."; fi
Xetc/asound.conf.sample
X at exec [ -f %B/asound.conf ] || cp -p %B/%f %B/asound.conf
X at dirrm share/alsa/pcm
X at dirrm share/alsa/cards/SI7018
X at dirrm share/alsa/cards
X at dirrm share/alsa
X at dirrm lib/pkgconfig
X at dirrm lib/alsa-lib/smixer
X at dirrm lib/alsa-lib
X at dirrm include/sys
X at dirrm include/alsa/sound
X at dirrm include/alsa
c313aa653c9c81a5177ccb9192d162e9
exit
--- alsa-lib.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list