Hi list, below is a proposal diff for upgrading portaudio-svn to revision 1851. I tested it with pjsua, which compiles and runs with portaudio without obvious issues.
In case it helps, the diff and a prepared distfile can be downloaded here: http://mikolon.com/distfiles/portaudio-svn-1851.diff http://mikolon.com/distfiles/portaudio-svn-1851.tar.gz Regards, Holger Index: Makefile =================================================================== RCS file: /cvs/ports/audio/portaudio-svn/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- Makefile 19 May 2012 06:04:22 -0000 1.10 +++ Makefile 7 Jul 2012 20:50:11 -0000 @@ -1,8 +1,8 @@ # $OpenBSD: Makefile,v 1.10 2012/05/19 06:04:22 ajacoutot Exp $ COMMENT= portable cross-platform audio API -DISTNAME= portaudio-svn-1406 -REVISION= 2 +DISTNAME= portaudio-svn-1851 +REVISION= SHARED_LIBS= portaudio 1.0 Index: distinfo =================================================================== RCS file: /cvs/ports/audio/portaudio-svn/distinfo,v retrieving revision 1.3 diff -u -r1.3 distinfo --- distinfo 14 Mar 2009 02:31:40 -0000 1.3 +++ distinfo 7 Jul 2012 20:50:11 -0000 @@ -1,5 +1,5 @@ -MD5 (portaudio-svn-1406.tar.gz) = RlHa1Y+Gn5EgX5e3aMqyTw== -RMD160 (portaudio-svn-1406.tar.gz) = XulIpuTPeK87JCDgXcimf4E2BFo= -SHA1 (portaudio-svn-1406.tar.gz) = fIvJxOhzOJ1qs4hdYBkWYniLhlg= -SHA256 (portaudio-svn-1406.tar.gz) = DT3QREhDCriP1SAK13kb9EH5z5rkNf1XI4LCtuF3UrU= -SIZE (portaudio-svn-1406.tar.gz) = 1132199 +MD5 (portaudio-svn-1851.tar.gz) = 5506d1da89f8a7ea0bbf7a2518cb020b +SHA1 (portaudio-svn-1851.tar.gz) = 4d39755f8faba7bf5b764acad37733a15da41553 +SHA256 (portaudio-svn-1851.tar.gz) = 3e208cf6cf2074f95e7867cd30d295498fbc51c9317d8b7786f4e1f760fad985 +RMD160 (portaudio-svn-1851.tar.gz) = 5dc799675b5090885dfd2382edfee84c830701a6 +SIZE (portaudio-svn-1851.tar.gz) = 1478652 Index: files/pa_sndio.c =================================================================== RCS file: /cvs/ports/audio/portaudio-svn/files/pa_sndio.c,v retrieving revision 1.2 diff -u -r1.2 pa_sndio.c --- files/pa_sndio.c 7 Feb 2010 01:30:29 -0000 1.2 +++ files/pa_sndio.c 7 Jul 2012 20:50:11 -0000 @@ -372,7 +372,7 @@ } s->base.streamInfo.inputLatency = 0; s->base.streamInfo.outputLatency = (mode & SIO_PLAY) ? - (double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatency(&s->bufproc)) / (double)par.rate : 0; + (double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatencyFrames(&s->bufproc)) / (double)par.rate : 0; s->base.streamInfo.sampleRate = par.rate; s->active = 0; s->stopped = 1; Index: patches/patch-Makefile_in =================================================================== RCS file: /cvs/ports/audio/portaudio-svn/patches/patch-Makefile_in,v retrieving revision 1.3 diff -u -r1.3 patch-Makefile_in --- patches/patch-Makefile_in 14 Mar 2009 02:31:40 -0000 1.3 +++ patches/patch-Makefile_in 7 Jul 2012 20:50:11 -0000 @@ -1,18 +1,19 @@ ---- Makefile.in.orig Tue Feb 26 02:37:48 2008 -+++ Makefile.in Sun Jan 18 10:09:36 2009 -@@ -120,6 +120,7 @@ LTOBJS := $(OBJS:.o=.lo) - SRC_DIRS = \ - src/common \ - src/hostapi/alsa \ +$OpenBSD$ +--- Makefile.in.orig Thu Jul 5 23:44:34 2012 ++++ Makefile.in Thu Jul 5 23:49:34 2012 +@@ -146,6 +146,7 @@ SRC_DIRS = \ + src/hostapi/dsound \ + src/hostapi/jack \ + src/hostapi/oss \ + src/hostapi/sndio \ - src/hostapi/asihpi \ - src/hostapi/asio \ - src/hostapi/coreaudio \ -@@ -136,7 +137,7 @@ SRC_DIRS = \ + src/hostapi/wasapi \ + src/hostapi/wdmks \ + src/hostapi/wmme \ +@@ -155,7 +156,7 @@ SRC_DIRS = \ SUBDIRS = @ENABLE_CXX_TRUE@SUBDIRS += bindings/cpp --all: lib/$(PALIB) all-recursive tests +-all: lib/$(PALIB) all-recursive tests examples selftests +all: lib/$(PALIB) all-recursive tests: bin-stamp $(TESTS) Index: patches/patch-configure_in =================================================================== RCS file: /cvs/ports/audio/portaudio-svn/patches/patch-configure_in,v retrieving revision 1.1 diff -u -r1.1 patch-configure_in --- patches/patch-configure_in 14 Mar 2009 02:31:40 -0000 1.1 +++ patches/patch-configure_in 7 Jul 2012 20:50:11 -0000 @@ -1,51 +1,55 @@ ---- configure.in.orig Mon Feb 25 17:37:48 2008 -+++ configure.in Sun Mar 8 22:05:20 2009 -@@ -17,6 +17,10 @@ AC_ARG_WITH(alsa, - [ --with-alsa (default=yes)], - with_alsa=$withval, with_alsa="yes") - -+AC_ARG_WITH(sndio, -+ [ --with-sndio (default=yes)], -+ with_sndio=$withval, with_sndio="yes") +$OpenBSD$ +--- configure.in.orig Thu Jul 5 23:44:34 2012 ++++ configure.in Thu Jul 5 23:49:34 2012 +@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa, + AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]), + [with_alsa=$withval]) + ++AC_ARG_WITH(sndio, ++ AS_HELP_STRING([--with-sndio], [Enable support for SNDIO @<:@autodetect@:>@]), ++ [with_sndio=$withval]) + - AC_ARG_WITH(jack, - [ --with-jack (default=yes)], - with_jack=$withval, with_jack="yes") -@@ -88,6 +92,7 @@ dnl checks for various host APIs and arguments to conf - dnl turn them on or off - - AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no) -+AC_CHECK_LIB(sndio, sio_initpar, have_sndio=yes, have_sndio=no) - AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm) - AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no) - -@@ -295,8 +300,8 @@ case "${host_os}" in - *) - dnl Unix configuration + AC_ARG_WITH(jack, + AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]), + [with_jack=$withval]) +@@ -120,6 +124,10 @@ have_alsa=no + if test "x$with_alsa" != "xno"; then + AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no) + fi ++have_sndio=no ++if test "x$with_sndio" != "xno"; then ++ AC_CHECK_LIB(sndio, sio_initpar, have_sndio=yes, have_sndio=no) ++fi + have_asihpi=no + if test "x$with_asihpi" != "xno"; then + AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm) +@@ -340,8 +348,8 @@ case "${host_os}" in + CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix" + - AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"], - AC_MSG_ERROR([libpthread not found!])) + dnl AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"], -+ dnl AC_MSG_ERROR([libpthread not found!])) ++ dnl AC_MSG_ERROR([libpthread not found!])) - if [[ $have_alsa = "yes" ] && [ $with_alsa != "no" ]] ; then + if [[ "$have_alsa" = "yes" ] && [ "$with_alsa" != "no" ]] ; then DLL_LIBS="$DLL_LIBS -lasound" -@@ -305,6 +310,13 @@ case "${host_os}" in - AC_DEFINE(PA_USE_ALSA) +@@ -351,6 +359,13 @@ case "${host_os}" in + AC_DEFINE(PA_USE_ALSA,1) fi + if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then + DLL_LIBS="$DLL_LIBS -lsndio" + LIBS="$LIBS -lsndio" + OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o" -+ AC_DEFINE(PA_USE_SNDIO) ++ AC_DEFINE(PA_USE_SNDIO,1) + fi + - if [[ $have_jack = "yes" ] && [ $with_jack != "no" ]] ; then + if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then DLL_LIBS="$DLL_LIBS $JACK_LIBS" CFLAGS="$CFLAGS $JACK_CFLAGS" -@@ -328,8 +340,8 @@ case "${host_os}" in - AC_DEFINE(PA_USE_ASIHPI) +@@ -375,8 +390,8 @@ case "${host_os}" in + AC_DEFINE(PA_USE_ASIHPI,1) fi - DLL_LIBS="$DLL_LIBS -lm -lpthread" Index: patches/patch-include_portaudio_h =================================================================== RCS file: /cvs/ports/audio/portaudio-svn/patches/patch-include_portaudio_h,v retrieving revision 1.1 diff -u -r1.1 patch-include_portaudio_h --- patches/patch-include_portaudio_h 14 Mar 2009 02:31:40 -0000 1.1 +++ patches/patch-include_portaudio_h 7 Jul 2012 20:50:11 -0000 @@ -1,6 +1,6 @@ -$OpenBSD: patch-include_portaudio_h,v 1.1 2009/03/14 02:31:40 jakemsr Exp $ ---- include/portaudio.h.orig Mon Feb 25 17:37:40 2008 -+++ include/portaudio.h Sun Mar 8 21:55:43 2009 +$OpenBSD$ +--- include/portaudio.h.orig Thu Jul 5 23:44:38 2012 ++++ include/portaudio.h Thu Jul 5 23:49:33 2012 @@ -236,7 +236,8 @@ typedef enum PaHostApiTypeId paWDMKS=11, paJACK=12, Index: patches/patch-src_os_unix_pa_unix_hostapis_c =================================================================== RCS file: /cvs/ports/audio/portaudio-svn/patches/patch-src_os_unix_pa_unix_hostapis_c,v retrieving revision 1.1 diff -u -r1.1 patch-src_os_unix_pa_unix_hostapis_c --- patches/patch-src_os_unix_pa_unix_hostapis_c 14 Mar 2009 02:31:40 -0000 1.1 +++ patches/patch-src_os_unix_pa_unix_hostapis_c 7 Jul 2012 20:50:11 -0000 @@ -1,6 +1,6 @@ -$OpenBSD: patch-src_os_unix_pa_unix_hostapis_c,v 1.1 2009/03/14 02:31:40 jakemsr Exp $ ---- src/os/unix/pa_unix_hostapis.c.orig Thu May 22 01:47:01 2008 -+++ src/os/unix/pa_unix_hostapis.c Sun Mar 8 22:53:55 2009 +$OpenBSD$ +--- src/os/unix/pa_unix_hostapis.c.orig Thu Jul 5 23:44:45 2012 ++++ src/os/unix/pa_unix_hostapis.c Thu Jul 5 23:49:33 2012 @@ -44,6 +44,7 @@ PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); @@ -9,15 +9,14 @@ PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); /* Added for IRIX, Pieter, oct 2, 2003: */ PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); -@@ -79,6 +80,11 @@ PaUtilHostApiInitializer *paHostApiInitializers[] = +@@ -78,6 +79,10 @@ PaUtilHostApiInitializer *paHostApiInitializers[] = #endif #endif /* __linux__ */ + -+ +#ifdef PA_USE_SNDIO -+ PaSndio_Initialize, ++ PaSndio_Initialize, +#endif - #ifdef PA_USE_JACK + #if PA_USE_JACK PaJack_Initialize, Index: patches/patch-src_os_unix_pa_unix_util_c =================================================================== RCS file: /cvs/ports/audio/portaudio-svn/patches/patch-src_os_unix_pa_unix_util_c,v retrieving revision 1.1 diff -u -r1.1 patch-src_os_unix_pa_unix_util_c --- patches/patch-src_os_unix_pa_unix_util_c 19 May 2012 06:04:22 -0000 1.1 +++ patches/patch-src_os_unix_pa_unix_util_c 7 Jul 2012 20:50:11 -0000 @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_os_unix_pa_unix_util_c,v 1.1 2012/05/19 06:04:22 ajacoutot Exp $ ---- src/os/unix/pa_unix_util.c.orig Wed May 16 20:58:26 2012 -+++ src/os/unix/pa_unix_util.c Wed May 16 21:06:25 2012 -@@ -218,6 +218,7 @@ static PaError BoostPriority( PaUnixThread* self ) +$OpenBSD$ +--- src/os/unix/pa_unix_util.c.orig Thu Jul 5 23:44:45 2012 ++++ src/os/unix/pa_unix_util.c Thu Jul 5 23:49:33 2012 +@@ -251,6 +251,7 @@ static PaError BoostPriority( PaUnixThread* self ) assert( self ); @@ -9,7 +9,7 @@ if( pthread_setschedparam( self->thread, SCHED_FIFO, &spm ) != 0 ) { PA_UNLESS( errno == EPERM, paInternalError ); /* Lack permission to raise priority */ -@@ -228,6 +229,7 @@ static PaError BoostPriority( PaUnixThread* self ) +@@ -261,6 +262,7 @@ static PaError BoostPriority( PaUnixThread* self ) { result = 1; /* Success */ } @@ -17,7 +17,7 @@ error: return result; } -@@ -266,8 +268,10 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (* +@@ -299,8 +301,10 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (* #endif PA_UNLESS( !pthread_attr_init( &attr ), paInternalError ); @@ -28,7 +28,7 @@ PA_UNLESS( !pthread_create( &self->thread, &attr, threadFunc, threadArg ), paInternalError ); started = 1; -@@ -314,7 +318,9 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (* +@@ -347,7 +351,9 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (* { int policy; struct sched_param spm;