diff --git a/net-im/tg_owt/files/patch-cmake_external.cmake b/net-im/tg_owt/files/patch-cmake_external.cmake new file mode 100644 index 000000000000..cfd164d0aa03 --- /dev/null +++ b/net-im/tg_owt/files/patch-cmake_external.cmake @@ -0,0 +1,12 @@ +--- cmake/external.cmake.orig 2023-01-11 16:35:01 UTC ++++ cmake/external.cmake +@@ -120,6 +120,9 @@ function(link_libabsl target_name) + absl::type_traits + absl::variant + ) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(ABSL REQUIRED QUIET absl_flags) ++ target_include_directories(${target_name} PRIVATE ${ABSL_INCLUDE_DIRS}) + endif() + endif() + if (NOT absl_FOUND) diff --git a/net-im/tg_owt/files/patch-src_common__audio_wav__header.cc b/net-im/tg_owt/files/patch-src_common__audio_wav__header.cc index 5f8f73eff0db..94e5736ebc48 100644 --- a/net-im/tg_owt/files/patch-src_common__audio_wav__header.cc +++ b/net-im/tg_owt/files/patch-src_common__audio_wav__header.cc @@ -1,36 +1,36 @@ ---- src/common_audio/wav_header.cc.orig 2022-02-09 19:21:53 UTC +--- src/common_audio/wav_header.cc.orig 2023-01-05 05:48:49 UTC +++ src/common_audio/wav_header.cc @@ -26,10 +26,6 @@ namespace webrtc { namespace { -#ifndef WEBRTC_ARCH_LITTLE_ENDIAN -#error "Code not working properly for big endian platforms." -#endif - #pragma pack(2) struct ChunkHeader { uint32_t ID; -@@ -119,9 +115,22 @@ uint32_t PackFourCC(char a, char b, char c, char d) { +@@ -113,9 +109,22 @@ uint32_t PackFourCC(char a, char b, char c, char d) { return packed_value; } +#ifdef WEBRTC_ARCH_LITTLE_ENDIAN std::string ReadFourCC(uint32_t x) { return std::string(reinterpret_cast(&x), 4); } +#else +static inline uint32_t ReadLE32(uint32_t x) { + return ((x << 24) & 0xFF000000) + | ((x << 8) & 0x00FF0000) + | ((x >> 8) & 0x0000FF00) + | ((x >> 24) & 0x000000FF); +} +std::string ReadFourCC(uint32_t x) { + x = ReadLE32(x); + return std::string(reinterpret_cast(&x), 4); +} +#endif uint16_t MapWavFormatToHeaderField(WavFormat format) { switch (format) {