diff --git a/media-libs/tg_owt/patches/tg_owt-0.0.20210915.patchset b/media-libs/tg_owt/patches/tg_owt-0.0.20211207.patchset similarity index 95% rename from media-libs/tg_owt/patches/tg_owt-0.0.20210915.patchset rename to media-libs/tg_owt/patches/tg_owt-0.0.20211207.patchset index ba4085bdf..205412f00 100644 --- a/media-libs/tg_owt/patches/tg_owt-0.0.20210915.patchset +++ b/media-libs/tg_owt/patches/tg_owt-0.0.20211207.patchset @@ -1,31 +1,14 @@ -From 8b57254fd9ca87d5207278fc44e3ef637a3338d5 Mon Sep 17 00:00:00 2001 +From 86ed5dfae88d6177f8e2b139f06b58f0f43553ec Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 17 Sep 2021 17:09:05 +1000 +Date: Sat, 30 Oct 2021 12:59:21 +1000 Subject: Add Haiku support diff --git a/CMakeLists.txt b/CMakeLists.txt -index f5696ed..819d371 100644 +index f72b191..2bca8df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -71,7 +71,7 @@ include(cmake/libsrtp.cmake) - include(cmake/libusrsctp.cmake) - include(cmake/libvpx.cmake) - include(cmake/libyuv.cmake) --if (NOT WIN32 AND NOT APPLE) -+if (NOT WIN32 AND NOT APPLE AND NOT HAIKU) - include(cmake/libevent.cmake) - endif() - if (APPLE) -@@ -160,14 +160,14 @@ if (TG_OWT_BUILD_AUDIO_BACKENDS AND (UNIX AND NOT APPLE)) - link_dl(tg_owt) - endif() - --if (NOT WIN32 AND NOT APPLE) -+if (NOT WIN32 AND NOT APPLE AND NOT HAIKU) - link_libevent(tg_owt) - endif() - +@@ -160,7 +160,7 @@ endif() include(cmake/libwebrtcbuild.cmake) target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild) @@ -34,24 +17,7 @@ index f5696ed..819d371 100644 link_x11(tg_owt) link_glib(tg_owt) endif() -@@ -446,6 +446,8 @@ PRIVATE - rtc_base/task_queue.cc - rtc_base/task_queue_gcd.cc - rtc_base/task_queue_gcd.h -+ rtc_base/task_queue_stdlib.cc -+ rtc_base/task_queue_stdlib.h - rtc_base/task_queue_libevent.cc - rtc_base/task_queue_libevent.h - rtc_base/task_queue_win.cc -@@ -527,6 +529,7 @@ PRIVATE - api/stats_types.cc - api/task_queue/default_task_queue_factory.h - api/task_queue/default_task_queue_factory_gcd.cc -+ api/task_queue/default_task_queue_factory_stdlib.cc - api/task_queue/default_task_queue_factory_libevent.cc - api/task_queue/default_task_queue_factory_win.cc - api/task_queue/task_queue_base.cc -@@ -1458,6 +1461,9 @@ PRIVATE +@@ -1495,6 +1495,9 @@ PRIVATE modules/video_capture/device_info_impl.cc modules/video_capture/linux/device_info_linux.cc modules/video_capture/linux/video_capture_linux.cc @@ -61,7 +27,7 @@ index f5696ed..819d371 100644 modules/video_capture/windows/device_info_ds.cc modules/video_capture/windows/device_info_ds.h modules/video_capture/windows/help_functions_ds.cc -@@ -2006,6 +2012,7 @@ PRIVATE +@@ -2049,6 +2052,7 @@ PRIVATE modules/desktop_capture/mouse_cursor.h modules/desktop_capture/mouse_cursor_monitor.h modules/desktop_capture/mouse_cursor_monitor_linux.cc @@ -69,7 +35,7 @@ index f5696ed..819d371 100644 modules/desktop_capture/mouse_cursor_monitor_mac.mm modules/desktop_capture/mouse_cursor_monitor_win.cc modules/desktop_capture/resolution_tracker.cc -@@ -2017,8 +2024,10 @@ PRIVATE +@@ -2060,8 +2064,10 @@ PRIVATE modules/desktop_capture/screen_capturer_helper.h modules/desktop_capture/screen_capturer_darwin.mm modules/desktop_capture/screen_capturer_linux.cc @@ -80,7 +46,7 @@ index f5696ed..819d371 100644 modules/desktop_capture/window_capturer_mac.mm modules/desktop_capture/window_capturer_win.cc modules/desktop_capture/window_finder.cc -@@ -2033,6 +2042,10 @@ PRIVATE +@@ -2076,6 +2082,10 @@ PRIVATE modules/desktop_capture/screen_capturer_null.cc modules/desktop_capture/window_capturer_null.cc @@ -91,24 +57,6 @@ index f5696ed..819d371 100644 # linux specific modules/desktop_capture/linux/base_capturer_pipewire.cc modules/desktop_capture/linux/base_capturer_pipewire.h -@@ -2307,7 +2320,7 @@ else() - ) - endif() - --if (WIN32 OR APPLE) -+if (WIN32 OR APPLE OR HAIKU) - remove_target_sources(tg_owt ${webrtc_loc} - rtc_base/task_queue_libevent.cc - rtc_base/task_queue_libevent.h -@@ -2323,7 +2336,7 @@ else() - endif() - - set(platform_export) --if (NOT WIN32 AND NOT APPLE AND NOT LIBEVENT_FOUND) -+if (NOT WIN32 AND NOT APPLE AND NOT HAIKU AND NOT LIBEVENT_FOUND) - set(platform_export - libevent - ) diff --git a/cmake/libusrsctp.cmake b/cmake/libusrsctp.cmake index 1dc5e5e..e88531c 100644 --- a/cmake/libusrsctp.cmake @@ -126,12 +74,12 @@ index 1dc5e5e..e88531c 100644 target_compile_definitions(libusrsctp PRIVATE diff --git a/cmake/libwebrtcbuild.cmake b/cmake/libwebrtcbuild.cmake -index 86e2993..7cd70b6 100644 +index 46467d7..a380a29 100644 --- a/cmake/libwebrtcbuild.cmake +++ b/cmake/libwebrtcbuild.cmake -@@ -58,6 +58,12 @@ elseif (APPLE) - WEBRTC_POSIX - WEBRTC_MAC +@@ -53,6 +53,12 @@ if (WIN32) + INTERFACE + WEBRTC_WIN ) +elseif (HAIKU) + target_compile_definitions(libwebrtcbuild @@ -1594,10 +1542,10 @@ index 0000000..7308f0c + +#endif // VIDEO_CONSUMER_H diff --git a/src/rtc_base/BUILD.gn b/src/rtc_base/BUILD.gn -index 3cf1a9f..013e361 100644 +index 65a6f50..0572e10 100644 --- a/src/rtc_base/BUILD.gn +++ b/src/rtc_base/BUILD.gn -@@ -489,7 +489,7 @@ rtc_source_set("rtc_operations_chain") { +@@ -494,7 +494,7 @@ rtc_source_set("rtc_operations_chain") { absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] } @@ -1606,8 +1554,21 @@ index 3cf1a9f..013e361 100644 rtc_library("rtc_task_queue_libevent") { visibility = [ "../api/task_queue:default_task_queue_factory" ] sources = [ +diff --git a/src/rtc_base/byte_order.h b/src/rtc_base/byte_order.h +index f1f87e3..7b8bd85 100644 +--- a/src/rtc_base/byte_order.h ++++ b/src/rtc_base/byte_order.h +@@ -88,7 +88,7 @@ + #error WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN must be defined. + #endif // defined(WEBRTC_ARCH_LITTLE_ENDIAN) + +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_HAIKU) + #include + #elif defined(WEBRTC_FREEBSD) + #include diff --git a/src/rtc_base/ip_address.cc b/src/rtc_base/ip_address.cc -index 9f1df58..a2f8712 100644 +index a5498c6..3e829bf 100644 --- a/src/rtc_base/ip_address.cc +++ b/src/rtc_base/ip_address.cc @@ -11,6 +11,9 @@ @@ -1620,7 +1581,7 @@ index 9f1df58..a2f8712 100644 #ifdef OPENBSD #include #endif -@@ -33,6 +36,15 @@ +@@ -30,6 +33,15 @@ namespace rtc { // Prefixes used for categorizing IPv6 addresses. @@ -1636,7 +1597,7 @@ index 9f1df58..a2f8712 100644 static const in6_addr kV4MappedPrefix = { {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0}}}; static const in6_addr k6To4Prefix = {{{0x20, 0x02, 0}}}; -@@ -40,6 +52,7 @@ static const in6_addr kTeredoPrefix = {{{0x20, 0x01, 0x00, 0x00}}}; +@@ -37,6 +49,7 @@ static const in6_addr kTeredoPrefix = {{{0x20, 0x01, 0x00, 0x00}}}; static const in6_addr kV4CompatibilityPrefix = {{{0}}}; static const in6_addr k6BonePrefix = {{{0x3f, 0xfe, 0}}}; static const in6_addr kPrivateNetworkPrefix = {{{0xFD}}}; @@ -1645,10 +1606,10 @@ index 9f1df58..a2f8712 100644 static bool IPIsHelper(const IPAddress& ip, const in6_addr& tomatch, diff --git a/src/rtc_base/logging.cc b/src/rtc_base/logging.cc -index 13a5f02..8362c3e 100644 +index 321d848..d2fef5e 100644 --- a/src/rtc_base/logging.cc +++ b/src/rtc_base/logging.cc -@@ -122,7 +122,11 @@ LogMessage::LogMessage(const char* file, +@@ -123,7 +123,11 @@ LogMessage::LogMessage(const char* file, if (thread_) { PlatformThreadId id = CurrentThreadId(); @@ -1661,7 +1622,7 @@ index 13a5f02..8362c3e 100644 if (file != nullptr) { diff --git a/src/rtc_base/network.cc b/src/rtc_base/network.cc -index 1b0ba36..6b0d090 100644 +index 5725458..aa342f8 100644 --- a/src/rtc_base/network.cc +++ b/src/rtc_base/network.cc @@ -525,7 +525,7 @@ void BasicNetworkManager::ConvertIfAddrs(struct ifaddrs* interfaces, @@ -1674,18 +1635,9 @@ index 1b0ba36..6b0d090 100644 } // Skip unknown family. diff --git a/src/rtc_base/physical_socket_server.cc b/src/rtc_base/physical_socket_server.cc -index 7904548..b54366e 100644 +index 07adacd..06ca07e 100644 --- a/src/rtc_base/physical_socket_server.cc +++ b/src/rtc_base/physical_socket_server.cc -@@ -70,7 +70,7 @@ typedef void* SockOptArg; - - #endif // WEBRTC_POSIX - --#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) -+#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(WEBRTC_HAIKU) && !defined(__native_client__) - - int64_t GetSocketRecvTimestamp(int socket) { - struct timeval tv_ioctl; @@ -325,7 +325,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { value <<= 2; #endif @@ -1695,15 +1647,6 @@ index 7904548..b54366e 100644 if (sopt == IPV6_TCLASS) { // Set the IPv4 option in all cases to support dual-stack sockets. // Don't bother checking the return code, as this is expected to fail if -@@ -567,7 +567,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) { - #elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__) - RTC_LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported."; - return -1; --#elif defined(WEBRTC_POSIX) -+#elif defined(WEBRTC_POSIX) && !defined(WEBRTC_HAIKU) - *slevel = IPPROTO_IP; - *sopt = IP_MTU_DISCOVER; - break; @@ -585,7 +585,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) { *sopt = TCP_NODELAY; break; diff --git a/media-libs/tg_owt/tg_owt-0.0.20210915.recipe b/media-libs/tg_owt/tg_owt-0.0.20211207.recipe similarity index 90% rename from media-libs/tg_owt/tg_owt-0.0.20210915.recipe rename to media-libs/tg_owt/tg_owt-0.0.20211207.recipe index 103aa0539..114d7360d 100644 --- a/media-libs/tg_owt/tg_owt-0.0.20210915.recipe +++ b/media-libs/tg_owt/tg_owt-0.0.20211207.recipe @@ -3,15 +3,15 @@ DESCRIPTION="Telegram Desktop's fork of Google's WebRTC." HOMEPAGE="https://github.com/desktop-app/tg_owt" COPYRIGHT="2013-2021 Telegram" LICENSE="BSD (3-clause)" -REVISION="2" -srcGitRev="575fb17d2853c43329e45f6693370f5e41668055" +REVISION="1" +srcGitRev="d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589" SOURCE_URI="https://github.com/desktop-app/tg_owt/archive/$srcGitRev.tar.gz" SOURCE_DIR="tg_owt-$srcGitRev" -CHECKSUM_SHA256="b7176605b66d1d3ab8180bf2569fbe1f646ee6bca1610e96b2bf4978c14f4241" +CHECKSUM_SHA256="a50e1e2b6e6bba7ecc63ed5bd05a2c393bc78e80994025999d9e799fabf6afef" SOURCE_FILENAME="tg_owt-$srcGitRev.tar.gz" -srcGitRev_2="5b63f0f821e94f8072eb483014cfc33b05978bb9" +srcGitRev_2="c56ab7d0c6f3fb215d571db3dacc0cc908c1b53c" SOURCE_URI_2="https://github.com/webmproject/libvpx/archive/$srcGitRev_2.tar.gz" -CHECKSUM_SHA256_2="9c48507861a65e9d248da69881e1c66c01d2d533cd3b1f7c4ccb30ddb9e6c416" +CHECKSUM_SHA256_2="f8229ebe087a174c3f4de496be85e5c52403d9e7138ad755111e3fc3415df917" SOURCE_FILENAME_2="libvpx-$srcGitRev_2.tar.gz" srcGitRev_3="ad890067f661dc747a975bc55ba3767fe30d4452" SOURCE_URI_3="https://github.com/lemenkov/libyuv/archive/$srcGitRev_3.tar.gz"