From 5123749ca6d10705559166fa96ec7b79cfc78604 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 7 Mar 2021 21:16:47 +0100 Subject: [PATCH 1/2] qt5-webengine: update to 5.15.3. --- ...a_audio_linux_audio_manager_linux.cc.patch | 43 ---------- ...src_3rdparty_chromium_media_BUILD.gn.patch | 12 --- ...dparty_chromium_media_audio_BUILD.gn.patch | 23 ----- ...ty_chromium_media_media__options.gni.patch | 12 --- ...te-instead-of-_libc_fpstate-on-linux.patch | 42 --------- .../patches/0001-mus-cstring.patch | 10 +++ .../patches/0004-musl-no-mallinfo.patch | 11 ++- .../qt5-webengine/patches/0015-yasm-nls.patch | 13 --- .../patches/0021-sandbox-sched_getparam.patch | 8 +- .../patches/0089-enable-ppc64.patch | 16 ++-- .../patches/0090-qtwebengine-ppc64.patch | 41 ++------- .../qt5-webengine/patches/0100-sndio.patch | 2 +- .../qt5-webengine/patches/0101-sndio.patch | 85 +++++++++++++++++++ .../qt5-webengine/patches/0110-size_t.patch | 6 +- srcpkgs/qt5-webengine/template | 55 ++++++------ srcpkgs/qt5-webengine/update | 1 + 16 files changed, 155 insertions(+), 225 deletions(-) delete mode 100644 srcpkgs/qt5-webengine/files/sndio-patches/media_audio_linux_audio_manager_linux.cc.patch delete mode 100644 srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_BUILD.gn.patch delete mode 100644 srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_audio_BUILD.gn.patch delete mode 100644 srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_media__options.gni.patch delete mode 100644 srcpkgs/qt5-webengine/patches/0001-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch create mode 100644 srcpkgs/qt5-webengine/patches/0001-mus-cstring.patch delete mode 100644 srcpkgs/qt5-webengine/patches/0015-yasm-nls.patch create mode 100644 srcpkgs/qt5-webengine/patches/0101-sndio.patch create mode 100644 srcpkgs/qt5-webengine/update diff --git a/srcpkgs/qt5-webengine/files/sndio-patches/media_audio_linux_audio_manager_linux.cc.patch b/srcpkgs/qt5-webengine/files/sndio-patches/media_audio_linux_audio_manager_linux.cc.patch deleted file mode 100644 index cf8e81b11d6..00000000000 --- a/srcpkgs/qt5-webengine/files/sndio-patches/media_audio_linux_audio_manager_linux.cc.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/chromium/media/audio/linux/audio_manager_linux.cc b/chromium/media/audio/linux/audio_manager_linux.cc -index 5d703549372..9e60b40c749 100644 ---- media/audio/linux/audio_manager_linux.cc -+++ media/audio/linux/audio_manager_linux.cc -@@ -20,6 +20,10 @@ - #include "media/audio/pulse/audio_manager_pulse.h" - #include "media/audio/pulse/pulse_util.h" - #endif -+#if defined(USE_SNDIO) -+#include -+#include "media/audio/openbsd/audio_manager_openbsd.h" -+#endif - - namespace media { - -@@ -27,7 +31,8 @@ enum LinuxAudioIO { - kPulse, - kAlsa, - kCras, -- kAudioIOMax = kCras // Must always be equal to largest logged entry. -+ kSndio, -+ kAudioIOMax = kSndio // Must always be equal to largest logged entry. - }; - - std::unique_ptr CreateAudioManager( -@@ -41,6 +46,17 @@ std::unique_ptr CreateAudioManager( - } - #endif - -+#if defined(USE_SNDIO) -+ struct sio_hdl * hdl = NULL; -+ if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) != NULL) { -+ sio_close(hdl); -+ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax +1); -+ return std::make_unique(std::move(audio_thread), -+ audio_log_factory); -+ } -+ DVLOG(1) << "Sndio is not available on the OS"; -+#endif -+ - #if defined(USE_PULSEAUDIO) - pa_threaded_mainloop* pa_mainloop = nullptr; - pa_context* pa_context = nullptr; diff --git a/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_BUILD.gn.patch b/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_BUILD.gn.patch deleted file mode 100644 index ec604002668..00000000000 --- a/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_BUILD.gn.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- media/BUILD.gn 2020-03-24 10:16:30.000000000 +0100 -+++ - 2020-04-06 14:32:27.960817513 +0200 -@@ -65,6 +65,9 @@ - if (use_cras) { - defines += [ "USE_CRAS" ] - } -+ if (use_sndio) { -+ defines += [ "USE_SNDIO" ] -+ } - } - - # Internal grouping of the configs necessary to support sub-folders having their diff --git a/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_audio_BUILD.gn.patch b/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_audio_BUILD.gn.patch deleted file mode 100644 index b3700eef898..00000000000 --- a/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_audio_BUILD.gn.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- media/audio/BUILD.gn 2020-03-24 10:16:30.000000000 +0100 -+++ - 2020-04-06 14:31:28.871450217 +0200 -@@ -232,9 +232,19 @@ - deps += [ "//media/base/android:media_jni_headers" ] - } - -- if (is_linux) { -+ if (is_linux && use_sndio) { - sources += [ "linux/audio_manager_linux.cc" ] - } -+ if (use_sndio) { -+ libs += [ "sndio" ] -+ sources += [ -+ "openbsd/audio_manager_openbsd.cc", -+ "sndio/sndio_input.cc", -+ "sndio/sndio_input.h", -+ "sndio/sndio_output.cc", -+ "sndio/sndio_output.h" -+ ] -+ } - - if (use_alsa) { - libs += [ "asound" ] diff --git a/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_media__options.gni.patch b/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_media__options.gni.patch deleted file mode 100644 index 14807d8e1d3..00000000000 --- a/srcpkgs/qt5-webengine/files/sndio-patches/src_3rdparty_chromium_media_media__options.gni.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- media/media_options.gni 2020-03-24 10:16:30.000000000 +0100 -+++ - 2020-04-06 14:29:22.958630783 +0200 -@@ -114,6 +114,9 @@ - # Enables runtime selection of ALSA library for audio. - use_alsa = false - -+ # Enables runtime selection of sndio library for audio. -+ use_sndio = false -+ - # Alsa should be used on non-Android, non-Mac POSIX systems. - # Alsa should be used on desktop Chromecast and audio-only Chromecast builds. - if (is_posix && !is_android && !is_mac && diff --git a/srcpkgs/qt5-webengine/patches/0001-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch b/srcpkgs/qt5-webengine/patches/0001-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch deleted file mode 100644 index 3e787d1374e..00000000000 --- a/srcpkgs/qt5-webengine/patches/0001-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2018-06-15 09:47:20.000000000 +0200 -+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2018-09-07 22:21:28.521763716 +0200 -@@ -50,7 +50,7 @@ - // info: the collection of register structures. - #if defined(__i386__) || defined(__x86_64) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp); -+ const struct _fpstate* fp); - #elif defined(__aarch64__) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs); ---- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc 2018-06-15 09:47:20.000000000 +0200 -+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc 2018-09-07 22:21:45.766762688 +0200 -@@ -49,7 +49,7 @@ - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp) { -+ const struct _fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_X86_FULL | -@@ -97,7 +97,7 @@ - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fpregs) { -+ const struct _fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_AMD64_FULL; ---- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h 2018-06-15 09:47:20.000000000 +0200 -+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h 2018-09-07 23:36:32.049495285 +0200 -@@ -48,7 +48,7 @@ - #if defined(__aarch64__) - typedef struct fpsimd_context fpstate_t; - #elif !defined(__ARM_EABI__) && !defined(__mips__) --typedef struct _libc_fpstate fpstate_t; -+typedef struct _fpstate fpstate_t; - #endif - - // These entries store a list of memory regions that the client wants included diff --git a/srcpkgs/qt5-webengine/patches/0001-mus-cstring.patch b/srcpkgs/qt5-webengine/patches/0001-mus-cstring.patch new file mode 100644 index 00000000000..d4b22c77ce9 --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0001-mus-cstring.patch @@ -0,0 +1,10 @@ +--- a/src/3rdparty/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc 2021-03-08 10:30:42.504006604 +0100 ++++ - 2021-03-08 10:31:27.415366585 +0100 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "base/files/file_util.h" + #include "base/files/scoped_file.h" diff --git a/srcpkgs/qt5-webengine/patches/0004-musl-no-mallinfo.patch b/srcpkgs/qt5-webengine/patches/0004-musl-no-mallinfo.patch index b47e3774bbc..36900f90783 100644 --- a/srcpkgs/qt5-webengine/patches/0004-musl-no-mallinfo.patch +++ b/srcpkgs/qt5-webengine/patches/0004-musl-no-mallinfo.patch @@ -18,14 +18,14 @@ #endif MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc"); ---- qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2020-03-26 22:17:18.000000000 +0100 -++++ - 2020-04-08 13:30:26.065577091 +0200 -@@ -100,14 +100,14 @@ +--- qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2021-02-23 16:36:59.000000000 +0100 ++++ - 2021-03-07 21:03:38.579424720 +0100 +@@ -119,14 +119,14 @@ malloc_statistics_t stats = {0}; malloc_zone_statistics(nullptr, &stats); return stats.size_in_use; --#elif defined(OS_LINUX) || defined(OS_ANDROID) -+#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID) +-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) ++#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_CHROMEOS) || defined(OS_ANDROID) struct mallinfo minfo = mallinfo(); #if BUILDFLAG(USE_TCMALLOC) return minfo.uordblks; @@ -37,4 +37,3 @@ // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. return 0; #endif - diff --git a/srcpkgs/qt5-webengine/patches/0015-yasm-nls.patch b/srcpkgs/qt5-webengine/patches/0015-yasm-nls.patch deleted file mode 100644 index 22ac0420764..00000000000 --- a/srcpkgs/qt5-webengine/patches/0015-yasm-nls.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h -index 9e36539..f588083 100644 ---- qtwebengine/src/3rdparty/chromium//third_party/yasm/source/config/linux/config.h ---- qtwebengine/src/3rdparty/chromium//third_party/yasm/source/config/linux/config.h -@@ -5,7 +5,7 @@ - #define CPP_PROG "gcc -E" - - /* */ --#define ENABLE_NLS 1 -+/* #undef ENABLE_NLS 1 */ - - /* Define to 1 if you have the `abort' function. */ - #define HAVE_ABORT 1 diff --git a/srcpkgs/qt5-webengine/patches/0021-sandbox-sched_getparam.patch b/srcpkgs/qt5-webengine/patches/0021-sandbox-sched_getparam.patch index a574b994abc..d8c6aa15cf6 100644 --- a/srcpkgs/qt5-webengine/patches/0021-sandbox-sched_getparam.patch +++ b/srcpkgs/qt5-webengine/patches/0021-sandbox-sched_getparam.patch @@ -3,9 +3,9 @@ musl uses them for pthread_getschedparam() source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8ac24f52d382c5758e2445bf0206eff40e ---- a/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc 2020-09-01 13:02:34.000000000 +0200 -+++ - 2020-09-10 19:16:13.884275822 +0200 -@@ -88,11 +88,18 @@ +--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc 2021-02-23 16:36:59.000000000 +0100 ++++ - 2021-03-07 21:13:44.992079145 +0100 +@@ -93,11 +93,18 @@ case __NR_sysinfo: case __NR_times: case __NR_uname: @@ -21,6 +21,6 @@ source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8a case __NR_sched_getscheduler: case __NR_sched_setscheduler: +#endif - return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); + return RestrictSchedTarget(GetPolicyPid(), sysno); case __NR_prlimit64: // See crbug.com/662450 and setrlimit comment above. diff --git a/srcpkgs/qt5-webengine/patches/0089-enable-ppc64.patch b/srcpkgs/qt5-webengine/patches/0089-enable-ppc64.patch index 4cbec77d11b..4fb19ccdd2e 100644 --- a/srcpkgs/qt5-webengine/patches/0089-enable-ppc64.patch +++ b/srcpkgs/qt5-webengine/patches/0089-enable-ppc64.patch @@ -10,24 +10,24 @@ Subject: [PATCH 1/3] Enable ppc64 builds diff --git a/configure.pri b/configure.pri index 3a144e3f8..cabe8b24a 100644 ---- a/configure.pri -+++ b/configure.pri -@@ -144,6 +144,7 @@ defineTest(qtConfTest_detectArch) { - contains(QT_ARCH, "i386")|contains(QT_ARCH, "x86_64"): return(true) +--- a/configure.pri 2021-02-24 10:45:58.000000000 +0100 ++++ - 2021-03-07 21:18:43.124754796 +0100 +@@ -144,6 +144,7 @@ contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true) contains(QT_ARCH, "mips"): return(true) + contains(QT_ARCH, "mips64"): return(true) + contains(QT_ARCH, "power64"): return(true) qtLog("Architecture not supported.") return(false) } diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf index 512e2523b..e31123654 100644 ---- a/mkspecs/features/functions.prf -+++ b/mkspecs/features/functions.prf -@@ -87,6 +87,7 @@ defineReplace(gnArch) { - contains(qtArch, "arm64"): return(arm64) +--- a/mkspecs/features/functions.prf 2021-02-24 10:45:58.000000000 +0100 ++++ - 2021-03-07 21:19:21.345036293 +0100 +@@ -107,6 +107,7 @@ contains(qtArch, "mips"): return(mipsel) contains(qtArch, "mips64"): return(mips64el) + contains(qtArch, "mips64el"): return(mips64el) + contains(qtArch, "power64"): return(ppc64) return(unknown) } diff --git a/srcpkgs/qt5-webengine/patches/0090-qtwebengine-ppc64.patch b/srcpkgs/qt5-webengine/patches/0090-qtwebengine-ppc64.patch index 31cfa708409..43a29601a7e 100644 --- a/srcpkgs/qt5-webengine/patches/0090-qtwebengine-ppc64.patch +++ b/srcpkgs/qt5-webengine/patches/0090-qtwebengine-ppc64.patch @@ -1006,10 +1006,10 @@ index 000000000..07728e087 +//TODO: is it necessary to redefine ucontext on PPC64? + +#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_ -diff --git a/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc b/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc +diff --git a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc index 443e9114b..6df5678d6 100644 ---- a/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -+++ b/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc +--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc ++++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc @@ -15,6 +15,11 @@ #include "sandbox/linux/system_headers/linux_syscalls.h" #include "services/service_manager/sandbox/linux/sandbox_linux.h" @@ -1702,16 +1702,16 @@ diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/memo index 43c86314c..27325b813 100644 --- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc +++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc -@@ -57,8 +57,9 @@ TEST(PageAllocatorTest, LargeObject) { +@@ -57,8 +57,9 @@ EXPECT_EQ(0U, allocator.pages_allocated()); - uint8_t *p = reinterpret_cast(allocator.Alloc(10000)); + uint8_t* p = reinterpret_cast(allocator.Alloc(10000)); + uint64_t expected_pages = 1 + ((10000 - 1) / getpagesize()); ASSERT_FALSE(p == NULL); - EXPECT_EQ(3U, allocator.pages_allocated()); + EXPECT_EQ(expected_pages, allocator.pages_allocated()); for (unsigned i = 1; i < 10; ++i) { - uint8_t *p = reinterpret_cast(allocator.Alloc(i)); + uint8_t* p = reinterpret_cast(allocator.Alloc(i)); ASSERT_FALSE(p == NULL); diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/processor/exploitability_linux.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/processor/exploitability_linux.cc index ccc9f1459..debaed4d6 100644 @@ -3178,8 +3178,7 @@ index 58bfa8f83..8fc37c464 100644 +#endif // !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64) #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL) sig == SIGILL || --#endif // defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL -+#endif // defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL) + #endif // defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL) sig == SIGPIPE || sig == SIGSEGV || #if defined(OS_MACOSX) @@ -3395,28 +3394,6 @@ index 597d8b6e5..99d1ec0c7 100644 (defined(__s390__) && !defined(__s390x__)) /* On these architectures, implement mmap() with mmap2(). */ LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, -diff --git a/src/3rdparty/chromium/third_party/node/node.py b/src/3rdparty/chromium/third_party/node/node.py -index 8097e2c49..10e6a16ea 100755 ---- a/src/3rdparty/chromium/third_party/node/node.py -+++ b/src/3rdparty/chromium/third_party/node/node.py -@@ -10,11 +10,12 @@ import sys - - - def GetBinaryPath(): -- return os_path.join(os_path.dirname(__file__), *{ -- 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'), -- 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), -- 'Windows': ('win', 'node.exe'), -- }[platform.system()]) -+ return "/usr/bin/node" -+ #return os_path.join(os_path.dirname(__file__), *{ -+ # 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'), -+ # 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), -+ # 'Windows': ('win', 'node.exe'), -+ #}[platform.system()]) - - - def RunNode(cmd_parts, stdout=None): diff --git a/src/3rdparty/chromium/third_party/pffft/src/pffft.c b/src/3rdparty/chromium/third_party/pffft/src/pffft.c index bdac4d784..51e0f2cac 100644 --- a/src/3rdparty/chromium/third_party/pffft/src/pffft.c @@ -3524,7 +3501,7 @@ diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/di index dd9ab457e..c005d9599 100644 --- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc +++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc -@@ -30,11 +30,7 @@ bool VectorDifference(const uint8_t* image1, const uint8_t* image2) { +@@ -30,11 +30,7 @@ static bool (*diff_proc)(const uint8_t*, const uint8_t*) = nullptr; if (!diff_proc) { @@ -3534,7 +3511,7 @@ index dd9ab457e..c005d9599 100644 - diff_proc = &VectorDifference_C; -#else +#if defined(WEBRTC_ARCH_X86_FAMILY) - bool have_sse2 = WebRtc_GetCPUInfo(kSSE2) != 0; + bool have_sse2 = GetCPUInfo(kSSE2) != 0; // For x86 processors, check if SSE2 is supported. if (have_sse2 && kBlockSize == 32) { @@ -44,6 +40,10 @@ bool VectorDifference(const uint8_t* image1, const uint8_t* image2) { diff --git a/srcpkgs/qt5-webengine/patches/0100-sndio.patch b/srcpkgs/qt5-webengine/patches/0100-sndio.patch index 38e18d89a6b..4224f15fbd6 100644 --- a/srcpkgs/qt5-webengine/patches/0100-sndio.patch +++ b/srcpkgs/qt5-webengine/patches/0100-sndio.patch @@ -7,7 +7,7 @@ + qtConfig(webengine-sndio) { + gn_args += use_sndio=true + } else { -+ gn_args += use_sndio=true ++ gn_args += use_sndio=false + } + !packagesExist(libpci): gn_args += use_libpci=false diff --git a/srcpkgs/qt5-webengine/patches/0101-sndio.patch b/srcpkgs/qt5-webengine/patches/0101-sndio.patch new file mode 100644 index 00000000000..c60f690596d --- /dev/null +++ b/srcpkgs/qt5-webengine/patches/0101-sndio.patch @@ -0,0 +1,85 @@ +--- a/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc ++++ b/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc +@@ -20,6 +20,10 @@ + #include "media/audio/pulse/audio_manager_pulse.h" + #include "media/audio/pulse/pulse_util.h" + #endif ++#if defined(USE_SNDIO) ++#include ++#include "media/audio/openbsd/audio_manager_openbsd.h" ++#endif + + namespace media { + +@@ -27,7 +31,8 @@ enum LinuxAudioIO { + kPulse, + kAlsa, + kCras, +- kAudioIOMax = kCras // Must always be equal to largest logged entry. ++ kSndio, ++ kAudioIOMax = kSndio // Must always be equal to largest logged entry. + }; + + std::unique_ptr CreateAudioManager( +@@ -41,6 +46,17 @@ std::unique_ptr CreateAudioManager( + } + #endif + ++#if defined(USE_SNDIO) ++ struct sio_hdl * hdl = NULL; ++ if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) != NULL) { ++ sio_close(hdl); ++ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax +1); ++ return std::make_unique(std::move(audio_thread), ++ audio_log_factory); ++ } ++ DVLOG(1) << "Sndio is not available on the OS"; ++#endif ++ + #if defined(USE_PULSEAUDIO) + pa_threaded_mainloop* pa_mainloop = nullptr; + pa_context* pa_context = nullptr; +--- a/src/3rdparty/chromium/media/BUILD.gn 2020-03-24 10:16:30.000000000 +0100 ++++ - 2020-04-06 14:32:27.960817513 +0200 +@@ -65,6 +65,9 @@ + if (use_cras) { + defines += [ "USE_CRAS" ] + } ++ if (use_sndio) { ++ defines += [ "USE_SNDIO" ] ++ } + } + + # Internal grouping of the configs necessary to support sub-folders having their +--- a/src/3rdparty/chromium/media/media_options.gni 2020-03-24 10:16:30.000000000 +0100 ++++ - 2020-04-06 14:29:22.958630783 +0200 +@@ -114,6 +114,9 @@ + # Enables runtime selection of ALSA library for audio. + use_alsa = false + ++ # Enables runtime selection of sndio library for audio. ++ use_sndio = false ++ + # Alsa should be used on non-Android, non-Mac POSIX systems. + # Alsa should be used on desktop Chromecast and audio-only Chromecast builds. + if (is_posix && !is_android && !is_mac && +--- a/src/3rdparty/chromium/media/audio/BUILD.gn 2021-02-23 16:36:59.000000000 +0100 ++++ - 2021-03-07 22:00:34.889682069 +0100 +@@ -238,6 +238,17 @@ + sources += [ "linux/audio_manager_linux.cc" ] + } + ++ if (use_sndio) { ++ libs += [ "sndio" ] ++ sources += [ ++ "openbsd/audio_manager_openbsd.cc", ++ "sndio/sndio_input.cc", ++ "sndio/sndio_input.h", ++ "sndio/sndio_output.cc", ++ "sndio/sndio_output.h" ++ ] ++ } ++ + if (use_alsa) { + libs += [ "asound" ] + sources += [ diff --git a/srcpkgs/qt5-webengine/patches/0110-size_t.patch b/srcpkgs/qt5-webengine/patches/0110-size_t.patch index 224072e37ca..462e3202279 100644 --- a/srcpkgs/qt5-webengine/patches/0110-size_t.patch +++ b/srcpkgs/qt5-webengine/patches/0110-size_t.patch @@ -1,6 +1,6 @@ ---- a/src/3rdparty/chromium/third_party/angle/include/platform/Platform.h 2020-05-06 16:21:29.000000000 +0200 -+++ b/src/3rdparty/chromium/third_party/angle/include/platform/Platform.h 2020-09-04 00:31:10.504555635 +0200 -@@ -236,11 +236,11 @@ +--- a/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h 2021-02-23 16:36:59.000000000 +0100 ++++ - 2021-03-07 21:44:25.477989726 +0100 +@@ -239,11 +239,11 @@ using ProgramKeyType = std::array; using CacheProgramFunc = void (*)(PlatformMethods *platform, const ProgramKeyType &key, diff --git a/srcpkgs/qt5-webengine/template b/srcpkgs/qt5-webengine/template index edc84557bd3..42c136e03a5 100644 --- a/srcpkgs/qt5-webengine/template +++ b/srcpkgs/qt5-webengine/template @@ -1,17 +1,19 @@ # Template file for 'qt5-webengine' pkgname=qt5-webengine -version=5.15.2 -revision=2 +version=5.15.3 +revision=1 +_commit=a059e7404a6db799f4da0ad696e65ae9c854b4b0 +_chromium_commit=d9d9e606cb34b1b4ac0f44de132b1eb10763f1f6 archs="x86_64* i686* armv[67]* ppc64* aarch64*" -wrksrc="qtwebengine-everywhere-src-${version}" +wrksrc="qtwebengine-${_commit}" build_style=qmake configure_args="-- -webengine-icu -webengine-ffmpeg -webengine-opus -webengine-webp -webengine-pepper-plugins -webengine-printing-and-pdf -webengine-proprietary-codecs -webengine-pulseaudio -webengine-spellchecker -webengine-webrtc -webengine-geolocation - -webengine-kerberos -no-webengine-embedded-build" + -webengine-kerberos -no-webengine-embedded-build $(vopt_if sndio '' '-no')-webengine-sndio" # Rely on auto detection (fails if forced for cross builds) -webengine-alsa -hostmakedepends="qt5-qmake gperf ninja qt5-host-tools flex pkg-config +hostmakedepends="qt5-qmake gperf ninja qt5-host-tools flex pkg-config nodejs which perl python protobuf nss-devel libevent-devel zlib-devel icu-devel" makedepends="qt5-webchannel-devel qt5-location-devel qt5-tools-devel qt5-devel qt5-declarative-devel libevent-devel snappy-devel icu-devel ffmpeg-devel @@ -24,18 +26,15 @@ short_desc="Cross-platform application and UI framework (QT5) - WebEngine compon maintainer="John " license="GPL-3.0-or-later, LGPL-3.0-or-later" homepage="https://qt.io/" -distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebengine-everywhere-src-${version}.tar.xz" -checksum=c8afca0e43d84f7bd595436fbe4d13a5bbdb81ec5104d605085d07545b6f91e0 +distfiles="https://github.com/qt/qtwebengine/archive/${_commit}.tar.gz + https://github.com/qt/qtwebengine-chromium/archive/${_chromium_commit}.tar.gz" +checksum="8e86257d25a641939d50c14de2049b384c371fcb70a60a289dc5426be0423b40 + ee97e569529a60729e3c6b7317011fd2cc40600079e90c4afa2e5ea9edcd58ef" patch_args="-Np1" build_options="sndio" build_options_default="" - -if [ "$build_option_sndio" ]; then - configure_args+=" -sndio" -fi - if [ "$XBPS_TARGET_LIBC" = "musl" ]; then makedepends+=" musl-legacy-compat" fi @@ -112,20 +111,21 @@ _cleanup_wrksrc_leak() { -e "s;${wrksrc}/qtbase;/usr/lib/qt5;g" \; } +post_extract() { + rmdir ${wrksrc}/src/3rdparty + mv -v ${wrksrc}/../qtwebengine-chromium-${_chromium_commit} ${wrksrc}/src/3rdparty + # ¯\_(ツ)_/¯ + mkdir -p ${wrksrc}/.git ${wrksrc}/src/3rdparty/chromium/.git +} + post_patch() { - if [ "$build_option_sndio" ]; then - mkdir -p ${wrksrc}/src/3rdparty/chromium/media/audio/{sndio,openbsd} - cp ${FILESDIR}/sndio-files/sndio_*put.* \ - ${wrksrc}/src/3rdparty/chromium/media/audio/sndio - cp ${FILESDIR}/sndio-files/audio_manager_openbsd.* \ - ${wrksrc}/src/3rdparty/chromium/media/audio/openbsd - for f in "${FILESDIR}"/sndio-patches/*.patch; do - cd src/3rdparty/chromium/ - echo "Applying $f" - patch -Np0 -i "$f" - cd "$wrksrc" - done - fi + mkdir -p ${wrksrc}/src/3rdparty/chromium/media/audio/{sndio,openbsd} + cp ${FILESDIR}/sndio-files/sndio_*put.* \ + ${wrksrc}/src/3rdparty/chromium/media/audio/sndio + cp ${FILESDIR}/sndio-files/audio_manager_openbsd.* \ + ${wrksrc}/src/3rdparty/chromium/media/audio/openbsd + # Eternal 5.15.2, this can't ever be increased since other components are 5.15.2 + sed -e "/^MODULE_VERSION/s/5.*/5.15.2/" -i .qmake.conf } pre_configure() { @@ -163,10 +163,13 @@ pre_configure() { pre_build() { export NINJAJOBS=${makejobs} + # Qt used to preped ulimit in front of $$QMAKE_LINK + # but they do not do this anymore if ccache is in use + ulimit -n 4096 } qt5-webengine-devel_package() { - depends="qt5-devel>=${version} ${sourcepkg}>=${version}_${revision}" + depends="qt5-devel>=5.15.2_1 ${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include diff --git a/srcpkgs/qt5-webengine/update b/srcpkgs/qt5-webengine/update new file mode 100644 index 00000000000..405c90aeb6b --- /dev/null +++ b/srcpkgs/qt5-webengine/update @@ -0,0 +1 @@ +pkgname="${pkgname/5-/}-everywhere-src" From bf9352df0af466f72aa1ae09e6cdcf13a0324e50 Mon Sep 17 00:00:00 2001 From: Reed Wade Date: Tue, 2 Mar 2021 19:46:15 +0100 Subject: [PATCH 2/2] qt5-webengine: enable WebRTC screen sharing via PipeWire closes #29191 --- srcpkgs/qt5-webengine/template | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/srcpkgs/qt5-webengine/template b/srcpkgs/qt5-webengine/template index 42c136e03a5..795ad3a968d 100644 --- a/srcpkgs/qt5-webengine/template +++ b/srcpkgs/qt5-webengine/template @@ -11,7 +11,8 @@ configure_args="-- -webengine-icu -webengine-ffmpeg -webengine-opus -webengine-webp -webengine-pepper-plugins -webengine-printing-and-pdf -webengine-proprietary-codecs -webengine-pulseaudio -webengine-spellchecker -webengine-webrtc -webengine-geolocation - -webengine-kerberos -no-webengine-embedded-build $(vopt_if sndio '' '-no')-webengine-sndio" + -webengine-kerberos -no-webengine-embedded-build $(vopt_if sndio '' '-no')-webengine-sndio + $(vopt_if pipewire '' '-no')-webengine-webrtc-pipewire" # Rely on auto detection (fails if forced for cross builds) -webengine-alsa hostmakedepends="qt5-qmake gperf ninja qt5-host-tools flex pkg-config nodejs which perl python protobuf nss-devel libevent-devel zlib-devel icu-devel" @@ -21,7 +22,7 @@ makedepends="qt5-webchannel-devel qt5-location-devel qt5-tools-devel qt5-devel libvpx-devel re2-devel libXtst-devel libXcursor-devel libXcomposite-devel jsoncpp-devel harfbuzz-devel lcms2-devel protobuf-devel pulseaudio-devel libXrandr-devel MesaLib-devel mit-krb5-devel alsa-lib-devel libxkbcommon-devel - $(vopt_if sndio sndio-devel)" + $(vopt_if sndio sndio-devel) $(vopt_if pipewire libpipewire0.2-devel)" short_desc="Cross-platform application and UI framework (QT5) - WebEngine component" maintainer="John " license="GPL-3.0-or-later, LGPL-3.0-or-later" @@ -32,8 +33,9 @@ checksum="8e86257d25a641939d50c14de2049b384c371fcb70a60a289dc5426be0423b40 ee97e569529a60729e3c6b7317011fd2cc40600079e90c4afa2e5ea9edcd58ef" patch_args="-Np1" -build_options="sndio" -build_options_default="" +build_options="sndio pipewire" +build_options_default="pipewire" +desc_option_pipewire="Enable support for screen sharing for WebRTC via PipeWire" if [ "$XBPS_TARGET_LIBC" = "musl" ]; then makedepends+=" musl-legacy-compat"