fix build on arm archs; disable static library build [release 0.3.1-2mamba;Thu Sep 01 2022]

This commit is contained in:
Silvan Calarco 2024-01-05 19:13:23 +01:00
parent 8c28e27502
commit a08a2f4529
3 changed files with 113 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# webrtc-audio-processing
FreeDesktop implementation of the Audio Processing module from the WebRTC project.

View File

@ -0,0 +1,24 @@
diff -up webrtc-audio-processing-0.2/webrtc/typedefs.h.typedef webrtc-audio-processing-0.2/webrtc/typedefs.h
--- webrtc-audio-processing-0.2/webrtc/typedefs.h.typedef 2016-05-12 09:08:53.885000410 -0500
+++ webrtc-audio-processing-0.2/webrtc/typedefs.h 2016-05-12 09:12:38.006851953 -0500
@@ -48,7 +48,19 @@
#define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
#else
-#error Please add support for your architecture in typedefs.h
+/* instead of failing, use typical unix defines... */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WEBRTC_ARCH_BIG_ENDIAN
+#else
+#error __BYTE_ORDER__ is not defined
+#endif
+#if defined(__LP64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
#endif
#if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN))

View File

@ -0,0 +1,87 @@
Name: webrtc-audio-processing
Version: 0.3.1
Release: 2mamba
Summary: FreeDesktop implementation of the Audio Processing module from the WebRTC project
Group: Applications/Multimedia
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/
Source: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing.git/v%{version}/webrtc-audio-processing-%{version}.tar.bz2
Patch0: webrtc-audio-processing-0.3.1-fix-typedefs-on-other-arches.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
FreeDesktop implementation of the Audio Processing module from the WebRTC project.
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: pkg-config
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q
%patch0 -p1 -b .fix-typedefs-on-other-arches
NOCONFIGURE=1 ./autogen.sh
%build
%configure \
%ifarch %{arm} aarch64
--enable-neon=no \
%endif
--disable-silent-rules \
--disable-static
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%files -n lib%{name}
%defattr(-,root,root)
%{_libdir}/libwebrtc_audio_processing.so.*
%doc AUTHORS COPYING
%files -n lib%{name}-devel
%defattr(-,root,root)
%dir %{_includedir}/webrtc_audio_processing
%{_includedir}/webrtc_audio_processing/*
%{_libdir}/libwebrtc_audio_processing.la
%{_libdir}/libwebrtc_audio_processing.so
%{_libdir}/pkgconfig/webrtc-audio-processing.pc
%doc NEWS README README.md
%changelog
* Thu Sep 01 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.3.1-2mamba
- fix build on arm archs; disable static library build
* Thu Sep 01 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.3.1-1mamba
- package created using the webbuild interface