From e1f32894934624a349a4877d85792744956ff74e Mon Sep 17 00:00:00 2001 From: Jingyun Hua Date: Mon, 14 Nov 2022 08:37:58 +0000 Subject: [PATCH] Add support loongarch64 Signed-off-by: Jingyun Hua --- webrtc-audio-processing.spec | 9 +++++++-- webrtc-fix-typedefs-on-other-arches.patch | 24 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 webrtc-fix-typedefs-on-other-arches.patch diff --git a/webrtc-audio-processing.spec b/webrtc-audio-processing.spec index ff08d6f..90c08ca 100644 --- a/webrtc-audio-processing.spec +++ b/webrtc-audio-processing.spec @@ -1,6 +1,6 @@ Name: webrtc-audio-processing Version: 1.0 -Release: 3 +Release: 4 Summary: Real-Time Communication Library for Web Browsers License: BSD and MIT URL: https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/ @@ -8,7 +8,9 @@ Source0: https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/%{n # fix building failed Patch6000: Backport-Use-cmake-to-look-up-abseil-dependency.patch - +%ifarch loongarch64 +Patch0001: webrtc-fix-typedefs-on-other-arches.patch +%endif BuildRequires: autoconf automake libtool gcc gcc-c++ BuildRequires: meson abseil-cpp-devel cmake Requires: abseil-cpp @@ -57,6 +59,9 @@ Header files for webrtc-audio-processing %doc NEWS %changelog +* Mon Nov 14 2022 huajingyun - 1.0-4 +- Add support of loongarch64 + * Fri Mar 25 2022 wangkerong - 1.0-3 - remove self-dependency diff --git a/webrtc-fix-typedefs-on-other-arches.patch b/webrtc-fix-typedefs-on-other-arches.patch new file mode 100644 index 0000000..19ad99c --- /dev/null +++ b/webrtc-fix-typedefs-on-other-arches.patch @@ -0,0 +1,24 @@ +diff -Nur a/webrtc/rtc_base/system/arch.h b/webrtc/rtc_base/system/arch.h +--- a/webrtc/rtc_base/system/arch.h 2020-11-28 03:30:53.000000000 +0800 ++++ b/webrtc/rtc_base/system/arch.h 2022-04-11 14:35:41.689733918 +0800 +@@ -51,7 +51,19 @@ + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN + #else +-#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 ++#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)) -- Gitee