summaryrefslogtreecommitdiff
path: root/multimedia/ringrtc/files
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/ringrtc/files')
-rw-r--r--multimedia/ringrtc/files/patch-build_config_BUILDCONFIG.gn8
-rw-r--r--multimedia/ringrtc/files/patch-build_config_compiler_BUILD.gn35
-rw-r--r--multimedia/ringrtc/files/patch-src_rust_src_webrtc_audio__device__module__utils.rs28
-rw-r--r--multimedia/ringrtc/files/patch-src_webrtc_src_testing_test.gni6
-rw-r--r--multimedia/ringrtc/files/patch-third__party_nasm_config_config-linux.h53
-rw-r--r--multimedia/ringrtc/files/patch-third__party_perfetto_src_base_string__utils.cc12
-rw-r--r--multimedia/ringrtc/files/patch-third__party_perfetto_src_tracing_ipc_memfd.cc6
-rw-r--r--multimedia/ringrtc/files/patch-third__party_webrtc_rtc__base_network.cc7
8 files changed, 65 insertions, 90 deletions
diff --git a/multimedia/ringrtc/files/patch-build_config_BUILDCONFIG.gn b/multimedia/ringrtc/files/patch-build_config_BUILDCONFIG.gn
index 024c080d9390..384f674203f1 100644
--- a/multimedia/ringrtc/files/patch-build_config_BUILDCONFIG.gn
+++ b/multimedia/ringrtc/files/patch-build_config_BUILDCONFIG.gn
@@ -27,10 +27,10 @@
_default_toolchain = "//build/toolchain/zos:$target_cpu"
+} else if (target_os == "openbsd" || target_os == "freebsd") {
+ _default_toolchain = host_toolchain
- } else {
- assert(false, "Unsupported target_os: $target_os")
- }
-@@ -313,7 +320,11 @@ is_android = current_os == "android"
+ } else if (target_os == "emscripten") {
+ # Because it's too hard to remove all targets from //BUILD.gn that do not work with it.
+ assert(
+@@ -318,7 +325,11 @@ is_ios = current_os == "ios"
is_chromeos = current_os == "chromeos"
is_fuchsia = current_os == "fuchsia"
is_ios = current_os == "ios"
diff --git a/multimedia/ringrtc/files/patch-build_config_compiler_BUILD.gn b/multimedia/ringrtc/files/patch-build_config_compiler_BUILD.gn
index 3f7487004b34..65b46735dcc7 100644
--- a/multimedia/ringrtc/files/patch-build_config_compiler_BUILD.gn
+++ b/multimedia/ringrtc/files/patch-build_config_compiler_BUILD.gn
@@ -1,6 +1,6 @@
--- src/webrtc/src/build/config/compiler/BUILD.gn.orig 2024-06-18 16:34:35 UTC
+++ src/webrtc/src/build/config/compiler/BUILD.gn
-@@ -197,7 +197,7 @@ declare_args() {
+@@ -199,7 +199,7 @@ declare_args() {
# This greatly reduces the size of debug builds, at the cost of
# debugging information which is required by some specialized
# debugging tools.
@@ -9,7 +9,7 @@
}
declare_args() {
-@@ -254,13 +254,16 @@ config("default_include_dirs") {
+@@ -256,13 +256,16 @@ config("no_unresolved_symbols") {
# Compiler instrumentation can introduce dependencies in DSOs to symbols in
# the executable they are loaded into, so they are unresolved at link-time.
config("no_unresolved_symbols") {
@@ -27,7 +27,7 @@
}
# compiler ---------------------------------------------------------------------
-@@ -509,6 +512,10 @@ config("compiler") {
+@@ -521,6 +524,10 @@ config("compiler") {
}
}
@@ -38,7 +38,7 @@
# Linux-specific compiler flags setup.
# ------------------------------------
if (use_icf && (!is_apple || use_lld)) {
-@@ -569,7 +576,7 @@ config("compiler") {
+@@ -581,7 +588,7 @@ config("compiler") {
ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
}
@@ -47,7 +47,16 @@
cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
if (save_reproducers_on_lld_crash && use_lld) {
ldflags += [
-@@ -1227,7 +1234,7 @@ config("compiler_cpu_abi") {
+@@ -1233,7 +1240,7 @@ config("compiler_cpu_abi") {
+ # simplicity we always explicitly set the architecture.
+ if (current_cpu == "x64") {
+ if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+- !is_chromeos_device) {
++ !is_chromeos_device && !is_bsd) {
+ cflags += [ "--target=x86_64-unknown-linux-gnu" ]
+ ldflags += [ "--target=x86_64-unknown-linux-gnu" ]
+ } else {
+@@ -1256,7 +1263,7 @@ config("compiler_cpu_abi") {
]
}
} else if (current_cpu == "arm") {
@@ -56,7 +65,7 @@
cflags += [ "--target=arm-linux-gnueabihf" ]
ldflags += [ "--target=arm-linux-gnueabihf" ]
}
-@@ -1242,7 +1249,7 @@ config("compiler_cpu_abi") {
+@@ -1271,7 +1278,7 @@ config("compiler_cpu_abi") {
}
} else if (current_cpu == "arm64") {
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
@@ -65,7 +74,7 @@
cflags += [ "--target=aarch64-linux-gnu" ]
ldflags += [ "--target=aarch64-linux-gnu" ]
}
-@@ -1576,7 +1583,7 @@ config("compiler_deterministic") {
+@@ -1617,7 +1624,7 @@ config("compiler_deterministic") {
# different build directory like "out/feature_a" and "out/feature_b" if
# we build same files with same compile flag.
# Other paths are already given in relative, no need to normalize them.
@@ -74,7 +83,7 @@
# TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
cflags += [
"-Xclang",
-@@ -1634,7 +1641,7 @@ config("compiler_deterministic") {
+@@ -1683,7 +1690,7 @@ config("clang_revision") {
}
config("clang_revision") {
@@ -83,7 +92,7 @@
current_os != "zos") {
_perform_consistency_checks = current_toolchain == default_toolchain
if (llvm_force_head_revision) {
-@@ -1719,7 +1726,7 @@ config("clang_revision") {
+@@ -1775,7 +1782,7 @@ config("clang_warning_suppression") {
# e.g. by setting in the the project's .gn file.
config("clang_warning_suppression") {
# Some build configs use older versions of clang that don't support WSMs
@@ -92,7 +101,7 @@
!llvm_android_mainline && is_clang &&
clang_warning_suppression_file != "") {
from_build_root =
-@@ -2053,9 +2060,6 @@ config("default_warnings") {
+@@ -2134,9 +2141,6 @@ config("default_warnings") {
# TODO(crbug.com/40284799): Fix and re-enable.
"-Wno-thread-safety-reference-return",
@@ -102,7 +111,7 @@
]
cflags_cc += [
-@@ -2837,7 +2841,7 @@ config("afdo_optimize_size") {
+@@ -2920,7 +2924,7 @@ config("afdo") {
# There are some targeted places that AFDO regresses, so we provide a separate
# config to allow AFDO to be disabled per-target.
config("afdo") {
@@ -111,7 +120,7 @@
cflags = []
if (clang_emit_debug_info_for_profiling) {
# Add the following flags to generate debug info for profiling.
-@@ -2864,7 +2868,7 @@ config("afdo") {
+@@ -2947,7 +2951,7 @@ config("afdo") {
cflags += [ "-Wno-backend-plugin" ]
inputs = [ _clang_sample_profile ]
}
@@ -120,7 +129,7 @@
cflags = [ "-fauto-profile=${auto_profile_path}" ]
inputs = [ auto_profile_path ]
}
-@@ -3041,7 +3045,7 @@ config("symbols") {
+@@ -3136,7 +3140,7 @@ config("symbols") {
cflags += [ "-gomit-unreferenced-methods" ]
}
diff --git a/multimedia/ringrtc/files/patch-src_rust_src_webrtc_audio__device__module__utils.rs b/multimedia/ringrtc/files/patch-src_rust_src_webrtc_audio__device__module__utils.rs
index 9d75b5641e26..ec15f6b1927f 100644
--- a/multimedia/ringrtc/files/patch-src_rust_src_webrtc_audio__device__module__utils.rs
+++ b/multimedia/ringrtc/files/patch-src_rust_src_webrtc_audio__device__module__utils.rs
@@ -1,15 +1,15 @@
--- src/rust/src/webrtc/audio_device_module_utils.rs.orig 2024-11-18 16:04:01 UTC
+++ src/rust/src/webrtc/audio_device_module_utils.rs
-@@ -10,7 +10,7 @@ use cubeb_core::DevicePref;
+@@ -11,7 +11,7 @@ use cubeb_core::DevicePref;
use anyhow::anyhow;
use cubeb::{DeviceCollection, DeviceState};
use cubeb_core::DevicePref;
-#[cfg(target_os = "linux")]
+#[cfg(any(target_os = "freebsd", target_os = "linux"))]
use cubeb_core::DeviceType;
- use std::ffi::{c_uchar, c_void, CString};
+ use regex::Regex;
-@@ -18,7 +18,7 @@ pub struct MinimalDeviceInfo {
+@@ -22,7 +22,7 @@ pub struct MinimalDeviceInfo {
pub devid: *const c_void,
pub device_id: Option<String>,
pub friendly_name: Option<String>,
@@ -18,7 +18,7 @@
device_type: DeviceType,
preferred: DevicePref,
state: DeviceState,
-@@ -35,7 +35,7 @@ pub struct DeviceCollectionWrapper {
+@@ -40,7 +40,7 @@ pub struct DeviceCollectionWrapper {
device_collection: Vec<MinimalDeviceInfo>,
}
@@ -27,7 +27,7 @@
fn device_is_monitor(device: &MinimalDeviceInfo) -> bool {
device.device_type == DeviceType::INPUT
&& device
-@@ -52,7 +52,7 @@ impl DeviceCollectionWrapper {
+@@ -57,7 +57,7 @@ impl DeviceCollectionWrapper {
devid: device.devid(),
device_id: device.device_id().as_ref().map(|s| s.to_string()),
friendly_name: device.friendly_name().as_ref().map(|s| s.to_string()),
@@ -36,7 +36,7 @@
device_type: device.device_type(),
preferred: device.preferred(),
state: device.state(),
-@@ -74,7 +74,7 @@ impl DeviceCollectionWrapper {
+@@ -79,7 +79,7 @@ impl DeviceCollectionWrapper {
}
// For linux only, a method that will ignore "monitor" devices.
@@ -45,7 +45,7 @@
pub fn iter_non_monitor(
&self,
) -> std::iter::Filter<std::slice::Iter<'_, MinimalDeviceInfo>, fn(&&MinimalDeviceInfo) -> bool>
-@@ -116,7 +116,7 @@ impl DeviceCollectionWrapper {
+@@ -121,7 +121,7 @@ impl DeviceCollectionWrapper {
{
self.iter().nth(idx - 1)
}
@@ -54,12 +54,18 @@
{
// filter out "monitor" devices.
self.iter_non_monitor().nth(idx - 1)
-@@ -146,7 +146,7 @@ impl DeviceCollectionWrapper {
+@@ -149,12 +149,12 @@ impl DeviceCollectionWrapper {
+ pub fn count(&self) -> usize {
+ #[cfg(target_os = "macos")]
let count = self.iter().count();
- // Whether a monitor device is default or not, there will be an additional default,
- // so no need to do anything different.
- #[cfg(target_os = "linux")]
+ #[cfg(any(target_os = "freebsd", target_os = "linux"))]
let count = self.iter_non_monitor().count();
if count == 0 {
- 0
+ #[cfg(target_os = "macos")]
+ return 0;
+- #[cfg(target_os = "linux")]
++ #[cfg(any(target_os = "freebsd", target_os = "linux"))]
+ return
+ // edge case: if there are only monitor devices, and one is the default,
+ // allow it.
diff --git a/multimedia/ringrtc/files/patch-src_webrtc_src_testing_test.gni b/multimedia/ringrtc/files/patch-src_webrtc_src_testing_test.gni
index 133fddbcdd19..8fafdd4eed49 100644
--- a/multimedia/ringrtc/files/patch-src_webrtc_src_testing_test.gni
+++ b/multimedia/ringrtc/files/patch-src_webrtc_src_testing_test.gni
@@ -1,11 +1,11 @@
--- src/webrtc/src/testing/test.gni.orig 2022-02-18 09:31:19 UTC
+++ src/webrtc/src/testing/test.gni
-@@ -17,7 +17,7 @@ declare_args() {
+@@ -19,7 +19,7 @@ declare_args() {
# "location_tags.json", and so we don't want to try and upload the tags
# for their tests.
# And, some build configs may simply turn off generation altogether.
- tests_have_location_tags = generate_location_tags
+ tests_have_location_tags = false
- }
- if (is_android) {
+ # Build individual_fuzztest_wrapper if use_fuzztest_wrapper is set.
+ # Some projects doesn't have //base and cannot build
diff --git a/multimedia/ringrtc/files/patch-third__party_nasm_config_config-linux.h b/multimedia/ringrtc/files/patch-third__party_nasm_config_config-linux.h
index 3bb7bc175176..d6cc94a8ccf6 100644
--- a/multimedia/ringrtc/files/patch-third__party_nasm_config_config-linux.h
+++ b/multimedia/ringrtc/files/patch-third__party_nasm_config_config-linux.h
@@ -1,27 +1,18 @@
--- src/webrtc/src/third_party/nasm/config/config-linux.h.orig 2024-03-14 18:07:21 UTC
+++ src/webrtc/src/third_party/nasm/config/config-linux.h
-@@ -160,7 +160,7 @@
-
- /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
- don't. */
--#define HAVE_DECL_STRLCPY 0
-+#define HAVE_DECL_STRLCPY 1
-
- /* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
- don't. */
-@@ -183,7 +183,7 @@
+@@ -209,7 +209,7 @@
#define HAVE_DECL_STRSEP 1
/* Define to 1 if you have the <endian.h> header file. */
-#define HAVE_ENDIAN_H 1
+/* #undef HAVE_ENDIAN_H */
- /* Define to 1 if you have the `faccessat' function. */
+ /* Define to 1 if you have the 'faccessat' function. */
#define HAVE_FACCESSAT 1
-@@ -327,10 +327,10 @@
+@@ -351,10 +351,10 @@
#define HAVE_ISASCII 1
- /* Define to 1 if you have the `iscntrl' function. */
+ /* Define to 1 if you have the 'iscntrl' function. */
-/* #undef HAVE_ISCNTRL */
+#define HAVE_ISCNTRL 1
@@ -29,9 +20,9 @@
-/* #undef HAVE_MACHINE_ENDIAN_H */
+#define HAVE_MACHINE_ENDIAN_H 1
- /* Define to 1 if you have the <memory.h> header file. */
- #define HAVE_MEMORY_H 1
-@@ -357,7 +357,7 @@
+ /* Define to 1 if you have the 'mempcpy' function. */
+ #define HAVE_MEMPCPY 1
+@@ -384,7 +384,7 @@
#define HAVE_STDARG_H 1
/* Define to 1 if stdbool.h conforms to C99. */
@@ -40,16 +31,16 @@
/* Define to 1 if your compiler supports C99 extern inline */
#define HAVE_STDC_INLINE 1
-@@ -384,7 +384,7 @@
+@@ -414,7 +414,7 @@
#define HAVE_STRING_H 1
- /* Define to 1 if you have the `strlcpy' function. */
--/* #undef HAVE_STRLCPY */
+ /* Define to 1 if you have the 'strlcpy' function. */
+-/* #undef HAVE_STRLCPY */ // Shouldn\'t work with -std=c11, but configure still detects it.
+#define HAVE_STRLCPY 1
- /* Define to 1 if you have the `strncasecmp' function. */
+ /* Define to 1 if you have the 'strncasecmp' function. */
#define HAVE_STRNCASECMP 1
-@@ -411,7 +411,7 @@
+@@ -441,7 +441,7 @@
#define HAVE_SYSCONF 1
/* Define to 1 if you have the <sys/endian.h> header file. */
@@ -58,7 +49,7 @@
/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1
-@@ -486,13 +486,13 @@
+@@ -522,13 +522,13 @@
/* #undef HAVE__STATI64 */
/* Define to 1 if you have the `__bswap_16' intrinsic function. */
@@ -75,21 +66,3 @@
/* Define to 1 if you have the `__builtin_bswap16' intrinsic function. */
#define HAVE___BUILTIN_BSWAP16 1
-@@ -620,7 +620,7 @@
- /* Define to the equivalent of the C99 'restrict' keyword, or to
- nothing if this is not supported. Do not define if restrict is
- supported directly. */
--#define restrict __restrict
-+#define restrict __restrict__
- /* Work around a bug in Sun C++: it does not support _Restrict or
- __restrict__, even though the corresponding Sun C compiler ends up with
- "#define restrict _Restrict" or "#define restrict __restrict__" in the
-@@ -637,7 +637,7 @@
- /* Define if your snprintf function is not named snprintf. */
- /* #undef snprintf */
-
--/* Define if your typeof operator is not named typeof. */
-+/* Define if your typeof operator is not named `typeof'. */
- #define typeof __typeof
-
- /* Define to the type of an unsigned integer type wide enough to hold a
diff --git a/multimedia/ringrtc/files/patch-third__party_perfetto_src_base_string__utils.cc b/multimedia/ringrtc/files/patch-third__party_perfetto_src_base_string__utils.cc
deleted file mode 100644
index 19116d9de29f..000000000000
--- a/multimedia/ringrtc/files/patch-third__party_perfetto_src_base_string__utils.cc
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/webrtc/src/third_party/perfetto/src/base/string_utils.cc.orig 2023-12-10 06:10:27 UTC
-+++ src/webrtc/src/third_party/perfetto/src/base/string_utils.cc
-@@ -39,7 +39,8 @@ namespace base {
- // Locale-independant as possible version of strtod.
- double StrToD(const char* nptr, char** endptr) {
- #if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
-- PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \
-+ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
-+ !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
- PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
- static auto c_locale = newlocale(LC_ALL, "C", nullptr);
- return strtod_l(nptr, endptr, c_locale);
diff --git a/multimedia/ringrtc/files/patch-third__party_perfetto_src_tracing_ipc_memfd.cc b/multimedia/ringrtc/files/patch-third__party_perfetto_src_tracing_ipc_memfd.cc
index 8fc6f48670d5..849970708a27 100644
--- a/multimedia/ringrtc/files/patch-third__party_perfetto_src_tracing_ipc_memfd.cc
+++ b/multimedia/ringrtc/files/patch-third__party_perfetto_src_tracing_ipc_memfd.cc
@@ -4,9 +4,9 @@
#define PERFETTO_MEMFD_ENABLED() \
PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
-- PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX)
-+ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
-+ !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD))
+- PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX)
++ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \
++ !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD))
#if PERFETTO_MEMFD_ENABLED()
diff --git a/multimedia/ringrtc/files/patch-third__party_webrtc_rtc__base_network.cc b/multimedia/ringrtc/files/patch-third__party_webrtc_rtc__base_network.cc
index 29d5f54e06e9..366f357f6262 100644
--- a/multimedia/ringrtc/files/patch-third__party_webrtc_rtc__base_network.cc
+++ b/multimedia/ringrtc/files/patch-third__party_webrtc_rtc__base_network.cc
@@ -1,15 +1,14 @@
--- src/webrtc/src/rtc_base/network.cc.orig 2024-06-17 12:56:06 UTC
+++ src/webrtc/src/rtc_base/network.cc
-@@ -320,7 +320,12 @@ webrtc::AdapterType GetAdapterTypeFromName(absl::strin
+@@ -312,7 +312,12 @@ AdapterType GetAdapterTypeFromName(absl::string_view n
}
#endif
-- return webrtc::ADAPTER_TYPE_UNKNOWN;
+#if defined(WEBRTC_BSD)
+ // Treat all other network interface names as ethernet on BSD
-+ return ADAPTER_TYPE_ETHERNET;
++ return webrtc::ADAPTER_TYPE_ETHERNET;
+#else
-+ return ADAPTER_TYPE_UNKNOWN;
+ return ADAPTER_TYPE_UNKNOWN;
+#endif
}