pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

qt5-qtwebengine: teach webrtc how to get number of cpus



Module Name:	pkgsrc-wip
Committed By:	Mark Davies <mark%ecs.vuw.ac.nz@localhost>
Pushed By:	markd
Date:		Thu Apr 15 15:40:29 2021 +1200
Changeset:	138be9239e9a942b6f1a8706dd719e18127ad478

Modified Files:
	qt5-qtwebengine/distinfo
Added Files:
	qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_cpu__info.cc

Log Message:
qt5-qtwebengine: teach webrtc how to get number of cpus

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=138be9239e9a942b6f1a8706dd719e18127ad478

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 qt5-qtwebengine/distinfo                           |  1 +
 ...rty_webrtc_system__wrappers_source_cpu__info.cc | 25 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)

diffs:
diff --git a/qt5-qtwebengine/distinfo b/qt5-qtwebengine/distinfo
index f2c9db617e..bf30549a97 100644
--- a/qt5-qtwebengine/distinfo
+++ b/qt5-qtwebengine/distinfo
@@ -715,6 +715,7 @@ SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h) = fd09b6e581356b8c17f551d638dcd934ed075b72
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread__types.cc) = 5390c6653d9363623773c063a8c5735507731a00
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn) = a5a57d0972cf83f1aef3d1cfc67f2e92af4bd8eb
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_cpu__info.cc) = 34c8f11a2211fc64fae3bec08bf9bebcb25e960b
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_test_BUILD.gn) = 1fc87d27062b9df8407de9947040c5304a1a03a9
 SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni) = 1bda0abade71dc886a985669a1f5df2a05058fe7
 SHA1 (patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn) = 18506e4b597a4a85b53a4e97012db3419fae7226
diff --git a/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_cpu__info.cc b/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_cpu__info.cc
new file mode 100644
index 0000000000..300a7e984d
--- /dev/null
+++ b/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_cpu__info.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_info.cc.orig	2020-11-07 01:22:36.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_info.cc
+@@ -16,6 +16,8 @@
+ #include <unistd.h>
+ #elif defined(WEBRTC_MAC)
+ #include <sys/sysctl.h>
++#elif defined(WEBRTC_BSD)
++#include <sys/sysctl.h>
+ #elif defined(WEBRTC_FUCHSIA)
+ #include <zircon/syscalls.h>
+ #endif
+@@ -36,7 +38,10 @@ static int DetectNumberOfCores() {
+     RTC_LOG(LS_ERROR) << "Failed to get number of cores";
+     number_of_cores = 1;
+   }
+-#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
++#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) || defined(WEBRTC_BSD)
++#if !defined(HW_AVAILCPU) && defined(HW_NCPUONLINE)
++#define HW_AVAILCPU HW_NCPUONLINE
++#endif
+   int name[] = {CTL_HW, HW_AVAILCPU};
+   size_t size = sizeof(number_of_cores);
+   if (0 != sysctl(name, 2, &number_of_cores, &size, NULL, 0)) {


Home | Main Index | Thread Index | Old Index