$NetBSD: patch-third__party_libwebrtc_modules_desktop__capture_desktop__capture__gn_moz.build,v 1.4 2024/04/06 08:53:35 ryoon Exp $ * Disable Wayland desktop capture for non-Linux platforms. Fix segfault under X11. --- third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.orig 2024-03-11 10:11:56.287869888 +0000 +++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build @@ -392,7 +392,7 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" -if CONFIG["TARGET_CPU"] == "aarch64" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"): +if CONFIG["TARGET_CPU"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": DEFINES["WEBRTC_USE_PIPEWIRE"] = True DEFINES["_GNU_SOURCE"] = True @@ -449,7 +449,7 @@ if CONFIG["OS_TARGET"] == "Linux" and CO "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" ] -if CONFIG["TARGET_CPU"] == "x86" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"): +if CONFIG["TARGET_CPU"] == "x86" and CONFIG["OS_TARGET"] == "Linux": CXXFLAGS += [ "-msse2" @@ -482,7 +482,7 @@ if CONFIG["TARGET_CPU"] == "x86" and (CO "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc" ] -if CONFIG["TARGET_CPU"] == "x86_64" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"): +if CONFIG["TARGET_CPU"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": DEFINES["WEBRTC_USE_PIPEWIRE"] = True DEFINES["_GNU_SOURCE"] = True @@ -628,6 +628,10 @@ if CONFIG["TARGET_CPU"] == "x86" and CON DEFINES["USE_X11"] = "1" DEFINES["WEBRTC_USE_X11"] = True + CXXFLAGS += [ + "-msse2" + ] + OS_LIBS += [ "X11", "Xcomposite",