Index: www/qt5-webengine/Makefile =================================================================== --- www/qt5-webengine/Makefile +++ www/qt5-webengine/Makefile @@ -18,7 +18,6 @@ PORTNAME= webengine DISTVERSION= ${QT5_VERSION} -PORTREVISION= 4 CATEGORIES= www PKGNAMEPREFIX= qt5- @@ -49,7 +48,7 @@ libwebp.so:graphics/webp DISTINFO_FILE= ${.CURDIR}/distinfo -QT5_VERSION= 5.12.2 +QT5_VERSION= 5.13.0 OPTIONS_SINGLE= AUDIO OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO SNDIO @@ -74,7 +73,7 @@ # whether webenginewidgets is available, which fails when qmake processes all # .pro files at once. USES= gl gnome gperf jpeg python:2.7,build pkgconfig \ - qmake:norecursive,outsource qt-dist:5,webengine shebangfix + qmake:norecursive,outsource qt-dist:5,webengine shebangfix xorg USE_GL= gl USE_GNOME= glib20 libxml2 libxslt USE_QT= core declarative designer gui location network webchannel \ Index: www/qt5-webengine/distinfo =================================================================== --- www/qt5-webengine/distinfo +++ www/qt5-webengine/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1553273996 -SHA256 (KDE/Qt/5.12.2/qtwebengine-everywhere-src-5.12.2.tar.xz) = 082b1d6e60c1be61881bc8533acc67d9688620d6b3a538417f62b27b34ead493 -SIZE (KDE/Qt/5.12.2/qtwebengine-everywhere-src-5.12.2.tar.xz) = 249240772 +TIMESTAMP = 1561322470 +SHA256 (KDE/Qt/5.13.0/qtwebengine-everywhere-src-5.13.0.tar.xz) = e0af82ecee1ab41b6732697f667b98b7b0c53164bebcfaad8070e88b2e064efe +SIZE (KDE/Qt/5.13.0/qtwebengine-everywhere-src-5.13.0.tar.xz) = 256899724 Index: www/qt5-webengine/files/freebsd.pri =================================================================== --- www/qt5-webengine/files/freebsd.pri +++ www/qt5-webengine/files/freebsd.pri @@ -8,6 +8,4 @@ # Once the port works better, we can think about readding the diverse `use_system_` # for bundled libraries. # For now, only add very few system libraries. -gn_args += use_system_yasm=true \ - use_system_libusb=true \ - use_system_libcxx=true +gn_args += use_system_yasm=true Index: www/qt5-webengine/files/patch-clang =================================================================== --- www/qt5-webengine/files/patch-clang +++ www/qt5-webengine/files/patch-clang @@ -40,7 +40,7 @@ --- 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) +@@ -80,7 +80,7 @@ void TaskRunner::InternalRunTasks(bool in_destructor) std::vector::iterator it; it = std::remove(tasks_.begin(), tasks_.end(), @@ -48,6 +48,7 @@ + static_cast(NULL)); tasks_.erase(it, tasks_.end()); + tasks_running_ = false; --- 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 Index: www/qt5-webengine/files/patch-configure.pri =================================================================== --- www/qt5-webengine/files/patch-configure.pri +++ /dev/null @@ -1,14 +0,0 @@ ---- configure.pri.orig 2018-11-27 04:10:38 UTC -+++ configure.pri -@@ -85,9 +85,9 @@ defineTest(qtConfTest_detectFlex) { - } - - defineTest(qtConfTest_detectGlibc) { -- ldd = $$qtConfFindInPath("ldd") -+ ldd = $$qtConfFindInPath("ld.bfd") - !isEmpty(ldd) { -- qtLog("Found ldd from path: $$ldd") -+ qtLog("Found ld.bfd from path: $$ldd") - qtRunLoggedCommand("$$ldd --version", version)|return(true) - version ~= 's/^.*[^0-9]\([0-9]*\.[0-9]*\).*$/\1/' - version = $$first(version) Index: www/qt5-webengine/files/patch-mkspecs_features_functions.prf =================================================================== --- www/qt5-webengine/files/patch-mkspecs_features_functions.prf +++ www/qt5-webengine/files/patch-mkspecs_features_functions.prf @@ -15,7 +15,7 @@ macos: return(mac) win32: return(win) linux: return(linux) -+ freebsd: return(bsd) ++ freebsd: return(freebsd) error(Unsupported platform) return(unknown) } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/BUILD.gn.orig 2019-01-16 10:59:47 UTC +--- src/3rdparty/chromium/BUILD.gn.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/BUILD.gn -@@ -356,7 +356,7 @@ group("gn_all") { +@@ -366,7 +366,7 @@ group("gn_all") { [ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ] } @@ -9,7 +9,7 @@ deps += [ "//third_party/breakpad:breakpad_unittests", "//third_party/breakpad:core-2-minidump", -@@ -398,8 +398,6 @@ group("gn_all") { +@@ -408,8 +408,6 @@ group("gn_all") { "//net:disk_cache_memory_test", "//net:quic_client", "//net:quic_server", @@ -18,7 +18,7 @@ "//testing:empty_main", ] -@@ -456,10 +454,6 @@ group("gn_all") { +@@ -466,10 +464,6 @@ group("gn_all") { "//chrome/test/chromedriver:chromedriver", "//chrome/test/chromedriver:chromedriver_tests", "//components/sync:run_sync_testserver", @@ -29,7 +29,7 @@ "//media/cast:generate_barcode_video", "//media/cast:generate_timecode_audio", "//net:crash_cache", -@@ -527,10 +521,6 @@ group("gn_all") { +@@ -536,10 +530,6 @@ group("gn_all") { "//mojo:mojo_perftests", "//services/service_manager/public/cpp", "//testing/gmock:gmock_main", @@ -40,16 +40,16 @@ ] if (!is_android) { -@@ -607,7 +597,7 @@ group("gn_all") { +@@ -614,7 +604,7 @@ group("gn_all") { host_os == "win" && !use_qt) { deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] } -- } else if (!is_android && !is_ios && !is_fuchsia) { -+ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { +- } else if (!is_android && !is_ios && !is_fuchsia && !is_win) { ++ } else if (!is_android && !is_ios && !is_fuchsia && !is_win && !is_bsd) { deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] } -@@ -833,7 +823,6 @@ if (is_chromeos) { +@@ -853,7 +843,6 @@ if (is_chromeos) { "//ppapi/examples/video_decode", "//sandbox/linux:chrome_sandbox", "//sandbox/linux:sandbox_linux_unittests", @@ -57,7 +57,7 @@ # Blocked on https://github.com/catapult-project/catapult/issues/2297 #"//third_party/catapult/telemetry:bitmaptools", -@@ -956,7 +945,7 @@ if (!is_ios && !use_qt) { +@@ -958,7 +947,7 @@ if (!is_ios && !use_qt) { ] } @@ -66,7 +66,7 @@ data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -965,7 +954,7 @@ if (!is_ios && !use_qt) { +@@ -967,7 +956,7 @@ if (!is_ios && !use_qt) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } @@ -75,7 +75,7 @@ data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1090,9 +1079,6 @@ group("chromium_builder_perf") { +@@ -1091,9 +1080,6 @@ group("chromium_builder_perf") { if (is_win) { data_deps += [ "//chrome/installer/mini_installer:mini_installer" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn @@ -1,17 +1,15 @@ ---- src/3rdparty/chromium/base/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/BUILD.gn -@@ -1248,8 +1248,8 @@ jumbo_component("base") { +@@ -1183,7 +1183,7 @@ jumbo_component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt)) && -- host_toolchain != "//build/toolchain/cros:host") { -+ if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt) && !is_clang && -+ host_toolchain != "//build/toolchain/cros:host")) { ++ if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt) && !is_clang) && + host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } - -@@ -1274,7 +1274,7 @@ jumbo_component("base") { +@@ -1209,7 +1209,7 @@ jumbo_component("base") { "allocator/allocator_shim_override_glibc_weak_symbols.h", ] deps += [ "//base/allocator:tcmalloc" ] @@ -20,7 +18,7 @@ sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] } else if (is_android && use_allocator == "none") { sources += [ -@@ -1704,6 +1704,33 @@ jumbo_component("base") { +@@ -1749,6 +1749,33 @@ jumbo_component("base") { } } @@ -29,11 +27,10 @@ + "files/file_path_watcher_linux.cc", + "files/file_util_linux.cc", + "process/memory_linux.cc", -+ "process/process_linux.cc", + "process/process_handle_linux.cc", + "process/process_iterator_linux.cc", + "process/process_metrics_linux.cc", -+ "sys_info_linux.cc" ++ "system/sys_info_linux.cc" + ] + sources += [ + "files/file_path_watcher_kqueue.cc", @@ -43,18 +40,19 @@ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", -+ "sys_info_freebsd.cc", ++ "system/sys_info_freebsd.cc", + ] + libs = [ + "execinfo", # logging.cc -+ "kvm" # process_metrics_freebsd ++ "kvm", # process_metrics_freebsd ++ "util" # process_metrics_freebsd + ] + } + # iOS if (is_ios) { set_sources_assignment_filter([]) -@@ -2693,6 +2720,12 @@ test("base_unittests") { +@@ -2805,6 +2832,12 @@ test("base_unittests") { ] set_sources_assignment_filter(sources_assignment_filter) } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.cc +@@ -115,7 +115,7 @@ void* AllocPages(void* address, + uintptr_t align_base_mask = ~align_offset_mask; + DCHECK(!(reinterpret_cast(address) & align_offset_mask)); + +-#if defined(OS_LINUX) && defined(ARCH_CPU_64_BITS) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS) + // On 64 bit Linux, we may need to adjust the address space limit for + // guarded allocations. + if (length >= kMinimumGuardedMemorySize) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_page__allocator__internals__posix.h @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_internals_posix.h +@@ -14,7 +14,7 @@ + #if defined(OS_MACOSX) + #include + #endif +-#if defined(OS_LINUX) ++#if defined(OS_BSD) || defined(OS_LINUX) + #include + + #include +@@ -48,7 +48,7 @@ int GetAccessFlags(PageAccessibilityConfiguration acce + } + } + +-#if defined(OS_LINUX) && defined(ARCH_CPU_64_BITS) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS) + + // Multiple guarded memory regions may exceed the process address space limit. + // This function will raise or lower the limit by |amount|. +@@ -68,7 +68,7 @@ bool AdjustAddressSpaceLimit(int64_t amount) { + // schemes that reduce that to 4 GiB. + constexpr size_t kMinimumGuardedMemorySize = 1ULL << 32; // 4 GiB + +-#endif // defined(OS_LINUX) && defined(ARCH_CPU_64_BITS) ++#endif // (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS) + + void* SystemAllocPagesInternal(void* hint, + size_t length, +@@ -134,7 +134,7 @@ void SetSystemPagesAccessInternal( + void FreePagesInternal(void* address, size_t length) { + CHECK(!munmap(address, length)); + +-#if defined(OS_LINUX) && defined(ARCH_CPU_64_BITS) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS) + // Restore the address space limit. + if (length >= kMinimumGuardedMemorySize) { + CHECK(AdjustAddressSpaceLimit(-base::checked_cast(length))); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_unittest.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_unittest.cc -@@ -1305,7 +1305,7 @@ TEST_F(PartitionAllocTest, LostFreePagesBug) { - #if !defined(OS_WIN) && \ - (!defined(ARCH_CPU_64_BITS) || \ - (defined(OS_POSIX) && \ -- !(defined(OS_FUCHSIA) || defined(OS_MACOSX) || defined(OS_ANDROID)))) -+ !(defined(OS_FUCHSIA) || defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_BSD)))) - - // The following four tests wrap a called function in an expect death statement - // to perform their test, because they are non-hermetic. Specifically they are Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/base/debug/debugger_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/debug/debugger_posix.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/debug/debugger_posix.cc -@@ -84,7 +84,7 @@ bool BeingDebugged() { +@@ -86,7 +86,7 @@ bool BeingDebugged() { KERN_PROC, KERN_PROC_PID, getpid() -#if defined(OS_OPENBSD) -+#if defined(OS_BSD) ++#if defined(OS_BSD) , sizeof(struct kinfo_proc), 0 #endif -@@ -92,33 +92,37 @@ bool BeingDebugged() { +@@ -94,33 +94,35 @@ bool BeingDebugged() { // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and // binary interfaces may change. @@ -19,21 +19,20 @@ + size_t info_size; -#if defined(OS_OPENBSD) - if (sysctl(mib, arraysize(mib), NULL, &info_size, NULL, 0) < 0) + if (sysctl(mib, base::size(mib), NULL, &info_size, NULL, 0) < 0) return -1; + info = (struct kinfo_proc *)malloc(info_size); -+ mib[5] = (info_size / sizeof(struct kinfo_proc)); -#endif -- int sysctl_result = sysctl(mib, arraysize(mib), &info, &info_size, NULL, 0); -+ int sysctl_result = sysctl(mib, arraysize(mib), info, &info_size, NULL, 0); +- int sysctl_result = sysctl(mib, base::size(mib), &info, &info_size, NULL, 0); ++ int sysctl_result = sysctl(mib, base::size(mib), info, &info_size, NULL, 0); DCHECK_EQ(sysctl_result, 0); if (sysctl_result != 0) { is_set = true; being_debugged = false; - return being_debugged; +- return being_debugged; + goto out; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/debug/stack_trace.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/base/debug/stack_trace.cc +@@ -14,7 +14,7 @@ + + #if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS) + +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #include + #include "base/process/process_handle.h" + #include "base/threading/platform_thread.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/debug/stack_trace_posix.cc @@ -35,7 +35,7 @@ #include @@ -9,16 +9,7 @@ #include "base/debug/proc_maps_linux.h" #endif -@@ -86,7 +86,7 @@ void DemangleSymbols(std::string* text) { - // Note: code in this function is NOT async-signal safe (std::string uses - // malloc internally). - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_BSD) - std::string::size_type search_from = 0; - while (search_from < text->size()) { - // Look for the start of a mangled symbol, from search_from. -@@ -647,6 +647,11 @@ class SandboxSymbolizeHelper { +@@ -653,6 +653,11 @@ class SandboxSymbolizeHelper { // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { @@ -30,7 +21,7 @@ // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -664,6 +669,7 @@ class SandboxSymbolizeHelper { +@@ -670,6 +675,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_thread__heap__usage__tracker.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_thread__heap__usage__tracker.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/3rdparty/chromium/base/debug/thread_heap_usage_tracker.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/debug/thread_heap_usage_tracker.cc -@@ -17,10 +17,12 @@ - #include "base/threading/thread_local_storage.h" - #include "build/build_config.h" - -+#if !defined(OS_BSD) - #if defined(OS_MACOSX) || defined(OS_IOS) - #include - #else - #include -+#endif - #endif - - namespace base { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/files/file_util_posix.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/base/files/file_util_posix.cc +@@ -407,7 +407,7 @@ bool CopyDirectoryExcl(const FilePath& from_path, + #endif // !defined(OS_NACL_NONSFI) + + bool CreateLocalNonBlockingPipe(int fds[2]) { +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + return pipe2(fds, O_CLOEXEC | O_NONBLOCK) == 0; + #else + int raw_fds[2]; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_numerics_safe__math__shared__impl.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_numerics_safe__math__shared__impl.h @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/base/numerics/safe_math_shared_impl.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/base/numerics/safe_math_shared_impl.h +@@ -19,9 +19,7 @@ + + // Where available use builtin math overflow support on Clang and GCC. + #if !defined(__native_client__) && \ +- ((defined(__clang__) && \ +- ((__clang_major__ > 3) || \ +- (__clang_major__ == 3 && __clang_minor__ >= 4))) || \ ++ ((defined(__clang__) && (__clang_major__ > 6)) || \ + (defined(__GNUC__) && __GNUC__ >= 5)) + #include "base/numerics/safe_math_clang_gcc_impl.h" + #define BASE_HAS_OPTIMIZED_SAFE_MATH (1) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_can__lower__nice__to.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_can__lower__nice__to.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/base/posix/can_lower_nice_to.cc.orig 2019-03-01 17:04:22 UTC ++++ src/3rdparty/chromium/base/posix/can_lower_nice_to.cc +@@ -31,6 +31,9 @@ bool CanLowerNiceTo(int nice_value) { + if (geteuid() == 0) + return true; + ++#if defined(OS_BSD) ++ return false; ++#else + // 2. Skip checking the CAP_SYS_NICE permission because it would require + // libcap.so. + +@@ -54,6 +57,7 @@ bool CanLowerNiceTo(int nice_value) { + // And lowering niceness to |nice_value| is allowed if it is greater than or + // equal to the limit: + return nice_value >= lowest_nice_allowed; ++#endif + } + + } // namespace internal Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/base/process/launch_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/launch_posix.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/process/launch_posix.cc -@@ -65,6 +65,7 @@ - #include "base/feature_list.h" - #else - extern char** environ; -+#pragma weak environ +@@ -64,6 +64,7 @@ + #error "macOS should use launch_mac.cc" #endif ++#pragma weak environ + extern char** environ; + namespace base { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_handle_freebsd.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/process_handle_freebsd.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/process/process_handle_freebsd.cc @@ -16,10 +16,13 @@ namespace base { @@ -8,7 +8,7 @@ + size_t length = sizeof(struct kinfo_proc); int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process }; - if (sysctl(mib, arraysize(mib), &info, &length, NULL, 0) < 0) + if (sysctl(mib, base::size(mib), &info, &length, NULL, 0) < 0) + return -1; + + if (length < sizeof(struct kinfo_proc)) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__info__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__info__linux.cc +++ /dev/null @@ -1,39 +0,0 @@ ---- src/3rdparty/chromium/base/process/process_info_linux.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/process/process_info_linux.cc -@@ -11,10 +11,28 @@ - #include "base/process/process_handle.h" - #include "base/time/time.h" - -+#if defined(__FreeBSD__) || defined(__DragonFly__) -+#include -+#include -+#include -+#endif -+ - namespace base { - - // static - const Time CurrentProcessInfo::CreationTime() { -+#if defined(__FreeBSD__) || defined(__DragonFly__) -+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() }; -+ struct kinfo_proc proc; -+ size_t len = sizeof(struct kinfo_proc); -+ if (sysctl(mib, arraysize(mib), &proc, &len, NULL, 0) < 0) -+ return Time(); -+#if defined(__DragonFly__) -+ return Time::FromTimeVal(proc.kp_start); -+#else -+ return Time::FromTimeVal(proc.ki_start); -+#endif -+#else - int64_t start_ticks = - internal::ReadProcSelfStatsAndGetFieldAsInt64(internal::VM_STARTTIME); - if (!start_ticks) -@@ -24,6 +42,7 @@ const Time CurrentProcessInfo::CreationTime() { - if (boot_time.is_null()) - return Time(); - return Time(boot_time + start_offset); -+#endif - } - - } // namespace base Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_iterator_freebsd.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/process_iterator_freebsd.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/process/process_iterator_freebsd.cc @@ -10,6 +10,10 @@ #include @@ -9,18 +9,18 @@ +#include + #include "base/logging.h" - #include "base/macros.h" + #include "base/stl_util.h" #include "base/strings/string_split.h" @@ -40,7 +44,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* num_of_kinfo_proc += 16; kinfo_procs_.resize(num_of_kinfo_proc); len = num_of_kinfo_proc * sizeof(struct kinfo_proc); -- if (sysctl(mib, arraysize(mib), &kinfo_procs_[0], &len, NULL, 0) <0) { -+ if (sysctl(mib, arraysize(mib), kinfo_procs_.data(), &len, NULL, 0) <0) { +- if (sysctl(mib, base::size(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) { ++ if (sysctl(mib, base::size(mib), kinfo_procs_.data(), &len, NULL, 0) < 0) { // If we get a mem error, it just means we need a bigger buffer, so // loop around again. Anything else is a real error and give up. if (errno != ENOMEM) { -@@ -72,19 +76,13 @@ bool ProcessIterator::CheckForNextProcess() { +@@ -72,18 +76,13 @@ bool ProcessIterator::CheckForNextProcess() { for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) { size_t length; struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_]; @@ -31,15 +31,14 @@ continue; - length = 0; -- if (sysctl(mib, arraysize(mib), NULL, &length, NULL, 0) < 0) { +- if (sysctl(mib, base::size(mib), NULL, &length, NULL, 0) < 0) { - LOG(ERROR) << "failed to figure out the buffer size for a command line"; - continue; - } - - data.resize(length); -- + data.resize(ARG_MAX); + length = ARG_MAX; - if (sysctl(mib, arraysize(mib), &data[0], &length, NULL, 0) < 0) { + + if (sysctl(mib, base::size(mib), &data[0], &length, NULL, 0) < 0) { LOG(ERROR) << "failed to fetch a commandline"; - continue; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__linux.cc @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/base/process/process_linux.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/base/process/process_linux.cc +@@ -88,6 +88,7 @@ Time Process::CreationTime() const { + return Time(boot_time + start_offset); + } + ++#if !defined(OS_BSD) + // static + bool Process::CanBackgroundProcesses() { + #if defined(OS_CHROMEOS) +@@ -139,6 +140,7 @@ bool Process::SetProcessBackgrounded(bool background) + DPCHECK(result == 0); + return result == 0; + } ++#endif // !defined(OS_BSD) + + #if defined(OS_CHROMEOS) + bool IsProcessBackgroundedCGroup(const StringPiece& cgroup_contents) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_metrics.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/process_metrics.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/process/process_metrics.h @@ -41,7 +41,7 @@ namespace base { // Full declaration is in process_metrics_iocounters.h. @@ -18,21 +18,18 @@ // Convert a POSIX timeval to microseconds. BASE_EXPORT int64_t TimeValToMicroseconds(const struct timeval& tv); -@@ -177,7 +177,7 @@ class BASE_EXPORT ProcessMetrics { - // otherwise. - bool GetIOCounters(IoCounters* io_counters) const; - --#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_ANDROID) || defined(OS_BSD) - // Returns the number of file descriptors currently open by the process, or - // -1 on error. - int GetOpenFdCount() const; -@@ -185,16 +185,16 @@ class BASE_EXPORT ProcessMetrics { - // Returns the soft limit of file descriptors that can be opened by the - // process, or -1 on error. +@@ -92,7 +92,7 @@ class BASE_EXPORT ProcessMetrics { + // convenience wrapper for CreateProcessMetrics(). + static std::unique_ptr CreateCurrentProcessMetrics(); + +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + // Resident Set Size is a Linux/Android specific memory concept. Do not + // attempt to extend this to other platforms. + BASE_EXPORT size_t GetResidentSetSize() const; +@@ -199,14 +199,14 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; --#endif // defined(OS_LINUX) || defined(OS_AIX) || defined(OS_ANDROID) -+#endif // defined(OS_LINUX) || defined(OS_AIX) || defined(OS_ANDROID) || defined(OS_BSD) + #endif // defined(OS_POSIX) -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) @@ -47,7 +44,7 @@ // Returns total memory usage of malloc. size_t GetMallocUsage(); -@@ -206,7 +206,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -218,7 +218,7 @@ class BASE_EXPORT ProcessMetrics { ProcessMetrics(ProcessHandle process, PortProvider* port_provider); #endif // !defined(OS_MACOSX) || defined(OS_IOS) @@ -56,16 +53,16 @@ int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if defined(OS_MACOSX) -@@ -229,7 +229,7 @@ class BASE_EXPORT ProcessMetrics { - TimeDelta last_cumulative_cpu_; - #endif +@@ -247,7 +247,7 @@ class BASE_EXPORT ProcessMetrics { + // Number of bytes transferred to/from disk in bytes. + uint64_t last_cumulative_disk_usage_ = 0; -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; uint64_t last_absolute_idle_wakeups_; -@@ -275,7 +275,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de +@@ -293,7 +293,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #endif // defined(OS_POSIX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ @@ -74,7 +71,7 @@ // Data about system-wide memory consumption. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // -@@ -308,7 +308,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -326,7 +326,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { int avail_phys = 0; #endif @@ -83,7 +80,7 @@ // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always -@@ -323,7 +323,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -341,7 +341,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || \ @@ -92,7 +89,7 @@ int buffers = 0; int cached = 0; int active_anon = 0; -@@ -333,7 +333,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -351,7 +351,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { int dirty = 0; int reclaimable = 0; #endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || @@ -101,9 +98,12 @@ #if defined(OS_CHROMEOS) int shmem = 0; -@@ -361,7 +361,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK +@@ -377,9 +377,9 @@ struct BASE_EXPORT SystemMemoryInfoKB { + BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo); + #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || - // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) +- // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) ++ // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) || defined(OS_BSD) -#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc @@ -1,11 +1,20 @@ ---- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/process/process_metrics.cc -@@ -10,7 +10,7 @@ - #include "base/values.h" - #include "build/build_config.h" +@@ -126,7 +126,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( + } + #endif -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) - namespace { - int CalculateEventsPerSecond(uint64_t event_count, - uint64_t* last_event_count, + int ProcessMetrics::CalculateIdleWakeupsPerSecond( + uint64_t absolute_idle_wakeups) { + return CalculateEventsPerSecond(absolute_idle_wakeups, +@@ -138,7 +138,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); // http://crbug.com/120488 + return 0; + } +-#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) ++#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) + + #if defined(OS_MACOSX) + int ProcessMetrics::CalculatePackageIdleWakeupsPerSecond( Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc @@ -1,12 +1,21 @@ ---- src/3rdparty/chromium/base/process/process_metrics_freebsd.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/process/process_metrics_freebsd.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/process/process_metrics_freebsd.cc -@@ -14,11 +14,14 @@ +@@ -5,6 +5,7 @@ + #include "base/process/process_metrics.h" + + #include ++#include + #include + #include + #include +@@ -14,11 +15,15 @@ #include "base/process/process_metrics_iocounters.h" #include "base/stl_util.h" +#include /* getpagesize() */ +#include /* O_RDONLY */ +#include ++#include + namespace base { @@ -17,11 +26,10 @@ // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( -@@ -68,5 +71,64 @@ size_t GetSystemCommitCharge() { - +@@ -69,4 +74,93 @@ size_t GetSystemCommitCharge() { return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); } -+ + +int GetNumberOfThreads(ProcessHandle process) { + // Taken from FreeBSD top (usr.bin/top/machine.c) + @@ -43,8 +51,8 @@ + +bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) { + unsigned int mem_total, mem_free, swap_total, swap_used; -+ size_t length; -+ int pagesizeKB; ++ size_t length; ++ int pagesizeKB; + + pagesizeKB = getpagesize() / 1024; + @@ -76,9 +84,39 @@ + return true; +} + ++int ProcessMetrics::GetOpenFdCount() const { ++ struct kinfo_file * kif; ++ int cnt; ++ ++ if ((kif = kinfo_getfile(process_, &cnt)) == NULL) ++ return -1; ++ ++ free(kif); ++ ++ return cnt; ++} ++ ++int ProcessMetrics::GetOpenFdSoftLimit() const { ++ size_t length; ++ int total_count = 0; ++ int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC }; ++ ++ length = sizeof(total_count); ++ ++ if (sysctl(mib, base::size(mib), &total_count, &length, NULL, 0) < 0) { ++ total_count = -1; ++ } ++ ++ return total_count; ++} ++ +uint64_t ProcessMetrics::GetVmSwapBytes() const { + NOTIMPLEMENTED(); + return 0; -+ } - ++} ++ ++int ProcessMetrics::GetIdleWakeupsPerSecond() { ++ NOTIMPLEMENTED(); ++ return 0; ++} } // namespace base Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__freebsd.cc +++ /dev/null @@ -1,71 +0,0 @@ ---- src/3rdparty/chromium/base/sys_info_freebsd.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/sys_info_freebsd.cc -@@ -13,26 +13,58 @@ - namespace base { - - int64_t SysInfo::AmountOfPhysicalMemoryImpl() { -- int pages, page_size; -+ int pages, page_size, r = 0; - size_t size = sizeof(pages); -- sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); -- sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -- if (pages == -1 || page_size == -1) { -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); -+ if(r == 0) -+ r =sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if(r == -1) { - NOTREACHED(); - return 0; - } - return static_cast(pages) * page_size; - } - --// static --uint64_t SysInfo::MaxSharedMemorySize() { -- size_t limit; -- size_t size = sizeof(limit); -- if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) { -+int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { -+ int page_size, r = 0; -+ unsigned pgfree, pginact, pgcache; -+ size_t size = sizeof(page_size); -+ size_t szpg = sizeof(pgfree); -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); -+ if(r == -1) { - NOTREACHED(); - return 0; - } -- return static_cast(limit); -+ return static_cast((pgfree + pginact + pgcache) * page_size); -+} -+ -+// static -+std::string SysInfo::CPUModelName() { -+ int mib[] = { CTL_HW, HW_MODEL }; -+ char name[256]; -+ size_t size = arraysize(name); -+ if (sysctl(mib, arraysize(mib), &name, &size, NULL, 0) == 0) -+ return name; -+ return std::string(); -+} -+ -+int SysInfo::NumberOfProcessors() { -+ int mib[] = { CTL_HW, HW_NCPU }; -+ int ncpu; -+ size_t size = sizeof(ncpu); -+ if (sysctl(mib, arraysize(mib), &ncpu, &size, NULL, 0) == -1) { -+ NOTREACHED(); -+ return 1; -+ } -+ return ncpu; - } - - } // namespace base Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__posix.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- src/3rdparty/chromium/base/sys_info_posix.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/base/sys_info_posix.cc -@@ -38,7 +38,7 @@ - - namespace { - --#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) -+#if !defined(OS_BSD) && !defined(OS_FUCHSIA) - int NumberOfProcessors() { - // sysconf returns the number of "logical" (not "physical") processors on both - // Mac and Linux. So we get the number of max available "logical" processors. -@@ -65,7 +65,7 @@ int NumberOfProcessors() { - base::LazyInstance< - base::internal::LazySysInfoValue >::Leaky - g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER; --#endif // !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) -+#endif // !defined(OS_BSD) && !defined(OS_FUCHSIA) - - #if !defined(OS_FUCHSIA) - int64_t AmountOfVirtualMemory() { -@@ -133,7 +133,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, - - namespace base { - --#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) -+#if !defined(OS_BSD) && !defined(OS_FUCHSIA) - int SysInfo::NumberOfProcessors() { - return g_lazy_number_of_processors.Get().value(); - } -@@ -226,6 +226,8 @@ std::string SysInfo::OperatingSystemArchitecture() { - arch = "x86"; - } else if (arch == "amd64") { - arch = "x86_64"; -+ } else if (arch == "arm64") { -+ arch = "aarch64"; - } else if (std::string(info.sysname) == "AIX") { - arch = "ppc64"; - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__freebsd.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__freebsd.cc @@ -0,0 +1,71 @@ +--- src/3rdparty/chromium/base/system/sys_info_freebsd.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/base/system/sys_info_freebsd.cc +@@ -13,26 +13,58 @@ + namespace base { + + int64_t SysInfo::AmountOfPhysicalMemoryImpl() { +- int pages, page_size; ++ int pages, page_size, r = 0; + size_t size = sizeof(pages); +- sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); +- sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); +- if (pages == -1 || page_size == -1) { ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); ++ if(r == 0) ++ r =sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); ++ if(r == -1) { + NOTREACHED(); + return 0; + } + return static_cast(pages) * page_size; + } + +-// static +-uint64_t SysInfo::MaxSharedMemorySize() { +- size_t limit; +- size_t size = sizeof(limit); +- if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) { ++int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { ++ int page_size, r = 0; ++ unsigned pgfree, pginact, pgcache; ++ size_t size = sizeof(page_size); ++ size_t szpg = sizeof(pgfree); ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); ++ if(r == -1) { + NOTREACHED(); + return 0; + } +- return static_cast(limit); ++ return static_cast((pgfree + pginact + pgcache) * page_size); ++} ++ ++// static ++std::string SysInfo::CPUModelName() { ++ int mib[] = { CTL_HW, HW_MODEL }; ++ char name[256]; ++ size_t size = base::size(name); ++ if (sysctl(mib, base::size(mib), &name, &size, NULL, 0) == 0) ++ return name; ++ return std::string(); ++} ++ ++int SysInfo::NumberOfProcessors() { ++ int mib[] = { CTL_HW, HW_NCPU }; ++ int ncpu; ++ size_t size = sizeof(ncpu); ++ if (sysctl(mib, base::size(mib), &ncpu, &size, NULL, 0) == -1) { ++ NOTREACHED(); ++ return 1; ++ } ++ return ncpu; + } + + } // namespace base Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/base/system/sys_info_posix.cc +@@ -38,7 +38,7 @@ + + namespace { + +-#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) ++#if !defined(OS_BSD) && !defined(OS_FUCHSIA) + int NumberOfProcessors() { + // sysconf returns the number of "logical" (not "physical") processors on both + // Mac and Linux. So we get the number of max available "logical" processors. +@@ -64,7 +64,7 @@ int NumberOfProcessors() { + + base::LazyInstance>:: + Leaky g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER; +-#endif // !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) ++#endif // !defined(OS_BSD) && !defined(OS_FUCHSIA) + + #if !defined(OS_FUCHSIA) + int64_t AmountOfVirtualMemory() { +@@ -132,7 +132,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, + + namespace base { + +-#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) ++#if !defined(OS_BSD) && !defined(OS_FUCHSIA) + int SysInfo::NumberOfProcessors() { + return g_lazy_number_of_processors.Get().value(); + } +@@ -225,6 +225,8 @@ std::string SysInfo::OperatingSystemArchitecture() { + arch = "x86"; + } else if (arch == "amd64") { + arch = "x86_64"; ++ } else if (arch == "arm64") { ++ arch = "aarch64"; + } else if (std::string(info.sysname) == "AIX") { + arch = "ppc64"; + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/base/threading/platform_thread_linux.cc @@ -18,7 +18,9 @@ @@ -10,7 +10,16 @@ #include #include #include -@@ -128,7 +130,7 @@ bool GetCurrentThreadPriorityForPlatform(ThreadPriorit +@@ -99,7 +101,7 @@ const ThreadPriorityToNiceValuePair kThreadPriorityToN + + Optional CanIncreaseCurrentThreadPriorityForPlatform( + ThreadPriority priority) { +-#if !defined(OS_NACL) ++#if !defined(OS_NACL) && !defined(OS_BSD) + // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke + // pthread_setschedparam in SetCurrentThreadPriorityForPlatform(). + struct rlimit rlim; +@@ -141,7 +143,7 @@ Optional GetCurrentThreadPriorityForPl void PlatformThread::SetName(const std::string& name) { ThreadIdNameManager::GetInstance()->SetName(name); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/config/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/build/config/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/build/config/BUILD.gn -@@ -171,7 +171,7 @@ config("debug") { +@@ -166,7 +166,7 @@ config("debug") { # builds, and we have to tell it to turn it off. defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] } @@ -9,7 +9,7 @@ # Enable libstdc++ debugging facilities to help catch problems early, see # http://crbug.com/65151 . # TODO(phajdan.jr): Should we enable this for all of POSIX? -@@ -273,9 +273,7 @@ config("default_libs") { +@@ -267,9 +267,7 @@ config("default_libs") { ] } else if (is_linux) { libs = [ @@ -19,12 +19,12 @@ ] } } -@@ -331,7 +329,7 @@ config("executable_config") { +@@ -346,7 +344,7 @@ config("executable_config") { "//build/config/ios:ios_dynamic_flags", "//build/config/ios:ios_executable_flags", ] - } else if (is_linux || is_android || current_os == "aix") { + } else if (is_linux || is_bsd || is_android || current_os == "aix") { - configs += [ "//build/config/gcc:executable_ldconfig" ] - if (is_android) { - configs += [ "//build/config/android:executable_config" ] + configs += [ "//build/config/gcc:executable_config" ] + if (is_chromecast) { + configs += [ "//build/config/chromecast:executable_config" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/build/config/BUILDCONFIG.gn @@ -131,10 +131,10 @@ declare_args() { is_official_build = false # Whether we're a traditional desktop unix. - is_desktop_linux = current_os == "linux" -+ is_desktop_linux = current_os == "linux" || current_os == "bsd" ++ is_desktop_linux = current_os == "linux" || current_os == "freebsd" # Set to true when compiling with the Clang compiler. - is_clang = current_os != "linux" || -+ is_clang = current_os != "linux" || current_os == "bsd" || ++ is_clang = current_os != "linux" || current_os == "freebsd" || (current_cpu != "s390x" && current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc" && current_cpu != "mips" && current_cpu != "mips64") @@ -19,110 +19,30 @@ - if (host_os == "linux") { - if (target_os != "linux") { -+ if (host_os == "linux" || host_os == "bsd") { -+ if (target_os != "linux" || target_os != "bsd") { - # TODO(dpranke) - is_clang normally applies only to the target - # build, and there is no way to indicate that you want to override - # it for both the target build *and* the host build. Do we need to -@@ -232,7 +232,7 @@ if (target_os == "android") { ++ if (host_os == "linux" || host_os == "freebsd") { ++ if (target_os != "linux" && target_os != "freebsd") { + host_toolchain = "//build/toolchain/linux:clang_$host_cpu" + } else if (is_clang) { + host_toolchain = "//build/toolchain/linux:clang_$host_cpu" +@@ -229,7 +229,7 @@ if (target_os == "android") { assert(host_os == "linux" || host_os == "mac", "Android builds are only supported on Linux and Mac hosts.") _default_toolchain = "//build/toolchain/android:android_clang_$target_cpu" -} else if (target_os == "chromeos" || target_os == "linux") { -+} else if (target_os == "chromeos" || target_os == "linux" || target_os == "bsd") { ++} else if (target_os == "chromeos" || target_os == "linux" || target_os == "freebsd") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" -@@ -306,6 +306,7 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = false - is_posix = false - is_win = true -+ is_bsd = false - } else if (current_os == "mac") { - is_aix = false - is_android = false -@@ -317,6 +318,7 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = false - is_posix = true - is_win = false -+ is_bsd = false - } else if (current_os == "android") { - is_aix = false - is_android = true -@@ -328,6 +330,7 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = false - is_posix = true - is_win = false -+ is_bsd = false - } else if (current_os == "chromeos") { - is_aix = false - is_android = false -@@ -339,6 +342,7 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = false - is_posix = true - is_win = false -+ is_bsd = false - } else if (current_os == "nacl") { - # current_os == "nacl" will be passed by the nacl toolchain definition. - # It is not set by default or on the command line. We treat is as a -@@ -353,6 +357,7 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = true - is_posix = true - is_win = false -+ is_bsd = false - } else if (current_os == "fuchsia") { - is_aix = false - is_android = false -@@ -364,6 +369,7 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = false - is_posix = false - is_win = false -+ is_bsd = false - } else if (current_os == "ios") { - is_aix = false - is_android = false -@@ -375,6 +381,7 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = false - is_posix = true - is_win = false -+ is_bsd = false - } else if (current_os == "linux") { - is_aix = false - is_android = false -@@ -386,6 +393,7 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = false - is_posix = true - is_win = false -+ is_bsd = false - } else if (current_os == "aix") { - is_aix = true - is_android = false -@@ -397,6 +405,19 @@ if (current_os == "win" || current_os == "winuwp") { - is_nacl = false - is_posix = true - is_win = false -+ is_bsd = false -+} else if (current_os == "bsd") { -+ is_aix = false -+ is_android = false -+ is_chromeos = false -+ is_fuchsia = false -+ is_ios = false -+ is_linux = true -+ is_mac = false -+ is_nacl = false -+ is_posix = true -+ is_win = false -+ is_bsd = true - } +@@ -296,10 +296,11 @@ is_android = current_os == "android" + is_chromeos = current_os == "chromeos" + is_fuchsia = current_os == "fuchsia" + is_ios = current_os == "ios" +-is_linux = current_os == "chromeos" || current_os == "linux" ++is_linux = current_os == "chromeos" || current_os == "linux" || current_os == "freebsd" + is_mac = current_os == "mac" + is_nacl = current_os == "nacl" + is_win = current_os == "win" || current_os == "winuwp" ++is_bsd = current_os == "freebsd" + + is_posix = !is_win && !is_fuchsia - # ============================================================================= -@@ -459,7 +480,7 @@ if (!is_ios) { - if (!is_mac && !is_ios) { - sources_assignment_filter += [ "*.mm" ] - } --if (!is_linux) { -+if (!is_linux && !is_bsd) { - sources_assignment_filter += [ - "*_linux.h", - "*_linux.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/build/config/compiler/BUILD.gn -@@ -55,7 +55,7 @@ declare_args() { +@@ -56,7 +56,7 @@ declare_args() { # only two architectures that are currently checked in). Turn this off when # you are using a custom toolchain and need to control -B in cflags. linux_use_bundled_binutils = @@ -9,7 +9,7 @@ (current_cpu == "x64" || current_cpu == "x86") binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", root_build_dir) -@@ -269,7 +269,7 @@ config("compiler") { +@@ -281,7 +281,7 @@ config("compiler") { # Linker warnings. if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && !(is_android && use_order_profiling) && !is_mac && !is_ios && @@ -18,16 +18,25 @@ # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 # crbug.com/485542 -@@ -507,7 +507,7 @@ config("compiler") { +@@ -412,7 +412,7 @@ config("compiler") { + + # Compiler instrumentation can introduce dependencies in DSOs to symbols in + # the executable they are loaded into, so they are unresolved at link-time. +- if (!using_sanitizer) { ++ if (!using_sanitizer && !is_bsd) { + ldflags += [ + "-Wl,-z,defs", + "-Wl,--as-needed", +@@ -520,7 +520,7 @@ config("compiler") { + } } - if (is_clang && !is_nacl && current_toolchain == host_toolchain && -- target_os != "chromeos" && !use_qt) { -+ target_os != "chromeos" && !is_bsd && !use_qt) { +- if (is_clang && !is_nacl && !use_xcode_clang && !use_qt) { ++ if (is_clang && !is_nacl && !use_xcode_clang && !use_qt && !is_bsd) { cflags += [ # TODO(hans): Remove this once Clang generates better optimized debug info # by default. https://crbug.com/765793 -@@ -747,11 +747,11 @@ config("compiler_cpu_abi") { +@@ -814,11 +814,11 @@ config("compiler_cpu_abi") { ] } } else if (current_cpu == "arm") { @@ -41,7 +50,7 @@ cflags += [ "-march=$arm_arch", "-mfloat-abi=$arm_float_abi", -@@ -761,7 +761,7 @@ config("compiler_cpu_abi") { +@@ -828,7 +828,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { @@ -50,28 +59,37 @@ cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } -@@ -1681,7 +1681,7 @@ config("thin_archive") { +@@ -1522,7 +1522,7 @@ config("default_warnings") { + cflags += [ "-Wno-nonportable-include-path" ] + } + +- if (current_toolchain == host_toolchain || !use_xcode_clang) { ++ if ((current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { + # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not + # recognize. + cflags += [ +@@ -1722,7 +1722,7 @@ config("thin_archive") { # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't # have a "thin archive" mode (it does accept -T, but it means truncating # archive names to 16 characters, which is not what we want). - if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { + if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) { arflags = [ "-T" ] - } - } -@@ -2216,7 +2216,7 @@ config("symbols") { - # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f - cflags += [ "-gdwarf-3" ] + } else if (is_win && use_lld) { + arflags = [ "/llvmlibthin" ] +@@ -2314,7 +2314,7 @@ config("symbols") { + # flag, so we can use use -g1 for pnacl and nacl-clang compiles. + # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang. + if (!is_nacl || is_clang) { +- cflags += [ "-g2" ] ++ cflags += [ "-g0" ] } -- cflags += [ "-g2" ] -+ cflags += [ "-g0" ] } if (use_debug_fission && !is_nacl && !is_android) { - # NOTE: Some Chrome OS builds globally set |use_debug_fission| to true, -@@ -2236,7 +2236,7 @@ config("symbols") { +@@ -2335,7 +2335,7 @@ config("symbols") { # DWARF info may be corrupt; offsets in a range list entry are in different # sections" there. Maybe just a bug in nacl_switch_32.S. - if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" && + if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" && - (use_gold || use_lld)) { + (use_gold || use_lld) && !is_bsd) { if (is_clang) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/build/config/compiler/compiler.gni.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/build/config/compiler/compiler.gni.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/build/config/compiler/compiler.gni -@@ -173,7 +173,7 @@ declare_args() { - +@@ -181,7 +181,7 @@ declare_args() { declare_args() { # Whether to use the gold linker from binutils instead of lld or bfd. -- use_gold = !use_lld && !(is_chromecast && is_linux && -+ use_gold = !is_bsd && !use_lld && !(is_chromecast && is_linux && - (current_cpu == "arm" || current_cpu == "mipsel")) && - ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || - current_cpu == "arm" || current_cpu == "mipsel" || + use_gold = +- !use_lld && !(is_chromecast && is_linux && ++ !is_bsd && !use_lld && !(is_chromecast && is_linux && + (current_cpu == "arm" || current_cpu == "mipsel")) && + ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || + current_cpu == "arm" || current_cpu == "arm64" || Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_detect__host__arch.py =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_detect__host__arch.py @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/build/detect_host_arch.py.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/build/detect_host_arch.py +@@ -19,6 +19,8 @@ def HostArch(): + host_arch = 'ia32' + elif host_arch in ['x86_64', 'amd64']: + host_arch = 'x64' ++ elif host_arch.startswith('arm64'): ++ host_arch = 'arm64' + elif host_arch.startswith('arm'): + host_arch = 'arm' + elif host_arch.startswith('aarch64'): Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_chrome.map =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_chrome.map +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_chrome.map @@ -1,6 +1,14 @@ ---- src/3rdparty/chromium/build/linux/chrome.map.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/build/linux/chrome.map.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/build/linux/chrome.map -@@ -20,6 +20,10 @@ global: +@@ -1,4 +1,7 @@ + { ++local: ++ *; ++ + global: + __bss_start; + __data_start; +@@ -20,6 +23,10 @@ global: # Program entry point. _start; @@ -11,7 +19,7 @@ # Memory allocation symbols. We want chrome and any libraries to # share the same heap, so it is correct to export these symbols. calloc; -@@ -81,7 +85,4 @@ global: +@@ -81,7 +88,4 @@ global: localtime64; localtime64_r; localtime_r; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni @@ -1,20 +1,18 @@ ---- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni -@@ -11,6 +11,13 @@ import("//build/toolchain/clang_static_analyzer.gni") - import("//build/toolchain/goma.gni") - import("//build/toolchain/toolchain.gni") +@@ -47,6 +47,11 @@ analyzer_wrapper = + rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py", + root_build_dir) + " --mode=clang" +declare_args() { + extra_cxxflags = "" + extra_ldflags = "" +} + -+ -+ - if (is_nacl) { - # To keep NaCl variables out of builds that don't include NaCl, all - # variables defined in nacl/config.gni referenced here should be protected by -@@ -604,13 +611,23 @@ template("clang_toolchain") { + # This template defines a toolchain for something that works like gcc + # (including clang). + # +@@ -610,13 +615,24 @@ template("clang_toolchain") { } gcc_toolchain(target_name) { @@ -26,18 +24,19 @@ - ar = "${prefix}/llvm-ar" - nm = "${toolprefix}nm" + if (is_bsd) { -+ cc = "${toolprefix}clang" -+ cxx = "${toolprefix}clang++" ++ # XXX fix the hardcoding! ++ prefix = "/usr/local/bin" ++ cc = "cc" ++ cxx = "c++" + ld = cxx + readelf = "readelf" -+ ar = "${toolprefix}ar" ++ ar = "${prefix}/ar" + nm = "${toolprefix}nm" + } else { + prefix = rebase_path("$clang_base_path/bin", root_build_dir) + cc = "$prefix/clang" + cxx = "$prefix/clang++" + ld = cxx -+ + readelf = "${toolprefix}readelf" + ar = "${prefix}/llvm-ar" + nm = "${toolprefix}nm" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn @@ -1,11 +1,21 @@ ---- src/3rdparty/chromium/cc/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/cc/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/cc/BUILD.gn -@@ -550,7 +550,7 @@ cc_static_library("test_support") { +@@ -548,7 +548,7 @@ cc_test_static_library("test_support") { "//ui/gl:test_support", "//ui/latency", ] - if (!is_android) { + if (!is_android && !is_bsd) { data_deps = [ - "//third_party/mesa:osmesa", + "//third_party/mesa_headers", ] +@@ -746,9 +746,6 @@ cc_test("cc_unittests") { + "//ui/gfx/geometry", + "//ui/gl", + "//ui/gl:test_support", +- ] +- data_deps = [ +- "//third_party/mesa_headers", + ] + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/app/chromium_strings.grd.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/app/chromium_strings.grd.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/app/chromium_strings.grd -@@ -814,7 +814,7 @@ Signing in anyway will merge Chromium information like +@@ -809,7 +809,7 @@ Signing in anyway will merge Chromium information like @@ -9,3 +9,12 @@ The profile appears to be in use by another Chromium process ($112345) on another computer ($2example.com). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium. +@@ -1057,7 +1057,7 @@ Please check your email at $2 + + + +- ++ + + Restart Chromium to enable $1Flash + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/chrome/app/generated_resources.grd.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/app/generated_resources.grd.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/app/generated_resources.grd -@@ -5208,7 +5208,7 @@ the Bookmarks menu."> +@@ -5339,7 +5339,7 @@ the Bookmarks menu."> - + - - - Hold |$1Ctrl|+|$2Shift|+|$3Q| to exit -@@ -6064,7 +6064,7 @@ the Bookmarks menu."> + + Press |$1Ctrl|+|$2Shift| followed by |$3Q| to exit + +@@ -6160,7 +6160,7 @@ the Bookmarks menu."> Google Pay @@ -18,7 +18,7 @@ Use system title bar and borders -@@ -6895,7 +6895,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -6946,7 +6946,7 @@ Please help our engineers fix this problem. Tell us wh Set as default Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_google__chrome__strings.grd =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_google__chrome__strings.grd +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_google__chrome__strings.grd @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/app/google_chrome_strings.grd.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/app/google_chrome_strings.grd.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/app/google_chrome_strings.grd -@@ -825,7 +825,7 @@ Signing in anyway will merge Chrome information like b +@@ -820,7 +820,7 @@ Signing in anyway will merge Chrome information like b @@ -9,3 +9,12 @@ The profile appears to be in use by another Google Chrome process ($112345) on another computer ($2example.com). Chrome has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome. +@@ -1075,7 +1075,7 @@ Please check your email at $2 + + + +- ++ + + Restart Chrome to enable $1Flash + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_settings__strings.grdp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_settings__strings.grdp +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_settings__strings.grdp @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/app/settings_strings.grdp.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/app/settings_strings.grdp.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/app/settings_strings.grdp -@@ -508,7 +508,7 @@ +@@ -580,7 +580,7 @@ Themes @@ -9,7 +9,7 @@ GTK+ -@@ -522,7 +522,7 @@ +@@ -594,7 +594,7 @@ Use Classic Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/chrome/common/chrome_paths.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/common/chrome_paths.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/common/chrome_paths.h @@ -51,7 +51,7 @@ enum { // to set policies for chrome. This directory @@ -18,7 +18,7 @@ DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' // definition manifest files that // describe extensions which are to be -@@ -111,7 +111,7 @@ enum { +@@ -107,7 +107,7 @@ enum { DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, // Directory where sanitized // supervised user whitelists are // installed. @@ -27,3 +27,16 @@ DIR_NATIVE_MESSAGING, // System directory where native messaging host // manifest files are stored. DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts +@@ -122,10 +122,10 @@ enum { + DIR_GEN_TEST_DATA, // Directory where generated test data resides. + DIR_TEST_DATA, // Directory where unit test data resides. + DIR_TEST_TOOLS, // Directory where unit test tools reside. +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + FILE_COMPONENT_FLASH_HINT, // A file in a known location that points to + // the component updated flash plugin. +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + #if defined(OS_CHROMEOS) + FILE_CHROME_OS_COMPONENT_FLASH, // The location of component updated Flash on + // Chrome OS. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc @@ -1,6 +1,31 @@ ---- src/3rdparty/chromium/chrome/common/chrome_paths.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/common/chrome_paths.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/common/chrome_paths.cc -@@ -193,7 +193,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -52,21 +52,21 @@ const base::FilePath::CharType kPepperFlashSystemBaseD + FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer"); + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // The path to the external extension .json files. + // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ + const base::FilePath::CharType kFilepathSinglePrefExtensions[] = + #if defined(GOOGLE_CHROME_BUILD) + FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); + #else +- FILE_PATH_LITERAL("/usr/share/chromium/extensions"); ++ FILE_PATH_LITERAL("/usr/local/share/chromium/extensions"); + #endif // defined(GOOGLE_CHROME_BUILD) + + // The path to the hint file that tells the pepper plugin loader + // where it can find the latest component updated flash. + const base::FilePath::CharType kComponentUpdatedFlashHint[] = + FILE_PATH_LITERAL("latest-component-updated-flash"); +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + + #if defined(OS_CHROMEOS) + const base::FilePath::CharType kChromeOSComponentFlash[] = FILE_PATH_LITERAL( +@@ -197,7 +197,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: @@ -9,7 +34,7 @@ if (!GetUserDownloadsDirectorySafe(&cur)) return false; break; -@@ -472,10 +472,12 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -459,10 +459,12 @@ bool PathProvider(int key, base::FilePath* result) { if (!base::PathExists(cur)) // We don't want to create this return false; break; @@ -23,7 +48,25 @@ #else cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies")); #endif -@@ -526,7 +528,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -470,7 +472,7 @@ bool PathProvider(int key, base::FilePath* result) { + } + #endif + #if defined(OS_CHROMEOS) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD)) || \ +- defined(OS_MACOSX) ++ defined(OS_MACOSX) || defined(OS_BSD) + case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { + if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) + return false; +@@ -478,7 +480,7 @@ bool PathProvider(int key, base::FilePath* result) { + break; + } + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { + cur = base::FilePath(kFilepathSinglePrefExtensions); + break; +@@ -513,7 +515,7 @@ bool PathProvider(int key, base::FilePath* result) { #endif break; @@ -32,7 +75,7 @@ case chrome::DIR_NATIVE_MESSAGING: #if defined(OS_MACOSX) #if defined(GOOGLE_CHROME_BUILD) -@@ -540,6 +542,9 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -527,6 +529,9 @@ bool PathProvider(int key, base::FilePath* result) { #if defined(GOOGLE_CHROME_BUILD) cur = base::FilePath(FILE_PATH_LITERAL( "/etc/opt/chrome/native-messaging-hosts")); @@ -42,7 +85,7 @@ #else cur = base::FilePath(FILE_PATH_LITERAL( "/etc/chromium/native-messaging-hosts")); -@@ -552,7 +557,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -539,7 +544,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts")); break; @@ -51,3 +94,21 @@ #if !defined(OS_ANDROID) case chrome::DIR_GLOBAL_GCM_STORE: if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) +@@ -547,7 +552,7 @@ bool PathProvider(int key, base::FilePath* result) { + cur = cur.Append(kGCMStoreDirname); + break; + #endif // !defined(OS_ANDROID) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + case chrome::FILE_COMPONENT_FLASH_HINT: + if (!base::PathService::Get( + chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN, &cur)) { +@@ -555,7 +560,7 @@ bool PathProvider(int key, base::FilePath* result) { + } + cur = cur.Append(kComponentUpdatedFlashHint); + break; +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + #if defined(OS_CHROMEOS) + case chrome::FILE_CHROME_OS_COMPONENT_FLASH: + cur = base::FilePath(kChromeOSComponentFlash); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/common/chrome_switches.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/common/chrome_switches.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/common/chrome_switches.h -@@ -302,7 +302,7 @@ extern const char kAllowNaClFileHandleAPI[]; +@@ -282,12 +282,12 @@ extern const char kAllowNaClFileHandleAPI[]; extern const char kAllowNaClSocketAPI[]; #endif @@ -9,3 +9,9 @@ extern const char kDisableInputImeAPI[]; extern const char kEnableInputImeAPI[]; #endif + +-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) + extern const char kEnableNewAppMenuIcon[]; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/common/chrome_switches.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/common/chrome_switches.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/common/chrome_switches.cc -@@ -987,7 +987,7 @@ const char kAllowNaClFileHandleAPI[] = "allow-n +@@ -914,12 +914,12 @@ const char kAllowNaClFileHandleAPI[] = "allow-n const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api"; #endif @@ -9,3 +9,9 @@ const char kDisableInputImeAPI[] = "disable-input-ime-api"; const char kEnableInputImeAPI[] = "enable-input-ime-api"; #endif + +-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) + const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_features.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_features.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_features.gni @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/chrome/common/features.gni.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/chrome/common/features.gni.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/chrome/common/features.gni -@@ -46,9 +46,9 @@ declare_args() { +@@ -41,9 +41,9 @@ declare_args() { (is_desktop_linux && use_dbus) || is_chromeos enable_one_click_signin = - is_win || is_mac || (is_linux && !is_chromeos && !is_chromecast) + is_win || is_mac || is_bsd || (is_linux && !is_chromeos && !is_chromecast) -- enable_service_discovery = enable_mdns || is_mac -+ enable_service_discovery = enable_mdns || is_mac || is_bsd +- enable_service_discovery = (enable_mdns && !is_android && !is_ios) || is_mac ++ enable_service_discovery = (enable_mdns && !is_android && !is_ios) || is_mac || is_bsd # Enables use of the session service, which is enabled by default. # Android stores them separately on the Java side. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_test_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_test_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/test/BUILD.gn.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/chrome/test/BUILD.gn +@@ -5268,7 +5268,7 @@ test("chrome_app_unittests") { + "//components/crash/core/common", + "//components/flags_ui:switches", + ] +- if (!is_fuchsia) { ++ if (!is_fuchsia && !is_bsd) { + # TODO(crbug.com/753619): Enable crash reporting on Fuchsia. + deps += [ "//third_party/breakpad:client" ] + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc @@ -1,13 +1,11 @@ ---- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc -@@ -83,8 +83,8 @@ const WebsiteSettingsInfo* WebsiteSettingsRegistry::Re - // doesn't allow the settings to be managed in the same way. See - // crbug.com/642184. - sync_status = WebsiteSettingsInfo::UNSYNCABLE; --#elif defined(OS_IOS) -- if (!(platform & PLATFORM_IOS)) -+#elif defined(OS_IOS) || defined(OS_BSD) -+ if (!(platform & PLATFORM_IOS) || !(platform & PLATFORM_BSD)) +@@ -66,7 +66,7 @@ const WebsiteSettingsInfo* WebsiteSettingsRegistry::Re + #if defined(OS_WIN) + if (!(platform & PLATFORM_WINDOWS)) return nullptr; - // Don't sync settings to mobile platforms. The UI is different to desktop and - // doesn't allow the settings to be managed in the same way. See +-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) + if (!(platform & PLATFORM_LINUX)) + return nullptr; + #elif defined(OS_MACOSX) && !defined(OS_IOS) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_BUILD.gn @@ -1,20 +1,29 @@ ---- src/3rdparty/chromium/components/crash/content/app/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/crash/content/app/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/components/crash/content/app/BUILD.gn -@@ -36,7 +36,7 @@ static_library("app") { +@@ -36,12 +36,12 @@ static_library("app") { sources += [ "crashpad.cc" ] } -- if (is_android || is_linux) { -+ if (is_android || (is_linux && !is_bsd)) { - # Want these files on both Linux and Android. +- if (is_android || (is_linux && !is_chromeos)) { ++ if (is_android || (is_linux && !is_chromeos && !is_bsd)) { set_sources_assignment_filter([]) + sources += [ "crashpad_linux.cc" ] + } + +- if (is_linux) { ++ if (is_linux && !is_bsd) { sources += [ -@@ -73,8 +73,6 @@ static_library("app") { - "//content/public/common:content_descriptors", - "//content/public/common:result_codes", - "//sandbox", -- "//third_party/breakpad:client", -- "//third_party/crashpad/crashpad/snapshot", + "breakpad_linux.cc", + "breakpad_linux.h", +@@ -79,7 +79,10 @@ static_library("app") { + "//third_party/crashpad/crashpad/snapshot", ] - # Clang's -mstackrealign doesn't work well with +- if (is_linux) { ++ if (is_bsd) { ++ deps -= [ "//third_party/crashpad/crashpad/snapshot" ] ++ } ++ if (is_linux && !is_bsd) { + deps += [ "//third_party/breakpad:client" ] + } + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_crashpad.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_crashpad.cc @@ -0,0 +1,43 @@ +--- src/3rdparty/chromium/components/crash/content/app/crashpad.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/components/crash/content/app/crashpad.cc +@@ -102,6 +102,12 @@ void InitializeCrashpadImpl(bool initial_client, + const base::FilePath& exe_path, + const std::vector& initial_arguments, + bool embedded_handler) { ++ ++#if defined(OS_BSD) ++ NOTIMPLEMENTED(); ++ return; ++#endif ++ + static bool initialized = false; + DCHECK(!initialized); + initialized = true; +@@ -122,7 +128,7 @@ void InitializeCrashpadImpl(bool initial_client, + DCHECK(browser_process || process_type == "Chrome Installer" || + process_type == "notification-helper" || + process_type == "GCPW Installer" || process_type == "GCPW DLL"); +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + DCHECK(browser_process); + #else + #error Port. +@@ -187,7 +193,7 @@ void InitializeCrashpadImpl(bool initial_client, + // other "main, first process" to initialize things. There is no "relauncher" + // on Windows, so this is synonymous with initial_client. + const bool should_initialize_database_and_set_upload_policy = initial_client; +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + const bool should_initialize_database_and_set_upload_policy = browser_process; + #endif + if (should_initialize_database_and_set_upload_policy) { +@@ -267,7 +273,9 @@ bool GetUploadsEnabled() { + + #if !defined(OS_ANDROID) + void DumpWithoutCrashing() { ++#if !defined(OS_BSD) + CRASHPAD_SIMULATE_CRASH(); ++#endif + } + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn @@ -1,10 +1,7 @@ ---- src/3rdparty/chromium/components/crash/content/browser/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/crash/content/browser/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/components/crash/content/browser/BUILD.gn -@@ -26,10 +26,9 @@ source_set("browser") { - "//components/crash/content/app", - "//content/public/browser", +@@ -28,7 +28,7 @@ source_set("browser") { "//content/public/common", -- "//third_party/breakpad:client", ] - if (is_linux || is_android) { @@ -12,7 +9,14 @@ set_sources_assignment_filter([]) # Want this file on both Linux and Android. -@@ -45,7 +44,7 @@ source_set("browser") { +@@ -42,13 +42,13 @@ source_set("browser") { + deps += [ "//third_party/crashpad/crashpad/client" ] + } + +- if (!is_android) { ++ if (!is_android && !is_bsd) { + deps += [ "//third_party/breakpad:client" ] + } # This is not in the GYP build but this target includes breakpad client # headers, so add the dependency here. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/crash/core/common/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/crash/core/common/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/components/crash/core/common/BUILD.gn @@ -6,7 +6,7 @@ import("//build/buildflag_header.gni") @@ -9,7 +9,7 @@ } group("common") { -@@ -88,7 +88,6 @@ target(crash_key_target_type, "crash_key") { +@@ -89,7 +89,6 @@ target(crash_key_target_type, "crash_key") { ] } @@ -17,12 +17,12 @@ } } -@@ -143,7 +142,7 @@ source_set("unit_tests") { +@@ -144,7 +143,7 @@ source_set("unit_tests") { sources += [ "objc_zombie_unittest.mm" ] } -- if (!is_mac && !is_win && !is_fuchsia) { -+ if (!is_mac && !is_win && !is_fuchsia && !is_bsd) { +- if (!is_mac && !is_win && !is_fuchsia && !is_android) { ++ if (!is_mac && !is_win && !is_fuchsia && !is_android && !is_bsd) { include_dirs = [ "//third_party/breakpad/breakpad/src/" ] sources += [ "crash_key_breakpad_unittest.cc" ] } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_internal_common_base__file.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_internal_common_base__file.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/download/internal/common/base_file.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/components/download/internal/common/base_file.cc +@@ -446,7 +446,7 @@ DownloadInterruptReason BaseFile::LogInterruptReason( + return reason; + } + +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + + namespace { + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_quarantine_quarantine__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_quarantine_quarantine__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_quarantine_quarantine__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/download/quarantine/quarantine_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/download/quarantine/quarantine_linux.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/components/download/quarantine/quarantine_linux.cc @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be @@ -15,35 +15,22 @@ +#endif #include "base/files/file_path.h" - #include "base/files/file_util.h" -@@ -29,17 +33,20 @@ bool SetExtendedFileAttribute(const char* path, - size_t value_size, + #include "base/logging.h" +@@ -25,7 +29,7 @@ bool SetExtendedFileAttribute(const char* path, int flags) { - base::AssertBlockingAllowed(); -+#if !defined(OS_BSD) + // On Chrome OS, there is no component that can validate these extended + // attributes so there is no need to set them. +-#if !defined(OS_CHROMEOS) ++#if !defined(OS_CHROMEOS) && !defined(OS_BSD) + base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK); int result = setxattr(path, name, value, value_size, flags); if (result) { - DPLOG(ERROR) << "Could not set extended attribute " << name << " on file " +@@ -33,7 +37,7 @@ bool SetExtendedFileAttribute(const char* path, << path; return false; } -+#endif // !defined(OS_BSD) +-#endif // !defined(OS_CHROMEOS) ++#endif // !defined(OS_CHROMEOS) && !defined(OS_BSD) return true; } - std::string GetExtendedFileAttribute(const char* path, const char* name) { - base::AssertBlockingAllowed(); -+#if !defined(OS_BSD) - ssize_t len = getxattr(path, name, nullptr, 0); - if (len <= 0) - return std::string(); -@@ -49,6 +56,9 @@ std::string GetExtendedFileAttribute(const char* path, - if (len < static_cast(buffer.size())) - return std::string(); - return std::string(buffer.begin(), buffer.end()); -+#else -+ return std::string(); -+#endif // !defined(OS_BSD) - } - - } // namespace Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/components/feedback/anonymizer_tool.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/feedback/anonymizer_tool.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/components/feedback/anonymizer_tool.cc -@@ -11,7 +11,11 @@ - #include "base/strings/string_util.h" +@@ -13,7 +13,11 @@ #include "base/strings/stringprintf.h" #include "content/public/browser/browser_thread.h" + #include "net/base/ip_address.h" +#if defined(OS_BSD) +#include +#else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_json__schema_json__schema__validator.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_json__schema_json__schema__validator.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/components/json_schema/json_schema_validator.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/components/json_schema/json_schema_validator.cc -@@ -21,7 +21,11 @@ - #include "base/strings/stringprintf.h" - #include "base/values.h" - #include "components/json_schema/json_schema_constants.h" -+#if defined(OS_BSD) -+#include -+#else - #include "third_party/re2/src/re2/re2.h" -+#endif - - namespace schema = json_schema_constants; - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/metrics/metrics_log.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/components/metrics/metrics_log.cc +@@ -198,7 +198,7 @@ void MetricsLog::RecordCoreSystemProfile(MetricsServic + // OperatingSystemVersion refers to the ChromeOS release version. + #if defined(OS_CHROMEOS) + os->set_kernel_version(base::SysInfo::KernelVersion()); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + // Linux operating system version is copied over into kernel version to be + // consistent. + os->set_kernel_version(base::SysInfo::OperatingSystemVersion()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h @@ -1,37 +1,48 @@ ---- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/components/os_crypt/os_crypt.h -@@ -14,7 +14,7 @@ +@@ -15,9 +15,9 @@ #include "base/strings/string16.h" #include "build/build_config.h" --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) class KeyStorageLinux; - #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) +-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) -@@ -28,7 +28,7 @@ struct Config; + #if defined(OS_MACOSX) && !defined(OS_IOS) + class PrefRegistrySimple; +@@ -34,13 +34,13 @@ struct Config; // true for Linux, if a password management tool is available. class OSCrypt { public: -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) // Set the configuration of OSCrypt. - static void SetConfig(std::unique_ptr config); + static COMPONENT_EXPORT(OS_CRYPT) void SetConfig( + std::unique_ptr config); +-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) -@@ -67,7 +67,7 @@ class OSCrypt { +-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) ++#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + // On Linux returns true iff the real secret key (not hardcoded one) is + // available. On MacOS returns true if Keychain is available (for mock + // Keychain it returns true if not using locked Keychain, false if using +@@ -112,7 +112,7 @@ class OSCrypt { DISALLOW_IMPLICIT_CONSTRUCTORS(OSCrypt); }; --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) // For unit testing purposes, inject methods to be used. // |get_key_storage_mock| provides the desired |KeyStorage| implementation. // If the provider returns |nullptr|, a hardcoded password will be used. -@@ -81,6 +81,6 @@ void UseMockKeyStorageForTesting( +@@ -127,6 +127,6 @@ void UseMockKeyStorageForTesting( // Clears any caching and most lazy initialisations performed by the production // code. Should be used after any test which required a password. - void ClearCacheForTesting(); --#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) -+#endif // (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) + COMPONENT_EXPORT(OS_CRYPT) void ClearCacheForTesting(); +-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #endif // COMPONENTS_OS_CRYPT_OS_CRYPT_H_ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_import_csv__reader.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_import_csv__reader.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/components/password_manager/core/browser/import/csv_reader.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/components/password_manager/core/browser/import/csv_reader.cc -@@ -9,7 +9,11 @@ - #include "base/logging.h" - #include "base/macros.h" - #include "base/strings/string_util.h" -+#if defined(OS_BSD) -+#include -+#else - #include "third_party/re2/src/re2/re2.h" -+#endif - - namespace { - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_plugin__placeholder.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_plugin__placeholder.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_plugin__placeholder.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/components/plugins/renderer/plugin_placeholder.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/components/plugins/renderer/plugin_placeholder.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/components/plugins/renderer/plugin_placeholder.cc -@@ -11,7 +11,11 @@ - #include "gin/object_template_builder.h" - #include "third_party/blink/public/web/web_element.h" +@@ -17,7 +17,11 @@ #include "third_party/blink/public/web/web_plugin_container.h" + #include "third_party/blink/public/web/web_script_source.h" + #include "third_party/blink/public/web/web_serialized_script_value.h" +#if defined(OS_BSD) +#include +#else #include "third_party/re2/src/re2/re2.h" -+#endif ++#endif // defined(OS_BSD) namespace plugins { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_services_filesystem_file__system__app.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_services_filesystem_file__system__app.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/components/services/filesystem/file_system_app.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/components/services/filesystem/file_system_app.cc +@@ -19,7 +19,7 @@ + #elif defined(OS_ANDROID) + #include "base/base_paths_android.h" + #include "base/path_service.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "base/environment.h" + #include "base/nix/xdg_util.h" + #elif defined(OS_MACOSX) +@@ -73,7 +73,7 @@ base::FilePath FileSystemApp::GetUserDataDir() { + CHECK(base::PathService::Get(base::DIR_APP_DATA, &path)); + #elif defined(OS_ANDROID) + CHECK(base::PathService::Get(base::DIR_ANDROID_APP_DATA, &path)); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + std::unique_ptr env(base::Environment::Create()); + path = base::nix::GetXDGDirectory( + env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_services_font_font__service__app.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_services_font_font__service__app.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/services/font/font_service_app.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/components/services/font/font_service_app.cc +@@ -20,7 +20,7 @@ + #include "components/services/font/ppapi_fontconfig_matching.h" // nogncheck + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "base/test/fontconfig_util_linux.h" + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/storage_monitor/removable_device_constants.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/components/storage_monitor/removable_device_constants.h +@@ -15,7 +15,7 @@ namespace storage_monitor { + extern const char kFSUniqueIdPrefix[]; + extern const char kVendorModelSerialPrefix[]; + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + extern const char kVendorModelVolumeStoragePrefix[]; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/storage_monitor/removable_device_constants.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/components/storage_monitor/removable_device_constants.cc +@@ -10,7 +10,7 @@ namespace storage_monitor { + const char kFSUniqueIdPrefix[] = "UUID:"; + const char kVendorModelSerialPrefix[] = "VendorModelSerial:"; + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + const char kVendorModelVolumeStoragePrefix[] = "VendorModelVolumeStorage:"; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/app/content_main_runner_impl.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/app/content_main_runner_impl.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/app/content_main_runner_impl.cc -@@ -85,10 +85,10 @@ +@@ -93,17 +93,17 @@ #include "base/posix/global_descriptors.h" #include "content/public/common/content_descriptors.h" @@ -13,7 +13,51 @@ #include "sandbox/linux/services/libc_interceptor.h" #include "services/service_manager/zygote/zygote_main.h" #endif -@@ -695,11 +695,11 @@ int ContentMainRunnerImpl::Initialize(const ContentMai + + #endif // OS_POSIX || OS_FUCHSIA + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "base/native_library.h" + #include "base/rand_util.h" + #include "services/service_manager/zygote/common/common_sandbox_support_linux.h" +@@ -126,7 +126,7 @@ + #if BUILDFLAG(ENABLE_WEBRTC) + #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck + #endif +-#endif // OS_LINUX ++#endif // OS_LINUX || defined(OS_BSD) + + #if !defined(CHROME_MULTIPLE_DLL_BROWSER) + #include "content/child/field_trial.h" +@@ -314,7 +314,7 @@ void InitializeZygoteSandboxForBrowserProcess( + } + #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + + #if BUILDFLAG(ENABLE_PLUGINS) + // Loads the (native) libraries but does not initialize them (i.e., does not +@@ -413,7 +413,7 @@ void PreSandboxInit() { + } + #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) + +-#endif // OS_LINUX ++#endif // OS_LINUX || defined(OS_BSD) + + } // namespace + +@@ -471,7 +471,7 @@ int RunZygote(ContentMainDelegate* delegate) { + delegate->ZygoteStarting(&zygote_fork_delegates); + media::InitializeMediaLibrary(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + PreSandboxInit(); + #endif + +@@ -644,11 +644,11 @@ int ContentMainRunnerImpl::Initialize(const ContentMai base::GlobalDescriptors::kBaseDescriptor); #endif // !OS_ANDROID Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/content/browser/BUILD.gn -@@ -1799,11 +1799,6 @@ jumbo_source_set("browser") { - "tracing/cros_tracing_agent.cc", +@@ -1883,11 +1883,6 @@ jumbo_source_set("browser") { "tracing/cros_tracing_agent.h", ] + deps += [ "//chromeos/resources" ] - } else { - sources += [ - "memory/memory_monitor_linux.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/browser/browser_main_loop.cc -@@ -241,6 +241,11 @@ - #include "base/mac/foundation_util.h" +@@ -255,6 +255,11 @@ + #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h" #endif +#include "content/browser/sandbox_host_linux.h" @@ -24,3 +24,21 @@ #endif #if defined(USE_X11) && !defined(TOOLKIT_QT) +@@ -634,7 +644,7 @@ int BrowserMainLoop::EarlyInitialization() { + #endif // defined(OS_ANDROID) || defined(OS_CHROMEOS) + + #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ +- defined(OS_ANDROID) ++ defined(OS_ANDROID) || defined(OS_BSD) + // We use quite a few file descriptors for our IPC as well as disk the disk + // cache,and the default limit on the Mac is low (256), so bump it up. + +@@ -644,7 +654,7 @@ int BrowserMainLoop::EarlyInitialization() { + // an arbitrarily high number. See https://crbug.com/539567 + base::IncreaseFdLimitTo(8192); + #endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || +- // defined(OS_ANDROID) ++ // defined(OS_ANDROID) || defined(OS_BSD) + + #if defined(OS_WIN) + net::EnsureWinsockInit(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_swap__metrics__driver__impl__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_swap__metrics__driver__impl__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_swap__metrics__driver__impl__linux.cc @@ -1,16 +1,27 @@ ---- src/3rdparty/chromium/content/browser/memory/swap_metrics_driver_impl_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/browser/memory/swap_metrics_driver_impl_linux.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/browser/memory/swap_metrics_driver_impl_linux.cc -@@ -44,9 +44,13 @@ SwapMetricsDriverImplLinux::~SwapMetricsDriverImplLinu +@@ -43,6 +43,7 @@ SwapMetricsDriverImplLinux::~SwapMetricsDriverImplLinu + SwapMetricsDriver::SwapMetricsUpdateResult SwapMetricsDriverImplLinux::UpdateMetricsInternal(base::TimeDelta interval) { - base::VmStatInfo vmstat; +#if !defined(OS_BSD) + base::VmStatInfo vmstat; if (!base::GetVmStatInfo(&vmstat)) { return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed; - } +@@ -55,12 +56,15 @@ SwapMetricsDriverImplLinux::UpdateMetricsInternal(base + + if (interval.is_zero()) + return SwapMetricsDriver::SwapMetricsUpdateResult:: +- kSwapMetricsUpdateSuccess; ++ kSwapMetricsUpdateSuccess; + + delegate_->OnSwapInCount(in_counts, interval); + delegate_->OnSwapOutCount(out_counts, interval); + + return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateSuccess; +#else -+ return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed; ++ return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed; +#endif + } - uint64_t in_counts = vmstat.pswpin - last_pswpin_; - uint64_t out_counts = vmstat.pswpout - last_pswpout_; + } // namespace content Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_input_input__device__change__observer.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_input_input__device__change__observer.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/input/input_device_change_observer.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/input/input_device_change_observer.cc +@@ -10,7 +10,7 @@ + + #if defined(OS_WIN) + #include "ui/events/devices/input_device_observer_win.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "ui/events/devices/input_device_manager.h" + #elif defined(OS_ANDROID) + #include "ui/events/devices/input_device_observer_android.h" +@@ -22,7 +22,7 @@ InputDeviceChangeObserver::InputDeviceChangeObserver(R + render_view_host_impl_ = rvhi; + #if defined(OS_WIN) + ui::InputDeviceObserverWin::GetInstance()->AddObserver(this); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + ui::InputDeviceManager::GetInstance()->AddObserver(this); + #elif defined(OS_ANDROID) + ui::InputDeviceObserverAndroid::GetInstance()->AddObserver(this); +@@ -32,7 +32,7 @@ InputDeviceChangeObserver::InputDeviceChangeObserver(R + InputDeviceChangeObserver::~InputDeviceChangeObserver() { + #if defined(OS_WIN) + ui::InputDeviceObserverWin::GetInstance()->RemoveObserver(this); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + ui::InputDeviceManager::GetInstance()->RemoveObserver(this); + #elif defined(OS_ANDROID) + ui::InputDeviceObserverAndroid::GetInstance()->RemoveObserver(this); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h @@ -0,0 +1,47 @@ +--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.h +@@ -14,7 +14,7 @@ + #include "content/public/browser/native_event_processor_observer_mac.h" + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "ui/aura/window_event_dispatcher_observer.h" + #endif + +@@ -39,7 +39,7 @@ namespace responsiveness { + class CONTENT_EXPORT NativeEventObserver + #if defined(OS_MACOSX) + : public NativeEventProcessorObserver +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + : public aura::WindowEventDispatcherObserver + #elif defined(OS_WIN) + : public base::MessagePumpForUI::Observer +@@ -56,7 +56,7 @@ class CONTENT_EXPORT NativeEventObserver + NativeEventObserver(WillRunEventCallback will_run_event_callback, + DidRunEventCallback did_run_event_callback); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + ~NativeEventObserver() override; + #else + virtual ~NativeEventObserver(); +@@ -68,7 +68,7 @@ class CONTENT_EXPORT NativeEventObserver + // Exposed for tests. + void WillRunNativeEvent(const void* opaque_identifier) override; + void DidRunNativeEvent(const void* opaque_identifier) override; +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + // aura::WindowEventDispatcherObserver overrides: + void OnWindowEventDispatcherStartedProcessing( + aura::WindowEventDispatcher* dispatcher, +@@ -85,7 +85,7 @@ class CONTENT_EXPORT NativeEventObserver + void RegisterObserver(); + void DeregisterObserver(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + struct EventInfo { + const void* unique_id; + }; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.cc +@@ -15,7 +15,7 @@ + + #include "ui/events/platform/platform_event_source.h" + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "ui/aura/env.h" + #include "ui/events/event.h" + #endif +@@ -39,7 +39,7 @@ NativeEventObserver::~NativeEventObserver() { + DeregisterObserver(); + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void NativeEventObserver::RegisterObserver() { + aura::Env::GetInstance()->AddWindowEventDispatcherObserver(this); + } +@@ -61,7 +61,7 @@ void NativeEventObserver::OnWindowEventDispatcherFinis + did_run_event_callback_.Run(info.unique_id); + events_being_processed_.pop_back(); + } +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + + #if defined(OS_WIN) + void NativeEventObserver::RegisterObserver() { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_service__manager_service__manager__context.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_service__manager_service__manager__context.cc @@ -0,0 +1,35 @@ +--- src/3rdparty/chromium/content/browser/service_manager/service_manager_context.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/browser/service_manager/service_manager_context.cc +@@ -99,7 +99,7 @@ + #include "jni/ContentNfcDelegate_jni.h" + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "components/services/font/font_service_app.h" + #include "components/services/font/public/interfaces/constants.mojom.h" + #endif +@@ -378,12 +378,12 @@ void CreateInProcessAudioService( + BrowserMainLoop::GetAudioManager(), std::move(request))); + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + std::unique_ptr CreateFontService( + service_manager::mojom::ServiceRequest request) { + return std::make_unique(std::move(request)); + } +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + + std::unique_ptr CreateResourceCoordinatorService( + service_manager::mojom::ServiceRequest request) { +@@ -618,7 +618,7 @@ ServiceManagerContext::ServiceManagerContext( + base::BindRepeating(&CreateVideoCaptureService)); + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + RegisterInProcessService( + packaged_services_connection_.get(), font_service::mojom::kServiceName, + base::CreateSequencedTaskRunnerWithTraits( Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_storage__partition__impl.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_storage__partition__impl.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/storage_partition_impl.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/browser/storage_partition_impl.cc +@@ -768,7 +768,7 @@ net::URLRequestContextGetter* StoragePartitionImpl::Ge + // TODO(jam): enable for all, still used on WebView. + // See copy of this ifdef in: + // StoragePartitionImplMap::Get +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + if (base::FeatureList::IsEnabled(network::features::kNetworkService)) + NOTREACHED(); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_storage__partition__impl__map.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_storage__partition__impl__map.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/storage_partition_impl_map.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/browser/storage_partition_impl_map.cc +@@ -425,7 +425,7 @@ StoragePartitionImpl* StoragePartitionImplMap::Get( + bool create_request_context = true; + if (base::FeatureList::IsEnabled(network::features::kNetworkService)) { + // These ifdefs should match StoragePartitionImpl::GetURLRequestContext. +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + create_request_context = false; + #elif defined(OS_ANDROID) + create_request_context = Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_shared__resources__data__source.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_shared__resources__data__source.cc @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/content/browser/webui/shared_resources_data_source.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/browser/webui/shared_resources_data_source.cc +@@ -72,9 +72,9 @@ const std::map CreateMojoResourceIdT + return std::map { + {IDR_MOJO_MOJO_BINDINGS_JS, "js/mojo_bindings.js"}, + {IDR_MOJO_MOJO_BINDINGS_LITE_JS, "js/mojo_bindings_lite.js"}, +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + {IDR_MOJO_TIME_MOJOM_JS, "js/time.mojom.js"}, +-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + }; + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__data__source__impl.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__data__source__impl.h +++ /dev/null @@ -1,25 +0,0 @@ ---- src/3rdparty/chromium/content/browser/webui/web_ui_data_source_impl.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/browser/webui/web_ui_data_source_impl.h -@@ -31,15 +31,15 @@ class CONTENT_EXPORT WebUIDataSourceImpl : public URLD - public WebUIDataSource { - public: - // WebUIDataSource implementation: -- void AddString(base::StringPiece name, const base::string16& value) override; -- void AddString(base::StringPiece name, const std::string& value) override; -- void AddLocalizedString(base::StringPiece name, int ids) override; -+ void AddString(const std::string& name, const base::string16& value) override; -+ void AddString(const std::string& name, const std::string& value) override; -+ void AddLocalizedString(const std::string& name, int ids) override; - void AddLocalizedStrings( - const base::DictionaryValue& localized_strings) override; -- void AddBoolean(base::StringPiece name, bool value) override; -- void AddInteger(base::StringPiece name, int32_t value) override; -- void SetJsonPath(base::StringPiece path) override; -- void AddResourcePath(base::StringPiece path, int resource_id) override; -+ void AddBoolean(const std::string& name, bool value) override; -+ void AddInteger(const std::string& name, int32_t value) override; -+ void SetJsonPath(const std::string& path) override; -+ void AddResourcePath(const std::string& path, int resource_id) override; - void SetDefaultResource(int resource_id) override; - void SetRequestFilter( - const WebUIDataSource::HandleRequestCallback& callback) override; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__data__source__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__data__source__impl.cc +++ /dev/null @@ -1,69 +0,0 @@ ---- src/3rdparty/chromium/content/browser/webui/web_ui_data_source_impl.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/browser/webui/web_ui_data_source_impl.cc -@@ -120,24 +120,24 @@ WebUIDataSourceImpl::WebUIDataSourceImpl(const std::st - WebUIDataSourceImpl::~WebUIDataSourceImpl() { - } - --void WebUIDataSourceImpl::AddString(base::StringPiece name, -+void WebUIDataSourceImpl::AddString(const std::string& name, - const base::string16& value) { - // TODO(dschuyler): Share only one copy of these strings. - localized_strings_.SetKey(name, base::Value(value)); -- replacements_[name.as_string()] = base::UTF16ToUTF8(value); -+ replacements_[name] = base::UTF16ToUTF8(value); - } - --void WebUIDataSourceImpl::AddString(base::StringPiece name, -+void WebUIDataSourceImpl::AddString(const std::string& name, - const std::string& value) { - localized_strings_.SetKey(name, base::Value(value)); -- replacements_[name.as_string()] = value; -+ replacements_[name] = value; - } - --void WebUIDataSourceImpl::AddLocalizedString(base::StringPiece name, int ids) { -+void WebUIDataSourceImpl::AddLocalizedString(const std::string& name, int ids) { - std::string utf8_str = - base::UTF16ToUTF8(GetContentClient()->GetLocalizedString(ids)); - localized_strings_.SetKey(name, base::Value(utf8_str)); -- replacements_[name.as_string()] = utf8_str; -+ replacements_[name] = utf8_str; - } - - void WebUIDataSourceImpl::AddLocalizedStrings( -@@ -147,7 +147,7 @@ void WebUIDataSourceImpl::AddLocalizedStrings( - &replacements_); - } - --void WebUIDataSourceImpl::AddBoolean(base::StringPiece name, bool value) { -+void WebUIDataSourceImpl::AddBoolean(const std::string& name, bool value) { - localized_strings_.SetBoolean(name, value); - // TODO(dschuyler): Change name of |localized_strings_| to |load_time_data_| - // or similar. These values haven't been found as strings for -@@ -156,21 +156,21 @@ void WebUIDataSourceImpl::AddBoolean(base::StringPiece - // replacements. - } - --void WebUIDataSourceImpl::AddInteger(base::StringPiece name, int32_t value) { -+void WebUIDataSourceImpl::AddInteger(const std::string& name, int32_t value) { - localized_strings_.SetInteger(name, value); - } - --void WebUIDataSourceImpl::SetJsonPath(base::StringPiece path) { -+void WebUIDataSourceImpl::SetJsonPath(const std::string& path) { - DCHECK(json_path_.empty()); - DCHECK(!path.empty()); - -- json_path_ = path.as_string(); -+ json_path_ = path; - excluded_paths_.insert(json_path_); - } - --void WebUIDataSourceImpl::AddResourcePath(base::StringPiece path, -+void WebUIDataSourceImpl::AddResourcePath(const std::string& path, - int resource_id) { -- path_to_idr_map_[path.as_string()] = resource_id; -+ path_to_idr_map_[path] = resource_id; - } - - void WebUIDataSourceImpl::SetDefaultResource(int resource_id) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__impl.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__impl.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/browser/webui/web_ui_impl.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/browser/webui/web_ui_impl.h -@@ -52,7 +52,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, - int GetBindings() const override; - void SetBindings(int bindings) override; - void AddMessageHandler(std::unique_ptr handler) override; -- void RegisterMessageCallback(base::StringPiece message, -+ void RegisterMessageCallback(const std::string& message, - const MessageCallback& callback) override; - void ProcessWebUIMessage(const GURL& source_url, - const std::string& message, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__impl.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/content/browser/webui/web_ui_impl.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/browser/webui/web_ui_impl.cc -@@ -249,9 +249,9 @@ void WebUIImpl::CallJavascriptFunctionUnsafe( - ExecuteJavascript(GetJavascriptCall(function_name, args)); - } - --void WebUIImpl::RegisterMessageCallback(base::StringPiece message, -+void WebUIImpl::RegisterMessageCallback(const std::string& message, - const MessageCallback& callback) { -- message_callbacks_.emplace(message.as_string(), callback); -+ message_callbacks_.insert(std::make_pair(message, callback)); - } - - void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_view__messages.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_view__messages.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/common/view_messages.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/common/view_messages.h -@@ -221,7 +221,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) - IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page) - IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed) - IPC_STRUCT_TRAITS_MEMBER(network_contry_iso) --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - IPC_STRUCT_TRAITS_MEMBER(system_font_family_name) - #endif - #if defined(OS_WIN) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc @@ -1,26 +1,58 @@ ---- src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc -@@ -68,7 +68,7 @@ inline bool UseLibV4L2() { +@@ -95,8 +95,9 @@ static const char kLibV4lEncPluginPath[] = + "/usr/lib/libv4l/plugins/libv4l-encplugin.so"; #endif - } -constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; +constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL; ++#if !defined(OS_BSD) void AddV4L2GpuWhitelist( std::vector* permissions, -@@ -283,6 +283,7 @@ bool BrokerProcessPreSandboxHook( + const service_manager::SandboxSeccompBPF::Options& options) { +@@ -277,8 +278,10 @@ std::vector FilePermissionsForGp + AddStandardGpuWhiteList(&permissions); + return permissions; + } ++#endif - } // namespace + void LoadArmGpuLibraries() { ++#if !defined(OS_BSD) + // Preload the Mali library. + if (UseChromecastSandboxWhitelist()) { + for (const char* path : kWhitelistedChromecastPaths) { +@@ -293,6 +296,7 @@ void LoadArmGpuLibraries() { + // Preload the Tegra V4L2 (video decode acceleration) library. + dlopen(kLibTegraPath, dlopen_flag); + } ++#endif + } + + bool LoadAmdGpuLibraries() { +@@ -348,6 +352,7 @@ bool LoadLibrariesForGpu( + return true; + } +#if !defined(OS_BSD) + sandbox::syscall_broker::BrokerCommandSet CommandSetForGPU( + const service_manager::SandboxLinux::Options& options) { + sandbox::syscall_broker::BrokerCommandSet command_set; +@@ -368,13 +373,17 @@ bool BrokerProcessPreSandboxHook( + service_manager::SetProcessTitleFromCommandLine(nullptr); + return true; + } ++#endif + + } // namespace + bool GpuProcessPreSandboxHook(service_manager::SandboxLinux::Options options) { ++ NOTIMPLEMENTED(); ++#if !defined(OS_BSD) service_manager::SandboxLinux::GetInstance()->StartBrokerProcess( CommandSetForGPU(options), FilePermissionsForGpu(options), -@@ -296,5 +297,6 @@ bool GpuProcessPreSandboxHook(service_manager::Sandbox - errno = 0; - return true; - } + base::BindOnce(BrokerProcessPreSandboxHook), options); +#endif - } // namespace content + if (!LoadLibrariesForGpu(options)) + return false; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h @@ -13,7 +13,7 @@ #include "build/build_config.h" @@ -9,8 +9,13 @@ #include "components/services/font/public/cpp/font_loader.h" #include "third_party/skia/include/core/SkRefCnt.h" #endif -@@ -58,7 +58,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp - std::unique_ptr sandbox_support_; +@@ -42,11 +42,11 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp + bool sync_dir) override; + + private: +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + std::unique_ptr sandbox_support_; #endif -#if defined(OS_LINUX) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc @@ -1,25 +1,16 @@ ---- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc -@@ -40,7 +40,7 @@ namespace content { - - class PpapiBlinkPlatformImpl::SandboxSupport : public WebSandboxSupport { - public: --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - explicit SandboxSupport(sk_sp font_loader) - : font_loader_(std::move(font_loader)) {} - #endif -@@ -48,7 +48,7 @@ class PpapiBlinkPlatformImpl::SandboxSupport : public +@@ -20,7 +20,7 @@ #if defined(OS_MACOSX) - bool LoadFont(CTFontRef srcFont, CGFontRef* out, uint32_t* fontID) override; + #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) - SandboxSupport(); - void GetFallbackFontForCharacter( - WebUChar32 character, -@@ -129,7 +129,7 @@ void PpapiBlinkPlatformImpl::SandboxSupport::GetWebFon - #endif // !defined(OS_ANDROID) && !defined(OS_WIN) + #include "content/child/child_process_sandbox_support_impl_linux.h" + #endif + +@@ -34,7 +34,7 @@ typedef struct CGFont* CGFontRef; + namespace content { PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl() { -#if defined(OS_LINUX) @@ -27,3 +18,21 @@ font_loader_ = sk_make_sp(ChildThread::Get()->GetConnector()); SkFontConfigInterface::SetGlobal(font_loader_); +@@ -49,7 +49,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() { + } + + void PpapiBlinkPlatformImpl::Shutdown() { +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + // SandboxSupport contains a map of OutOfProcessFont objects, which hold + // WebStrings and WebVectors, which become invalidated when blink is shut + // down. Hence, we need to clear that map now, just before blink::shutdown() +@@ -59,7 +59,7 @@ void PpapiBlinkPlatformImpl::Shutdown() { + } + + blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetSandboxSupport() { +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + return sandbox_support_.get(); + #else + return nullptr; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc -@@ -126,6 +126,8 @@ int PpapiPluginMain(const MainFunctionParams& paramete - service_manager::SandboxTypeFromCommandLine(command_line), - service_manager::SandboxLinux::PreSandboxHook(), - service_manager::SandboxLinux::Options()); -+#elif defined(OS_BSD) -+ NOTIMPLEMENTED(); - #endif - - ChildProcess ppapi_process; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__packaged__services__manifest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_content__packaged__services__manifest.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/content/public/app/content_packaged_services_manifest.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/public/app/content_packaged_services_manifest.cc +@@ -23,7 +23,7 @@ + #include "services/video_capture/manifest.h" + #include "services/viz/manifest.h" + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "components/services/font/manifest.h" + #endif + +@@ -67,7 +67,7 @@ const service_manager::Manifest& GetContentPackagedSer + .PackageService(tracing::GetManifest()) + .PackageService(video_capture::GetManifest()) + .PackageService(viz::GetManifest()) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + .PackageService(font_service::GetManifest()) + #endif + #if defined(OS_CHROMEOS) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_v8__snapshot__overlay__manifest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_app_v8__snapshot__overlay__manifest.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/public/app/v8_snapshot_overlay_manifest.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/public/app/v8_snapshot_overlay_manifest.cc +@@ -15,7 +15,7 @@ namespace content { + const service_manager::Manifest& GetV8SnapshotOverlayManifest() { + static base::NoDestructor manifest { + service_manager::ManifestBuilder() +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + .PreloadFile(kV8NativesDataDescriptor, + base::FilePath(FILE_PATH_LITERAL("natives_blob.bin"))) + #if defined(USE_V8_CONTEXT_SNAPSHOT) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_web__ui.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_web__ui.h +++ /dev/null @@ -1,19 +0,0 @@ ---- src/3rdparty/chromium/content/public/browser/web_ui.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/public/browser/web_ui.h -@@ -11,7 +11,6 @@ - - #include "base/callback.h" - #include "base/strings/string16.h" --#include "base/strings/string_piece.h" - #include "content/common/content_export.h" - #include "ui/base/page_transition_types.h" - -@@ -75,7 +74,7 @@ class CONTENT_EXPORT WebUI { - // Used by WebUIMessageHandlers. If the given message is already registered, - // the call has no effect. - using MessageCallback = base::RepeatingCallback; -- virtual void RegisterMessageCallback(base::StringPiece message, -+ virtual void RegisterMessageCallback(const std::string& message, - const MessageCallback& callback) = 0; - - // This is only needed if an embedder overrides handling of a WebUIMessage and Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_web__ui__data__source.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_web__ui__data__source.h +++ /dev/null @@ -1,51 +0,0 @@ ---- src/3rdparty/chromium/content/public/browser/web_ui_data_source.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/public/browser/web_ui_data_source.h -@@ -13,7 +13,6 @@ - - #include "base/callback.h" - #include "base/strings/string16.h" --#include "base/strings/string_piece.h" - #include "content/common/content_export.h" - - namespace base { -@@ -45,33 +44,33 @@ class WebUIDataSource { - std::unique_ptr update); - - // Adds a string keyed to its name to our dictionary. -- virtual void AddString(base::StringPiece name, -+ virtual void AddString(const std::string& name, - const base::string16& value) = 0; - - // Adds a string keyed to its name to our dictionary. -- virtual void AddString(base::StringPiece name, const std::string& value) = 0; -+ virtual void AddString(const std::string& name, const std::string& value) = 0; - - // Adds a localized string with resource |ids| keyed to its name to our - // dictionary. -- virtual void AddLocalizedString(base::StringPiece name, int ids) = 0; -+ virtual void AddLocalizedString(const std::string& name, int ids) = 0; - - // Add strings from |localized_strings| to our dictionary. - virtual void AddLocalizedStrings( - const base::DictionaryValue& localized_strings) = 0; - - // Adds a boolean keyed to its name to our dictionary. -- virtual void AddBoolean(base::StringPiece name, bool value) = 0; -+ virtual void AddBoolean(const std::string& name, bool value) = 0; - - // Adds a signed 32-bit integer keyed to its name to our dictionary. Larger - // integers may not be exactly representable in JavaScript. See - // MAX_SAFE_INTEGER in /v8/src/globals.h. -- virtual void AddInteger(base::StringPiece name, int32_t value) = 0; -+ virtual void AddInteger(const std::string& name, int32_t value) = 0; - - // Sets the path which will return the JSON strings. -- virtual void SetJsonPath(base::StringPiece path) = 0; -+ virtual void SetJsonPath(const std::string& path) = 0; - - // Adds a mapping between a path name and a resource to return. -- virtual void AddResourcePath(base::StringPiece path, int resource_id) = 0; -+ virtual void AddResourcePath(const std::string& path, int resource_id) = 0; - - // Sets the resource to returned when no other paths match. - virtual void SetDefaultResource(int resource_id) = 0; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_common__param__traits__macros.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/public/common/common_param_traits_macros.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/public/common/common_param_traits_macros.h +@@ -328,7 +328,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) + IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page) + IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed) + IPC_STRUCT_TRAITS_MEMBER(network_contry_iso) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + IPC_STRUCT_TRAITS_MEMBER(system_font_family_name) + #endif + #if defined(OS_WIN) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__features.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/public/common/content_features.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/public/common/content_features.cc +@@ -493,7 +493,7 @@ const base::Feature kWebAssemblyThreads{"WebAssemblyTh + base::FEATURE_DISABLED_BY_DEFAULT}; + + // Enable WebAssembly trap handler. +-#if defined(OS_LINUX) && defined(ARCH_CPU_X86_64) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_X86_64) + const base::Feature kWebAssemblyTrapHandler{"WebAssemblyTrapHandler", + base::FEATURE_ENABLED_BY_DEFAULT}; + #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_use__zoom__for__dsf__policy.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_use__zoom__for__dsf__policy.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/public/common/use_zoom_for_dsf_policy.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/public/common/use_zoom_for_dsf_policy.cc +@@ -25,7 +25,7 @@ const base::Feature kUseZoomForDsfEnabledByDefault{ + #endif + + bool IsUseZoomForDSFEnabledByDefault() { +-#if defined(OS_LINUX) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) + return true; + #elif defined(OS_WIN) || defined(OS_ANDROID) + return base::FeatureList::IsEnabled(kUseZoomForDsfEnabledByDefault); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_audio_audio__device__factory.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_audio_audio__device__factory.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/renderer/media/audio/audio_device_factory.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/renderer/media/audio/audio_device_factory.cc +@@ -33,7 +33,7 @@ AudioDeviceFactory* AudioDeviceFactory::factory_ = nul + + namespace { + +-#if defined(OS_WIN) || defined(OS_MACOSX) || \ ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + // Due to driver deadlock issues on Windows (http://crbug/422522) there is a + // chance device authorization response is never received from the browser side. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_stream_processed__local__audio__source.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_stream_processed__local__audio__source.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_stream_processed__local__audio__source.cc @@ -1,7 +1,16 @@ ---- src/3rdparty/chromium/content/renderer/media/stream/processed_local_audio_source.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/renderer/media/stream/processed_local_audio_source.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/renderer/media/stream/processed_local_audio_source.cc -@@ -267,7 +267,7 @@ void ProcessedLocalAudioSource::Capture(const media::A - bool key_pressed) { +@@ -35,7 +35,7 @@ void* const kProcessedLocalAudioSourceIdentifier = + const_cast(&kProcessedLocalAudioSourceIdentifier); + + bool ApmInAudioServiceEnabled() { +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + return base::FeatureList::IsEnabled(features::kWebRtcApmInAudioService); + #else + return false; +@@ -355,7 +355,7 @@ void ProcessedLocalAudioSource::CaptureUsingProcessor( + bool key_pressed) { #if defined(OS_WIN) || defined(OS_MACOSX) DCHECK_LE(volume, 1.0); -#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/content/renderer/render_thread_impl.cc -@@ -199,12 +199,21 @@ +@@ -194,12 +194,21 @@ #include "mojo/public/cpp/bindings/message_dumper.h" #endif @@ -22,7 +22,7 @@ using base::ThreadRestrictions; using blink::WebDocument; using blink::WebFrame; -@@ -980,7 +989,7 @@ void RenderThreadImpl::Init( +@@ -936,7 +945,7 @@ void RenderThreadImpl::Init() { DCHECK(parsed_num_raster_threads) << string_value; DCHECK_GT(num_raster_threads, 0); @@ -31,7 +31,7 @@ categorized_worker_pool_->SetBackgroundingCallback( main_thread_scheduler_->DefaultTaskRunner(), base::BindOnce( -@@ -1021,7 +1030,7 @@ void RenderThreadImpl::Init( +@@ -977,7 +986,7 @@ void RenderThreadImpl::Init() { GetConnector()->BindInterface(mojom::kBrowserServiceName, mojo::MakeRequest(&storage_partition_service_)); @@ -40,16 +40,7 @@ render_message_filter()->SetThreadPriority( ChildProcess::current()->io_thread_id(), base::ThreadPriority::DISPLAY); #endif -@@ -1227,7 +1236,7 @@ void RenderThreadImpl::InitializeCompositorThread() { - false)); - GetContentClient()->renderer()->PostCompositorThreadCreated( - compositor_task_runner_.get()); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - render_message_filter()->SetThreadPriority(compositor_thread_->ThreadId(), - base::ThreadPriority::DISPLAY); - #endif -@@ -1451,11 +1460,11 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1335,11 +1344,11 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: gpu::kGpuFeatureStatusEnabled); const bool enable_gpu_memory_buffers = !is_gpu_compositing_disabled_ && Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h @@ -1,11 +1,29 @@ ---- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h -@@ -265,7 +265,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi - std::unique_ptr main_thread_; +@@ -29,7 +29,7 @@ + #include "third_party/blink/public/mojom/loader/code_cache.mojom.h" + #include "third_party/blink/public/platform/modules/webdatabase/web_database.mojom.h" + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "components/services/font/public/cpp/font_loader.h" // nogncheck + #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck + #endif +@@ -263,7 +263,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi std::unique_ptr connector_; + scoped_refptr io_runner_; + +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + std::unique_ptr sandbox_support_; + #endif + +@@ -298,7 +298,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi + blink::mojom::CodeCacheHostPtrInfo code_cache_host_info_; + scoped_refptr code_cache_host_; --#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) -+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) - class SandboxSupport; - std::unique_ptr sandbox_support_; +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + sk_sp font_loader_; #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc @@ -1,65 +1,56 @@ ---- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc -@@ -123,7 +123,7 @@ +@@ -109,7 +109,7 @@ - #if defined(OS_POSIX) - #include "base/file_descriptor_posix.h" --#if !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - #include - #include - -@@ -203,7 +203,7 @@ gpu::ContextType ToGpuContextType(blink::Platform::Con - - //------------------------------------------------------------------------------ - --#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) -+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) - class RendererBlinkPlatformImpl::SandboxSupport - : public blink::WebSandboxSupport { - public: -@@ -238,7 +238,7 @@ class RendererBlinkPlatformImpl::SandboxSupport - sk_sp font_loader_; + #if defined(OS_MACOSX) + #include "content/child/child_process_sandbox_support_impl_mac.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "content/child/child_process_sandbox_support_impl_linux.h" #endif - }; --#endif // !defined(OS_ANDROID) && !defined(OS_WIN) -+#endif // !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) - - //------------------------------------------------------------------------------ -@@ -276,7 +276,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -204,7 +204,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( + ->Clone(); + thread_safe_sender_ = RenderThreadImpl::current()->thread_safe_sender(); + blob_registry_.reset(new WebBlobRegistryImpl(thread_safe_sender_.get())); +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + font_loader_ = sk_make_sp(connector_.get()); + SkFontConfigInterface::SetGlobal(font_loader_); + #endif +@@ -213,7 +213,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( connector_ = service_manager::Connector::Create(&request); } --#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) -+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (g_sandbox_enabled && sandboxEnabled()) { #if defined(OS_MACOSX) - sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport()); -@@ -304,7 +304,7 @@ RendererBlinkPlatformImpl::~RendererBlinkPlatformImpl( + sandbox_support_.reset(new WebSandboxSupportMac(connector_.get())); +@@ -241,7 +241,7 @@ RendererBlinkPlatformImpl::~RendererBlinkPlatformImpl( } void RendererBlinkPlatformImpl::Shutdown() { --#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) -+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) - // SandboxSupport contains a map of WebFallbackFont objects, which hold +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + // SandboxSupport contains a map of OutOfProcessFont objects, which hold // WebStrings and WebVectors, which become invalidated when blink is shut // down. Hence, we need to clear that map now, just before blink::shutdown() -@@ -396,7 +396,7 @@ blink::BlameContext* RendererBlinkPlatformImpl::GetTop +@@ -322,7 +322,7 @@ RendererBlinkPlatformImpl::CreateNetworkURLLoaderFacto + + void RendererBlinkPlatformImpl::SetDisplayThreadPriority( + base::PlatformThreadId thread_id) { +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + if (RenderThreadImpl* render_thread = RenderThreadImpl::current()) { + render_thread->render_message_filter()->SetThreadPriority( + thread_id, base::ThreadPriority::DISPLAY); +@@ -335,7 +335,7 @@ blink::BlameContext* RendererBlinkPlatformImpl::GetTop } blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { --#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_FUCHSIA) -+#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_FUCHSIA) || defined(OS_BSD) - // These platforms do not require sandbox support. - return NULL; +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + return sandbox_support_.get(); #else -@@ -589,7 +589,7 @@ bool RendererBlinkPlatformImpl::SandboxSupport::LoadFo - return content::LoadFont(src_font, out, font_id); - } - --#elif defined(OS_POSIX) && !defined(OS_ANDROID) -+#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_BSD) - - void RendererBlinkPlatformImpl::SandboxSupport::GetFallbackFontForCharacter( - blink::WebUChar32 character, + // These platforms do not require sandbox support. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/renderer/renderer_main.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/renderer/renderer_main.cc -@@ -177,7 +177,7 @@ int RendererMain(const MainFunctionParams& parameters) - bool need_sandbox = - !command_line.HasSwitch(service_manager::switches::kNoSandbox); - --#if !defined(OS_WIN) && !defined(OS_MACOSX) -+#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) - // Sandbox is enabled before RenderProcess initialization on all platforms, - // except Windows and Mac. - // TODO(markus): Check if it is OK to remove ifdefs for Windows and Mac. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/shell/BUILD.gn +@@ -953,7 +953,7 @@ group("content_shell_crash_test") { + if (is_win) { + data_deps += [ "//build/win:copy_cdb_to_output" ] + } +- if (is_posix && !is_android) { ++ if (is_posix && !is_android && !is_bsd) { + data_deps += [ + "//third_party/breakpad:dump_syms($host_toolchain)", + "//third_party/breakpad:minidump_stackwalk($host_toolchain)", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h @@ -0,0 +1,24 @@ +--- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h +@@ -11,7 +11,7 @@ + #include "build/build_config.h" + #include "third_party/blink/public/platform/platform.h" + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "components/services/font/public/cpp/font_loader.h" // nogncheck + #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck + #endif +@@ -39,10 +39,10 @@ class UtilityBlinkPlatformWithSandboxSupportImpl : pub + blink::WebSandboxSupport* GetSandboxSupport() override; + + private: +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + std::unique_ptr sandbox_support_; + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + sk_sp font_loader_; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc +@@ -8,7 +8,7 @@ + + #if defined(OS_MACOSX) + #include "content/child/child_process_sandbox_support_impl_mac.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "content/child/child_process_sandbox_support_impl_linux.h" + #endif + +@@ -17,7 +17,7 @@ namespace content { + UtilityBlinkPlatformWithSandboxSupportImpl:: + UtilityBlinkPlatformWithSandboxSupportImpl( + service_manager::Connector* connector) { +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + font_loader_ = sk_make_sp(connector); + SkFontConfigInterface::SetGlobal(font_loader_); + sandbox_support_ = std::make_unique(font_loader_); +@@ -31,7 +31,7 @@ UtilityBlinkPlatformWithSandboxSupportImpl:: + + blink::WebSandboxSupport* + UtilityBlinkPlatformWithSandboxSupportImpl::GetSandboxSupport() { +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + return sandbox_support_.get(); + #else + return nullptr; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__main.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__main.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/utility/utility_main.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/content/utility/utility_main.cc -@@ -64,7 +64,7 @@ int UtilityMain(const MainFunctionParams& parameters) - if (parameters.command_line.HasSwitch(switches::kUtilityStartupDialog)) - WaitForDebugger("Utility"); - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) && !defined(OS_BSD) - // Initializes the sandbox before any threads are created. - // TODO(jorgelo): move this after GTK initialization when we enable a strict - // Seccomp-BPF policy. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_BUILD.gn +++ /dev/null @@ -1,25 +0,0 @@ ---- src/3rdparty/chromium/device/serial/BUILD.gn.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/device/serial/BUILD.gn -@@ -6,7 +6,7 @@ import("//build/config/features.gni") - import("//mojo/public/tools/bindings/mojom.gni") - - # Library works only on desktop platforms. --if (is_win || is_linux || is_mac) { -+if (is_win || is_linux || is_mac || is_bsd) { - config("platform_support") { - visibility = [ ":serial" ] - if (is_win) { -@@ -55,6 +55,13 @@ if (is_win || is_linux || is_mac) { - "//net", - "//third_party/re2", - ] -+ -+ if (is_bsd) { -+ sources -= [ -+ "serial_device_enumerator_linux.cc", -+ "serial_device_enumerator_linux.h", -+ ] -+ } - - if (is_posix) { - sources += [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_serial__io__handler__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_serial__io__handler__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc -@@ -62,7 +62,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee - BITRATE_TO_SPEED_CASE(9600) - BITRATE_TO_SPEED_CASE(19200) - BITRATE_TO_SPEED_CASE(38400) --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - BITRATE_TO_SPEED_CASE(57600) - BITRATE_TO_SPEED_CASE(115200) - BITRATE_TO_SPEED_CASE(230400) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc -@@ -60,7 +60,7 @@ namespace { +@@ -58,7 +58,7 @@ namespace { const char kReceivingEndDoesntExistError[] = "Could not establish connection. Receiving end does not exist."; @@ -9,7 +9,7 @@ const char kMissingPermissionError[] = "Access to native messaging requires nativeMessaging permission."; const char kProhibitedByPoliciesError[] = -@@ -362,7 +362,7 @@ void MessageService::OpenChannelToNativeApp( +@@ -318,7 +318,7 @@ void MessageService::OpenChannelToNativeApp( if (!source) return; @@ -18,3 +18,18 @@ content::WebContents* web_contents = content::WebContents::FromRenderFrameHost(source); ExtensionWebContentsObserver* extension_web_contents_observer = +@@ -378,12 +378,12 @@ void MessageService::OpenChannelToNativeApp( + channel->opener->IncrementLazyKeepaliveCount(); + + AddChannel(std::move(channel), receiver_port_id); +-#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) ++#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)) + const char kNativeMessagingNotSupportedError[] = + "Native Messaging is not supported on this platform."; + DispatchOnDisconnect( + source, receiver_port_id, kNativeMessagingNotSupportedError); +-#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) ++#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)) + } + + void MessageService::OpenChannelToTab(int source_process_id, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_delegate_factory.cc +@@ -11,7 +11,7 @@ + + #if defined(OS_CHROMEOS) + #include "extensions/browser/api/networking_private/networking_private_chromeos.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "extensions/browser/api/networking_private/networking_private_linux.h" + #elif defined(OS_WIN) || defined(OS_MACOSX) + #include "components/wifi/wifi_service.h" +@@ -61,7 +61,7 @@ KeyedService* NetworkingPrivateDelegateFactory::BuildS + NetworkingPrivateDelegate* delegate; + #if defined(OS_CHROMEOS) + delegate = new NetworkingPrivateChromeOS(browser_context); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + delegate = new NetworkingPrivateLinux(); + #elif defined(OS_WIN) || defined(OS_MACOSX) + std::unique_ptr wifi_service(wifi::WiFiService::Create()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__event__router__factory.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__event__router__factory.cc +++ /dev/null @@ -1,17 +0,0 @@ ---- src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_event_router_factory.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_event_router_factory.cc -@@ -13,6 +13,7 @@ - - namespace extensions { - -+#if !defined(OS_BSD) - // static - NetworkingPrivateEventRouter* - NetworkingPrivateEventRouterFactory::GetForProfile( -@@ -57,5 +58,6 @@ bool NetworkingPrivateEventRouterFactory::ServiceIsCre - bool NetworkingPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const { - return true; - } -+#endif - - } // namespace extensions Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_browser__context__keyed__service__factories.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_browser__context__keyed__service__factories.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/extensions/browser/browser_context_keyed_service_factories.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/extensions/browser/browser_context_keyed_service_factories.cc +@@ -93,7 +93,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() + #if defined(OS_CHROMEOS) + NetworkingConfigServiceFactory::GetInstance(); + #endif +-#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + NetworkingPrivateEventRouterFactory::GetInstance(); + #endif + PowerAPI::GetFactoryInstance(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_features_feature.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_features_feature.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/extensions/common/features/feature.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/extensions/common/features/feature.cc +@@ -26,6 +26,8 @@ Feature::Platform Feature::GetCurrentPlatform() { + return MACOSX_PLATFORM; + #elif defined(OS_WIN) + return WIN_PLATFORM; ++#elif defined(OS_BSD) ++ return LINUX_PLATFORM; + #else + return UNSPECIFIED_PLATFORM; + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_image__util.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_image__util.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_image__util.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/extensions/common/image_util.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/extensions/common/image_util.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/extensions/common/image_util.cc -@@ -11,7 +11,11 @@ - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_util.h" +@@ -18,7 +18,11 @@ #include "base/strings/stringprintf.h" + #include "base/time/time.h" + #include "base/timer/elapsed_timer.h" +#if defined(OS_BSD) +#include +#else #include "third_party/re2/src/re2/re2.h" -+#endif ++#endif // defined(OS_BSD) + #include "third_party/skia/include/core/SkBitmap.h" + #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkColor.h" - #include "third_party/skia/include/utils/SkParse.h" - #include "ui/gfx/color_utils.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/extensions/shell/app/shell_main_delegate.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/extensions/shell/app/shell_main_delegate.cc +@@ -38,7 +38,7 @@ + + #if defined(OS_WIN) + #include "base/base_paths_win.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "base/nix/xdg_util.h" + #elif defined(OS_MACOSX) + #include "base/base_paths_mac.h" +@@ -52,7 +52,7 @@ + + namespace { + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) + extensions::ShellCrashReporterClient* GetCrashReporterClient() { + static base::NoDestructor instance; + return instance.get(); +@@ -70,7 +70,7 @@ base::FilePath GetDataPath() { + return cmd_line->GetSwitchValuePath(switches::kContentShellDataPath); + + base::FilePath data_dir; +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + std::unique_ptr env(base::Environment::Create()); + data_dir = base::nix::GetXDGDirectory( + env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc +@@ -89,7 +89,7 @@ bool IsImageSizeValidForGpuMemoryBufferFormat(const gf + uint32_t GetPlatformSpecificTextureTarget() { + #if defined(OS_MACOSX) + return GL_TEXTURE_RECTANGLE_ARB; +-#elif defined(OS_ANDROID) || defined(OS_LINUX) ++#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) + return GL_TEXTURE_EXTERNAL_OES; + #elif defined(OS_WIN) + return GL_TEXTURE_2D; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/gpu/config/gpu_control_list.cc @@ -16,7 +16,11 @@ #include "base/values.h" #include "build/build_config.h" - #include "gpu/config/gpu_info.h" + #include "gpu/config/gpu_util.h" +#if defined(OS_BSD) +#include +#else #include "third_party/re2/src/re2/re2.h" -+#endif ++#endif // defined(OS_BSD) namespace gpu { namespace { @@ -21,7 +21,7 @@ return kGLTypeGL; #elif defined(OS_MACOSX) return kGLTypeGL; -@@ -681,7 +685,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -699,7 +703,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif defined(OS_FUCHSIA) return kOsFuchsia; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h @@ -16,7 +16,7 @@ #include "ui/gfx/geometry/size.h" @@ -9,16 +9,7 @@ namespace gfx { class ClientNativePixmapFactory; } -@@ -28,7 +28,7 @@ namespace gpu { - class GPU_EXPORT GpuMemoryBufferSupport { - public: - GpuMemoryBufferSupport(); --#if defined(OS_LINUX) || defined(USE_OZONE) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) - GpuMemoryBufferSupport(std::unique_ptr - client_native_pixmap_factory); - #endif -@@ -42,7 +42,7 @@ class GPU_EXPORT GpuMemoryBufferSupport { +@@ -38,7 +38,7 @@ class GPU_EXPORT GpuMemoryBufferSupport { bool IsNativeGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format, gfx::BufferUsage usage); @@ -27,8 +18,8 @@ gfx::ClientNativePixmapFactory* client_native_pixmap_factory() { return client_native_pixmap_factory_.get(); } -@@ -65,7 +65,7 @@ class GPU_EXPORT GpuMemoryBufferSupport { - const GpuMemoryBufferImpl::DestructionCallback& callback); +@@ -61,7 +61,7 @@ class GPU_EXPORT GpuMemoryBufferSupport { + GpuMemoryBufferImpl::DestructionCallback callback); private: -#if defined(OS_LINUX) || defined(USE_OZONE) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc @@ -12,7 +12,7 @@ #include "gpu/ipc/common/gpu_memory_buffer_impl_io_surface.h" @@ -9,43 +9,18 @@ #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" #include "ui/gfx/client_native_pixmap_factory.h" #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" -@@ -36,13 +36,13 @@ namespace gpu { - GpuMemoryBufferSupport::GpuMemoryBufferSupport() { - #if defined(USE_OZONE) - client_native_pixmap_factory_ = ui::CreateClientNativePixmapFactoryOzone(); --#elif defined(OS_LINUX) && !defined(TOOLKIT_QT) -+#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT) - client_native_pixmap_factory_.reset( - gfx::CreateClientNativePixmapFactoryDmabuf()); - #endif - } - --#if defined(OS_LINUX) || defined(USE_OZONE) -+#if defined(OS_LINUX) || defined(USE_OZONE) || defined(OS_BSD) - GpuMemoryBufferSupport::GpuMemoryBufferSupport( - std::unique_ptr - client_native_pixmap_factory) -@@ -57,7 +57,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemoryBufferType() - return gfx::IO_SURFACE_BUFFER; - #elif defined(OS_ANDROID) - return gfx::ANDROID_HARDWARE_BUFFER; --#elif defined(OS_LINUX) && !defined(TOOLKIT_QT) -+#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT) - return gfx::NATIVE_PIXMAP; - #elif defined(OS_WIN) - return gfx::DXGI_SHARED_HANDLE; -@@ -114,7 +114,7 @@ bool GpuMemoryBufferSupport::IsNativeGpuMemoryBufferCo - return false; +@@ -109,7 +109,7 @@ bool GpuMemoryBufferSupport::IsNativeGpuMemoryBufferCo #elif defined(USE_OZONE) - return client_native_pixmap_factory_->IsConfigurationSupported(format, usage); + return ui::OzonePlatform::EnsureInstance()->IsNativePixmapConfigSupported( + format, usage); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) return false; // TODO(julian.isorce): Add linux support. #elif defined(OS_WIN) switch (usage) { -@@ -171,7 +171,7 @@ GpuMemoryBufferSupport::CreateGpuMemoryBufferImplFromH +@@ -166,7 +166,7 @@ GpuMemoryBufferSupport::CreateGpuMemoryBufferImplFromH return GpuMemoryBufferImplIOSurface::CreateFromHandle( - std::move(handle), size, format, usage, callback); + std::move(handle), size, format, usage, std::move(callback)); #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc @@ -1,24 +1,24 @@ ---- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc -@@ -74,7 +74,7 @@ bool CollectGraphicsInfo(GPUInfo* gpu_info, - return success; +@@ -87,7 +87,7 @@ void InitializeDirectCompositionOverlaySupport(GPUInfo } + #endif // defined(OS_WIN) -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) -+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) && !defined(OS_BSD) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)) || defined(OS_BSD) bool CanAccessNvidiaDeviceFile() { bool res = true; - base::AssertBlockingAllowed(); -@@ -110,7 +110,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK); +@@ -129,7 +129,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL // crash during feature collection. gpu::SetKeysForCrashLogging(gpu_info_); -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) if (gpu_info_.gpu.vendor_id == 0x10de && // NVIDIA gpu_info_.gpu.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile()) return false; -@@ -194,7 +194,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -199,7 +199,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL sandbox_helper_->PreSandboxStartup(); bool attempted_startsandbox = false; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.h @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.h +@@ -191,8 +191,10 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThread : publi + XDisplay* display_; + gfx::AcceleratedWidget window_; + XAtom atom_; ++#if !defined(OS_BSD) + FILE* tty_file_; + int host_tty_; ++#endif + #endif + + base::RepeatingClosure alternative_terminate_for_testing_; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__watchdog__thread.cc @@ -0,0 +1,73 @@ +--- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.cc +@@ -51,8 +51,10 @@ const int kGpuTimeout = 10000; + #endif + + #if defined(USE_X11) ++#if !defined(OS_BSD) + const base::FilePath::CharType kTtyFilePath[] = + FILE_PATH_LITERAL("/sys/class/tty/tty0/active"); ++#endif + const unsigned char text[20] = "check"; + #endif + +@@ -75,8 +77,10 @@ GpuWatchdogThread::GpuWatchdogThread() + display_(nullptr), + window_(0), + atom_(x11::None), ++#if !defined(OS_BSD) + host_tty_(-1), + #endif ++#endif + weak_factory_(this) { + base::subtle::NoBarrier_Store(&awaiting_acknowledge_, false); + +@@ -91,7 +95,9 @@ GpuWatchdogThread::GpuWatchdogThread() + #endif + + #if defined(USE_X11) ++#if !defined(OS_BSD) + tty_file_ = base::OpenFile(base::FilePath(kTtyFilePath), "r"); ++#endif + SetupXServer(); + #endif + base::MessageLoopCurrent::Get()->AddTaskObserver(&task_observer_); +@@ -238,8 +244,10 @@ GpuWatchdogThread::~GpuWatchdogThread() { + power_monitor->RemoveObserver(this); + + #if defined(USE_X11) ++#if !defined(OS_BSD) + if (tty_file_) + fclose(tty_file_); ++#endif + if (display_) { + DCHECK(window_); + XDestroyWindow(display_, window_); +@@ -463,7 +471,7 @@ void GpuWatchdogThread::DeliberatelyTerminateToRecover + return; + #endif + +-#if defined(USE_X11) ++#if defined(USE_X11) && !defined(OS_BSD) + // Don't crash if we're not on the TTY of our host X11 server. + int active_tty = GetActiveTTY(); + if (host_tty_ != -1 && active_tty != -1 && host_tty_ != active_tty) { +@@ -526,7 +534,9 @@ void GpuWatchdogThread::SetupXServer() { + CopyFromParent, InputOutput, CopyFromParent, 0, nullptr); + atom_ = XInternAtom(display_, "CHECK", x11::False); + } ++#if !defined(OS_BSD) + host_tty_ = GetActiveTTY(); ++#endif + } + + void GpuWatchdogThread::SetupXChangeProp() { +@@ -627,7 +637,7 @@ base::ThreadTicks GpuWatchdogThread::GetWatchedThreadT + } + #endif + +-#if defined(USE_X11) ++#if defined(USE_X11) && !defined(OS_BSD) + int GpuWatchdogThread::GetActiveTTY() const { + char tty_string[8] = {0}; + if (tty_file_ && !fseek(tty_file_, 0, SEEK_SET) && Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h -@@ -32,7 +32,7 @@ class HeadlessContentBrowserClient : public content::C - content::BrowserContext* context, - content::StoragePartition* partition, - storage::OptionalQuotaSettingsCallback callback) override; +@@ -34,7 +34,7 @@ class HeadlessContentBrowserClient : public content::C + ::storage::OptionalQuotaSettingsCallback callback) override; + content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings( + content::BrowserContext* context) override; -#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) void GetAdditionalMappedFilesForChildProcess( Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__request__context__manager.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__request__context__manager.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/headless/lib/browser/headless_request_context_manager.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/headless/lib/browser/headless_request_context_manager.h +@@ -69,7 +69,7 @@ class HeadlessRequestContextManager { + std::unique_ptr proxy_config_monitor_; + bool is_system_context_; + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + ::network::mojom::CryptConfigPtr crypt_config_; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__request__context__manager.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__request__context__manager.cc @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/headless/lib/browser/headless_request_context_manager.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/headless/lib/browser/headless_request_context_manager.cc +@@ -35,7 +35,7 @@ namespace headless { + + namespace { + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + static char kProductName[] = "HeadlessChrome"; + #endif + +@@ -81,7 +81,7 @@ net::NetworkTrafficAnnotationTag GetProxyConfigTraffic + return traffic_annotation; + } + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + ::network::mojom::CryptConfigPtr BuildCryptConfigOnce( + const base::FilePath& user_data_path) { + static bool done_once = false; +@@ -290,7 +290,7 @@ HeadlessRequestContextManager::HeadlessRequestContextM + proxy_config_monitor_ = + std::make_unique(proxy_monitor_task_runner); + } +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + crypt_config_ = BuildCryptConfigOnce(user_data_path_); + if (network_service_enabled_ && crypt_config_) + content::GetNetworkService()->SetCryptConfig(std::move(crypt_config_)); +@@ -366,7 +366,7 @@ void HeadlessRequestContextManager::InitializeOnIO() { + std::move(protocol_handler.second)); + } + protocol_handlers_.clear(); +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + if (crypt_config_) { + content::GetNetworkServiceImpl()->SetCryptConfig( + std::move(crypt_config_)); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn @@ -1,13 +1,13 @@ ---- src/3rdparty/chromium/media/audio/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/audio/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/media/audio/BUILD.gn -@@ -254,9 +254,19 @@ source_set("audio") { +@@ -240,8 +240,18 @@ source_set("audio") { 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 += [ @@ -17,15 +17,6 @@ + "sndio/sndio_output.cc", + "sndio/sndio_output.h" + ] -+ } + } if (use_alsa) { - libs += [ "asound" ] -@@ -302,7 +312,6 @@ source_set("audio") { - if (link_pulseaudio) { - configs += [ ":libpulse" ] - } else { -- libs += [ "dl" ] - deps += [ ":pulse_generate_stubs" ] - sources += get_target_outputs(":pulse_generate_stubs") - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/media/audio/audio_input_device.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/media/audio/audio_input_device.cc +@@ -248,7 +248,7 @@ void AudioInputDevice::OnStreamCreated( + // also a risk of false positives if we are suspending when starting the stream + // here. See comments in AliveChecker and PowerObserverHelper for details and + // todos. +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + const bool stop_at_first_alive_notification = true; + const bool pause_check_during_suspend = false; + #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/base/video_frame.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/base/video_frame.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/media/base/video_frame.h -@@ -69,7 +69,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -71,7 +71,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte STORAGE_UNOWNED_MEMORY = 2, // External, non owned data pointers. STORAGE_OWNED_MEMORY = 3, // VideoFrame has allocated its own data buffer. STORAGE_SHMEM = 4, // Pixels are backed by Shared Memory. @@ -9,7 +9,7 @@ // TODO(mcasas): Consider turning this type into STORAGE_NATIVE // based on the idea of using this same enum value for both DMA // buffers on Linux and CVPixelBuffers on Mac (which currently use -@@ -225,7 +225,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -245,7 +245,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte uint8_t* a_data, base::TimeDelta timestamp); @@ -18,16 +18,16 @@ // Wraps provided dmabufs // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will -@@ -387,7 +387,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -430,7 +430,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // Returns the offset into the shared memory where the frame data begins. size_t shared_memory_offset() const; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - // Return a vector containing the backing DmaBufs for this frame. The number + // Returns a vector containing the backing DmaBufs for this frame. The number // of returned DmaBufs will be equal or less than the number of planes of // the frame. If there are less, this means that the last FD contains the -@@ -606,7 +606,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -624,7 +624,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // memory. size_t shared_memory_offset_; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/base/video_frame.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/base/video_frame.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/media/base/video_frame.cc -@@ -64,7 +64,7 @@ static std::string StorageTypeToString( +@@ -53,7 +53,7 @@ static std::string StorageTypeToString( return "OWNED_MEMORY"; case VideoFrame::STORAGE_SHMEM: return "SHMEM"; @@ -9,16 +9,16 @@ case VideoFrame::STORAGE_DMABUFS: return "DMABUFS"; #endif -@@ -80,7 +80,7 @@ static std::string StorageTypeToString( +@@ -68,7 +68,7 @@ static std::string StorageTypeToString( // static - static bool IsStorageTypeMappable(VideoFrame::StorageType storage_type) { + bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { return -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && -@@ -367,7 +367,7 @@ scoped_refptr VideoFrame::WrapExternalYuva +@@ -461,7 +461,7 @@ scoped_refptr VideoFrame::WrapExternalYuva return frame; } @@ -26,9 +26,9 @@ +#if defined(OS_LINUX) || defined(OS_BSD) // static scoped_refptr VideoFrame::WrapExternalDmabufs( - VideoPixelFormat format, -@@ -488,7 +488,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( - wrapping_frame->data_[i] = frame->data(i); + const VideoFrameLayout& layout, +@@ -592,7 +592,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( + } } -#if defined(OS_LINUX) @@ -36,12 +36,12 @@ // If there are any |dmabuf_fds_| plugged in, we should duplicate them. if (frame->storage_type() == STORAGE_DMABUFS) { wrapping_frame->dmabuf_fds_ = DuplicateFDs(frame->dmabuf_fds_); -@@ -860,7 +860,7 @@ size_t VideoFrame::shared_memory_offset() const { +@@ -917,7 +917,7 @@ size_t VideoFrame::shared_memory_offset() const { return shared_memory_offset_; } -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - std::vector VideoFrame::DmabufFds() const { + const std::vector& VideoFrame::DmabufFds() const { DCHECK_EQ(storage_type_, STORAGE_DMABUFS); - std::vector ret; + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc -@@ -4,15 +4,17 @@ +@@ -4,8 +4,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" @@ -11,7 +11,8 @@ #include #include #include - #include +@@ -13,7 +15,7 @@ + #include -#if !defined(OS_OPENBSD) @@ -19,7 +20,7 @@ #include #endif -@@ -27,10 +29,10 @@ +@@ -28,10 +30,10 @@ using media::mojom::MeteringMode; @@ -32,7 +33,7 @@ // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the // format is introduced to kernel. -@@ -367,9 +369,9 @@ void V4L2CaptureDelegate::AllocateAndStart( +@@ -342,9 +344,9 @@ void V4L2CaptureDelegate::AllocateAndStart( // operation (|errno| == EINVAL in this case) or plain failure. if ((power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_50HZ) || (power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_60HZ) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__linux.cc @@ -1,24 +1,24 @@ ---- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_linux.cc.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_linux.cc -@@ -253,6 +253,7 @@ bool VideoCaptureDeviceFactoryLinux::HasUsableFormats( +@@ -259,6 +259,7 @@ bool VideoCaptureDeviceFactoryLinux::HasUsableFormats( if (!(capabilities & V4L2_CAP_VIDEO_CAPTURE)) return false; +#if !defined(OS_FREEBSD) - const std::list& usable_fourccs = + const std::vector& usable_fourccs = VideoCaptureDeviceLinux::GetListOfUsableFourCCs(false); v4l2_fmtdesc fmtdesc = {}; -@@ -264,6 +265,7 @@ bool VideoCaptureDeviceFactoryLinux::HasUsableFormats( +@@ -267,6 +268,7 @@ bool VideoCaptureDeviceFactoryLinux::HasUsableFormats( + if (base::ContainsValue(usable_fourccs, fmtdesc.pixelformat)) return true; - } } +#endif - DLOG(ERROR) << "No usable formats found"; + DVLOG(1) << "No usable formats found"; return false; -@@ -311,9 +313,13 @@ void VideoCaptureDeviceFactoryLinux::GetSupportedForma - for (; HANDLE_EINTR(v4l2_->ioctl(fd, VIDIOC_ENUM_FMT, &v4l2_format)) == 0; - ++v4l2_format.index) { +@@ -312,9 +314,13 @@ void VideoCaptureDeviceFactoryLinux::GetSupportedForma + v4l2_format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + for (; DoIoctl(fd, VIDIOC_ENUM_FMT, &v4l2_format) == 0; ++v4l2_format.index) { VideoCaptureFormat supported_format; +#if !defined(OS_FREEBSD) supported_format.pixel_format = Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc @@ -1,19 +1,38 @@ ---- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_linux.cc.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/media/capture/video/linux/video_capture_device_linux.cc -@@ -18,11 +18,11 @@ +@@ -15,7 +15,7 @@ + + #if defined(OS_OPENBSD) #include - #else +-#else ++#elif !defined(OS_FREEBSD) #include --#include + #include #endif +@@ -31,17 +31,18 @@ int TranslatePowerLineFrequencyToV4L2(PowerLineFrequen + case PowerLineFrequency::FREQUENCY_60HZ: + return V4L2_CID_POWER_LINE_FREQUENCY_60HZ; + default: +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) ++//#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) + // If we have no idea of the frequency, at least try and set it to AUTO. + return V4L2_CID_POWER_LINE_FREQUENCY_AUTO; +-#else +- return V4L2_CID_POWER_LINE_FREQUENCY_60HZ; +-#endif ++//#else ++// return V4L2_CID_POWER_LINE_FREQUENCY_60HZ; ++//#endif + } + } - namespace media { + } // namespace +#if !defined(OS_FREEBSD) // Translates Video4Linux pixel formats to Chromium pixel formats. // static VideoPixelFormat VideoCaptureDeviceLinux::V4l2FourCcToChromiumPixelFormat( -@@ -36,6 +36,7 @@ std::list VideoCaptureDeviceLinux::GetListOf +@@ -55,6 +56,7 @@ std::vector VideoCaptureDeviceLinux::GetList bool favour_mjpeg) { return V4L2CaptureDelegate::GetListOfUsableFourCcs(favour_mjpeg); } @@ -21,7 +40,7 @@ VideoCaptureDeviceLinux::VideoCaptureDeviceLinux( scoped_refptr v4l2, -@@ -54,6 +55,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDeviceLinux() { +@@ -73,6 +75,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDeviceLinux() { void VideoCaptureDeviceLinux::AllocateAndStart( const VideoCaptureParams& params, std::unique_ptr client) { @@ -29,9 +48,9 @@ DCHECK(!capture_impl_); if (v4l2_thread_.IsRunning()) return; // Wrong state. -@@ -79,9 +81,11 @@ void VideoCaptureDeviceLinux::AllocateAndStart( - for (const auto& request : photo_requests_queue_) - v4l2_thread_.task_runner()->PostTask(FROM_HERE, request); +@@ -100,9 +103,11 @@ void VideoCaptureDeviceLinux::AllocateAndStart( + for (auto& request : photo_requests_queue_) + v4l2_thread_.task_runner()->PostTask(FROM_HERE, std::move(request)); photo_requests_queue_.clear(); +#endif // !defined(OS_FREEBSD) } @@ -41,7 +60,7 @@ if (!v4l2_thread_.IsRunning()) return; // Wrong state. v4l2_thread_.task_runner()->PostTask( -@@ -91,6 +95,7 @@ void VideoCaptureDeviceLinux::StopAndDeAllocate() { +@@ -112,6 +117,7 @@ void VideoCaptureDeviceLinux::StopAndDeAllocate() { v4l2_thread_.Stop(); capture_impl_ = nullptr; @@ -49,26 +68,17 @@ } void VideoCaptureDeviceLinux::TakePhoto(TakePhotoCallback callback) { -@@ -133,11 +138,13 @@ void VideoCaptureDeviceLinux::SetPhotoOptions( +@@ -154,11 +160,13 @@ void VideoCaptureDeviceLinux::SetPhotoOptions( } void VideoCaptureDeviceLinux::SetRotation(int rotation) { +#if !defined(OS_FREEBSD) if (v4l2_thread_.IsRunning()) { v4l2_thread_.task_runner()->PostTask( - FROM_HERE, base::Bind(&V4L2CaptureDelegate::SetRotation, - capture_impl_->GetWeakPtr(), rotation)); + FROM_HERE, base::BindOnce(&V4L2CaptureDelegate::SetRotation, + capture_impl_->GetWeakPtr(), rotation)); } -+#endif ++#endif // !defined(OS_FREEBSD) } - // static -@@ -149,7 +156,7 @@ int VideoCaptureDeviceLinux::TranslatePowerLineFrequen - case PowerLineFrequency::FREQUENCY_60HZ: - return V4L2_CID_POWER_LINE_FREQUENCY_60HZ; - default: --#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) -+#if defined(OS_BSD) - // If we have no idea of the frequency, at least try and set it to AUTO. - return V4L2_CID_POWER_LINE_FREQUENCY_AUTO; - #else + } // namespace media Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_mock__gpu__memory__buffer__manager.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_mock__gpu__memory__buffer__manager.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/media/capture/video/mock_gpu_memory_buffer_manager.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/media/capture/video/mock_gpu_memory_buffer_manager.cc +@@ -103,7 +103,7 @@ class FakeGpuMemoryBuffer : public gfx::GpuMemoryBuffe + gfx::GpuMemoryBufferHandle handle; + handle.type = gfx::NATIVE_PIXMAP; + handle.id = handle_.id; +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + handle.native_pixmap_handle = + gfx::CloneHandleForIPC(handle_.native_pixmap_handle); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_services_gpu__mojo__media__client.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_mojo_services_gpu__mojo__media__client.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/media/mojo/services/gpu_mojo_media_client.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/media/mojo/services/gpu_mojo_media_client.cc +@@ -55,7 +55,7 @@ namespace media { + namespace { + + #if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX) || \ +- defined(OS_WIN) || defined(OS_LINUX) ++ defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) + gpu::CommandBufferStub* GetCommandBufferStub( + base::WeakPtr media_gpu_channel_manager, + base::UnguessableToken channel_token, +@@ -172,7 +172,7 @@ std::unique_ptr GpuMojoMediaClient::Crea + std::make_unique(gpu_task_runner_, + std::move(get_stub_cb))); + #elif defined(OS_CHROMEOS) || defined(OS_MACOSX) || defined(OS_WIN) || \ +- defined(OS_LINUX) ++ defined(OS_LINUX) || defined(OS_BSD) + std::unique_ptr vda_video_decoder = VdaVideoDecoder::Create( + task_runner, gpu_task_runner_, media_log->Clone(), target_color_space, + gpu_preferences_, gpu_workarounds_, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc +@@ -633,7 +633,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa + } + + bool is_software_backed_video_frame = !video_frame->HasTextures(); +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + is_software_backed_video_frame &= !video_frame->HasDmaBufs(); + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_core_validation__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_core_validation__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/mojo/core/options_validation_unittest.cc.orig 2018-04-10 14:05:55 UTC -+++ src/3rdparty/chromium/mojo/core/options_validation_unittest.cc -@@ -18,7 +18,7 @@ namespace { - - using TestOptionsFlags = uint32_t; - --static_assert(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); -+static_assert(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); - struct MOJO_ALIGNAS(8) TestOptions { - uint32_t struct_size; - TestOptionsFlags flags; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_buffer.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_buffer.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/mojo/public/c/system/buffer.h.orig 2018-04-10 14:05:55 UTC -+++ src/3rdparty/chromium/mojo/public/c/system/buffer.h -@@ -30,7 +30,7 @@ struct MOJO_ALIGNAS(8) MojoCreateSharedBufferOptions { - // See |MojoCreateSharedBufferFlags|. - MojoCreateSharedBufferFlags flags; - }; --MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); -+MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); - MOJO_STATIC_ASSERT(sizeof(MojoCreateSharedBufferOptions) == 8, - "MojoCreateSharedBufferOptions has wrong size"); - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_data__pipe.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_data__pipe.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/mojo/public/c/system/data_pipe.h.orig 2018-04-10 14:05:55 UTC -+++ src/3rdparty/chromium/mojo/public/c/system/data_pipe.h -@@ -40,7 +40,7 @@ struct MOJO_ALIGNAS(8) MojoCreateDataPipeOptions { - // system-dependent capacity of at least one element in size. - uint32_t capacity_num_bytes; - }; --MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); -+MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); - MOJO_STATIC_ASSERT(sizeof(MojoCreateDataPipeOptions) == 16, - "MojoCreateDataPipeOptions has wrong size"); - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_message__pipe.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_message__pipe.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/mojo/public/c/system/message_pipe.h.orig 2018-04-10 14:05:55 UTC -+++ src/3rdparty/chromium/mojo/public/c/system/message_pipe.h -@@ -35,7 +35,7 @@ struct MOJO_ALIGNAS(8) MojoCreateMessagePipeOptions { - // See |MojoCreateMessagePipeFlags|. - MojoCreateMessagePipeFlags flags; - }; --MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); -+MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); - MOJO_STATIC_ASSERT(sizeof(MojoCreateMessagePipeOptions) == 8, - "MojoCreateMessagePipeOptions has wrong size"); - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_thunks.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_thunks.cc @@ -0,0 +1,47 @@ +--- src/3rdparty/chromium/mojo/public/c/system/thunks.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/mojo/public/c/system/thunks.cc +@@ -16,7 +16,7 @@ + #include "build/build_config.h" + #include "mojo/public/c/system/core.h" + +-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) ++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + #include "base/environment.h" + #include "base/files/file_path.h" + #include "base/optional.h" +@@ -28,7 +28,7 @@ namespace { + + typedef void (*MojoGetSystemThunksFunction)(MojoSystemThunks* thunks); + +-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) ++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + PROTECTED_MEMORY_SECTION + base::ProtectedMemory g_get_thunks; + #endif +@@ -65,7 +65,7 @@ namespace mojo { + class CoreLibraryInitializer { + public: + CoreLibraryInitializer(const MojoInitializeOptions* options) { +-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) ++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + bool application_provided_path = false; + base::Optional library_path; + if (options && options->struct_size >= sizeof(*options) && +@@ -84,7 +84,7 @@ class CoreLibraryInitializer { + + if (!library_path) { + // Default to looking for the library in the current working directory. +-#if defined(OS_CHROMEOS) || defined(OS_LINUX) ++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) + const base::FilePath::CharType kDefaultLibraryPathValue[] = + FILE_PATH_LITERAL("./libmojo_core.so"); + #elif defined(OS_WIN) +@@ -147,7 +147,7 @@ class CoreLibraryInitializer { + ~CoreLibraryInitializer() = default; + + private: +-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) ++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + base::Optional library_; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_js_mojo__bindings__resources.grd =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_js_mojo__bindings__resources.grd @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/mojo/public/js/mojo_bindings_resources.grd.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/mojo/public/js/mojo_bindings_resources.grd +@@ -23,7 +23,7 @@ + use_base_dir="false" + type="BINDATA" + compress="gzip" /> +- ++ + WatchFileDescriptor( +- netlink_fd_, true, base::MessagePumpForIO::WATCH_READ, &watcher_, this); +- if (rv < 0) { +- PLOG(ERROR) << "Could not watch NETLINK socket"; +- AbortAndForceOnline(); +- return; +- } +- } ++NOTIMPLEMENTED(); ++AbortAndForceOnline(); + } + + void AddressTrackerLinux::AbortAndForceOnline() { +@@ -250,25 +79,6 @@ void AddressTrackerLinux::AbortAndForceOnline() { connection_type_initialized_cv_.Broadcast(); } @@ -205,7 +221,7 @@ NetworkChangeNotifier::ConnectionType AddressTrackerLinux::GetCurrentConnectionType() { // http://crbug.com/125097 -@@ -323,102 +152,7 @@ void AddressTrackerLinux::HandleMessage(char* buffer, +@@ -326,102 +136,7 @@ void AddressTrackerLinux::HandleMessage(char* buffer, bool* address_changed, bool* link_changed, bool* tunnel_changed) { @@ -241,7 +257,7 @@ - msg->ifa_flags |= IFA_F_DEPRECATED; - // Only indicate change if the address is new or ifaddrmsg info has - // changed. -- AddressMap::iterator it = address_map_.find(address); +- auto it = address_map_.find(address); - if (it == address_map_.end()) { - address_map_.insert(it, std::make_pair(address, *msg)); - *address_changed = true; @@ -309,7 +325,7 @@ } void AddressTrackerLinux::OnFileCanReadWithoutBlocking(int fd) { -@@ -455,34 +189,7 @@ bool AddressTrackerLinux::IsTunnelInterfaceName(const +@@ -458,31 +173,7 @@ bool AddressTrackerLinux::IsTunnelInterfaceName(const } void AddressTrackerLinux::UpdateCurrentConnectionType() { @@ -317,12 +333,9 @@ - std::unordered_set online_links = GetOnlineLinks(); - - // Strip out tunnel interfaces from online_links -- for (std::unordered_set::const_iterator it = online_links.begin(); -- it != online_links.end();) { +- for (auto it = online_links.cbegin(); it != online_links.cend();) { - if (IsTunnelInterface(*it)) { -- std::unordered_set::const_iterator tunnel_it = it; -- ++it; -- online_links.erase(*tunnel_it); +- it = online_links.erase(it); - } else { - ++it; - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__freebsd.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__freebsd.h +++ /dev/null @@ -1,47 +0,0 @@ ---- src/3rdparty/chromium/net/base/network_interfaces_freebsd.h.orig 2018-12-29 13:28:53 UTC -+++ src/3rdparty/chromium/net/base/network_interfaces_freebsd.h -@@ -0,0 +1,44 @@ -+// Copyright (c) 2014 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ -+#define NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ -+ -+// This file is only used to expose some of the internals -+// of network_interfaces_mac.cc to tests. -+ -+#include -+ -+#include "base/macros.h" -+#include "net/base/net_export.h" -+#include "net/base/network_interfaces.h" -+ -+struct ifaddrs; -+struct sockaddr; -+ -+namespace net { -+namespace internal { -+ -+class NET_EXPORT IPAttributesGetterFreeBSD { -+ public: -+ IPAttributesGetterFreeBSD() {} -+ virtual ~IPAttributesGetterFreeBSD() {} -+ virtual bool IsInitialized() const = 0; -+ virtual bool GetIPAttributes(const char* ifname, -+ const sockaddr* sock_addr, -+ int* native_attributes) = 0; -+ -+ private: -+ DISALLOW_COPY_AND_ASSIGN(IPAttributesGetterFreeBSD); -+}; -+ -+NET_EXPORT bool GetNetworkListImpl(NetworkInterfaceList* networks, -+ int policy, -+ const ifaddrs* interfaces, -+ IPAttributesGetterFreeBSD* ip_attributes_getter); -+ -+} // namespace internal -+} // namespace net -+ -+#endif // NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__freebsd.cc +++ /dev/null @@ -1,243 +0,0 @@ ---- src/3rdparty/chromium/net/base/network_interfaces_freebsd.cc.orig 2018-12-29 13:28:53 UTC -+++ src/3rdparty/chromium/net/base/network_interfaces_freebsd.cc -@@ -0,0 +1,240 @@ -+// Copyright (c) 2014 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "net/base/network_interfaces_freebsd.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "base/files/file_path.h" -+#include "base/logging.h" -+#include "base/strings/string_number_conversions.h" -+#include "base/strings/string_tokenizer.h" -+#include "base/strings/string_util.h" -+#include "base/threading/thread_restrictions.h" -+#include "net/base/escape.h" -+#include "net/base/ip_endpoint.h" -+#include "net/base/net_errors.h" -+#include "net/base/network_interfaces_posix.h" -+#include "url/gurl.h" -+ -+namespace net { -+ -+namespace { -+ -+// FreeBSD implementation of IPAttributesGetterFreeBSD which calls ioctl on socket to -+// retrieve IP attributes. -+class IPAttributesGetterFreeBSDImpl : public internal::IPAttributesGetterFreeBSD { -+ public: -+ IPAttributesGetterFreeBSDImpl(); -+ ~IPAttributesGetterFreeBSDImpl() override; -+ bool IsInitialized() const override; -+ bool GetIPAttributes(const char* ifname, -+ const sockaddr* sock_addr, -+ int* native_attributes) override; -+ -+ private: -+ int ioctl_socket_; -+}; -+ -+IPAttributesGetterFreeBSDImpl::IPAttributesGetterFreeBSDImpl() -+ : ioctl_socket_(socket(AF_INET6, SOCK_DGRAM, 0)) { -+ DCHECK_GE(ioctl_socket_, 0); -+} -+ -+bool IPAttributesGetterFreeBSDImpl::IsInitialized() const { -+ return ioctl_socket_ >= 0; -+} -+ -+IPAttributesGetterFreeBSDImpl::~IPAttributesGetterFreeBSDImpl() { -+ if (ioctl_socket_ >= 0) { -+ close(ioctl_socket_); -+ } -+} -+ -+bool IPAttributesGetterFreeBSDImpl::GetIPAttributes(const char* ifname, -+ const sockaddr* sock_addr, -+ int* native_attributes) { -+ struct in6_ifreq ifr = {}; -+ strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name) - 1); -+ memcpy(&ifr.ifr_ifru.ifru_addr, sock_addr, sock_addr->sa_len); -+ int rv = ioctl(ioctl_socket_, SIOCGIFAFLAG_IN6, &ifr); -+ if (rv >= 0) { -+ *native_attributes = ifr.ifr_ifru.ifru_flags; -+ } -+ return (rv >= 0); -+} -+ -+// When returning true, the platform native IPv6 address attributes were -+// successfully converted to net IP address attributes. Otherwise, returning -+// false and the caller should drop the IP address which can't be used by the -+// application layer. -+bool TryConvertNativeToNetIPAttributes(int native_attributes, -+ int* net_attributes) { -+ // For FreeBSD, we disallow addresses with attributes IN6_IFF_ANYCASE, -+ // IN6_IFF_DUPLICATED, IN6_IFF_TENTATIVE, and IN6_IFF_DETACHED as these are -+ // still progressing through duplicated address detection (DAD) or are not -+ // suitable to be used in an one-to-one communication and shouldn't be used -+ // by the application layer. -+ if (native_attributes & (IN6_IFF_ANYCAST | IN6_IFF_DUPLICATED | -+ IN6_IFF_TENTATIVE | IN6_IFF_DETACHED)) { -+ return false; -+ } -+ -+ if (native_attributes & IN6_IFF_DEPRECATED) { -+ *net_attributes |= IP_ADDRESS_ATTRIBUTE_DEPRECATED; -+ } -+ -+ return true; -+} -+ -+NetworkChangeNotifier::ConnectionType GetNetworkInterfaceType( -+ int addr_family, -+ const std::string& interface_name) { -+ NetworkChangeNotifier::ConnectionType type = -+ NetworkChangeNotifier::CONNECTION_UNKNOWN; -+ -+ struct ifmediareq ifmr = {}; -+ strncpy(ifmr.ifm_name, interface_name.c_str(), sizeof(ifmr.ifm_name) - 1); -+ -+ int s = socket(addr_family, SOCK_DGRAM, 0); -+ if (s == -1) { -+ return type; -+ } -+ -+ if (ioctl(s, SIOCGIFMEDIA, &ifmr) != -1) { -+ if (ifmr.ifm_current & IFM_IEEE80211) { -+ type = NetworkChangeNotifier::CONNECTION_WIFI; -+ } else if (ifmr.ifm_current & IFM_ETHER) { -+ type = NetworkChangeNotifier::CONNECTION_ETHERNET; -+ } -+ } -+ close(s); -+ return type; -+} -+ -+} // namespace -+ -+namespace internal { -+ -+bool GetNetworkListImpl(NetworkInterfaceList* networks, -+ int policy, -+ const ifaddrs* interfaces, -+ IPAttributesGetterFreeBSD* ip_attributes_getter) { -+ // Enumerate the addresses assigned to network interfaces which are up. -+ for (const ifaddrs* interface = interfaces; interface != NULL; -+ interface = interface->ifa_next) { -+ // Skip loopback interfaces, and ones which are down. -+ if (!(IFF_RUNNING & interface->ifa_flags)) -+ continue; -+ if (IFF_LOOPBACK & interface->ifa_flags) -+ continue; -+ // Skip interfaces with no address configured. -+ struct sockaddr* addr = interface->ifa_addr; -+ if (!addr) -+ continue; -+ -+ // Skip unspecified addresses (i.e. made of zeroes) and loopback addresses -+ // configured on non-loopback interfaces. -+ if (IsLoopbackOrUnspecifiedAddress(addr)) -+ continue; -+ -+ const std::string& name = interface->ifa_name; -+ // Filter out VMware interfaces, typically named vmnet1 and vmnet8. -+ if (ShouldIgnoreInterface(name, policy)) { -+ continue; -+ } -+ -+ NetworkChangeNotifier::ConnectionType connection_type = -+ NetworkChangeNotifier::CONNECTION_UNKNOWN; -+ -+ int ip_attributes = IP_ADDRESS_ATTRIBUTE_NONE; -+ -+ // Retrieve native ip attributes and convert to net version if a getter is -+ // given. -+ if (ip_attributes_getter && ip_attributes_getter->IsInitialized()) { -+ int native_attributes = 0; -+ if (addr->sa_family == AF_INET6 && -+ ip_attributes_getter->GetIPAttributes( -+ interface->ifa_name, interface->ifa_addr, &native_attributes)) { -+ if (!TryConvertNativeToNetIPAttributes(native_attributes, -+ &ip_attributes)) { -+ continue; -+ } -+ } -+ } -+ -+ connection_type = GetNetworkInterfaceType(addr->sa_family, name); -+ -+ IPEndPoint address; -+ -+ int addr_size = 0; -+ if (addr->sa_family == AF_INET6) { -+ addr_size = sizeof(sockaddr_in6); -+ } else if (addr->sa_family == AF_INET) { -+ addr_size = sizeof(sockaddr_in); -+ } -+ -+ if (address.FromSockAddr(addr, addr_size)) { -+ uint8_t prefix_length = 0; -+ if (interface->ifa_netmask) { -+ // If not otherwise set, assume the same sa_family as ifa_addr. -+ if (interface->ifa_netmask->sa_family == 0) { -+ interface->ifa_netmask->sa_family = addr->sa_family; -+ } -+ IPEndPoint netmask; -+ if (netmask.FromSockAddr(interface->ifa_netmask, addr_size)) { -+ prefix_length = MaskPrefixLength(netmask.address()); -+ } -+ } -+ networks->push_back(NetworkInterface( -+ name, name, if_nametoindex(name.c_str()), connection_type, -+ address.address(), prefix_length, ip_attributes)); -+ } -+ } -+ -+ return true; -+} -+ -+} // namespace internal -+ -+bool GetNetworkList(NetworkInterfaceList* networks, int policy) { -+ if (networks == NULL) -+ return false; -+ -+ // getifaddrs() may require IO operations. -+ base::AssertBlockingAllowed(); -+ -+ ifaddrs* interfaces; -+ if (getifaddrs(&interfaces) < 0) { -+ PLOG(ERROR) << "getifaddrs"; -+ return false; -+ } -+ -+ std::unique_ptr ip_attributes_getter; -+ -+ ip_attributes_getter.reset(new IPAttributesGetterFreeBSDImpl()); -+ -+ bool result = internal::GetNetworkListImpl(networks, policy, interfaces, -+ ip_attributes_getter.get()); -+ freeifaddrs(interfaces); -+ return result; -+} -+ -+std::string GetWifiSSID() { -+ NOTIMPLEMENTED(); -+ return ""; -+} -+ -+} // namespace net Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_features.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_features.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_features.gni @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/features.gni.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/features.gni.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/net/features.gni @@ -27,7 +27,7 @@ declare_args() { disable_brotli_filter = false # Multicast DNS. -- enable_mdns = is_win || is_linux || is_fuchsia -+ enable_mdns = is_win || is_linux || is_fuchsia || is_bsd +- enable_mdns = is_win || is_linux || is_fuchsia || is_mac || is_ios ++ enable_mdns = is_win || is_linux || is_fuchsia || is_mac || is_ios || is_bsd # Reporting not used on iOS. enable_reporting = !is_ios Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_nqe_network__quality__estimator.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_nqe_network__quality__estimator.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/nqe/network_quality_estimator.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/net/nqe/network_quality_estimator.cc +@@ -99,7 +99,7 @@ nqe::internal::NetworkID DoGetCurrentNetworkID() { + case NetworkChangeNotifier::ConnectionType::CONNECTION_ETHERNET: + break; + case NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI: +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_WIN) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + network_id.id = GetWifiSSID(); + #endif + break; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socket__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socket__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/socket/socket_posix.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/net/socket/socket_posix.cc +@@ -568,7 +568,7 @@ void SocketPosix::ReadCompleted() { + } + + int SocketPosix::DoWrite(IOBuffer* buf, int buf_len) { +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + // Disable SIGPIPE for this write. Although Chromium globally disables + // SIGPIPE, the net stack may be used in other consumers which do not do + // this. MSG_NOSIGNAL is a Linux-only API. On OS X, this is a setsockopt on Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/net/socket/tcp_socket_posix.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/net/socket/tcp_socket_posix.cc +@@ -88,6 +88,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { + PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; + return false; + } ++#elif defined(OS_BSD) ++ // Set seconds until first TCP keep alive. ++ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) { ++ PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd; ++ return false; ++ } ++ // Set seconds between TCP keep alives. ++ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) { ++ PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; ++ return false; ++ } + #endif + return true; + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/net/socket/udp_socket_posix.cc @@ -68,7 +68,7 @@ const int kActivityMonitorMinimumSamplesForThroughputE const base::TimeDelta kActivityMonitorMsThreshold = @@ -18,7 +18,7 @@ #if defined(OS_MACOSX) && !defined(OS_IOS) -@@ -632,13 +632,13 @@ int UDPSocketPosix::SetDoNotFragment() { +@@ -644,13 +644,13 @@ int UDPSocketPosix::SetDoNotFragment() { } void UDPSocketPosix::SetMsgConfirm(bool confirm) { @@ -34,7 +34,7 @@ } int UDPSocketPosix::AllowAddressReuse() { -@@ -653,17 +653,20 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -665,17 +665,20 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); int value = broadcast ? 1 : 0; int rv; @@ -57,7 +57,7 @@ rv = setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, &value, sizeof(value)); return rv == 0 ? OK : MapSystemError(errno); -@@ -901,19 +904,24 @@ int UDPSocketPosix::SetMulticastOptions() { +@@ -937,19 +940,24 @@ int UDPSocketPosix::SetMulticastOptions() { if (multicast_interface_ != 0) { switch (addr_family_) { case AF_INET: { @@ -74,18 +74,18 @@ mreq.imr_ifindex = multicast_interface_; mreq.imr_address.s_addr = htonl(INADDR_ANY); -#endif // !defined(OS_MACOSX) -+#endif // !defined(OS_MACOSX) || !defined(OS_BSD) ++#endif // !defined(OS_MACOSX) || defined(OS_BSD) int rv = setsockopt(socket_, IPPROTO_IP, IP_MULTICAST_IF, +#if defined(OS_BSD) + reinterpret_cast(&mreq.imr_interface.s_addr), -+ sizeof(mreq.imr_interface.s_addr)); ++ sizeof(mreq.imr_interface.s_addr)); +#else reinterpret_cast(&mreq), sizeof(mreq)); +#endif if (rv) return MapSystemError(errno); break; -@@ -975,7 +983,7 @@ int UDPSocketPosix::JoinGroup(const IPAddress& group_a +@@ -1011,7 +1019,7 @@ int UDPSocketPosix::JoinGroup(const IPAddress& group_a if (addr_family_ != AF_INET) return ERR_ADDRESS_INVALID; @@ -94,3 +94,22 @@ ip_mreq mreq = {}; int error = GetIPv4AddressFromIndex(socket_, multicast_interface_, &mreq.imr_interface.s_addr); +@@ -1059,9 +1067,18 @@ int UDPSocketPosix::LeaveGroup(const IPAddress& group_ + case IPAddress::kIPv4AddressSize: { + if (addr_family_ != AF_INET) + return ERR_ADDRESS_INVALID; ++#if defined(OS_BSD) ++ ip_mreq mreq = {}; ++ int error = GetIPv4AddressFromIndex(socket_, multicast_interface_, ++ &mreq.imr_interface.s_addr); ++ ++ if (error != OK) ++ return error; ++#else + ip_mreqn mreq = {}; + mreq.imr_ifindex = multicast_interface_; + mreq.imr_address.s_addr = INADDR_ANY; ++#endif + memcpy(&mreq.imr_multiaddr, group_address.bytes().data(), + IPAddress::kIPv4AddressSize); + int rv = setsockopt(socket_, IPPROTO_IP, IP_DROP_MEMBERSHIP, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_quic_quic__http__proxy__backend.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_quic_quic__http__proxy__backend.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/tools/quic/quic_http_proxy_backend.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/net/tools/quic/quic_http_proxy_backend.cc +@@ -160,7 +160,7 @@ void QuicHttpProxyBackend::InitializeURLRequestContext + // Enable HTTP2, but disable QUIC on the backend + context_builder.SetSpdyAndQuicEnabled(true /* http2 */, false /* quic */); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // On Linux, use a fixed ProxyConfigService, since the default one + // depends on glib. + context_builder.set_proxy_config_service( Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_shared__impl_private_net__address__private__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_shared__impl_private_net__address__private__impl.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- src/3rdparty/chromium/ppapi/shared_impl/private/net_address_private_impl.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/ppapi/shared_impl/private/net_address_private_impl.cc -@@ -27,6 +27,9 @@ - #include - #include - #include -+#if defined(OS_BSD) -+#include -+#endif - #endif - - // The net address interface doesn't have a normal C -> C++ thunk since it Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_printing_backend_print__backend__cups.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_printing_backend_print__backend__cups.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/printing/backend/print_backend_cups.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/printing/backend/print_backend_cups.h +@@ -5,6 +5,8 @@ + #ifndef PRINTING_BACKEND_PRINT_BACKEND_CUPS_H_ + #define PRINTING_BACKEND_PRINT_BACKEND_CUPS_H_ + ++#include ++ + #include + + #include "base/files/file_util.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_audio_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_audio_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/audio/BUILD.gn.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/audio/BUILD.gn +@@ -106,7 +106,7 @@ source_set("lib") { + "//services/service_manager/sandbox:sandbox", + ] + +- if (is_linux) { ++ if ((is_linux) && (!is_bsd)) { + sources += [ + "audio_sandbox_hook_linux.cc", + "audio_sandbox_hook_linux.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_catalog_public_cpp_manifest__parsing__util.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_catalog_public_cpp_manifest__parsing__util.cc +++ /dev/null @@ -1,21 +0,0 @@ ---- src/3rdparty/chromium/services/catalog/public/cpp/manifest_parsing_util.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/catalog/public/cpp/manifest_parsing_util.cc -@@ -17,7 +17,8 @@ bool IsValidPlatformName(const std::string& name) { - name == Store::kRequiredFilesKey_PlatformValue_Linux || - name == Store::kRequiredFilesKey_PlatformValue_MacOSX || - name == Store::kRequiredFilesKey_PlatformValue_Android || -- name == Store::kRequiredFilesKey_PlatformValue_Fuchsia; -+ name == Store::kRequiredFilesKey_PlatformValue_Fuchsia || -+ name == Store::kRequiredFilesKey_PlatformValue_FreeBSD; - } - - bool IsCurrentPlatform(const std::string& name) { -@@ -31,6 +32,8 @@ bool IsCurrentPlatform(const std::string& name) { - return name == Store::kRequiredFilesKey_PlatformValue_Android; - #elif defined(OS_FUCHSIA) - return name == Store::kRequiredFilesKey_PlatformValue_Fuchsia; -+#elif defined(OS_BSD) -+ return name == Store::kRequiredFilesKey_PlatformValue_FreeBSD; - #else - #error This architecture is not supported. - #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_content_simple__browser_simple__browser__service.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_content_simple__browser_simple__browser__service.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/services/content/simple_browser/simple_browser_service.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/content/simple_browser/simple_browser_service.h +@@ -16,7 +16,7 @@ + #include "services/service_manager/public/cpp/service_binding.h" + #include "services/service_manager/public/mojom/service.mojom.h" + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "components/services/font/public/cpp/font_loader.h" // nogncheck + #endif + +@@ -50,7 +50,7 @@ class COMPONENT_EXPORT(SIMPLE_BROWSER) SimpleBrowserSe + // service_manager::Service: + void OnStart() override; + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + sk_sp font_loader_; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_device__service.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_device__service.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/device/device_service.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/device/device_service.h +@@ -198,7 +198,7 @@ class DeviceService : public service_manager::Service + #endif + + #if (defined(OS_LINUX) && defined(USE_UDEV)) || defined(OS_WIN) || \ +- defined(OS_MACOSX) ++ defined(OS_MACOSX) || defined(OS_BSD) + // Requests for the SerialPortManager interface must be bound to + // |serial_port_manager_| on |serial_port_manager_task_runner_| and it will + // be destroyed on that sequence. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/device/serial/BUILD.gn.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/device/serial/BUILD.gn +@@ -4,7 +4,7 @@ + + import("//build/config/features.gni") + +-if (is_win || (is_linux && use_udev) || is_mac) { ++if (is_win || (is_linux && use_udev) || is_mac || is_bsd) { + config("platform_support") { + visibility = [ ":serial" ] + if (is_win) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc +@@ -65,7 +65,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee + BITRATE_TO_SPEED_CASE(9600) + BITRATE_TO_SPEED_CASE(19200) + BITRATE_TO_SPEED_CASE(38400) +-#if !defined(OS_MACOSX) ++#if !defined(OS_MACOSX) && !defined(OS_BSD) + BITRATE_TO_SPEED_CASE(57600) + BITRATE_TO_SPEED_CASE(115200) + BITRATE_TO_SPEED_CASE(230400) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor.cc @@ -1,11 +1,20 @@ ---- src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor.cc +@@ -29,7 +29,7 @@ void TimeZoneMonitor::Bind(device::mojom::TimeZoneMoni + + void TimeZoneMonitor::NotifyClients() { + DCHECK(thread_checker_.CalledOnValidThread()); +-#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && defined(IS_CHROMECAST)) ++#if defined(OS_CHROMEOS) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(IS_CHROMECAST)) + // On CrOS (and Chromecast), ICU's default tz is already set to a new zone. No + // need to redetect it with detectHostTimeZone(). + std::unique_ptr new_zone(icu::TimeZone::createDefault()); @@ -41,7 +41,7 @@ void TimeZoneMonitor::NotifyClients() { #else std::unique_ptr new_zone(icu::TimeZone::detectHostTimeZone()); #endif --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) && !defined(IS_CHROMECAST) ++#if (defined(OS_LINUX) && !defined(IS_CHROMECAST)) || defined(OS_BSD) // We get here multiple times on Linux per a single tz change, but // want to update the ICU default zone and notify renderer only once. std::unique_ptr current_zone(icu::TimeZone::createDefault()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor_linux.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor_linux.cc +@@ -104,7 +104,11 @@ class TimeZoneMonitorLinuxImpl + // false positives are harmless, assuming the false positive rate is + // reasonable. + const char* const kFilesToWatch[] = { ++#if defined(OS_BSD) ++ "/etc/localtime", ++#else + "/etc/localtime", "/etc/timezone", "/etc/TZ", ++#endif + }; + for (size_t index = 0; index < base::size(kFilesToWatch); ++index) { + file_path_watchers_.push_back(std::make_unique()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__context.cc @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/services/network/network_context.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/network/network_context.cc +@@ -132,7 +132,7 @@ + #endif // defined(USE_NSS_CERTS) + + #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ +- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) ++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) + #include "net/cert/cert_net_fetcher.h" + #include "net/cert_net/cert_net_fetcher_impl.h" + #endif +@@ -610,7 +610,7 @@ NetworkContext::~NetworkContext() { + #endif + + #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ +- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) ++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) + net::ShutdownGlobalCertNetFetcher(); + #endif + } +@@ -1700,7 +1700,7 @@ URLRequestContextOwner NetworkContext::ApplyContextPar + + net::CookieCryptoDelegate* crypto_delegate = nullptr; + if (params_->enable_encrypted_cookies) { +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) + DCHECK(network_service_->os_crypt_config_set()) + << "NetworkService::SetCryptConfig must be called before creating a " + "NetworkContext with encrypted cookies."; +@@ -2015,7 +2015,7 @@ URLRequestContextOwner NetworkContext::ApplyContextPar + net::SetURLRequestContextForNSSHttpIO(result.url_request_context.get()); + #endif + #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ +- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) ++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) + net::SetGlobalCertNetFetcher( + net::CreateCertNetFetcher(result.url_request_context.get())); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc @@ -14,6 +14,7 @@ using sandbox::syscall_broker::MakeBrokerCommandSet; namespace network { @@ -11,8 +11,8 @@ @@ -32,6 +33,7 @@ bool NetworkPreSandboxHook(service_manager::SandboxLin service_manager::SandboxLinux::PreSandboxHook(), options); - instance->EngageNamespaceSandbox(false /* from_zygote */); -+#endif + instance->EngageNamespaceSandboxIfPossible(); ++#endif // defined(OS_BSD) return true; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/services/network/network_service.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/services/network/network_service.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/services/network/network_service.h -@@ -133,7 +133,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService - void GetTotalNetworkUsages( - mojom::NetworkService::GetTotalNetworkUsagesCallback callback) override; - void UpdateSignedTreeHead(const net::ct::SignedTreeHead& sth) override; +@@ -186,7 +186,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService + #endif // !BUILDFLAG(IS_CT_SUPPORTED) + void UpdateCRLSet(base::span crl_set) override; + void OnCertDBChanged() override; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) void SetCryptConfig(mojom::CryptConfigPtr crypt_config) override; #endif - + #if defined(OS_MACOSX) && !defined(OS_IOS) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc -@@ -16,8 +16,10 @@ +@@ -17,8 +17,10 @@ #include "build/build_config.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h" @@ -11,16 +11,40 @@ namespace memory_instrumentation { -@@ -101,7 +103,7 @@ bool ParseSmapsHeader(const char* header_line, VmRegio +@@ -67,6 +69,7 @@ struct ModuleData { + + ModuleData GetMainModuleData() { + ModuleData module_data; ++#if !defined(OS_BSD) + Dl_info dl_info; + if (dladdr(&__ehdr_start, &dl_info)) { + base::Optional build_id = +@@ -76,6 +79,7 @@ ModuleData GetMainModuleData() { + module_data.build_id = *build_id; + } + } ++#endif + return module_data; + } + +@@ -123,14 +127,14 @@ bool ParseSmapsHeader(const char* header_line, // Build ID is needed to symbolize heap profiles, and is generated only on // official builds. Build ID is only added for the current library (chrome) // since it is racy to read other libraries which can be unmapped any time. -#if defined(OFFICIAL_BUILD) +#if defined(OFFICIAL_BUILD) && !defined(OS_BSD) - uintptr_t addr = reinterpret_cast(&ParseSmapsHeader); - if (addr >= region->start_address && addr < end_addr) { - base::Optional buildid = -@@ -196,6 +198,9 @@ void OSMetrics::SetProcSmapsForTesting(FILE* f) { + if (!region->mapped_file.empty() && + base::StartsWith(main_module_data.path, region->mapped_file, + base::CompareCase::SENSITIVE) && + !main_module_data.build_id.empty()) { + region->module_debugid = main_module_data.build_id; + } +-#endif // defined(OFFICIAL_BUILD) ++#endif // defined(OFFICIAL_BUILD) && !defined(OS_BSD) + + return res; + } +@@ -217,6 +221,9 @@ void OSMetrics::SetProcSmapsForTesting(FILE* f) { // static bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, mojom::RawOSMemDump* dump) { @@ -30,7 +54,7 @@ base::ScopedFD autoclose = OpenStatm(pid); int statm_fd = autoclose.get(); -@@ -221,6 +226,7 @@ bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, +@@ -242,10 +249,12 @@ bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, dump->resident_set_kb = process_metrics->GetResidentSetSize() / 1024; return true; @@ -38,3 +62,19 @@ } // static + std::vector OSMetrics::GetProcessMemoryMaps(base::ProcessId pid) { ++#if defined(OS_BSD) + std::vector maps; + uint32_t res = 0; + if (g_proc_smaps_for_testing) { +@@ -263,6 +272,10 @@ std::vector OSMetrics::GetProcessMemoryMa + return std::vector(); + + return maps; ++#else ++ NOTIMPLEMENTED(); ++ return std::vector(); ++#endif + } + + } // namespace memory_instrumentation Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_main.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_main.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/service_manager/embedder/main.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/service_manager/embedder/main.cc +@@ -322,7 +322,7 @@ int Main(const MainParams& params) { + base::EnableTerminationOnOutOfMemory(); + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // The various desktop environments set this environment variable that + // allows the dbus client library to connect directly to the bus. When this + // variable is not set (test environments like xvfb-run), the dbus client Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/services/service_manager/public/cpp/service_executable/BUILD.gn.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/service_manager/public/cpp/service_executable/BUILD.gn +@@ -30,6 +30,11 @@ source_set("support") { + "//sandbox/linux:seccomp_bpf", + ] + } ++ if (is_bsd) { ++ deps -= [ ++ "//sandbox/linux:seccomp_bpf" ++ ] ++ } + } + + # Service executable targets should link against this to get a boilerplate entry Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_standalone__service_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_standalone__service_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/public/cpp/standalone_service/BUILD.gn.orig 2019-01-11 08:38:15 UTC -+++ src/3rdparty/chromium/services/service_manager/public/cpp/standalone_service/BUILD.gn -@@ -25,7 +25,7 @@ source_set("standalone_service") { - "//services/service_manager/public/mojom", - ] - -- if (is_linux) { -+ if (is_linux && !is_bsd) { - deps += [ - "//sandbox/linux:sandbox", - "//sandbox/linux:sandbox_services", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_standalone__service_standalone__service.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_standalone__service_standalone__service.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/public/cpp/standalone_service/standalone_service.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/services/service_manager/public/cpp/standalone_service/standalone_service.cc -@@ -62,6 +62,8 @@ void RunStandaloneService(const StandaloneServiceCallb - command_line.GetSwitchValueASCII(switches::kServiceSandboxType)), - SandboxLinux::PreSandboxHook(), sandbox_options); - } -+#elif defined(OS_BSD) -+ NOTIMPLEMENTED(); - #endif - - mojo::core::Init(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_sandbox__type.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_sandbox__type.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/service_manager/sandbox/sandbox_type.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/services/service_manager/sandbox/sandbox_type.cc +@@ -25,7 +25,7 @@ bool IsUnsandboxedSandboxType(SandboxType sandbox_type + service_manager::features::kXRSandbox); + #endif + case SANDBOX_TYPE_AUDIO: +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + return !base::FeatureList::IsEnabled( + service_manager::features::kAudioServiceSandbox); + #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.h @@ -44,8 +44,10 @@ class COMPONENT_EXPORT(SERVICE_MANAGER_ZYGOTE) ZygoteH base::ScopedFD* control_fd, @@ -8,6 +8,6 @@ void AdjustRendererOOMScore(base::ProcessHandle process_handle, int score) override; +#endif + bool HasZygote() { return !zygote_pids_.empty(); } private: - friend struct base::DefaultSingletonTraits; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn @@ -1,16 +1,16 @@ ---- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/angle/BUILD.gn -@@ -266,7 +266,8 @@ static_library("angle_gpu_info_util") { - sources += - rebase_path(gles_gypi.libangle_gpu_info_util_linux_sources, ".", "src") +@@ -268,7 +268,8 @@ angle_static_library("angle_gpu_info_util") { + if (is_linux || is_fuchsia) { + sources += libangle_gpu_info_util_linux_sources - if (use_x11) { -+ # Somewhere "use_x11" is set to false, so we need to add is_bsd here ++ # Somewhere "use_x11" is set to false, so we need to add is_bsd here + if (use_x11 || is_bsd) { - sources += - rebase_path(gles_gypi.libangle_gpu_info_util_x11_sources, ".", "src") + sources += libangle_gpu_info_util_x11_sources deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] -@@ -275,6 +276,7 @@ static_library("angle_gpu_info_util") { + defines += [ "GPU_INFO_USE_X11" ] +@@ -276,6 +277,7 @@ angle_static_library("angle_gpu_info_util") { "X11", "Xi", "Xext", @@ -21,7 +21,7 @@ @@ -842,10 +844,6 @@ foreach(is_shared_library, libs = [] if (is_linux) { - sources += rebase_path(util_gypi.util_linux_sources, ".", "util") + sources += util_linux_sources - libs += [ - "rt", - "dl", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp -@@ -63,7 +63,7 @@ +@@ -64,7 +64,7 @@ #if defined(ANGLE_ENABLE_VULKAN) - #if defined(ANGLE_PLATFORM_WINDOWS) - #include "libANGLE/renderer/vulkan/win32/DisplayVkWin32.h" --#elif defined(ANGLE_PLATFORM_LINUX) -+#elif defined(ANGLE_PLATFORM_POSIX) - #include "libANGLE/renderer/vulkan/xcb/DisplayVkXcb.h" - #elif defined(ANGLE_PLATFORM_ANDROID) - #include "libANGLE/renderer/vulkan/android/DisplayVkAndroid.h" -@@ -211,7 +211,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(const Attrib + # if defined(ANGLE_PLATFORM_WINDOWS) + # include "libANGLE/renderer/vulkan/win32/DisplayVkWin32.h" +-# elif defined(ANGLE_PLATFORM_LINUX) ++# elif defined(ANGLE_PLATFORM_POSIX) + # include "libANGLE/renderer/vulkan/xcb/DisplayVkXcb.h" + # elif defined(ANGLE_PLATFORM_ANDROID) + # include "libANGLE/renderer/vulkan/android/DisplayVkAndroid.h" +@@ -216,7 +216,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(const Attrib #if defined(ANGLE_ENABLE_VULKAN) - #if defined(ANGLE_PLATFORM_WINDOWS) + # if defined(ANGLE_PLATFORM_WINDOWS) impl = new rx::DisplayVkWin32(state); --#elif defined(ANGLE_PLATFORM_LINUX) -+#elif defined(ANGLE_PLATFORM_POSIX) +-# elif defined(ANGLE_PLATFORM_LINUX) ++# elif defined(ANGLE_PLATFORM_POSIX) impl = new rx::DisplayVkXcb(state); - #elif defined(ANGLE_PLATFORM_ANDROID) + # elif defined(ANGLE_PLATFORM_ANDROID) impl = new rx::DisplayVkAndroid(state); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_driver__utils.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/driver_utils.h +@@ -107,7 +107,7 @@ inline bool IsWindows() + + inline bool IsLinux() + { +-#if defined(ANGLE_PLATFORM_LINUX) ++#if defined(ANGLE_PLATFORM_POSIX) + return true; + #else + return false; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_renderergl__utils.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_renderergl__utils.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp -@@ -1127,7 +1127,7 @@ void GenerateWorkarounds(const FunctionsGL *functions, - workarounds->doesSRGBClearsOnLinearFramebufferAttachments = - functions->standard == STANDARD_GL_DESKTOP && (IsIntel(vendor) || IsAMD(vendor)); - --#if defined(ANGLE_PLATFORM_LINUX) -+#if defined(ANGLE_PLATFORM_POSIX) - workarounds->emulateMaxVertexAttribStride = - functions->standard == STANDARD_GL_DESKTOP && IsAMD(vendor); - workarounds->useUnusedBlocksWithStandardOrSharedLayout = IsAMD(vendor); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc +@@ -171,7 +171,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t + + std::vector InspectorMemoryAgent::Symbolize( + const std::vector& addresses) { +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // TODO(alph): Move symbolization to the client. + std::vector addresses_to_symbolize; + for (void* address : addresses) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/core/layout/layout_view.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/core/layout/layout_view.cc +@@ -58,7 +58,7 @@ + #include "third_party/blink/renderer/platform/runtime_enabled_features.h" + #include "third_party/blink/renderer/platform/transforms/transform_state.h" + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + #include "third_party/blink/renderer/platform/fonts/font_cache.h" + #endif + +@@ -321,7 +321,7 @@ void LayoutView::UpdateLayout() { + DCHECK(!layout_state_); + LayoutState root_layout_state(*this); + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + // The font code in FontPlatformData does not have a direct connection to the + // document, the frame or anything from which we could retrieve the device + // scale factor. After using zoom for DSF, the GraphicsContext does only ever Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/core/paint/paint_layer.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/core/paint/paint_layer.cc +@@ -104,7 +104,7 @@ namespace { + static CompositingQueryMode g_compositing_query_mode = + kCompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases; + +-#ifdef OS_LINUX ++#if defined(OS_LINUX) || defined(OS_BSD) + struct SameSizeAsPaintLayer : DisplayItemClient { + // The bit fields may fit into the machine word of DisplayItemClient which + // has only 8-bit data. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc +@@ -332,7 +332,7 @@ ScrollbarPart ScrollbarThemeAura::InvalidateOnThumbPos + + bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scrollbar& scrollbar, + const WebMouseEvent& event) { +-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) ++#if ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) + if (event.button == WebPointerProperties::Button::kMiddle) + return true; + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc -@@ -65,7 +65,7 @@ namespace blink { +@@ -66,7 +66,7 @@ namespace blink { SkFontMgr* FontCache::static_font_manager_ = nullptr; @@ -9,12 +9,12 @@ float FontCache::device_scale_factor_ = 1.0; #endif -@@ -88,7 +88,7 @@ FontCache::FontCache() +@@ -89,7 +89,7 @@ FontCache::FontCache() FontPlatformData* FontCache::SystemFontPlatformData( const FontDescription& font_description) { const AtomicString& family = FontCache::SystemFontFamily(); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - if (family.IsEmpty() || family == FontFamilyNames::system_ui) + if (family.IsEmpty() || family == font_family_names::kSystemUi) return nullptr; #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_description.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_description.cc +@@ -38,7 +38,7 @@ + #include "third_party/blink/renderer/platform/wtf/text/atomic_string_hash.h" + #include "third_party/blink/renderer/platform/wtf/text/string_hash.h" + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + #include "third_party/blink/renderer/platform/fonts/font_cache.h" + #endif + +@@ -223,7 +223,7 @@ FontCacheKey FontDescription::CacheKey( + static_cast(fields_.orientation_) << 1 | // bit 2-3 + static_cast(fields_.subpixel_text_position_); // bit 1 + +-#if defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + float device_scale_factor_for_key = FontCache::DeviceScaleFactor(); + #else + float device_scale_factor_for_key = 1.0f; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc +@@ -10,7 +10,7 @@ + #if defined(OS_ANDROID) + #include "third_party/blink/public/platform/modules/font_unique_name_lookup/font_unique_name_lookup.mojom-blink.h" + #include "third_party/blink/renderer/platform/fonts/android/font_unique_name_lookup_android.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "third_party/blink/renderer/platform/fonts/linux/font_unique_name_lookup_linux.h" + #elif defined(OS_WIN) + #include "third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom-blink.h" +@@ -26,7 +26,7 @@ std::unique_ptr + FontUniqueNameLookup::GetPlatformUniqueNameLookup() { + #if defined(OS_ANDROID) + return std::make_unique(); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + return std::make_unique(); + #elif defined(OS_WIN) + return std::make_unique(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc -@@ -59,7 +59,7 @@ AtomicString ToAtomicString(const SkString& str) { +@@ -60,7 +60,7 @@ AtomicString ToAtomicString(const SkString& str) { return AtomicString::FromUTF8(str.c_str(), str.size()); } @@ -9,7 +9,7 @@ // Android special locale for retrieving the color emoji font // based on the proposed changes in UTR #51 for introducing // an Emoji script code: -@@ -103,7 +103,7 @@ AtomicString FontCache::GetFamilyNameForCharacter( +@@ -104,7 +104,7 @@ AtomicString FontCache::GetFamilyNameForCharacter( typeface->getFamilyName(&skia_family_name); return ToAtomicString(skia_family_name); } @@ -18,7 +18,7 @@ void FontCache::PlatformInit() {} -@@ -248,7 +248,7 @@ PaintTypeface FontCache::CreateTypeface( +@@ -249,7 +249,7 @@ sk_sp FontCache::CreateTypeface( } #endif @@ -27,3 +27,12 @@ // On linux if the fontManager has been overridden then we should be calling // the embedder provided font Manager rather than calling // SkTypeface::CreateFromName which may redirect the call to the default font +@@ -276,7 +276,7 @@ std::unique_ptr FontCache::CreateFon + CString name; + + sk_sp typeface; +-#if defined(OS_ANDROID) || defined(OS_LINUX) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) + if (alternate_name == AlternateFontName::kLocalUniqueFace && + RuntimeEnabledFeatures::FontSrcLocalMatchingEnabled()) { + typeface = CreateTypefaceFromUniqueName(creation_params, name); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_atomics.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_atomics.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/atomics.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/atomics.h -@@ -176,7 +176,7 @@ ALWAYS_INLINE void AtomicSetOneToZero(int volatile* pt - #if defined(THREAD_SANITIZER) - // The definitions below assume an LP64 data model. This is fine because - // TSan is only supported on x86_64 Linux. --#if defined(ARCH_CPU_64_BITS) && defined(OS_LINUX) -+#if defined(ARCH_CPU_64_BITS) && (defined(OS_LINUX) || defined(OS_BSD)) - ALWAYS_INLINE void ReleaseStore(volatile int* ptr, int value) { - __tsan_atomic32_store(ptr, value, __tsan_memory_order_release); - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_threading.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_threading.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/threading.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/threading.cc +@@ -17,12 +17,16 @@ + #error Blink does not support threading on your platform. + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include + #elif defined(OS_ANDROID) + #include + #endif + ++#if defined(OS_BSD) ++#include ++#endif ++ + namespace WTF { + + // Current thread identity +@@ -38,6 +42,8 @@ ThreadIdentifier CurrentThreadSyscall() { + return syscall(__NR_gettid); + #elif defined(OS_ANDROID) + return gettid(); ++#elif defined(OS_BSD) ++ return pthread_getthreadid_np(); + #else + return reinterpret_cast(pthread_self()); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_threading__pthreads.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_threading__pthreads.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_threading__pthreads.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/threading_pthreads.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/threading_pthreads.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/threading_pthreads.cc -@@ -51,14 +51,19 @@ +@@ -52,12 +52,17 @@ #include #endif @@ -12,22 +12,11 @@ -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) #include - #endif - ++#endif ++ +#if defined(OS_BSD) +#include +#include -+#endif -+ - namespace WTF { - - namespace internal { -@@ -70,6 +75,8 @@ ThreadIdentifier CurrentThreadSyscall() { - return syscall(__NR_gettid); - #elif defined(OS_ANDROID) - return gettid(); -+#elif defined(OS_BSD) -+ return pthread_getthreadid_np(); - #else - return reinterpret_cast(pthread_self()); #endif + + namespace WTF { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cpu-aarch64-linux.c =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_cpu-aarch64-linux.c @@ -0,0 +1,63 @@ +--- src/3rdparty/chromium/third_party/boringssl/src/crypto/cpu-aarch64-linux.c.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/boringssl/src/crypto/cpu-aarch64-linux.c +@@ -14,49 +14,35 @@ + + #include + +-#if defined(OPENSSL_AARCH64) && defined(OPENSSL_LINUX) && \ +- !defined(OPENSSL_STATIC_ARMCAP) ++#if defined(OPENSSL_AARCH64) + +-#include +- + #include + + #include "internal.h" + +- + extern uint32_t OPENSSL_armcap_P; + ++#include ++#include ++ + void OPENSSL_cpuid_setup(void) { +- unsigned long hwcap = getauxval(AT_HWCAP); ++ uint64_t id_aa64isar0; + +- // See /usr/include/asm/hwcap.h on an aarch64 installation for the source of +- // these values. +- static const unsigned long kNEON = 1 << 1; +- static const unsigned long kAES = 1 << 3; +- static const unsigned long kPMULL = 1 << 4; +- static const unsigned long kSHA1 = 1 << 5; +- static const unsigned long kSHA256 = 1 << 6; ++ id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1); + +- if ((hwcap & kNEON) == 0) { +- // Matching OpenSSL, if NEON is missing, don't report other features +- // either. +- return; +- } +- + OPENSSL_armcap_P |= ARMV7_NEON; + +- if (hwcap & kAES) { ++ if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_BASE) { + OPENSSL_armcap_P |= ARMV8_AES; + } +- if (hwcap & kPMULL) { ++ if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) { + OPENSSL_armcap_P |= ARMV8_PMULL; + } +- if (hwcap & kSHA1) { ++ if (ID_AA64ISAR0_SHA1(id_aa64isar0) == ID_AA64ISAR0_SHA1_BASE) { + OPENSSL_armcap_P |= ARMV8_SHA1; + } +- if (hwcap & kSHA256) { ++ if(ID_AA64ISAR0_SHA2(id_aa64isar0) == ID_AA64ISAR0_SHA2_BASE) { + OPENSSL_armcap_P |= ARMV8_SHA256; + } + } +- +-#endif // OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP ++#endif // OPENSSL_AARCH64 Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_breakpad_breakpad_src_common_simple__string__dictionary.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_breakpad_breakpad_src_common_simple__string__dictionary.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/simple_string_dictionary.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/simple_string_dictionary.h +@@ -33,7 +33,7 @@ + #include + #include + +-#include "common/basictypes.h" ++#include "third_party/breakpad/breakpad/src/common/basictypes.h" + + namespace google_breakpad { + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni +@@ -38,7 +38,7 @@ crashpad_is_standalone = crashpad_dependencies == "sta + if (crashpad_is_in_chromium) { + crashpad_is_mac = is_mac + crashpad_is_win = is_win +- crashpad_is_linux = is_linux ++ crashpad_is_linux = is_linux && !is_bsd + crashpad_is_android = is_android + crashpad_is_fuchsia = is_fuchsia + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/client/BUILD.gn.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/client/BUILD.gn +@@ -71,6 +71,12 @@ static_library("client") { + sources += [ "crashpad_client_fuchsia.cc" ] + } + ++ if (crashpad_is_posix) { ++ sources += [ ++ "crashpad_client_posix.cc", ++ ] ++ } ++ + if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) { + sources += [ "crash_report_database_generic.cc" ] + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc @@ -0,0 +1,41 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/client/crashpad_client_posix.cc.orig 2019-10-20 19:10:10 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/client/crashpad_client_posix.cc +@@ -0,0 +1,38 @@ ++// Copyright 2017 The Crashpad Authors. All rights reserved. ++// ++// Licensed under the Apache License, Version 2.0 (the "License"); ++// you may not use this file except in compliance with the License. ++// You may obtain a copy of the License at ++// ++// http://www.apache.org/licenses/LICENSE-2.0 ++// ++// Unless required by applicable law or agreed to in writing, software ++// distributed under the License is distributed on an "AS IS" BASIS, ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++// See the License for the specific language governing permissions and ++// limitations under the License. ++ ++#include "client/crashpad_client.h" ++ ++#include "base/logging.h" ++ ++namespace crashpad { ++ ++CrashpadClient::CrashpadClient() {} ++ ++CrashpadClient::~CrashpadClient() {} ++ ++bool CrashpadClient::StartHandler( ++ const base::FilePath& handler, ++ const base::FilePath& database, ++ const base::FilePath& metrics_dir, ++ const std::string& url, ++ const std::map& annotations, ++ const std::vector& arguments, ++ bool restartable, ++ bool asynchronous_start) { ++ NOTREACHED(); // TODO(scottmg): https://crashpad.chromium.org/bug/196 ++ return false; ++} ++ ++} // namespace crashpad Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/address_types.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/address_types.h +@@ -25,7 +25,7 @@ + #include + #elif defined(OS_WIN) + #include "util/win/address_types.h" +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #include "util/linux/address_types.h" + #elif defined(OS_FUCHSIA) + #include +@@ -55,7 +55,7 @@ using VMSize = mach_vm_size_t; + using VMAddress = WinVMAddress; + using VMSize = WinVMSize; + +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + + using VMAddress = LinuxVMAddress; + using VMSize = LinuxVMSize; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context.h +@@ -21,7 +21,7 @@ + #include + #elif defined(OS_WIN) + #include +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #include + #elif defined(OS_FUCHSIA) + #include +@@ -35,7 +35,7 @@ using NativeCPUContext = x86_thread_state; + #endif + #elif defined(OS_WIN) + using NativeCPUContext = CONTEXT; +-#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) + using NativeCPUContext = ucontext_t; + #endif // OS_MACOSX + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/metrics.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/metrics.cc +@@ -25,7 +25,7 @@ + #define METRICS_OS_NAME "Win" + #elif defined(OS_ANDROID) + #define METRICS_OS_NAME "Android" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #define METRICS_OS_NAME "Linux" + #elif defined(OS_FUCHSIA) + #define METRICS_OS_NAME "Fuchsia" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/uuid.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/uuid.cc +@@ -95,7 +95,7 @@ bool UUID::InitializeWithNew() { + InitializeFromBytes(uuid); + return true; + #elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID) || \ +- defined(OS_FUCHSIA) ++ defined(OS_FUCHSIA) || defined(OS_BSD) + // Linux, Android, and Fuchsia do not provide a UUID generator in a + // widely-available system library. On Linux and Android, uuid_generate() + // from libuuid is not available everywhere. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/close_multiple.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/close_multiple.cc +@@ -31,7 +31,7 @@ + #include "util/file/directory_reader.h" + #include "util/misc/implicit_cast.h" + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + #include + #endif + +@@ -72,7 +72,7 @@ void CloseNowOrOnExec(int fd, bool ebadf_ok) { + // This is an advantage over looping over all possible file descriptors, because + // no attempt needs to be made to close file descriptors that are not open. + bool CloseMultipleNowOrOnExecUsingFDDir(int min_fd, int preserve_fd) { +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + static constexpr char kFDDir[] = "/dev/fd"; + #elif defined(OS_LINUX) || defined(OS_ANDROID) + static constexpr char kFDDir[] = "/proc/self/fd"; +@@ -146,7 +146,7 @@ void CloseMultipleNowOrOnExec(int fd, int preserve_fd) + // while the system is running, but it’s still a better upper bound than the + // current RLIMIT_NOFILE value. + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + // See 10.11.6 xnu-3248.60.10/bsd/kern/kern_resource.c maxfilesperproc, + // referenced by dosetrlimit(). + int oid[] = {CTL_KERN, KERN_MAXFILESPERPROC}; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/drop_privileges.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/drop_privileges.cc +@@ -23,7 +23,7 @@ void DropPrivileges() { + gid_t gid = getgid(); + uid_t uid = getuid(); + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + // Based on the POSIX.1-2008 2013 edition documentation for setreuid() and + // setregid(), setreuid() and setregid() alone should be sufficient to drop + // privileges. The standard specifies that the saved ID should be set to the Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc @@ -0,0 +1,40 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/signals.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/signals.cc +@@ -45,10 +45,10 @@ constexpr int kCrashSignals[] = { + #if defined(SIGEMT) + SIGEMT, + #endif // defined(SIGEMT) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + SIGXCPU, + SIGXFSZ, +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + }; + + // These are the non-core-generating but terminating signals. +@@ -85,9 +85,9 @@ constexpr int kTerminateSignals[] = { + SIGXCPU, + SIGXFSZ, + #endif // defined(OS_MACOSX) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + SIGIO, +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + }; + + bool InstallHandlers(const std::vector& signals, +@@ -216,8 +216,12 @@ bool Signals::WillSignalReraiseAutonomously(const sigi + // remains. See 10.12.3 xnu-3789.41.3/bsd/kern/kern_sig.c + // psignal_internal(). + (code > 0 && ++#if defined(SI_ASYNCIO) + code != SI_ASYNCIO && ++#endif ++#if defined(SI_MESGQ) + code != SI_MESGQ && ++#endif + code != SI_QUEUE && + code != SI_TIMER && + code != SI_USER && Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc +@@ -64,7 +64,7 @@ constexpr const char* kSignalNames[] = { + "INFO", + "USR1", + "USR2", +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #if defined(ARCH_CPU_MIPS_FAMILY) + "HUP", + "INT", +@@ -135,7 +135,7 @@ constexpr const char* kSignalNames[] = { + #endif // defined(ARCH_CPU_MIPS_FAMILY) + #endif + }; +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + // NSIG is 64 to account for real-time signals. + static_assert(base::size(kSignalNames) == 32, "kSignalNames length"); + #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_src_src_crc32c__arm64__linux__check.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_src_src_crc32c__arm64__linux__check.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_src_src_crc32c__arm64__linux__check.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig 2019-01-16 11:59:47 UTC +--- src/3rdparty/chromium/third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/crc32c/src/src/crc32c_arm64_linux_check.h @@ -16,6 +16,24 @@ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_node_node.py =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_node_node.py @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/third_party/node/node.py.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/node/node.py +@@ -12,6 +12,7 @@ import sys + def GetBinaryPath(): + return os_path.join(os_path.dirname(__file__), *{ + 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'), ++ 'FreeBSD': ('freebsd', 'node-freebsd-x64', 'bin', 'node'), + 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), + 'Windows': ('win', 'node.exe'), + }[platform.system()]) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_fx__date__helpers.cpp =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_fx__date__helpers.cpp @@ -0,0 +1,22 @@ +--- src/3rdparty/chromium/third_party/pdfium/fxjs/fx_date_helpers.cpp.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/pdfium/fxjs/fx_date_helpers.cpp +@@ -34,6 +34,11 @@ double GetLocalTZA() { + return 0; + time_t t = 0; + FXSYS_time(&t); ++#ifdef __FreeBSD__ ++ struct tm lt; ++ localtime_r(&t, <); ++ return (double)(-(lt.tm_gmtoff * 1000)); ++#else + FXSYS_localtime(&t); + #if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ + // In gcc 'timezone' is a global variable declared in time.h. In VC++, that +@@ -42,6 +47,7 @@ double GetLocalTZA() { + _get_timezone(&timezone); + #endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ + return (double)(-(timezone * 1000)); ++#endif // __FreeBSD__ + } + + int GetDaylightSavingTA(double d) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_js__define.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_js__define.cpp +++ /dev/null @@ -1,27 +0,0 @@ ---- src/3rdparty/chromium/third_party/pdfium/fxjs/js_define.cpp.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/pdfium/fxjs/js_define.cpp -@@ -19,18 +19,23 @@ - namespace { - - double GetLocalTZA() { -+ struct tm *lt; - if (!FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) - return 0; - time_t t = 0; - time(&t); -- localtime(&t); -+ lt = localtime(&t); - #if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ - // In gcc 'timezone' is a global variable declared in time.h. In VC++, that - // variable was removed in VC++ 2015, with _get_timezone replacing it. - long timezone = 0; - _get_timezone(&timezone); - #endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ -+#if defined(__FreeBSD__) -+ return (double)(-(lt->tm_gmtoff * 1000)); -+#else - return (double)(-(timezone * 1000)); -+#endif - } - - int GetDaylightSavingTA(double d) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_third__party_base_logging.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_third__party_base_logging.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/pdfium/third_party/base/logging.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/pdfium/third_party/base/logging.h -@@ -10,7 +10,7 @@ - - #ifndef _WIN32 - #define NULL_DEREF_IF_POSSIBLE \ -- *(reinterpret_cast(NULL) + 42) = 0x42; -+ *(reinterpret_cast(__null) + 42) = 0x42; - #else - #define NULL_DEREF_IF_POSSIBLE - #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_xfa_fgas_font_cfx__fontsourceenum__file.cpp =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_xfa_fgas_font_cfx__fontsourceenum__file.cpp @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/third_party/pdfium/xfa/fgas/font/cfx_fontsourceenum_file.cpp.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/pdfium/xfa/fgas/font/cfx_fontsourceenum_file.cpp +@@ -14,8 +14,9 @@ constexpr char kFolderSeparator = '/'; + + constexpr const char* g_FontFolders[] = { + #if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_ +- "/usr/share/fonts", "/usr/share/X11/fonts/Type1", +- "/usr/share/X11/fonts/TTF", "/usr/local/share/fonts", ++ "/usr/local/share/fonts/Type1", ++ "/usr/local/share/fonts/TTF", ++ "/usr/local/share/fonts", + #elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ + "~/Library/Fonts", "/Library/Fonts", "/System/Library/Fonts", + #elif _FX_PLATFORM_ == _FX_PLATFORM_ANDROID_ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_protobuf_src_google_protobuf_stubs_platform__macros.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_protobuf_src_google_protobuf_stubs_platform__macros.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h +@@ -117,7 +117,7 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR + + #undef GOOGLE_PROTOBUF_PLATFORM_ERROR + +-#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__OpenBSD__) ++#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__FreeBSD__) + // Android ndk does not support the __thread keyword very well yet. Here + // we use pthread_key_create()/pthread_getspecific()/... methods for + // TLS support on android. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2019-01-16 10:59:47 UTC +--- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp @@ -70,6 +70,20 @@ return features; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkRasterPipeline__opts.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkRasterPipeline__opts.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkRasterPipeline__opts.h @@ -1,26 +1,26 @@ ---- src/3rdparty/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h.orig 2019-01-16 10:59:47 UTC +--- src/3rdparty/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h -@@ -657,7 +657,10 @@ SI F approx_powf(F x, F y) { +@@ -729,7 +729,10 @@ SI F approx_powf(F x, F y) { } SI F from_half(U16 h) { --#if defined(__ARM_FP16_FORMAT_IEEE) -+#if defined(__ARM_FP16_FORMAT_IEEE) && defined(__aarch64__) +-#if defined(SK_CPU_ARM64) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. ++#if defined(SK_CPU_ARM64) && !defined(SK_BUILD_FOR_GOOGLE3) && defined(__aarch64__) // Required to build on FreeBSD aarch64 + return vcvt_f32_f16(h); + -+#elif defined(__ARM_FP16_FORMAT_IEEE) ++#elif defined(SK_CPU_ARM64) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. __fp16 fp16; memcpy(&fp16, &h, sizeof(U16)); return float(fp16); -@@ -679,7 +682,10 @@ SI F from_half(U16 h) { +@@ -751,7 +754,10 @@ SI F from_half(U16 h) { } SI U16 to_half(F f) { --#if defined(__ARM_FP16_FORMAT_IEEE) -+#if defined(__ARM_FP16_FORMAT_IEEE) && defined(__aarch64__) +-#if defined(SK_CPU_ARM64) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. ++#if defined(SK_CPU_ARM64) && !defined(SK_BUILD_FOR_GOOGLE3) && defined(__aarch64__) // Required to build on FreeBSD aarch64 + return vcvt_f16_f32(f); + -+#elif defined(__ARM_FP16_FORMAT_IEEE) ++#elif defined(SK_CPU_ARM64) && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. __fp16 fp16 = __fp16(f); U16 u16; memcpy(&u16, &fp16, sizeof(U16)); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkFontHost__FreeType.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkFontHost__FreeType.cpp +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkFontHost__FreeType.cpp @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp -@@ -112,8 +112,6 @@ class FreeTypeLibrary : SkNoncopyable { (public) +@@ -122,8 +122,6 @@ class FreeTypeLibrary : SkNoncopyable { (public) : fGetVarDesignCoordinates(nullptr) , fGetVarAxisFlags(nullptr) , fLibrary(nullptr) @@ -9,7 +9,7 @@ { if (FT_New_Library(&gFTMemory, &fLibrary)) { return; -@@ -173,12 +171,7 @@ class FreeTypeLibrary : SkNoncopyable { (public) +@@ -183,12 +181,7 @@ class FreeTypeLibrary : SkNoncopyable { (public) } #endif @@ -23,7 +23,7 @@ } ~FreeTypeLibrary() { if (fLibrary) { -@@ -187,8 +180,6 @@ class FreeTypeLibrary : SkNoncopyable { (public) +@@ -197,8 +190,6 @@ class FreeTypeLibrary : SkNoncopyable { (public) } FT_Library library() { return fLibrary; } @@ -32,7 +32,7 @@ // FT_Get_{MM,Var}_{Blend,Design}_Coordinates were added in FreeType 2.7.1. // Prior to this there was no way to get the coordinates out of the FT_Face. -@@ -205,8 +196,6 @@ class FreeTypeLibrary : SkNoncopyable { (public) +@@ -215,8 +206,6 @@ class FreeTypeLibrary : SkNoncopyable { (public) private: FT_Library fLibrary; @@ -41,7 +41,7 @@ // FT_Library_SetLcdFilterWeights was introduced in FreeType 2.4.0. // The following platforms provide FreeType of at least 2.4.0. -@@ -704,17 +693,6 @@ void SkTypeface_FreeType::onFilterRec(SkScalerContextR +@@ -713,17 +702,6 @@ void SkTypeface_FreeType::onFilterRec(SkScalerContextR rec->fTextSize = SkIntToScalar(1 << 14); } @@ -56,12 +56,12 @@ - unref_ft_library(); - } - - SkPaint::Hinting h = rec->getHinting(); - if (SkPaint::kFull_Hinting == h && !isLCD(*rec)) { + SkFontHinting h = rec->getHinting(); + if (kFull_SkFontHinting == h && !isLCD(*rec)) { // collapse full->normal hinting if we're not doing LCD -@@ -1109,11 +1087,11 @@ bool SkScalerContext_FreeType::getCBoxForLetter(char l +@@ -1121,11 +1099,11 @@ bool SkScalerContext_FreeType::getCBoxForLetter(char l void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) { - if (isLCD(fRec)) { + if (glyph->fMaskFormat == SkMask::kLCD16_Format) { if (fLCDIsVert) { - glyph->fHeight += gFTLibrary->lcdExtra(); - glyph->fTop -= gFTLibrary->lcdExtra() >> 1; @@ -71,7 +71,7 @@ - glyph->fWidth += gFTLibrary->lcdExtra(); - glyph->fLeft -= gFTLibrary->lcdExtra() >> 1; + glyph->fWidth += 2; -+ glyph->fLeft -= 1; ++ glyph->fLeft -= 1; } } } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc -@@ -13,6 +13,7 @@ - #include +@@ -12,6 +12,7 @@ + #include #include +#include - #include #include + #include "modules/include/module_common_types_public.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byte__order.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byte__order.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/byte_order.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/byte_order.h +@@ -79,7 +79,7 @@ + #error WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN must be defined. + #endif // defined(WEBRTC_ARCH_LITTLE_ENDIAN) + #elif defined(WEBRTC_POSIX) +-#include ++#include + #endif + + namespace rtc { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byteorder.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byteorder.h +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/byteorder.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/webrtc/rtc_base/byteorder.h -@@ -79,7 +79,11 @@ - #error WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN must be defined. - #endif // defined(WEBRTC_ARCH_LITTLE_ENDIAN) - #elif defined(WEBRTC_POSIX) -+#if defined(__FreeBSD__) -+#include -+#else - #include -+#endif - #endif - - namespace rtc { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_httpcommon.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_httpcommon.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/httpcommon.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/webrtc/rtc_base/httpcommon.cc -@@ -459,7 +459,7 @@ bool HttpDateToSeconds(const std::string& date, time_t - } - // TODO: Android should support timezone, see b/2441195 - #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || \ -- defined(BSD) -+ defined(WEBRTC_BSD) - tm* tm_for_timezone = localtime(&gmt); - *seconds = gmt + tm_for_timezone->tm_gmtoff; - #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.h @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/ip_address.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/ip_address.h +@@ -17,6 +17,10 @@ + #include + #include + #endif ++#if defined(WEBRTC_BSD) ++#include ++#include ++#endif + #if defined(WEBRTC_WIN) + #include + #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.cc @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/ip_address.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/ip_address.cc +@@ -11,6 +11,9 @@ + #if defined(WEBRTC_POSIX) + #include + #include ++#if defined(WEBRTC_BSD) ++#include ++#endif + #ifdef OPENBSD + #include + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ipaddress.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ipaddress.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/ipaddress.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/webrtc/rtc_base/ipaddress.h -@@ -17,6 +17,10 @@ - #include - #include - #endif -+#if defined(WEBRTC_BSD) -+#include -+#include -+#endif - #if defined(WEBRTC_WIN) - #include - #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.h +@@ -11,7 +11,7 @@ + #ifndef RTC_BASE_PHYSICAL_SOCKET_SERVER_H_ + #define RTC_BASE_PHYSICAL_SOCKET_SERVER_H_ + +-#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX) ++#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) + #include + #define WEBRTC_USE_EPOLL 1 + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc @@ -0,0 +1,56 @@ +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc +@@ -66,7 +66,7 @@ typedef void* SockOptArg; + + #endif // WEBRTC_POSIX + +-#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) ++#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) && !defined(__native_client__) + + int64_t GetSocketRecvTimestamp(int socket) { + struct timeval tv_ioctl; +@@ -286,7 +286,7 @@ int PhysicalSocket::GetOption(Option opt, int* value) + socklen_t optlen = sizeof(*value); + int ret = ::getsockopt(s_, slevel, sopt, (SockOptArg)value, &optlen); + if (ret != -1 && opt == OPT_DONTFRAGMENT) { +-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) ++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD) + *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0; + #endif + } +@@ -299,7 +299,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { + if (TranslateOption(opt, &slevel, &sopt) == -1) + return -1; + if (opt == OPT_DONTFRAGMENT) { +-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) ++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD) + value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT; + #endif + } +@@ -309,7 +309,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { + int PhysicalSocket::Send(const void* pv, size_t cb) { + int sent = DoSend( + s_, reinterpret_cast(pv), static_cast(cb), +-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) ++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD) + // Suppress SIGPIPE. Without this, attempting to send on a socket whose + // other end is closed will result in a SIGPIPE signal being raised to + // our process, which by default will terminate the process, which we +@@ -338,7 +338,7 @@ int PhysicalSocket::SendTo(const void* buffer, + size_t len = addr.ToSockAddrStorage(&saddr); + int sent = + DoSendTo(s_, static_cast(buffer), static_cast(length), +-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) ++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD) + // Suppress SIGPIPE. See above for explanation. + MSG_NOSIGNAL, + #else +@@ -529,7 +529,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* s + *slevel = IPPROTO_IP; + *sopt = IP_DONTFRAGMENT; + break; +-#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__) ++#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD) || defined(__native_client__) + RTC_LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported."; + return -1; + #elif defined(WEBRTC_POSIX) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physicalsocketserver.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physicalsocketserver.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.h -@@ -11,7 +11,7 @@ - #ifndef RTC_BASE_PHYSICALSOCKETSERVER_H_ - #define RTC_BASE_PHYSICALSOCKETSERVER_H_ - --#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX) -+#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) - #include - #define WEBRTC_USE_EPOLL 1 - #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physicalsocketserver.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physicalsocketserver.cc +++ /dev/null @@ -1,56 +0,0 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc -@@ -67,7 +67,7 @@ typedef void* SockOptArg; - - #endif // WEBRTC_POSIX - --#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) -+#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) && !defined(__native_client__) - - int64_t GetSocketRecvTimestamp(int socket) { - struct timeval tv_ioctl; -@@ -295,7 +295,7 @@ int PhysicalSocket::GetOption(Option opt, int* value) - socklen_t optlen = sizeof(*value); - int ret = ::getsockopt(s_, slevel, sopt, (SockOptArg)value, &optlen); - if (ret != -1 && opt == OPT_DONTFRAGMENT) { --#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) -+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD) - *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0; - #endif - } -@@ -308,7 +308,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { - if (TranslateOption(opt, &slevel, &sopt) == -1) - return -1; - if (opt == OPT_DONTFRAGMENT) { --#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) -+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD) - value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT; - #endif - } -@@ -318,7 +318,7 @@ int PhysicalSocket::SetOption(Option opt, int value) { - int PhysicalSocket::Send(const void* pv, size_t cb) { - int sent = DoSend( - s_, reinterpret_cast(pv), static_cast(cb), --#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) -+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD) - // Suppress SIGPIPE. Without this, attempting to send on a socket whose - // other end is closed will result in a SIGPIPE signal being raised to - // our process, which by default will terminate the process, which we -@@ -347,7 +347,7 @@ int PhysicalSocket::SendTo(const void* buffer, - size_t len = addr.ToSockAddrStorage(&saddr); - int sent = - DoSendTo(s_, static_cast(buffer), static_cast(length), --#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) -+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD) - // Suppress SIGPIPE. See above for explanation. - MSG_NOSIGNAL, - #else -@@ -538,7 +538,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* s - *slevel = IPPROTO_IP; - *sopt = IP_DONTFRAGMENT; - break; --#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__) -+#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD) || defined(__native_client__) - RTC_LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported."; - return -1; - #elif defined(WEBRTC_POSIX) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread.cc -@@ -15,7 +15,9 @@ - #include "rtc_base/timeutils.h" - - #if defined(WEBRTC_LINUX) -+#if !defined(__FreeBSD__) - #include -+#endif - #include - #endif - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_string__utils.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_string__utils.h @@ -0,0 +1,17 @@ +--- src/3rdparty/chromium/third_party/webrtc/rtc_base/string_utils.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/string_utils.h +@@ -25,11 +25,11 @@ + #endif // WEBRTC_WIN + + #if defined(WEBRTC_POSIX) +-#ifdef BSD ++#if defined(WEBRTC_BSD) || defined(BSD) + #include +-#else // BSD ++#else // WEBRTC_BSD + #include +-#endif // !BSD ++#endif // !WEBRTC_BSD + #include + #endif // WEBRTC_POSIX + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_stringutils.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_stringutils.h +++ /dev/null @@ -1,17 +0,0 @@ ---- src/3rdparty/chromium/third_party/webrtc/rtc_base/stringutils.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/third_party/webrtc/rtc_base/stringutils.h -@@ -24,11 +24,11 @@ - #endif // WEBRTC_WIN - - #if defined(WEBRTC_POSIX) --#ifdef BSD -+#if defined(WEBRTC_BSD) || defined(BSD) - #include --#else // BSD -+#else // WEBRTC_BSD - #include --#endif // !BSD -+#endif // !WEBRTC_BSD - #endif // WEBRTC_POSIX - - #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_arm__features.c =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_arm__features.c +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_arm__features.c @@ -1,54 +1,97 @@ ---- src/3rdparty/chromium/third_party/zlib/arm_features.c.orig 2019-01-16 11:59:47 UTC +--- src/3rdparty/chromium/third_party/zlib/arm_features.c.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/third_party/zlib/arm_features.c -@@ -10,20 +10,33 @@ +@@ -8,83 +8,30 @@ + + #include "zutil.h" + +-int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0; +-int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; +- +-#if !defined(_MSC_VER) #include #include ++#include ++#include -#if defined(ARMV8_OS_ANDROID) +-#include +-#elif defined(ARMV8_OS_LINUX) +-#include +-#include +-#else +-#error ### No ARM CPU features detection in your platform/OS +-#endif +int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0; +int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; -+ -+static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; -+ -+#if defined (__FreeBSD__) -+#include -+#include -+static void init_arm_features(void) -+{ + + static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; + + static void init_arm_features(void) + { +- uint64_t flag_crc32 = 0, flag_pmull = 0, capabilities = 0; +#if defined (__aarch64__) + uint64_t id_aa64isar0; -+ + +-#if defined(ARMV8_OS_ANDROID) +- flag_crc32 = ANDROID_CPU_ARM_FEATURE_CRC32; +- flag_pmull = ANDROID_CPU_ARM_FEATURE_PMULL; +- capabilities = android_getCpuFeatures(); +-#elif defined(ARMV8_OS_LINUX) +- #if defined(__aarch64__) +- flag_crc32 = HWCAP_CRC32; +- flag_pmull = HWCAP_PMULL; +- capabilities = getauxval(AT_HWCAP); +- #elif defined(__ARM_NEON) || defined(__ARM_NEON__) +- /* The use of HWCAP2 is for getting features of newer ARMv8-A SoCs +- * while running in 32bits mode (i.e. aarch32). +- */ +- flag_crc32 = HWCAP2_CRC32; +- flag_pmull = HWCAP2_PMULL; +- capabilities = getauxval(AT_HWCAP2); +- #endif +-#endif +- +- if (capabilities & flag_crc32) +- arm_cpu_enable_crc32 = 1; +- +- if (capabilities & flag_pmull) + id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1); + if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) -+ arm_cpu_enable_pmull = 1; + arm_cpu_enable_pmull = 1; + if (ID_AA64ISAR0_CRC32(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) + arm_cpu_enable_crc32 = 1; +#endif -+} -+#elif defined(ARMV8_OS_ANDROID) - #include - #elif defined(ARMV8_OS_LINUX) - #include - #include --#else --#error ### No ARM CPU features detection in your platform/OS --#endif - --int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0; --int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; - --static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; -- - static void init_arm_features(void) - { - uint64_t flag_crc32 = 0, flag_pmull = 0, capabilities = 0; -@@ -53,6 +66,9 @@ static void init_arm_features(void) - if (capabilities & flag_pmull) - arm_cpu_enable_pmull = 1; } -+#else -+#error ### No ARM CPU features detection in your platform/OS -+#endif void ZLIB_INTERNAL arm_check_features(void) { + pthread_once(&cpu_check_inited_once, init_arm_features); + } +-#else +-#include +- +-static BOOL CALLBACK _arm_check_features(PINIT_ONCE once, +- PVOID param, +- PVOID *context); +-static INIT_ONCE cpu_check_inited_once = INIT_ONCE_STATIC_INIT; +- +- +-void ZLIB_INTERNAL arm_check_features(void) +-{ +- InitOnceExecuteOnce(&cpu_check_inited_once, _arm_check_features, +- NULL, NULL); +-} +- +-static BOOL CALLBACK _arm_check_features(PINIT_ONCE once, +- PVOID param, +- PVOID *context) +-{ +- if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)) +- arm_cpu_enable_crc32 = 1; +- +- if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) +- arm_cpu_enable_pmull = 1; +- +- return TRUE; +-} +-#endif /* _MSC_VER */ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/tools/variations/fieldtrial_to_struct.py.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/tools/variations/fieldtrial_to_struct.py.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/tools/variations/fieldtrial_to_struct.py -@@ -30,6 +30,7 @@ _platforms = [ - 'linux', - 'mac', - 'windows', -+ 'bsd', - ] - - # Convert a platform argument to the matching Platform enum value in +@@ -24,6 +24,7 @@ finally: + _platforms = [ + 'android', + 'android_webview', ++ 'freebsd', + 'chromeos', + 'fuchsia', + 'ios', Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle__freebsd.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle__freebsd.cc @@ -0,0 +1,24 @@ +--- src/3rdparty/chromium/ui/base/resource/resource_bundle_freebsd.cc.orig 2019-07-08 11:29:35 UTC ++++ src/3rdparty/chromium/ui/base/resource/resource_bundle_freebsd.cc +@@ -0,0 +1,21 @@ ++// Copyright 2017 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "ui/base/resource/resource_bundle.h" ++ ++#include "base/logging.h" ++#include "base/macros.h" ++#include "ui/gfx/image/image.h" ++ ++namespace ui { ++ ++void ResourceBundle::LoadCommonResources() { ++ LoadChromeResources(); ++} ++ ++gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id) { ++ return GetImageNamed(resource_id); ++} ++ ++} // namespace ui Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/gfx/font_render_params.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ui/gfx/font_render_params.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/ui/gfx/font_render_params.h @@ -111,13 +111,13 @@ GFX_EXPORT FontRenderParams GetFontRenderParams( const FontRenderParamsQuery& query, @@ -11,8 +11,8 @@ GFX_EXPORT void ClearFontRenderParamsCacheForTest(); #endif --#if defined(OS_LINUX) || (defined(OS_ANDROID) && BUILDFLAG(ENABLE_VR)) -+#if defined(OS_LINUX) || defined(OS_BSD) || (defined(OS_ANDROID) && BUILDFLAG(ENABLE_VR)) +-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) // Gets the device scale factor to query the FontRenderParams. GFX_EXPORT float GetFontRenderParamsDeviceScaleFactor(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.h @@ -16,7 +16,7 @@ #include "ui/gfx/geometry/rect.h" @@ -9,12 +9,12 @@ #include "ui/gfx/native_pixmap_handle.h" #elif defined(OS_MACOSX) && !defined(OS_IOS) #include "ui/gfx/mac/io_surface.h" -@@ -57,7 +57,7 @@ struct GFX_EXPORT GpuMemoryBufferHandle { - base::SharedMemoryHandle handle; +@@ -65,7 +65,7 @@ struct GFX_EXPORT GpuMemoryBufferHandle { + base::UnsafeSharedMemoryRegion region; uint32_t offset; int32_t stride; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) + // TODO(crbug.com/863011): convert this to a scoped handle. NativePixmapHandle native_pixmap_handle; #elif defined(OS_MACOSX) && !defined(OS_IOS) - ScopedRefCountedIOSurfaceMachPort mach_port; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_mojo_buffer__types__struct__traits.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_mojo_buffer__types__struct__traits.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_mojo_buffer__types__struct__traits.h @@ -1,11 +1,20 @@ ---- src/3rdparty/chromium/ui/gfx/mojo/buffer_types_struct_traits.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ui/gfx/mojo/buffer_types_struct_traits.h.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/ui/gfx/mojo/buffer_types_struct_traits.h -@@ -291,7 +291,7 @@ template <> - struct StructTraits { - static bool IsNull(const gfx::NativePixmapHandle& handle) { +@@ -189,7 +189,7 @@ struct StructTraits + struct StructTraits { +@@ -229,7 +229,7 @@ struct StructTraits + struct StructTraits - StructTraits:: - fds(const gfx::NativePixmapHandle& pixmap_handle) { - std::vector handles; +@@ -28,7 +28,7 @@ bool StructTraitsusage) && data.ReadFormat(&out->format); + } + -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - for (const base::FileDescriptor& fd : pixmap_handle.fds) - handles.emplace_back(mojo::WrapPlatformFile(fd.fd)); + std::vector + StructTraits:: + fds(const gfx::NativePixmapHandle& pixmap_handle) { +@@ -55,7 +55,7 @@ bool StructTraits< + } + return data.ReadPlanes(&out->planes); + } -#endif // defined(OS_LINUX) +#endif // defined(OS_LINUX) || defined(OS_BSD) - return handles; - } -@@ -38,7 +38,7 @@ bool StructTraits< - gfx::mojom::NativePixmapHandleDataView, - gfx::NativePixmapHandle>::Read(gfx::mojom::NativePixmapHandleDataView data, - gfx::NativePixmapHandle* out) { + gfx::mojom::GpuMemoryBufferPlatformHandlePtr StructTraits< + gfx::mojom::GpuMemoryBufferHandleDataView, +@@ -68,7 +68,7 @@ gfx::mojom::GpuMemoryBufferPlatformHandlePtr StructTra + return gfx::mojom::GpuMemoryBufferPlatformHandle::NewSharedMemoryHandle( + std::move(handle.region)); + case gfx::NATIVE_PIXMAP: -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - mojo::ArrayDataView handles_data_view; - data.GetFdsDataView(&handles_data_view); - for (size_t i = 0; i < handles_data_view.size(); ++i) { -@@ -71,7 +71,7 @@ const gfx::NativePixmapHandle& - StructTraits:: - native_pixmap_handle(const gfx::GpuMemoryBufferHandle& handle) { --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - return handle.native_pixmap_handle; + return gfx::mojom::GpuMemoryBufferPlatformHandle::NewNativePixmapHandle( + handle.native_pixmap_handle); #else - static gfx::NativePixmapHandle pixmap_handle; -@@ -154,7 +154,7 @@ bool StructTraitsoffset = data.offset(); - out->stride = data.stride(); - } +@@ -144,7 +144,7 @@ bool StructTraitstype = gfx::SHARED_MEMORY_BUFFER; + out->region = std::move(platform_handle->get_shared_memory_handle()); + return true; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - if (out->type == gfx::NATIVE_PIXMAP && - !data.ReadNativePixmapHandle(&out->native_pixmap_handle)) - return false; + case gfx::mojom::GpuMemoryBufferPlatformHandleDataView::Tag:: + NATIVE_PIXMAP_HANDLE: + out->type = gfx::NATIVE_PIXMAP; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.h.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/ui/gfx/native_pixmap_handle.h @@ -13,7 +13,7 @@ #include "build/build_config.h" @@ -21,8 +21,8 @@ std::vector planes; }; --#if defined(OS_LINUX) && !defined(TOOLKIT_QT) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) // Returns an instance of |handle| which can be sent over IPC. This duplicates // the file-handles, so that the IPC code take ownership of them, without // invalidating |handle|. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc @@ -1,28 +1,11 @@ ---- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc.orig 2019-03-01 17:04:22 UTC +++ src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc -@@ -4,14 +4,14 @@ - - #include "ui/gfx/native_pixmap_handle.h" - --#if defined(OS_LINUX) && !defined(TOOLKIT_QT) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT) - #include - #include "base/posix/eintr_wrapper.h" - #endif - - namespace gfx { - --#if defined(OS_LINUX) && !defined(TOOLKIT_QT) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT) - static_assert(NativePixmapPlane::kNoModifier == DRM_FORMAT_MOD_INVALID, - "gfx::NativePixmapPlane::kNoModifier should be an alias for" - "DRM_FORMAT_MOD_INVALID"); -@@ -36,7 +36,7 @@ NativePixmapHandle::NativePixmapHandle(const NativePix +@@ -38,7 +38,7 @@ NativePixmapHandle::NativePixmapHandle(const NativePix NativePixmapHandle::~NativePixmapHandle() {} --#if defined(OS_LINUX) && !defined(TOOLKIT_QT) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) NativePixmapHandle CloneHandleForIPC(const NativePixmapHandle& handle) { NativePixmapHandle clone; std::vector scoped_fds; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/ui/gl/gl_implementation.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/ui/gl/gl_implementation.cc -@@ -123,7 +123,7 @@ GLImplementation GetNamedGLImplementation(const std::s - - GLImplementation GetSoftwareGLImplementation() { - #if (defined(OS_WIN) || \ -- (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)) || \ -+ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)) || \ - (defined(OS_MACOSX) && defined(USE_EGL))) - return kGLImplementationSwiftShaderGL; - #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__view__factory.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__view__factory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/ui/message_center/views/message_view_factory.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/ui/message_center/views/message_view_factory.cc -@@ -57,7 +57,7 @@ MessageView* MessageViewFactory::Create(const Notifica - notification_view = new NotificationView(notification); - } - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // Don't create shadows for notification toasts on Linux or CrOS. - if (top_level) - return notification_view; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_strings_app__locale__settings.grd =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_strings_app__locale__settings.grd @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/strings/app_locale_settings.grd.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/ui/strings/app_locale_settings.grd +@@ -187,7 +187,7 @@ + 75% + + +- ++ + + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_bubble_bubble__dialog__delegate.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_bubble_bubble__dialog__delegate.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/ui/views/bubble/bubble_dialog_delegate.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/chromium/ui/views/bubble/bubble_dialog_delegate.cc -@@ -107,7 +107,7 @@ Widget* BubbleDialogDelegateView::CreateBubble( - // the parent frame and let DWM handle compositing. If not, then we don't - // want to allow the bubble to extend the frame because it will be clipped. - bubble_delegate->set_adjust_if_offscreen(ui::win::IsAeroGlassEnabled()); --#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) -+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD) - // Linux clips bubble windows that extend outside their parent window bounds. - // Mac never adjusts. - bubble_delegate->set_adjust_if_offscreen(false); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_bubble_bubble__dialog__delegate__view.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_bubble_bubble__dialog__delegate__view.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/views/bubble/bubble_dialog_delegate_view.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/ui/views/bubble/bubble_dialog_delegate_view.cc +@@ -112,7 +112,7 @@ Widget* BubbleDialogDelegateView::CreateBubble( + bubble_delegate->SetAnchorView(bubble_delegate->GetAnchorView()); + Widget* bubble_widget = CreateBubbleWidget(bubble_delegate); + +-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD) + // Linux clips bubble windows that extend outside their parent window bounds. + // Mac never adjusts. + bubble_delegate->set_adjust_if_offscreen(false); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h +@@ -119,7 +119,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostPlatform + + bool is_active_ = false; + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // A handler for events intended for non client area. + std::unique_ptr non_client_window_event_filter_; + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +@@ -89,7 +89,7 @@ void DesktopWindowTreeHostPlatform::OnNativeWidgetCrea + const Widget::InitParams& params) { + native_widget_delegate_->OnNativeWidgetCreated(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // Setup a non_client_window_event_filter, which handles resize/move, double + // click and other events. + DCHECK(!non_client_window_event_filter_); +@@ -540,7 +540,7 @@ void DesktopWindowTreeHostPlatform::Relayout() { + } + + void DesktopWindowTreeHostPlatform::RemoveNonClientEventFilter() { +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + if (!non_client_window_event_filter_) + return; + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ui/views/window/frame_background.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/ui/views/window/frame_background.cc +@@ -122,7 +122,7 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canv + const View* view) const { + // Fill the top with the frame color first so we have a constant background + // for areas not covered by the theme image. +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) + auto* native_theme = view->GetNativeTheme(); + ui::NativeTheme::ExtraParams params; + params.frame_top_area.use_custom_frame = use_custom_frame_; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn @@ -1,15 +1,6 @@ ---- src/3rdparty/chromium/v8/BUILD.gn.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/v8/BUILD.gn.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/v8/BUILD.gn -@@ -2597,7 +2597,7 @@ v8_source_set("v8_base") { - "src/x64/simulator-x64.h", - "src/x64/sse-instr.h", - ] -- if (is_linux) { -+ if (is_linux && !is_bsd) { - sources += [ - "src/trap-handler/handler-inside-linux.cc", - "src/trap-handler/handler-outside-linux.cc", -@@ -2951,7 +2951,7 @@ v8_component("v8_libbase") { +@@ -3169,7 +3169,7 @@ v8_component("v8_libbase") { } } @@ -18,7 +9,7 @@ sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-linux.cc", -@@ -2971,6 +2971,12 @@ v8_component("v8_libbase") { +@@ -3189,6 +3189,12 @@ v8_component("v8_libbase") { "dl", "rt", ] @@ -31,11 +22,11 @@ } else if (is_android) { if (current_toolchain == host_toolchain) { libs = [ -@@ -3142,6 +3148,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapsho - sources = [ +@@ -3393,6 +3399,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapsho + "src/snapshot/embedded-file-writer.h", "src/snapshot/mksnapshot.cc", ] -+ libs = [ "execinfo" ] ++ libs = ["execinfo"] configs = [ ":internal_config" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_api.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_api.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/v8/src/api.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/v8/src/api.cc +@@ -107,7 +107,7 @@ + #include "src/wasm/wasm-result.h" + #include "src/wasm/wasm-serialization.h" + +-#if V8_OS_LINUX || V8_OS_MACOSX ++#if V8_OS_LINUX || V8_OS_MACOSX || V8_OS_OPENBSD || V8_OS_FREEBSD + #include + #include "include/v8-wasm-trap-handler-posix.h" + #include "src/trap-handler/handler-inside-posix.h" +@@ -5759,7 +5759,7 @@ bool v8::V8::Initialize() { + return true; + } + +-#if V8_OS_LINUX || V8_OS_MACOSX ++#if V8_OS_LINUX || V8_OS_MACOSX || V8_OS_OPENBSD || V8_OS_FREEBSD + bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info, + void* context) { + #if V8_TARGET_ARCH_X64 && !V8_OS_ANDROID Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc +++ /dev/null @@ -1,50 +0,0 @@ ---- src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc.orig 2019-01-16 10:59:47 UTC -+++ src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc -@@ -86,5 +86,47 @@ std::vector OS::GetSharedLib - - void OS::SignalCodeMovingGC() {} - -+#ifdef __arm__ -+ -+bool OS::ArmUsingHardFloat() { -+// GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify -+// the Floating Point ABI used (PCS stands for Procedure Call Standard). -+// We use these as well as a couple of other defines to statically determine -+// what FP ABI used. -+// GCC versions 4.4 and below don't support hard-fp. -+// GCC versions 4.5 may support hard-fp without defining __ARM_PCS or -+// __ARM_PCS_VFP. -+ -+#define GCC_VERSION \ -+ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -+#if GCC_VERSION >= 40600 && !defined(__clang__) -+#if defined(__ARM_PCS_VFP) -+ return true; -+#else -+ return false; -+#endif -+ -+#elif GCC_VERSION < 40500 && !defined(__clang__) -+ return false; -+ -+#else -+#if defined(__ARM_PCS_VFP) -+ return true; -+#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \ -+ !defined(__VFP_FP__) -+ return false; -+#else -+#error \ -+ "Your version of compiler does not report the FP ABI compiled for." \ -+ "Please report it on this issue" \ -+ "http://code.google.com/p/v8/issues/detail?id=2140" -+ -+#endif -+#endif -+#undef GCC_VERSION -+} -+ -+#endif // def __arm__ -+ - } // namespace base - } // namespace v8 Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc @@ -1,6 +1,15 @@ ---- src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc -@@ -496,6 +496,12 @@ int OS::GetCurrentThreadId() { +@@ -376,7 +376,7 @@ bool OS::DiscardSystemPages(void* address, size_t size + + // static + bool OS::HasLazyCommits() { +-#if V8_OS_AIX || V8_OS_LINUX || V8_OS_MACOSX ++#if V8_OS_AIX || V8_OS_LINUX || V8_OS_MACOSX || V8_OS_FREEBSD + return true; + #else + // TODO(bbudge) Return true for all POSIX platforms. +@@ -501,6 +501,12 @@ int OS::GetCurrentThreadId() { return static_cast(syscall(__NR_gettid)); #elif V8_OS_ANDROID return static_cast(gettid()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_external-reference-table.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_external-reference-table.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/v8/src/external-reference-table.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/v8/src/external-reference-table.cc +@@ -9,7 +9,7 @@ + #include "src/external-reference.h" + #include "src/ic/stub-cache.h" + +-#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) ++#if defined(DEBUG) && (defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD)) && !defined(V8_OS_ANDROID) + #define SYMBOLIZE_FUNCTION + #include + #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_libsampler_sampler.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_libsampler_sampler.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/3rdparty/chromium/v8/src/libsampler/sampler.cc.orig 2019-01-16 10:59:47 UTC -+++ src/3rdparty/chromium/v8/src/libsampler/sampler.cc -@@ -550,9 +550,9 @@ void SignalHandler::FillRegisterState(void* context, R - state->sp = reinterpret_cast(mcontext.mc_rsp); - state->fp = reinterpret_cast(mcontext.mc_rbp); - #elif V8_HOST_ARCH_ARM -- state->pc = reinterpret_cast(mcontext.mc_r15); -- state->sp = reinterpret_cast(mcontext.mc_r13); -- state->fp = reinterpret_cast(mcontext.mc_r11); -+ state->pc = reinterpret_cast(mcontext.__gregs[_REG_PC]); -+ state->sp = reinterpret_cast(mcontext.__gregs[_REG_SP]); -+ state->fp = reinterpret_cast(mcontext.__gregs[_REG_FP]); - #endif // V8_HOST_ARCH_* - #elif V8_OS_NETBSD - #if V8_HOST_ARCH_IA32 Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.h +@@ -12,7 +12,7 @@ namespace v8 { + namespace internal { + namespace trap_handler { + +-#if V8_OS_LINUX ++#if defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD) + constexpr int kOobSignal = SIGSEGV; + #elif V8_OS_MACOSX + constexpr int kOobSignal = SIGBUS; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.cc +@@ -27,7 +27,7 @@ + + #include + +-#ifdef V8_OS_LINUX ++#if defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD) + #include + #elif V8_OS_MACOSX + #include +@@ -112,6 +112,8 @@ bool TryHandleSignal(int signum, siginfo_t* info, void + auto* context_rip = &uc->uc_mcontext.gregs[REG_RIP]; + #elif V8_OS_MACOSX + auto* context_rip = &uc->uc_mcontext->__ss.__rip; ++#elif V8_OS_FREEBSD ++ auto* context_rip = &uc->uc_mcontext.mc_rip; + #else + #error Unsupported platform + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/v8/src/trap-handler/trap-handler.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/chromium/v8/src/trap-handler/trap-handler.h +@@ -23,6 +23,8 @@ namespace trap_handler { + #define V8_TRAP_HANDLER_SUPPORTED true + #elif V8_TARGET_ARCH_X64 && V8_OS_MACOSX + #define V8_TRAP_HANDLER_SUPPORTED true ++#elif V8_TARGET_ARCH_X64 && V8_OS_FREEBSD ++#define V8_TRAP_HANDLER_SUPPORTED true + #else + #define V8_TRAP_HANDLER_SUPPORTED false + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_file__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_file__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_file__posix.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/gn/base/files/file_posix.cc.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/gn/base/files/file_posix.cc.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/gn/base/files/file_posix.cc -@@ -86,7 +86,7 @@ void File::Info::FromStat(const stat_wrapper_t& stat_i - is_symbolic_link = S_ISLNK(stat_info.st_mode); - size = stat_info.st_size; +@@ -414,7 +414,7 @@ void File::DoInitialize(const FilePath& path, uint32_t + bool File::Flush() { + DCHECK(IsValid()); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - time_t last_modified_sec = stat_info.st_mtim.tv_sec; - int64_t last_modified_nsec = stat_info.st_mtim.tv_nsec; - time_t last_accessed_sec = stat_info.st_atim.tv_sec; + return !HANDLE_EINTR(fdatasync(file_.get())); + #else + return !HANDLE_EINTR(fsync(file_.get())); Index: www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_file__util.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_file__util.h @@ -0,0 +1,11 @@ +--- src/3rdparty/gn/base/files/file_util.h.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/gn/base/files/file_util.h +@@ -361,7 +361,7 @@ bool VerifyPathControlledByAdmin(const base::FilePath& + // the directory |path|, in the number of FilePath::CharType, or -1 on failure. + int GetMaximumPathComponentLength(const base::FilePath& path); + +-#if defined(OS_LINUX) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) + // Broad categories of file systems as returned by statfs() on Linux. + enum FileSystemType { + FILE_SYSTEM_UNKNOWN, // statfs failed. Index: www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_scoped__file.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_scoped__file.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/gn/base/files/scoped_file.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/gn/base/files/scoped_file.cc +@@ -30,7 +30,7 @@ void ScopedFDCloseTraits::Free(int fd) { + // a single open directory would bypass the entire security model. + int ret = IGNORE_EINTR(close(fd)); + +-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) || \ ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) || defined(OS_BSD) || \ + defined(OS_ANDROID) + // NB: Some file descriptors can return errors from close() e.g. network + // filesystems such as NFS and Linux input devices. On Linux, macOS, and Index: www/qt5-webengine/files/patch-src_3rdparty_gn_build_gen.py =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_gn_build_gen.py +++ www/qt5-webengine/files/patch-src_3rdparty_gn_build_gen.py @@ -1,58 +1,33 @@ ---- src/3rdparty/gn/build/gen.py.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/gn/build/gen.py.orig 2019-05-23 12:39:34 UTC +++ src/3rdparty/gn/build/gen.py -@@ -41,10 +41,12 @@ class Platform(object): - self._platform = 'aix' - elif self._platform.startswith('fuchsia'): - self._platform = 'fuchsia' -+ elif self._platform.lower().startswith('freebsd'): -+ self._platform = 'bsd' +@@ -44,7 +44,7 @@ class Platform(object): @staticmethod def known_platforms(): - return ['linux', 'darwin', 'msvc', 'aix', 'fuchsia'] -+ return ['linux', 'darwin', 'msvc', 'aix', 'fuchsia', 'bsd'] ++ return ['linux', 'darwin', 'msvc', 'aix', 'fuchsia', 'freebsd'] def platform(self): return self._platform -@@ -67,8 +69,11 @@ class Platform(object): +@@ -67,6 +67,9 @@ class Platform(object): def is_aix(self): return self._platform == 'aix' -+ def is_bsd(self): -+ return self._platform == 'bsd' ++ def is_freebsd(self): ++ return self._platform == 'freebsd' + def is_posix(self): -- return self._platform in ['linux', 'darwin', 'aix'] -+ return self._platform in ['linux', 'darwin', 'aix', 'bsd'] + return self._platform in ['linux', 'freebsd', 'darwin', 'aix'] - - def main(argv): -@@ -221,6 +226,7 @@ def WriteGenericNinja(path, static_libraries, executab - 'darwin': 'build_mac.ninja.template', - 'linux': 'build_linux.ninja.template', - 'aix': 'build_aix.ninja.template', -+ 'bsd': 'build_linux.ninja.template', - }[platform.platform()]) - - with open(template_filename) as f: -@@ -388,6 +394,11 @@ def WriteGNNinja(path, platform, host, options, linux_ +@@ -362,6 +365,11 @@ def WriteGNNinja(path, platform, host, options): elif platform.is_aix(): cflags_cc.append('-maix64') - ldflags.extend(['-maix64', '-pthread']) -+ elif platform.is_bsd(): + ldflags.append('-maix64') ++ elif platform.is_freebsd(): + cflags.extend(['-Wno-deprecated-register', '-Wno-parentheses-equality']) + ldflags.extend(['-pthread']) -+ libs.extend(['-lexecinfo', '-lkvm']) ++ libs.extend(['-lexecinfo', '-lkvm', '-lutil']) + include_dirs += ['/usr/local/include'] - if options.use_lto: - cflags.extend(['-flto', '-fwhole-program-vtables']) -@@ -686,7 +697,7 @@ def WriteGNNinja(path, platform, host, options, linux_ - 'base/strings/string16.cc', - ]) - -- if platform.is_linux() or platform.is_aix(): -+ if platform.is_linux() or platform.is_aix() or platform.is_bsd(): - static_libraries['base']['sources'].extend([ - 'base/strings/sys_string_conversions_posix.cc', - ]) + if platform.is_posix(): + ldflags.append('-pthread') Index: www/qt5-webengine/files/patch-src_3rdparty_gn_tools_gn_args.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_gn_tools_gn_args.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/gn/tools/gn/args.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/gn/tools/gn/args.cc -@@ -294,6 +294,8 @@ void Args::SetSystemVarsLocked(Scope* dest) const { - os = "mac"; - #elif defined(OS_LINUX) - os = "linux"; -+#elif defined(OS_BSD) -+ os = "bsd"; - #elif defined(OS_AIX) - os = "aix"; - #else Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_exe__path.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_gn_util_exe__path.cc +++ /dev/null @@ -1,33 +0,0 @@ ---- src/3rdparty/gn/util/exe_path.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/gn/util/exe_path.cc -@@ -13,6 +13,9 @@ - #include - #elif defined(OS_WIN) - #include -+#elif defined(OS_FREEBSD) -+#include -+#include - #endif - - #if defined(OS_MACOSX) -@@ -44,6 +47,20 @@ base::FilePath GetExePath() { - return base::FilePath(); - } - return base::FilePath(system_buffer); -+} -+ -+#elif defined(OS_FREEBSD) -+ -+base::FilePath GetExePath() { -+ int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; -+ char system_buffer[PATH_MAX + 1]; -+ size_t length = sizeof(system_buffer); -+ int error = sysctl(name, 4, system_buffer, &length, NULL, 0); -+ if (error < 0 || length <= 1) { -+ NOTREACHED() << "Unable to resolve path."; -+ return base::FilePath(); -+ } -+ return base::FilePath(base::FilePath::StringType(system_buffer, length - 1)); - } - - #else Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_semaphore.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_gn_util_semaphore.h +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/gn/util/semaphore.h.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/gn/util/semaphore.h -@@ -15,7 +15,7 @@ - #include - #elif defined(OS_MACOSX) - #include --#elif defined(OS_LINUX) || defined(OS_AIX) -+#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) - #include - #else - #error Port. -@@ -35,7 +35,7 @@ class Semaphore { - - #if defined(OS_MACOSX) - typedef semaphore_t NativeHandle; --#elif defined(OS_LINUX) || defined(OS_AIX) -+#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) - typedef sem_t NativeHandle; - #elif defined(OS_WIN) - typedef HANDLE NativeHandle; Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_semaphore.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_gn_util_semaphore.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/gn/util/semaphore.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/gn/util/semaphore.cc -@@ -36,7 +36,7 @@ void Semaphore::Wait() { - } - } - --#elif defined(OS_LINUX) || defined(OS_AIX) -+#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) - - Semaphore::Semaphore(int count) { - DCHECK_GE(count, 0); Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_sys__info.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_gn_util_sys__info.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/gn/util/sys_info.cc.orig 2019-05-23 12:39:34 UTC ++++ src/3rdparty/gn/util/sys_info.cc +@@ -28,6 +28,8 @@ std::string OperatingSystemArchitecture() { + arch = "x86"; + } else if (arch == "amd64") { + arch = "x86_64"; ++ } else if (arch == "arm64") { ++ arch = "aarch64"; + } else if (std::string(info.sysname) == "AIX") { + arch = "ppc64"; + } Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_ticks.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_gn_util_ticks.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- src/3rdparty/gn/util/ticks.cc.orig 2018-11-13 18:25:11 UTC -+++ src/3rdparty/gn/util/ticks.cc -@@ -11,7 +11,7 @@ - #include - #elif defined(OS_MACOSX) - #include --#elif defined(OS_LINUX) || defined(OS_AIX) -+#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) - #include - #else - #error Port. -@@ -27,7 +27,7 @@ LARGE_INTEGER g_start; - #elif defined(OS_MACOSX) - mach_timebase_info_data_t g_timebase; - uint64_t g_start; --#elif defined(OS_LINUX) || defined(OS_AIX) -+#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) - uint64_t g_start; - #else - #error Port. -@@ -44,7 +44,7 @@ void Init() { - #elif defined(OS_MACOSX) - mach_timebase_info(&g_timebase); - g_start = (mach_absolute_time() * g_timebase.numer) / g_timebase.denom; --#elif defined(OS_LINUX) || defined(OS_AIX) -+#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - g_start = static_cast(ts.tv_sec) * kNano + -@@ -74,7 +74,7 @@ Ticks TicksNow() { - #elif defined(OS_MACOSX) - now = - ((mach_absolute_time() * g_timebase.numer) / g_timebase.denom) - g_start; --#elif defined(OS_LINUX) || defined(OS_AIX) -+#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - now = (static_cast(ts.tv_sec) * kNano + Index: www/qt5-webengine/files/patch-src_core_core__module.pro =================================================================== --- www/qt5-webengine/files/patch-src_core_core__module.pro +++ www/qt5-webengine/files/patch-src_core_core__module.pro @@ -2,7 +2,7 @@ * Extend some Linux-only compiler arguments to FreeBSD. * Generate split out debug files on FreeBSD too. ---- src/core/core_module.pro.orig 2018-11-27 04:10:38 UTC +--- src/core/core_module.pro.orig 2019-05-24 09:01:39 UTC +++ src/core/core_module.pro @@ -4,6 +4,9 @@ include(core_common.pri) # Needed to set a CFBundleIdentifier @@ -14,16 +14,16 @@ linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri !include($$linking_pri) { -@@ -29,21 +32,21 @@ RSP_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}.rsp - for(object, NINJA_OBJECTS): RSP_CONTENT += $$object - write_file($$RSP_FILE, RSP_CONTENT) - macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_FILE) --linux:LIBS_PRIVATE += @$$RSP_FILE -+unix:LIBS_PRIVATE += @$$RSP_FILE +@@ -30,21 +33,21 @@ RSP_ARCHIVE_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGE + for(archive, NINJA_ARCHIVES): RSP_A_CONTENT += $$archive + write_file($$RSP_ARCHIVE_FILE, RSP_A_CONTENT) + macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_OBJECT_FILE) +-linux:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} ++unix:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} # QTBUG-58710 add main rsp file on windows - win32:QMAKE_LFLAGS += @$$RSP_FILE --linux: LIBS_PRIVATE += -Wl,--start-group $$NINJA_ARCHIVES -Wl,--end-group -+unix: LIBS_PRIVATE += -Wl,--start-group $$NINJA_ARCHIVES -Wl,--end-group + win32:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} +-linux:QMAKE_LFLAGS += -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group ++unix:QMAKE_LFLAGS += -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group else: LIBS_PRIVATE += $$NINJA_ARCHIVES LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS # GN's LFLAGS doesn't always work across all the Linux configurations we support. @@ -40,9 +40,9 @@ } else { QMAKE_LFLAGS += $$NINJA_LFLAGS } -@@ -86,7 +89,7 @@ CONFIG -= bsymbolic_functions - - qtConfig(egl): CONFIG += egl +@@ -85,7 +88,7 @@ win32 { + # and doesn't let Chromium get access to libc symbols through dlsym. + CONFIG -= bsymbolic_functions -linux:qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)" +unix:qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)" Index: www/qt5-webengine/files/patch-src_core_ozone_gl__surface__glx__qt.cpp =================================================================== --- www/qt5-webengine/files/patch-src_core_ozone_gl__surface__glx__qt.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/core/ozone/gl_surface_glx_qt.cpp.orig 2019-01-16 22:42:58 UTC -+++ src/core/ozone/gl_surface_glx_qt.cpp -@@ -173,7 +173,7 @@ bool GLSurfaceGLXQt::Initialize(GLSurfaceFormat format - GLX_PBUFFER_HEIGHT, m_size.height(), - GLX_LARGEST_PBUFFER, x11::False, - GLX_PRESERVED_CONTENTS, x11::False, -- NULL -+ GLX_NONE - }; - - m_surfaceBuffer = glXCreatePbuffer(display, static_cast(g_config), pbuffer_attributes); Index: www/qt5-webengine/pkg-plist =================================================================== --- www/qt5-webengine/pkg-plist +++ www/qt5-webengine/pkg-plist @@ -2,6 +2,7 @@ %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebengineaction_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebengineaction_p_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginecertificateerror_p.h +%%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebengineclientcertificateselection_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginecontextmenurequest_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginedialogrequests_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginedownloaditem_p.h @@ -17,9 +18,11 @@ %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginesettings_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginesingleton_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginetestsupport_p.h +%%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginetouchhandleprovider_p_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebengineview_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebengineview_p_p.h %%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qtwebengineglobal_p.h +%%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qtwebengine-config_p.h %%QT_INCDIR%%/QtWebEngine/QQuickWebEngineProfile %%QT_INCDIR%%/QtWebEngine/QQuickWebEngineScript %%QT_INCDIR%%/QtWebEngine/QtWebEngine @@ -29,14 +32,18 @@ %%QT_INCDIR%%/QtWebEngine/qquickwebenginescript.h %%QT_INCDIR%%/QtWebEngine/qtwebengineglobal.h %%QT_INCDIR%%/QtWebEngine/qtwebengineversion.h +%%QT_INCDIR%%/QtWebEngine/qtwebengine-config.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qtwebenginecoreglobal_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginecallback_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginecookiestore_p.h +%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginemessagepumpscheduler_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebengineurlrequestinfo_p.h %%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qtwebenginecore-config_p.h %%QT_INCDIR%%/QtWebEngineCore/QWebEngineCallback +%%QT_INCDIR%%/QtWebEngineCore/QWebEngineClientCertificateStore %%QT_INCDIR%%/QtWebEngineCore/QWebEngineCookieStore %%QT_INCDIR%%/QtWebEngineCore/QWebEngineHttpRequest +%%QT_INCDIR%%/QtWebEngineCore/QWebEngineNotification %%QT_INCDIR%%/QtWebEngineCore/QWebEngineQuotaRequest %%QT_INCDIR%%/QtWebEngineCore/QWebEngineRegisterProtocolHandlerRequest %%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlRequestInfo @@ -51,8 +58,10 @@ %%QT_INCDIR%%/QtWebEngineCore/qtwebenginecoreversion.h %%QT_INCDIR%%/QtWebEngineCore/qtwebenginecore-config.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginecallback.h +%%QT_INCDIR%%/QtWebEngineCore/qwebengineclientcertificatestore.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginecookiestore.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginehttprequest.h +%%QT_INCDIR%%/QtWebEngineCore/qwebenginenotification.h %%QT_INCDIR%%/QtWebEngineCore/qwebenginequotarequest.h %%QT_INCDIR%%/QtWebEngineCore/qwebengineregisterprotocolhandlerrequest.h %%QT_INCDIR%%/QtWebEngineCore/qwebengineurlrequestinfo.h @@ -62,6 +71,7 @@ %%QT_INCDIR%%/QtWebEngineCore/qwebengineurlschemehandler.h %%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebenginedownloaditem_p.h %%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebenginehistory_p.h +%%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebenginenotificationpresenter_p.h %%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebenginepage_p.h %%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebengineprofile_p.h %%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebenginescriptcollection_p.h @@ -140,6 +150,8 @@ %%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/MenuSeparator.qml %%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/PromptDialog.qml %%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/ToolTip.qml +%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/TouchHandle.qml +%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/TouchSelectionMenu.qml %%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/qmldir %%QT_QMLDIR%%/QtWebEngine/Controls2Delegates/AlertDialog.qml %%QT_QMLDIR%%/QtWebEngine/Controls2Delegates/AuthenticationDialog.qml