diff options
author | Bart Ribbers <bribbers@disroot.org> | 2021-07-18 01:31:55 +0200 |
---|---|---|
committer | Bart Ribbers <bribbers@disroot.org> | 2021-09-21 09:15:52 +0000 |
commit | 6a2aa7f605c6d6e8e06f29e3cad391ee9da7b9ad (patch) | |
tree | 418adbace4d68e3cbcc2e7b3c012764ea6df6e4f | |
parent | 48729b2ed4adf199bc13bebee07de6370aa51663 (diff) | |
download | aports-6a2aa7f605c6d6e8e06f29e3cad391ee9da7b9ad.tar.gz aports-6a2aa7f605c6d6e8e06f29e3cad391ee9da7b9ad.tar.bz2 aports-6a2aa7f605c6d6e8e06f29e3cad391ee9da7b9ad.tar.xz |
main/portaudio: upgrade to 19.7.0
-rw-r--r-- | main/portaudio/APKBUILD | 47 | ||||
-rw-r--r-- | main/portaudio/portaudio-audacity.patch | 100 |
2 files changed, 95 insertions, 52 deletions
diff --git a/main/portaudio/APKBUILD b/main/portaudio/APKBUILD index 2a51128bd9..b50ffc7f7a 100644 --- a/main/portaudio/APKBUILD +++ b/main/portaudio/APKBUILD @@ -2,34 +2,43 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=portaudio -pkgver=190600.20161030 -pkgrel=1 -pkgdesc="Cross platform, open-source, audio I/O library" +pkgver=19.7.0 +pkgrel=0 +pkgdesc="A cross-platform, open-source C language library for real-time audio input and output" url="http://www.portaudio.com/" -arch="all" license="MIT" -options="!check" # No unit tests, requires hardware to execute tests -makedepends="alsa-lib-dev jack-dev linux-headers autoconf automake libtool" -checkdepends="jack alsa-lib" +arch="all" +makedepends=" + alsa-lib-dev + autoconf + automake + jack-dev + libtool + linux-headers + " +checkdepends=" + alsa-lib + jack + " subpackages="$pkgname-dev libportaudiocxx:_cxx" -source="http://www.portaudio.com/archives/pa_stable_v${pkgver/./_}.tgz +source="http://github.com/PortAudio/portaudio/archive/v$pkgver/portaudio-v$pkgver.tar.gz portaudio-pkgconfig-alsa.patch portaudio-audacity.patch " -builddir="$srcdir"/portaudio +options="!check" # No unit tests, requires hardware to execute tests prepare() { - cd "$builddir" - update_config_sub default_prepare + + update_config_sub autoreconf -if + cd bindings/cpp update_config_sub autoreconf -if } build() { - cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -39,6 +48,7 @@ build() { --with-alsa \ --enable-cxx # race conditions in build cause build failures otherwise + # https://github.com/PortAudio/portaudio/issues/540 make -j1 } @@ -60,20 +70,21 @@ check() { msg patest_"$t2": ./patest_"$t2" done - } package() { - cd "$builddir" make -j1 DESTDIR="$pkgdir" install } _cxx() { pkgdesc="C++ bindings library for portaudio" - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libportaudiocpp* "$subpkgdir"/usr/lib + + amove usr/lib/libportaudiocpp* } -sha512sums="7ec692cbd8c23878b029fad9d9fd63a021f57e60c4921f602995a2fca070c29f17a280c7f2da5966c4aad29d28434538452f4c822eacf3a60af59a6dc8e9704c pa_stable_v190600_20161030.tgz + +sha512sums=" +7e347a174109b661a685bcd617cc8fe00929c6fbf28f142fd7709a8ddbb9b5ed6e805be6647a44b4b9441b79e3474561de6f8e351b4ffc024952ed3e0e27ac1c portaudio-v19.7.0.tar.gz d58e7f8717f9d451535546e16939a959f63ccdd21bcbbc8e08efde2722382b068603bae6d93449476b206c85160d8084d39b39748b4fb43ab2b6eaee704ba1f8 portaudio-pkgconfig-alsa.patch -e5a83dedadd8d66d24efc5062f339b2518dd707ccb856235f2beb6bb0f78a61b5439b708e52a64a62a02b5e55f97eaa8644b5f057b582d542730a42a5b731571 portaudio-audacity.patch" +b66fb7abe707c3621bbbb05c42df58192a6ff91a563973c196028ac50aa85ad9a803dee3e172d11e1bec34e02d435af653cf38304467637a95384a05210a8bdb portaudio-audacity.patch +" diff --git a/main/portaudio/portaudio-audacity.patch b/main/portaudio/portaudio-audacity.patch index 6a0434e33f..61883ebf7d 100644 --- a/main/portaudio/portaudio-audacity.patch +++ b/main/portaudio/portaudio-audacity.patch @@ -1,4 +1,35 @@ ---- a/include/pa_unix_oss.h +From 42dc9c90a703b8dd251d71389a7e6220a50a43a9 Mon Sep 17 00:00:00 2001 +From: Uwe Klotz <uwe.klotz@gmail.com> +Date: Fri, 26 Mar 2021 10:43:46 +0100 +Subject: [PATCH] portaudio-audacity.patch + +--- + configure.in | 1 + + include/pa_unix_oss.h | 52 +++++++++++++++++++++++++++++++++++ + include/portaudio.h | 9 ++++++ + src/common/pa_front.c | 32 ++++++++++++++++++++- + src/common/pa_stream.c | 2 ++ + src/common/pa_stream.h | 1 + + src/hostapi/oss/pa_unix_oss.c | 26 ++++++++++++++++++ + 7 files changed, 122 insertions(+), 1 deletion(-) + create mode 100644 include/pa_unix_oss.h + +diff --git a/configure.in b/configure.in +index bb4ae96..fe0e112 100644 +--- a/configure.in ++++ b/configure.in +@@ -415,6 +415,7 @@ case "${host_os}" in + DLL_LIBS="$DLL_LIBS -lossaudio" + LIBS="$LIBS -lossaudio" + fi ++ INCLUDES="$INCLUDES pa_unix_oss.h" + AC_DEFINE(PA_USE_OSS,1) + fi + +diff --git a/include/pa_unix_oss.h b/include/pa_unix_oss.h +new file mode 100644 +index 0000000..2351e64 +--- /dev/null +++ b/include/pa_unix_oss.h @@ -0,0 +1,52 @@ +#ifndef PA_UNIX_OSS_H @@ -53,14 +84,14 @@ +#endif + +#endif - - +diff --git a/include/portaudio.h b/include/portaudio.h +index 5d84731..7660c8a 100644 --- a/include/portaudio.h +++ b/include/portaudio.h -@@ -1197,6 +1197,15 @@ +@@ -1200,6 +1200,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* stream ); 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 @@ -72,25 +103,27 @@ + /* Miscellaneous utilities */ - + +diff --git a/src/common/pa_front.c b/src/common/pa_front.c +index 65a656f..02a67a8 100644 --- a/src/common/pa_front.c +++ b/src/common/pa_front.c -@@ -1257,8 +1257,10 @@ +@@ -1257,8 +1257,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" )); -@@ -1770,6 +1772,32 @@ - return result; +@@ -1771,6 +1773,34 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream ) } - + + +PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ) +{ + PaError error = PaUtil_ValidateStreamPointer( stream ); @@ -117,25 +150,29 @@ + + return result; +} - ++ ++ PaError Pa_GetSampleSize( PaSampleFormat format ) { - - + int result; +diff --git a/src/common/pa_stream.c b/src/common/pa_stream.c +index ffbf530..305f7c8 100644 --- a/src/common/pa_stream.c +++ b/src/common/pa_stream.c -@@ -93,6 +93,8 @@ +@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe streamRepresentation->streamInfo.inputLatency = 0.; streamRepresentation->streamInfo.outputLatency = 0.; streamRepresentation->streamInfo.sampleRate = 0.; + + streamRepresentation->hostApiType = 0; } - + +diff --git a/src/common/pa_stream.h b/src/common/pa_stream.h +index 4afda39..0a5cd1e 100644 --- a/src/common/pa_stream.h +++ b/src/common/pa_stream.h -@@ -152,6 +152,7 @@ +@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation { PaStreamFinishedCallback *streamFinishedCallback; void *userData; PaStreamInfo streamInfo; @@ -143,12 +180,16 @@ } PaUtilStreamRepresentation; +diff --git a/src/hostapi/oss/pa_unix_oss.c b/src/hostapi/oss/pa_unix_oss.c +index 20113e2..9dedc3f 100644 --- a/src/hostapi/oss/pa_unix_oss.c +++ b/src/hostapi/oss/pa_unix_oss.c -@@ -2043,3 +2043,26 @@ +@@ -2050,3 +2050,29 @@ error: + return result; #endif } - ++ ++ +const char *PaOSS_GetStreamInputDevice( PaStream* s ) +{ + PaOssStream *stream = (PaOssStream*)s; @@ -161,6 +202,7 @@ + return NULL; +} + ++ +const char *PaOSS_GetStreamOutputDevice( PaStream* s ) +{ + PaOssStream *stream = (PaOssStream*)s; @@ -172,16 +214,6 @@ + + return NULL; +} +-- +2.30.2 - ---- a/configure.in -+++ b/configure.in -@@ -402,7 +402,7 @@ - DLL_LIBS="$DLL_LIBS -lasound" - LIBS="$LIBS -lasound" - OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o" -- INCLUDES="$INCLUDES pa_linux_alsa.h" -+ INCLUDES="$INCLUDES pa_linux_alsa.h pa_unix_oss.h" - AC_DEFINE(PA_USE_ALSA,1) - fi - |