aboutsummaryrefslogtreecommitdiff
path: root/www/qt5-webengine
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2019-06-13 08:44:39 +0000
committerKai Knoblich <kai@FreeBSD.org>2019-06-13 08:44:39 +0000
commitc85e9292c90c5c413920a207c55bb8f28dc84254 (patch)
tree5e1657a1b5a0b11d7361ccd194530acdb2519969 /www/qt5-webengine
parent27467122ded598481c92909e49dd97b13b7edac1 (diff)
downloadports-c85e9292c90c5c413920a207c55bb8f28dc84254.tar.gz
ports-c85e9292c90c5c413920a207c55bb8f28dc84254.zip
www/qt5-webengine: Enable support for WebRTC and video capture devices
When accessing video capture devices warnings like below are emitted [2]: [40533:463527936:0420/214650.072475:ERROR:create_video_capture_device_factory.cc(58)] Not implemented reached in std::unique_ptr<VideoCaptureDeviceFactory> media::(anonymous namespace)::CreatePlatformSpecificVideoCaptureDeviceFactory(scoped_refptr<base::SingleThreadTaskRunner>) Also websites that want to access the camera, microphone, etc. exhibit broken behavior, e.g. no dialogs to permit access on the desired capture devices come up. [1] Thus add the related patches from www/chromium [2] that enable support for video capture devices and explicitly activate the WebRTC feature. [1] PR: 236915 [1], 237423 [2] Submitted by: cmt [2] Reported by: thea20lineisameme@protonmail.com [1] Reviewed by: rakuco, tcberner (kde), Lorenzo Salvadore Approved by: tcberner (kde) Differential Revision: https://reviews.freebsd.org/D19900
Notes
Notes: svn path=/head/; revision=504068
Diffstat (limited to 'www/qt5-webengine')
-rw-r--r--www/qt5-webengine/Makefile5
-rw-r--r--www/qt5-webengine/files/patch-clang11
-rw-r--r--www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc20
-rw-r--r--www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.cc11
-rw-r--r--www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.h11
-rw-r--r--www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni11
6 files changed, 55 insertions, 14 deletions
diff --git a/www/qt5-webengine/Makefile b/www/qt5-webengine/Makefile
index 2292e6c9b373..a5ba15fd9ff4 100644
--- a/www/qt5-webengine/Makefile
+++ b/www/qt5-webengine/Makefile
@@ -8,8 +8,6 @@
# - We are using several stub files, especially in Chromium's base/ and net/
# layers. We should look at implementing the missing bits instead.
# - We are currently not using any sandboxing mechanism.
-# - We are disabling support for features such as WebRTC. We need to see what
-# it would take to properly support them.
# - We need to see if more "use_system_<FOO>" flags can be passed.
# - The process of porting QtWebEngine needs to be documented so we can move to
# newer releases more easily.
@@ -20,6 +18,7 @@
PORTNAME= webengine
DISTVERSION= ${QT5_VERSION}
+PORTREVISION= 1
CATEGORIES= www
PKGNAMEPREFIX= qt5-
@@ -85,7 +84,7 @@ USE_XORG= x11 xcb xcomposite xcursor xext xi xorgproto \
USE_LDCONFIG= ${QT_LIBDIR}
-QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg -disable-webrtc
+QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg
# We could just set it to an empty string as well. "all" does not account for
# dependencies correctly in the generated Makefiles, use the right target here.
diff --git a/www/qt5-webengine/files/patch-clang b/www/qt5-webengine/files/patch-clang
index 7ac47c2f9150..4a041d8c1a7e 100644
--- a/www/qt5-webengine/files/patch-clang
+++ b/www/qt5-webengine/files/patch-clang
@@ -38,6 +38,17 @@
EXPECT_CALL(callback_, OnError()).Times(2);
+--- src/3rdparty/chromium/third_party/libjingle_xmpp/task_runner/taskrunner.cc.orig 2019-03-07 09:23:57 UTC
++++ src/3rdparty/chromium/third_party/libjingle_xmpp/task_runner/taskrunner.cc
+@@ -95,7 +95,7 @@ void TaskRunner::InternalRunTasks(bool in_destructor)
+ std::vector<Task *>::iterator it;
+ it = std::remove(tasks_.begin(),
+ tasks_.end(),
+- reinterpret_cast<Task *>(NULL));
++ static_cast<Task *>(NULL));
+
+ tasks_.erase(it, tasks_.end());
+
--- src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc
@@ -439,7 +439,7 @@ CMapTable::CMapFormat0::Builder::Builder(
diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc
new file mode 100644
index 000000000000..667722536567
--- /dev/null
+++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc
@@ -0,0 +1,20 @@
+--- src/3rdparty/chromium/media/capture/video/create_video_capture_device_factory.cc.orig 2019-03-07 09:23:57 UTC
++++ src/3rdparty/chromium/media/capture/video/create_video_capture_device_factory.cc
+@@ -10,7 +10,7 @@
+ #include "media/capture/video/fake_video_capture_device_factory.h"
+ #include "media/capture/video/file_video_capture_device_factory.h"
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "media/capture/video/linux/video_capture_device_factory_linux.h"
+ #elif defined(OS_CHROMEOS)
+ #include "media/capture/video/chromeos/public/cros_features.h"
+@@ -31,7 +31,7 @@ namespace {
+ std::unique_ptr<VideoCaptureDeviceFactory>
+ CreatePlatformSpecificVideoCaptureDeviceFactory(
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ return std::make_unique<VideoCaptureDeviceFactoryLinux>(ui_task_runner);
+ #elif defined(OS_CHROMEOS)
+ // On Chrome OS we have to support two use cases:
diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.cc
new file mode 100644
index 000000000000..a17f0b87ce6a
--- /dev/null
+++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/media/capture/video/shared_memory_handle_provider.cc.orig 2019-03-07 09:23:57 UTC
++++ src/3rdparty/chromium/media/capture/video/shared_memory_handle_provider.cc
+@@ -63,7 +63,7 @@ bool SharedMemoryHandleProvider::InitFromMojoHandle(
+ return true;
+ }
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ bool SharedMemoryHandleProvider::InitAsReadOnlyFromRawFileDescriptor(
+ mojo::ScopedHandle fd_handle,
+ uint32_t memory_size_in_bytes) {
diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.h
new file mode 100644
index 000000000000..7ccc971368ef
--- /dev/null
+++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_shared__memory__handle__provider.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/media/capture/video/shared_memory_handle_provider.h.orig 2019-03-07 09:23:57 UTC
++++ src/3rdparty/chromium/media/capture/video/shared_memory_handle_provider.h
+@@ -38,7 +38,7 @@ class CAPTURE_EXPORT SharedMemoryHandleProvider
+
+ // This requires platforms where base::SharedMemoryHandle is backed by a
+ // file descriptor.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ bool InitAsReadOnlyFromRawFileDescriptor(mojo::ScopedHandle fd_handle,
+ uint32_t memory_size_in_bytes);
+ #endif // defined(OS_LINUX)
diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni
deleted file mode 100644
index 6b7a0160810e..000000000000
--- a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/webrtc.gni.orig 2018-11-13 18:25:11 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/webrtc.gni
-@@ -206,7 +206,7 @@ rtc_libvpx_dir = "//third_party/libvpx"
- rtc_opus_dir = "//third_party/opus"
-
- # Desktop capturer is supported only on Windows, OSX and Linux.
--rtc_desktop_capture_supported = is_win || is_mac || (is_linux && rtc_use_x11)
-+rtc_desktop_capture_supported = is_win || is_mac || ((is_linux && rtc_use_x11) && !is_bsd)
-
- ###############################################################################
- # Templates