diff --git a/audio/portaudio-svn/Makefile b/audio/portaudio-svn/Makefile new file mode 100644 index 00000000000..d7884f3c767 --- /dev/null +++ b/audio/portaudio-svn/Makefile @@ -0,0 +1,31 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $ + +COMMENT= portable cross-platform audio API +DISTNAME= portaudio-svn-1286 + +SHARED_LIBS= portaudio 0.0 + +CATEGORIES= audio +HOMEPAGE= http://www.portaudio.com/ +MAINTAINER= Jacob Meuser + +# MIT +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +WANTLIB= m + +MASTER_SITES= http://jakemsr.trancell.org/distfiles/ + +USE_GMAKE= Yes +USE_LIBTOOL= Yes +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS= --without-alsa \ + --without-jack + +# builds non-automated, interactive tests in ${WRKBUILD}/bin +NO_REGRESS= Yes + +.include diff --git a/audio/portaudio-svn/distinfo b/audio/portaudio-svn/distinfo new file mode 100644 index 00000000000..ce1e62c244e --- /dev/null +++ b/audio/portaudio-svn/distinfo @@ -0,0 +1,5 @@ +MD5 (portaudio-svn-1286.tar.gz) = HylU2ifgNJQBVaN8nY1lxg== +RMD160 (portaudio-svn-1286.tar.gz) = FPa+M7uL8l5KKEoreyJhVA14858= +SHA1 (portaudio-svn-1286.tar.gz) = 3XJS07HBk19mlHTdLmqgXng0fU4= +SHA256 (portaudio-svn-1286.tar.gz) = U2kBEmNfY6iT60Sh0HGmS0xgYqH1FGyM579+zD5i89M= +SIZE (portaudio-svn-1286.tar.gz) = 1114991 diff --git a/audio/portaudio-svn/patches/patch-configure b/audio/portaudio-svn/patches/patch-configure new file mode 100644 index 00000000000..c7071847b7b --- /dev/null +++ b/audio/portaudio-svn/patches/patch-configure @@ -0,0 +1,49 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $ +--- configure.orig Sun Aug 26 00:06:14 2007 ++++ configure Mon Aug 27 00:57:51 2007 +@@ -19714,7 +19714,7 @@ fi + + + +-for ac_header in sys/soundcard.h linux/soundcard.h machine/soundcard.h ++for ac_header in sys/soundcard.h linux/soundcard.h machine/soundcard.h soundcard.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +@@ -19848,7 +19848,7 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +- ++LIBS="$LIBS -lossaudio" + fi + + done +@@ -21602,13 +21602,13 @@ _ACEOF + + *) + +- { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; } ++ { echo "$as_me:$LINENO: checking for pthread_create in -pthread" >&5 ++echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6; } + if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpthread $LIBS" ++LIBS="-pthread $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -21711,8 +21711,8 @@ _ACEOF + fi + + THREAD_CFLAGS="-pthread" +- DLL_LIBS="$DLL_LIBS -lm -lpthread"; +- LIBS="$LIBS -lm -lpthread"; ++ DLL_LIBS="$DLL_LIBS -lm -pthread"; ++ LIBS="$LIBS -lm -pthread"; + PADLL="libportaudio.so"; + SHARED_FLAGS="-shared -fPIC"; + diff --git a/audio/portaudio-svn/patches/patch-src_hostapi_oss_pa_unix_oss_c b/audio/portaudio-svn/patches/patch-src_hostapi_oss_pa_unix_oss_c new file mode 100644 index 00000000000..7ce35acbf55 --- /dev/null +++ b/audio/portaudio-svn/patches/patch-src_hostapi_oss_pa_unix_oss_c @@ -0,0 +1,80 @@ +$OpenBSD: patch-src_hostapi_oss_pa_unix_oss_c,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $ +--- src/hostapi/oss/pa_unix_oss.c.orig Sat Sep 29 19:11:09 2007 ++++ src/hostapi/oss/pa_unix_oss.c Sat Sep 29 21:45:19 2007 +@@ -72,6 +72,9 @@ + #elif defined(HAVE_MACHINE_SOUNDCARD_H) + # include /* JH20010905 */ + # define DEVICE_NAME_BASE "/dev/audio" ++#elif defined(HAVE_SOUNDCARD_H) ++# include ++# define DEVICE_NAME_BASE "/dev/audio" + #else + # error No sound card header file + #endif +@@ -403,8 +406,12 @@ static PaError QueryDirection( const char *deviceName, + sr = 44100; + if( ioctl( devHandle, SNDCTL_DSP_SPEED, &sr ) < 0 ) + { +- result = paUnanticipatedHostError; +- goto error; ++ sr = 48000; ++ if( ioctl( devHandle, SNDCTL_DSP_SPEED, &sr ) < 0 ) ++ { ++ result = paUnanticipatedHostError; ++ goto error; ++ } + } + + *defaultSampleRate = sr; +@@ -810,9 +817,11 @@ static PaError OpenDevices( const char *idevName, cons + ENSURE_( *idev = open( idevName, flags ), paDeviceUnavailable ); + PA_ENSURE( ModifyBlocking( *idev, 1 ) ); /* Blocking */ + ++#ifndef __OpenBSD__ + /* Initially disable */ + enableBits = ~PCM_ENABLE_INPUT; + ENSURE_( ioctl( *idev, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError ); ++#endif + } + if( odevName ) + { +@@ -821,9 +830,11 @@ static PaError OpenDevices( const char *idevName, cons + ENSURE_( *odev = open( odevName, flags ), paDeviceUnavailable ); + PA_ENSURE( ModifyBlocking( *odev, 1 ) ); /* Blocking */ + ++#ifndef __OpenBSD__ + /* Initially disable */ + enableBits = ~PCM_ENABLE_OUTPUT; + ENSURE_( ioctl( *odev, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError ); ++#endif + } + else + { +@@ -1226,10 +1237,12 @@ static PaError OpenStream( struct PaUtilHostApiReprese + } + } + ++#if 0 + /* Round framesPerBuffer to the next power-of-two to make OSS happy. */ + framesPerBuffer &= INT_MAX; + for (i = 1; framesPerBuffer > i; i <<= 1) ; + framesPerBuffer = i; ++#endif + + /* allocate and do basic initialization of the stream structure */ + PA_UNLESS( stream = (PaOssStream*)PaUtil_AllocateMemory( sizeof(PaOssStream) ), paInsufficientMemory ); +@@ -1942,11 +1955,11 @@ static signed long GetStreamReadAvailable( PaStream* s + static signed long GetStreamWriteAvailable( PaStream* s ) + { + PaOssStream *stream = (PaOssStream*)s; +- int delay = 0; ++ struct count_info delay; + +- if( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ) < 0 ) ++ if( ioctl( stream->playback->fd, SNDCTL_DSP_GETOPTR, &delay ) < 0 ) + return paUnanticipatedHostError; + +- return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback ); ++ return (PaOssStreamComponent_BufferSize( stream->playback ) - delay.ptr) / PaOssStreamComponent_FrameSize( stream->playback ); + } + diff --git a/audio/portaudio-svn/pkg/DESCR b/audio/portaudio-svn/pkg/DESCR new file mode 100644 index 00000000000..45110cd33ed --- /dev/null +++ b/audio/portaudio-svn/pkg/DESCR @@ -0,0 +1,5 @@ +PortAudio is a free, cross platform, open-source, audio I/O library. It +lets you write simple audio programs in 'C' that will compile and run on +many platforms including Windows, Macintosh (8,9,X), Unix (OSS), SGI, +and BeOS. PortAudio is intended to promote the exchange of audio +synthesis software between developers on different platforms. diff --git a/audio/portaudio-svn/pkg/PFRAG.shared b/audio/portaudio-svn/pkg/PFRAG.shared new file mode 100644 index 00000000000..a7ea85df84f --- /dev/null +++ b/audio/portaudio-svn/pkg/PFRAG.shared @@ -0,0 +1,2 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $ +@lib lib/libportaudio.so.${LIBportaudio_VERSION} diff --git a/audio/portaudio-svn/pkg/PLIST b/audio/portaudio-svn/pkg/PLIST new file mode 100644 index 00000000000..7e33d1e6f1d --- /dev/null +++ b/audio/portaudio-svn/pkg/PLIST @@ -0,0 +1,7 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $ +include/portaudio.h +%%SHARED%% +lib/libportaudio.a +lib/libportaudio.la +lib/pkgconfig/ +lib/pkgconfig/portaudio-2.0.pc