From 75149cbe2a1932322d7800e9be49c40d71607c39 Mon Sep 17 00:00:00 2001 From: cvsextras Date: Tue, 9 Nov 2004 02:49:32 +0000 Subject: [PATCH 01/59] Setup of module portaudio --- .cvsignore | 0 Makefile | 21 +++++++++++++++++++++ sources | 0 3 files changed, 21 insertions(+) create mode 100644 .cvsignore create mode 100644 Makefile create mode 100644 sources diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..52dee22 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: portaudio +# $Id$ +NAME := portaudio +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Rootx && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 18aa14f947313de79d332eb6a1d774ee1f959b01 Mon Sep 17 00:00:00 2001 From: cvsextras Date: Tue, 9 Nov 2004 02:49:34 +0000 Subject: [PATCH 02/59] auto-import changelog data from portaudio-18.1-1.1.fc2.fr.src.rpm Thu Jun 10 2004 Dag Wieers - 18.1-1 - Added -fPIC for x86_64. Sat Sep 13 2003 Dag Wieers - 18.1-0 - Initial package. (using DAR) --- .cvsignore | 1 + portaudio.spec | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 58 insertions(+) create mode 100644 portaudio.spec diff --git a/.cvsignore b/.cvsignore index e69de29..8a31585 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +portaudio_v18_1.zip diff --git a/portaudio.spec b/portaudio.spec new file mode 100644 index 0000000..554db52 --- /dev/null +++ b/portaudio.spec @@ -0,0 +1,56 @@ +# $Id: portaudio.spec 1606 2004-07-20 08:18:01Z dag $ +# Authority: atrpms +# Upstream: + +%define rversion v18_1 + +Summary: Free, cross platform, open-source, audio I/O library. +Name: portaudio +Version: 18.1 +Release: 1.1.fc2.fr +License: BSD-like +Group: System Environment/Libraries +URL: http://www.portaudio.com/ + +Packager: Dag Wieers +Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ + +Source: http://www.portaudio.com/archives/portaudio_%{rversion}.zip +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%description +PortAudio is a portable audio I/O library designed for cross-platform +support of audio. It uses a callback mechanism to request audio processing. +Audio can be generated in various formats, including 32 bit floating point, +and will be converted to the native format internally. + +%prep +%setup -n %{name}_%{rversion} + +%{__perl} -pi.orig -e 's|^(LIBINST) = /usr/local/lib|$1 = %{_libdir}|' Makefile.linux + +%build +%{__make} %{?_smp_mflags} -f Makefile.linux sharedlib \ + CFLAGS="-fPIC" + +%install +%{__rm} -rf %{buildroot} +%{__install} -D -m0755 pa_unix_oss/libportaudio.so %{buildroot}%{_libdir}/libportaudio.so +%{__install} -D -m0644 pa_common/portaudio.h %{buildroot}%{_includedir}/portaudio.h + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(0644, root, root, 0755) +%doc LICENSE.txt README.txt docs/ +%{_libdir}/*.so +%{_includedir}/*.h + +%changelog +* Thu Jun 10 2004 Dag Wieers - 18.1-1 +- Added -fPIC for x86_64. + +* Sat Sep 13 2003 Dag Wieers - 18.1-0 +- Initial package. (using DAR) + diff --git a/sources b/sources index e69de29..1556983 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ce66a732d263fde2b5ad2262ef37a691 portaudio_v18_1.zip From 0c3f2bebf002c9b2a8ec7a901d550ab9039a157e Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Tue, 16 Nov 2004 18:04:28 +0000 Subject: [PATCH 03/59] Merge changes and bump release. --- portaudio.spec | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/portaudio.spec b/portaudio.spec index 554db52..3e5f9bc 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,22 +1,18 @@ -# $Id: portaudio.spec 1606 2004-07-20 08:18:01Z dag $ -# Authority: atrpms +# $Id: portaudio.spec 2423 2004-11-05 11:50:06Z dude $ # Upstream: -%define rversion v18_1 +%define real_version v18_1 -Summary: Free, cross platform, open-source, audio I/O library. +Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 18.1 -Release: 1.1.fc2.fr +Release: 3 License: BSD-like Group: System Environment/Libraries URL: http://www.portaudio.com/ - -Packager: Dag Wieers -Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ - -Source: http://www.portaudio.com/archives/portaudio_%{rversion}.zip +Source: http://www.portaudio.com/archives/portaudio_%{real_version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +Provides: %{name}-devel = %{version}-%{release} %description PortAudio is a portable audio I/O library designed for cross-platform @@ -24,30 +20,45 @@ support of audio. It uses a callback mechanism to request audio processing. Audio can be generated in various formats, including 32 bit floating point, and will be converted to the native format internally. + %prep -%setup -n %{name}_%{rversion} +%setup -n %{name}_%{real_version} +%{__perl} -pi.orig -e 's|^(LIBINST) = /usr/local/lib|$1 = %{_libdir}|' \ + Makefile.linux -%{__perl} -pi.orig -e 's|^(LIBINST) = /usr/local/lib|$1 = %{_libdir}|' Makefile.linux %build %{__make} %{?_smp_mflags} -f Makefile.linux sharedlib \ - CFLAGS="-fPIC" + CFLAGS="%{optflags} -fPIC" + %install %{__rm} -rf %{buildroot} -%{__install} -D -m0755 pa_unix_oss/libportaudio.so %{buildroot}%{_libdir}/libportaudio.so -%{__install} -D -m0644 pa_common/portaudio.h %{buildroot}%{_includedir}/portaudio.h +%{__install} -D -m0755 pa_unix_oss/libportaudio.so \ + %{buildroot}%{_libdir}/libportaudio.so +%{__install} -D -m0644 pa_common/portaudio.h \ + %{buildroot}%{_includedir}/portaudio.h + %clean %{__rm} -rf %{buildroot} + %files -%defattr(0644, root, root, 0755) +%defattr(-, root, root, 0755) %doc LICENSE.txt README.txt docs/ -%{_libdir}/*.so %{_includedir}/*.h +%{_libdir}/*.so + %changelog +* Tue Nov 16 2004 Matthias Saou 18.1-3 +- Bump release to provide Extras upgrade path. + +* Fri Nov 5 2004 Matthias Saou 18.1-2 +- Add -devel provides. +- Fix .so 644 mode (overidden in defattr). + * Thu Jun 10 2004 Dag Wieers - 18.1-1 - Added -fPIC for x86_64. From fbb7f49069c1f76ecfbe6579dee850560c9b8a5c Mon Sep 17 00:00:00 2001 From: gafton Date: Wed, 24 Nov 2004 04:49:45 +0000 Subject: [PATCH 04/59] Fix braindead typo from the original import --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 52dee22..f02d120 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Makefile for source rpm: portaudio -# $Id$ +# $Id: Makefile,v 1.1 2004/11/09 02:49:32 cvsextras Exp $ NAME := portaudio SPECFILE = $(firstword $(wildcard *.spec)) @@ -12,7 +12,7 @@ MAKEFILE_COMMON := $(shell $(find-makefile-common)) ifeq ($(MAKEFILE_COMMON),) # attept a checkout define checkout-makefile-common -test -f CVS/Rootx && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 endef MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) From f4f582b42aad5881d5eb02422558b3d93e6a55ba Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Sat, 5 Mar 2005 21:10:23 +0000 Subject: [PATCH 05/59] Further mass cleanup. One or more apply : - Remove (hopefully) all zero epoch remains. - Remove trailing spaces and tabs. - Keep consistency between tabs and spaces. - Clean up summary. --- portaudio.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/portaudio.spec b/portaudio.spec index 3e5f9bc..b8cdaa2 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,3 @@ -# $Id: portaudio.spec 2423 2004-11-05 11:50:06Z dude $ -# Upstream: - %define real_version v18_1 Summary: Free, cross platform, open-source, audio I/O library @@ -22,7 +19,7 @@ and will be converted to the native format internally. %prep -%setup -n %{name}_%{real_version} +%setup -n %{name}_%{real_version} %{__perl} -pi.orig -e 's|^(LIBINST) = /usr/local/lib|$1 = %{_libdir}|' \ Makefile.linux From ca078b32b8e03d6b6d4538a60e6a41430b96448b Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Wed, 6 Apr 2005 22:13:29 +0000 Subject: [PATCH 06/59] mass release bump for packages not rebuilt after FC-3-split --- portaudio.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index b8cdaa2..33ec36a 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,8 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 18.1 -Release: 3 +Release: 4 + License: BSD-like Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -49,6 +50,9 @@ and will be converted to the native format internally. %changelog +* Fri Apr 7 2005 Michael Schwendt +- rebuilt + * Tue Nov 16 2004 Matthias Saou 18.1-3 - Bump release to provide Extras upgrade path. From f899c84a2f6634664fd19f0ef981d0685b0827ed Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Mon, 23 May 2005 00:18:41 +0000 Subject: [PATCH 07/59] - rebuild on all arches --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 33ec36a..8ec3c53 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 18.1 -Release: 4 +Release: 5 License: BSD-like Group: System Environment/Libraries @@ -50,6 +50,9 @@ and will be converted to the native format internally. %changelog +* Sun May 22 2005 Jeremy Katz - 18.1-5 +- rebuild on all arches + * Fri Apr 7 2005 Michael Schwendt - rebuilt From dd26549c486c4a050111756dc47542a23c747184 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Mon, 23 May 2005 10:45:35 +0000 Subject: [PATCH 08/59] Cosmetic changes. --- portaudio.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/portaudio.spec b/portaudio.spec index 8ec3c53..b604a11 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -4,7 +4,6 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 18.1 Release: 5 - License: BSD-like Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -53,7 +52,7 @@ and will be converted to the native format internally. * Sun May 22 2005 Jeremy Katz - 18.1-5 - rebuild on all arches -* Fri Apr 7 2005 Michael Schwendt +* Fri Apr 7 2005 Michael Schwendt 18.1-4 - rebuilt * Tue Nov 16 2004 Matthias Saou 18.1-3 From 6a4a992879786672ce1a8e472e1183b03f5822ee Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Thu, 9 Feb 2006 18:13:58 +0000 Subject: [PATCH 09/59] Rebuild for new gcc/glibc. --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index b604a11..17dd6f0 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 18.1 -Release: 5 +Release: 6%{?dist} License: BSD-like Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -49,6 +49,9 @@ and will be converted to the native format internally. %changelog +* Thu Feb 9 2006 Matthias Saou 18.1-6 +- Rebuild for new gcc/glibc. + * Sun May 22 2005 Jeremy Katz - 18.1-5 - rebuild on all arches From db76ac2783ff5c0dd0a619519092a3d375f78665 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Mon, 6 Mar 2006 15:17:12 +0000 Subject: [PATCH 10/59] FC5 rebuild. --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 17dd6f0..c8f6ddc 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 18.1 -Release: 6%{?dist} +Release: 7%{?dist} License: BSD-like Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -49,6 +49,9 @@ and will be converted to the native format internally. %changelog +* Mon Mar 6 2006 Matthias Saou 18.1-7 +- FC5 rebuild. + * Thu Feb 9 2006 Matthias Saou 18.1-6 - Rebuild for new gcc/glibc. From f2f1992cfcbca5bf6cdea0a6b40531ed67d644ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 27 Aug 2006 21:00:07 +0000 Subject: [PATCH 11/59] http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild --- needs.rebuild | 1 + 1 file changed, 1 insertion(+) create mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild new file mode 100644 index 0000000..815fd29 --- /dev/null +++ b/needs.rebuild @@ -0,0 +1 @@ +http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From 071314053a0c251290967dc8648bc99787513c94 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Mon, 28 Aug 2006 12:28:48 +0000 Subject: [PATCH 12/59] FC6 rebuilds. --- needs.rebuild | 1 - portaudio.spec | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild deleted file mode 100644 index 815fd29..0000000 --- a/needs.rebuild +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild diff --git a/portaudio.spec b/portaudio.spec index c8f6ddc..1d40f0c 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 18.1 -Release: 7%{?dist} +Release: 8%{?dist} License: BSD-like Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -31,9 +31,9 @@ and will be converted to the native format internally. %install %{__rm} -rf %{buildroot} -%{__install} -D -m0755 pa_unix_oss/libportaudio.so \ +%{__install} -D -m 0755 pa_unix_oss/libportaudio.so \ %{buildroot}%{_libdir}/libportaudio.so -%{__install} -D -m0644 pa_common/portaudio.h \ +%{__install} -D -m 0644 pa_common/portaudio.h \ %{buildroot}%{_includedir}/portaudio.h @@ -49,6 +49,9 @@ and will be converted to the native format internally. %changelog +* Mon Aug 28 2006 Matthias Saou 18.1-8 +- FC6 rebuild. + * Mon Mar 6 2006 Matthias Saou 18.1-7 - FC5 rebuild. From 46177be3255cdea47cd18bd264899b9704e2bb03 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Tue, 19 Jun 2007 12:34:07 +0000 Subject: [PATCH 13/59] Update to v19 and split off real devel sub-package. --- .cvsignore | 2 +- portaudio.spec | 69 +++++++++++++++++++++++++++++++++++++------------- sources | 2 +- 3 files changed, 54 insertions(+), 19 deletions(-) diff --git a/.cvsignore b/.cvsignore index 8a31585..c943dd0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -portaudio_v18_1.zip +pa_stable_v19_061121.tar.gz diff --git a/portaudio.spec b/portaudio.spec index 1d40f0c..db7fd8d 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,15 +1,17 @@ -%define real_version v18_1 +%define real_version v19_061121 Summary: Free, cross platform, open-source, audio I/O library Name: portaudio -Version: 18.1 -Release: 8%{?dist} +Version: 19 +Release: 1%{?dist} License: BSD-like Group: System Environment/Libraries URL: http://www.portaudio.com/ -Source: http://www.portaudio.com/archives/portaudio_%{real_version}.zip +Source: http://www.portaudio.com/archives/pa_stable_%{real_version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Provides: %{name}-devel = %{version}-%{release} +BuildRequires: doxygen +BuildRequires: alsa-lib-devel +BuildRequires: jack-audio-connection-kit-devel %description PortAudio is a portable audio I/O library designed for cross-platform @@ -18,37 +20,70 @@ Audio can be generated in various formats, including 32 bit floating point, and will be converted to the native format internally. +%package devel +Summary: Development files for the portaudio audio I/O library +Group: Development/Libraries +Requires: %{name} = %{version}-%{release}, pkgconfig + +%description devel +PortAudio is a portable audio I/O library designed for cross-platform +support of audio. It uses a callback mechanism to request audio processing. +Audio can be generated in various formats, including 32 bit floating point, +and will be converted to the native format internally. + +This package contains files required to build applications that will use the +portaudio library. + + %prep -%setup -n %{name}_%{real_version} -%{__perl} -pi.orig -e 's|^(LIBINST) = /usr/local/lib|$1 = %{_libdir}|' \ - Makefile.linux +%setup -q -n %{name} %build -%{__make} %{?_smp_mflags} -f Makefile.linux sharedlib \ - CFLAGS="%{optflags} -fPIC" +%configure --disable-static +%{__make} %{?_smp_mflags} +# Build html devel documentation +doxygen %install %{__rm} -rf %{buildroot} -%{__install} -D -m 0755 pa_unix_oss/libportaudio.so \ - %{buildroot}%{_libdir}/libportaudio.so -%{__install} -D -m 0644 pa_common/portaudio.h \ - %{buildroot}%{_includedir}/portaudio.h +%{__make} install DESTDIR=%{buildroot} %clean %{__rm} -rf %{buildroot} +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + %files -%defattr(-, root, root, 0755) -%doc LICENSE.txt README.txt docs/ -%{_includedir}/*.h +%defattr(-,root,root,-) +%doc LICENSE.txt README.txt +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root,-) +%doc doc/html/* +%{_includedir}/portaudio.h +%exclude %{_libdir}/*.la %{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc %changelog +* Tue Jun 19 2007 Matthias Saou 19-1 +- Update to "stable" v19_061121. +- Switch virtual devel provide to a real sub-package. +- Update spec to match build changes from custom Makefile to autotools. +- Include new pkgconfig file and require pkgconfig from the devel package. +- Add ldconfig calls now that we have a versionned shared library. +- Rebuild against alsa-lib and jack-audio-connection-kit. +- Build doxygen documentation and include it in the devel package. + * Mon Aug 28 2006 Matthias Saou 18.1-8 - FC6 rebuild. diff --git a/sources b/sources index 1556983..c15f20f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ce66a732d263fde2b5ad2262ef37a691 portaudio_v18_1.zip +f2ceca92b3bfc206abccfb439c169a3c pa_stable_v19_061121.tar.gz From 0ddac020b97b06eb9d4384afc853a386b9f26264 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Sun, 5 Aug 2007 16:15:14 +0000 Subject: [PATCH 14/59] Update License field. --- portaudio.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/portaudio.spec b/portaudio.spec index db7fd8d..1b7dd98 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,8 +3,8 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 1%{?dist} -License: BSD-like +Release: 2%{?dist} +License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ Source: http://www.portaudio.com/archives/pa_stable_%{real_version}.tar.gz @@ -75,6 +75,9 @@ doxygen %changelog +* Sun Aug 5 2007 Matthias Saou 19-2 +- Update License field. + * Tue Jun 19 2007 Matthias Saou 19-1 - Update to "stable" v19_061121. - Switch virtual devel provide to a real sub-package. From 0ee171e6582b78b7431e6eb2e81454470d6a3d9d Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Wed, 22 Aug 2007 18:55:53 +0000 Subject: [PATCH 15/59] Rebuild for new BuildID feature. --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 1b7dd98..e0903d5 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -75,6 +75,9 @@ doxygen %changelog +* Wed Aug 22 2007 Matthias Saou 19-3 +- Rebuild for new BuildID feature. + * Sun Aug 5 2007 Matthias Saou 19-2 - Update License field. From 07e54a1a81799ae16408ef5fd688eeac63e01efd Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Mon, 10 Dec 2007 10:03:32 +0000 Subject: [PATCH 16/59] Include portaudiocpp library and headers (#413681). --- portaudio.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/portaudio.spec b/portaudio.spec index e0903d5..6ebf914 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 3%{?dist} +Release: 4%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -40,7 +40,7 @@ portaudio library. %build -%configure --disable-static +%configure --disable-static --enable-cxx %{__make} %{?_smp_mflags} # Build html devel documentation doxygen @@ -68,6 +68,7 @@ doxygen %files devel %defattr(-,root,root,-) %doc doc/html/* +%{_includedir}/portaudiocpp/ %{_includedir}/portaudio.h %exclude %{_libdir}/*.la %{_libdir}/*.so @@ -75,6 +76,9 @@ doxygen %changelog +* Mon Dec 10 2007 Matthias Saou 19-4 +- Include portaudiocpp library and headers (#413681). + * Wed Aug 22 2007 Matthias Saou 19-3 - Rebuild for new BuildID feature. From 5c685c72a00af2e92ad52434621d769fc1a86195 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Sun, 3 Feb 2008 10:47:47 +0000 Subject: [PATCH 17/59] Update to "stable" v19_20071207. --- .cvsignore | 2 +- portaudio.spec | 9 +++++++-- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index c943dd0..3b2de6b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pa_stable_v19_061121.tar.gz +pa_stable_v19_20071207.tar.gz diff --git a/portaudio.spec b/portaudio.spec index 6ebf914..f472d2c 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,9 +1,9 @@ -%define real_version v19_061121 +%define real_version v19_20071207 Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -76,6 +76,11 @@ doxygen %changelog +* Sun Feb 3 2008 Matthias Saou 19-5 +- Update to "stable" v19_20071207. +- Rebuild against latest jack in rawhide (#430672). +- Backport update to F8 too (#431266). + * Mon Dec 10 2007 Matthias Saou 19-4 - Include portaudiocpp library and headers (#413681). diff --git a/sources b/sources index c15f20f..a4a7ce1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f2ceca92b3bfc206abccfb439c169a3c pa_stable_v19_061121.tar.gz +d2943e4469834b25afe62cc51adc025f pa_stable_v19_20071207.tar.gz From 2c702b948b53fc1d8f5e555ca48170458dd03fd0 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 8 Dec 2008 18:53:59 +0000 Subject: [PATCH 18/59] - Add a patch by Kevin Kofler to make non mmap alsa (and thus pulseaudio) work (bz 445644) --- portaudio-non-mmap-alsa.patch | 381 ++++++++++++++++++++++++++++++++++ portaudio.spec | 8 +- 2 files changed, 388 insertions(+), 1 deletion(-) create mode 100644 portaudio-non-mmap-alsa.patch diff --git a/portaudio-non-mmap-alsa.patch b/portaudio-non-mmap-alsa.patch new file mode 100644 index 0000000..3d78e82 --- /dev/null +++ b/portaudio-non-mmap-alsa.patch @@ -0,0 +1,381 @@ +diff -ur portaudio/src/hostapi/alsa/pa_linux_alsa.c portaudio-pulseaudio/src/hostapi/alsa/pa_linux_alsa.c +--- portaudio/src/hostapi/alsa/pa_linux_alsa.c 2007-09-12 19:39:48.000000000 +0200 ++++ portaudio-pulseaudio/src/hostapi/alsa/pa_linux_alsa.c 2008-12-08 19:30:20.000000000 +0100 +@@ -6,6 +6,7 @@ + * + * Copyright (c) 2002 Joshua Haberman + * Copyright (c) 2005-2007 Arve Knudsen ++ * Copyright (c) 2008 Kevin Kofler + * + * Based on the Open Source API proposed by Ross Bencina + * Copyright (c) 1999-2002 Ross Bencina, Phil Burk +@@ -118,6 +119,8 @@ + unsigned long framesPerBuffer; + int numUserChannels, numHostChannels; + int userInterleaved, hostInterleaved; ++ int canMmap; ++ void *nonMmapBuffer; + PaDeviceIndex device; /* Keep the device index */ + + snd_pcm_t *pcm; +@@ -321,7 +324,7 @@ + * and a suitable result returned. The device is closed before returning. + */ + static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, int openBlocking, +- PaAlsaDeviceInfo* devInfo, int* canMmap ) ++ PaAlsaDeviceInfo* devInfo ) + { + PaError result = paNoError; + snd_pcm_hw_params_t *hwParams; +@@ -354,9 +357,6 @@ + snd_pcm_hw_params_alloca( &hwParams ); + snd_pcm_hw_params_any( pcm, hwParams ); + +- *canMmap = snd_pcm_hw_params_test_access( pcm, hwParams, SND_PCM_ACCESS_MMAP_INTERLEAVED ) >= 0 || +- snd_pcm_hw_params_test_access( pcm, hwParams, SND_PCM_ACCESS_MMAP_NONINTERLEAVED ) >= 0; +- + if( defaultSr >= 0 ) + { + /* Could be that the device opened in one mode supports samplerates that the other mode wont have, +@@ -566,7 +566,6 @@ + PaError result = 0; + PaDeviceInfo *baseDeviceInfo = &devInfo->baseDeviceInfo; + snd_pcm_t *pcm; +- int canMmap = -1; + PaUtilHostApiRepresentation *baseApi = &alsaApi->baseHostApiRep; + + /* Zero fields */ +@@ -580,8 +579,7 @@ + OpenPcm( &pcm, deviceName->alsaName, SND_PCM_STREAM_CAPTURE, blocking, 0 ) + >= 0 ) + { +- if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_In, blocking, devInfo, +- &canMmap ) != paNoError ) ++ if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_In, blocking, devInfo ) != paNoError ) + { + /* Error */ + PA_DEBUG(("%s: Failed groping %s for capture\n", __FUNCTION__, deviceName->alsaName)); +@@ -594,8 +592,7 @@ + OpenPcm( &pcm, deviceName->alsaName, SND_PCM_STREAM_PLAYBACK, blocking, 0 ) + >= 0 ) + { +- if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_Out, blocking, devInfo, +- &canMmap ) != paNoError ) ++ if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_Out, blocking, devInfo ) != paNoError ) + { + /* Error */ + PA_DEBUG(("%s: Failed groping %s for playback\n", __FUNCTION__, deviceName->alsaName)); +@@ -603,12 +600,6 @@ + } + } + +- if( 0 == canMmap ) +- { +- PA_DEBUG(("%s: Device %s doesn't support mmap\n", __FUNCTION__, deviceName->alsaName)); +- goto end; +- } +- + baseDeviceInfo->structVersion = 2; + baseDeviceInfo->hostApi = alsaApi->hostApiIndex; + baseDeviceInfo->name = deviceName->name; +@@ -1197,6 +1188,8 @@ + self->hostInterleaved = self->userInterleaved = !(userSampleFormat & paNonInterleaved); + self->numUserChannels = params->channelCount; + self->streamDir = streamDir; ++ self->canMmap = 0; ++ self->nonMmapBuffer = NULL; + + if( !callbackMode && !self->userInterleaved ) + { +@@ -1239,6 +1232,7 @@ + + PaError result = paNoError; + snd_pcm_access_t accessMode, alternateAccessMode; ++ snd_pcm_access_t rwAccessMode, alternateRwAccessMode; + int dir = 0; + snd_pcm_t *pcm = self->pcm; + double sr = *sampleRate; +@@ -1258,32 +1252,40 @@ + if( self->userInterleaved ) + { + accessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED; ++ rwAccessMode = SND_PCM_ACCESS_RW_INTERLEAVED; + alternateAccessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED; ++ alternateRwAccessMode = SND_PCM_ACCESS_RW_NONINTERLEAVED; + } + else + { + accessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED; ++ rwAccessMode = SND_PCM_ACCESS_RW_NONINTERLEAVED; + alternateAccessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED; ++ alternateRwAccessMode = SND_PCM_ACCESS_RW_INTERLEAVED; + } + /* If requested access mode fails, try alternate mode */ ++ self->canMmap = 1; + if( snd_pcm_hw_params_set_access( pcm, hwParams, accessMode ) < 0 ) + { +- int err = 0; +- if( (err = snd_pcm_hw_params_set_access( pcm, hwParams, alternateAccessMode )) < 0) ++ if( snd_pcm_hw_params_set_access( pcm, hwParams, rwAccessMode ) >= 0 ) ++ self->canMmap = 0; ++ else + { +- result = paUnanticipatedHostError; +- if( -EINVAL == err ) ++ if( snd_pcm_hw_params_set_access( pcm, hwParams, alternateAccessMode ) < 0 ) + { +- PaUtil_SetLastHostErrorInfo( paALSA, err, "PA ALSA requires that a device supports mmap access" ); +- } +- else +- { +- PaUtil_SetLastHostErrorInfo( paALSA, err, snd_strerror( err ) ); ++ int err = 0; ++ if( (err = snd_pcm_hw_params_set_access( pcm, hwParams, alternateRwAccessMode )) >= 0) ++ self->canMmap = 0; ++ else ++ { ++ result = paUnanticipatedHostError; ++ PaUtil_SetLastHostErrorInfo( paALSA, err, snd_strerror( err ) ); ++ goto error; ++ } + } +- goto error; ++ /* Flip mode */ ++ self->hostInterleaved = !self->userInterleaved; + } +- /* Flip mode */ +- self->hostInterleaved = !self->userInterleaved; + } + + ENSURE_( snd_pcm_hw_params_set_format( pcm, hwParams, self->nativeFormat ), paUnanticipatedHostError ); +@@ -1361,7 +1363,7 @@ + + ENSURE_( snd_pcm_sw_params_set_avail_min( self->pcm, swParams, self->framesPerBuffer ), paUnanticipatedHostError ); + ENSURE_( snd_pcm_sw_params_set_xfer_align( self->pcm, swParams, 1 ), paUnanticipatedHostError ); +- ENSURE_( snd_pcm_sw_params_set_tstamp_mode( self->pcm, swParams, SND_PCM_TSTAMP_MMAP ), paUnanticipatedHostError ); ++ ENSURE_( snd_pcm_sw_params_set_tstamp_mode( self->pcm, swParams, SND_PCM_TSTAMP_ENABLE ), paUnanticipatedHostError ); + + /* Set the parameters! */ + ENSURE_( snd_pcm_sw_params( self->pcm, swParams ), paUnanticipatedHostError ); +@@ -1589,6 +1591,10 @@ + } + } + ++ /* non-mmap mode needs a reasonably-sized buffer or it'll stutter */ ++ if( !self->canMmap && framesPerHostBuffer < 2048 ) ++ framesPerHostBuffer = 2048; ++ + assert( framesPerHostBuffer > 0 ); + { + snd_pcm_uframes_t min = 0, max = 0; +@@ -1831,12 +1837,13 @@ + PA_UNLESS( framesPerHostBuffer != 0, paInternalError ); + self->maxFramesPerHostBuffer = framesPerHostBuffer; + +- if( !accurate ) ++ if( !self->playback.canMmap || !accurate ) + { + /* Don't know the exact size per host buffer */ + *hostBufferSizeMode = paUtilBoundedHostBufferSize; + /* Raise upper bound */ +- ++self->maxFramesPerHostBuffer; ++ if( !accurate ) ++ ++self->maxFramesPerHostBuffer; + } + + error: +@@ -2059,9 +2066,11 @@ + { + /* Buffer isn't primed, so prepare and silence */ + ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError ); +- SilenceBuffer( stream ); ++ if( stream->playback.canMmap ) ++ SilenceBuffer( stream ); + } +- ENSURE_( snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError ); ++ if( stream->playback.canMmap ) ++ ENSURE_( snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError ); + } + else + ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError ); +@@ -2390,6 +2399,7 @@ + snd_pcm_status_t *st; + PaTime now = PaUtil_GetTime(); + snd_timestamp_t t; ++ int errplayback = 0, errcapture = 0; + + snd_pcm_status_alloca( &st ); + +@@ -2400,6 +2410,7 @@ + { + snd_pcm_status_get_trigger_tstamp( st, &t ); + self->underrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000); ++ errplayback = snd_pcm_recover( self->playback.pcm, -EPIPE, 0 ); + } + } + if( self->capture.pcm ) +@@ -2409,10 +2420,12 @@ + { + snd_pcm_status_get_trigger_tstamp( st, &t ); + self->overrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000); ++ errcapture = snd_pcm_recover( self->capture.pcm, -EPIPE, 0 ); + } + } + +- PA_ENSURE( AlsaRestart( self ) ); ++ if( errplayback || errcapture ) ++ PA_ENSURE( AlsaRestart( self ) ); + + end: + return result; +@@ -2563,7 +2576,7 @@ + static PaError PaAlsaStreamComponent_EndProcessing( PaAlsaStreamComponent *self, unsigned long numFrames, int *xrun ) + { + PaError result = paNoError; +- int res; ++ int res = 0; + + /* @concern FullDuplex It is possible that only one direction is marked ready after polling, and processed + * afterwards +@@ -2571,7 +2584,34 @@ + if( !self->ready ) + goto end; + +- res = snd_pcm_mmap_commit( self->pcm, self->offset, numFrames ); ++ if( !self->canMmap && StreamDirection_Out == self->streamDir ) ++ { ++ /* Play sound */ ++ if( self->hostInterleaved ) ++ res = snd_pcm_writei( self->pcm, self->nonMmapBuffer, numFrames ); ++ else ++ { ++ void *bufs[self->numHostChannels]; ++ int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ); ++ unsigned char *buffer = self->nonMmapBuffer; ++ int i; ++ for( i = 0; i < self->numHostChannels; ++i ) ++ { ++ bufs[i] = buffer; ++ buffer += bufsize; ++ } ++ res = snd_pcm_writen( self->pcm, bufs, numFrames ); ++ } ++ } ++ ++ if( self->canMmap ) ++ res = snd_pcm_mmap_commit( self->pcm, self->offset, numFrames ); ++ else ++ { ++ free( self->nonMmapBuffer ); ++ self->nonMmapBuffer = NULL; ++ } ++ + if( res == -EPIPE || res == -ESTRPIPE ) + { + *xrun = 1; +@@ -2611,7 +2651,7 @@ + if( self->hostInterleaved ) + { + int swidth = snd_pcm_format_size( self->nativeFormat, 1 ); +- unsigned char *buffer = ExtractAddress( self->channelAreas, self->offset ); ++ unsigned char *buffer = self->canMmap ? ExtractAddress( self->channelAreas, self->offset ) : self->nonMmapBuffer; + + /* Start after the last user channel */ + p = buffer + self->numUserChannels * swidth; +@@ -2991,13 +3031,23 @@ + goto end; + } + +- ENSURE_( snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames ), paUnanticipatedHostError ); ++ if( self->canMmap ) ++ { ++ ENSURE_( snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames ), paUnanticipatedHostError ); ++ /* @concern ChannelAdaption Buffer address is recorded so we can do some channel adaption later */ ++ self->channelAreas = (snd_pcm_channel_area_t *)areas; ++ } ++ else ++ { ++ free( self->nonMmapBuffer ); ++ self->nonMmapBuffer = calloc( self->numHostChannels, snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ) ); ++ } + + if( self->hostInterleaved ) + { + int swidth = snd_pcm_format_size( self->nativeFormat, 1 ); + +- p = buffer = ExtractAddress( areas, self->offset ); ++ p = buffer = self->canMmap ? ExtractAddress( areas, self->offset ) : self->nonMmapBuffer; + for( i = 0; i < self->numUserChannels; ++i ) + { + /* We're setting the channels up to userChannels, but the stride will be hostChannels samples */ +@@ -3007,16 +3057,52 @@ + } + else + { +- for( i = 0; i < self->numUserChannels; ++i ) ++ if( self->canMmap ) ++ for( i = 0; i < self->numUserChannels; ++i ) ++ { ++ area = areas + i; ++ buffer = ExtractAddress( area, self->offset ); ++ setChannel( bp, i, buffer, 1 ); ++ } ++ else + { +- area = areas + i; +- buffer = ExtractAddress( area, self->offset ); +- setChannel( bp, i, buffer, 1 ); ++ int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ); ++ buffer = self->nonMmapBuffer; ++ for( i = 0; i < self->numUserChannels; ++i ) ++ { ++ setChannel( bp, i, buffer, 1 ); ++ buffer += bufsize; ++ } + } + } + +- /* @concern ChannelAdaption Buffer address is recorded so we can do some channel adaption later */ +- self->channelAreas = (snd_pcm_channel_area_t *)areas; ++ if( !self->canMmap && StreamDirection_In == self->streamDir ) ++ { ++ /* Read sound */ ++ int res; ++ if( self->hostInterleaved ) ++ res = snd_pcm_readi( self->pcm, self->nonMmapBuffer, *numFrames ); ++ else ++ { ++ void *bufs[self->numHostChannels]; ++ int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ); ++ unsigned char *buffer = self->nonMmapBuffer; ++ int i; ++ for( i = 0; i < self->numHostChannels; ++i ) ++ { ++ bufs[i] = buffer; ++ buffer += bufsize; ++ } ++ res = snd_pcm_readn( self->pcm, bufs, *numFrames ); ++ } ++ if( res == -EPIPE || res == -ESTRPIPE ) ++ { ++ *xrun = 1; ++ *numFrames = 0; ++ free( self->nonMmapBuffer ); ++ self->nonMmapBuffer = NULL; ++ } ++ } + + end: + error: +diff -ur portaudio/src/os/unix/pa_unix_hostapis.c portaudio-pulseaudio/src/os/unix/pa_unix_hostapis.c +--- portaudio/src/os/unix/pa_unix_hostapis.c 2006-08-26 10:27:53.000000000 +0200 ++++ portaudio-pulseaudio/src/os/unix/pa_unix_hostapis.c 2008-11-09 04:51:04.000000000 +0100 +@@ -75,4 +75,8 @@ + 0 /* NULL terminated array */ + }; + ++#if defined(PA_USE_OSS) && defined(PA_USE_ALSA) ++int paDefaultHostApiIndex = 1; ++#else + int paDefaultHostApiIndex = 0; ++#endif diff --git a/portaudio.spec b/portaudio.spec index f472d2c..249a4e3 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,11 +3,12 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 5%{?dist} +Release: 6%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ Source: http://www.portaudio.com/archives/pa_stable_%{real_version}.tar.gz +Patch0: portaudio-non-mmap-alsa.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: doxygen BuildRequires: alsa-lib-devel @@ -37,6 +38,7 @@ portaudio library. %prep %setup -q -n %{name} +%patch0 -p1 %build @@ -76,6 +78,10 @@ doxygen %changelog +* Sun Dec 7 2008 Hans de Goede 19-6 +- Add a patch by Kevin Kofler to make non mmap alsa (and thus pulseaudio) work + (bz 445644) + * Sun Feb 3 2008 Matthias Saou 19-5 - Update to "stable" v19_20071207. - Rebuild against latest jack in rawhide (#430672). From 25bbe35ce9dd003dde4562918a1c6c43c3851954 Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Mon, 22 Dec 2008 13:18:03 +0000 Subject: [PATCH 19/59] Add Doxyfile patch to remove date in footer and fix multilib (#342931). --- portaudio-doxynodate.patch | 21 +++++++++++++++++++++ portaudio.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 portaudio-doxynodate.patch diff --git a/portaudio-doxynodate.patch b/portaudio-doxynodate.patch new file mode 100644 index 0000000..adebd24 --- /dev/null +++ b/portaudio-doxynodate.patch @@ -0,0 +1,21 @@ +diff -Naupr portaudio.orig/Doxyfile portaudio/Doxyfile +--- portaudio.orig/Doxyfile 2006-08-23 10:15:11.000000000 +0200 ++++ portaudio/Doxyfile 2008-12-22 14:11:16.558309299 +0100 +@@ -124,7 +124,7 @@ GENERATE_HTML = YES + HTML_OUTPUT = html + HTML_FILE_EXTENSION = .html + HTML_HEADER = +-HTML_FOOTER = ++HTML_FOOTER = no_date_footer.html + HTML_STYLESHEET = + HTML_ALIGN_MEMBERS = YES + GENERATE_HTMLHELP = NO +diff -Naupr portaudio.orig/no_date_footer.html portaudio/no_date_footer.html +--- portaudio.orig/no_date_footer.html 1970-01-01 01:00:00.000000000 +0100 ++++ portaudio/no_date_footer.html 2008-12-22 14:11:01.144246196 +0100 +@@ -0,0 +1,5 @@ ++
Generated for $projectname by  ++ ++doxygen$doxygenversion
++ ++ diff --git a/portaudio.spec b/portaudio.spec index 249a4e3..ef7c6da 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,12 +3,13 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 6%{?dist} +Release: 7%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ Source: http://www.portaudio.com/archives/pa_stable_%{real_version}.tar.gz Patch0: portaudio-non-mmap-alsa.patch +Patch1: portaudio-doxynodate.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: doxygen BuildRequires: alsa-lib-devel @@ -39,6 +40,7 @@ portaudio library. %prep %setup -q -n %{name} %patch0 -p1 +%patch1 -p1 %build @@ -78,6 +80,9 @@ doxygen %changelog +* Mon Dec 22 2008 Matthias Saou 19-7 +- Add Doxyfile patch to remove date in footer and fix multilib (#342931). + * Sun Dec 7 2008 Hans de Goede 19-6 - Add a patch by Kevin Kofler to make non mmap alsa (and thus pulseaudio) work (bz 445644) From b4b83d1c21e3e39dc22f93ff1f547a93536b7d0a Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 27 Feb 2009 01:36:21 +0000 Subject: [PATCH 20/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index ef7c6da..047d7fa 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 7%{?dist} +Release: 8%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -80,6 +80,9 @@ doxygen %changelog +* Thu Feb 26 2009 Fedora Release Engineering - 19-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Mon Dec 22 2008 Matthias Saou 19-7 - Add Doxyfile patch to remove date in footer and fix multilib (#342931). From bd3b6866253a1eccb61133c60948a8bed6d7dde3 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sun, 26 Jul 2009 19:11:54 +0000 Subject: [PATCH 21/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 047d7fa..a835575 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 8%{?dist} +Release: 9%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -80,6 +80,9 @@ doxygen %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 19-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Thu Feb 26 2009 Fedora Release Engineering - 19-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 3665d04869d4def19be293027c2518c20c61009b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:31:43 +0000 Subject: [PATCH 22/59] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f02d120..cf41d39 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: portaudio -# $Id: Makefile,v 1.1 2004/11/09 02:49:32 cvsextras Exp $ +# $Id: Makefile,v 1.2 2004/11/24 04:49:45 gafton Exp $ NAME := portaudio SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From dec431bf82b4a4d76923a856d4ef5bebabb6fb77 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 09:36:27 +0000 Subject: [PATCH 23/59] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index cf41d39..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: portaudio -# $Id: Makefile,v 1.2 2004/11/24 04:49:45 gafton Exp $ -NAME := portaudio -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 1a45d521dd028722dd41d2447528ebea6797f081 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 9 Feb 2011 09:50:22 -0600 Subject: [PATCH 24/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index a835575..6a47314 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -3,7 +3,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 9%{?dist} +Release: 10%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -80,6 +80,9 @@ doxygen %changelog +* Wed Feb 09 2011 Fedora Release Engineering - 19-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sun Jul 26 2009 Fedora Release Engineering - 19-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 955400fdc812019031559a3ddec609ea064c8b02 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 27 Mar 2011 20:44:30 +0200 Subject: [PATCH 25/59] Upgrade to a more recent snapshot to bring in various bugfixes (rhbz#691148) --- .gitignore | 1 + portaudio-non-mmap-alsa.patch | 381 ---------------------------------- portaudio.spec | 23 +- sources | 2 +- 4 files changed, 15 insertions(+), 392 deletions(-) delete mode 100644 portaudio-non-mmap-alsa.patch diff --git a/.gitignore b/.gitignore index 3b2de6b..84f936c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ pa_stable_v19_20071207.tar.gz +/pa_snapshot.tgz diff --git a/portaudio-non-mmap-alsa.patch b/portaudio-non-mmap-alsa.patch deleted file mode 100644 index 3d78e82..0000000 --- a/portaudio-non-mmap-alsa.patch +++ /dev/null @@ -1,381 +0,0 @@ -diff -ur portaudio/src/hostapi/alsa/pa_linux_alsa.c portaudio-pulseaudio/src/hostapi/alsa/pa_linux_alsa.c ---- portaudio/src/hostapi/alsa/pa_linux_alsa.c 2007-09-12 19:39:48.000000000 +0200 -+++ portaudio-pulseaudio/src/hostapi/alsa/pa_linux_alsa.c 2008-12-08 19:30:20.000000000 +0100 -@@ -6,6 +6,7 @@ - * - * Copyright (c) 2002 Joshua Haberman - * Copyright (c) 2005-2007 Arve Knudsen -+ * Copyright (c) 2008 Kevin Kofler - * - * Based on the Open Source API proposed by Ross Bencina - * Copyright (c) 1999-2002 Ross Bencina, Phil Burk -@@ -118,6 +119,8 @@ - unsigned long framesPerBuffer; - int numUserChannels, numHostChannels; - int userInterleaved, hostInterleaved; -+ int canMmap; -+ void *nonMmapBuffer; - PaDeviceIndex device; /* Keep the device index */ - - snd_pcm_t *pcm; -@@ -321,7 +324,7 @@ - * and a suitable result returned. The device is closed before returning. - */ - static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, int openBlocking, -- PaAlsaDeviceInfo* devInfo, int* canMmap ) -+ PaAlsaDeviceInfo* devInfo ) - { - PaError result = paNoError; - snd_pcm_hw_params_t *hwParams; -@@ -354,9 +357,6 @@ - snd_pcm_hw_params_alloca( &hwParams ); - snd_pcm_hw_params_any( pcm, hwParams ); - -- *canMmap = snd_pcm_hw_params_test_access( pcm, hwParams, SND_PCM_ACCESS_MMAP_INTERLEAVED ) >= 0 || -- snd_pcm_hw_params_test_access( pcm, hwParams, SND_PCM_ACCESS_MMAP_NONINTERLEAVED ) >= 0; -- - if( defaultSr >= 0 ) - { - /* Could be that the device opened in one mode supports samplerates that the other mode wont have, -@@ -566,7 +566,6 @@ - PaError result = 0; - PaDeviceInfo *baseDeviceInfo = &devInfo->baseDeviceInfo; - snd_pcm_t *pcm; -- int canMmap = -1; - PaUtilHostApiRepresentation *baseApi = &alsaApi->baseHostApiRep; - - /* Zero fields */ -@@ -580,8 +579,7 @@ - OpenPcm( &pcm, deviceName->alsaName, SND_PCM_STREAM_CAPTURE, blocking, 0 ) - >= 0 ) - { -- if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_In, blocking, devInfo, -- &canMmap ) != paNoError ) -+ if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_In, blocking, devInfo ) != paNoError ) - { - /* Error */ - PA_DEBUG(("%s: Failed groping %s for capture\n", __FUNCTION__, deviceName->alsaName)); -@@ -594,8 +592,7 @@ - OpenPcm( &pcm, deviceName->alsaName, SND_PCM_STREAM_PLAYBACK, blocking, 0 ) - >= 0 ) - { -- if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_Out, blocking, devInfo, -- &canMmap ) != paNoError ) -+ if( GropeDevice( pcm, deviceName->isPlug, StreamDirection_Out, blocking, devInfo ) != paNoError ) - { - /* Error */ - PA_DEBUG(("%s: Failed groping %s for playback\n", __FUNCTION__, deviceName->alsaName)); -@@ -603,12 +600,6 @@ - } - } - -- if( 0 == canMmap ) -- { -- PA_DEBUG(("%s: Device %s doesn't support mmap\n", __FUNCTION__, deviceName->alsaName)); -- goto end; -- } -- - baseDeviceInfo->structVersion = 2; - baseDeviceInfo->hostApi = alsaApi->hostApiIndex; - baseDeviceInfo->name = deviceName->name; -@@ -1197,6 +1188,8 @@ - self->hostInterleaved = self->userInterleaved = !(userSampleFormat & paNonInterleaved); - self->numUserChannels = params->channelCount; - self->streamDir = streamDir; -+ self->canMmap = 0; -+ self->nonMmapBuffer = NULL; - - if( !callbackMode && !self->userInterleaved ) - { -@@ -1239,6 +1232,7 @@ - - PaError result = paNoError; - snd_pcm_access_t accessMode, alternateAccessMode; -+ snd_pcm_access_t rwAccessMode, alternateRwAccessMode; - int dir = 0; - snd_pcm_t *pcm = self->pcm; - double sr = *sampleRate; -@@ -1258,32 +1252,40 @@ - if( self->userInterleaved ) - { - accessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED; -+ rwAccessMode = SND_PCM_ACCESS_RW_INTERLEAVED; - alternateAccessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED; -+ alternateRwAccessMode = SND_PCM_ACCESS_RW_NONINTERLEAVED; - } - else - { - accessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED; -+ rwAccessMode = SND_PCM_ACCESS_RW_NONINTERLEAVED; - alternateAccessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED; -+ alternateRwAccessMode = SND_PCM_ACCESS_RW_INTERLEAVED; - } - /* If requested access mode fails, try alternate mode */ -+ self->canMmap = 1; - if( snd_pcm_hw_params_set_access( pcm, hwParams, accessMode ) < 0 ) - { -- int err = 0; -- if( (err = snd_pcm_hw_params_set_access( pcm, hwParams, alternateAccessMode )) < 0) -+ if( snd_pcm_hw_params_set_access( pcm, hwParams, rwAccessMode ) >= 0 ) -+ self->canMmap = 0; -+ else - { -- result = paUnanticipatedHostError; -- if( -EINVAL == err ) -+ if( snd_pcm_hw_params_set_access( pcm, hwParams, alternateAccessMode ) < 0 ) - { -- PaUtil_SetLastHostErrorInfo( paALSA, err, "PA ALSA requires that a device supports mmap access" ); -- } -- else -- { -- PaUtil_SetLastHostErrorInfo( paALSA, err, snd_strerror( err ) ); -+ int err = 0; -+ if( (err = snd_pcm_hw_params_set_access( pcm, hwParams, alternateRwAccessMode )) >= 0) -+ self->canMmap = 0; -+ else -+ { -+ result = paUnanticipatedHostError; -+ PaUtil_SetLastHostErrorInfo( paALSA, err, snd_strerror( err ) ); -+ goto error; -+ } - } -- goto error; -+ /* Flip mode */ -+ self->hostInterleaved = !self->userInterleaved; - } -- /* Flip mode */ -- self->hostInterleaved = !self->userInterleaved; - } - - ENSURE_( snd_pcm_hw_params_set_format( pcm, hwParams, self->nativeFormat ), paUnanticipatedHostError ); -@@ -1361,7 +1363,7 @@ - - ENSURE_( snd_pcm_sw_params_set_avail_min( self->pcm, swParams, self->framesPerBuffer ), paUnanticipatedHostError ); - ENSURE_( snd_pcm_sw_params_set_xfer_align( self->pcm, swParams, 1 ), paUnanticipatedHostError ); -- ENSURE_( snd_pcm_sw_params_set_tstamp_mode( self->pcm, swParams, SND_PCM_TSTAMP_MMAP ), paUnanticipatedHostError ); -+ ENSURE_( snd_pcm_sw_params_set_tstamp_mode( self->pcm, swParams, SND_PCM_TSTAMP_ENABLE ), paUnanticipatedHostError ); - - /* Set the parameters! */ - ENSURE_( snd_pcm_sw_params( self->pcm, swParams ), paUnanticipatedHostError ); -@@ -1589,6 +1591,10 @@ - } - } - -+ /* non-mmap mode needs a reasonably-sized buffer or it'll stutter */ -+ if( !self->canMmap && framesPerHostBuffer < 2048 ) -+ framesPerHostBuffer = 2048; -+ - assert( framesPerHostBuffer > 0 ); - { - snd_pcm_uframes_t min = 0, max = 0; -@@ -1831,12 +1837,13 @@ - PA_UNLESS( framesPerHostBuffer != 0, paInternalError ); - self->maxFramesPerHostBuffer = framesPerHostBuffer; - -- if( !accurate ) -+ if( !self->playback.canMmap || !accurate ) - { - /* Don't know the exact size per host buffer */ - *hostBufferSizeMode = paUtilBoundedHostBufferSize; - /* Raise upper bound */ -- ++self->maxFramesPerHostBuffer; -+ if( !accurate ) -+ ++self->maxFramesPerHostBuffer; - } - - error: -@@ -2059,9 +2066,11 @@ - { - /* Buffer isn't primed, so prepare and silence */ - ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError ); -- SilenceBuffer( stream ); -+ if( stream->playback.canMmap ) -+ SilenceBuffer( stream ); - } -- ENSURE_( snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError ); -+ if( stream->playback.canMmap ) -+ ENSURE_( snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError ); - } - else - ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError ); -@@ -2390,6 +2399,7 @@ - snd_pcm_status_t *st; - PaTime now = PaUtil_GetTime(); - snd_timestamp_t t; -+ int errplayback = 0, errcapture = 0; - - snd_pcm_status_alloca( &st ); - -@@ -2400,6 +2410,7 @@ - { - snd_pcm_status_get_trigger_tstamp( st, &t ); - self->underrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000); -+ errplayback = snd_pcm_recover( self->playback.pcm, -EPIPE, 0 ); - } - } - if( self->capture.pcm ) -@@ -2409,10 +2420,12 @@ - { - snd_pcm_status_get_trigger_tstamp( st, &t ); - self->overrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000); -+ errcapture = snd_pcm_recover( self->capture.pcm, -EPIPE, 0 ); - } - } - -- PA_ENSURE( AlsaRestart( self ) ); -+ if( errplayback || errcapture ) -+ PA_ENSURE( AlsaRestart( self ) ); - - end: - return result; -@@ -2563,7 +2576,7 @@ - static PaError PaAlsaStreamComponent_EndProcessing( PaAlsaStreamComponent *self, unsigned long numFrames, int *xrun ) - { - PaError result = paNoError; -- int res; -+ int res = 0; - - /* @concern FullDuplex It is possible that only one direction is marked ready after polling, and processed - * afterwards -@@ -2571,7 +2584,34 @@ - if( !self->ready ) - goto end; - -- res = snd_pcm_mmap_commit( self->pcm, self->offset, numFrames ); -+ if( !self->canMmap && StreamDirection_Out == self->streamDir ) -+ { -+ /* Play sound */ -+ if( self->hostInterleaved ) -+ res = snd_pcm_writei( self->pcm, self->nonMmapBuffer, numFrames ); -+ else -+ { -+ void *bufs[self->numHostChannels]; -+ int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ); -+ unsigned char *buffer = self->nonMmapBuffer; -+ int i; -+ for( i = 0; i < self->numHostChannels; ++i ) -+ { -+ bufs[i] = buffer; -+ buffer += bufsize; -+ } -+ res = snd_pcm_writen( self->pcm, bufs, numFrames ); -+ } -+ } -+ -+ if( self->canMmap ) -+ res = snd_pcm_mmap_commit( self->pcm, self->offset, numFrames ); -+ else -+ { -+ free( self->nonMmapBuffer ); -+ self->nonMmapBuffer = NULL; -+ } -+ - if( res == -EPIPE || res == -ESTRPIPE ) - { - *xrun = 1; -@@ -2611,7 +2651,7 @@ - if( self->hostInterleaved ) - { - int swidth = snd_pcm_format_size( self->nativeFormat, 1 ); -- unsigned char *buffer = ExtractAddress( self->channelAreas, self->offset ); -+ unsigned char *buffer = self->canMmap ? ExtractAddress( self->channelAreas, self->offset ) : self->nonMmapBuffer; - - /* Start after the last user channel */ - p = buffer + self->numUserChannels * swidth; -@@ -2991,13 +3031,23 @@ - goto end; - } - -- ENSURE_( snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames ), paUnanticipatedHostError ); -+ if( self->canMmap ) -+ { -+ ENSURE_( snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames ), paUnanticipatedHostError ); -+ /* @concern ChannelAdaption Buffer address is recorded so we can do some channel adaption later */ -+ self->channelAreas = (snd_pcm_channel_area_t *)areas; -+ } -+ else -+ { -+ free( self->nonMmapBuffer ); -+ self->nonMmapBuffer = calloc( self->numHostChannels, snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ) ); -+ } - - if( self->hostInterleaved ) - { - int swidth = snd_pcm_format_size( self->nativeFormat, 1 ); - -- p = buffer = ExtractAddress( areas, self->offset ); -+ p = buffer = self->canMmap ? ExtractAddress( areas, self->offset ) : self->nonMmapBuffer; - for( i = 0; i < self->numUserChannels; ++i ) - { - /* We're setting the channels up to userChannels, but the stride will be hostChannels samples */ -@@ -3007,16 +3057,52 @@ - } - else - { -- for( i = 0; i < self->numUserChannels; ++i ) -+ if( self->canMmap ) -+ for( i = 0; i < self->numUserChannels; ++i ) -+ { -+ area = areas + i; -+ buffer = ExtractAddress( area, self->offset ); -+ setChannel( bp, i, buffer, 1 ); -+ } -+ else - { -- area = areas + i; -- buffer = ExtractAddress( area, self->offset ); -- setChannel( bp, i, buffer, 1 ); -+ int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ); -+ buffer = self->nonMmapBuffer; -+ for( i = 0; i < self->numUserChannels; ++i ) -+ { -+ setChannel( bp, i, buffer, 1 ); -+ buffer += bufsize; -+ } - } - } - -- /* @concern ChannelAdaption Buffer address is recorded so we can do some channel adaption later */ -- self->channelAreas = (snd_pcm_channel_area_t *)areas; -+ if( !self->canMmap && StreamDirection_In == self->streamDir ) -+ { -+ /* Read sound */ -+ int res; -+ if( self->hostInterleaved ) -+ res = snd_pcm_readi( self->pcm, self->nonMmapBuffer, *numFrames ); -+ else -+ { -+ void *bufs[self->numHostChannels]; -+ int bufsize = snd_pcm_format_size( self->nativeFormat, self->framesPerBuffer + 1 ); -+ unsigned char *buffer = self->nonMmapBuffer; -+ int i; -+ for( i = 0; i < self->numHostChannels; ++i ) -+ { -+ bufs[i] = buffer; -+ buffer += bufsize; -+ } -+ res = snd_pcm_readn( self->pcm, bufs, *numFrames ); -+ } -+ if( res == -EPIPE || res == -ESTRPIPE ) -+ { -+ *xrun = 1; -+ *numFrames = 0; -+ free( self->nonMmapBuffer ); -+ self->nonMmapBuffer = NULL; -+ } -+ } - - end: - error: -diff -ur portaudio/src/os/unix/pa_unix_hostapis.c portaudio-pulseaudio/src/os/unix/pa_unix_hostapis.c ---- portaudio/src/os/unix/pa_unix_hostapis.c 2006-08-26 10:27:53.000000000 +0200 -+++ portaudio-pulseaudio/src/os/unix/pa_unix_hostapis.c 2008-11-09 04:51:04.000000000 +0100 -@@ -75,4 +75,8 @@ - 0 /* NULL terminated array */ - }; - -+#if defined(PA_USE_OSS) && defined(PA_USE_ALSA) -+int paDefaultHostApiIndex = 1; -+#else - int paDefaultHostApiIndex = 0; -+#endif diff --git a/portaudio.spec b/portaudio.spec index 6a47314..e60d7bc 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,14 +1,12 @@ -%define real_version v19_20071207 - Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 10%{?dist} +Release: 11%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ -Source: http://www.portaudio.com/archives/pa_stable_%{real_version}.tar.gz -Patch0: portaudio-non-mmap-alsa.patch +# This is http://www.portaudio.com/archives/pa_snapshot.tgz from 27-03-2011 +Source: pa_snapshot.tgz Patch1: portaudio-doxynodate.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: doxygen @@ -39,24 +37,24 @@ portaudio library. %prep %setup -q -n %{name} -%patch0 -p1 %patch1 -p1 %build %configure --disable-static --enable-cxx -%{__make} %{?_smp_mflags} +# no -j# because building with -j# is broken +make # Build html devel documentation doxygen %install -%{__rm} -rf %{buildroot} -%{__make} install DESTDIR=%{buildroot} +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT %clean -%{__rm} -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig @@ -74,12 +72,17 @@ doxygen %doc doc/html/* %{_includedir}/portaudiocpp/ %{_includedir}/portaudio.h +%{_includedir}/pa_jack.h +%{_includedir}/pa_linux_alsa.h %exclude %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %changelog +* Sun Mar 27 2011 Hans de Goede - 19-11 +- Upgrade to a more recent snapshot to bring in various bugfixes (rhbz#691148) + * Wed Feb 09 2011 Fedora Release Engineering - 19-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index a4a7ce1..ecbd1c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d2943e4469834b25afe62cc51adc025f pa_stable_v19_20071207.tar.gz +f936481e3d7f4bb824b88a805e060c28 pa_snapshot.tgz From bc1cca1a973145c1eccfb695fcbeddce9ecf8c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 5 May 2011 12:53:58 +0200 Subject: [PATCH 26/59] fix dependency on alsa-lib-devel --- portaudio-pkgconfig-alsa.patch | 12 ++++++++++++ portaudio.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 portaudio-pkgconfig-alsa.patch diff --git a/portaudio-pkgconfig-alsa.patch b/portaudio-pkgconfig-alsa.patch new file mode 100644 index 0000000..53b6702 --- /dev/null +++ b/portaudio-pkgconfig-alsa.patch @@ -0,0 +1,12 @@ +diff -up portaudio/portaudio-2.0.pc.in.alsa portaudio/portaudio-2.0.pc.in +--- portaudio/portaudio-2.0.pc.in.alsa 2011-05-05 11:55:28.000000000 +0200 ++++ portaudio/portaudio-2.0.pc.in 2011-05-05 11:55:33.000000000 +0200 +@@ -5,7 +5,7 @@ includedir=@includedir@ + + Name: PortAudio + Description: Portable audio I/O +-Requires: ++Requires: alsa + Version: 19 + + Libs: -L${libdir} -lportaudio @LIBS@ diff --git a/portaudio.spec b/portaudio.spec index e60d7bc..f795b2f 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,13 +1,14 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 11%{?dist} +Release: 12%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ # This is http://www.portaudio.com/archives/pa_snapshot.tgz from 27-03-2011 Source: pa_snapshot.tgz Patch1: portaudio-doxynodate.patch +Patch2: portaudio-pkgconfig-alsa.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: doxygen BuildRequires: alsa-lib-devel @@ -38,6 +39,7 @@ portaudio library. %prep %setup -q -n %{name} %patch1 -p1 +%patch2 -p1 %build @@ -80,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu May 05 2011 Dan Horák - 19-12 +- fix dependency on alsa-lib-devel + * Sun Mar 27 2011 Hans de Goede - 19-11 - Upgrade to a more recent snapshot to bring in various bugfixes (rhbz#691148) From 2cd2481fd5d5f020bd0873725406290da33f159a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 19:08:15 -0600 Subject: [PATCH 27/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index f795b2f..6bd5019 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,7 +1,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 12%{?dist} +Release: 13%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -82,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 19-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Thu May 05 2011 Dan Horák - 19-12 - fix dependency on alsa-lib-devel From 3dfba7e28b7d7b8870affd0aed6cb5b24d091107 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 20 Jul 2012 21:39:57 -0500 Subject: [PATCH 28/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 6bd5019..88a99b6 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,7 +1,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 13%{?dist} +Release: 14%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -82,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jul 21 2012 Fedora Release Engineering - 19-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Sat Jan 14 2012 Fedora Release Engineering - 19-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 4491fe84e19985703fa3eeb3a9bd1d6597d3e8d6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 12:12:14 -0600 Subject: [PATCH 29/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 88a99b6..27997bb 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,7 +1,7 @@ Summary: Free, cross platform, open-source, audio I/O library Name: portaudio Version: 19 -Release: 14%{?dist} +Release: 15%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.portaudio.com/ @@ -82,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 19-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Sat Jul 21 2012 Fedora Release Engineering - 19-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 4d71fbe38fe2c1336c42d81b8c81a31683bb995c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 4 May 2013 15:56:16 +0200 Subject: [PATCH 30/59] Add a patch from audacity adding some extra API calls audacity needs - Cleanup spec-file - Update svn snapshot to bring in some alsa samplerate handling fixes - Run autoreconf for aarch64 support (rhbz#926363) --- portaudio-audacity.patch | 188 +++++++++++++++++++++++++++++++++++++++ portaudio.spec | 59 ++++++------ sources | 2 +- 3 files changed, 221 insertions(+), 28 deletions(-) create mode 100644 portaudio-audacity.patch diff --git a/portaudio-audacity.patch b/portaudio-audacity.patch new file mode 100644 index 0000000..9535f96 --- /dev/null +++ b/portaudio-audacity.patch @@ -0,0 +1,188 @@ +diff -wruN portaudio/include/pa_unix_oss.h portaudio-v19/include/pa_unix_oss.h +--- portaudio/include/pa_unix_oss.h 1969-12-31 18:00:00.000000000 -0600 ++++ portaudio-v19/include/pa_unix_oss.h 2012-12-14 22:34:14.290247100 -0600 +@@ -0,0 +1,52 @@ ++#ifndef PA_UNIX_OSS_H ++#define PA_UNIX_OSS_H ++ ++/* ++ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $ ++ * PortAudio Portable Real-Time Audio Library ++ * OSS-specific extensions ++ * ++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files ++ * (the "Software"), to deal in the Software without restriction, ++ * including without limitation the rights to use, copy, modify, merge, ++ * publish, distribute, sublicense, and/or sell copies of the Software, ++ * and to permit persons to whom the Software is furnished to do so, ++ * subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * Any person wishing to distribute modifications to the Software is ++ * requested to send the modifications to the original developer so that ++ * they can be incorporated into the canonical version. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF ++ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++/** @file ++ * OSS-specific PortAudio API extension header file. ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++const char *PaOSS_GetStreamInputDevice( PaStream *s ); ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream *s ); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff -wruN portaudio/include/portaudio.h portaudio-v19/include/portaudio.h +--- portaudio/include/portaudio.h 2012-08-31 19:10:13.000000000 -0500 ++++ portaudio-v19/include/portaudio.h 2012-12-14 22:34:14.368247200 -0600 +@@ -1146,6 +1146,15 @@ + 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 */ + + +diff -wruN portaudio/src/common/pa_front.c portaudio-v19/src/common/pa_front.c +--- portaudio/src/common/pa_front.c 2012-12-04 12:39:48.000000000 -0600 ++++ portaudio-v19/src/common/pa_front.c 2012-12-14 09:44:34.604344800 -0600 +@@ -1216,8 +1216,10 @@ + 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" )); +@@ -1729,6 +1731,32 @@ + 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( result ) ); ++#endif ++ ++ return result; ++} + + PaError Pa_GetSampleSize( PaSampleFormat format ) + { +diff -wruN portaudio/src/common/pa_stream.c portaudio-v19/src/common/pa_stream.c +--- portaudio/src/common/pa_stream.c 2008-02-15 01:50:33.000000000 -0600 ++++ portaudio-v19/src/common/pa_stream.c 2012-12-14 09:44:34.607345000 -0600 +@@ -93,6 +93,8 @@ + streamRepresentation->streamInfo.inputLatency = 0.; + streamRepresentation->streamInfo.outputLatency = 0.; + streamRepresentation->streamInfo.sampleRate = 0.; ++ ++ streamRepresentation->hostApiType = 0; + } + + +diff -wruN portaudio/src/common/pa_stream.h portaudio-v19/src/common/pa_stream.h +--- portaudio/src/common/pa_stream.h 2008-02-15 01:50:33.000000000 -0600 ++++ portaudio-v19/src/common/pa_stream.h 2012-12-14 09:44:34.610345200 -0600 +@@ -152,6 +152,7 @@ + PaStreamFinishedCallback *streamFinishedCallback; + void *userData; + PaStreamInfo streamInfo; ++ PaHostApiTypeId hostApiType; + } PaUtilStreamRepresentation; + + +diff -wruN portaudio/src/hostapi/oss/pa_unix_oss.c portaudio-v19/src/hostapi/oss/pa_unix_oss.c +--- portaudio/src/hostapi/oss/pa_unix_oss.c 2011-05-02 12:07:11.000000000 -0500 ++++ portaudio-v19/src/hostapi/oss/pa_unix_oss.c 2012-12-14 09:44:34.625346000 -0600 +@@ -2028,3 +2028,26 @@ + #endif + } + ++const char *PaOSS_GetStreamInputDevice( PaStream* s ) ++{ ++ PaOssStream *stream = (PaOssStream*)s; ++ ++ if( stream->capture ) ++ { ++ return stream->capture->devName; ++ } ++ ++ return NULL; ++} ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream* s ) ++{ ++ PaOssStream *stream = (PaOssStream*)s; ++ ++ if( stream->playback ) ++ { ++ return stream->playback->devName; ++ } ++ ++ return NULL; ++} +diff -up portaudio/configure.in~ portaudio/configure.in +--- portaudio/configure.in~ 2013-04-07 12:20:18.000000000 +0200 ++++ portaudio/configure.in 2013-05-04 15:14:14.356191153 +0200 +@@ -387,7 +387,7 @@ case "${host_os}" in + 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 + diff --git a/portaudio.spec b/portaudio.spec index 27997bb..4e260c4 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,18 +1,21 @@ -Summary: Free, cross platform, open-source, audio I/O library -Name: portaudio -Version: 19 -Release: 15%{?dist} -License: MIT -Group: System Environment/Libraries -URL: http://www.portaudio.com/ -# This is http://www.portaudio.com/archives/pa_snapshot.tgz from 27-03-2011 -Source: pa_snapshot.tgz -Patch1: portaudio-doxynodate.patch -Patch2: portaudio-pkgconfig-alsa.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: doxygen -BuildRequires: alsa-lib-devel -BuildRequires: jack-audio-connection-kit-devel +Name: portaudio +Version: 19 +Release: 16%{?dist} +Summary: Free, cross platform, open-source, audio I/O library +Group: System Environment/Libraries +License: MIT +URL: http://www.portaudio.com/ +# This is http://www.portaudio.com/archives/pa_snapshot.tgz svn rev 1890 +Source0: pa_snapshot.tgz +Patch1: portaudio-doxynodate.patch +Patch2: portaudio-pkgconfig-alsa.patch +# Add some extra API needed by audacity +# http://audacity.googlecode.com/svn/audacity-src/trunk/lib-src/portmixer/portaudio.patch +Patch3: portaudio-audacity.patch +BuildRequires: doxygen +BuildRequires: alsa-lib-devel +BuildRequires: jack-audio-connection-kit-devel +BuildRequires: libtool %description PortAudio is a portable audio I/O library designed for cross-platform @@ -22,9 +25,9 @@ and will be converted to the native format internally. %package devel -Summary: Development files for the portaudio audio I/O library -Group: Development/Libraries -Requires: %{name} = %{version}-%{release}, pkgconfig +Summary: Development files for the portaudio audio I/O library +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel PortAudio is a portable audio I/O library designed for cross-platform @@ -40,6 +43,9 @@ portaudio library. %setup -q -n %{name} %patch1 -p1 %patch2 -p1 +%patch3 -p1 +# For both patch3 and aarch64 support +autoreconf -i -f %build @@ -51,37 +57,36 @@ doxygen %install -rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -%clean -rm -rf $RPM_BUILD_ROOT - - %post -p /sbin/ldconfig - %postun -p /sbin/ldconfig %files -%defattr(-,root,root,-) %doc LICENSE.txt README.txt %{_libdir}/*.so.* %files devel -%defattr(-,root,root,-) %doc doc/html/* %{_includedir}/portaudiocpp/ %{_includedir}/portaudio.h %{_includedir}/pa_jack.h %{_includedir}/pa_linux_alsa.h +%{_includedir}/pa_unix_oss.h %exclude %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %changelog +* Sat May 4 2013 Hans de Goede - 19-16 +- Add a patch from audacity adding some extra API calls audacity needs +- Cleanup spec-file +- Update svn snapshot to bring in some alsa samplerate handling fixes +- Run autoreconf for aarch64 support (rhbz#926363) + * Thu Feb 14 2013 Fedora Release Engineering - 19-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild @@ -148,7 +153,7 @@ rm -rf $RPM_BUILD_ROOT * Sun May 22 2005 Jeremy Katz - 18.1-5 - rebuild on all arches -* Fri Apr 7 2005 Michael Schwendt 18.1-4 +* Thu Apr 7 2005 Michael Schwendt 18.1-4 - rebuilt * Tue Nov 16 2004 Matthias Saou 18.1-3 diff --git a/sources b/sources index ecbd1c0..681853f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f936481e3d7f4bb824b88a805e060c28 pa_snapshot.tgz +f618bfd2d51852fc8f839625c68b2685 pa_snapshot.tgz From 1dfe8ae3920040dcd8e7fad052f95b4d898d93fd Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 10 May 2013 10:46:08 +0200 Subject: [PATCH 31/59] Update comment on why we run autoreconf --- portaudio.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 4e260c4..a46902b 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -44,7 +44,7 @@ portaudio library. %patch1 -p1 %patch2 -p1 %patch3 -p1 -# For both patch3 and aarch64 support +# Needed for patch3 autoreconf -i -f From 0507e474203a3fc5a41e7fabe5e5d593718e3092 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 23:54:57 -0500 Subject: [PATCH 32/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index a46902b..d5e49bf 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -81,6 +81,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 19-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Sat May 4 2013 Hans de Goede - 19-16 - Add a patch from audacity adding some extra API calls audacity needs - Cleanup spec-file From 82f9fdd99dc958591fa0511a40c5724d223e7f02 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 11:50:45 -0500 Subject: [PATCH 33/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index d5e49bf..a3a1f21 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -81,6 +81,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 19-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sun Aug 04 2013 Fedora Release Engineering - 19-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From cae9b61ef890ffb0fc1ca4d44c8de3b629317d76 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 22 Jun 2014 16:22:04 +0200 Subject: [PATCH 34/59] Upgrade to the "stable" v19_20140130 snapshot (rhbz#1111780) --- .gitignore | 1 + portaudio.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 84f936c..71cbb36 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ pa_stable_v19_20071207.tar.gz /pa_snapshot.tgz +/pa_stable_v19_20140130.tgz diff --git a/portaudio.spec b/portaudio.spec index a3a1f21..94c2392 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,12 +1,11 @@ Name: portaudio Version: 19 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT URL: http://www.portaudio.com/ -# This is http://www.portaudio.com/archives/pa_snapshot.tgz svn rev 1890 -Source0: pa_snapshot.tgz +Source0: http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz Patch1: portaudio-doxynodate.patch Patch2: portaudio-pkgconfig-alsa.patch # Add some extra API needed by audacity @@ -50,6 +49,8 @@ autoreconf -i -f %build %configure --disable-static --enable-cxx +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' bindings/cpp/libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' bindings/cpp/libtool # no -j# because building with -j# is broken make # Build html devel documentation @@ -57,7 +58,7 @@ doxygen %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install %post -p /sbin/ldconfig @@ -81,6 +82,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %changelog +* Sun Jun 22 2014 Hans de Goede - 19-19 +- Upgrade to the "stable" v19_20140130 snapshot (rhbz#1111780) + * Sat Jun 07 2014 Fedora Release Engineering - 19-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index 681853f..95b8093 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f618bfd2d51852fc8f839625c68b2685 pa_snapshot.tgz +7f220406902af9dca009668e198cbd23 pa_stable_v19_20140130.tgz From 03e4346bbb68285bc22d70ce37b7dbf0dc6b4178 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 19:36:25 +0000 Subject: [PATCH 35/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 94c2392..318e8ed 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 19-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sun Jun 22 2014 Hans de Goede - 19-19 - Upgrade to the "stable" v19_20140130 snapshot (rhbz#1111780) From 1f4fa98d14ff1788c2454fee966826d1fad64082 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 2 May 2015 16:49:50 +0200 Subject: [PATCH 36/59] Rebuilt for GCC 5 C++11 ABI change --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 318e8ed..c61c820 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Sat May 02 2015 Kalev Lember - 19-21 +- Rebuilt for GCC 5 C++11 ABI change + * Sun Aug 17 2014 Fedora Release Engineering - 19-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 902df9a3c57136de009bf382f7a2bd97bde2c896 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 15:40:01 +0000 Subject: [PATCH 37/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index c61c820..0b450e0 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 19-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat May 02 2015 Kalev Lember - 19-21 - Rebuilt for GCC 5 C++11 ABI change From 34be1a1c389ea68f022c0a1f44fe77e9f3da5b65 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 18:21:27 +0000 Subject: [PATCH 38/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 0b450e0..6734da1 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 19-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Thu Jun 18 2015 Fedora Release Engineering - 19-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 8c2ff25bcc9aaee54cc9cb402ea6e57a6573ed92 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 07:45:23 +0000 Subject: [PATCH 39/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 6734da1..6eb8a83 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 23%{?dist} +Release: 24%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 19-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Feb 04 2016 Fedora Release Engineering - 19-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From f467e09cd70212f9c95e4d283258841d22290931 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 08:56:06 +0000 Subject: [PATCH 40/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 6eb8a83..ced8a4c 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 24%{?dist} +Release: 25%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 19-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Feb 11 2017 Fedora Release Engineering - 19-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 364532cac64b795ae2691b2325c384d5f6b27054 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 06:17:06 +0000 Subject: [PATCH 41/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index ced8a4c..f8cf879 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 25%{?dist} +Release: 26%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 19-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 19-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From da88f955a2cf49d8f4215f07b6c0dd00d015f31d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 05:35:59 +0000 Subject: [PATCH 42/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index f8cf879..ff35e4e 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 26%{?dist} +Release: 27%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 19-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Aug 03 2017 Fedora Release Engineering - 19-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 5fc99ef656fc6afd3c257017c0fd2c74620c7690 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 22:44:59 +0000 Subject: [PATCH 43/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index ff35e4e..9211e41 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 27%{?dist} +Release: 28%{?dist} Summary: Free, cross platform, open-source, audio I/O library Group: System Environment/Libraries License: MIT @@ -82,6 +82,9 @@ doxygen %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 19-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 19-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From b933263daa36d63351725d9a4540f4a3af4b8e42 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 17 Jul 2018 17:54:31 +0100 Subject: [PATCH 44/59] adjust build reqs, drop group, use %%license --- portaudio.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/portaudio.spec b/portaudio.spec index 9211e41..83d14f8 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -2,19 +2,21 @@ Name: portaudio Version: 19 Release: 28%{?dist} Summary: Free, cross platform, open-source, audio I/O library -Group: System Environment/Libraries License: MIT URL: http://www.portaudio.com/ + Source0: http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz Patch1: portaudio-doxynodate.patch Patch2: portaudio-pkgconfig-alsa.patch # Add some extra API needed by audacity # http://audacity.googlecode.com/svn/audacity-src/trunk/lib-src/portmixer/portaudio.patch Patch3: portaudio-audacity.patch + BuildRequires: doxygen +BuildRequires: gcc-c++ BuildRequires: alsa-lib-devel BuildRequires: jack-audio-connection-kit-devel -BuildRequires: libtool +BuildRequires: autoconf automake libtool %description PortAudio is a portable audio I/O library designed for cross-platform @@ -25,7 +27,6 @@ and will be converted to the native format internally. %package devel Summary: Development files for the portaudio audio I/O library -Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel @@ -66,7 +67,8 @@ doxygen %files -%doc LICENSE.txt README.txt +%license LICENSE.txt +%doc README.txt %{_libdir}/*.so.* %files devel From dc6c357ead7350acd5b6908d8044706c10dffcee Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 22 Jan 2019 18:40:43 +0100 Subject: [PATCH 45/59] Remove obsolete ldconfig scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- portaudio.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/portaudio.spec b/portaudio.spec index 83d14f8..83ace12 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -62,8 +62,7 @@ doxygen %make_install -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files From 7701b61e0aaad4aa027b88193b32648de8991a49 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 04:39:24 +0000 Subject: [PATCH 46/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 83ace12..8e2c4c2 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 28%{?dist} +Release: 29%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -83,6 +83,9 @@ doxygen %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 19-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 19-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 14b88de894e7695fc393930569661cda3cfbfecc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 11:08:34 +0000 Subject: [PATCH 47/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 8e2c4c2..0ab8e6c 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 29%{?dist} +Release: 30%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -83,6 +83,9 @@ doxygen %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 19-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Feb 02 2019 Fedora Release Engineering - 19-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From c64716b7c0793374b99d098a90fb213b94b0ae44 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 09:33:50 +0000 Subject: [PATCH 48/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 0ab8e6c..8183e76 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 30%{?dist} +Release: 31%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -83,6 +83,9 @@ doxygen %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 19-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Jul 26 2019 Fedora Release Engineering - 19-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 53fdb0f5025c47c99c76ab1faea7d63a4e97f55e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 22:52:00 +0000 Subject: [PATCH 49/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 8183e76..3a0a640 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 31%{?dist} +Release: 32%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -83,6 +83,9 @@ doxygen %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 19-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Thu Jan 30 2020 Fedora Release Engineering - 19-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From f922eafafd66d5a4e3fcb58bd88e7b191d142874 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 8 Jan 2021 19:25:10 +0000 Subject: [PATCH 50/59] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- portaudio.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/portaudio.spec b/portaudio.spec index 3a0a640..0e8c7dc 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -12,6 +12,7 @@ Patch2: portaudio-pkgconfig-alsa.patch # http://audacity.googlecode.com/svn/audacity-src/trunk/lib-src/portmixer/portaudio.patch Patch3: portaudio-audacity.patch +BuildRequires: make BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: alsa-lib-devel From f262fa51f3742ff9c9daa1a54897c36e0ab0b41b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 08:26:29 +0000 Subject: [PATCH 51/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 0e8c7dc..0dc19d2 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 32%{?dist} +Release: 33%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -84,6 +84,9 @@ doxygen %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 19-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 19-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 71dc5b57107e217cb187763a6563cf60d8909eb8 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 22 Mar 2021 18:18:16 +0100 Subject: [PATCH 52/59] Deal with pipewire jack identifiers containing chars which have special meanings in regexes Resolves rhbz#1939749 --- portaudio-pipewire-jacknames.patch | 194 +++++++++++++++++++++++++++++ portaudio.spec | 13 +- 2 files changed, 202 insertions(+), 5 deletions(-) create mode 100644 portaudio-pipewire-jacknames.patch diff --git a/portaudio-pipewire-jacknames.patch b/portaudio-pipewire-jacknames.patch new file mode 100644 index 0000000..f9c1b59 --- /dev/null +++ b/portaudio-pipewire-jacknames.patch @@ -0,0 +1,194 @@ +From eec7bb739771381ab698a6a611d933bdd72cbd8f Mon Sep 17 00:00:00 2001 +From: Be +Date: Fri, 19 Mar 2021 12:51:31 -0500 +Subject: [PATCH] JACK PipeWire fixes (escape regex chars) (#504) + +This patch fixes a problem caused by special regex characters +appearing in the device names when using the Jack interface to PipeWire. + +It is uncommon for JACK ports to have any characters that need to +be escaped in a regex. jackd simply calls the audio interface +"system". However PipeWire uses the device name from ALSA for the +JACK port names. If this contains any special regex characters, +BuildDeviceList would find the device but determine it has 0 +input channels and 0 output channels. In my case, I have an RME +Babyface Pro which puts its serial number in parentheses: + +$ aplay -l +card 0: Pro70785713 [Babyface Pro (70785713)], device 0: USB Audio [USB Audio] + Subdevices: 1/1 + Subdevice #0: subdevice #0 +--- + src/hostapi/jack/pa_jack.c | 83 +++++++++++++++++++++++++++++++++----- + 1 file changed, 73 insertions(+), 10 deletions(-) + +diff --git a/src/hostapi/jack/pa_jack.c b/src/hostapi/jack/pa_jack.c +index 0dad24fb..88926f47 100644 +--- a/src/hostapi/jack/pa_jack.c ++++ b/src/hostapi/jack/pa_jack.c +@@ -76,6 +76,7 @@ + static pthread_t mainThread_; + static char *jackErr_ = NULL; + static const char* clientName_ = "PortAudio"; ++static const char* port_regex_suffix = ":.*"; + + #define STRINGIZE_HELPER(expr) #expr + #define STRINGIZE(expr) STRINGIZE_HELPER(expr) +@@ -451,6 +452,38 @@ BlockingWaitEmpty( PaStream *s ) + + /* ---- jack driver ---- */ + ++/* copy null terminated string source to destination, escaping regex characters with '\\' in the process */ ++static void copy_string_and_escape_regex_chars( char *destination, const char *source, size_t destbuffersize ) ++{ ++ assert( destination != source ); ++ assert( destbuffersize > 0 ); ++ ++ char *dest = destination; ++ /* dest_stop is the last location that we can null-terminate the string */ ++ char *dest_stop = destination + (destbuffersize - 1); ++ ++ const char *src = source; ++ ++ while ( *src != '\0' && dest != dest_stop ) ++ { ++ const char c = *src; ++ if ( strchr( "\\()[]{}*+?|$^.", c ) != NULL ) ++ { ++ if( (dest + 1) == dest_stop ) ++ break; /* only proceed if we can write both c and the escape */ ++ ++ *dest = '\\'; ++ dest++; ++ } ++ *dest = c; ++ dest++; ++ ++ src++; ++ } ++ ++ *dest = '\0'; ++} ++ + /* BuildDeviceList(): + * + * The process of determining a list of PortAudio "devices" from +@@ -472,7 +505,12 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) + + const char **jack_ports = NULL; + char **client_names = NULL; +- char *regex_pattern = NULL; ++ char *port_regex_string = NULL; ++ char *device_name_regex_escaped = NULL; ++ // In the worst case scenario, every character would be escaped, doubling the string size. ++ // Add 1 for null terminator. ++ size_t device_name_regex_escaped_size = jack_client_name_size() * 2 + 1; ++ size_t port_regex_size = device_name_regex_escaped_size + strlen(port_regex_suffix); + int port_index, client_index, i; + double globalSampleRate; + regex_t port_regex; +@@ -490,7 +528,9 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) + * associated with the previous list */ + PaUtil_FreeAllAllocations( jackApi->deviceInfoMemory ); + +- regex_pattern = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, jack_client_name_size() + 3 ); ++ port_regex_string = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, port_regex_size ); ++ device_name_regex_escaped = PaUtil_GroupAllocateMemory( ++ jackApi->deviceInfoMemory, device_name_regex_escaped_size ); + tmp_client_name = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, jack_client_name_size() ); + + /* We can only retrieve the list of clients indirectly, by first +@@ -512,6 +552,7 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) + int client_seen = FALSE; + regmatch_t match_info; + const char *port = jack_ports[port_index]; ++ PA_DEBUG(( "JACK port found: %s\n", port )); + + /* extract the client name from the port name, using a regex + * that parses the clientname:portname syntax */ +@@ -584,11 +625,14 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) + + /* To determine how many input and output channels are available, + * we re-query jackd with more specific parameters. */ +- +- sprintf( regex_pattern, "%s:.*", client_names[client_index] ); ++ copy_string_and_escape_regex_chars( device_name_regex_escaped, ++ client_names[client_index], ++ device_name_regex_escaped_size ); ++ strncpy( port_regex_string, device_name_regex_escaped, port_regex_size ); ++ strncat( port_regex_string, port_regex_suffix, port_regex_size ); + + /* ... what are your output ports (that we could input from)? */ +- clientPorts = jack_get_ports( jackApi->jack_client, regex_pattern, ++ clientPorts = jack_get_ports( jackApi->jack_client, port_regex_string, + JACK_PORT_TYPE_FILTER, JackPortIsOutput); + curDevInfo->maxInputChannels = 0; + curDevInfo->defaultLowInputLatency = 0.; +@@ -609,7 +653,7 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) + } + + /* ... what are your input ports (that we could output to)? */ +- clientPorts = jack_get_ports( jackApi->jack_client, regex_pattern, ++ clientPorts = jack_get_ports( jackApi->jack_client, port_regex_string, + JACK_PORT_TYPE_FILTER, JackPortIsInput); + curDevInfo->maxOutputChannels = 0; + curDevInfo->defaultLowOutputLatency = 0.; +@@ -629,6 +673,11 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) + free(clientPorts); + } + ++ PA_DEBUG(( "Adding JACK device %s with %d input channels and %d output channels\n", ++ client_names[client_index], ++ curDevInfo->maxInputChannels, ++ curDevInfo->maxOutputChannels )); ++ + /* Add this client to the list of devices */ + commonApi->deviceInfos[client_index] = curDevInfo; + ++commonApi->info.deviceCount; +@@ -1080,8 +1129,13 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi, + PaJackHostApiRepresentation *jackHostApi = (PaJackHostApiRepresentation*)hostApi; + PaJackStream *stream = NULL; + char *port_string = PaUtil_GroupAllocateMemory( jackHostApi->deviceInfoMemory, jack_port_name_size() ); +- unsigned long regexSz = jack_client_name_size() + 3; +- char *regex_pattern = PaUtil_GroupAllocateMemory( jackHostApi->deviceInfoMemory, regexSz ); ++ // In the worst case every character would be escaped which would double the string length. ++ // Add 1 for null terminator ++ size_t regex_escaped_client_name_length = jack_client_name_size() * 2 + 1; ++ char *regex_escaped_client_name = PaUtil_GroupAllocateMemory( ++ jackHostApi->deviceInfoMemory, regex_escaped_client_name_length ); ++ unsigned long regex_size = jack_client_name_size() * 2 + 1 + strlen(port_regex_suffix); ++ char *regex_pattern = PaUtil_GroupAllocateMemory( jackHostApi->deviceInfoMemory, regex_size ); + const char **jack_ports = NULL; + /* int jack_max_buffer_size = jack_get_buffer_size( jackHostApi->jack_client ); */ + int i; +@@ -1239,7 +1293,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi, + int err = 0; + + /* Get output ports of our capture device */ +- snprintf( regex_pattern, regexSz, "%s:.*", hostApi->deviceInfos[ inputParameters->device ]->name ); ++ copy_string_and_escape_regex_chars( regex_escaped_client_name, ++ hostApi->deviceInfos[ inputParameters->device ]->name, ++ regex_escaped_client_name_length ); ++ strncpy( regex_pattern, regex_escaped_client_name, regex_size ); ++ strncat( regex_pattern, port_regex_suffix, regex_size ); + UNLESS( jack_ports = jack_get_ports( jackHostApi->jack_client, regex_pattern, + JACK_PORT_TYPE_FILTER, JackPortIsOutput ), paUnanticipatedHostError ); + for( i = 0; i < inputChannelCount && jack_ports[i]; i++ ) +@@ -1263,7 +1321,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi, + int err = 0; + + /* Get input ports of our playback device */ +- snprintf( regex_pattern, regexSz, "%s:.*", hostApi->deviceInfos[ outputParameters->device ]->name ); ++ copy_string_and_escape_regex_chars( regex_escaped_client_name, ++ hostApi->deviceInfos[ outputParameters->device ]->name, ++ regex_escaped_client_name_length ); ++ strncpy( regex_pattern, regex_escaped_client_name, regex_size ); ++ strncat( regex_pattern, port_regex_suffix, regex_size ); + UNLESS( jack_ports = jack_get_ports( jackHostApi->jack_client, regex_pattern, + JACK_PORT_TYPE_FILTER, JackPortIsInput ), paUnanticipatedHostError ); + for( i = 0; i < outputChannelCount && jack_ports[i]; i++ ) +@@ -1769,3 +1831,4 @@ PaError PaJack_GetClientName(const char** clientName) + error: + return result; + } ++ diff --git a/portaudio.spec b/portaudio.spec index 0dc19d2..7473187 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 33%{?dist} +Release: 34%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -11,6 +11,8 @@ Patch2: portaudio-pkgconfig-alsa.patch # Add some extra API needed by audacity # http://audacity.googlecode.com/svn/audacity-src/trunk/lib-src/portmixer/portaudio.patch Patch3: portaudio-audacity.patch +# Deal with pipewire jack identifiers containing chars which have special meanings in regexes +Patch4: portaudio-pipewire-jacknames.patch BuildRequires: make BuildRequires: doxygen @@ -41,10 +43,7 @@ portaudio library. %prep -%setup -q -n %{name} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%autosetup -p1 -n %{name} # Needed for patch3 autoreconf -i -f @@ -84,6 +83,10 @@ doxygen %changelog +* Mon Mar 22 2021 Hans de Goede - 19-34 +- Deal with pipewire jack identifiers containing chars which have special meanings in regexes + Resolves rhbz#1939749 + * Wed Jan 27 2021 Fedora Release Engineering - 19-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 5c1adf2a43eecf0206bba22d737b22738e293fe3 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Tue, 30 Mar 2021 14:25:47 +0200 Subject: [PATCH 53/59] Upgrade to pa_stable_v190700_20210406 - Upgraded the source package - Rebuilt the audacity patch based on the upgraded source package - Deleted obsolete portaudio-pipewire-jacknames.patch - Fixed a minor bug in the audacity patch that mixed up the alsa and oss build options (didn't matter, because we enable both of them) - Update sources file and replace MD5 with SHA512 hash --- portaudio-audacity.patch | 133 ++++++++++++-------- portaudio-pipewire-jacknames.patch | 194 ----------------------------- portaudio.spec | 11 +- sources | 2 +- 4 files changed, 89 insertions(+), 251 deletions(-) delete mode 100644 portaudio-pipewire-jacknames.patch diff --git a/portaudio-audacity.patch b/portaudio-audacity.patch index 9535f96..61883eb 100644 --- a/portaudio-audacity.patch +++ b/portaudio-audacity.patch @@ -1,6 +1,36 @@ -diff -wruN portaudio/include/pa_unix_oss.h portaudio-v19/include/pa_unix_oss.h ---- portaudio/include/pa_unix_oss.h 1969-12-31 18:00:00.000000000 -0600 -+++ portaudio-v19/include/pa_unix_oss.h 2012-12-14 22:34:14.290247100 -0600 +From 42dc9c90a703b8dd251d71389a7e6220a50a43a9 Mon Sep 17 00:00:00 2001 +From: Uwe Klotz +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 +#define PA_UNIX_OSS_H @@ -54,13 +84,14 @@ diff -wruN portaudio/include/pa_unix_oss.h portaudio-v19/include/pa_unix_oss.h +#endif + +#endif -diff -wruN portaudio/include/portaudio.h portaudio-v19/include/portaudio.h ---- portaudio/include/portaudio.h 2012-08-31 19:10:13.000000000 -0500 -+++ portaudio-v19/include/portaudio.h 2012-12-14 22:34:14.368247200 -0600 -@@ -1146,6 +1146,15 @@ +diff --git a/include/portaudio.h b/include/portaudio.h +index 5d84731..7660c8a 100644 +--- a/include/portaudio.h ++++ b/include/portaudio.h +@@ -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 @@ -71,27 +102,28 @@ diff -wruN portaudio/include/portaudio.h portaudio-v19/include/portaudio.h + + /* Miscellaneous utilities */ - - -diff -wruN portaudio/src/common/pa_front.c portaudio-v19/src/common/pa_front.c ---- portaudio/src/common/pa_front.c 2012-12-04 12:39:48.000000000 -0600 -+++ portaudio-v19/src/common/pa_front.c 2012-12-14 09:44:34.604344800 -0600 -@@ -1216,8 +1216,10 @@ + + +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 @@ 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" )); -@@ -1729,6 +1731,32 @@ - return result; +@@ -1771,6 +1773,34 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream ) } - + + +PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ) +{ + PaError error = PaUtil_ValidateStreamPointer( stream ); @@ -118,39 +150,46 @@ diff -wruN portaudio/src/common/pa_front.c portaudio-v19/src/common/pa_front.c + + return result; +} - ++ ++ PaError Pa_GetSampleSize( PaSampleFormat format ) { -diff -wruN portaudio/src/common/pa_stream.c portaudio-v19/src/common/pa_stream.c ---- portaudio/src/common/pa_stream.c 2008-02-15 01:50:33.000000000 -0600 -+++ portaudio-v19/src/common/pa_stream.c 2012-12-14 09:44:34.607345000 -0600 -@@ -93,6 +93,8 @@ + 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 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe streamRepresentation->streamInfo.inputLatency = 0.; streamRepresentation->streamInfo.outputLatency = 0.; streamRepresentation->streamInfo.sampleRate = 0.; + + streamRepresentation->hostApiType = 0; } - - -diff -wruN portaudio/src/common/pa_stream.h portaudio-v19/src/common/pa_stream.h ---- portaudio/src/common/pa_stream.h 2008-02-15 01:50:33.000000000 -0600 -+++ portaudio-v19/src/common/pa_stream.h 2012-12-14 09:44:34.610345200 -0600 -@@ -152,6 +152,7 @@ + + +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 @@ typedef struct PaUtilStreamRepresentation { PaStreamFinishedCallback *streamFinishedCallback; void *userData; PaStreamInfo streamInfo; + PaHostApiTypeId hostApiType; } PaUtilStreamRepresentation; - - -diff -wruN portaudio/src/hostapi/oss/pa_unix_oss.c portaudio-v19/src/hostapi/oss/pa_unix_oss.c ---- portaudio/src/hostapi/oss/pa_unix_oss.c 2011-05-02 12:07:11.000000000 -0500 -+++ portaudio-v19/src/hostapi/oss/pa_unix_oss.c 2012-12-14 09:44:34.625346000 -0600 -@@ -2028,3 +2028,26 @@ + + +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 +@@ -2050,3 +2050,29 @@ error: + return result; #endif } - ++ ++ +const char *PaOSS_GetStreamInputDevice( PaStream* s ) +{ + PaOssStream *stream = (PaOssStream*)s; @@ -163,6 +202,7 @@ diff -wruN portaudio/src/hostapi/oss/pa_unix_oss.c portaudio-v19/src/hostapi/oss + return NULL; +} + ++ +const char *PaOSS_GetStreamOutputDevice( PaStream* s ) +{ + PaOssStream *stream = (PaOssStream*)s; @@ -174,15 +214,6 @@ diff -wruN portaudio/src/hostapi/oss/pa_unix_oss.c portaudio-v19/src/hostapi/oss + + return NULL; +} -diff -up portaudio/configure.in~ portaudio/configure.in ---- portaudio/configure.in~ 2013-04-07 12:20:18.000000000 +0200 -+++ portaudio/configure.in 2013-05-04 15:14:14.356191153 +0200 -@@ -387,7 +387,7 @@ case "${host_os}" in - 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 - +-- +2.30.2 + diff --git a/portaudio-pipewire-jacknames.patch b/portaudio-pipewire-jacknames.patch deleted file mode 100644 index f9c1b59..0000000 --- a/portaudio-pipewire-jacknames.patch +++ /dev/null @@ -1,194 +0,0 @@ -From eec7bb739771381ab698a6a611d933bdd72cbd8f Mon Sep 17 00:00:00 2001 -From: Be -Date: Fri, 19 Mar 2021 12:51:31 -0500 -Subject: [PATCH] JACK PipeWire fixes (escape regex chars) (#504) - -This patch fixes a problem caused by special regex characters -appearing in the device names when using the Jack interface to PipeWire. - -It is uncommon for JACK ports to have any characters that need to -be escaped in a regex. jackd simply calls the audio interface -"system". However PipeWire uses the device name from ALSA for the -JACK port names. If this contains any special regex characters, -BuildDeviceList would find the device but determine it has 0 -input channels and 0 output channels. In my case, I have an RME -Babyface Pro which puts its serial number in parentheses: - -$ aplay -l -card 0: Pro70785713 [Babyface Pro (70785713)], device 0: USB Audio [USB Audio] - Subdevices: 1/1 - Subdevice #0: subdevice #0 ---- - src/hostapi/jack/pa_jack.c | 83 +++++++++++++++++++++++++++++++++----- - 1 file changed, 73 insertions(+), 10 deletions(-) - -diff --git a/src/hostapi/jack/pa_jack.c b/src/hostapi/jack/pa_jack.c -index 0dad24fb..88926f47 100644 ---- a/src/hostapi/jack/pa_jack.c -+++ b/src/hostapi/jack/pa_jack.c -@@ -76,6 +76,7 @@ - static pthread_t mainThread_; - static char *jackErr_ = NULL; - static const char* clientName_ = "PortAudio"; -+static const char* port_regex_suffix = ":.*"; - - #define STRINGIZE_HELPER(expr) #expr - #define STRINGIZE(expr) STRINGIZE_HELPER(expr) -@@ -451,6 +452,38 @@ BlockingWaitEmpty( PaStream *s ) - - /* ---- jack driver ---- */ - -+/* copy null terminated string source to destination, escaping regex characters with '\\' in the process */ -+static void copy_string_and_escape_regex_chars( char *destination, const char *source, size_t destbuffersize ) -+{ -+ assert( destination != source ); -+ assert( destbuffersize > 0 ); -+ -+ char *dest = destination; -+ /* dest_stop is the last location that we can null-terminate the string */ -+ char *dest_stop = destination + (destbuffersize - 1); -+ -+ const char *src = source; -+ -+ while ( *src != '\0' && dest != dest_stop ) -+ { -+ const char c = *src; -+ if ( strchr( "\\()[]{}*+?|$^.", c ) != NULL ) -+ { -+ if( (dest + 1) == dest_stop ) -+ break; /* only proceed if we can write both c and the escape */ -+ -+ *dest = '\\'; -+ dest++; -+ } -+ *dest = c; -+ dest++; -+ -+ src++; -+ } -+ -+ *dest = '\0'; -+} -+ - /* BuildDeviceList(): - * - * The process of determining a list of PortAudio "devices" from -@@ -472,7 +505,12 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) - - const char **jack_ports = NULL; - char **client_names = NULL; -- char *regex_pattern = NULL; -+ char *port_regex_string = NULL; -+ char *device_name_regex_escaped = NULL; -+ // In the worst case scenario, every character would be escaped, doubling the string size. -+ // Add 1 for null terminator. -+ size_t device_name_regex_escaped_size = jack_client_name_size() * 2 + 1; -+ size_t port_regex_size = device_name_regex_escaped_size + strlen(port_regex_suffix); - int port_index, client_index, i; - double globalSampleRate; - regex_t port_regex; -@@ -490,7 +528,9 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) - * associated with the previous list */ - PaUtil_FreeAllAllocations( jackApi->deviceInfoMemory ); - -- regex_pattern = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, jack_client_name_size() + 3 ); -+ port_regex_string = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, port_regex_size ); -+ device_name_regex_escaped = PaUtil_GroupAllocateMemory( -+ jackApi->deviceInfoMemory, device_name_regex_escaped_size ); - tmp_client_name = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, jack_client_name_size() ); - - /* We can only retrieve the list of clients indirectly, by first -@@ -512,6 +552,7 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) - int client_seen = FALSE; - regmatch_t match_info; - const char *port = jack_ports[port_index]; -+ PA_DEBUG(( "JACK port found: %s\n", port )); - - /* extract the client name from the port name, using a regex - * that parses the clientname:portname syntax */ -@@ -584,11 +625,14 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) - - /* To determine how many input and output channels are available, - * we re-query jackd with more specific parameters. */ -- -- sprintf( regex_pattern, "%s:.*", client_names[client_index] ); -+ copy_string_and_escape_regex_chars( device_name_regex_escaped, -+ client_names[client_index], -+ device_name_regex_escaped_size ); -+ strncpy( port_regex_string, device_name_regex_escaped, port_regex_size ); -+ strncat( port_regex_string, port_regex_suffix, port_regex_size ); - - /* ... what are your output ports (that we could input from)? */ -- clientPorts = jack_get_ports( jackApi->jack_client, regex_pattern, -+ clientPorts = jack_get_ports( jackApi->jack_client, port_regex_string, - JACK_PORT_TYPE_FILTER, JackPortIsOutput); - curDevInfo->maxInputChannels = 0; - curDevInfo->defaultLowInputLatency = 0.; -@@ -609,7 +653,7 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) - } - - /* ... what are your input ports (that we could output to)? */ -- clientPorts = jack_get_ports( jackApi->jack_client, regex_pattern, -+ clientPorts = jack_get_ports( jackApi->jack_client, port_regex_string, - JACK_PORT_TYPE_FILTER, JackPortIsInput); - curDevInfo->maxOutputChannels = 0; - curDevInfo->defaultLowOutputLatency = 0.; -@@ -629,6 +673,11 @@ static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi ) - free(clientPorts); - } - -+ PA_DEBUG(( "Adding JACK device %s with %d input channels and %d output channels\n", -+ client_names[client_index], -+ curDevInfo->maxInputChannels, -+ curDevInfo->maxOutputChannels )); -+ - /* Add this client to the list of devices */ - commonApi->deviceInfos[client_index] = curDevInfo; - ++commonApi->info.deviceCount; -@@ -1080,8 +1129,13 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi, - PaJackHostApiRepresentation *jackHostApi = (PaJackHostApiRepresentation*)hostApi; - PaJackStream *stream = NULL; - char *port_string = PaUtil_GroupAllocateMemory( jackHostApi->deviceInfoMemory, jack_port_name_size() ); -- unsigned long regexSz = jack_client_name_size() + 3; -- char *regex_pattern = PaUtil_GroupAllocateMemory( jackHostApi->deviceInfoMemory, regexSz ); -+ // In the worst case every character would be escaped which would double the string length. -+ // Add 1 for null terminator -+ size_t regex_escaped_client_name_length = jack_client_name_size() * 2 + 1; -+ char *regex_escaped_client_name = PaUtil_GroupAllocateMemory( -+ jackHostApi->deviceInfoMemory, regex_escaped_client_name_length ); -+ unsigned long regex_size = jack_client_name_size() * 2 + 1 + strlen(port_regex_suffix); -+ char *regex_pattern = PaUtil_GroupAllocateMemory( jackHostApi->deviceInfoMemory, regex_size ); - const char **jack_ports = NULL; - /* int jack_max_buffer_size = jack_get_buffer_size( jackHostApi->jack_client ); */ - int i; -@@ -1239,7 +1293,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi, - int err = 0; - - /* Get output ports of our capture device */ -- snprintf( regex_pattern, regexSz, "%s:.*", hostApi->deviceInfos[ inputParameters->device ]->name ); -+ copy_string_and_escape_regex_chars( regex_escaped_client_name, -+ hostApi->deviceInfos[ inputParameters->device ]->name, -+ regex_escaped_client_name_length ); -+ strncpy( regex_pattern, regex_escaped_client_name, regex_size ); -+ strncat( regex_pattern, port_regex_suffix, regex_size ); - UNLESS( jack_ports = jack_get_ports( jackHostApi->jack_client, regex_pattern, - JACK_PORT_TYPE_FILTER, JackPortIsOutput ), paUnanticipatedHostError ); - for( i = 0; i < inputChannelCount && jack_ports[i]; i++ ) -@@ -1263,7 +1321,11 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi, - int err = 0; - - /* Get input ports of our playback device */ -- snprintf( regex_pattern, regexSz, "%s:.*", hostApi->deviceInfos[ outputParameters->device ]->name ); -+ copy_string_and_escape_regex_chars( regex_escaped_client_name, -+ hostApi->deviceInfos[ outputParameters->device ]->name, -+ regex_escaped_client_name_length ); -+ strncpy( regex_pattern, regex_escaped_client_name, regex_size ); -+ strncat( regex_pattern, port_regex_suffix, regex_size ); - UNLESS( jack_ports = jack_get_ports( jackHostApi->jack_client, regex_pattern, - JACK_PORT_TYPE_FILTER, JackPortIsInput ), paUnanticipatedHostError ); - for( i = 0; i < outputChannelCount && jack_ports[i]; i++ ) -@@ -1769,3 +1831,4 @@ PaError PaJack_GetClientName(const char** clientName) - error: - return result; - } -+ diff --git a/portaudio.spec b/portaudio.spec index 7473187..49a0c35 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,18 +1,16 @@ Name: portaudio Version: 19 -Release: 34%{?dist} +Release: 35%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ -Source0: http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz +Source0: http://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz Patch1: portaudio-doxynodate.patch Patch2: portaudio-pkgconfig-alsa.patch # Add some extra API needed by audacity # http://audacity.googlecode.com/svn/audacity-src/trunk/lib-src/portmixer/portaudio.patch Patch3: portaudio-audacity.patch -# Deal with pipewire jack identifiers containing chars which have special meanings in regexes -Patch4: portaudio-pipewire-jacknames.patch BuildRequires: make BuildRequires: doxygen @@ -67,7 +65,7 @@ doxygen %files %license LICENSE.txt -%doc README.txt +%doc README.md %{_libdir}/*.so.* %files devel @@ -83,6 +81,9 @@ doxygen %changelog +* Tue Apr 06 2021 Uwe Klotz - 19-35 +- rebuilt + * Mon Mar 22 2021 Hans de Goede - 19-34 - Deal with pipewire jack identifiers containing chars which have special meanings in regexes Resolves rhbz#1939749 diff --git a/sources b/sources index 95b8093..2d5630c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7f220406902af9dca009668e198cbd23 pa_stable_v19_20140130.tgz +77393bf0628ad9c9d5fb1b0d9b1732d403e23513b1332553964bdafcc80878b2798141011d2615688150d753a594285e718cf716e990b2396f1d8dea7babd02d pa_stable_v190700_20210406.tgz From e91f84eddddcdfa73012110ad38dbe73c5b67a5e Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Tue, 6 Apr 2021 22:06:41 +0200 Subject: [PATCH 54/59] Update changelog --- portaudio.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 49a0c35..91a0f5d 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -82,7 +82,7 @@ doxygen %changelog * Tue Apr 06 2021 Uwe Klotz - 19-35 -- rebuilt +- Upgrade to pa_stable_v190700_20210406 * Mon Mar 22 2021 Hans de Goede - 19-34 - Deal with pipewire jack identifiers containing chars which have special meanings in regexes From 18d83c6ffc4bd3c3abca9a25ad7125f94fa0d625 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 12 Apr 2021 09:47:18 +0200 Subject: [PATCH 55/59] Fix sources format --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 71cbb36..142386a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ pa_stable_v19_20071207.tar.gz /pa_snapshot.tgz /pa_stable_v19_20140130.tgz +/pa_stable_v190700_20210406.tgz diff --git a/sources b/sources index 2d5630c..e1753c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -77393bf0628ad9c9d5fb1b0d9b1732d403e23513b1332553964bdafcc80878b2798141011d2615688150d753a594285e718cf716e990b2396f1d8dea7babd02d pa_stable_v190700_20210406.tgz +SHA512 (pa_stable_v190700_20210406.tgz) = 77393bf0628ad9c9d5fb1b0d9b1732d403e23513b1332553964bdafcc80878b2798141011d2615688150d753a594285e718cf716e990b2396f1d8dea7babd02d From 072e8c42d7725bb5fbf2f3dc155dec184bde8bd2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 4 May 2021 21:07:41 +0200 Subject: [PATCH 56/59] Fix FTBFS with upcoming autoconf-2.71 (rhbz#1943118) --- portaudio.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index 91a0f5d..b75cf47 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 35%{?dist} +Release: 36%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -44,6 +44,8 @@ portaudio library. %autosetup -p1 -n %{name} # Needed for patch3 autoreconf -i -f +# With autoconf-2.71 we need to run this twice for things to work ?? (rhbz#1943118) +autoreconf -i -f %build @@ -81,6 +83,9 @@ doxygen %changelog +* Tue May 04 2021 Hans de Goede - 19-36 +- Fix FTBFS with upcoming autoconf-2.71 (rhbz#1943118) + * Tue Apr 06 2021 Uwe Klotz - 19-35 - Upgrade to pa_stable_v190700_20210406 From 3d8b1d1e2eaaee1e41fc694031bca2517dd34947 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 03:54:08 +0000 Subject: [PATCH 57/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index b75cf47..c95d17f 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 36%{?dist} +Release: 37%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -83,6 +83,9 @@ doxygen %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 19-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue May 04 2021 Hans de Goede - 19-36 - Fix FTBFS with upcoming autoconf-2.71 (rhbz#1943118) From 3be168a0bb680ca8ff32cf35b59a3428974128c5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 09:17:19 +0000 Subject: [PATCH 58/59] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- portaudio.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portaudio.spec b/portaudio.spec index c95d17f..236b4c3 100644 --- a/portaudio.spec +++ b/portaudio.spec @@ -1,6 +1,6 @@ Name: portaudio Version: 19 -Release: 37%{?dist} +Release: 38%{?dist} Summary: Free, cross platform, open-source, audio I/O library License: MIT URL: http://www.portaudio.com/ @@ -83,6 +83,9 @@ doxygen %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 19-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 19-37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 5a5e23c443c4380d66b4e1950fdea0c33d91ecc2 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 30 Oct 2023 23:46:40 +0300 Subject: [PATCH 59/59] Remove unnecessary files --- sources | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sources diff --git a/sources b/sources deleted file mode 100644 index e1753c0..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (pa_stable_v190700_20210406.tgz) = 77393bf0628ad9c9d5fb1b0d9b1732d403e23513b1332553964bdafcc80878b2798141011d2615688150d753a594285e718cf716e990b2396f1d8dea7babd02d