diff --git a/webrtc_libsrtp.diff b/webrtc_libsrtp.diff new file mode 100644 index 0000000..41b528c --- /dev/null +++ b/webrtc_libsrtp.diff @@ -0,0 +1,27 @@ +diff --git a/BUILD.gn b/BUILD.gn +index 6359585..0c9d2ff 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//testing/test.gni") ++import("//webrtc.gni") + + declare_args() { + # Tests may not be appropriate for some build environments, e.g. Windows. +@@ -114,9 +115,11 @@ static_library("libsrtp") { + "srtp/ekt.c", + "srtp/srtp.c", + ] +- public_deps = [ +- "//third_party/boringssl:boringssl", +- ] ++ if (rtc_build_ssl) { ++ public_deps += [ "//third_party/boringssl" ] ++ } else { ++ configs += [ "//rtc_base:external_ssl_library" ] ++ } + } + + if (build_libsrtp_tests) { diff --git a/webrtc_src.diff b/webrtc_src.diff new file mode 100644 index 0000000..85eb6cc --- /dev/null +++ b/webrtc_src.diff @@ -0,0 +1,26 @@ +diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn +index 0805a5c549..6150fdaaa9 100644 +--- a/rtc_base/BUILD.gn ++++ b/rtc_base/BUILD.gn +@@ -24,6 +24,7 @@ if (!rtc_build_ssl) { + assert(rtc_ssl_root != "", + "You must specify rtc_ssl_root when rtc_build_ssl==0.") + include_dirs = [ rtc_ssl_root ] ++ libs = rtc_ssl_libs + } + } + +diff --git a/webrtc.gni b/webrtc.gni +index 64a170c23f..044529a689 100644 +--- a/webrtc.gni ++++ b/webrtc.gni +@@ -85,6 +85,9 @@ declare_args() { + # library that comes with WebRTC (i.e. rtc_build_ssl == 0). + rtc_ssl_root = "" + ++ # Used to specify an external OpenSSL libs. ++ rtc_ssl_libs = [] ++ + # Selects fixed-point code where possible. + rtc_prefer_fixed_point = false + diff --git a/webrtc_third_party.diff b/webrtc_third_party.diff new file mode 100644 index 0000000..09dcbce --- /dev/null +++ b/webrtc_third_party.diff @@ -0,0 +1,23 @@ +diff --git a/usrsctp/BUILD.gn b/usrsctp/BUILD.gn +index 014a076aec3..2d7daeba03a 100644 +--- a/usrsctp/BUILD.gn ++++ b/usrsctp/BUILD.gn +@@ -3,6 +3,7 @@ + # found in the LICENSE file. + + import("//build/toolchain/toolchain.gni") ++import("//webrtc.gni") + + config("usrsctp_config") { + include_dirs = [ +@@ -140,5 +141,9 @@ static_library("usrsctp") { + if (is_fuchsia) { + defines += [ "__Userspace_os_Fuchsia" ] + } +- deps = [ "//third_party/boringssl" ] ++ if (rtc_build_ssl) { ++ deps += [ "//third_party/boringssl" ] ++ } else { ++ configs += [ "//rtc_base:external_ssl_library" ] ++ } + }