ports/multimedia/gstreamer1-plugins-bad/files/patch-ext_webrtc_meson.build

33 lines
1.1 KiB
Text

--- ext/webrtc/meson.build.orig 2025-03-11 20:14:44 UTC
+++ ext/webrtc/meson.build
@@ -1,3 +1,4 @@
+if get_option('webrtc').enabled()
webrtc_sources = [
'gstwebrtc.c',
'gstwebrtcstats.c',
@@ -35,6 +36,14 @@ plugin_sources += {
'webrtc': pathsep.join(doc_sources)
}
+if not is_variable('libgstwebrtcnice_dep')
+ subdir_done()
+endif
+
+if not is_variable('gstsctp_dep')
+ gstsctp_dep=cc.find_library('gstsctp-1.0', required : true)
+endif
+
webrtc_option = get_option('webrtc').require(
libgstwebrtcnice_dep.found(), error_message: 'webrtc plugin requires libgstwebrtcnice.')
if webrtc_option.disabled()
@@ -46,8 +55,9 @@ gstwebrtc_plugin = library('gstwebrtc',
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
include_directories : [configinc],
dependencies : [gstbase_dep, gstsdp_dep,
- gstapp_dep, gstwebrtc_dep, gstsctp_dep, gstrtp_dep, gio_dep, libgstwebrtcnice_dep],
+ gstapp_dep, gstwebrtc_dep, dependency('gstreamer-sctp-1.0'), gstrtp_dep, gio_dep, libgstwebrtcnice_dep],
install : true,
install_dir : plugins_install_dir,
)
plugins += [gstwebrtc_plugin]
+endif