The patches add some functions (Pa_GetStreamHostApiType() and friends)
which are necessary for newer versions of audacity. Fedora has these
patches as well.
ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/portaudio-svn/Makefile,v
retrieving revision 1.16
diff -u -p -u -p -r1.16 Makefile
--- Makefile 21 Mar 2013 08:45:13 -0000 1.16
+++ Makefile 22 Aug 2014 04:21:51 -0000
@@ -2,13 +2,13 @@
COMMENT= portable cross-platform audio API
-DISTNAME= portaudio-svn-1851
+DISTNAME = pa_stable_v19_20140130
+PKGNAME = portaudio-svn-1919
CATEGORIES= audio
-MASTER_SITES= http://comstyle.com/source/
-EXTRACT_SUFX= .tar.xz
-REVISION= 0
+MASTER_SITES = http://www.portaudio.com/archives/
+EXTRACT_SUFX = .tgz
-SHARED_LIBS= portaudio 1.0
+SHARED_LIBS = portaudio 1.1
HOMEPAGE= http://www.portaudio.com/
@@ -18,7 +18,7 @@ PERMIT_PACKAGE_CDROM= Yes
WANTLIB= m pthread sndio
USE_GMAKE= Yes
-AUTOCONF_VERSION= 2.68
+AUTOCONF_VERSION = 2.69
CONFIGURE_STYLE= autoconf no-autoheader
CONFIGURE_ARGS= --without-alsa --without-oss --without-jack
@@ -27,6 +27,8 @@ TEST_TARGET= tests
TEST_IS_INTERACTIVE= Yes
CFLAGS+= -DALLOW_SMP_DANGERS
+
+WRKDIST = ${WRKDIR}/portaudio
post-extract:
@mkdir -p ${WRKSRC}/src/hostapi/sndio
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/portaudio-svn/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo 12 Mar 2013 00:59:50 -0000 1.4
+++ distinfo 22 Aug 2014 04:21:51 -0000
@@ -1,2 +1,2 @@
-SHA256 (portaudio-svn-1851.tar.xz) =
d+EgTWDkSj5Pnz9LDmy84lCICOdAb2FHbaaC2hSq3qI=
-SIZE (portaudio-svn-1851.tar.xz) = 885008
+SHA256 (pa_stable_v19_20140130.tgz) =
j+AkpfBoHhEsaXmAj2hMNRYGHMUdOswLcmr5j8lsjVc=
+SIZE (pa_stable_v19_20140130.tgz) = 1504620
Index: patches/patch-configure_in
===================================================================
RCS file: /cvs/ports/audio/portaudio-svn/patches/patch-configure_in,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-configure_in
--- patches/patch-configure_in 12 Mar 2013 00:59:50 -0000 1.3
+++ patches/patch-configure_in 22 Aug 2014 04:21:51 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-configure_in,v 1.3 2013/03/12 00:59:50 brad Exp $
---- configure.in.orig Sat Jul 7 16:28:11 2012
-+++ configure.in Fri Mar 8 22:53:01 2013
+--- configure.in.orig Thu Jan 16 10:49:33 2014
++++ configure.in Wed Jul 9 12:13:37 2014
@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
AS_HELP_STRING([--with-alsa], [Enable support for ALSA
@<:@autodetect@:>@]),
[with_alsa=$withval])
@@ -23,7 +23,7 @@ $OpenBSD: patch-configure_in,v 1.3 2013/
have_asihpi=no
if test "x$with_asihpi" != "xno"; then
AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
-@@ -351,6 +359,13 @@ case "${host_os}" in
+@@ -397,6 +405,13 @@ case "${host_os}" in
AC_DEFINE(PA_USE_ALSA,1)
fi
@@ -37,7 +37,7 @@ $OpenBSD: patch-configure_in,v 1.3 2013/
if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
DLL_LIBS="$DLL_LIBS $JACK_LIBS"
CFLAGS="$CFLAGS $JACK_CFLAGS"
-@@ -454,6 +469,7 @@ case "$target_os" in
+@@ -500,6 +515,7 @@ case "$target_os" in
;;
*)
AC_MSG_RESULT([
Index: patches/patch-include_portaudio_h
===================================================================
RCS file: /cvs/ports/audio/portaudio-svn/patches/patch-include_portaudio_h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-include_portaudio_h
--- patches/patch-include_portaudio_h 12 Mar 2013 00:59:50 -0000 1.2
+++ patches/patch-include_portaudio_h 22 Aug 2014 04:21:51 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-include_portaudio_h,v 1.2 2013/03/12 00:59:50 brad Exp $
---- include/portaudio.h.orig Thu Jul 5 23:44:38 2012
-+++ include/portaudio.h Thu Jul 5 23:49:33 2012
+--- include/portaudio.h.orig Fri Aug 31 18:10:13 2012
++++ include/portaudio.h Wed Jul 9 23:03:50 2014
@@ -236,7 +236,8 @@ typedef enum PaHostApiTypeId
paWDMKS=11,
paJACK=12,
@@ -11,3 +11,19 @@ $OpenBSD: patch-include_portaudio_h,v 1.
} PaHostApiTypeId;
+@@ -1144,6 +1145,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* strea
+ error is encountered.
+ */
+ signed long Pa_GetStreamWriteAvailable( PaStream* stream );
++
++
++/** Retrieve the host type handling an open stream.
++
++ @return Returns a non-negative value representing the host API type
++ handling an open stream or, a PaErrorCode (which are always negative)
++ if PortAudio is not initialized or an error is encountered.
++*/
++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
+
+
+ /* Miscellaneous utilities */
Index: patches/patch-src_common_pa_front_c
===================================================================
RCS file: patches/patch-src_common_pa_front_c
diff -N patches/patch-src_common_pa_front_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_common_pa_front_c 22 Aug 2014 04:21:51 -0000
@@ -0,0 +1,51 @@
+$OpenBSD$
+--- src/common/pa_front.c.orig Wed Jul 9 23:07:49 2014
++++ src/common/pa_front.c Wed Jul 9 23:10:28 2014
+@@ -1216,8 +1216,10 @@ PaError Pa_OpenStream( PaStream** stream,
+ hostApiInputParametersPtr,
hostApiOutputParametersPtr,
+ sampleRate, framesPerBuffer, streamFlags,
streamCallback, userData );
+
+- if( result == paNoError )
++ if( result == paNoError ) {
+ AddOpenStream( *stream );
++ PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
++ }
+
+
+ PA_LOGAPI(("Pa_OpenStream returned:\n" ));
+@@ -1725,6 +1727,35 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stre
+ PA_LOGAPI(("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result
) ));
+
+ }
++
++ return result;
++}
++
++
++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
++{
++ PaError error = PaUtil_ValidateStreamPointer( stream );
++ PaHostApiTypeId result;
++
++#ifdef PA_LOG_API_CALLS
++ PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
++ PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
++#endif
++
++ if( error == paNoError )
++ {
++ result = PA_STREAM_REP(stream)->hostApiType;
++ }
++ else
++ {
++ result = (PaHostApiTypeId) error;
++ }
++
++#ifdef PA_LOG_API_CALLS
++ PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
++ PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText(
resu
++lt ) );
++#endif
+
+ return result;
+ }
Index: patches/patch-src_common_pa_stream_c
===================================================================
RCS file: patches/patch-src_common_pa_stream_c
diff -N patches/patch-src_common_pa_stream_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_common_pa_stream_c 22 Aug 2014 04:21:51 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/common/pa_stream.c.orig Wed Jul 9 23:10:48 2014
++++ src/common/pa_stream.c Wed Jul 9 23:11:39 2014
+@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStre
+ streamRepresentation->streamInfo.inputLatency = 0.;
+ streamRepresentation->streamInfo.outputLatency = 0.;
+ streamRepresentation->streamInfo.sampleRate = 0.;
++
++ streamRepresentation->hostApiType = 0;
+ }
+
+
Index: patches/patch-src_common_pa_stream_h
===================================================================
RCS file: patches/patch-src_common_pa_stream_h
diff -N patches/patch-src_common_pa_stream_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_common_pa_stream_h 22 Aug 2014 04:21:51 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/common/pa_stream.h.orig Wed Jul 9 23:12:29 2014
++++ src/common/pa_stream.h Wed Jul 9 23:12:30 2014
+@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation {
+ PaStreamFinishedCallback *streamFinishedCallback;
+ void *userData;
+ PaStreamInfo streamInfo;
++ PaHostApiTypeId hostApiType;
+ } PaUtilStreamRepresentation;
+
+