ca0c18
32acd5
Name:           webrtc-audio-processing
ca0c18
Version:        0.3
ca0c18
Release:        1%{?dist}
32acd5
Summary:        Library for echo cancellation
32acd5
32acd5
License:        BSD
32acd5
URL:            http://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/
32acd5
Source0:        http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/%{name}-%{version}.tar.xz
ca0c18
998f3c
Patch0:         webrtc-fix-typedefs-on-other-arches.patch
ca0c18
# WIP to only explicitly add -mfpu=neon where needed for neon runtime detection
ca0c18
# currently doesn't work due to %%configure injecting incompatible CFLAGS atm, see below
ca0c18
Patch1:         webrtc-audio-processing-0.3-neon.patch
ca0c18
# bz#1336466, https://bugs.freedesktop.org/show_bug.cgi?id=95738
ca0c18
Patch4:         webrtc-audio-processing-0.2-big-endian.patch
ca0c18
ca0c18
BuildRequires: automake libtool
32acd5
32acd5
%description
32acd5
%{name} is a library derived from Google WebRTC project that 
32acd5
provides echo cancellation functionality. This library is used by for example
32acd5
PulseAudio to provide echo cancellation.
32acd5
32acd5
%package        devel
32acd5
Summary:        Development files for %{name}
32acd5
Requires:       %{name}%{?_isa} = %{version}-%{release}
32acd5
32acd5
%description    devel
32acd5
The %{name}-devel package contains libraries and header
32acd5
files for developing applications that use %{name}.
32acd5
32acd5
%prep
32acd5
%setup -q
998f3c
%patch0 -p1 -b .typedef
ca0c18
%patch1 -p1 -b .neon
ca0c18
%patch4 -p1 -b .bigendian
ca0c18
ca0c18
# for patch1
ca0c18
autoreconf -fi
ca0c18
32acd5
32acd5
%build
ca0c18
ca0c18
%ifarch %{arm}
ca0c18
# disable neon support
ca0c18
# can't unconditionally enable neon, and --enable-neon=runtime is broken (WebRtc_GetCPUFeaturesARM is unimplemented)
ca0c18
%global neon --enable-neon=no
ca0c18
## hack to ensure -mfpu=neon flag appears last when using --enable-neon=yes|runtime
ca0c18
#export CFLAGS="%{optflags} -mfpu=neon"
ca0c18
#export CXXFLAGS="%{optflags} -mfpu=neon"
ca0c18
## except that enables it for *all* objects, not just the ones we want (see patch1),
ca0c18
## seems CFLAGS always trumps project flags, see also:
ca0c18
## http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
ca0c18
%endif
ca0c18
ca0c18
%configure \
ca0c18
  %{?neon} \
ca0c18
  --disable-silent-rules \
32acd5
  --disable-static
ca0c18
32acd5
make %{?_smp_mflags}
32acd5
32acd5
32acd5
%install
ca0c18
make install DESTDIR=%{buildroot} INSTALL="install -p"
32acd5
ca0c18
## unpackaged files
ca0c18
rm -fv %{buildroot}%{_libdir}/lib*.la
32acd5
32acd5
%post -p /sbin/ldconfig
32acd5
%postun -p /sbin/ldconfig
32acd5
32acd5
32acd5
%files
ca0c18
%doc NEWS AUTHORS README.md
ca0c18
%license COPYING
ca0c18
%{_libdir}/libwebrtc_audio_processing.so.1*
32acd5
32acd5
%files devel
32acd5
%{_libdir}/libwebrtc_audio_processing.so
ca0c18
%{_libdir}/pkgconfig/webrtc-audio-processing.pc
32acd5
%{_includedir}/webrtc_audio_processing/
32acd5
32acd5
32acd5
%changelog
ca0c18
* Mon Jul 18 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.3-1
ca0c18
- 0.3
ca0c18
ca0c18
* Fri May 27 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-7
ca0c18
- better/upstreamable x86_msse2.patch
ca0c18
ca0c18
* Fri May 27 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-6
ca0c18
- simpler/upstreamable no_undefined.patch (fdo#96244)
ca0c18
ca0c18
* Wed May 25 2016 Than Ngo <than@redhat.com> - 0.2-5
ca0c18
- add url to upstream bug report
ca0c18
ca0c18
* Tue May 24 2016 Than Ngo <than@redhat.com> - 0.2-4
ca0c18
- add support big endian
ca0c18
ca0c18
* Mon May 16 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-3
ca0c18
- ExclusiveArch primary archs, FTBFS on big endian arches (#1336466)
ca0c18
ca0c18
* Mon May 16 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-2
ca0c18
- link w/ --no-undefined
ca0c18
- fix x86 sse2 runtime detection
ca0c18
ca0c18
* Thu May 12 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-1
ca0c18
- webrtc-audio-processing-0.2 (#1335536)
ca0c18
- %%files: track ABI/API closer
ca0c18
ca0c18
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-11
ca0c18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ca0c18
ca0c18
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-10
ca0c18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ca0c18
ca0c18
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.1-9
ca0c18
- Rebuilt for GCC 5 C++11 ABI change
ca0c18
ca0c18
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-8
ca0c18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ca0c18
ca0c18
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-7
ca0c18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ca0c18
998f3c
* Wed Feb 26 2014 Debarshi Ray <rishi@fedoraproject.org> - 0.1-5
998f3c
- Fix FTBFS on non-x86/arm
998f3c
  Resolves: #1068823
998f3c
ca0c18
* Tue Jan 28 2014 Kyle McMartin <kyle@fedoraproject.org> - 0.1-6
ca0c18
- webrtc-fix-typedefs-on-other-arches.patch: fix ftbfs on non-x86/arm due to
ca0c18
  a build #error in typedefs.h, however, the defines are not used anywhere in
ca0c18
  the code. Fixes build on ppc{,64}, s390x, and aarch64.
ca0c18
998f3c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.1-4
998f3c
- Mass rebuild 2013-12-27
998f3c
ca0c18
* Thu Jul 11 2013 Debarshi Ray <rishi@fedoraproject.org> 0.1-4
ca0c18
- Rebuilt to fix broken binary possibly caused by broken toolchain
ca0c18
32acd5
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-3
32acd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
32acd5
32acd5
* Tue Oct 9 2012 Dan HorĂ¡k <dan[at]danny.cz> 0.1-2
32acd5
- set ExclusiveArch x86 and ARM for now
32acd5
32acd5
* Fri Oct 5 2012 Christian Schaller <christian.schaller@gmail.com> 0.1-1
32acd5
- Initial Fedora spec.