diff --git a/common/shlibs b/common/shlibs index 97358441af5..131fbb19ebc 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1057,7 +1057,8 @@ libiptcdata.so.0 libiptcdata-1.0.4_1 libutempter.so.0 libutempter-1.1.5_1 libxatracker.so.2 libxatracker-10.0.0_2 libtumbler-1.so.0 tumbler-4.9.2_1 -libwebrtc_audio_processing.so.1 webrtc-audio-processing-0.3_1 +libwebrtc-audio-coding-1.so.3 webrtc-audio-processing-1.3_1 +libwebrtc-audio-processing-1.so.3 webrtc-audio-processing-1.3_1 libcupsmime.so.1 libcups-1.5.3_1 libcupsppdc.so.1 libcups-1.5.3_1 libcupscgi.so.1 libcups-1.5.3_1 diff --git a/srcpkgs/webrtc-audio-processing/patches/Add-generic-byte-order-and-pointer-size-detection.patch b/srcpkgs/webrtc-audio-processing/patches/Add-generic-byte-order-and-pointer-size-detection.patch index 1338784e69e..28f1dbdcd86 100644 --- a/srcpkgs/webrtc-audio-processing/patches/Add-generic-byte-order-and-pointer-size-detection.patch +++ b/srcpkgs/webrtc-audio-processing/patches/Add-generic-byte-order-and-pointer-size-detection.patch @@ -1,20 +1,20 @@ -From: Than -Date: Wed, 8 Jun 2016 19:10:08 -0400 -Subject: Add generic byte order and pointer size detection +Taken from https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-Add-generic-byte-order-and-pointer-size-detection.patch?id=29cd0e622b574df6adff5704ab4e220709619767 +https://bugs.gentoo.org/917493 +https://sources.debian.org/src/webrtc-audio-processing/1.0-0.2/debian/patches/Add-generic-byte-order-and-pointer-size-detection.patch/ +Description: Add generic byte order and pointer size detection +Author: Than +Origin: https://bugs.freedesktop.org/show_bug.cgi?id=95738#c4 +Last-Update: 2022-02-01 --- - webrtc/typedefs.h | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h -index d875490..dc074f1 100644 ---- a/webrtc/typedefs.h -+++ b/webrtc/typedefs.h -@@ -48,7 +48,19 @@ +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/webrtc/rtc_base/system/arch.h ++++ b/webrtc/rtc_base/system/arch.h +@@ -58,7 +58,19 @@ #define WEBRTC_ARCH_32_BITS #define WEBRTC_ARCH_LITTLE_ENDIAN #else --#error Please add support for your architecture in typedefs.h +-#error Please add support for your architecture in rtc_base/system/arch.h +/* instead of failing, use typical unix defines... */ +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define WEBRTC_ARCH_LITTLE_ENDIAN diff --git a/srcpkgs/webrtc-audio-processing/patches/i686-no-sse.patch b/srcpkgs/webrtc-audio-processing/patches/i686-no-sse.patch new file mode 100644 index 00000000000..de145af2083 --- /dev/null +++ b/srcpkgs/webrtc-audio-processing/patches/i686-no-sse.patch @@ -0,0 +1,15 @@ +Taken from https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-x86-no-sse.patch?id=29cd0e622b574df6adff5704ab4e220709619767 +https://bugs.gentoo.org/921140 +https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5 +--- a/webrtc/rtc_base/system/arch.h ++++ b/webrtc/rtc_base/system/arch.h +@@ -34,7 +34,7 @@ + #else + #define WEBRTC_ARCH_32_BITS + #endif +-#elif defined(_M_IX86) || defined(__i386__) ++#elif defined(__SSE__) && (defined(_M_IX86) || defined(__i386__)) + #define WEBRTC_ARCH_X86_FAMILY + #define WEBRTC_ARCH_X86 + #define WEBRTC_ARCH_32_BITS + diff --git a/srcpkgs/webrtc-audio-processing/patches/mips.patch b/srcpkgs/webrtc-audio-processing/patches/mips.patch deleted file mode 100644 index c99aaf39220..00000000000 --- a/srcpkgs/webrtc-audio-processing/patches/mips.patch +++ /dev/null @@ -1,113 +0,0 @@ ---- webrtc-audio-processing-0.3_3/configure.ac 2017-11-22 20:26:54.207009881 +0100 -+++ webrtc-audio-processing-0.3_3/configure.ac 2017-11-22 20:37:57.472996521 +0100 -@@ -90,10 +90,14 @@ - [HAVE_NEON=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64"]) - AC_CHECK_DECLS([__i386__], [HAVE_X86=1]) - AC_CHECK_DECLS([__x86_64__], [HAVE_X86=1]) -+AC_CHECK_DECLS([__MIPSEB__], [HAVE_MIPSEB=1]) -+AC_CHECK_DECLS([__MIPSEL__], [HAVE_MIPSEL=1]) - - AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"]) - AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"]) - AM_CONDITIONAL(HAVE_ARMV7, [test "x${HAVE_ARMV7}" = "x1"]) -+AM_CONDITIONAL(HAVE_MIPSEB, [test "x${HAVE_MIPSEB}" = "x1"]) -+AM_CONDITIONAL(HAVE_MIPSEL, [test "x${HAVE_MIPSEL}" = "x1"]) - - # Borrowed from pulseaudio's configure.ac - AC_ARG_ENABLE([neon], ---- webrtc-audio-processing-0.3_3/webrtc/typedefs.h 2015-10-15 12:48:25.000000000 +0200 -+++ webrtc-audio-processing-0.3_3/webrtc/typedefs.h 2017-11-22 20:39:20.800994843 +0100 -@@ -47,6 +47,10 @@ - #elif defined(__pnacl__) - #define WEBRTC_ARCH_32_BITS - #define WEBRTC_ARCH_LITTLE_ENDIAN -+#elif defined(__MIPSEL__) -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#elif defined(__MIPSEB__) -+#define WEBRTC_ARCH_BIG_ENDIAN - #else - #error Please add support for your architecture in typedefs.h - #endif ---- webrtc-audio-processing-0.3/webrtc/common_audio/wav_file.cc 2015-11-19 13:41:44.000000000 +0100 -+++ webrtc-audio-processing-0.3/webrtc/common_audio/wav_file.cc 2017-11-22 21:01:46.554967737 +0100 -@@ -64,9 +64,6 @@ - } - - size_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) { --#ifndef WEBRTC_ARCH_LITTLE_ENDIAN --#error "Need to convert samples to big-endian when reading from WAV file" --#endif - // There could be metadata after the audio; ensure we don't read it. - num_samples = std::min(rtc::checked_cast(num_samples), - num_samples_remaining_); -@@ -76,6 +73,12 @@ - RTC_CHECK(read == num_samples || feof(file_handle_)); - RTC_CHECK_LE(read, num_samples_remaining_); - num_samples_remaining_ -= rtc::checked_cast(read); -+#ifdef WEBRTC_ARCH_BIG_ENDIAN -+ for (size_t i = 0; i < read; i++) { -+ uint16_t s = static_cast(samples[i]); -+ samples[i] = static_cast((s >> 8) | (s << 8)); -+ } -+#endif - return read; - } - -@@ -119,11 +122,20 @@ - } - - void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) { --#ifndef WEBRTC_ARCH_LITTLE_ENDIAN --#error "Need to convert samples to little-endian when writing to WAV file" --#endif -+#ifdef WEBRTC_ARCH_LITTLE_ENDIAN - const size_t written = - fwrite(samples, sizeof(*samples), num_samples, file_handle_); -+#else -+ size_t written = 0; -+ for (size_t i = 0; i < num_samples; i++) { -+ uint16_t s = static_cast(samples[i]); -+ s = static_cast((s<<8) | (s>>8)); -+ size_t size = fwrite(&s, sizeof(s), 1, file_handle_); -+ if (size < 1) -+ break; -+ written += size; -+ } -+#endif - RTC_CHECK_EQ(num_samples, written); - num_samples_ += static_cast(written); - RTC_CHECK(written <= std::numeric_limits::max() || ---- webrtc-audio-processing-0.3/webrtc/common_audio/wav_header.cc 2015-10-15 12:48:44.000000000 +0200 -+++ webrtc-audio-processing-0.3/webrtc/common_audio/wav_header.cc 2017-11-22 21:11:36.291955859 +0100 -@@ -129,7 +129,30 @@ - return std::string(reinterpret_cast(&x), 4); - } - #else --#error "Write be-to-le conversion functions" -+static inline void WriteLE16(uint16_t* f, uint16_t x) { *f = (x >> 8) | (x << 8); } -+static inline void WriteLE32(uint32_t* f, uint32_t x) { -+ *f = ((x & 0xff000000) >> 24) | -+ ((x & 0x00ff0000) >> 8) | -+ ((x & 0x0000ff00) << 8) | -+ ((x & 0x000000ff) << 24); -+} -+static inline void WriteFourCC(uint32_t* f, char a, char b, char c, char d) { -+ *f = (static_cast(a) << 24) -+ | (static_cast(b) << 16) -+ | (static_cast(c) << 8) -+ | static_cast(d); -+} -+static inline uint16_t ReadLE16(uint16_t x) { return (x >> 8) | (x << 8); } -+static inline uint32_t ReadLE32(uint32_t x) { -+ return ((x << 24) & 0xff000000) | -+ ((x << 8) & 0x00ff0000) | -+ ((x >> 8) & 0x0000ff00) | -+ ((x >> 24) & 0x000000ff); -+} -+static inline std::string ReadFourCC(uint32_t x) { -+ uint32_t s = ReadLE32(x); -+ return std::string(reinterpret_cast(&s), 4); -+} - #endif - - static inline uint32_t RiffChunkSize(uint32_t bytes_in_payload) { diff --git a/srcpkgs/webrtc-audio-processing/patches/musl.patch b/srcpkgs/webrtc-audio-processing/patches/musl.patch index adca79b6b74..335a449686b 100644 --- a/srcpkgs/webrtc-audio-processing/patches/musl.patch +++ b/srcpkgs/webrtc-audio-processing/patches/musl.patch @@ -1,20 +1,33 @@ ---- a/webrtc/base/checks.cc.orig 2016-06-25 07:47:34.099515548 +0200 -+++ b/webrtc/base/checks.cc 2016-06-25 07:48:28.554122463 +0200 -@@ -16,7 +16,7 @@ - #include - #include +https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/37 +(see also https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/38) + +From de1b9c444df1ed66d72a4ab3d0e4dd2151037934 Mon Sep 17 00:00:00 2001 +From: Markus Volk +Date: Thu, 14 Sep 2023 16:12:32 +0200 +Subject: [PATCH] file_wrapper.h: add missing include for musl + +this fixes: +| In file included from ../webrtc-audio-processing-1.3/webrtc/rtc_base/system/file_wrapper.cc:11: +| ../webrtc-audio-processing-1.3/webrtc/rtc_base/system/file_wrapper.h:86:21: error: 'int64_t' has not been declared + +if built with musl libc + +Signed-off-by: Markus Volk +--- + webrtc/rtc_base/system/file_wrapper.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/webrtc/rtc_base/system/file_wrapper.h b/webrtc/rtc_base/system/file_wrapper.h +index 42c463c..c34d366 100644 +--- a/webrtc/rtc_base/system/file_wrapper.h ++++ b/webrtc/rtc_base/system/file_wrapper.h +@@ -13,6 +13,7 @@ --#if defined(__GLIBCXX__) && !defined(__UCLIBC__) -+#if defined(__GLIBC__) && defined(__GLIBCXX__) - #include - #include - #endif -@@ -55,7 +55,7 @@ void PrintError(const char* format, ...) - // to get usable symbols on Linux. This is copied from V8. Chromium has a more - // advanced stace trace system; also more difficult to copy. - void DumpBacktrace() { --#if defined(__GLIBCXX__) && !defined(__UCLIBC__) -+#if defined(__GLIBC__) && defined(__GLIBCXX__) - void* trace[100]; - int size = backtrace(trace, sizeof(trace) / sizeof(*trace)); - char** symbols = backtrace_symbols(trace, size); + #include + #include ++#include + + #include + +-- +GitLab diff --git a/srcpkgs/webrtc-audio-processing/template b/srcpkgs/webrtc-audio-processing/template index 30a420b28f5..e5277d17e0b 100644 --- a/srcpkgs/webrtc-audio-processing/template +++ b/srcpkgs/webrtc-audio-processing/template @@ -1,38 +1,33 @@ # Template file for 'webrtc-audio-processing' pkgname=webrtc-audio-processing -version=0.3.1 +version=1.3 revision=1 -build_style=gnu-configure -hostmakedepends="automake libtool" +build_style=meson +hostmakedepends="pkg-config" +makedepends="abseil-cpp-devel" short_desc="AudioProcessing library based on Google's implementation of WebRTC" maintainer="Orphaned " license="BSD-3-Clause" -homepage="http://freedesktop.org/software/pulseaudio/webrtc-audio-processing" -distfiles="${homepage}/${pkgname}-${version}.tar.xz" -checksum=a0fdd938fd85272d67e81572c5a4d9e200a0c104753cb3c209ded175ce3c5dbf +homepage="https://freedesktop.org/software/pulseaudio/webrtc-audio-processing" +distfiles="${FREEDESKTOP_SITE}/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-${version}.tar.gz" +checksum=95552fc17faa0202133707bbb3727e8c2cf64d4266fe31bfdb2298d769c1db75 -case "$XBPS_TARGET_MACHINE" in - # Disable neon for the arm* architectures - arm*) configure_args+=" --enable-neon=no" ;; -esac - -pre_configure() { - # Remove failing statement PKG_CHECK_MODULE(GNUSTL, gnustl) - sed -i configure.ac -e'/if test "x$with_gnustl" != "xno"; then/,+2d' - autoreconf -fi -} +# Upstream issue: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5 +if [ "$XBPS_MACHINE" = "i686" ]; then + CXXFLAGS="-DPFFFT_SIMD_DISABLE=1" + CFLAGS="-DPFFFT_SIMD_DISABLE=1" +fi post_install() { vlicense COPYING } webrtc-audio-processing-devel_package() { - depends="${sourcepkg}>=${version}_${revision}" + depends="${sourcepkg}>=${version}_${revision} abseil-cpp-devel" short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/lib/pkgconfig - vmove "usr/lib/*.a" vmove "usr/lib/*.so" } }