pkgsrc-WIP-changes archive

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

qt6-qtwebengine: add version 6.8.2



Module Name:	pkgsrc-wip
Committed By:	Mark Davies <mark%ecs.vuw.ac.nz@localhost>
Pushed By:	markd
Date:		Thu Feb 13 07:42:24 2025 +1300
Changeset:	299d37fe55fdc526a7ca146bf26ee031448fa4b0

Modified Files:
	Makefile
Added Files:
	qt6-qtwebengine/DESCR
	qt6-qtwebengine/Makefile
	qt6-qtwebengine/PLIST
	qt6-qtwebengine/TODO
	qt6-qtwebengine/distinfo
	qt6-qtwebengine/patches/patch-cmake_Functions.cmake
	qt6-qtwebengine/patches/patch-configure.cmake
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__root.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_atomicops.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_base__paths__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_compiler__specific.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_elf__reader.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_stack__trace.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_dir__reader__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_dir__reader__posix.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__bsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__util__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__util__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_important__file__writer__cleaner.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_scoped__file.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_functional_unretained__traits.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_i18n_icu__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_linux__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_logging__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_message__loop_message__pump__glib.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_native__library__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_native__library__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_can__lower__nice__to.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_file__descriptor__shuffle.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_sysctl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_internal__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_kill.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_kill__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_launch.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_launch__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_memory__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__netbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__openbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__netbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__openbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__netbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_module__cache.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__base__address__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_rand__util.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_rand__util__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_strings_safe__sprintf__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_synchronization_lock__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_syslog__logging.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__freebsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__netbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__openbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_task_thread__pool_environment__config__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_test_test__file__util__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_hang__watcher.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__bsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_memory__dump__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_tracing_trace__time.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_tracing_trace__time.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_version__info_version__info.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_clang_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_linux_pkg-config.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_ozone.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_rust.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_v8__target__cpu.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_detect__host__arch.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_gn__run__binary.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_chrome.map
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_strip__binary.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_icu.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_libevent.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_libusb.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_rust_rust__bindgen.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_rust_std_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_freebsd_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_gcc__solink__wrapper.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_netbsd_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_openbsd_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_toolchain.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_cc_base_features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_management_chrome__management__api__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_tabs_tabs__api.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webstore__private_webstore__private__api.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_gcm_gcm__profile__service__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_router_discovery_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_desktop__media__picker__controller.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_prefs_browser__prefs.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_prefs_pref__service__incognito__allowlist.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_printing_print__backend__service__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_printing_printer__query.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_resources_signin_signin__shared.css
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_signin_signin__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about_about__ui.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards__handler.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_appearance__handler.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_channel__info.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_channel__info__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_extensions_permissions_chrome__permission__message__rules.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_cdm__host__file__path.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_cdm__registration.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_component__widevine__cdm__hint__file__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_pref__names.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_url__constants.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome__launcher.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome_chrome__finder.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_key__converter__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_keycode__text__conversion__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_commerce_core_commerce__feature__list.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_constrained__window_constrained__window__views.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_chrome__crashpad__handler.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_crashpad__handler__main.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_browser_crash__upload__list__crashpad.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_mock__signals__aggregator.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_system__signals_platform__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_discardable__memory_service_discardable__shared__memory__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_eye__dropper_eye__dropper__view.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__configurations.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_proto_v2_wire_version.proto
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_feed__network__impl__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_guarded__page__allocator__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_crash__handler_crash__analyzer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_live__caption_caption__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_live__caption_caption__util.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_media__router_common_media__source.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_media__router_common_providers_cast_channel_cast__message__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_motherboard.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_named__mojo__ipc__server_connection__info.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_optimization__guide_core_optimization__guide__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_os__crypt_sync_libsecret__util__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_os__crypt_sync_os__crypt.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_common_proto_paint__preview.proto
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_player_player__compositor__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__form__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__async__helper.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__pref__names.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_performance__manager_public_features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_permissions_prediction__service_prediction__common.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_browser_policy__pref__mapping__test.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__loader__common.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__paths.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_tools_generate__policy__source.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_power__metrics_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_power__metrics_energy__metrics__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_content_common_file__type__policies__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_content_resources_gen__file__type__proto.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_common_features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_search__engines_search__engine__choice_search__engine__choice__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_search__engines_template__url__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_security__interstitials_content_utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_browser_supervised__user__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_common_features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_common_features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_system__cpu_cpu__probe.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_user__education_views_help__bubble__view.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_variations_service_variations__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_host_host__display__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_host_host__display__client.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_content__main.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_audio_audio__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl__receiver__bindings.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__thread__type__switcher__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_file__system__access_file__system__access__local__path__watcher.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_font__access_font__enumeration__data__source.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_compositor__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__memory__buffer__manager__singleton.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_media_frameless__media__interface__proxy.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_media_service__video__capture__device__launcher.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_child_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_child_child__process.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_font__list__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_user__agent.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_gpu_gpu__child__thread.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_browser_content__browser__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_browser_zygote__host_zygote__host__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__switches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__switches.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_zygote_features.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_utility_shell__content__utility__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_test_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_services.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__main.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__thread__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_bluetooth_cast__bluetooth.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_hid__writer__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_management_management__api.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_api___permission__features.json
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_api_runtime.json
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_command.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_features_feature.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_renderer_bindings_api__binding__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_renderer_bindings_argument__spec.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__browser__main__parts.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_dawn__context__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__info__collector.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_x__util.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_semaphore__handle.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__image.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_audio__output__proxy__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_pulse_pulse__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_audio__latency.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_libaom__thread__wrapper.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_libvpx__thread__wrapper.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_media__switches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_media__switches.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_user__input__monitor__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_video__frame.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_video__frame.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__tracker__factory__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_cdm_cdm__paths__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_cdm_library__cdm_cdm__paths.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_gl__image__processor__backend.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_libyuv__image__processor__backend.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_mailbox__video__frame__converter.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_platform__video__frame__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__wrapper.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_media__options.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_services_webrtc__video__perf__history.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_audio__processor.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_helpers.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_helpers__unittests.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_channel.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_embedder_features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_public_cpp_platform_socket__utils__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_native__client__sdk_src_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier__passive.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_sockaddr__util__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_sockaddr__util__posix__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_disk__cache_simple_simple__file__tracker.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_address__info.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_dns__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_resolv__reader.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_resolv__reader.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__handler__negotiate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__preferences.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__preferences.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__network__session.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_socket__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_udp__socket__unittest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_third__party_quiche_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_tools_net__watcher_net__watcher.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings__conversion.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__context__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_features.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_services_init__process__reaper.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_features.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_switches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_switches.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_public_cpp_generic__sensor_sensor__reading.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__context.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__context.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__service.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__service.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_cpp_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_cpp_features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_mojom_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_shared__dictionary_shared__dictionary__writer__in__memory.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_on__device__model_on__device__model__service.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_on__device__model_pre__sandbox__init.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_service__manager_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_public_mojom_video__capture__service.mojom
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_font__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_platform__canvas.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_platform.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_platform__helpers.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils__linux.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_compiler_translator_SymbolTable__ESSL__autogen.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_platform_web__vector.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_build_scripts_run__with__pythonpath.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_css_properties_css__color__function__parser.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_execution__context_navigator__base.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_track_vtt_vtt__cue__layout__algorithm.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_miscellaneous__operations.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_queue__with__sizes.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_style_style__crossfade__image.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__device__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__metrics.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_color.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_container__annotations.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_stack__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_brotli_common_platform.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_cpuinfo_cpuinfo.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_src_dawn_common_Platform.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_cabac.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_cpu.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_mem.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_random__seed.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_x86_x86inc.asm
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_fontconfig_include_config.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_fontconfig_src_src_fccompat.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ipcz_src_standalone_base_logging.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++_src_src_chrono.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++_src_src_filesystem_filesystem__clock.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++abi_src_src_cxa__guard__impl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libdrm_src_xf86drmMode.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libsync_src_include_sync_sync.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libsync_src_sync.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_core.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_os_threads__posix.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_lzma__sdk_C_CpuArch.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_material__color__utilities_src_cpp_palettes_tones.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_nasm_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_nasm_config_config-linux.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_node_node.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_node_node.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fpdfapi_page_cpdf__psengine.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_cjs__publicmethods.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_fx__date__helpers.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_xfa_cfxjse__formcalc__context.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_third__party_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_build__config.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_thread__utils.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_time.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_event__fd.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_thread__utils.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_event__fd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_periodic__task.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_string__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_subprocess__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_thread__task__runner.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_db_column_utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_ipc_memfd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_platform__posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_track.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_base_SkContainers.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkOSFile__posix.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_speech-dispatcher_libspeechd__version.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_speech-dispatcher_speechd__types.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation__dev_sqlite3.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_Reactor_Debug.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Configurator.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Linux_MemFd.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_WSI_libXCB.cpp
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_fontconfig__util__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_tflite_features.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_wayland_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byte__order.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_net__test__helpers.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread__types.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_widevine_cdm_widevine.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_generate__stubs_rules.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_grit_grit_node_base.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_json__schema__compiler_cpp__bundle__generator.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_licenses_licenses.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_memory_partition__allocator_inspect__utils.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_v8__context__snapshot_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_client_drag__drop__client.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_screen__ozone.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_screen__ozone.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__non__backed.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__non__backed.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_init_input__method__initializer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_linux_linux__input__method__context__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__switches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__switches.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__display__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__shm__image__pool.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_color__id.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_color__provider__utils.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_system__theme.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor__observer.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_display_screen.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_display_screen.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event__switches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event__switches.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__fallback__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__render__params__linux.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_linux_gbm__wrapper.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_buffer__types__mojom__traits.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_platform__font__skia.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_render__text__api__fuzzer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_render__text__fuzzer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_switches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_switches.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_dri3.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_shm.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__context.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__switches.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_message__center_views_message__popup__view.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme__features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_common_egl__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_common_features.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_headless__surface__factory.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_ozone__platform__headless.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_common_wayland__util.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_vulkan__implementation__x11.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__window.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_test_mock__platform__window__delegate.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__init__properties.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_qt_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_qt_qt.gni
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__bn.xtb
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ja.xtb
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ko.xtb
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ml.xtb
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__th.xtb
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-CN.xtb
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-TW.xtb
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_examples_widget__example.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_style_platform__style.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_test_ui__controls__factory__desktop__aura__ozone.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_views__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_views__delegate.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_root__view.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_widget.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_custom__frame__view.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_BUILD.gn
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_include_v8-internal.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_include_v8config.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_api_api.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_atomicops.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_memory.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_small-vector.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_strings.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_sys-info.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_utils_random-number-generator.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_execution_isolate.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_flags_flags.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_sandbox_sandbox.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h
	qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_tools_run-paxctl.py
	qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_c__tool.c
	qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_ninja__binary__target__writer.cc
	qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_tool.h
	qt6-qtwebengine/patches/patch-src_core_CMakeLists.txt
	qt6-qtwebengine/patches/patch-src_core_api_configure.cmake
	qt6-qtwebengine/patches/patch-src_core_api_qt__cmdline.cmake
	qt6-qtwebengine/patches/patch-src_pdf_CMakeLists.txt
	qt6-qtwebengine/patches/patch-src_pdf_configure_BUILD.root.gn.in

Log Message:
qt6-qtwebengine:  add version 6.8.2

Chromium-based web engine for Qt6

based on the qt5-qtwebengine package, OpenBSD's qt6-qtwebengine package
and Robert Bagdan's chromium package.

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

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

diffstat:
 Makefile                                           |    1 +
 qt6-qtwebengine/DESCR                              |    1 +
 qt6-qtwebengine/Makefile                           |  147 +++
 qt6-qtwebengine/PLIST                              |  467 +++++++++
 qt6-qtwebengine/TODO                               |    3 +
 qt6-qtwebengine/distinfo                           | 1021 ++++++++++++++++++++
 .../patches/patch-cmake_Functions.cmake            |   51 +
 qt6-qtwebengine/patches/patch-configure.cmake      |  103 ++
 .../patches/patch-src_3rdparty_chromium_BUILD.gn   |   59 ++
 .../patch-src_3rdparty_chromium_base_BUILD.gn      |  176 ++++
 ...dparty_chromium_base_allocator_dispatcher_tls.h |   17 +
 ...cator_partition__allocator_partition__alloc.gni |   26 +
 ...tition__allocator_src_partition__alloc_BUILD.gn |   17 +
 ...artition__alloc_address__space__randomization.h |   26 +
 ...llocator_src_partition__alloc_page__allocator.h |   17 +
 ...c_partition__alloc_page__allocator__constants.h |   17 +
 ...tion__alloc_page__allocator__internals__posix.h |   22 +
 ...ition__alloc__base_debug_stack__trace__posix.cc |   40 +
 ...loc_partition__alloc__base_rand__util__posix.cc |   19 +
 ...ition__alloc__base_threading_platform__thread.h |   17 +
 ...e_threading_platform__thread__internal__posix.h |   17 +
 ...lloc__base_threading_platform__thread__posix.cc |   17 +
 ...src_partition__alloc_partition__alloc__config.h |   26 +
 ..._partition__alloc_partition__alloc__constants.h |   17 +
 ...rc_partition__alloc_partition__alloc__forward.h |   22 +
 ...locator_src_partition__alloc_partition__root.cc |   35 +
 ...locator_src_partition__alloc_spinning__mutex.cc |   65 ++
 ..._src_partition__alloc_thread__isolation_pkey.cc |   17 +
 .../patch-src_3rdparty_chromium_base_atomicops.h   |   20 +
 ...rc_3rdparty_chromium_base_base__paths__posix.cc |  129 +++
 ...src_3rdparty_chromium_base_compiler__specific.h |   17 +
 ...3rdparty_chromium_base_debug_debugger__posix.cc |  106 ++
 ...src_3rdparty_chromium_base_debug_elf__reader.cc |   19 +
 ...dparty_chromium_base_debug_proc__maps__linux.cc |   17 +
 ...rc_3rdparty_chromium_base_debug_stack__trace.cc |   34 +
 ...arty_chromium_base_debug_stack__trace__posix.cc |  109 +++
 ...dparty_chromium_base_files_dir__reader__linux.h |   45 +
 ...dparty_chromium_base_files_dir__reader__posix.h |   26 +
 ...party_chromium_base_files_file__path__watcher.h |   17 +
 ...chromium_base_files_file__path__watcher__bsd.cc |   63 ++
 ...omium_base_files_file__path__watcher__kqueue.cc |   24 +
 ...romium_base_files_file__path__watcher__kqueue.h |   16 +
 ...ium_base_files_file__path__watcher__unittest.cc |   35 +
 ...dparty_chromium_base_files_file__util__posix.cc |   59 ++
 ...rty_chromium_base_files_file__util__unittest.cc |   26 +
 ..._base_files_important__file__writer__cleaner.cc |   18 +
 ...rc_3rdparty_chromium_base_files_scoped__file.cc |   17 +
 ...y_chromium_base_functional_unretained__traits.h |   17 +
 ...ch-src_3rdparty_chromium_base_i18n_icu__util.cc |   26 +
 ...patch-src_3rdparty_chromium_base_linux__util.cc |   23 +
 ...src_3rdparty_chromium_base_logging__unittest.cc |   37 +
 ...rty_chromium_base_memory_discardable__memory.cc |   44 +
 ...ium_base_memory_discardable__memory__internal.h |   17 +
 ...emory_madv__free__discardable__memory__posix.cc |   27 +
 ..._base_memory_platform__shared__memory__region.h |   35 +
 ...mory_platform__shared__memory__region__posix.cc |   35 +
 ...omium_base_message__loop_message__pump__glib.cc |   44 +
 ...rdparty_chromium_base_native__library__posix.cc |   17 +
 ...arty_chromium_base_native__library__unittest.cc |   17 +
 ...rty_chromium_base_posix_can__lower__nice__to.cc |   22 +
 ...chromium_base_posix_file__descriptor__shuffle.h |   17 +
 ...atch-src_3rdparty_chromium_base_posix_sysctl.cc |   38 +
 ...rty_chromium_base_posix_unix__domain__socket.cc |   63 ++
 ...um_base_posix_unix__domain__socket__unittest.cc |   17 +
 ...rdparty_chromium_base_process_internal__linux.h |   26 +
 ...patch-src_3rdparty_chromium_base_process_kill.h |   17 +
 ...c_3rdparty_chromium_base_process_kill__posix.cc |   17 +
 ...tch-src_3rdparty_chromium_base_process_launch.h |   31 +
 ...3rdparty_chromium_base_process_launch__posix.cc |   27 +
 ...3rdparty_chromium_base_process_memory__linux.cc |   50 +
 ...dparty_chromium_base_process_process__handle.cc |   17 +
 ...rdparty_chromium_base_process_process__handle.h |   17 +
 ...romium_base_process_process__handle__freebsd.cc |   33 +
 ...hromium_base_process_process__handle__netbsd.cc |   64 ++
 ...romium_base_process_process__handle__openbsd.cc |  140 +++
 ...party_chromium_base_process_process__iterator.h |   29 +
 ...mium_base_process_process__iterator__freebsd.cc |   57 ++
 ...omium_base_process_process__iterator__netbsd.cc |  141 +++
 ...mium_base_process_process__iterator__openbsd.cc |   51 +
 ...party_chromium_base_process_process__metrics.cc |   60 ++
 ...dparty_chromium_base_process_process__metrics.h |  126 +++
 ...omium_base_process_process__metrics__freebsd.cc |  307 ++++++
 ...romium_base_process_process__metrics__netbsd.cc |  183 ++++
 ...omium_base_process_process__metrics__openbsd.cc |  228 +++++
 ...hromium_base_process_process__metrics__posix.cc |   26 +
 ...mium_base_process_process__metrics__unittest.cc |   18 +
 ...rdparty_chromium_base_process_process__posix.cc |  100 ++
 ...arty_chromium_base_process_process__unittest.cc |   17 +
 ...rdparty_chromium_base_profiler_module__cache.cc |   17 +
 ...e_profiler_sampling__profiler__thread__token.cc |   26 +
 ...se_profiler_sampling__profiler__thread__token.h |   26 +
 ...um_base_profiler_stack__base__address__posix.cc |   69 ++
 ...ofiler_stack__sampling__profiler__test__util.cc |   17 +
 ...profiler_stack__sampling__profiler__unittest.cc |   17 +
 ...romium_base_profiler_thread__delegate__posix.cc |   26 +
 .../patch-src_3rdparty_chromium_base_rand__util.h  |   17 +
 ...src_3rdparty_chromium_base_rand__util__posix.cc |   68 ++
 ...hromium_base_strings_safe__sprintf__unittest.cc |   24 +
 ...arty_chromium_base_synchronization_lock__impl.h |   29 +
 ...h-src_3rdparty_chromium_base_syslog__logging.cc |   26 +
 ...-src_3rdparty_chromium_base_system_sys__info.cc |   17 +
 ...h-src_3rdparty_chromium_base_system_sys__info.h |   26 +
 ...arty_chromium_base_system_sys__info__freebsd.cc |  119 +++
 ...party_chromium_base_system_sys__info__netbsd.cc |   97 ++
 ...arty_chromium_base_system_sys__info__openbsd.cc |   89 ++
 ...dparty_chromium_base_system_sys__info__posix.cc |   35 +
 ...rty_chromium_base_system_sys__info__unittest.cc |   26 +
 ...k_thread__pool_environment__config__unittest.cc |   26 +
 ...y_chromium_base_test_test__file__util__linux.cc |   19 +
 ...y_chromium_base_test_test__file__util__posix.cc |   17 +
 ...dparty_chromium_base_threading_hang__watcher.cc |   17 +
 ...arty_chromium_base_threading_platform__thread.h |   17 +
 ...hromium_base_threading_platform__thread__bsd.cc |   40 +
 ..._threading_platform__thread__internal__posix.cc |   17 +
 ...omium_base_threading_platform__thread__posix.cc |   60 ++
 ...um_base_threading_platform__thread__unittest.cc |   44 +
 ...ium_base_trace__event_malloc__dump__provider.cc |   36 +
 ...mium_base_trace__event_memory__dump__manager.cc |   17 +
 ...mium_base_trace__event_process__memory__dump.cc |   17 +
 ...c_3rdparty_chromium_base_tracing_trace__time.cc |   36 +
 ...rc_3rdparty_chromium_base_tracing_trace__time.h |   17 +
 ...rty_chromium_base_version__info_version__info.h |   17 +
 ...tch-src_3rdparty_chromium_build_config_BUILD.gn |   19 +
 ...c_3rdparty_chromium_build_config_BUILDCONFIG.gn |   58 ++
 ...c_3rdparty_chromium_build_config_clang_BUILD.gn |   20 +
 ...rdparty_chromium_build_config_compiler_BUILD.gn |  127 +++
 ...c_3rdparty_chromium_build_config_linux_BUILD.gn |   17 +
 ...party_chromium_build_config_linux_pkg-config.py |   17 +
 ...ch-src_3rdparty_chromium_build_config_ozone.gni |   29 +
 ...tch-src_3rdparty_chromium_build_config_rust.gni |   19 +
 ...party_chromium_build_config_v8__target__cpu.gni |   19 +
 ...c_3rdparty_chromium_build_detect__host__arch.py |   17 +
 ...-src_3rdparty_chromium_build_gn__run__binary.py |   17 +
 ...ch-src_3rdparty_chromium_build_linux_chrome.map |   19 +
 ..._3rdparty_chromium_build_linux_strip__binary.py |   16 +
 ...c_3rdparty_chromium_build_linux_unbundle_icu.gn |   24 +
 ...party_chromium_build_linux_unbundle_libevent.gn |   21 +
 ...rdparty_chromium_build_linux_unbundle_libusb.gn |   36 +
 ..._3rdparty_chromium_build_rust_rust__bindgen.gni |   25 +
 ...h-src_3rdparty_chromium_build_rust_std_BUILD.gn |   16 +
 ...party_chromium_build_toolchain_freebsd_BUILD.gn |   75 ++
 ...hromium_build_toolchain_gcc__solink__wrapper.py |   17 +
 ...rty_chromium_build_toolchain_gcc__toolchain.gni |   50 +
 ...dparty_chromium_build_toolchain_netbsd_BUILD.gn |   75 ++
 ...party_chromium_build_toolchain_openbsd_BUILD.gn |   75 ++
 ...3rdparty_chromium_build_toolchain_toolchain.gni |   13 +
 ...patch-src_3rdparty_chromium_cc_base_features.cc |   17 +
 ...h-src_3rdparty_chromium_chrome_browser_BUILD.gn |   22 +
 ...hrome__protocol__handler__registry__delegate.cc |   17 +
 ...rty_chromium_chrome_browser_extensions_BUILD.gn |   19 +
 ..._browser__context__keyed__service__factories.cc |   26 +
 ...ate_chrome__desktop__report__request__helper.cc |   35 +
 ...rprise__reporting__private_conversion__utils.cc |   17 +
 ...erprise__reporting__private_conversion__utils.h |   17 +
 ..._private_enterprise__reporting__private__api.cc |   44 +
 ...__private_enterprise__reporting__private__api.h |   35 +
 ...writer__private_removable__storage__provider.cc |   26 +
 ...management_chrome__management__api__delegate.cc |   17 +
 ...__private_passwords__private__delegate__impl.cc |   17 +
 ...s_api_runtime_chrome__runtime__api__delegate.cc |   21 +
 ...extensions_api_settings__private_prefs__util.cc |   26 +
 ...chrome_browser_extensions_api_tabs_tabs__api.cc |   17 +
 ...gging__private_webrtc__logging__private__api.cc |   35 +
 ...api_webstore__private_webstore__private__api.cc |   17 +
 ...e_browser_gcm_gcm__profile__service__factory.cc |   26 +
 ...__id_instance__id__profile__service__factory.cc |   26 +
 ..._chrome_browser_media_router_discovery_BUILD.gn |   17 +
 ...wser_media_webrtc_chrome__screen__enumerator.cc |   53 +
 ...owser_media_webrtc_chrome__screen__enumerator.h |   26 +
 ...ia_webrtc_desktop__media__picker__controller.cc |   17 +
 ...e_browser_media_webrtc_webrtc__log__uploader.cc |   17 +
 ...ser_media_webrtc_webrtc__logging__controller.cc |   39 +
 ...wser_media_webrtc_webrtc__logging__controller.h |   26 +
 ...rowser_net_system__network__context__manager.cc |  180 ++++
 ...browser_net_system__network__context__manager.h |   35 +
 ...chromium_chrome_browser_prefs_browser__prefs.cc |   54 ++
 ...er_prefs_pref__service__incognito__allowlist.cc |   17 +
 ...er_printing_print__backend__service__manager.cc |   35 +
 ...omium_chrome_browser_printing_printer__query.cc |   17 +
 ...ome_browser_resources_signin_signin__shared.css |   17 +
 ..._chromium_chrome_browser_signin_signin__util.cc |   17 +
 ...mium_chrome_browser_ui_webui_about_about__ui.cc |   26 +
 ...i_webui_chrome__web__ui__controller__factory.cc |   26 +
 ...i_connectors__internals_device__trust__utils.cc |   35 +
 ...e_browser_ui_webui_management_management__ui.cc |   22 +
 ..._ui_webui_management_management__ui__handler.cc |   59 ++
 ...r_ui_webui_management_management__ui__handler.h |   43 +
 ...ebui_password__manager_promo__cards__handler.cc |   26 +
 ...manager_promo__cards_relaunch__chrome__promo.cc |   26 +
 ...rowser_ui_webui_settings_appearance__handler.cc |   17 +
 ...tings_settings__localized__strings__provider.cc |   62 ++
 ...3rdparty_chromium_chrome_common_channel__info.h |   24 +
 ..._chromium_chrome_common_channel__info__posix.cc |   26 +
 ...arty_chromium_chrome_common_chrome__features.cc |   88 ++
 ...party_chromium_chrome_common_chrome__features.h |   51 +
 ...rdparty_chromium_chrome_common_chrome__paths.cc |   81 ++
 ...3rdparty_chromium_chrome_common_chrome__paths.h |   35 +
 ...hromium_chrome_common_chrome__paths__internal.h |   17 +
 ...arty_chromium_chrome_common_chrome__switches.cc |   25 +
 ...party_chromium_chrome_common_chrome__switches.h |   23 +
 ...rmissions_chrome__permission__message__rules.cc |   17 +
 ...um_chrome_common_media_cdm__host__file__path.cc |   17 +
 ...romium_chrome_common_media_cdm__registration.cc |   58 ++
 ...a_component__widevine__cdm__hint__file__linux.h |   17 +
 ...c_3rdparty_chromium_chrome_common_pref__names.h |   88 ++
 ...rdparty_chromium_chrome_common_url__constants.h |   17 +
 ...chromium_chrome_common_webui__url__constants.cc |  100 ++
 ..._chromium_chrome_common_webui__url__constants.h |   63 ++
 ...atch-src_3rdparty_chromium_chrome_test_BUILD.gn |   13 +
 ...um_chrome_test_chromedriver_chrome__launcher.cc |   16 +
 ...rome_test_chromedriver_chrome_chrome__finder.cc |   35 +
 ...e_test_chromedriver_key__converter__unittest.cc |   26 +
 ...medriver_keycode__text__conversion__unittest.cc |   26 +
 ...ill_core_common_autofill__payments__features.cc |   17 +
 ...onents_commerce_core_commerce__feature__list.cc |   35 +
 ...nstrained__window_constrained__window__views.cc |   17 +
 ...ngs_core_browser_website__settings__registry.cc |   17 +
 ...omponents_cookie__config_cookie__store__util.cc |   17 +
 ...rty_chromium_components_crash_core_app_BUILD.gn |   49 +
 ...nts_crash_core_app_chrome__crashpad__handler.cc |   18 +
 ...nents_crash_core_app_crashpad__handler__main.cc |   26 +
 ...h_core_browser_crash__upload__list__crashpad.cc |   32 +
 ..._chromium_components_crash_core_common_BUILD.gn |   17 +
 ...ignals_core_browser_mock__signals__aggregator.h |   17 +
 ...ice__signals_core_browser_signals__aggregator.h |   17 +
 ...gnals_core_browser_signals__aggregator__impl.cc |   17 +
 ...ignals_core_browser_signals__aggregator__impl.h |   17 +
 ...ignals_core_browser_user__permission__service.h |   17 +
 ...core_browser_user__permission__service__impl.cc |   17 +
 ..._core_browser_user__permission__service__impl.h |   17 +
 ...evice__signals_core_common_signals__features.cc |   17 +
 ...device__signals_core_common_signals__features.h |   17 +
 ...nals_core_system__signals_platform__delegate.cc |   17 +
 ...service_discardable__shared__memory__manager.cc |   17 +
 ...ponents_embedder__support_user__agent__utils.cc |   18 +
 ...bedder__support_user__agent__utils__unittest.cc |   44 +
 ...m_components_eye__dropper_eye__dropper__view.cc |   17 +
 ..._feature__engagement_public_event__constants.cc |   17 +
 ...s_feature__engagement_public_event__constants.h |   17 +
 ...e__engagement_public_feature__configurations.cc |   36 +
 ...eature__engagement_public_feature__constants.cc |   36 +
 ...feature__engagement_public_feature__constants.h |   45 +
 ...nts_feature__engagement_public_feature__list.cc |   36 +
 ...ents_feature__engagement_public_feature__list.h |   64 ++
 ...omponents_feed_core_proto_v2_wire_version.proto |   19 +
 ...s_feed_core_v2_feed__network__impl__unittest.cc |   19 +
 ...chromium_components_feed_core_v2_proto__util.cc |   30 +
 ...omponents_feed_core_v2_proto__util__unittest.cc |   19 +
 ...y_chromium_components_flags__ui_flags__state.cc |   17 +
 ...3rdparty_chromium_components_gwp__asan_BUILD.gn |   17 +
 ..._asan_client_guarded__page__allocator__posix.cc |   19 +
 ...romium_components_gwp__asan_client_gwp__asan.cc |   17 +
 ...ponents_gwp__asan_client_gwp__asan__features.cc |   17 +
 ...nts_gwp__asan_crash__handler_crash__analyzer.cc |   26 +
 ...omium_components_live__caption_caption__util.cc |   17 +
 ...romium_components_live__caption_caption__util.h |   17 +
 ...omponents_media__router_common_media__source.cc |   17 +
 ...n_providers_cast_channel_cast__message__util.cc |   17 +
 ...ents_metrics_drive__metrics__provider__linux.cc |   22 +
 ...rty_chromium_components_metrics_metrics__log.cc |   44 +
 ...arty_chromium_components_metrics_motherboard.cc |   16 +
 ...nts_named__mojo__ipc__server_connection__info.h |   33 +
 ...erver_named__mojo__ipc__server__client__util.cc |   17 +
 ...omium_components_neterror_resources_neterror.js |   17 +
 ...zation__guide_core_optimization__guide__util.cc |   17 +
 ...onents_os__crypt_sync_libsecret__util__linux.cc |   33 +
 ..._chromium_components_os__crypt_sync_os__crypt.h |   78 ++
 ...aint__preview_browser_paint__preview__client.cc |   19 +
 ...iew_browser_paint__preview__client__unittest.cc |   19 +
 ...aint__preview_common_proto_paint__preview.proto |   19 +
 ..._preview_player_player__compositor__delegate.cc |   19 +
 ...ger_core_browser_features_password__features.cc |   26 +
 ...ager_core_browser_features_password__features.h |   17 +
 ...manager_core_browser_password__form__manager.cc |   35 +
 ...word__manager_core_browser_password__manager.cc |   17 +
 ...ssword__store_login__database__async__helper.cc |   17 +
 ...er_password__store_login__database__unittest.cc |   17 +
 ...er_core_common_password__manager__pref__names.h |   17 +
 ...mponents_performance__manager_public_features.h |   17 +
 ...sions_prediction__service_prediction__common.cc |   26 +
 ...icy_core_browser_policy__pref__mapping__test.cc |   17 +
 ...licy_core_common_cloud_cloud__policy__client.cc |   17 +
 ...policy_core_common_cloud_cloud__policy__util.cc |   61 ++
 ...ts_policy_core_common_policy__loader__common.cc |   26 +
 ..._components_policy_core_common_policy__paths.cc |   19 +
 ..._components_policy_core_common_policy__utils.cc |   17 +
 ...onents_policy_tools_generate__policy__source.py |   20 +
 ...rty_chromium_components_power__metrics_BUILD.gn |   17 +
 ...nts_power__metrics_energy__metrics__provider.cc |   27 +
 ...ontent_common_file__type__policies__unittest.cc |   17 +
 ...ing_content_resources_gen__file__type__proto.py |   27 +
 ..._core_browser_db_v4__protocol__manager__util.cc |   17 +
 ..._browser_realtime_url__lookup__service__base.cc |   17 +
 ...mponents_safe__browsing_core_common_features.cc |   17 +
 ...gine__choice_search__engine__choice__service.cc |   17 +
 ...nents_search__engines_template__url__service.cc |   17 +
 ...onents_security__interstitials_content_utils.cc |   17 +
 ..._default__model_cross__device__user__segment.cc |   17 +
 ...paint__preview__compositor__collection__impl.cc |   35 +
 ...y_chromium_components_storage__monitor_BUILD.gn |   26 +
 ...torage__monitor_removable__device__constants.cc |   17 +
 ...storage__monitor_removable__device__constants.h |   17 +
 ..._user_core_browser_supervised__user__service.cc |   17 +
 ...onents_supervised__user_core_common_features.cc |   62 ++
 ...ponents_supervised__user_core_common_features.h |   17 +
 ...sync__device__info_local__device__info__util.cc |   35 +
 ...evice__info_local__device__info__util__linux.cc |   20 +
 ...y_chromium_components_system__cpu_cpu__probe.cc |   18 +
 ...ponents_update__client_update__query__params.cc |   19 +
 ..._formatter_spoof__checks_idn__spoof__checker.cc |   17 +
 ...nts_user__education_views_help__bubble__view.cc |   17 +
 ...nents_variations_service_variations__service.cc |   17 +
 ...um_components_viz_host_host__display__client.cc |   17 +
 ...ium_components_viz_host_host__display__client.h |   17 +
 ...isplay__embedder_skia__output__surface__impl.cc |   17 +
 ..._display__embedder_software__output__surface.cc |   26 +
 ...e_display__embedder_software__output__surface.h |   26 +
 ...omponents_viz_service_display_skia__renderer.cc |   17 +
 ...e__sinks_root__compositor__frame__sink__impl.cc |   26 +
 ...me__sinks_root__compositor__frame__sink__impl.h |   17 +
 ...atch-src_3rdparty_chromium_content_app_BUILD.gn |   21 +
 ..._3rdparty_chromium_content_app_content__main.cc |   26 +
 ...mium_content_app_content__main__runner__impl.cc |  144 +++
 ...-src_3rdparty_chromium_content_browser_BUILD.gn |   22 +
 ...hromium_content_browser_audio_audio__service.cc |   26 +
 ..._browser_browser__child__process__host__impl.cc |   25 +
 ...t_browser_browser__child__process__host__impl.h |   26 +
 ...ild__process__host__impl__receiver__bindings.cc |   17 +
 ...chromium_content_browser_browser__main__loop.cc |   43 +
 ...tent_browser_child__process__launcher__helper.h |   17 +
 ...wser_child__process__launcher__helper__linux.cc |  131 +++
 ...browser_child__thread__type__switcher__linux.cc |   26 +
 ..._compositor_viz__process__transport__factory.cc |   17 +
 ...wser_devtools_devtools__frontend__host__impl.cc |   44 +
 ...owser_devtools_devtools__frontend__host__impl.h |   17 +
 ...wser_devtools_protocol_system__info__handler.cc |   17 +
 ...s_file__system__access__local__path__watcher.cc |   17 +
 ...font__access_font__enumeration__data__source.cc |   35 +
 ...hromium_content_browser_gpu_compositor__util.cc |   26 +
 ...content_browser_gpu_gpu__data__manager__impl.cc |   17 +
 ..._content_browser_gpu_gpu__data__manager__impl.h |   17 +
 ...rowser_gpu_gpu__data__manager__impl__private.cc |   17 +
 ...browser_gpu_gpu__data__manager__impl__private.h |   26 +
 ..._gpu_gpu__memory__buffer__manager__singleton.cc |   26 +
 ...omium_content_browser_gpu_gpu__process__host.cc |   25 +
 ...wser_media_frameless__media__interface__proxy.h |   26 +
 ...r_media_media__keys__listener__manager__impl.cc |   17 +
 ...ent_browser_network__service__instance__impl.cc |   35 +
 ...i__plugin__process__host__receiver__bindings.cc |   26 +
 ...rowser_renderer__host_delegated__frame__host.cc |   17 +
 ...ia_service__video__capture__device__launcher.cc |   26 +
 ...renderer__host_pepper_pepper__file__io__host.cc |   26 +
 ...er_renderer__host_render__process__host__impl.h |   26 +
 ...wser_renderer__host_render__view__host__impl.cc |   17 +
 ...derer__host_render__widget__host__view__aura.cc |   53 +
 ...nderer__host_render__widget__host__view__aura.h |   17 +
 ...t_render__widget__host__view__event__handler.cc |   17 +
 ...hromium_content_browser_sandbox__host__linux.cc |   24 +
 ...scheduler_responsiveness_jank__monitor__impl.cc |   17 +
 ...duler_responsiveness_native__event__observer.cc |   26 +
 ...eduler_responsiveness_native__event__observer.h |   53 +
 ...omium_content_browser_utility__process__host.cc |   78 ++
 ...romium_content_browser_utility__process__host.h |   26 +
 ...r_utility__process__host__receiver__bindings.cc |   39 +
 ...m_content_browser_utility__sandbox__delegate.cc |   34 +
 ...chromium_content_browser_v8__snapshot__files.cc |   17 +
 ...wser_web__contents_web__contents__view__aura.cc |   35 +
 ...contents_web__contents__view__aura__unittest.cc |   17 +
 ...browser_webui_web__ui__main__frame__observer.cc |   44 +
 ..._browser_webui_web__ui__main__frame__observer.h |   26 +
 ...owser_zygote__host_zygote__host__impl__linux.cc |   87 ++
 ...rowser_zygote__host_zygote__host__impl__linux.h |   35 +
 ...ch-src_3rdparty_chromium_content_child_BUILD.gn |   22 +
 ...dparty_chromium_content_child_child__process.cc |   17 +
 ...h-src_3rdparty_chromium_content_common_BUILD.gn |   54 ++
 ...rc_3rdparty_chromium_content_common_features.cc |   26 +
 ...src_3rdparty_chromium_content_common_features.h |   26 +
 ...chromium_content_common_font__list__unittest.cc |   17 +
 ..._content_common_gpu__pre__sandbox__hook__bsd.cc |   77 ++
 ...m_content_common_gpu__pre__sandbox__hook__bsd.h |   29 +
 ...content_common_gpu__pre__sandbox__hook__linux.h |   22 +
 ...3rdparty_chromium_content_common_user__agent.cc |   43 +
 ...arty_chromium_content_gpu_gpu__child__thread.cc |   27 +
 ...-src_3rdparty_chromium_content_gpu_gpu__main.cc |   79 ++
 ...t_ppapi__plugin_ppapi__blink__platform__impl.cc |   35 +
 ...nt_ppapi__plugin_ppapi__blink__platform__impl.h |   17 +
 ...um_content_ppapi__plugin_ppapi__plugin__main.cc |   29 +
 ...tent_public_browser_content__browser__client.cc |   17 +
 ...blic_browser_zygote__host_zygote__host__linux.h |   22 +
 ...mium_content_public_common_content__features.cc |   47 +
 ...mium_content_public_common_content__switches.cc |   26 +
 ...omium_content_public_common_content__switches.h |   25 +
 ...omium_content_public_common_zygote_features.gni |   14 +
 ...romium_content_renderer_render__thread__impl.cc |   44 +
 ...ent_renderer_renderer__blink__platform__impl.cc |   51 +
 ...tent_renderer_renderer__blink__platform__impl.h |   17 +
 ...er_renderer__main__platform__delegate__linux.cc |   24 +
 ...ch-src_3rdparty_chromium_content_shell_BUILD.gn |   17 +
 ...mium_content_shell_app_shell__main__delegate.cc |   17 +
 ...hell_utility_shell__content__utility__client.cc |   26 +
 ...tch-src_3rdparty_chromium_content_test_BUILD.gn |   35 +
 ...c_3rdparty_chromium_content_utility_services.cc |   98 ++
 ...ch_speech__recognition__sandbox__hook__linux.cc |   43 +
 ...ech_speech__recognition__sandbox__hook__linux.h |   22 +
 ...link__platform__with__sandbox__support__impl.cc |   35 +
 ...blink__platform__with__sandbox__support__impl.h |   17 +
 ...party_chromium_content_utility_utility__main.cc |  128 +++
 ...romium_content_utility_utility__thread__impl.cc |   27 +
 ...h-src_3rdparty_chromium_content_zygote_BUILD.gn |   17 +
 ...dparty_chromium_content_zygote_zygote__linux.cc |   21 +
 ..._chromium_content_zygote_zygote__main__linux.cc |   64 ++
 ...chromium_device_bluetooth_bluetooth__adapter.cc |   17 +
 ...y_chromium_device_bluetooth_cast__bluetooth.gni |   15 +
 ...h-src_3rdparty_chromium_device_gamepad_BUILD.gn |   17 +
 ...ty_chromium_device_gamepad_gamepad__provider.cc |   17 +
 ...y_chromium_device_gamepad_hid__writer__linux.cc |   17 +
 ..._browser__context__keyed__service__factories.cc |   17 +
 ...sions_browser_api_management_management__api.cc |   17 +
 ...sions_browser_api_messaging_message__service.cc |   26 +
 ...ivate_networking__private__delegate__factory.cc |   26 +
 ...tensions_common_api___permission__features.json |   35 +
 ...rty_chromium_extensions_common_api_runtime.json |   17 +
 ..._3rdparty_chromium_extensions_common_command.cc |   17 +
 ..._chromium_extensions_common_features_feature.cc |   17 +
 ...ensions_renderer_bindings_api__binding__util.cc |   17 +
 ..._extensions_renderer_bindings_argument__spec.cc |   17 +
 ...m_extensions_shell_app_shell__main__delegate.cc |   26 +
 ...er_api_runtime_shell__runtime__api__delegate.cc |   17 +
 ...ns_shell_browser_shell__browser__main__parts.cc |   17 +
 ...shell_browser_shell__extensions__api__client.cc |   26 +
 ..._shell_browser_shell__extensions__api__client.h |   26 +
 ...m_google__apis_gcm_engine_heartbeat__manager.cc |   35 +
 ...__buffer_common_gpu__memory__buffer__support.cc |   22 +
 ...mand__buffer_service_dawn__context__provider.cc |   17 +
 ..._command__buffer_service_gles2__cmd__decoder.cc |   17 +
 ...image_angle__vulkan__image__backing__factory.cc |   17 +
 ...e_shared__image_external__vk__image__backing.cc |   26 +
 ..._image_external__vk__image__backing__factory.cc |   17 +
 ...service_shared__image_shared__image__factory.cc |   17 +
 ...service_shared__image_shared__image__manager.cc |   17 +
 ...ce_shared__image_wrapped__sk__image__backing.cc |   17 +
 ...ommand__buffer_service_webgpu__decoder__impl.cc |   26 +
 ...party_chromium_gpu_config_gpu__control__list.cc |   26 +
 ...rty_chromium_gpu_config_gpu__finch__features.cc |   27 +
 ...rty_chromium_gpu_config_gpu__info__collector.cc |   17 +
 ...dparty_chromium_gpu_config_gpu__test__config.cc |   17 +
 ..._gpu_ipc_common_gpu__memory__buffer__support.cc |   26 +
 ...m_gpu_ipc_common_gpu__memory__buffer__support.h |   17 +
 ..._3rdparty_chromium_gpu_ipc_service_gpu__init.cc |   80 ++
 ...gpu_ipc_service_gpu__memory__buffer__factory.cc |   26 +
 ...src_3rdparty_chromium_gpu_ipc_service_x__util.h |   17 +
 ...party_chromium_gpu_vulkan_generate__bindings.py |   17 +
 ...dparty_chromium_gpu_vulkan_semaphore__handle.cc |   26 +
 ...ty_chromium_gpu_vulkan_vulkan__device__queue.cc |   26 +
 ...rty_chromium_gpu_vulkan_vulkan__device__queue.h |   17 +
 ...romium_gpu_vulkan_vulkan__function__pointers.cc |   26 +
 ...hromium_gpu_vulkan_vulkan__function__pointers.h |   33 +
 ...rc_3rdparty_chromium_gpu_vulkan_vulkan__image.h |   26 +
 ...rc_3rdparty_chromium_gpu_vulkan_vulkan__util.cc |   17 +
 ...rowser_headless__browser__main__parts__posix.cc |   45 +
 ...b_browser_headless__content__browser__client.cc |   44 +
 ...ib_browser_headless__content__browser__client.h |   17 +
 ...ss_lib_browser_headless__web__contents__impl.cc |   17 +
 ...adless_lib_headless__content__main__delegate.cc |   17 +
 .../patch-src_3rdparty_chromium_ipc_ipc__channel.h |   17 +
 ...c_3rdparty_chromium_ipc_ipc__channel__common.cc |   17 +
 ...src_3rdparty_chromium_ipc_ipc__channel__mojo.cc |   17 +
 ...rc_3rdparty_chromium_ipc_ipc__message__utils.cc |   17 +
 ...src_3rdparty_chromium_ipc_ipc__message__utils.h |   17 +
 .../patch-src_3rdparty_chromium_media_BUILD.gn     |   21 +
 ...atch-src_3rdparty_chromium_media_audio_BUILD.gn |   45 +
 ...romium_media_audio_alsa_audio__manager__alsa.cc |   60 ++
 ...ty_chromium_media_audio_audio__input__device.cc |   17 +
 ...m_media_audio_audio__output__proxy__unittest.cc |   20 +
 ...party_chromium_media_audio_pulse_pulse__util.cc |   21 +
 ...mium_media_audio_sndio_audio__manager__sndio.cc |  222 +++++
 ...omium_media_audio_sndio_audio__manager__sndio.h |   75 ++
 ...arty_chromium_media_audio_sndio_sndio__input.cc |  209 ++++
 ...party_chromium_media_audio_sndio_sndio__input.h |  100 ++
 ...rty_chromium_media_audio_sndio_sndio__output.cc |  196 ++++
 ...arty_chromium_media_audio_sndio_sndio__output.h |   97 ++
 ..._3rdparty_chromium_media_base_audio__latency.cc |   17 +
 ..._chromium_media_base_libaom__thread__wrapper.cc |   29 +
 ..._chromium_media_base_libvpx__thread__wrapper.cc |   30 +
 ...3rdparty_chromium_media_base_media__switches.cc |  130 +++
 ..._3rdparty_chromium_media_base_media__switches.h |   68 ++
 ...um_media_base_user__input__monitor__unittest.cc |   35 +
 ...rc_3rdparty_chromium_media_base_video__frame.cc |   80 ++
 ...src_3rdparty_chromium_media_base_video__frame.h |   53 +
 ...ideo_create__video__capture__device__factory.cc |   26 +
 ..._video_fake__video__capture__device__factory.cc |   17 +
 ..._video_file__video__capture__device__factory.cc |   17 +
 ...m_media_capture_video_linux_fake__v4l2__impl.cc |   17 +
 ...um_media_capture_video_linux_fake__v4l2__impl.h |   31 +
 ..._capture_video_linux_v4l2__capture__delegate.cc |  183 ++++
 ...a_capture_video_linux_v4l2__capture__delegate.h |   66 ++
 ...dia_capture_video_linux_v4l2__capture__device.h |   17 +
 ...ture_video_linux_v4l2__capture__device__impl.cc |   17 +
 ...pture_video_linux_v4l2__capture__device__impl.h |   17 +
 ..._linux_video__capture__device__factory__v4l2.cc |   98 ++
 ...o_linux_video__capture__device__factory__v4l2.h |   17 +
 ...re_video_linux_video__capture__device__linux.cc |   17 +
 ...deo__capture__buffer__tracker__factory__impl.cc |   26 +
 ...capture_video_video__capture__device__client.cc |   17 +
 ...arty_chromium_media_cdm_cdm__paths__unittest.cc |   17 +
 ..._chromium_media_cdm_library__cdm_cdm__paths.gni |   17 +
 ...dparty_chromium_media_gpu_buffer__validation.cc |   52 +
 ...a_gpu_chromeos_gl__image__processor__backend.cc |   19 +
 ...u_chromeos_libyuv__image__processor__backend.cc |   35 +
 ...pu_chromeos_mailbox__video__frame__converter.cc |   17 +
 ...a_gpu_chromeos_platform__video__frame__utils.cc |   17 +
 ..._media_gpu_chromeos_video__decoder__pipeline.cc |   34 +
 ...gpu_gpu__video__encode__accelerator__factory.cc |   17 +
 ...dware__video__decoding__sandbox__hook__linux.cc |   50 +
 ...rdware__video__decoding__sandbox__hook__linux.h |   22 +
 ...dware__video__encoding__sandbox__hook__linux.cc |   32 +
 ...rdware__video__encoding__sandbox__hook__linux.h |   29 +
 ...romium_media_gpu_vaapi_vaapi__video__decoder.cc |   17 +
 ...arty_chromium_media_gpu_vaapi_vaapi__wrapper.cc |   17 +
 ...-src_3rdparty_chromium_media_media__options.gni |   28 +
 ...party_chromium_media_mojo_mojom_stable_BUILD.gn |   17 +
 ...stable__video__decoder__types__mojom__traits.cc |   26 +
 ..._stable__video__decoder__types__mojom__traits.h |   17 +
 ...media_mojo_mojom_video__frame__mojom__traits.cc |   17 +
 ...a_mojo_services_webrtc__video__perf__history.cc |   13 +
 ...romium_media_video_fake__gpu__memory__buffer.cc |   44 +
 ...ideo_gpu__memory__buffer__video__frame__pool.cc |   35 +
 ...ia_video_video__encode__accelerator__adapter.cc |   26 +
 ...eo_video__encode__accelerator__adapter__test.cc |   17 +
 ...party_chromium_media_webrtc_audio__processor.cc |   17 +
 ...h-src_3rdparty_chromium_media_webrtc_helpers.cc |   17 +
 ...rty_chromium_media_webrtc_helpers__unittests.cc |   35 +
 .../patch-src_3rdparty_chromium_mojo_core_BUILD.gn |   17 +
 ...atch-src_3rdparty_chromium_mojo_core_channel.cc |   20 +
 ...3rdparty_chromium_mojo_core_embedder_features.h |   17 +
 ...ojo_public_cpp_platform_socket__utils__posix.cc |   17 +
 ...y_chromium_mojo_public_tools_bindings_mojom.gni |   30 +
 ...party_chromium_native__client__sdk_src_BUILD.gn |   13 +
 .../patch-src_3rdparty_chromium_net_BUILD.gn       |  101 ++
 ...atch-src_3rdparty_chromium_net_base_features.cc |   17 +
 ...ium_net_base_mock__network__change__notifier.cc |   17 +
 ...mium_net_base_mock__network__change__notifier.h |   26 +
 ..._chromium_net_base_network__change__notifier.cc |   45 +
 ...y_chromium_net_base_network__change__notifier.h |   35 +
 ..._net_base_network__change__notifier__passive.cc |   17 +
 ..._chromium_net_base_network__interfaces__posix.h |   17 +
 ...arty_chromium_net_base_sockaddr__util__posix.cc |   18 +
 ...ium_net_base_sockaddr__util__posix__unittest.cc |   18 +
 ...3rdparty_chromium_net_cert_cert__verify__proc.h |   17 +
 ...net_disk__cache_simple_simple__file__tracker.cc |   26 +
 .../patch-src_3rdparty_chromium_net_dns_BUILD.gn   |   37 +
 ...-src_3rdparty_chromium_net_dns_address__info.cc |   22 +
 ...arty_chromium_net_dns_address__sorter__posix.cc |   16 +
 ...-src_3rdparty_chromium_net_dns_dns__reloader.cc |   25 +
 ...atch-src_3rdparty_chromium_net_dns_dns__util.cc |   17 +
 ...dparty_chromium_net_dns_host__resolver__proc.cc |   19 +
 ...h-src_3rdparty_chromium_net_dns_public_BUILD.gn |   17 +
 ...party_chromium_net_dns_public_resolv__reader.cc |   17 +
 ...dparty_chromium_net_dns_public_resolv__reader.h |   16 +
 ...y_chromium_net_dns_public_scoped__res__state.cc |   17 +
 ...ty_chromium_net_dns_public_scoped__res__state.h |   16 +
 ..._chromium_net_http_http__auth__gssapi__posix.cc |   20 +
 ...y_chromium_net_http_http__auth__gssapi__posix.h |   18 +
 ...mium_net_http_http__auth__handler__negotiate.cc |   17 +
 ...ty_chromium_net_http_http__auth__preferences.cc |   17 +
 ...rty_chromium_net_http_http__auth__preferences.h |   35 +
 ...rty_chromium_net_http_http__network__session.cc |   18 +
 ...net_proxy__resolution_proxy__config__service.cc |   41 +
 ...xy__resolution_proxy__config__service__linux.cc |   46 +
 ...c_3rdparty_chromium_net_socket_socket__posix.cc |   17 +
 ...y_chromium_net_socket_socks5__client__socket.cc |   18 +
 ...party_chromium_net_socket_tcp__socket__posix.cc |   26 +
 ...party_chromium_net_socket_udp__socket__posix.cc |  132 +++
 ...ty_chromium_net_socket_udp__socket__unittest.cc |   53 +
 ...party_chromium_net_third__party_quiche_BUILD.gn |   17 +
 ..._tools_cert__verify__tool_cert__verify__tool.cc |   35 +
 ...chromium_net_tools_net__watcher_net__watcher.cc |   35 +
 ...ffic__annotation_network__traffic__annotation.h |   26 +
 ...omium_net_url__request_url__request__context.cc |   17 +
 ...romium_net_url__request_url__request__context.h |   17 +
 ..._url__request_url__request__context__builder.cc |   17 +
 ..._3rdparty_chromium_pdf_pdfium_pdfium__engine.cc |   26 +
 ..._chromium_printing_backend_cups__ipp__helper.cc |   17 +
 ...nting_mojom_printing__context__mojom__traits.cc |   35 +
 ...inting_mojom_printing__context__mojom__traits.h |   17 +
 ...c_3rdparty_chromium_printing_print__settings.cc |   44 +
 ...rc_3rdparty_chromium_printing_print__settings.h |   53 +
 ...hromium_printing_print__settings__conversion.cc |   17 +
 ...y_chromium_printing_printing__context__linux.cc |   44 +
 ...rdparty_chromium_printing_printing__features.cc |   17 +
 ...3rdparty_chromium_printing_printing__features.h |   17 +
 ...sandbox_print__backend__sandbox__hook__linux.cc |   56 ++
 ..._sandbox_print__backend__sandbox__hook__linux.h |   22 +
 .../patch-src_3rdparty_chromium_sandbox_BUILD.gn   |   17 +
 ...atch-src_3rdparty_chromium_sandbox_features.gni |   17 +
 ...ch-src_3rdparty_chromium_sandbox_linux_BUILD.gn |   41 +
 ...sandbox_linux_services_init__process__reaper.cc |   21 +
 ...ium_sandbox_linux_services_libc__interceptor.cc |   27 +
 ...h-src_3rdparty_chromium_sandbox_policy_BUILD.gn |   56 ++
 ...rc_3rdparty_chromium_sandbox_policy_features.cc |   29 +
 ...src_3rdparty_chromium_sandbox_policy_features.h |   17 +
 ...mium_sandbox_policy_freebsd_sandbox__freebsd.cc |  220 +++++
 ...omium_sandbox_policy_freebsd_sandbox__freebsd.h |  285 ++++++
 ...rty_chromium_sandbox_policy_mojom_sandbox.mojom |   24 +
 ...romium_sandbox_policy_netbsd_sandbox__netbsd.cc |  220 +++++
 ...hromium_sandbox_policy_netbsd_sandbox__netbsd.h |  285 ++++++
 ...mium_sandbox_policy_openbsd_sandbox__openbsd.cc |  401 ++++++++
 ...omium_sandbox_policy_openbsd_sandbox__openbsd.h |  289 ++++++
 ...src_3rdparty_chromium_sandbox_policy_sandbox.cc |   28 +
 ...-src_3rdparty_chromium_sandbox_policy_sandbox.h |   32 +
 ...dparty_chromium_sandbox_policy_sandbox__type.cc |  121 +++
 ...rc_3rdparty_chromium_sandbox_policy_switches.cc |   32 +
 ...src_3rdparty_chromium_sandbox_policy_switches.h |   31 +
 ...m_services_audio_audio__sandbox__hook__linux.cc |   37 +
 ...um_services_audio_audio__sandbox__hook__linux.h |   22 +
 ...-src_3rdparty_chromium_services_device_BUILD.gn |   17 +
 ...ices_device_geolocation_location__arbitrator.cc |   13 +
 ..._3rdparty_chromium_services_device_hid_BUILD.gn |   43 +
 ...um_services_device_hid_hid__connection__fido.cc |  225 +++++
 ...ium_services_device_hid_hid__connection__fido.h |   69 ++
 ...services_device_hid_hid__connection__freebsd.cc |  249 +++++
 ..._services_device_hid_hid__connection__freebsd.h |   76 ++
 ...ty_chromium_services_device_hid_hid__service.cc |   46 +
 ...omium_services_device_hid_hid__service__fido.cc |  405 ++++++++
 ...romium_services_device_hid_hid__service__fido.h |   74 ++
 ...um_services_device_hid_hid__service__freebsd.cc |  404 ++++++++
 ...ium_services_device_hid_hid__service__freebsd.h |   58 ++
 ...ium_services_device_hid_hid__service__netbsd.cc |   36 +
 ...mium_services_device_hid_hid__service__netbsd.h |   42 +
 ...ce_public_cpp_generic__sensor_sensor__reading.h |   17 +
 ..._chromium_services_device_public_mojom_BUILD.gn |   17 +
 ...dparty_chromium_services_device_serial_BUILD.gn |   17 +
 ...ces_device_serial_serial__device__enumerator.cc |   26 +
 ...ces_device_serial_serial__io__handler__posix.cc |   17 +
 ...me__zone__monitor_time__zone__monitor__linux.cc |   20 +
 ..._3rdparty_chromium_services_device_usb_BUILD.gn |   40 +
 ...ty_chromium_services_device_usb_usb__service.cc |   45 +
 ...omium_services_device_usb_usb__service__fake.cc |   58 ++
 ...romium_services_device_usb_usb__service__fake.h |   57 ++
 ...src_3rdparty_chromium_services_network_BUILD.gn |   16 +
 ...y_chromium_services_network_network__context.cc |   26 +
 ...ty_chromium_services_network_network__context.h |   17 +
 ...rvices_network_network__sandbox__hook__linux.cc |   43 +
 ...ervices_network_network__sandbox__hook__linux.h |   20 +
 ...y_chromium_services_network_network__service.cc |   35 +
 ...ty_chromium_services_network_network__service.h |   35 +
 ...y_chromium_services_network_public_cpp_BUILD.gn |   26 +
 ...hromium_services_network_public_cpp_features.cc |   17 +
 ...chromium_services_network_public_mojom_BUILD.gn |   31 +
 ...ionary_shared__dictionary__writer__in__memory.h |   17 +
 ..._on__device__model_on__device__model__service.h |   28 +
 ...ervices_on__device__model_pre__sandbox__init.cc |   44 +
 ..._instrumentation_queued__request__dispatcher.cc |   71 ++
 ...tor_public_cpp_memory__instrumentation_BUILD.gn |   24 +
 ...ublic_cpp_memory__instrumentation_os__metrics.h |   26 +
 ...cpp_memory__instrumentation_os__metrics__bsd.cc |   75 ++
 ...rty_chromium_services_service__manager_BUILD.gn |   17 +
 ...manager_public_cpp_service__executable_BUILD.gn |   17 +
 ...p_stack__sampling_tracing__sampler__profiler.cc |   17 +
 ...ture_public_mojom_video__capture__service.mojom |   21 +
 ...video__capture_video__capture__service__impl.cc |   44 +
 ..._video__capture_video__capture__service__impl.h |   35 +
 ...ty_chromium_skia_ext_SkMemory__new__handler.cpp |   17 +
 ...h-src_3rdparty_chromium_skia_ext_font__utils.cc |   26 +
 ...c_3rdparty_chromium_skia_ext_platform__canvas.h |   17 +
 ...mium_third__party_abseil-cpp_absl_base_config.h |   27 +
 ...y_abseil-cpp_absl_base_internal_raw__logging.cc |   17 +
 ..._party_abseil-cpp_absl_base_internal_sysinfo.cc |   58 ++
 ...l-cpp_absl_debugging_internal_elf__mem__image.h |   18 +
 ...sl_time_internal_cctz_src_time__zone__format.cc |   18 +
 ...c_3rdparty_chromium_third__party_angle_BUILD.gn |   35 +
 ...romium_third__party_angle_src_common_platform.h |   30 +
 ...ird__party_angle_src_common_platform__helpers.h |   17 +
 ...third__party_angle_src_common_system__utils.cpp |   17 +
 ...party_angle_src_common_system__utils__linux.cpp |   45 +
 ...piler_translator_SymbolTable__ESSL__autogen.cpp |   15 +
 ...ngle_src_gpu__info__util_SystemInfo__internal.h |   22 +
 ...ngle_src_gpu__info__util_SystemInfo__libpci.cpp |   96 ++
 ...angle_src_gpu__info__util_SystemInfo__linux.cpp |   41 +
 ...y_angle_src_gpu__info__util_SystemInfo__x11.cpp |   67 ++
 ...ium_third__party_angle_src_libANGLE_Display.cpp |   62 ++
 ...third__party_angle_src_libANGLE_formatutils.cpp |   17 +
 ...e_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp |   21 +
 ...e_src_libANGLE_renderer_vulkan_DisplayVk__api.h |   17 +
 ...party_chromium_third__party_angle_util_BUILD.gn |   17 +
 ...erences_renderer__preferences__mojom__traits.cc |   17 +
 ...n_renderer__preferences_renderer__preferences.h |   17 +
 ...ferences_renderer__preferences__mojom__traits.h |   17 +
 ...m_third__party_blink_public_platform_platform.h |   17 +
 ...hird__party_blink_public_platform_web__vector.h |   17 +
 ...rer_bindings_scripts_bind__gen_style__format.py |   17 +
 ...renderer_build_scripts_run__with__pythonpath.py |   16 +
 ...blink_renderer_controller_blink__initializer.cc |   41 +
 ...rer_controller_memory__usage__monitor__posix.cc |   27 +
 ...erer_controller_memory__usage__monitor__posix.h |   53 +
 ..._css_properties_css__color__function__parser.cc |   22 +
 ...link_renderer_core_editing_editing__behavior.cc |   17 +
 ...erer_core_execution__context_navigator__base.cc |   17 +
 ...blink_renderer_core_exported_web__view__impl.cc |   26 +
 ...y_blink_renderer_core_frame_web__frame__test.cc |   26 +
 ...ore_html_canvas_canvas__async__blob__creator.cc |   17 +
 ...e_html_track_vtt_vtt__cue__layout__algorithm.cc |   22 +
 ...erer_core_inspector_inspector__memory__agent.cc |   17 +
 ...arty_blink_renderer_core_layout_layout__view.cc |   26 +
 ...party_blink_renderer_core_paint_paint__layer.cc |   17 +
 ..._renderer_core_scroll_scrollbar__theme__aura.cc |   26 +
 ...derer_core_streams_miscellaneous__operations.cc |   13 +
 ...ink_renderer_core_streams_queue__with__sizes.cc |   13 +
 ..._renderer_core_style_style__crossfade__image.cc |   13 +
 ...r_modules_media_audio_audio__device__factory.cc |   17 +
 ..._audio_audio__renderer__mixer__manager__test.cc |   17 +
 ...ty_blink_renderer_modules_ml_webnn_features.gni |   13 +
 ...er_modules_peerconnection_rtc__data__channel.cc |   16 +
 ...peerconnection_webrtc__audio__renderer__test.cc |   17 +
 ...odules_webaudio_audio__worklet__thread__test.cc |   17 +
 ...odules_webgl_webgl__rendering__context__base.cc |   17 +
 ...rty_blink_renderer_modules_webgpu_gpu__queue.cc |   17 +
 ...m_third__party_blink_renderer_platform_BUILD.gn |   17 +
 ...ty_blink_renderer_platform_fonts_font__cache.cc |   26 +
 ...rty_blink_renderer_platform_fonts_font__cache.h |   53 +
 ...nk_renderer_platform_fonts_font__description.cc |   26 +
 ..._blink_renderer_platform_fonts_font__metrics.cc |   35 +
 ...renderer_platform_fonts_font__platform__data.cc |   26 +
 ...er_platform_fonts_font__unique__name__lookup.cc |   26 +
 ...nderer_platform_fonts_skia_font__cache__skia.cc |   26 +
 ...rer_platform_graphics_begin__frame__provider.cc |   21 +
 ...party_blink_renderer_platform_graphics_color.cc |   72 ++
 ...er_platform_graphics_video__frame__submitter.cc |   17 +
 ...ion_partition__alloc__memory__dump__provider.cc |   34 +
 ..._peerconnection_rtc__video__encoder__factory.cc |   23 +
 ...derer_platform_runtime__enabled__features.json5 |   68 ++
 ...nk_renderer_platform_scheduler_common_thread.cc |   17 +
 ...g_blink__categorized__worker__pool__delegate.cc |   17 +
 ..._renderer_platform_wtf_container__annotations.h |   17 +
 ...arty_blink_renderer_platform_wtf_math__extras.h |   29 +
 ...arty_blink_renderer_platform_wtf_stack__util.cc |   82 ++
 ..._chromium_third__party_brotli_common_platform.h |   17 +
 ...party_chromium_third__party_cpuinfo_cpuinfo.gni |   17 +
 ...ashpad_crashpad_build_crashpad__buildconfig.gni |   17 +
 ..._third__party_crashpad_crashpad_client_BUILD.gn |   22 +
 ...hpad_crashpad_client_crashpad__client__posix.cc |   49 +
 ...ashpad_minidump_minidump__misc__info__writer.cc |   21 +
 ...ty_crashpad_crashpad_util_misc_address__types.h |   26 +
 ..._crashpad_crashpad_util_misc_capture__context.h |   28 +
 ...d__party_crashpad_crashpad_util_misc_metrics.cc |   17 +
 ...hird__party_crashpad_crashpad_util_misc_uuid.cc |   17 +
 ...crashpad_crashpad_util_posix_close__multiple.cc |   17 +
 ...rashpad_crashpad_util_posix_drop__privileges.cc |   17 +
 ...__party_crashpad_crashpad_util_posix_signals.cc |   39 +
 ...ashpad_util_posix_symbolic__constants__posix.cc |   26 +
 ..._3rdparty_chromium_third__party_crc32c_BUILD.gn |   17 +
 ..._party_dawn_include_dawn_native_VulkanBackend.h |   18 +
 ...um_third__party_dawn_src_dawn_common_Platform.h |   20 +
 ...party_dawn_src_dawn_native_vulkan_BackendVk.cpp |   17 +
 ..._3rdparty_chromium_third__party_ffmpeg_BUILD.gn |   16 +
 ...mium_third__party_ffmpeg_libavcodec_x86_cabac.h |   18 +
 ...ty_chromium_third__party_ffmpeg_libavutil_cpu.c |   20 +
 ...ty_chromium_third__party_ffmpeg_libavutil_mem.c |   18 +
 ...um_third__party_ffmpeg_libavutil_random__seed.c |   31 +
 ...um_third__party_ffmpeg_libavutil_x86_x86inc.asm |   29 +
 ...romium_third__party_fontconfig_include_config.h |   60 ++
 ...mium_third__party_fontconfig_src_src_fccompat.c |   19 +
 ...rd__party_ipcz_src_reference__drivers_random.cc |   55 ++
 ...hird__party_ipcz_src_standalone_base_logging.cc |   18 +
 ...ium_third__party_leveldatabase_env__chromium.cc |   18 +
 ...m_source_libaom_aom__ports_aarch64__cpudetect.c |   56 ++
 ...chromium_third__party_libc++_src_src_chrono.cpp |   17 +
 ...libc++_src_src_filesystem_filesystem__clock.cpp |   17 +
 ...ird__party_libc++abi_src_src_cxa__guard__impl.h |   28 +
 ..._chromium_third__party_libdrm_src_xf86drmMode.c |   29 +
 ...um_third__party_libsync_src_include_sync_sync.h |   18 +
 ...dparty_chromium_third__party_libsync_src_sync.c |   31 +
 ..._3rdparty_chromium_third__party_libusb_BUILD.gn |   58 ++
 ..._chromium_third__party_libusb_src_libusb_core.c |   17 +
 ...rd__party_libusb_src_libusb_os_threads__posix.c |   30 +
 ...x_source_libvpx_vpx__ports_aarch64__cpudetect.c |   34 +
 ...rty_chromium_third__party_lzma__sdk_C_CpuArch.c |   50 +
 ...ial__color__utilities_src_cpp_palettes_tones.cc |   17 +
 ...rc_3rdparty_chromium_third__party_nasm_BUILD.gn |   22 +
 ...hromium_third__party_nasm_config_config-linux.h |  108 +++
 ...rc_3rdparty_chromium_third__party_node_node.gni |   17 +
 ...src_3rdparty_chromium_third__party_node_node.py |   18 +
 ...rty_pdfium_core_fpdfapi_page_cpdf__psengine.cpp |   13 +
 ...ird__party_pdfium_core_fxge_cfx__fontmapper.cpp |   17 +
 ...arty_pdfium_core_fxge_linux_fx__linux__impl.cpp |   29 +
 ...third__party_pdfium_fxjs_cjs__publicmethods.cpp |   58 ++
 ..._third__party_pdfium_fxjs_fx__date__helpers.cpp |   28 +
 ...y_pdfium_fxjs_xfa_cfxjse__formcalc__context.cpp |   13 +
 ...rdparty_chromium_third__party_pdfium_pdfium.gni |   17 +
 ...omium_third__party_pdfium_third__party_BUILD.gn |   16 +
 ...fium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp |   47 +
 ..._perfetto_include_perfetto_base_build__config.h |   72 ++
 ..._perfetto_include_perfetto_base_thread__utils.h |   28 +
 ...rd__party_perfetto_include_perfetto_base_time.h |   40 +
 ..._perfetto_include_perfetto_ext_base_event__fd.h |   17 +
 ...fetto_include_perfetto_ext_base_thread__utils.h |   21 +
 ...erfetto_tracing_internal_track__event__legacy.h |   17 +
 ...erfetto_protos_perfetto_trace_ftrace_v4l2.proto |   62 ++
 ...ium_third__party_perfetto_src_base_event__fd.cc |   28 +
 ...hird__party_perfetto_src_base_periodic__task.cc |   26 +
 ...third__party_perfetto_src_base_string__utils.cc |   21 +
 ...d__party_perfetto_src_base_subprocess__posix.cc |   28 +
 ...party_perfetto_src_base_thread__task__runner.cc |   20 +
 ..._third__party_perfetto_src_base_unix__socket.cc |   46 +
 ...hromium_third__party_perfetto_src_base_utils.cc |   43 +
 ...erfetto_src_trace__processor_db_column_utils.cc |   29 +
 ...ce__processor_importers_ftrace_v4l2__tracker.cc |   62 ++
 ...etto_src_tracing_core_tracing__service__impl.cc |   14 +
 ..._third__party_perfetto_src_tracing_ipc_memfd.cc |   18 +
 ...__party_perfetto_src_tracing_platform__posix.cc |   25 +
 ...mium_third__party_perfetto_src_tracing_track.cc |   29 +
 ...ium_third__party_skia_src_base_SkContainers.cpp |   27 +
 ..._party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h |   17 +
 ...third__party_skia_src_ports_SkOSFile__posix.cpp |   17 +
 ...__party_speech-dispatcher_libspeechd__version.h |   38 +
 ...third__party_speech-dispatcher_speechd__types.h |  148 +++
 ..._3rdparty_chromium_third__party_sqlite_BUILD.gn |   17 +
 ...d__party_sqlite_src_amalgamation__dev_sqlite3.c |   18 +
 ..._third__party_sqlite_src_amalgamation_sqlite3.c |   47 +
 ..._third__party_swiftshader_src_Reactor_Debug.cpp |   18 +
 ...__party_swiftshader_src_System_Configurator.cpp |   18 +
 ...d__party_swiftshader_src_System_Linux_MemFd.cpp |   43 +
 ...tshader_src_Vulkan_VkSemaphoreExternalLinux.hpp |   26 +
 ...ium_third__party_swiftshader_src_WSI_libXCB.cpp |   26 +
 ...um_third__party_test__fonts_fontconfig_BUILD.gn |   21 +
 ...st__fonts_fontconfig_fontconfig__util__linux.cc |   33 +
 ...onts_fontconfig_generate__fontconfig__caches.cc |   26 +
 ...party_chromium_third__party_tflite_features.gni |   20 +
 ...kan__memory__allocator_include_vk__mem__alloc.h |   17 +
 ...3rdparty_chromium_third__party_wayland_BUILD.gn |   20 +
 ..._3rdparty_chromium_third__party_webrtc_BUILD.gn |   18 +
 ...rd__party_webrtc_modules_audio__device_BUILD.gn |   17 +
 ...s_desktop__capture_linux_wayland_egl__dmabuf.cc |   24 +
 ...__capture_linux_x11_x__server__pixel__buffer.cc |   21 +
 ...ium_third__party_webrtc_rtc__base_byte__order.h |   17 +
 ...um_third__party_webrtc_rtc__base_ip__address.cc |   18 +
 ...d__party_webrtc_rtc__base_net__test__helpers.cc |   16 +
 ...romium_third__party_webrtc_rtc__base_network.cc |   21 +
 ...ty_webrtc_rtc__base_physical__socket__server.cc |   71 ++
 ...rty_webrtc_rtc__base_physical__socket__server.h |   17 +
 ...rty_webrtc_rtc__base_platform__thread__types.cc |   43 +
 ...webrtc_rtc__base_third__party_sigslot_sigslot.h |   29 +
 ...m_third__party_webrtc_system__wrappers_BUILD.gn |   17 +
 ...chromium_third__party_widevine_cdm_widevine.gni |   18 +
 ...rc_3rdparty_chromium_third__party_zlib_BUILD.gn |   37 +
 ...arty_chromium_third__party_zlib_cpu__features.c |   55 ++
 ...dparty_chromium_tools_generate__stubs_rules.gni |   16 +
 ..._3rdparty_chromium_tools_grit_grit_node_base.py |   18 +
 ...son__schema__compiler_cpp__bundle__generator.py |   17 +
 ...ols_json__schema__compiler_feature__compiler.py |   18 +
 ...rc_3rdparty_chromium_tools_licenses_licenses.py |   17 +
 ...ls_memory_partition__allocator_inspect__utils.h |   17 +
 ...um_tools_perf_chrome__telemetry__build_BUILD.gn |   26 +
 ...romium_tools_protoc__wrapper_protoc__wrapper.py |   30 +
 ...y_chromium_tools_v8__context__snapshot_BUILD.gn |   43 +
 ...mium_tools_variations_fieldtrial__to__struct.py |   18 +
 ...ty_chromium_ui_aura_client_drag__drop__client.h |   17 +
 ...-src_3rdparty_chromium_ui_aura_screen__ozone.cc |   17 +
 ...h-src_3rdparty_chromium_ui_aura_screen__ozone.h |   26 +
 ...omium_ui_base_clipboard_clipboard__constants.cc |   17 +
 ...romium_ui_base_clipboard_clipboard__constants.h |   17 +
 ...ium_ui_base_clipboard_clipboard__non__backed.cc |   17 +
 ...arty_chromium_ui_base_cursor_cursor__factory.cc |   17 +
 ...party_chromium_ui_base_cursor_cursor__factory.h |   17 +
 ...agdrop_os__exchange__data__provider__factory.cc |   26 +
 ...op_os__exchange__data__provider__non__backed.cc |   17 +
 ...omium_ui_base_ime_dummy__text__input__client.cc |   17 +
 ...romium_ui_base_ime_dummy__text__input__client.h |   17 +
 ...romium_ui_base_ime_fake__text__input__client.cc |   17 +
 ...hromium_ui_base_ime_fake__text__input__client.h |   17 +
 ..._ui_base_ime_init_input__method__initializer.cc |   35 +
 ...linux_linux__input__method__context__factory.cc |   26 +
 ...arty_chromium_ui_base_ime_text__input__client.h |   17 +
 ...y_chromium_ui_base_resource_resource__bundle.cc |   17 +
 ...3rdparty_chromium_ui_base_ui__base__features.cc |   26 +
 ...3rdparty_chromium_ui_base_ui__base__switches.cc |   24 +
 ..._3rdparty_chromium_ui_base_ui__base__switches.h |   22 +
 ...rdparty_chromium_ui_base_webui_web__ui__util.cc |   26 +
 ...arty_chromium_ui_base_x_x11__cursor__factory.cc |   26 +
 ...party_chromium_ui_base_x_x11__cursor__factory.h |   26 +
 ...party_chromium_ui_base_x_x11__cursor__loader.cc |   47 +
 ...rty_chromium_ui_base_x_x11__display__manager.cc |   26 +
 ...rty_chromium_ui_base_x_x11__shm__image__pool.cc |   77 ++
 ...atch-src_3rdparty_chromium_ui_color_color__id.h |   17 +
 ...rty_chromium_ui_color_color__provider__utils.cc |   17 +
 ...-src_3rdparty_chromium_ui_color_system__theme.h |   17 +
 ...c_3rdparty_chromium_ui_compositor_compositor.cc |   17 +
 ...rc_3rdparty_chromium_ui_compositor_compositor.h |   17 +
 ...y_chromium_ui_compositor_compositor__observer.h |   17 +
 ...atch-src_3rdparty_chromium_ui_display_screen.cc |   17 +
 ...patch-src_3rdparty_chromium_ui_display_screen.h |   26 +
 ...vents_devices_x11_device__data__manager__x11.cc |   16 +
 .../patch-src_3rdparty_chromium_ui_events_event.cc |   35 +
 ..._3rdparty_chromium_ui_events_event__switches.cc |   17 +
 ...c_3rdparty_chromium_ui_events_event__switches.h |   17 +
 ...um_ui_events_keycodes_dom_keycode__converter.cc |   44 +
 ...ium_ui_events_keycodes_dom_keycode__converter.h |   17 +
 .../patch-src_3rdparty_chromium_ui_gfx_BUILD.gn    |   17 +
 ...ch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc |   17 +
 ...dparty_chromium_ui_gfx_font__fallback__linux.cc |   17 +
 ...3rdparty_chromium_ui_gfx_font__render__params.h |   26 +
 ..._chromium_ui_gfx_font__render__params__linux.cc |   26 +
 ...atch-src_3rdparty_chromium_ui_gfx_font__util.cc |   26 +
 ...3rdparty_chromium_ui_gfx_gpu__memory__buffer.cc |   17 +
 ..._3rdparty_chromium_ui_gfx_gpu__memory__buffer.h |   26 +
 ...c_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h |   32 +
 ..._3rdparty_chromium_ui_gfx_linux_gbm__wrapper.cc |   17 +
 ...um_ui_gfx_mojom_buffer__types__mojom__traits.cc |   26 +
 ...x_mojom_native__handle__types__mojom__traits.cc |   40 +
 ...fx_mojom_native__handle__types__mojom__traits.h |   42 +
 ...party_chromium_ui_gfx_native__pixmap__handle.cc |   68 ++
 ...dparty_chromium_ui_gfx_native__pixmap__handle.h |   44 +
 ...rdparty_chromium_ui_gfx_native__widget__types.h |   26 +
 ...rdparty_chromium_ui_gfx_platform__font__skia.cc |   26 +
 ...ty_chromium_ui_gfx_render__text__api__fuzzer.cc |   26 +
 ...rdparty_chromium_ui_gfx_render__text__fuzzer.cc |   26 +
 .../patch-src_3rdparty_chromium_ui_gfx_switches.cc |   17 +
 .../patch-src_3rdparty_chromium_ui_gfx_switches.h  |   17 +
 .../patch-src_3rdparty_chromium_ui_gfx_x_BUILD.gn  |   13 +
 ...rty_chromium_ui_gfx_x_generated__protos_dri3.cc |   17 +
 ...arty_chromium_ui_gfx_x_generated__protos_shm.cc |   17 +
 ...src_3rdparty_chromium_ui_gfx_x_xlib__support.cc |   27 +
 .../patch-src_3rdparty_chromium_ui_gl_BUILD.gn     |   32 +
 ...atch-src_3rdparty_chromium_ui_gl_gl__context.cc |   17 +
 .../patch-src_3rdparty_chromium_ui_gl_gl__fence.cc |   17 +
 ...c_3rdparty_chromium_ui_gl_gl__implementation.cc |   17 +
 ...tch-src_3rdparty_chromium_ui_gl_gl__switches.cc |   35 +
 ...hromium_ui_gl_sync__control__vsync__provider.cc |   44 +
 ...chromium_ui_gl_sync__control__vsync__provider.h |   26 +
 ...tch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc |   56 ++
 ..._chromium_ui_gtk_printing_print__dialog__gtk.cc |   17 +
 ...i_message__center_views_message__popup__view.cc |   17 +
 ...party_chromium_ui_native__theme_native__theme.h |   17 +
 ...hromium_ui_native__theme_native__theme__base.cc |   17 +
 ...ium_ui_native__theme_native__theme__features.cc |   26 +
 ..._3rdparty_chromium_ui_ozone_common_egl__util.cc |   20 +
 ...c_3rdparty_chromium_ui_ozone_common_features.cc |   17 +
 ...platform_headless_headless__surface__factory.cc |   26 +
 ..._platform_headless_ozone__platform__headless.cc |   17 +
 ...rm_headless_vulkan__implementation__headless.cc |   35 +
 ..._ozone_platform_wayland_common_wayland__util.cc |   17 +
 ...form_wayland_emulate_wayland__input__emulate.cc |   17 +
 ...tform_wayland_emulate_wayland__input__emulate.h |   17 +
 ..._wayland_gpu_vulkan__implementation__wayland.cc |   20 +
 ...tform_wayland_host_wayland__toplevel__window.cc |   17 +
 ...atform_wayland_host_wayland__toplevel__window.h |   17 +
 ..._ozone_platform_wayland_host_wayland__window.cc |   50 +
 ...i_ozone_platform_wayland_host_wayland__window.h |   44 +
 ...rm_wayland_host_xdg__toplevel__wrapper__impl.cc |   17 +
 ...m_wayland_host_zwp__text__input__wrapper__v1.cc |   27 +
 ...ne_platform_wayland_ozone__platform__wayland.cc |   51 +
 ...one_platform_x11_vulkan__implementation__x11.cc |   20 +
 ...ium_ui_ozone_platform_x11_x11__screen__ozone.cc |   26 +
 ...mium_ui_ozone_platform_x11_x11__screen__ozone.h |   17 +
 ...y_chromium_ui_ozone_platform_x11_x11__window.cc |   17 +
 ...i_ozone_test_mock__platform__window__delegate.h |   17 +
 ..._platform__window_platform__window__delegate.cc |   17 +
 ...i_platform__window_platform__window__delegate.h |   17 +
 ...rm__window_platform__window__init__properties.h |   26 +
 .../patch-src_3rdparty_chromium_ui_qt_BUILD.gn     |   17 +
 .../patch-src_3rdparty_chromium_ui_qt_qt.gni       |   17 +
 ...ings_translations_app__locale__settings__bn.xtb |   17 +
 ...ings_translations_app__locale__settings__ja.xtb |   17 +
 ...ings_translations_app__locale__settings__ko.xtb |   17 +
 ...ings_translations_app__locale__settings__ml.xtb |   17 +
 ...ings_translations_app__locale__settings__th.xtb |   17 +
 ...s_translations_app__locale__settings__zh-CN.xtb |   17 +
 ...s_translations_app__locale__settings__zh-TW.xtb |   17 +
 ..._chromium_ui_views_controls_prefix__selector.cc |   17 +
 ...y_chromium_ui_views_controls_prefix__selector.h |   17 +
 ...romium_ui_views_controls_textfield_textfield.cc |   70 ++
 ...hromium_ui_views_controls_textfield_textfield.h |   26 +
 ...party_chromium_ui_views_corewm_tooltip__aura.cc |   17 +
 ...y_chromium_ui_views_examples_widget__example.cc |   17 +
 ...party_chromium_ui_views_focus_focus__manager.cc |   26 +
 ...arty_chromium_ui_views_style_platform__style.cc |   35 +
 ..._ui__controls__factory__desktop__aura__ozone.cc |   17 +
 ...c_3rdparty_chromium_ui_views_views__delegate.cc |   17 +
 ...rc_3rdparty_chromium_ui_views_views__delegate.h |   17 +
 ...top__aura_desktop__drag__drop__client__ozone.cc |   17 +
 ...ktop__aura_desktop__drag__drop__client__ozone.h |   26 +
 ...__aura_desktop__window__tree__host__platform.cc |   35 +
 ...e__host__platform__impl__interactive__uitest.cc |   17 +
 ...3rdparty_chromium_ui_views_widget_root__view.cc |   17 +
 ...src_3rdparty_chromium_ui_views_widget_widget.cc |   26 +
 ...chromium_ui_views_window_custom__frame__view.cc |   17 +
 ...ty_chromium_ui_views_window_dialog__delegate.cc |   17 +
 ...y_chromium_ui_views_window_frame__background.cc |   17 +
 .../patch-src_3rdparty_chromium_v8_BUILD.gn        |  129 +++
 ...-src_3rdparty_chromium_v8_include_v8-internal.h |   17 +
 ...tch-src_3rdparty_chromium_v8_include_v8config.h |   61 ++
 .../patch-src_3rdparty_chromium_v8_src_api_api.cc  |   26 +
 ...h-src_3rdparty_chromium_v8_src_base_atomicops.h |   30 +
 ...3rdparty_chromium_v8_src_base_platform_memory.h |   17 +
 ...romium_v8_src_base_platform_platform-freebsd.cc |   38 +
 ...romium_v8_src_base_platform_platform-openbsd.cc |   53 +
 ...chromium_v8_src_base_platform_platform-posix.cc |  101 ++
 ...rc_3rdparty_chromium_v8_src_base_small-vector.h |   17 +
 ...tch-src_3rdparty_chromium_v8_src_base_strings.h |   18 +
 ...h-src_3rdparty_chromium_v8_src_base_sys-info.cc |   21 +
 ...um_v8_src_base_utils_random-number-generator.cc |   17 +
 ...rdparty_chromium_v8_src_diagnostics_perf-jit.cc |   17 +
 ...3rdparty_chromium_v8_src_diagnostics_perf-jit.h |   17 +
 ...c_3rdparty_chromium_v8_src_execution_isolate.cc |   33 +
 ...tch-src_3rdparty_chromium_v8_src_flags_flags.cc |   30 +
 ...src_3rdparty_chromium_v8_src_sandbox_sandbox.cc |   17 +
 ..._embedded_platform-embedded-file-writer-base.cc |   17 +
 ...t_embedded_platform-embedded-file-writer-base.h |   16 +
 ...bedded_platform-embedded-file-writer-generic.cc |   48 +
 ...ium_v8_src_trap-handler_handler-inside-posix.cc |   43 +
 ...mium_v8_src_trap-handler_handler-inside-posix.h |   17 +
 ...rty_chromium_v8_src_trap-handler_trap-handler.h |   17 +
 ...wasm_baseline_ia32_liftoff-assembler-ia32-inl.h |  134 +++
 ...ch-src_3rdparty_chromium_v8_tools_run-paxctl.py |   25 +
 .../patches/patch-src_3rdparty_gn_src_gn_c__tool.c |   12 +
 ...arty_gn_src_gn_ninja__binary__target__writer.cc |   16 +
 .../patches/patch-src_3rdparty_gn_src_gn_tool.h    |   27 +
 .../patches/patch-src_core_CMakeLists.txt          |   40 +
 .../patches/patch-src_core_api_configure.cmake     |   36 +
 .../patches/patch-src_core_api_qt__cmdline.cmake   |   13 +
 .../patches/patch-src_pdf_CMakeLists.txt           |   22 +
 .../patch-src_pdf_configure_BUILD.root.gn.in       |   27 +
 1022 files changed, 35780 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 9ab38e9d68..26f1c40395 100644
--- a/Makefile
+++ b/Makefile
@@ -5001,6 +5001,7 @@ SUBDIR+=	qt1
 SUBDIR+=	qt5-libqtlua
 SUBDIR+=	qt5-qjson
 SUBDIR+=	qt5-qtbase-git
+SUBDIR+=	qt6-qtwebengine
 SUBDIR+=	qtaccountsservice
 SUBDIR+=	qtfm
 SUBDIR+=	qtile
diff --git a/qt6-qtwebengine/DESCR b/qt6-qtwebengine/DESCR
new file mode 100644
index 0000000000..7d841d77dc
--- /dev/null
+++ b/qt6-qtwebengine/DESCR
@@ -0,0 +1 @@
+Chromium-based web engine for Qt6
diff --git a/qt6-qtwebengine/Makefile b/qt6-qtwebengine/Makefile
new file mode 100644
index 0000000000..5b1a10df41
--- /dev/null
+++ b/qt6-qtwebengine/Makefile
@@ -0,0 +1,147 @@
+# $NetBSD$
+
+DISTNAME=	qtwebengine-everywhere-src-${QTVERSION}
+PKGNAME=	qt6-qtwebengine-${QTVERSION}
+COMMENT=	Qt6 webengine module
+CATEGORIES=	www
+LICENSE=	gnu-lgpl-v3 OR gnu-gpl-v2 OR gnu-gpl-v3
+
+CMAKE_GENERATOR=		ninja
+
+.include "../../x11/qt6-qtbase/Makefile.common"
+
+TOOL_DEPENDS+=		ninja-build-[0-9]*:../../devel/ninja-build
+TOOL_DEPENDS+=		nodejs-[0-9]*:../../lang/nodejs
+TOOL_DEPENDS+=		${PYPKGPREFIX}-html5lib-[0-9]*:../../textproc/py-html5lib
+
+UNLIMIT_RESOURCES+=	datasize
+
+USE_CXX_FEATURES+=	c++20
+
+PKGCONFIG_OVERRIDE+=	lib/pkgconfig/Qt6Pdf.pc
+PKGCONFIG_OVERRIDE+=	lib/pkgconfig/Qt6PdfQuick.pc
+PKGCONFIG_OVERRIDE+=	lib/pkgconfig/Qt6PdfWidgets.pc
+PKGCONFIG_OVERRIDE+=	lib/pkgconfig/Qt6WebEngineCore.pc
+PKGCONFIG_OVERRIDE+=	lib/pkgconfig/Qt6WebEngineQuick.pc
+PKGCONFIG_OVERRIDE+=	lib/pkgconfig/Qt6WebEngineQuickDelegatesQml.pc
+PKGCONFIG_OVERRIDE+=	lib/pkgconfig/Qt6WebEngineWidgets.pc
+
+CMAKE_CONFIGURE_ARGS+=		-G Ninja
+CMAKE_CONFIGURE_ARGS+=		-DQT_FEATURE_webengine_system_ffmpeg=ON
+CMAKE_CONFIGURE_ARGS+=		-DQT_FEATURE_webengine_system_icu=ON
+CMAKE_CONFIGURE_ARGS+=		-DQT_FEATURE_webengine_system_libevent=ON
+## for the moment
+CMAKE_CONFIGURE_ARGS+=		-DQT_FEATURE_webengine_system_re2=OFF
+CMAKE_CONFIGURE_ARGS+=		-DQT_FEATURE_webengine_proprietary_codecs=ON
+CMAKE_CONFIGURE_ARGS+=		-DQT_FEATURE_webengine_kerberos=ON
+CMAKE_CONFIGURE_ARGS+=		-DQT_FEATURE_webengine_vulkan=OFF
+
+CONFIGURE_ENV+=			NINJAFLAGS=-j${_MAKE_JOBS_N:U1}
+
+CHECK_PORTABILITY_SKIP+=	src/3rdparty/chromium/third_party/dawn/third_party/dxc/utils/buildit/build_llvm
+CHECK_PORTABILITY_SKIP+=	src/3rdparty/chromium/third_party/protobuf/post_process_dist.sh
+CHECK_PORTABILITY_SKIP+=	src/3rdparty/chromium/third_party/nearby/src/embedded/build.sh
+CHECK_PORTABILITY_SKIP+=	src/3rdparty/chromium/third_party/xdg-utils/scripts/xdg-terminal
+CHECK_PORTABILITY_SKIP+=	src/3rdparty/chromium/third_party/xdg-utils/scripts/xdg-terminal.in
+CHECK_PORTABILITY_SKIP+=	src/3rdparty/chromium/v8/tools/profiling/run-llprof.sh
+
+SUBST_CLASSES+=		path
+SUBST_STAGE.path=	pre-configure
+SUBST_MESSAGE.path=	Fixing pathes
+SUBST_FILES.path+=	src/3rdparty/chromium/base/base_paths_posix.cc
+SUBST_FILES.path+=	src/3rdparty/chromium/base/process/process_handle_openbsd.cc
+SUBST_FILES.path+=	src/3rdparty/chromium/build/rust/rust_bindgen.gni
+SUBST_FILES.path+=	src/3rdparty/chromium/chrome/common/chrome_paths.cc
+SUBST_FILES.path+=	src/3rdparty/chromium/components/policy/core/common/policy_paths.cc
+SUBST_FILES.path+=	src/3rdparty/chromium/sandbox/policy/openbsd/sandbox_openbsd.cc
+SUBST_FILES.path+=	src/3rdparty/chromium/services/device/hid/hid_service_freebsd.cc
+SUBST_FILES.path+=	src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor_linux.cc
+SUBST_FILES.path+=	src/3rdparty/chromium/third_party/perfetto/src/base/utils.cc
+SUBST_FILES.path+=	src/3rdparty/chromium/ui/qt/qt.gni
+SUBST_FILES.path+=	src/3rdparty/chromium/v8/tools/run-paxctl.py
+SUBST_VARS.path+=	PREFIX PKG_SYSCONFBASE VARBASE QTDIR X11BASE PYTHONBIN
+
+# These libraries are used from the system and the build infrastructure
+# removes them from the bundled third_party directory and replaces them
+# with hooks to use them from the system.
+###GN_SYSTEM_LIBS=        dav1d
+###GN_SYSTEM_LIBS=		fontconfig
+###GN_SYSTEM_LIBS+=	icu
+###GN_SYSTEM_LIBS+=        libaom
+GN_SYSTEM_LIBS=	libevent
+####GN_SYSTEM_LIBS+=       libjpeg # libjpeg-turbo
+###GN_SYSTEM_LIBS+=        libpng
+###GN_SYSTEM_LIBS+=        libvpx
+#GN_SYSTEM_LIBS+=	libxml
+#GN_SYSTEM_LIBS+=	libxslt
+#GN_SYSTEM_LIBS+=	openh264
+GN_SYSTEM_LIBS+=	opus
+CHROMESRC=		${WRKSRC}/src/3rdparty/chromium
+
+#EXTRA_LDFLAGS=		-L${PREFIX}/lib \
+#			-L${X11BASE}/lib \
+#			${COMPILER_RPATH_FLAG}${PREFIX}/lib \
+#			${COMPILER_RPATH_FLAG}${PREFIX}/lib/nspr \
+#			${COMPILER_RPATH_FLAG}${PREFIX}/lib/nss \
+#			${COMPILER_RPATH_FLAG}${X11BASE}/lib
+
+PKGCONFIG_OVERRIDE+=	lib/pkgconfig/Qt6WebEngine.pc
+
+pre-configure:
+	cd ${CHROMESRC} && \
+		${SETENV} ${MAKE_ENV} ${PYTHONBIN} ./build/linux/unbundle/replace_gn_files.py \
+	--system-libraries ${GN_SYSTEM_LIBS} || ${FALSE}
+
+do-build:
+	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ninja -j ${_MAKE_JOBS_N:U1} ${BUILD_TARGET}
+
+do-install:
+	cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ninja -j ${_MAKE_JOBS_N:U1} ${INSTALL_TARGET}
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} != "Darwin"
+.include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+.include "../../audio/libopus/buildlink3.mk"
+.if ${OPSYS} == "Darwin" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD"
+.include "../../devel/libexecinfo/buildlink3.mk"
+.endif
+.include "../../devel/libepoll-shim/buildlink3.mk"
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../devel/nss/buildlink3.mk"
+# chromium insists on using its own protobuf
+# so don't include here as versions must match
+#.include "../../devel/protobuf/buildlink3.mk"
+.include "../../devel/re2/buildlink3.mk"
+.include "../../devel/snappy/buildlink3.mk"
+#.include "../../mk/jpeg.buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
+PYTHON_FOR_BUILD_ONLY=  tool
+.include "../../lang/python/batteries-included.mk"
+.include "../../lang/python/tool.mk"
+.include "../../multimedia/ffmpeg7/buildlink3.mk"
+.include "../../multimedia/libvpx/buildlink3.mk"
+#.include "../../multimedia/openh264/buildlink3.mk"
+.include "../../print/libcups/buildlink3.mk"
+.include "../../sysutils/pciutils/buildlink3.mk"
+.include "../../sysutils/pciutils/libname.mk"
+# Use -lpciutils instead of -lpci for pkgsrc.
+BUILDLINK_TRANSFORM+=   l:pci:${PCIUTILS_LIBNAME}
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../textproc/jsoncpp/buildlink3.mk"
+# needs libxml2 built with icu option, which is not default in pkgsrc
+#.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+.if ${OPSYS} != "Darwin"
+.include "../../x11/libXcomposite/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
+.include "../../x11/libxkbfile/buildlink3.mk"
+.endif
+.include "../../geography/qt6-qtpositioning/buildlink3.mk"
+.include "../../devel/qt6-qttools/buildlink3.mk"
+.include "../../lang/qt6-qtdeclarative/buildlink3.mk"
+.include "../../www/qt6-qtwebchannel/buildlink3.mk"
+.include "../../x11/qt6-qtbase/buildlink3.mk"
+.include "../../mk/atomic64.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/qt6-qtwebengine/PLIST b/qt6-qtwebengine/PLIST
new file mode 100644
index 0000000000..111ab71533
--- /dev/null
+++ b/qt6-qtwebengine/PLIST
@@ -0,0 +1,467 @@
+@comment $NetBSD$
+lib/pkgconfig/Qt6Pdf.pc
+lib/pkgconfig/Qt6PdfQuick.pc
+lib/pkgconfig/Qt6PdfWidgets.pc
+lib/pkgconfig/Qt6WebEngineCore.pc
+lib/pkgconfig/Qt6WebEngineQuick.pc
+lib/pkgconfig/Qt6WebEngineQuickDelegatesQml.pc
+lib/pkgconfig/Qt6WebEngineWidgets.pc
+qt6/include/QtPdf/${PKGVERSION}/QtPdf/private/qpdfdocument_p.h
+qt6/include/QtPdf/${PKGVERSION}/QtPdf/private/qpdffile_p.h
+qt6/include/QtPdf/${PKGVERSION}/QtPdf/private/qpdflink_p.h
+qt6/include/QtPdf/${PKGVERSION}/QtPdf/private/qpdflinkmodel_p.h
+qt6/include/QtPdf/${PKGVERSION}/QtPdf/private/qpdfsearchmodel_p.h
+qt6/include/QtPdf/${PKGVERSION}/QtPdf/private/qpdfselection_p.h
+qt6/include/QtPdf/${PKGVERSION}/QtPdf/private/qtpdf-config_p.h
+qt6/include/QtPdf/QPdfBookmarkModel
+qt6/include/QtPdf/QPdfDocument
+qt6/include/QtPdf/QPdfDocumentRenderOptions
+qt6/include/QtPdf/QPdfLink
+qt6/include/QtPdf/QPdfLinkModel
+qt6/include/QtPdf/QPdfPageNavigator
+qt6/include/QtPdf/QPdfPageRenderer
+qt6/include/QtPdf/QPdfSearchModel
+qt6/include/QtPdf/QPdfSelection
+qt6/include/QtPdf/QtPdf
+qt6/include/QtPdf/QtPdfDepends
+qt6/include/QtPdf/QtPdfVersion
+qt6/include/QtPdf/qpdfbookmarkmodel.h
+qt6/include/QtPdf/qpdfdocument.h
+qt6/include/QtPdf/qpdfdocumentrenderoptions.h
+qt6/include/QtPdf/qpdflink.h
+qt6/include/QtPdf/qpdflinkmodel.h
+qt6/include/QtPdf/qpdfpagenavigator.h
+qt6/include/QtPdf/qpdfpagerenderer.h
+qt6/include/QtPdf/qpdfsearchmodel.h
+qt6/include/QtPdf/qpdfselection.h
+qt6/include/QtPdf/qtpdf-config.h
+qt6/include/QtPdf/qtpdfexports.h
+qt6/include/QtPdf/qtpdfglobal.h
+qt6/include/QtPdf/qtpdfversion.h
+qt6/include/QtPdfQuick/${PKGVERSION}/QtPdfQuick/private/qquickpdfbookmarkmodel_p.h
+qt6/include/QtPdfQuick/${PKGVERSION}/QtPdfQuick/private/qquickpdfdocument_p.h
+qt6/include/QtPdfQuick/${PKGVERSION}/QtPdfQuick/private/qquickpdflinkmodel_p.h
+qt6/include/QtPdfQuick/${PKGVERSION}/QtPdfQuick/private/qquickpdfpageimage_p.h
+qt6/include/QtPdfQuick/${PKGVERSION}/QtPdfQuick/private/qquickpdfpagenavigator_p.h
+qt6/include/QtPdfQuick/${PKGVERSION}/QtPdfQuick/private/qquickpdfsearchmodel_p.h
+qt6/include/QtPdfQuick/${PKGVERSION}/QtPdfQuick/private/qquickpdfselection_p.h
+qt6/include/QtPdfQuick/${PKGVERSION}/QtPdfQuick/private/qtpdfquickglobal_p.h
+qt6/include/QtPdfQuick/QtPdfQuick
+qt6/include/QtPdfQuick/QtPdfQuickDepends
+qt6/include/QtPdfQuick/QtPdfQuickVersion
+qt6/include/QtPdfQuick/qtpdfquickversion.h
+qt6/include/QtPdfWidgets/${PKGVERSION}/QtPdfWidgets/private/qpdfpageselector_p.h
+qt6/include/QtPdfWidgets/${PKGVERSION}/QtPdfWidgets/private/qpdfview_p.h
+qt6/include/QtPdfWidgets/QPdfPageSelector
+qt6/include/QtPdfWidgets/QPdfView
+qt6/include/QtPdfWidgets/QtPdfWidgets
+qt6/include/QtPdfWidgets/QtPdfWidgetsDepends
+qt6/include/QtPdfWidgets/QtPdfWidgetsVersion
+qt6/include/QtPdfWidgets/qpdfpageselector.h
+qt6/include/QtPdfWidgets/qpdfview.h
+qt6/include/QtPdfWidgets/qtpdfwidgetsglobal.h
+qt6/include/QtPdfWidgets/qtpdfwidgetsversion.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qtwebenginecore-config_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qtwebenginecoreglobal_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginecontextmenurequest_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginecookiestore_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginedesktopmediarequest_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginedownloadrequest_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebengineglobalsettings_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginehistory_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginemessagepumpscheduler_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginenewwindowrequest_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginepage_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginepermission_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebengineprofile_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginescriptcollection_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebengineurlrequestinfo_p.h
+qt6/include/QtWebEngineCore/${PKGVERSION}/QtWebEngineCore/private/qwebenginewebauthuxrequest_p.h
+qt6/include/QtWebEngineCore/QWebEngineCertificateError
+qt6/include/QtWebEngineCore/QWebEngineClientCertificateSelection
+qt6/include/QtWebEngineCore/QWebEngineClientCertificateStore
+qt6/include/QtWebEngineCore/QWebEngineClientHints
+qt6/include/QtWebEngineCore/QWebEngineContextMenuRequest
+qt6/include/QtWebEngineCore/QWebEngineCookieStore
+qt6/include/QtWebEngineCore/QWebEngineDesktopMediaRequest
+qt6/include/QtWebEngineCore/QWebEngineDownloadRequest
+qt6/include/QtWebEngineCore/QWebEngineFileSystemAccessRequest
+qt6/include/QtWebEngineCore/QWebEngineFindTextResult
+qt6/include/QtWebEngineCore/QWebEngineFrame
+qt6/include/QtWebEngineCore/QWebEngineFullScreenRequest
+qt6/include/QtWebEngineCore/QWebEngineGlobalSettings
+qt6/include/QtWebEngineCore/QWebEngineHistory
+qt6/include/QtWebEngineCore/QWebEngineHistoryItem
+qt6/include/QtWebEngineCore/QWebEngineHistoryModel
+qt6/include/QtWebEngineCore/QWebEngineHttpRequest
+qt6/include/QtWebEngineCore/QWebEngineLoadingInfo
+qt6/include/QtWebEngineCore/QWebEngineNavigationRequest
+qt6/include/QtWebEngineCore/QWebEngineNewWindowRequest
+qt6/include/QtWebEngineCore/QWebEngineNotification
+qt6/include/QtWebEngineCore/QWebEnginePage
+qt6/include/QtWebEngineCore/QWebEnginePermission
+qt6/include/QtWebEngineCore/QWebEngineProfile
+qt6/include/QtWebEngineCore/QWebEngineQuotaRequest
+qt6/include/QtWebEngineCore/QWebEngineRegisterProtocolHandlerRequest
+qt6/include/QtWebEngineCore/QWebEngineScript
+qt6/include/QtWebEngineCore/QWebEngineScriptCollection
+qt6/include/QtWebEngineCore/QWebEngineSettings
+qt6/include/QtWebEngineCore/QWebEngineUrlRequestInfo
+qt6/include/QtWebEngineCore/QWebEngineUrlRequestInterceptor
+qt6/include/QtWebEngineCore/QWebEngineUrlRequestJob
+qt6/include/QtWebEngineCore/QWebEngineUrlScheme
+qt6/include/QtWebEngineCore/QWebEngineUrlSchemeHandler
+qt6/include/QtWebEngineCore/QWebEngineWebAuthPinRequest
+qt6/include/QtWebEngineCore/QWebEngineWebAuthUxRequest
+qt6/include/QtWebEngineCore/QtWebEngineCore
+qt6/include/QtWebEngineCore/QtWebEngineCoreDepends
+qt6/include/QtWebEngineCore/QtWebEngineCoreVersion
+qt6/include/QtWebEngineCore/qtwebenginecore-config.h
+qt6/include/QtWebEngineCore/qtwebenginecoreglobal.h
+qt6/include/QtWebEngineCore/qtwebenginecoreversion.h
+qt6/include/QtWebEngineCore/qwebenginecertificateerror.h
+qt6/include/QtWebEngineCore/qwebengineclientcertificateselection.h
+qt6/include/QtWebEngineCore/qwebengineclientcertificatestore.h
+qt6/include/QtWebEngineCore/qwebengineclienthints.h
+qt6/include/QtWebEngineCore/qwebenginecontextmenurequest.h
+qt6/include/QtWebEngineCore/qwebenginecookiestore.h
+qt6/include/QtWebEngineCore/qwebenginedesktopmediarequest.h
+qt6/include/QtWebEngineCore/qwebenginedownloadrequest.h
+qt6/include/QtWebEngineCore/qwebenginefilesystemaccessrequest.h
+qt6/include/QtWebEngineCore/qwebenginefindtextresult.h
+qt6/include/QtWebEngineCore/qwebengineframe.h
+qt6/include/QtWebEngineCore/qwebenginefullscreenrequest.h
+qt6/include/QtWebEngineCore/qwebengineglobalsettings.h
+qt6/include/QtWebEngineCore/qwebenginehistory.h
+qt6/include/QtWebEngineCore/qwebenginehttprequest.h
+qt6/include/QtWebEngineCore/qwebengineloadinginfo.h
+qt6/include/QtWebEngineCore/qwebenginenavigationrequest.h
+qt6/include/QtWebEngineCore/qwebenginenewwindowrequest.h
+qt6/include/QtWebEngineCore/qwebenginenotification.h
+qt6/include/QtWebEngineCore/qwebenginepage.h
+qt6/include/QtWebEngineCore/qwebenginepermission.h
+qt6/include/QtWebEngineCore/qwebengineprofile.h
+qt6/include/QtWebEngineCore/qwebenginequotarequest.h
+qt6/include/QtWebEngineCore/qwebengineregisterprotocolhandlerrequest.h
+qt6/include/QtWebEngineCore/qwebenginescript.h
+qt6/include/QtWebEngineCore/qwebenginescriptcollection.h
+qt6/include/QtWebEngineCore/qwebenginesettings.h
+qt6/include/QtWebEngineCore/qwebengineurlrequestinfo.h
+qt6/include/QtWebEngineCore/qwebengineurlrequestinterceptor.h
+qt6/include/QtWebEngineCore/qwebengineurlrequestjob.h
+qt6/include/QtWebEngineCore/qwebengineurlscheme.h
+qt6/include/QtWebEngineCore/qwebengineurlschemehandler.h
+qt6/include/QtWebEngineCore/qwebenginewebauthuxrequest.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebengine_accessible_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebengineaction_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebengineaction_p_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebengineclientcertificateselection_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginedialogrequests_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginefaviconprovider_p_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebengineforeigntypes_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginenewwindowrequest_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebengineprofile_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginescriptcollection_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginescriptcollection_p_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginesettings_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginesingleton_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginetouchhandle_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginetouchhandleprovider_p_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginetouchselectionmenurequest_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebenginetouchselectionmenurequest_p_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebengineview_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qquickwebengineview_p_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qtwebenginequick-config_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/qtwebenginequickglobal_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/render_widget_host_view_qt_delegate_quickwindow_p.h
+qt6/include/QtWebEngineQuick/${PKGVERSION}/QtWebEngineQuick/private/ui_delegates_manager_p.h
+qt6/include/QtWebEngineQuick/QQuickWebEngineDownloadRequest
+qt6/include/QtWebEngineQuick/QQuickWebEngineProfile
+qt6/include/QtWebEngineQuick/QtWebEngineQuick
+qt6/include/QtWebEngineQuick/QtWebEngineQuickDepends
+qt6/include/QtWebEngineQuick/QtWebEngineQuickVersion
+qt6/include/QtWebEngineQuick/qquickwebenginedownloadrequest.h
+qt6/include/QtWebEngineQuick/qquickwebengineprofile.h
+qt6/include/QtWebEngineQuick/qtwebenginequick-config.h
+qt6/include/QtWebEngineQuick/qtwebenginequickglobal.h
+qt6/include/QtWebEngineQuick/qtwebenginequickversion.h
+qt6/include/QtWebEngineWidgets/${PKGVERSION}/QtWebEngineWidgets/private/autofillpopupwidget_p.h
+qt6/include/QtWebEngineWidgets/${PKGVERSION}/QtWebEngineWidgets/private/qwebengine_accessible_p.h
+qt6/include/QtWebEngineWidgets/${PKGVERSION}/QtWebEngineWidgets/private/qwebenginenotificationpresenter_p.h
+qt6/include/QtWebEngineWidgets/${PKGVERSION}/QtWebEngineWidgets/private/qwebengineview_p.h
+qt6/include/QtWebEngineWidgets/${PKGVERSION}/QtWebEngineWidgets/private/touchhandlewidget_p.h
+qt6/include/QtWebEngineWidgets/${PKGVERSION}/QtWebEngineWidgets/private/touchselectionmenuwidget_p.h
+qt6/include/QtWebEngineWidgets/QWebEngineView
+qt6/include/QtWebEngineWidgets/QtWebEngineWidgets
+qt6/include/QtWebEngineWidgets/QtWebEngineWidgetsDepends
+qt6/include/QtWebEngineWidgets/QtWebEngineWidgetsVersion
+qt6/include/QtWebEngineWidgets/qtwebenginewidgetsglobal.h
+qt6/include/QtWebEngineWidgets/qtwebenginewidgetsversion.h
+qt6/include/QtWebEngineWidgets/qwebengineview.h
+qt6/lib/cmake/Qt6/FindGPerf.cmake
+qt6/lib/cmake/Qt6/FindGn.cmake
+qt6/lib/cmake/Qt6/FindNinja.cmake
+qt6/lib/cmake/Qt6/FindNodejs.cmake
+qt6/lib/cmake/Qt6/FindPkgConfigHost.cmake
+qt6/lib/cmake/Qt6/FindSnappy.cmake
+qt6/lib/cmake/Qt6BuildInternals/StandaloneTests/QtWebEngineTestsConfig.cmake
+qt6/lib/cmake/Qt6Designer/Qt6QWebEngineViewPluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Designer/Qt6QWebEngineViewPluginConfig.cmake
+qt6/lib/cmake/Qt6Designer/Qt6QWebEngineViewPluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Designer/Qt6QWebEngineViewPluginConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6Designer/Qt6QWebEngineViewPluginTargets-release.cmake
+qt6/lib/cmake/Qt6Designer/Qt6QWebEngineViewPluginTargets.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QPdfPluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QPdfPluginConfig.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QPdfPluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QPdfPluginConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QPdfPluginTargets-release.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QPdfPluginTargets.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfConfig.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfConfigVersion.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfDependencies.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfTargets-release.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfTargets.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfVersionlessAliasTargets.cmake
+qt6/lib/cmake/Qt6Pdf/Qt6PdfVersionlessTargets.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickConfig.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickConfigVersion.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickDependencies.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickTargets-release.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickTargets.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickVersionlessAliasTargets.cmake
+qt6/lib/cmake/Qt6PdfQuick/Qt6PdfQuickVersionlessTargets.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsConfig.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsConfigVersion.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsDependencies.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsTargets-release.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsTargets.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsVersionlessAliasTargets.cmake
+qt6/lib/cmake/Qt6PdfWidgets/Qt6PdfWidgetsVersionlessTargets.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6PdfQuickpluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6PdfQuickpluginConfig.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6PdfQuickpluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6PdfQuickpluginConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6PdfQuickpluginTargets-release.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6PdfQuickpluginTargets.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickdelegatespluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickdelegatespluginConfig.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickdelegatespluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickdelegatespluginConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickdelegatespluginTargets-release.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickdelegatespluginTargets.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickpluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickpluginConfig.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickpluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickpluginConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickpluginTargets-release.cmake
+qt6/lib/cmake/Qt6Qml/QmlPlugins/Qt6qtwebenginequickpluginTargets.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfigVersion.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreDependencies.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreDeploySupport.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreMacros.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreTargets-release.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreTargets.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreVersionlessAliasTargets.cmake
+qt6/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreVersionlessTargets.cmake
+qt6/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsConfig.cmake
+qt6/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsConfigVersion.cmake
+qt6/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsDependencies.cmake
+qt6/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsTargets-release.cmake
+qt6/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsTargets.cmake
+qt6/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsVersionlessTargets.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickConfig.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickConfigVersion.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickDependencies.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickTargets-release.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickTargets.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickVersionlessAliasTargets.cmake
+qt6/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickVersionlessTargets.cmake
+qt6/lib/cmake/Qt6WebEngineQuickDelegatesQml/Qt6WebEngineQuickDelegatesQmlAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6WebEngineQuickDelegatesQml/Qt6WebEngineQuickDelegatesQmlConfig.cmake
+qt6/lib/cmake/Qt6WebEngineQuickDelegatesQml/Qt6WebEngineQuickDelegatesQmlConfigVersion.cmake
+qt6/lib/cmake/Qt6WebEngineQuickDelegatesQml/Qt6WebEngineQuickDelegatesQmlConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6WebEngineQuickDelegatesQml/Qt6WebEngineQuickDelegatesQmlTargets-release.cmake
+qt6/lib/cmake/Qt6WebEngineQuickDelegatesQml/Qt6WebEngineQuickDelegatesQmlTargets.cmake
+qt6/lib/cmake/Qt6WebEngineQuickDelegatesQml/Qt6WebEngineQuickDelegatesQmlVersionlessAliasTargets.cmake
+qt6/lib/cmake/Qt6WebEngineQuickDelegatesQml/Qt6WebEngineQuickDelegatesQmlVersionlessTargets.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfigVersion.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfigVersionImpl.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsTargets-release.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsTargets.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsVersionlessAliasTargets.cmake
+qt6/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsVersionlessTargets.cmake
+qt6/lib/libQt6Pdf.prl
+qt6/lib/libQt6Pdf.so
+qt6/lib/libQt6Pdf.so.6
+qt6/lib/libQt6Pdf.so.${PKGVERSION}
+qt6/lib/libQt6PdfQuick.prl
+qt6/lib/libQt6PdfQuick.so
+qt6/lib/libQt6PdfQuick.so.6
+qt6/lib/libQt6PdfQuick.so.${PKGVERSION}
+qt6/lib/libQt6PdfWidgets.prl
+qt6/lib/libQt6PdfWidgets.so
+qt6/lib/libQt6PdfWidgets.so.6
+qt6/lib/libQt6PdfWidgets.so.${PKGVERSION}
+qt6/lib/libQt6WebEngineCore.prl
+qt6/lib/libQt6WebEngineCore.so
+qt6/lib/libQt6WebEngineCore.so.6
+qt6/lib/libQt6WebEngineCore.so.${PKGVERSION}
+qt6/lib/libQt6WebEngineQuick.prl
+qt6/lib/libQt6WebEngineQuick.so
+qt6/lib/libQt6WebEngineQuick.so.6
+qt6/lib/libQt6WebEngineQuick.so.${PKGVERSION}
+qt6/lib/libQt6WebEngineQuickDelegatesQml.prl
+qt6/lib/libQt6WebEngineQuickDelegatesQml.so
+qt6/lib/libQt6WebEngineQuickDelegatesQml.so.6
+qt6/lib/libQt6WebEngineQuickDelegatesQml.so.${PKGVERSION}
+qt6/lib/libQt6WebEngineWidgets.prl
+qt6/lib/libQt6WebEngineWidgets.so
+qt6/lib/libQt6WebEngineWidgets.so.6
+qt6/lib/libQt6WebEngineWidgets.so.${PKGVERSION}
+qt6/lib/pkgconfig/Qt6Pdf.pc
+qt6/lib/pkgconfig/Qt6PdfQuick.pc
+qt6/lib/pkgconfig/Qt6PdfWidgets.pc
+qt6/lib/pkgconfig/Qt6WebEngineCore.pc
+qt6/lib/pkgconfig/Qt6WebEngineQuick.pc
+qt6/lib/pkgconfig/Qt6WebEngineQuickDelegatesQml.pc
+qt6/lib/pkgconfig/Qt6WebEngineWidgets.pc
+qt6/libexec/QtWebEngineProcess
+qt6/libexec/qwebengine_convert_dict
+qt6/libexec/webenginedriver
+qt6/metatypes/qt6pdf_release_metatypes.json
+qt6/metatypes/qt6pdfquick_release_metatypes.json
+qt6/metatypes/qt6pdfwidgets_release_metatypes.json
+qt6/metatypes/qt6webenginecore_release_metatypes.json
+qt6/metatypes/qt6webenginequick_release_metatypes.json
+qt6/metatypes/qt6webenginequickdelegatesqml_release_metatypes.json
+qt6/metatypes/qt6webenginewidgets_release_metatypes.json
+qt6/mkspecs/modules/qt_lib_pdf.pri
+qt6/mkspecs/modules/qt_lib_pdf_private.pri
+qt6/mkspecs/modules/qt_lib_pdfquick.pri
+qt6/mkspecs/modules/qt_lib_pdfquick_private.pri
+qt6/mkspecs/modules/qt_lib_pdfwidgets.pri
+qt6/mkspecs/modules/qt_lib_pdfwidgets_private.pri
+qt6/mkspecs/modules/qt_lib_webenginecore.pri
+qt6/mkspecs/modules/qt_lib_webenginecore_private.pri
+qt6/mkspecs/modules/qt_lib_webenginequick.pri
+qt6/mkspecs/modules/qt_lib_webenginequick_private.pri
+qt6/mkspecs/modules/qt_lib_webenginequickdelegatesqml.pri
+qt6/mkspecs/modules/qt_lib_webenginequickdelegatesqml_private.pri
+qt6/mkspecs/modules/qt_lib_webenginewidgets.pri
+qt6/mkspecs/modules/qt_lib_webenginewidgets_private.pri
+qt6/modules/Pdf.json
+qt6/modules/PdfQuick.json
+qt6/modules/PdfWidgets.json
+qt6/modules/WebEngineCore.json
+qt6/modules/WebEngineQuick.json
+qt6/modules/WebEngineQuickDelegatesQml.json
+qt6/modules/WebEngineWidgets.json
+qt6/plugins/designer/libqwebengineview.so
+qt6/plugins/imageformats/libqpdf.so
+qt6/qml/QtQuick/Pdf/+Material/PdfStyle.qml
+qt6/qml/QtQuick/Pdf/+Universal/PdfStyle.qml
+qt6/qml/QtQuick/Pdf/PdfLinkDelegate.qml
+qt6/qml/QtQuick/Pdf/PdfMultiPageView.qml
+qt6/qml/QtQuick/Pdf/PdfPageView.qml
+qt6/qml/QtQuick/Pdf/PdfScrollablePageView.qml
+qt6/qml/QtQuick/Pdf/PdfStyle.qml
+qt6/qml/QtQuick/Pdf/libpdfquickplugin.so
+qt6/qml/QtQuick/Pdf/plugins.qmltypes
+qt6/qml/QtQuick/Pdf/qmldir
+qt6/qml/QtWebEngine/ControlsDelegates/AlertDialog.qml
+qt6/qml/QtWebEngine/ControlsDelegates/AuthenticationDialog.qml
+qt6/qml/QtWebEngine/ControlsDelegates/AutofillPopup.qml
+qt6/qml/QtWebEngine/ControlsDelegates/ColorDialog.qml
+qt6/qml/QtWebEngine/ControlsDelegates/ConfirmDialog.qml
+qt6/qml/QtWebEngine/ControlsDelegates/DirectoryPicker.qml
+qt6/qml/QtWebEngine/ControlsDelegates/FilePicker.qml
+qt6/qml/QtWebEngine/ControlsDelegates/Menu.qml
+qt6/qml/QtWebEngine/ControlsDelegates/MenuItem.qml
+qt6/qml/QtWebEngine/ControlsDelegates/MenuSeparator.qml
+qt6/qml/QtWebEngine/ControlsDelegates/PromptDialog.qml
+qt6/qml/QtWebEngine/ControlsDelegates/ToolTip.qml
+qt6/qml/QtWebEngine/ControlsDelegates/TouchHandle.qml
+qt6/qml/QtWebEngine/ControlsDelegates/TouchSelectionMenu.qml
+qt6/qml/QtWebEngine/ControlsDelegates/WebEngineQuickDelegatesQml.qmltypes
+qt6/qml/QtWebEngine/ControlsDelegates/libqtwebenginequickdelegatesplugin.so
+qt6/qml/QtWebEngine/ControlsDelegates/qmldir
+qt6/qml/QtWebEngine/libqtwebenginequickplugin.so
+qt6/qml/QtWebEngine/plugins.qmltypes
+qt6/qml/QtWebEngine/qmldir
+qt6/resources/qtwebengine_devtools_resources.pak
+qt6/resources/qtwebengine_resources.pak
+qt6/resources/qtwebengine_resources_100p.pak
+qt6/resources/qtwebengine_resources_200p.pak
+qt6/resources/v8_context_snapshot.bin
+qt6/sbom/qtpdf-${PKGVERSION}.spdx
+qt6/sbom/qtwebengine-${PKGVERSION}.spdx
+qt6/translations/qtwebengine_locales/am.pak
+qt6/translations/qtwebengine_locales/ar.pak
+qt6/translations/qtwebengine_locales/bg.pak
+qt6/translations/qtwebengine_locales/bn.pak
+qt6/translations/qtwebengine_locales/ca.pak
+qt6/translations/qtwebengine_locales/cs.pak
+qt6/translations/qtwebengine_locales/da.pak
+qt6/translations/qtwebengine_locales/de.pak
+qt6/translations/qtwebengine_locales/el.pak
+qt6/translations/qtwebengine_locales/en-GB.pak
+qt6/translations/qtwebengine_locales/en-US.pak
+qt6/translations/qtwebengine_locales/es-419.pak
+qt6/translations/qtwebengine_locales/es.pak
+qt6/translations/qtwebengine_locales/et.pak
+qt6/translations/qtwebengine_locales/fa.pak
+qt6/translations/qtwebengine_locales/fi.pak
+qt6/translations/qtwebengine_locales/fil.pak
+qt6/translations/qtwebengine_locales/fr.pak
+qt6/translations/qtwebengine_locales/gu.pak
+qt6/translations/qtwebengine_locales/he.pak
+qt6/translations/qtwebengine_locales/hi.pak
+qt6/translations/qtwebengine_locales/hr.pak
+qt6/translations/qtwebengine_locales/hu.pak
+qt6/translations/qtwebengine_locales/id.pak
+qt6/translations/qtwebengine_locales/it.pak
+qt6/translations/qtwebengine_locales/ja.pak
+qt6/translations/qtwebengine_locales/kn.pak
+qt6/translations/qtwebengine_locales/ko.pak
+qt6/translations/qtwebengine_locales/lt.pak
+qt6/translations/qtwebengine_locales/lv.pak
+qt6/translations/qtwebengine_locales/ml.pak
+qt6/translations/qtwebengine_locales/mr.pak
+qt6/translations/qtwebengine_locales/ms.pak
+qt6/translations/qtwebengine_locales/nb.pak
+qt6/translations/qtwebengine_locales/nl.pak
+qt6/translations/qtwebengine_locales/pl.pak
+qt6/translations/qtwebengine_locales/pt-BR.pak
+qt6/translations/qtwebengine_locales/pt-PT.pak
+qt6/translations/qtwebengine_locales/ro.pak
+qt6/translations/qtwebengine_locales/ru.pak
+qt6/translations/qtwebengine_locales/sk.pak
+qt6/translations/qtwebengine_locales/sl.pak
+qt6/translations/qtwebengine_locales/sr.pak
+qt6/translations/qtwebengine_locales/sv.pak
+qt6/translations/qtwebengine_locales/sw.pak
+qt6/translations/qtwebengine_locales/ta.pak
+qt6/translations/qtwebengine_locales/te.pak
+qt6/translations/qtwebengine_locales/th.pak
+qt6/translations/qtwebengine_locales/tr.pak
+qt6/translations/qtwebengine_locales/uk.pak
+qt6/translations/qtwebengine_locales/vi.pak
+qt6/translations/qtwebengine_locales/zh-CN.pak
+qt6/translations/qtwebengine_locales/zh-TW.pak
diff --git a/qt6-qtwebengine/TODO b/qt6-qtwebengine/TODO
new file mode 100644
index 0000000000..145b4e156f
--- /dev/null
+++ b/qt6-qtwebengine/TODO
@@ -0,0 +1,3 @@
+fixup system re2
+find why std::isnan required
+check other system library use
diff --git a/qt6-qtwebengine/distinfo b/qt6-qtwebengine/distinfo
new file mode 100644
index 0000000000..875500dcf7
--- /dev/null
+++ b/qt6-qtwebengine/distinfo
@@ -0,0 +1,1021 @@
+$NetBSD$
+
+BLAKE2s (qtwebengine-everywhere-src-6.8.2.tar.xz) = f785d92657498d6a0c5f55c966f8addecfdcc314f4a8b903e4714e4da743579d
+SHA512 (qtwebengine-everywhere-src-6.8.2.tar.xz) = 27590ec53845fa36f48a5a0506d505995850027d85bf33fe0413733cbde5c2744e8ea49f445c91d84b8d43454b9f12c1cf7005d614bbcae1a29d432fdacdc0e4
+Size (qtwebengine-everywhere-src-6.8.2.tar.xz) = 566518084 bytes
+SHA1 (patch-cmake_Functions.cmake) = 1c82b1a1c9419a9ba8cc60886928e113160bcad6
+SHA1 (patch-configure.cmake) = 8319fa20deb916fda0ccc63afd45fb2d798df23d
+SHA1 (patch-src_3rdparty_chromium_BUILD.gn) = a30601c51cc74ba0b1d6892396364d176a3d68b4
+SHA1 (patch-src_3rdparty_chromium_base_BUILD.gn) = 1c82890df98b3e76771ff0a4d1530a39bb86b938
+SHA1 (patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h) = 62dd16d4a24bba8ce37f3f190f49a75fb0ade6ee
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni) = 7239cfcde9c1e91ba84dba1535658f6980e3b3b3
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_BUILD.gn) = 1cbdc7f722442ab943cca94e25d45549f696b53e
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h) = e3889e0ef74ff8559d9f981be61deef532c0a098
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator.h) = fcea50bc229d47c2446e52b1927a37de105ee86b
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h) = 7a467d15fbd126938b74f2ae1bbf191d7c7c2db2
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h) = cbffb1940b291f966d538c9a6008194d770d1d84
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc) = 8564bbc7ff9e9ff521c317406d50cb49f37be855
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc) = a860fe3f31508962606cb6759be269ca4aa16414
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h) = 46df0aacbe5cd8d62c568404cf03410bdb0b2e37
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h) = 1416e565262c94b29c57c647fa2cd10a5f34fcc9
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc) = 6c1950dc3798480435ca593d47fb7266318fccca
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h) = d0116447916dd3c343d557a7ea74a3bfdfa9f0b4
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h) = c6b98f0b31ce53698eb5de51c53a3c17b0dea284
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h) = 968a494d44b7c2717355589b296dd46723ce23bc
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__root.cc) = 7689d867298ea27a595b1e6377ed0f6eefe1a1f7
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc) = b7c53bba2b13dc740a53ebcb57bc18f77c7ddb16
+SHA1 (patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc) = f6160c683456b1196b91a8f1bba3996c63aeb0f0
+SHA1 (patch-src_3rdparty_chromium_base_atomicops.h) = 38fcb75a7219fcc2e229fbfd55fe07217a9129f6
+SHA1 (patch-src_3rdparty_chromium_base_base__paths__posix.cc) = 91098d26e467c64faea8b59ab2c0ee8336cc5b2b
+SHA1 (patch-src_3rdparty_chromium_base_compiler__specific.h) = ea8f3535b5dcaef19afbf23a3cfb14c3957e286c
+SHA1 (patch-src_3rdparty_chromium_base_debug_debugger__posix.cc) = f608a6585be3f9a54bb3f23b788318bdc440598b
+SHA1 (patch-src_3rdparty_chromium_base_debug_elf__reader.cc) = 2e10bf0c0cdb3407868c0cd210130f2a8adde689
+SHA1 (patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc) = d66fe018b4ad00b6655fa6746f01fa52eaeab504
+SHA1 (patch-src_3rdparty_chromium_base_debug_stack__trace.cc) = a00d33c1c6234e17a2a5ff3da02c11179e023078
+SHA1 (patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc) = bd7730aae2e5cd87e7acca764d69f792a0f26732
+SHA1 (patch-src_3rdparty_chromium_base_files_dir__reader__linux.h) = 5dc2a4054205330fec8d3dd3d81147e1ab4c901e
+SHA1 (patch-src_3rdparty_chromium_base_files_dir__reader__posix.h) = a8e8b9e461287b8a8510d00c85ce5afa4a442d98
+SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher.h) = fe1ad055820067c11f348e827fd99d951d39b909
+SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher__bsd.cc) = 6231ccce3b4b3114af472b75305c644ed93b5d41
+SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc) = bd83db7c92ed175e0776b5b77ee4a1524e4adcc5
+SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.h) = 53b480411c22837914730b80a4c8f641f7e3ab5e
+SHA1 (patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc) = 203b37949747c1fb528e5a320508036a0ee4bc93
+SHA1 (patch-src_3rdparty_chromium_base_files_file__util__posix.cc) = 11561e5d471a77dd890dc9290d3c0ac572b43e6f
+SHA1 (patch-src_3rdparty_chromium_base_files_file__util__unittest.cc) = f1f70956e53f93d43c0a9658eb0259c2d1e49d58
+SHA1 (patch-src_3rdparty_chromium_base_files_important__file__writer__cleaner.cc) = de86478609591de9997b82f555a831e38b049a55
+SHA1 (patch-src_3rdparty_chromium_base_files_scoped__file.cc) = f8502c8f6696a82272821c4b593346b6e8925931
+SHA1 (patch-src_3rdparty_chromium_base_functional_unretained__traits.h) = 649ae9e786f9f0941f67b0dd0cb17b6ef0190c9b
+SHA1 (patch-src_3rdparty_chromium_base_i18n_icu__util.cc) = 65ad791bcccf40fe14f6c4089ccf31e304cc6d91
+SHA1 (patch-src_3rdparty_chromium_base_linux__util.cc) = 360afb20e93390549625b5b640ba091946a0e820
+SHA1 (patch-src_3rdparty_chromium_base_logging__unittest.cc) = ec1e4e21e4b80ec9b515d1e3e9639bd44609e473
+SHA1 (patch-src_3rdparty_chromium_base_memory_discardable__memory.cc) = 7e3640074dfa3558f2c5d6887db12014648981e6
+SHA1 (patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h) = 1d74d6018ebd11f5061ad3b1a5a90582ce34fec4
+SHA1 (patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc) = 804e85fc709c6dd5f438a1699ab458de438cb21c
+SHA1 (patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h) = 69a14f8c7b0a24167a7df8eafc321449ef736e56
+SHA1 (patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc) = a5560afdc084ccdf2add8c2228cec8e20ac6ec09
+SHA1 (patch-src_3rdparty_chromium_base_message__loop_message__pump__glib.cc) = 463d0d926709e791d562145219e5bc44c2a4529a
+SHA1 (patch-src_3rdparty_chromium_base_native__library__posix.cc) = 93fa36e71f785ef665a1c3c879d0c4e9d7de0937
+SHA1 (patch-src_3rdparty_chromium_base_native__library__unittest.cc) = 4288a70ed512e645b016df42fbc794adcdb9c640
+SHA1 (patch-src_3rdparty_chromium_base_posix_can__lower__nice__to.cc) = 5dcfa8450f2bf92baa508d06f3cf4dec17e33cc9
+SHA1 (patch-src_3rdparty_chromium_base_posix_file__descriptor__shuffle.h) = 6d6aa20e5a00d681f76b1c1c63e936c43ed1e988
+SHA1 (patch-src_3rdparty_chromium_base_posix_sysctl.cc) = 94e33996f6786e9c289cda852bade3bd49db3c28
+SHA1 (patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc) = cbc4c15896351641ee30bb31ee376479c9ab4587
+SHA1 (patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc) = 6eececbbfb4902317fc171deda8b8049969f8201
+SHA1 (patch-src_3rdparty_chromium_base_process_internal__linux.h) = eaffd4add1ae07943562a6bd4b7fc488bb93003d
+SHA1 (patch-src_3rdparty_chromium_base_process_kill.h) = 1df481e693cdb8d5eea041b1209c25b2a80660c1
+SHA1 (patch-src_3rdparty_chromium_base_process_kill__posix.cc) = 474b2def0f29bf37ff0ef92be567ae6c18610312
+SHA1 (patch-src_3rdparty_chromium_base_process_launch.h) = 82cd7a1dc7e3a92e5f1790adab83d8568df6436d
+SHA1 (patch-src_3rdparty_chromium_base_process_launch__posix.cc) = c9552ddfa00fc8ef3d613c62ca59b4309ecc4a17
+SHA1 (patch-src_3rdparty_chromium_base_process_memory__linux.cc) = e07d143e40806c9f41809ffcbf3edab8200bd11b
+SHA1 (patch-src_3rdparty_chromium_base_process_process__handle.cc) = 0adbb849965bb4d821b382bfe127b912b51f9c7b
+SHA1 (patch-src_3rdparty_chromium_base_process_process__handle.h) = ede2ea73cbf8af090314e93be175e120007cd14a
+SHA1 (patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc) = 72a8cf0f66393c42109d9a3dec462e25b68e1e3c
+SHA1 (patch-src_3rdparty_chromium_base_process_process__handle__netbsd.cc) = cbe060aab6be2f418874fec2eab13718bd182ee5
+SHA1 (patch-src_3rdparty_chromium_base_process_process__handle__openbsd.cc) = b9bac0dd1137005491c27b0a14a39c7934e90b0d
+SHA1 (patch-src_3rdparty_chromium_base_process_process__iterator.h) = a3491d58b611213335141834377cd987bcfb6268
+SHA1 (patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc) = fa2b9fdc9a0a6e000d5f445641dfbe37c4dee753
+SHA1 (patch-src_3rdparty_chromium_base_process_process__iterator__netbsd.cc) = bc3f50b860ccc6fb208c64241e2c14cbf110f4eb
+SHA1 (patch-src_3rdparty_chromium_base_process_process__iterator__openbsd.cc) = e3ce9fcc077c47a4c7eb4d3d3604cd0791a77ff1
+SHA1 (patch-src_3rdparty_chromium_base_process_process__metrics.cc) = 3c4fc4870fbd870b265582aa2ee0a37fd9e17523
+SHA1 (patch-src_3rdparty_chromium_base_process_process__metrics.h) = 5f8c73c654c7531e9cb1a17d79ec65427cc4c82c
+SHA1 (patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc) = b421c8d9b9e28a4c6a990c73f2f5af8de2c9ab62
+SHA1 (patch-src_3rdparty_chromium_base_process_process__metrics__netbsd.cc) = 3fc1a7d3803aa09825fab35ef7747d4278fab450
+SHA1 (patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc) = b0935262c5e12db898173e8f3b22edc16bd0d079
+SHA1 (patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc) = 6ca12bac5f082aed94903484f210d6c614bbba8c
+SHA1 (patch-src_3rdparty_chromium_base_process_process__metrics__unittest.cc) = f2398badbe02b8cb51d5c8573f735d5eb79efe86
+SHA1 (patch-src_3rdparty_chromium_base_process_process__posix.cc) = 7c7d96e6af71ae4ad329bff6cab169cc8eeb82ef
+SHA1 (patch-src_3rdparty_chromium_base_process_process__unittest.cc) = 91d000f76e482b6f3835b7414433f8b21b45349b
+SHA1 (patch-src_3rdparty_chromium_base_profiler_module__cache.cc) = 382dad250a199787a4b2ffef66ef5251484ea9c6
+SHA1 (patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc) = 80c48e7d725b2179b66c66366e125a13e3d6b687
+SHA1 (patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h) = 8a9f253b03db50e2e2e8240092fa26d96a8573e3
+SHA1 (patch-src_3rdparty_chromium_base_profiler_stack__base__address__posix.cc) = f6dc2c59718f42b95fc008126c43d3ab7adb4c1a
+SHA1 (patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc) = 55d976e8fcf9d24c6b65851a28d3bac1324511df
+SHA1 (patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc) = c5485a3ea823b41b14024e5dfff7234be4f5cf95
+SHA1 (patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc) = 8823d8de79dae7c936feb81a507f19f76343bcd7
+SHA1 (patch-src_3rdparty_chromium_base_rand__util.h) = 2a65a2cbc0f2739f6e11c2625ee5efdb51dcb9fc
+SHA1 (patch-src_3rdparty_chromium_base_rand__util__posix.cc) = b4560125f019041bbc5374c6ee1ace38d91403a2
+SHA1 (patch-src_3rdparty_chromium_base_strings_safe__sprintf__unittest.cc) = 56edca996d44079981bb6a4679ff2b6cbe21cd9b
+SHA1 (patch-src_3rdparty_chromium_base_synchronization_lock__impl.h) = 9448f70539ad9060466c9838132bae283e7778e6
+SHA1 (patch-src_3rdparty_chromium_base_syslog__logging.cc) = 1baf65e09e1cdf46524fae60009d9d340d682363
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info.cc) = 823207e1ac226196a9f19177b5386c5aa8694521
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info.h) = 1b98f4863d548481a47695554f13f8d4944063f1
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__freebsd.cc) = 80ee764dfff994ef295435c921c6f88a3832471a
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__netbsd.cc) = 3a8a2187161158bf42a1ffc2d8f502f2c7d8a0fd
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__openbsd.cc) = d4dc93d8b581e10dc0fa5fadc450e05ee14be212
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__posix.cc) = 5e9c722c3d8dd9ed36f40372b9099a7cc26c51c7
+SHA1 (patch-src_3rdparty_chromium_base_system_sys__info__unittest.cc) = df18697ebe7509c08d35e665ed24957e01598f0c
+SHA1 (patch-src_3rdparty_chromium_base_task_thread__pool_environment__config__unittest.cc) = 5f1ee11c5243c8229a2f6eb96746895b3ca41230
+SHA1 (patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc) = e2776024cbdcf7f0674ef9399ccd4630170b9421
+SHA1 (patch-src_3rdparty_chromium_base_test_test__file__util__posix.cc) = 5fcd8bb5f801ff0c5e4a4509d7b2d01b63676fdb
+SHA1 (patch-src_3rdparty_chromium_base_threading_hang__watcher.cc) = 64defdd7167601980ca17ee96a7a310fb6dae282
+SHA1 (patch-src_3rdparty_chromium_base_threading_platform__thread.h) = f324e7cd9d17ead4438a87b076e054f30fa53e1b
+SHA1 (patch-src_3rdparty_chromium_base_threading_platform__thread__bsd.cc) = 90a5f62c2f9094c7b1ae170611f9a2af901bb6c4
+SHA1 (patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.cc) = 2d8b287f92a2d99f332bbc0a0e8c12b36c227f44
+SHA1 (patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc) = 1ccdbdaec4a8e819f44e0bf8d7e974702eded84a
+SHA1 (patch-src_3rdparty_chromium_base_threading_platform__thread__unittest.cc) = 0f7496d1a3ff5982fa202ee0f4e5ecdcfed22b2b
+SHA1 (patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc) = 3e5cf0bf8b9384cd19ec583af072a68f9f0fa96d
+SHA1 (patch-src_3rdparty_chromium_base_trace__event_memory__dump__manager.cc) = 613adda9a7be06da2576c47a5154cf819c0b9676
+SHA1 (patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc) = 52aa13b521e86317b5c31ca4fe31f29b05e2417e
+SHA1 (patch-src_3rdparty_chromium_base_tracing_trace__time.cc) = 746d6234c99eb5898e455c2a12bae4113dd8f451
+SHA1 (patch-src_3rdparty_chromium_base_tracing_trace__time.h) = 7a292e2ae27178e81b098965fd8cadb870cb9a68
+SHA1 (patch-src_3rdparty_chromium_base_version__info_version__info.h) = 0f1449da140f3495991439da4f8a81a812e4a1dd
+SHA1 (patch-src_3rdparty_chromium_build_config_BUILD.gn) = f3f9ad478465493b5236447f2f3c71cd2044dee9
+SHA1 (patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn) = 07be4105e2e30346af514f831f73f0beb4821d34
+SHA1 (patch-src_3rdparty_chromium_build_config_clang_BUILD.gn) = d802c65ed104f7dfd43bb6104f06ff1134b63e76
+SHA1 (patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn) = f8cf52751105fcabf1cc0444557c73d29f653aba
+SHA1 (patch-src_3rdparty_chromium_build_config_linux_BUILD.gn) = 588ad35ecaf9895e8107c7cb2e2468aa0a5304b8
+SHA1 (patch-src_3rdparty_chromium_build_config_linux_pkg-config.py) = 22d7fd4c016287f4459b6d4d750e1431787dd149
+SHA1 (patch-src_3rdparty_chromium_build_config_ozone.gni) = 10d5c393f57bcce6d63add2bf7c8c62d4c2477fd
+SHA1 (patch-src_3rdparty_chromium_build_config_rust.gni) = 27eba915f882185fc2bc0556b7148a97060897e5
+SHA1 (patch-src_3rdparty_chromium_build_config_v8__target__cpu.gni) = 8d072fc2a4887acd2b35f6d9cca44a1d2f98b9d1
+SHA1 (patch-src_3rdparty_chromium_build_detect__host__arch.py) = eea7f8caeed73619b1b2aeaf1abc9965819b5c52
+SHA1 (patch-src_3rdparty_chromium_build_gn__run__binary.py) = 5801cb8e42c62c623c30f8b7a7b386ce07577665
+SHA1 (patch-src_3rdparty_chromium_build_linux_chrome.map) = 7c27a1ae3f541be14b950a240d56559b3977abc7
+SHA1 (patch-src_3rdparty_chromium_build_linux_strip__binary.py) = 0e315841e92b60372cef7e2ae03ca3d4672ce92d
+SHA1 (patch-src_3rdparty_chromium_build_linux_unbundle_icu.gn) = 766692cd06d41b8170330efb573f6dc16d450ad9
+SHA1 (patch-src_3rdparty_chromium_build_linux_unbundle_libevent.gn) = b037a98ba66c98750d90167b27c22dd5b0ca4fad
+SHA1 (patch-src_3rdparty_chromium_build_linux_unbundle_libusb.gn) = 46e95e837c0e956805d3e85b7f91034565a4e88d
+SHA1 (patch-src_3rdparty_chromium_build_rust_rust__bindgen.gni) = 67a2d7b0aa0a6cc7d4cfceab45a18840b8efcc62
+SHA1 (patch-src_3rdparty_chromium_build_rust_std_BUILD.gn) = 50180fecf48372cf21973a6f444b489ea061a712
+SHA1 (patch-src_3rdparty_chromium_build_toolchain_freebsd_BUILD.gn) = b7a6842fe9b84044494168d9f5c86f7c7b660d15
+SHA1 (patch-src_3rdparty_chromium_build_toolchain_gcc__solink__wrapper.py) = 349a7badce1a4cfb95c5e9de234a36f97b1f4578
+SHA1 (patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni) = e61958a14c0d728be2f94ffc9e76ff1ae54812a2
+SHA1 (patch-src_3rdparty_chromium_build_toolchain_netbsd_BUILD.gn) = 8ac3f0aa5710ffae54ad94c4d2e595b63352c242
+SHA1 (patch-src_3rdparty_chromium_build_toolchain_openbsd_BUILD.gn) = 6f4d62635830d9c68387ddd174c005870cdb6111
+SHA1 (patch-src_3rdparty_chromium_build_toolchain_toolchain.gni) = 345005dd218a96c7a6788ed8752292b54f74a94c
+SHA1 (patch-src_3rdparty_chromium_cc_base_features.cc) = 2ac20522b75bdec3ba935e0aa588ad379042a284
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_BUILD.gn) = 003f56b68cae781d80bb73db6342e5ab75308449
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc) = 128d6390eab78c1ca71e5f942736ddd381bae791
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn) = 9a8e668db96717fb0e0e0a7de803c2d4dc998643
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc) = 3af0dba7e5cd606f52f13dec7230d47f73d026dd
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc) = ce8bcf1f676586ac6d1999b8ce24fd030be876b9
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc) = e60669922ff5c615b939188a1dbe334bfa5faae9
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h) = 2ae05166b8b52ff2d5a92ed225e1f6e044b0b7e0
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc) = 600b50d3ffa29cf8f97a29d1e2388a7625b06679
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h) = 1e3ba7ba152138323a5e1925e5f1e0e7d8d50ac9
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc) = 498ba50c5324aa930837cfe5a8e887418a6d0482
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_management_chrome__management__api__delegate.cc) = cce63c8bac75c8ac9d8212082cfa686291875ee3
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc) = 8c02cc981dc48d73b9605c7a3702d58ff71f6f32
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc) = 37e63147dd3b03b46741de4297522e4505b1b923
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc) = 49cb9e93921536b08ef8c2a84216ce4029ae7ec5
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_tabs_tabs__api.cc) = e4cea3fbea237ae308aedfb1efb7d2897f6c55d6
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc) = af38f76276fbdc93ac2f2ef6532249437a9edefc
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_extensions_api_webstore__private_webstore__private__api.cc) = a276e717c88e967c74603f60342f943f9fe23d7f
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_gcm_gcm__profile__service__factory.cc) = 0dcfcd89a8077cd625a1930e2e11b86a9a2453ad
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc) = c9f5841dde7ffc00609cdd7a3d98d49b44cf4709
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_media_router_discovery_BUILD.gn) = 7885a9567b35d90a338cb70e7fbbdc08d82db317
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc) = cc50bb75f4658ae0cf677e1c677adfc0adbe920a
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.h) = 67394c3109628fc9f345a680a597dcaead35cab1
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_media_webrtc_desktop__media__picker__controller.cc) = 53503f434c7c6dc3662d30ed692cc1282057e596
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc) = e114863dda1893ce130359f14e3469458ab8853a
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc) = b9b4bd790af7461dd9c81b0fcc4befee26861040
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h) = 819d6f3ce0a9e0a0692bd0a6d40873d927d98898
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.cc) = b4c6d040f065acfc5cc8abe44914ad50e187ae7b
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.h) = e5bec71d664dd93a5882da3207235dd1d7f1e675
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_prefs_browser__prefs.cc) = 0cdb76b59d7d781c69866a5e52437ad558da17b0
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_prefs_pref__service__incognito__allowlist.cc) = 0968219904fbb40e7f91ea3813942c37b1aec8d9
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_printing_print__backend__service__manager.cc) = e1f0574365d7eddf4d490a6cf2ee2808a979aaba
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_printing_printer__query.cc) = bba9283339589c9a823e7dbdac161f5c3f07a285
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_resources_signin_signin__shared.css) = 9aab292b6b5162fd99e99245ee2f68c48d5eed33
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_signin_signin__util.cc) = f1f9605c4e877f0f3eaebf6419ed12cf7ee82444
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_about_about__ui.cc) = 0e22630c2adf2e064b73ea48eb8223df1e5aa813
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc) = ae312de4ca0554987d2e97bd53dbb126955236f0
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc) = 977afb90e166c2a2d52d031abada949215e08058
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui.cc) = 91ca1265b3f56abd5f39fb6f37f458b90af4a565
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.cc) = 6e7acbc9812d8cd49184986965962506109a45c9
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.h) = d2835f42a05bf014f693ac9f1e9360bede0570e3
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards__handler.cc) = 6014b6f4c163c4363fa158cf28be9d3c90b83709
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc) = f2fd0b6e1839d5c987bc508539f25511df18cafc
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_appearance__handler.cc) = 2a7b9786c797e7e2900e84e7f6f147b5a8949ae9
+SHA1 (patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc) = d487dfc1ae7fe64e5328f70deeba9fc841eec262
+SHA1 (patch-src_3rdparty_chromium_chrome_common_channel__info.h) = 1f28e415e9f41db29878ce7d7f1485850bec689c
+SHA1 (patch-src_3rdparty_chromium_chrome_common_channel__info__posix.cc) = 344174c334d8436216e585c89792c4282fc53c73
+SHA1 (patch-src_3rdparty_chromium_chrome_common_chrome__features.cc) = 272ec0b6dbbcacb11f46fef2f0d08950bf509e0b
+SHA1 (patch-src_3rdparty_chromium_chrome_common_chrome__features.h) = 8bcf4a32a7099a542e4be06e33d677be9b3136f3
+SHA1 (patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc) = 778b90200859f35e95e36de19edb1a65540646b9
+SHA1 (patch-src_3rdparty_chromium_chrome_common_chrome__paths.h) = a62b8fe1643a740380561d7d27df72ae5611dfd4
+SHA1 (patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h) = 36b4c54736331bd4bc85aa70a3c1b7876dc6d2d0
+SHA1 (patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc) = 05380531fc25293b1344555ed7689b99ab85bab3
+SHA1 (patch-src_3rdparty_chromium_chrome_common_chrome__switches.h) = ef5a61208d6ec9f58df582f06507e5f232da5a5c
+SHA1 (patch-src_3rdparty_chromium_chrome_common_extensions_permissions_chrome__permission__message__rules.cc) = 60c80e2c29108d87b5d52e6013064add66f930a2
+SHA1 (patch-src_3rdparty_chromium_chrome_common_media_cdm__host__file__path.cc) = a81bdce23f14c0073bf44e8fcf54fbcbbc17296d
+SHA1 (patch-src_3rdparty_chromium_chrome_common_media_cdm__registration.cc) = 95016d220b73f83ed02dd606b87747b4fb276750
+SHA1 (patch-src_3rdparty_chromium_chrome_common_media_component__widevine__cdm__hint__file__linux.h) = fed312a5aafcbf73b4cd06adfa9845acc3b6a4b6
+SHA1 (patch-src_3rdparty_chromium_chrome_common_pref__names.h) = ee3d5aabf8b9b722a3f558605c1b4c6a972abcd1
+SHA1 (patch-src_3rdparty_chromium_chrome_common_url__constants.h) = 119d1497ef01bbfcf0bf5e909fb6298db4aa5ace
+SHA1 (patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc) = 2c7012bdedbfb024b9b1fe9eb6fd79d4c4783408
+SHA1 (patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h) = f9417d8a8d042d2ac9f754165a984d89c8fa59fc
+SHA1 (patch-src_3rdparty_chromium_chrome_test_BUILD.gn) = f175d5244ed439ae8af9b7f5273c919441c4f428
+SHA1 (patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome__launcher.cc) = f1517f7a848f3311dd95c7696e16e2312bbf2d87
+SHA1 (patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome_chrome__finder.cc) = 3512b432bb1fff98e55aca04bdf81b9777c0ecde
+SHA1 (patch-src_3rdparty_chromium_chrome_test_chromedriver_key__converter__unittest.cc) = b5175d35769a253f1fff6d1ca4884b47980faa50
+SHA1 (patch-src_3rdparty_chromium_chrome_test_chromedriver_keycode__text__conversion__unittest.cc) = 4e92519601b9fde07013f257a30c3eb7fd14b271
+SHA1 (patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc) = 535a1bfe140de68030f67145c4d562e25eb205bc
+SHA1 (patch-src_3rdparty_chromium_components_commerce_core_commerce__feature__list.cc) = 6a4ea89c401f2af56d3dc84995efb34d643ec48d
+SHA1 (patch-src_3rdparty_chromium_components_constrained__window_constrained__window__views.cc) = b0084df24933dc24669eaff43534caa72328e902
+SHA1 (patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc) = 0926b1a99aba0635a728e1a507e7d72d1e15c318
+SHA1 (patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc) = b7ac306e95fe7e82d38c609cbdad9d7c8eba5966
+SHA1 (patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn) = 1176c6ad82a5076e689cec03eec9177ee1109b55
+SHA1 (patch-src_3rdparty_chromium_components_crash_core_app_chrome__crashpad__handler.cc) = e55ee1c56f4d0340293fd7953cb055cd59d4cee7
+SHA1 (patch-src_3rdparty_chromium_components_crash_core_app_crashpad__handler__main.cc) = 92f85709f3f00092e0b9f9598fb43cbfef1a778f
+SHA1 (patch-src_3rdparty_chromium_components_crash_core_browser_crash__upload__list__crashpad.cc) = e1571452b691e495ea6c5b9ab7a95f45a29f6641
+SHA1 (patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn) = 777cac8cee2c694d94e41ab8a9d48726604027a1
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_browser_mock__signals__aggregator.h) = 64ffd97d2a97f48616d0490dcb128f88e6a4bb42
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator.h) = 2bd6573178290ecd25149c28374df37c1218ec82
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.cc) = aa64abba35a8c34c603fdbbdd9c48ee551353308
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.h) = 8057d36e726100f2ad7f3f61b2deb1bbe3c32d6b
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service.h) = 878acb61d207986e313b7d7d6287e653a94d9415
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.cc) = 248a0cd7fb6c01945b7214368fc8a0ff5073aa24
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.h) = ebdf740ac71cbcd37ccaed4f685266302e584473
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.cc) = 35e2e3f35f7d25076ad5a112707ab22ff1eb2849
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.h) = cf20f3502b78725eaa9c794369044cf3fdb3eddd
+SHA1 (patch-src_3rdparty_chromium_components_device__signals_core_system__signals_platform__delegate.cc) = 9862cf6a8a4bb1fe8ca67323fdc19f03ba24e5c4
+SHA1 (patch-src_3rdparty_chromium_components_discardable__memory_service_discardable__shared__memory__manager.cc) = 0a33f14a2324cd93393366a1c1c6277037b0135a
+SHA1 (patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils.cc) = cab34391eed0485bc3f72ec07132de255f7f9bfe
+SHA1 (patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils__unittest.cc) = d980df617e0c7da36746382657a9e488adf47dc0
+SHA1 (patch-src_3rdparty_chromium_components_eye__dropper_eye__dropper__view.cc) = 133f5629bb29399ad59b951252ccbe84e937f107
+SHA1 (patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.cc) = ffee96e45a277ff8e163d42df8516c144197157d
+SHA1 (patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.h) = 2cb996e599e7188c8ccd2938bfdd269ba9ace66a
+SHA1 (patch-src_3rdparty_chromium_components_feature__engagement_public_feature__configurations.cc) = edd75156dcf7ba9475eae7626ce0c5dac75f38bb
+SHA1 (patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.cc) = d69effa21d3c60404b9f5f01ab24551761c0eb28
+SHA1 (patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.h) = 26fb309ef98f16520f4c950bff0d320e89b3a5a1
+SHA1 (patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.cc) = 1e14520411628e8bb2191bfa05859a556c9333e7
+SHA1 (patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.h) = 921850748c225898c2a3bb1ad08ce63f117af533
+SHA1 (patch-src_3rdparty_chromium_components_feed_core_proto_v2_wire_version.proto) = 12c32619487c151108e88404447dd644c0ed4c1e
+SHA1 (patch-src_3rdparty_chromium_components_feed_core_v2_feed__network__impl__unittest.cc) = c14cafd7aecfa42db2746c44c73d4186269d98a9
+SHA1 (patch-src_3rdparty_chromium_components_feed_core_v2_proto__util.cc) = 72d91adfe116b34e01a96bec95f1af888f4dd7cf
+SHA1 (patch-src_3rdparty_chromium_components_feed_core_v2_proto__util__unittest.cc) = 8cbd6fba1ff969c3cb3c1ef7a8086045e892cb24
+SHA1 (patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc) = 5d1fde3606d89266eb3a2cb033cd9a2756aa4b79
+SHA1 (patch-src_3rdparty_chromium_components_gwp__asan_BUILD.gn) = 01aac21983d3a4eca1f7e7e6373542c2fd3e8004
+SHA1 (patch-src_3rdparty_chromium_components_gwp__asan_client_guarded__page__allocator__posix.cc) = 4b3cb3fa504bb746da2bca142212d5cbca747838
+SHA1 (patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan.cc) = a9a50c9a1b58ffa3e67cdc0cec4ac290f3f4fbbd
+SHA1 (patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan__features.cc) = 676b90c81a8aa3a0735c35cdcc6ea575ba0daaba
+SHA1 (patch-src_3rdparty_chromium_components_gwp__asan_crash__handler_crash__analyzer.cc) = 67896d5641e94df1d3d9b227c8ae99d23f4c7592
+SHA1 (patch-src_3rdparty_chromium_components_live__caption_caption__util.cc) = c558032470e87ff00fb503b3821d1b788a7221e8
+SHA1 (patch-src_3rdparty_chromium_components_live__caption_caption__util.h) = 3815429f0a286f03101a93c9cf7ea6ec61f6394d
+SHA1 (patch-src_3rdparty_chromium_components_media__router_common_media__source.cc) = 1fc1990b07a5c9aca646562f675a4781f23b6ca5
+SHA1 (patch-src_3rdparty_chromium_components_media__router_common_providers_cast_channel_cast__message__util.cc) = 688735b3f89d22501ab6b703504631ed3aa28e13
+SHA1 (patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc) = 7649837f9bec3d2b58245dce24e2b2a52dba6ddb
+SHA1 (patch-src_3rdparty_chromium_components_metrics_metrics__log.cc) = be1763ddd7c31a0ac4ed8e7e29bb6fb0fcd5092f
+SHA1 (patch-src_3rdparty_chromium_components_metrics_motherboard.cc) = 70e02be0c5ac7987eced6c05c88d43ce678b935c
+SHA1 (patch-src_3rdparty_chromium_components_named__mojo__ipc__server_connection__info.h) = 2c99b291b5341a2e553e49ba70f56ca9a161a668
+SHA1 (patch-src_3rdparty_chromium_components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc) = 416cde55ef508f7f994a9844c5f2110f2f30ec8b
+SHA1 (patch-src_3rdparty_chromium_components_neterror_resources_neterror.js) = fd262ef85ad1724c1f13d4d03d0862a9d8ec4364
+SHA1 (patch-src_3rdparty_chromium_components_optimization__guide_core_optimization__guide__util.cc) = d5eb48a1c4dfe5d84834096e7828efd73115f672
+SHA1 (patch-src_3rdparty_chromium_components_os__crypt_sync_libsecret__util__linux.cc) = 77de623c9233fa28faf0aef6980c934c6edff9d5
+SHA1 (patch-src_3rdparty_chromium_components_os__crypt_sync_os__crypt.h) = 3a9fe171112f3bb1e2fa984d9a5f033ec4f7aa7c
+SHA1 (patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client.cc) = bb17b370ef0ecf04a395793cc36959d6b9a54f47
+SHA1 (patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client__unittest.cc) = 7aeab3c3a2ececf420372163e62e75beafda4d71
+SHA1 (patch-src_3rdparty_chromium_components_paint__preview_common_proto_paint__preview.proto) = ac7caae213f34f0fb0ea2fc34817fffb86083f73
+SHA1 (patch-src_3rdparty_chromium_components_paint__preview_player_player__compositor__delegate.cc) = 69dfc6368026f334ff7a10e8e5361b8253272bba
+SHA1 (patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.cc) = 1f68c622254be93771b5ee0729f2a02e1d1c9250
+SHA1 (patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.h) = b156f0c003ddb787b266750fa60d20d427fed7a4
+SHA1 (patch-src_3rdparty_chromium_components_password__manager_core_browser_password__form__manager.cc) = 1d81778d1677f9ba80d075b95ff89a95df6800bb
+SHA1 (patch-src_3rdparty_chromium_components_password__manager_core_browser_password__manager.cc) = 1dec25e10b5a7317dab7ce48b9551edf52c94fc1
+SHA1 (patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__async__helper.cc) = 996310a07659217dd477c096e92f87368f1bd1eb
+SHA1 (patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__unittest.cc) = 2451a727b60e00a6f3ab68294bb50e737ffd77a7
+SHA1 (patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__pref__names.h) = da8021d0a7caa77b840e1aeae05f9540f052a7f4
+SHA1 (patch-src_3rdparty_chromium_components_performance__manager_public_features.h) = d1f428da1f124785a7a9be421af7ee7728a03f9d
+SHA1 (patch-src_3rdparty_chromium_components_permissions_prediction__service_prediction__common.cc) = cb425243112893fac3c23641a879749b0d07ab51
+SHA1 (patch-src_3rdparty_chromium_components_policy_core_browser_policy__pref__mapping__test.cc) = 7dca8a434ca95d04a8ca14656fad1c6741def2eb
+SHA1 (patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__client.cc) = 02bd52462e539096b8d904a85af4a932275b25aa
+SHA1 (patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__util.cc) = 54221115c575e0bce93dc834e439e6a710e526cc
+SHA1 (patch-src_3rdparty_chromium_components_policy_core_common_policy__loader__common.cc) = da89450545e98b76f9bf808634d0cf7aa5f68186
+SHA1 (patch-src_3rdparty_chromium_components_policy_core_common_policy__paths.cc) = ba1205cab4364d2af33fbf6a91717a9536de6654
+SHA1 (patch-src_3rdparty_chromium_components_policy_core_common_policy__utils.cc) = d74bde2d59278eb2dc15f9719d8663cbbe38741f
+SHA1 (patch-src_3rdparty_chromium_components_policy_tools_generate__policy__source.py) = d190fac8fb191bfe2e9b9340deb6a5c7f23519d0
+SHA1 (patch-src_3rdparty_chromium_components_power__metrics_BUILD.gn) = 1a943004e050b219a3b8a4a0d88c9a2b1beb6cd6
+SHA1 (patch-src_3rdparty_chromium_components_power__metrics_energy__metrics__provider.cc) = baf2ac37d7285215c9d9e11876f344c593d6f7e3
+SHA1 (patch-src_3rdparty_chromium_components_safe__browsing_content_common_file__type__policies__unittest.cc) = 94620c7425f388e049f67cfe4c27e68645376cf0
+SHA1 (patch-src_3rdparty_chromium_components_safe__browsing_content_resources_gen__file__type__proto.py) = ea3d8400547f3e6a5283d280d613a7f804a6c54b
+SHA1 (patch-src_3rdparty_chromium_components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc) = 7c5bd917e3651ed8575956d9a9eb2d0a9fcaf550
+SHA1 (patch-src_3rdparty_chromium_components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc) = 0df46ec91b5b7b707e8dd93b25fb200b0e36effc
+SHA1 (patch-src_3rdparty_chromium_components_safe__browsing_core_common_features.cc) = 1718ff11b1380dcb8dda12b5c97034c775307e77
+SHA1 (patch-src_3rdparty_chromium_components_search__engines_search__engine__choice_search__engine__choice__service.cc) = 093327e5cdcbc8da10354019a0a0d469ef9b31a5
+SHA1 (patch-src_3rdparty_chromium_components_search__engines_template__url__service.cc) = 95ce7f2c7fedf72c596c26587cd68376c605a24e
+SHA1 (patch-src_3rdparty_chromium_components_security__interstitials_content_utils.cc) = f922567407809c224434f2e75ad4a7885dd63255
+SHA1 (patch-src_3rdparty_chromium_components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc) = 63d0533184aae55308979817ae2306145cd6b145
+SHA1 (patch-src_3rdparty_chromium_components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc) = de0919ae028241f22ff4c75e421b9419a282d590
+SHA1 (patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn) = ac3a1410b94258d2b63f1ba5b5646c3133537102
+SHA1 (patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc) = c790e6148175426f9062115c8658281c8adbfc35
+SHA1 (patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h) = 9cfc097c70aba3468d80ebe20765c33e54947064
+SHA1 (patch-src_3rdparty_chromium_components_supervised__user_core_browser_supervised__user__service.cc) = 153cb2ab312f1abe1bcef3dc962c68e77a82410f
+SHA1 (patch-src_3rdparty_chromium_components_supervised__user_core_common_features.cc) = c3e0c00c18f1cc77fa07b88c2c75a50f1bd7c9be
+SHA1 (patch-src_3rdparty_chromium_components_supervised__user_core_common_features.h) = fc77923801bfbc12e8553417000bbc3c2ca41dad
+SHA1 (patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util.cc) = 054b0d50aca537efee9ac5eb349b4598a2457b4f
+SHA1 (patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util__linux.cc) = 9547bee293ce5cc6c94dc0405d4c11fadd70d0ca
+SHA1 (patch-src_3rdparty_chromium_components_system__cpu_cpu__probe.cc) = a8f8a2952552a314ad62f0059b1ca5d5d2a98b9d
+SHA1 (patch-src_3rdparty_chromium_components_update__client_update__query__params.cc) = f7a241bb1a877d6f3c8f54d55a8ac2b2dd5e073b
+SHA1 (patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc) = 2933b6a01e4df61eeb932f018d95487260233ac5
+SHA1 (patch-src_3rdparty_chromium_components_user__education_views_help__bubble__view.cc) = 859fe1e0bfdd257dd07b57eaf93ba7ef31c59f7f
+SHA1 (patch-src_3rdparty_chromium_components_variations_service_variations__service.cc) = 5e08d3501cef557f801d4e77ac5efcdbf17c117d
+SHA1 (patch-src_3rdparty_chromium_components_viz_host_host__display__client.cc) = 9879ee2d8d7063e186eaccfa982f937f81710246
+SHA1 (patch-src_3rdparty_chromium_components_viz_host_host__display__client.h) = c3ba7e67efe01e64a3ce74a31475aa1c84efdb8a
+SHA1 (patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc) = 62e141bb8bb4d078789fe9348448c365944cb87b
+SHA1 (patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.cc) = 15fd73dc3c2a6b11862f323fa56f1a39b5cc1922
+SHA1 (patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.h) = 2d60af4d6b7ada3dedc2aef170d6c7eff3d976b6
+SHA1 (patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc) = 55417c509a21089fa63a97467529fa36cd903158
+SHA1 (patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc) = 6755b359c9f24b3baa6d9b7dc83a4bcd455509ca
+SHA1 (patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h) = dfe82918b9c55ed3f1c7f765b6f78a06d54113ef
+SHA1 (patch-src_3rdparty_chromium_content_app_BUILD.gn) = c6cfd60c33462a6a29d3ac1788ecdb5dece9d180
+SHA1 (patch-src_3rdparty_chromium_content_app_content__main.cc) = cd5e77a39f2b44d16334c69847aafe8d8cdd4caf
+SHA1 (patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc) = 1d653aaf10ad7f8c045171b442fb2e155afd48e5
+SHA1 (patch-src_3rdparty_chromium_content_browser_BUILD.gn) = fc38294898afda7cb02fb318440d8ca569a4ecc5
+SHA1 (patch-src_3rdparty_chromium_content_browser_audio_audio__service.cc) = fd9c1cceee306950dac3b28025ecb3cc44a6154e
+SHA1 (patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc) = 5d48472cb38d893b4c485b24e9a3ed3e3406d560
+SHA1 (patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.h) = 9558d2fe1ac358b3717605d21c23cc288560f1df
+SHA1 (patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl__receiver__bindings.cc) = 32e8d35058ee05ac1d99016ca56e0296fb476266
+SHA1 (patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc) = 47ed970f381804aad0aecd7808950f14fd3a12c1
+SHA1 (patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper.h) = a188d692a929c39890ee04fc03ffcb868d365eaf
+SHA1 (patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc) = af26e49d07271cba5c0178d379de6eee6a92b3aa
+SHA1 (patch-src_3rdparty_chromium_content_browser_child__thread__type__switcher__linux.cc) = ee4e8b5d7a90b0a43afeb66ac70549e868260bfb
+SHA1 (patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc) = fcf5af17620095ab102843be0cea01b542bb39fb
+SHA1 (patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.cc) = 50449f18c138c28ceb7696c61fd505e857d94f58
+SHA1 (patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.h) = c8870d9b841fd247250cac1985248a2f5cfc8150
+SHA1 (patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc) = 929f6c782eeeb2d0170b57ecfa97b38fbc33173f
+SHA1 (patch-src_3rdparty_chromium_content_browser_file__system__access_file__system__access__local__path__watcher.cc) = 16627aa8f59782eb66ca22df246e216bf13efc8f
+SHA1 (patch-src_3rdparty_chromium_content_browser_font__access_font__enumeration__data__source.cc) = 3d6ddf2349e194f32aecad0d419605a262275321
+SHA1 (patch-src_3rdparty_chromium_content_browser_gpu_compositor__util.cc) = 021c074b9160c4154d50f2266b8f8f216f2efb11
+SHA1 (patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.cc) = 1c7f4639a39128078559bd75a30a42374030fffd
+SHA1 (patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.h) = c7c6ecf04b94813a5a80d8e35056b9e34ad0cddb
+SHA1 (patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc) = e65df70258f67ef214189ad4e31def1d5c5d190f
+SHA1 (patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h) = bbe336e60fd7c0ddc0a66f9df06c215a639b531c
+SHA1 (patch-src_3rdparty_chromium_content_browser_gpu_gpu__memory__buffer__manager__singleton.cc) = 332be8df3b5dbd10edf8e2428a7ba5cb09fc826a
+SHA1 (patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc) = b3ae477c187d7aab479eaca9be8cbba6a0dd9893
+SHA1 (patch-src_3rdparty_chromium_content_browser_media_frameless__media__interface__proxy.h) = fa3b3a1bc8f2291cf71845ff15ce960f675c5061
+SHA1 (patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc) = c8208faab29a79c96e913b8a250545e21f836423
+SHA1 (patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc) = c092a9ae6c4b4db2c824f82f37dc825161b7df68
+SHA1 (patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc) = d1c21125d3b563b57e842733603991effb7542b6
+SHA1 (patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc) = 8241670824fa60679501cfda687734c3d4c93e3b
+SHA1 (patch-src_3rdparty_chromium_content_browser_renderer__host_media_service__video__capture__device__launcher.cc) = 7ca20dbe929afea5eccab39ebf514b850d1b5ea5
+SHA1 (patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc) = 669c3446d412f7167816057126124555df7d34ff
+SHA1 (patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h) = 00a3749d5841e761a1c1b0d344b02ecabf42af09
+SHA1 (patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc) = 93a6125a264b75837e1b5f79816732c686affbdd
+SHA1 (patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc) = 3e97473e3070e62dcf9f97543ec78d31b19529ed
+SHA1 (patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h) = ce49c23e89edf76eb080c53bb16a038e3fc30ad8
+SHA1 (patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc) = 75ae7bfc21bcaacbfdcc48234e12ef0bae58a4c5
+SHA1 (patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc) = 764320ce426ecc32f39bacd613e58ab18ca8df25
+SHA1 (patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc) = 079d9c65d04975114a9a758dcbf75f2547b795f8
+SHA1 (patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc) = 6b5607085fc714ee5b86e4f7250e4b4d89b0a094
+SHA1 (patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h) = df97a621485f2dc4912b723ede9e95934d0eee07
+SHA1 (patch-src_3rdparty_chromium_content_browser_utility__process__host.cc) = a5a0108ae7b440b4c48ddc3c25a0d54054a6959e
+SHA1 (patch-src_3rdparty_chromium_content_browser_utility__process__host.h) = 0ed2f2b5ff97848f88a86eb7d153709467c1aac7
+SHA1 (patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc) = 6e4845fb82c0d0da3581adc425501bc1e65d5bed
+SHA1 (patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc) = a55578144b7024933d5ba2c85efb4210f04ffb6f
+SHA1 (patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc) = 3dced7908647aff5d482975090371474d3d170b2
+SHA1 (patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc) = 450fb743b379a264fd7ea853daa76881d6b0e4be
+SHA1 (patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura__unittest.cc) = 2d43c7a0634caac9f230c011ee3268ad6ff86f3b
+SHA1 (patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc) = aa905d282f47a64e43fd2c9388a451c69344d222
+SHA1 (patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.h) = f21cec746d9cd16e55127979e8c451c4de0743e7
+SHA1 (patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc) = ea8731432995cab24ece52926ab0ad8a44aa42f4
+SHA1 (patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.h) = 885dcb8cf8a53b9cdcedbba7e7865326b3043ebe
+SHA1 (patch-src_3rdparty_chromium_content_child_BUILD.gn) = ab9b7542ca4bf8e153fcb6afabb82cac8e5ed5ce
+SHA1 (patch-src_3rdparty_chromium_content_child_child__process.cc) = 368fe1fbae69c6461eff0064a09c9e9c1fd6d052
+SHA1 (patch-src_3rdparty_chromium_content_common_BUILD.gn) = 56d0cdd847f12e7d7215882ce8f2e05892cb5848
+SHA1 (patch-src_3rdparty_chromium_content_common_features.cc) = c81d566fe3c8542f49def72cfc8040d08564fab1
+SHA1 (patch-src_3rdparty_chromium_content_common_features.h) = 5b700edbdb839b62f76185cccadbc9c892d39543
+SHA1 (patch-src_3rdparty_chromium_content_common_font__list__unittest.cc) = 4147d40cafcb87b12f6c04be8d948a4d726dcb72
+SHA1 (patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.cc) = dd57387435a994c69aef9afea495de76b3f736e6
+SHA1 (patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.h) = 6547f9becfe13fb22d441edc1655900992c8df9c
+SHA1 (patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__linux.h) = b53368bd737610a0eb8770e9f938d5c40511bc6d
+SHA1 (patch-src_3rdparty_chromium_content_common_user__agent.cc) = 0922725969e3b6a215fcfcf426a4b9932e0bc192
+SHA1 (patch-src_3rdparty_chromium_content_gpu_gpu__child__thread.cc) = 9a61b08c4a6873c886c52a786489753814cbedc0
+SHA1 (patch-src_3rdparty_chromium_content_gpu_gpu__main.cc) = 0e6da5007d18e253f2afa54e6723723e5c9c5b22
+SHA1 (patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc) = 533e41030472d0167bff41827b8f3103d97a916b
+SHA1 (patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h) = 5dfbad5b849a1598657f64db0d52acebe5c0bb6c
+SHA1 (patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc) = 24732b8429b4b5d3963d585ef6422d81a2fa692d
+SHA1 (patch-src_3rdparty_chromium_content_public_browser_content__browser__client.cc) = 4148c0640d882a67ed4cd8bbf5744be4d19dfff6
+SHA1 (patch-src_3rdparty_chromium_content_public_browser_zygote__host_zygote__host__linux.h) = 8763092681b697a55ce3f927c0f8b356e58bcb0c
+SHA1 (patch-src_3rdparty_chromium_content_public_common_content__features.cc) = 6fbb294818de7a38643c245e4b141c2173bd2b85
+SHA1 (patch-src_3rdparty_chromium_content_public_common_content__switches.cc) = bacd682136d15cb7c480897da4ff3f9fc3460cb8
+SHA1 (patch-src_3rdparty_chromium_content_public_common_content__switches.h) = 8e1a99d7e7f00d07839088755760dc7fdfcb9822
+SHA1 (patch-src_3rdparty_chromium_content_public_common_zygote_features.gni) = a191c39249b291f204db480730cca161153b96df
+SHA1 (patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc) = f9fd9a30ddad2ba4107ea274acfc15fde2b0f0fd
+SHA1 (patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc) = 711f2085256c0609dd9d1503cc1a02e019f23616
+SHA1 (patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h) = 33c15c17314a6b31e57e9c719d3b16c4c2500265
+SHA1 (patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc) = a2689c86bbe296c98e65f1f71fb5250bdb9549c3
+SHA1 (patch-src_3rdparty_chromium_content_shell_BUILD.gn) = 0f4a9059699a73df180d558f05d0c32b8c3c74c4
+SHA1 (patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc) = c1177a45a477c8bf98104e0d4356b8000d56c19f
+SHA1 (patch-src_3rdparty_chromium_content_shell_utility_shell__content__utility__client.cc) = 682574b8a753fbae2ac7a244fa353d74e8eb59de
+SHA1 (patch-src_3rdparty_chromium_content_test_BUILD.gn) = 7ee34009ff075d1af8b5d6c0b884f815b7e60a1d
+SHA1 (patch-src_3rdparty_chromium_content_utility_services.cc) = b1b563f74fb85b6727594538bc2c2050bad9ca97
+SHA1 (patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.cc) = bb88a8af2daa1ec69fac99f0ec9be494d864b340
+SHA1 (patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h) = 6ba3ef820e8b13d072b43f47b4397c30dbc3af38
+SHA1 (patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc) = 3b506783181810f188acf26c76ecdcaf81c1eb57
+SHA1 (patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h) = 199f5680fb1b1ee84ba60df1eddadea0d8bd2b24
+SHA1 (patch-src_3rdparty_chromium_content_utility_utility__main.cc) = c0ee8654e269c33d2a8d4c31201a61d8a98a9b4a
+SHA1 (patch-src_3rdparty_chromium_content_utility_utility__thread__impl.cc) = 45944906fb2f1285a712ebd35cbadb49f4553ccd
+SHA1 (patch-src_3rdparty_chromium_content_zygote_BUILD.gn) = 00512232debcdc307b01e324bf0132712083324b
+SHA1 (patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc) = 4a03bd9bf8ce532754459aa2dc9c4e1bef181dc7
+SHA1 (patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc) = be3b0f689f0190cdf0cc4bafbb31dba2d5e8130f
+SHA1 (patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc) = fb9f2124ad6ebf015fa99d4263c5c2d9333f94f9
+SHA1 (patch-src_3rdparty_chromium_device_bluetooth_cast__bluetooth.gni) = bb5b63d2ee9fab9258ab61f0cefe722ac28c9c92
+SHA1 (patch-src_3rdparty_chromium_device_gamepad_BUILD.gn) = 0936a7f98dd8fdbbb1c464b1186427444349baf0
+SHA1 (patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc) = 213d311dffd711969f75844b99ad601250939230
+SHA1 (patch-src_3rdparty_chromium_device_gamepad_hid__writer__linux.cc) = 14ae4871a679b3d27ecf4c646e7eaaaffbd28d82
+SHA1 (patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc) = 42a3159d7e19e1a6babcad79895305d195c5eafe
+SHA1 (patch-src_3rdparty_chromium_extensions_browser_api_management_management__api.cc) = cbdfd993b529b792685d1de683ba0fb5effa2b58
+SHA1 (patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc) = 0b15d4f1fc8bdb156e8cb9a572c1cc63f4fe51df
+SHA1 (patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc) = f54cc50d47bee18ac1848c19d1202bb9ea8803dc
+SHA1 (patch-src_3rdparty_chromium_extensions_common_api___permission__features.json) = cc41d83ecf6a40a320de50afde6d023fd88320d7
+SHA1 (patch-src_3rdparty_chromium_extensions_common_api_runtime.json) = 1bb5eb10b41d0a85e2f50b451d68cece2504a79c
+SHA1 (patch-src_3rdparty_chromium_extensions_common_command.cc) = 3f6158806e9cb86df92b5ea78b6f25aa517cea00
+SHA1 (patch-src_3rdparty_chromium_extensions_common_features_feature.cc) = 6649655b96991b580c4c7ea64df945a6856d736b
+SHA1 (patch-src_3rdparty_chromium_extensions_renderer_bindings_api__binding__util.cc) = 2007136709b3f4217ec52ed0e5599f4359e3dc94
+SHA1 (patch-src_3rdparty_chromium_extensions_renderer_bindings_argument__spec.cc) = ef59f6295a8024376e6eac8743343335d570e357
+SHA1 (patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc) = c595f84c60691cd3e881aaf214b52c2820b7ab9d
+SHA1 (patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc) = 5ce68e7336ef4eac916a12d05a9e35adfec92bdb
+SHA1 (patch-src_3rdparty_chromium_extensions_shell_browser_shell__browser__main__parts.cc) = 021aa5c9068f2fa38a67cc812d7b7932cb18c781
+SHA1 (patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.cc) = a3a9185d2c9e1583b3fedfadd94ec5cc05bd63f5
+SHA1 (patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.h) = 861eb96d9fc9f3ffa394ee8ae634067d299ced76
+SHA1 (patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc) = 6c177386426d1cd94c04a2c2397730b34cc57c16
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc) = 9a8bf03b30992904330c65f4961ad4d6da32b27e
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_dawn__context__provider.cc) = 445ec193be368a2edd621d17201b4f3ca64ef3e0
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc) = 06fe499899b4f4db8aa1dc5d30d920248f53befc
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc) = 23a648cb7317bc1882b3f6a66810f3eb57192e58
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc) = e7781198f8ac1e69f44af2c5ed9487fe3549234e
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc) = 372727972db08b164fe2b0aca4dd5a5cbc2dea19
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__factory.cc) = 77e794248169d299f3a7c4768ccfbb799a6c314a
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc) = 0afe9f23e99ea6707984934fb0f52a10b64acf34
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc) = 34de06cae637847637789027cd0df1b50dd89a71
+SHA1 (patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc) = 65ec6dfddc942ee4c1dde20283af4f22c8dc220e
+SHA1 (patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc) = 308e88f63c989f15b30bfd9a52bf47f448555641
+SHA1 (patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc) = bacd521c932a69ee12618d4f20859ae26de48897
+SHA1 (patch-src_3rdparty_chromium_gpu_config_gpu__info__collector.cc) = 2229bbffbc3abdb8e7c2305c4d729ce1eb4eb823
+SHA1 (patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc) = 5a554c2a53568404f9c1f8f9f1fe9e8083761edb
+SHA1 (patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc) = 90ebeba9396d14ee6e11c03cd86f6ae7e2125d2f
+SHA1 (patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h) = eeea99c2b8bb941ada73e4250bbffcb1fc910b98
+SHA1 (patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc) = 0b525b36ef1121c396d73aefe23640917db4c274
+SHA1 (patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc) = 610b89485cffed6519cdf943b60d7e39bde01134
+SHA1 (patch-src_3rdparty_chromium_gpu_ipc_service_x__util.h) = 6b28e974050eec8dbf20a98cdde1fb4803aa8ace
+SHA1 (patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py) = 56b6d80a29ba6ebefeddc09a32beb390c22d58e5
+SHA1 (patch-src_3rdparty_chromium_gpu_vulkan_semaphore__handle.cc) = 8eef71110f8444ad7bacd85e930101f6db53a507
+SHA1 (patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc) = 5c295836de834e04f6959945d8824889bad5ffeb
+SHA1 (patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h) = cdad174b6b23a714b2e440fe5450375d721a68ce
+SHA1 (patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc) = 430fcf35005af0da67a088d3086b27c8af2e312d
+SHA1 (patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h) = 3373787838bd72a0c654636debd46c02c0f79c41
+SHA1 (patch-src_3rdparty_chromium_gpu_vulkan_vulkan__image.h) = 41b41b2878f986b076480324f47a16f2e934f884
+SHA1 (patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc) = 1a7f183343f92a508428541c4c3a9010f5d0c444
+SHA1 (patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc) = 1f2fe3ae395f4fe84859a1609fef760480efcc25
+SHA1 (patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc) = 6e991de2d04ba393d44b730823f6690ad8f17d61
+SHA1 (patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h) = e6c6bd9717d20b0fd2c1008b9c6170ac7520ef06
+SHA1 (patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc) = bc41301d90ba1ded0dfe46a7f61960fe2d071279
+SHA1 (patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc) = 177892e3041c6b2dcfb22857f99368198ad54624
+SHA1 (patch-src_3rdparty_chromium_ipc_ipc__channel.h) = e4b015307984d09f80264d1d3f948267f471de29
+SHA1 (patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc) = 941ed5e15e564addf2e83ae8541b460fc71f8fb9
+SHA1 (patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc) = 84378c9f04dfb5d461333b19c308a18cf5aafd62
+SHA1 (patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc) = 46600edba0d9ad41d24192ace1707fc98b5a8f9c
+SHA1 (patch-src_3rdparty_chromium_ipc_ipc__message__utils.h) = 26e8e3b27f2b1669a7428782190e857b7526b0e2
+SHA1 (patch-src_3rdparty_chromium_media_BUILD.gn) = 7f710212d907166263d0a87ee03f10e3ec77232e
+SHA1 (patch-src_3rdparty_chromium_media_audio_BUILD.gn) = 7c1ec08f0f408add785afcde4ad715cd8a1e07a4
+SHA1 (patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc) = 57aca596b8ba807b6eb7916c2363f35e9b0316b4
+SHA1 (patch-src_3rdparty_chromium_media_audio_audio__input__device.cc) = fd2f64f3dd6209e24f67f0297d0250715aa74d60
+SHA1 (patch-src_3rdparty_chromium_media_audio_audio__output__proxy__unittest.cc) = d1ef65416d783ffd309928c42c83d5a5d601bc0b
+SHA1 (patch-src_3rdparty_chromium_media_audio_pulse_pulse__util.cc) = ad136d0f35bf05d03313234b612e0a906b5c307c
+SHA1 (patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.cc) = 479d1eef38b617c4f71c6798c4b6ffc2cc209b93
+SHA1 (patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.h) = 6fd0966023434aec68f11eb9ba3ac178ecaceb3b
+SHA1 (patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc) = 208e7d726b4617c24fbe861de6431cfec482d3dd
+SHA1 (patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.h) = 353c08375e96994d3bdc5b2238a4d206abed3559
+SHA1 (patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.cc) = 406f5fd558c7a549f38d769c8465b301a8a4e3d3
+SHA1 (patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.h) = c4e8466589dd3aa2dfaa5197ca62d4dfb6cf1808
+SHA1 (patch-src_3rdparty_chromium_media_base_audio__latency.cc) = fb1c08231b6e6dd90f14fe532811a66764b13930
+SHA1 (patch-src_3rdparty_chromium_media_base_libaom__thread__wrapper.cc) = e89488addd10bb59c4b2a9814a3ebbed195f0a63
+SHA1 (patch-src_3rdparty_chromium_media_base_libvpx__thread__wrapper.cc) = 99cb5bf3b05c1e08d7f8abf386baf0645d806563
+SHA1 (patch-src_3rdparty_chromium_media_base_media__switches.cc) = 0654a739390d1eee0b9855c17bb997da03977aba
+SHA1 (patch-src_3rdparty_chromium_media_base_media__switches.h) = 7be4055c6f62f1b657bdf0680ac28d4585d805f3
+SHA1 (patch-src_3rdparty_chromium_media_base_user__input__monitor__unittest.cc) = 07efb655d712114412be69713424affab690c967
+SHA1 (patch-src_3rdparty_chromium_media_base_video__frame.cc) = fcf80da4daf680bd7b4fcad15096e7a07dd41ebc
+SHA1 (patch-src_3rdparty_chromium_media_base_video__frame.h) = a1b2f636d208df7733fb0e73a0ae534149743ede
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc) = 5a65448b4f1dc0b0b51bd75c62ebc53c4d1b4452
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc) = 44cfcb384e8e8dc9090853862269b8b6337c8a39
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc) = 58bfab8f501d3b14ca6c51ed971abacf551cf707
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc) = 5d8ae5f21e8cea3366e8375ad68284e006bd54a2
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h) = 534284e515f108c02364a84e48eda463d5efc12a
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc) = a85edd3b5f03add1dc6f9a7768589ae59fbe2151
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h) = bac3cb06682f43f763723e6786892c7bd43d5fed
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device.h) = d1fb4fb3b104062fa058708d6b409f80e8bfcd0f
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.cc) = 5ec4370f9f71df3479dc71b9baf18753bf458ba7
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.h) = 3409ec7638696c4e1e81a73cb56a79e860304de8
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc) = 12cf9fcdbd2077e2c93d1c20009a2214192662e8
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.h) = fb6e4ff956426bcd37e439596a29ac5c4423b4d9
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc) = 91d273e206e1c3eb552e15d4c6d022256d7023d2
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__tracker__factory__impl.cc) = 88b0c692f3135ad8e01155b38be0d4581b3159af
+SHA1 (patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc) = 7b694d0cd6735c3bcc290a4611d599167d850ca3
+SHA1 (patch-src_3rdparty_chromium_media_cdm_cdm__paths__unittest.cc) = c62a3291be727e3902bc2b1972f8c47ce4dc7a76
+SHA1 (patch-src_3rdparty_chromium_media_cdm_library__cdm_cdm__paths.gni) = 0f6016d55ae95f5e7de7c491e799892c4a2d7489
+SHA1 (patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc) = a4fb9f336d468a6f69a17107335641251bad629c
+SHA1 (patch-src_3rdparty_chromium_media_gpu_chromeos_gl__image__processor__backend.cc) = 2bc47424f58d4fbed812f7166e4135377593f680
+SHA1 (patch-src_3rdparty_chromium_media_gpu_chromeos_libyuv__image__processor__backend.cc) = 6d36cd86fff45ed5d5417d07e6ae144485493191
+SHA1 (patch-src_3rdparty_chromium_media_gpu_chromeos_mailbox__video__frame__converter.cc) = cf77c7e494ea4559d6ec66dedfc458c17987a15f
+SHA1 (patch-src_3rdparty_chromium_media_gpu_chromeos_platform__video__frame__utils.cc) = 30d6badd05ad06ebfb00257c2e2ed6c5e45761e3
+SHA1 (patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc) = d65566d9456bd40fde167b548c30df3aab62f378
+SHA1 (patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc) = 3cef60cfc57e78bd8922d92cd63cfd9873aa69de
+SHA1 (patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc) = 4b818dcc7a0aa5105e1770af872b88066672bd69
+SHA1 (patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h) = 75fe8e39ff222205316646501114cc0f959e856a
+SHA1 (patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc) = dfacee29004cc8bce1c80fb2ca630bae1521b2f3
+SHA1 (patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h) = f29ac4348a3fe9736529504ca88863c333c48eb6
+SHA1 (patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc) = 53d1904446b6341b65a0ac9237d9aa09e77898e2
+SHA1 (patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__wrapper.cc) = 5b70f17c08401ed873467f77670efb0a286de8b8
+SHA1 (patch-src_3rdparty_chromium_media_media__options.gni) = fe6ccf4d7e4f0a6481b9c9c85f74285863c3a39e
+SHA1 (patch-src_3rdparty_chromium_media_mojo_mojom_stable_BUILD.gn) = 5b2f545ea291449ffacad8ec62243dc32dfcf08c
+SHA1 (patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc) = f68ea469c6ead400711d43268638b8de180d2f1f
+SHA1 (patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h) = 1e72dd8f848fe3e813427b6a792a5ddc94202b01
+SHA1 (patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc) = f8166f17ae32363bb1e9f35aee2b4070397831f7
+SHA1 (patch-src_3rdparty_chromium_media_mojo_services_webrtc__video__perf__history.cc) = 61e993464221bf6833c602d889f703bfbb66f3a5
+SHA1 (patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc) = e93397dd9d611ada06858f94f11435ebbd64e6d8
+SHA1 (patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc) = b26795c7ec5e252ce8137946cc8621e273232449
+SHA1 (patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc) = b07fd1d0da728707de251f37e7ce987d6b34e9d2
+SHA1 (patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc) = a5bb2ff6a3c0787efa7d2b33cef49b6568e7592f
+SHA1 (patch-src_3rdparty_chromium_media_webrtc_audio__processor.cc) = c67142dbafd61b20bc3f43905e060c89fe4152c5
+SHA1 (patch-src_3rdparty_chromium_media_webrtc_helpers.cc) = fb27ac71e1728f076605af0a533f698abf27fd4a
+SHA1 (patch-src_3rdparty_chromium_media_webrtc_helpers__unittests.cc) = f50cc8432ead1a5706679450435cc520a84b88ee
+SHA1 (patch-src_3rdparty_chromium_mojo_core_BUILD.gn) = 0ab796956ce4ffe5c73a86d66b332e0156a6aef5
+SHA1 (patch-src_3rdparty_chromium_mojo_core_channel.cc) = 627dc671f90262d0189def3485ebf6c4ee613e54
+SHA1 (patch-src_3rdparty_chromium_mojo_core_embedder_features.h) = 6ff3def34d3bb255c7edaecfac23d3b887aae9fc
+SHA1 (patch-src_3rdparty_chromium_mojo_public_cpp_platform_socket__utils__posix.cc) = 9c80e09154b7a81b715c947bd419489f175e4257
+SHA1 (patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni) = 8e5612a3250675fef639339a7bb4631f8c7107e0
+SHA1 (patch-src_3rdparty_chromium_native__client__sdk_src_BUILD.gn) = 97d2207848a29751ff25d71b55a2681e0d160b04
+SHA1 (patch-src_3rdparty_chromium_net_BUILD.gn) = c45775f830fe77ca443f1fcc5bacaf4d34d627fe
+SHA1 (patch-src_3rdparty_chromium_net_base_features.cc) = 4e5b0db0068a41154dbd1bed94b11984c645e6c3
+SHA1 (patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.cc) = b637a33df137bc0fffc2d0f75a97ac1b64adc12d
+SHA1 (patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.h) = afb7671fc94b187858cd45efdd85e49eaf2d353b
+SHA1 (patch-src_3rdparty_chromium_net_base_network__change__notifier.cc) = ca8f876f9194a83c994cb3b3505a2cbfb03ca30a
+SHA1 (patch-src_3rdparty_chromium_net_base_network__change__notifier.h) = 22f0e209cfe73344e87a1b28f8e1777ce8f96d53
+SHA1 (patch-src_3rdparty_chromium_net_base_network__change__notifier__passive.cc) = 585bd91d6fb619e671f30294a015eecd217131c6
+SHA1 (patch-src_3rdparty_chromium_net_base_network__interfaces__posix.h) = 2acec8446e47b01937b8475ea129884d8da1ce5f
+SHA1 (patch-src_3rdparty_chromium_net_base_sockaddr__util__posix.cc) = dc8b7bc5be41a08049825a008508e236747c7508
+SHA1 (patch-src_3rdparty_chromium_net_base_sockaddr__util__posix__unittest.cc) = 6ed12eeae0eb2ac09cf02832eb51912fa929e1c3
+SHA1 (patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h) = 763fc0a35781d54abf8183b9b948d6d84d33342f
+SHA1 (patch-src_3rdparty_chromium_net_disk__cache_simple_simple__file__tracker.cc) = eafd2af927551bd6b666698b3b1dddf1a53c42ee
+SHA1 (patch-src_3rdparty_chromium_net_dns_BUILD.gn) = 5635d20190a27513fe3d0a8fd9c0f2837364105d
+SHA1 (patch-src_3rdparty_chromium_net_dns_address__info.cc) = 0d4085e902b10bca089c7cf2babc44dbd64e5929
+SHA1 (patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc) = b57c9af8918d5a76042b361c1750b0d22a1234a7
+SHA1 (patch-src_3rdparty_chromium_net_dns_dns__reloader.cc) = d75060d7ecc651cf5d8e0f89d98d21b23ba4c7dd
+SHA1 (patch-src_3rdparty_chromium_net_dns_dns__util.cc) = 24fc4d22a96c0ec9469e0c954454de78caccaace
+SHA1 (patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc) = 564c5c8fa7eafa946505ba2dfccbb0d910ab7fd9
+SHA1 (patch-src_3rdparty_chromium_net_dns_public_BUILD.gn) = 51c13a6b95efe370d2c4e2e2f538b6bab35d3885
+SHA1 (patch-src_3rdparty_chromium_net_dns_public_resolv__reader.cc) = d423aa137df8f6a18405fcfb9f81efef819921bc
+SHA1 (patch-src_3rdparty_chromium_net_dns_public_resolv__reader.h) = bc2fcf7176d8a5471c375c33e1c38baf88b9049b
+SHA1 (patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.cc) = 7ad9a593a8539fe7e8d8d2f9cca78f86fc5aefbf
+SHA1 (patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.h) = 4bd0092716efc4f560be4fc9f6db6f29a08f8fab
+SHA1 (patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc) = b5958d518e47747bbdf6a80cea9ced16110d195a
+SHA1 (patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.h) = 7aa3263c4995b7ee01e43a8de86bdac66cb638dc
+SHA1 (patch-src_3rdparty_chromium_net_http_http__auth__handler__negotiate.cc) = 181fac4434b526e7a117303c29a17e5055e33190
+SHA1 (patch-src_3rdparty_chromium_net_http_http__auth__preferences.cc) = 819826494d415257b8f07358f59ad2dbd5ab4f3f
+SHA1 (patch-src_3rdparty_chromium_net_http_http__auth__preferences.h) = 95d6e049a77ce5ac46935ccfa0706301a0cb7f8a
+SHA1 (patch-src_3rdparty_chromium_net_http_http__network__session.cc) = d82202b25d1866aefb4b6bd98b52512a74c1c152
+SHA1 (patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service.cc) = e9a4da970c5e4bf55d54ec42e6d3249edc3eec51
+SHA1 (patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc) = 480eb460cbaa34a101e5b713a210eed60ecc46c2
+SHA1 (patch-src_3rdparty_chromium_net_socket_socket__posix.cc) = 26ead2b2d5ed28cb26e89c7ae4846f2d8a4ca1a9
+SHA1 (patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc) = 63ff0e69a590de54287695b7353b5525969db150
+SHA1 (patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc) = 22be9ee46c6c0d0d7942605215fcd57353750887
+SHA1 (patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc) = 70269b191d3392081c651d8e369f00b95998a979
+SHA1 (patch-src_3rdparty_chromium_net_socket_udp__socket__unittest.cc) = 1bc5a29113b95f81110cfc9b480bcb5046292b41
+SHA1 (patch-src_3rdparty_chromium_net_third__party_quiche_BUILD.gn) = d9a3e6fd7caab454d72f23a1efab2eaf5deaefd5
+SHA1 (patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc) = b39c7d3c442ddb05db36628a2bd66efb78018f01
+SHA1 (patch-src_3rdparty_chromium_net_tools_net__watcher_net__watcher.cc) = e332fd546881d2fc83d19d3787d9f96311e6be2e
+SHA1 (patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h) = 1e26d097798adeeeb29ff56c63007db322a25d67
+SHA1 (patch-src_3rdparty_chromium_net_url__request_url__request__context.cc) = 8742ef3fe428051dfaa89917b4d759159723fe46
+SHA1 (patch-src_3rdparty_chromium_net_url__request_url__request__context.h) = 6fd058c49520fda884e8cec3c28f18eacf9054cb
+SHA1 (patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc) = b810f374b31d2e7dc5790a11ac1ab947ad3f1dea
+SHA1 (patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc) = d543568c13dbdc29433c4f17c0fdea6b89eec07e
+SHA1 (patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc) = 8cc3bf17a5410ea3880fba772fdaa3d83d1fe0ff
+SHA1 (patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc) = 3f7f76e3cac9d7b80f4d6ebc8da1465f4194af03
+SHA1 (patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h) = 663f3e388acf9fe096dba19b57fd51db02205ec9
+SHA1 (patch-src_3rdparty_chromium_printing_print__settings.cc) = 6a9759160b4ff301dbd26d1da13ff2cc6e9d8170
+SHA1 (patch-src_3rdparty_chromium_printing_print__settings.h) = d0e79036b581f2c0e4c82ad7135fb724ee16454b
+SHA1 (patch-src_3rdparty_chromium_printing_print__settings__conversion.cc) = 5749c09fc10779f84feb93227822d87c4c76d91c
+SHA1 (patch-src_3rdparty_chromium_printing_printing__context__linux.cc) = 974da97079bd5d292c943b533c3ba32cd42ef81f
+SHA1 (patch-src_3rdparty_chromium_printing_printing__features.cc) = 450855f1f46fee27d578c9aed548c5686c6a605d
+SHA1 (patch-src_3rdparty_chromium_printing_printing__features.h) = 465966b68f1746c045cd928548ae2cd316cd4965
+SHA1 (patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc) = 645453e7f0126265e2d54fbcf942056d652d41a1
+SHA1 (patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h) = 8efeb3ae8c693ae3b050db87039480efcea95bb9
+SHA1 (patch-src_3rdparty_chromium_sandbox_BUILD.gn) = 51457132dc40a99b3bccd97a3d47e8326cb67e73
+SHA1 (patch-src_3rdparty_chromium_sandbox_features.gni) = 93b7ae6ebd8d31736c80c952102b03b566234023
+SHA1 (patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn) = 2e3cb73d8085624e149b2c6f9ec7f0d3af704672
+SHA1 (patch-src_3rdparty_chromium_sandbox_linux_services_init__process__reaper.cc) = 5ec77ce4c569a2bd7a871fbebbbb4892b05fb53d
+SHA1 (patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc) = c2293a2ae1efd35151c7e5f489c1a5edba386b76
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn) = 572809d8774dba0b50b3dd6ac05e5f38028d1a80
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_features.cc) = c1fcac1e67fd8d782f7ba9348557cc4a73f8093d
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_features.h) = fa74e0aa664cb41a157e3e4a78c87e863bce0a16
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc) = 2fa6bbbadf472adb9ea5d7b66ee049d2be94774c
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h) = 9f148e63d5fd354ed9cb0eb6c7783c3e26cd95a8
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom) = 998da97aae0c5ceb21c02c0a51add96c1b3ea404
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.cc) = 20ba18a7aefa14066f19183671787c778e1c738d
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.h) = bcc16c297c3b6d47e4dbc9902910d234f72df08a
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc) = 53fa070923bde5d99b671461aafa3e7fc8f0b33f
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.h) = 23945c4ff2444c0616404662bfdb48d3ee00bc15
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc) = 29c1680854e05f6fb0ff56d3142a87aabc399169
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_sandbox.h) = f5363643e18497f73bb881b86e5e7cd6438f5316
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc) = 829955dde84c123995479829f9b03977e7728c82
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_switches.cc) = e5c58817b4960861c84dca355bc3301b73244854
+SHA1 (patch-src_3rdparty_chromium_sandbox_policy_switches.h) = e420a1d68732f6e5bf2f7643321d6a78dfa1c0b5
+SHA1 (patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc) = 34da1e1a20094ac9cde12046370ac6f5d1dfd00a
+SHA1 (patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h) = d56e4bdacbff751ffbe89b324aa7894477d2c033
+SHA1 (patch-src_3rdparty_chromium_services_device_BUILD.gn) = 53bf5fee9e0c13b1a077928e4625f0f704730a32
+SHA1 (patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc) = 4da3bd3413b1d54f66a2d21d3a023384fa55a081
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_BUILD.gn) = 78f83257574d071d7589b23f88ea12a2d466c32a
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.cc) = 3b31fe0dcd23802531d0b478d1a69b14fc6a618a
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.h) = cc206325efc2949cf18c080f4c1386137450a22d
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.cc) = 0dbb02fd603c8e4d761c6b41cd31bef098c0ce53
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.h) = ad3f60395ab8645882b7586ba902a2d528b9f70b
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__service.cc) = 3212ecd0dc7541691d23ed9440662c0216f1c566
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.cc) = 1d5c023b57373aca2be283b6c0e38800ebc6834b
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.h) = 40e51e534a17b7f94d5732760591b3c60ba1b115
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.cc) = d61e0054eb4dc8e24334d6aaadde35242886860f
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.h) = adcb6b2871bd5869e40ac40281c759559166efb8
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.cc) = ec0e491bf9e9f81cd4f558c70f69d4f04c2252a4
+SHA1 (patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.h) = a524067dd00536778c5ff2f2b1b6d1f4224a2936
+SHA1 (patch-src_3rdparty_chromium_services_device_public_cpp_generic__sensor_sensor__reading.h) = 9e37776d1e9148197094a7ac59f1acdafef897bc
+SHA1 (patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn) = 455a6b0e8e538be1b4c2d436aebddd463f2c392e
+SHA1 (patch-src_3rdparty_chromium_services_device_serial_BUILD.gn) = 7c2b11119a30d08667bcb512483d11516e9aa709
+SHA1 (patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc) = 28cd750d17993cb05d7184ff17d19e0c49b58910
+SHA1 (patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc) = 4b1df731a55f64c0bdfb2a04b487d1174e6e25d2
+SHA1 (patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc) = 572bb22a91689d83fc485f7d8dd8a6a8d941a5d4
+SHA1 (patch-src_3rdparty_chromium_services_device_usb_BUILD.gn) = b5a8c3ca383427cc07ece2600c9ff467ba800eda
+SHA1 (patch-src_3rdparty_chromium_services_device_usb_usb__service.cc) = f5c6bc8c45e5129648fa35c0b6f7f729f1da4095
+SHA1 (patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.cc) = f07c75f9ec7c6ec0b083b309c80a22405ae52901
+SHA1 (patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.h) = 4522bbb8feec8c210c1dd0810f47559fe887fc30
+SHA1 (patch-src_3rdparty_chromium_services_network_BUILD.gn) = 51c5dfb1136a5da25e3e0e993a2d1ebe225ffe78
+SHA1 (patch-src_3rdparty_chromium_services_network_network__context.cc) = c5898ee87a9d7e1bc2b1552359cb5ef45330e646
+SHA1 (patch-src_3rdparty_chromium_services_network_network__context.h) = 4d86a288e5978eb49f584db1fddcdfccc41b703c
+SHA1 (patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc) = 55e9cad0a16885f6ce118c2b94b6a4c5c146f39a
+SHA1 (patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h) = d1ce84c6183708bad47043b5a451343be92e231e
+SHA1 (patch-src_3rdparty_chromium_services_network_network__service.cc) = f123125b1b803dcffa195bd38889ccbed96a8ac2
+SHA1 (patch-src_3rdparty_chromium_services_network_network__service.h) = e23ba3ebde009a5ee7503fb2fe9066df632123d5
+SHA1 (patch-src_3rdparty_chromium_services_network_public_cpp_BUILD.gn) = 45823fd9fd76b86378ab7f3361253a9527fc7d88
+SHA1 (patch-src_3rdparty_chromium_services_network_public_cpp_features.cc) = 1a8911fdfe5dbe69e3d1a618084e7a0f56b166f4
+SHA1 (patch-src_3rdparty_chromium_services_network_public_mojom_BUILD.gn) = 5ebc99c5f605df239d4175d7edb388a2791da006
+SHA1 (patch-src_3rdparty_chromium_services_network_shared__dictionary_shared__dictionary__writer__in__memory.h) = d5e7a28a398255f933c1f8dbdc6d117635ed0faf
+SHA1 (patch-src_3rdparty_chromium_services_on__device__model_on__device__model__service.h) = a1257826c55a52134dd746ed6790ea5d960643cd
+SHA1 (patch-src_3rdparty_chromium_services_on__device__model_pre__sandbox__init.cc) = 1eee17f5d152647287370e1d0971bc38a515686b
+SHA1 (patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc) = c7b8b0ed4a641855df5371bfe6ba45306d847a20
+SHA1 (patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn) = c482b05e67200bfad04b963c49f2531223bc69e8
+SHA1 (patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h) = 21e1288281c64aa373d2a74c3e49d865a7c48f27
+SHA1 (patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc) = 5da17e38bce6654dd0ea582ff656da03b0455bef
+SHA1 (patch-src_3rdparty_chromium_services_service__manager_BUILD.gn) = e2bae929f864212043e79c67dc29633d067d9199
+SHA1 (patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn) = be1f5d26b35f26de3e59e28a12d7ec4c4ddef945
+SHA1 (patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc) = 228f67b9bf1f58544d2d99c63a50a938a54bf1e3
+SHA1 (patch-src_3rdparty_chromium_services_video__capture_public_mojom_video__capture__service.mojom) = 61f6133417cde1e0ad7d1ee5ae71bca4bdea8ae5
+SHA1 (patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.cc) = cc8ebc6edfdde60dda081751eb7d43f02d2eabec
+SHA1 (patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.h) = d604a58c2e28d24a5ca9807fe0af0c0e9a8a6599
+SHA1 (patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp) = 784405fc3ea10fe016db03f127e7e04f5f15b1b8
+SHA1 (patch-src_3rdparty_chromium_skia_ext_font__utils.cc) = 1c54b7a4fdebef4095068a210db9b03c24bcd0fc
+SHA1 (patch-src_3rdparty_chromium_skia_ext_platform__canvas.h) = 3df71977393c2dd0d54ab6b72aba0a3e674c0489
+SHA1 (patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h) = e7b5398b5af831db06703f8309d8d8f176199f8b
+SHA1 (patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc) = fc67f44caaa5a5d504bcdf3c775320baefaec2a3
+SHA1 (patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc) = 5a0493d124c4b795c9ef7e74c51acaa592aff711
+SHA1 (patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h) = 29df9d63db64414c9aa63584878ed7a45c8d816d
+SHA1 (patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc) = 65924320b3f29ab0a8335e9ad01c90456d2c8f30
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_BUILD.gn) = 84fb8d156f031f3ff8d62a1e9144a21e35750091
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_common_platform.h) = e8086bebcdea63a612cb23b1ba67fb17dad47c59
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_common_platform__helpers.h) = 57bfafdeb5067a17da54fee4bdb77a667f3534e6
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils.cpp) = 25f837a572a9a87fc1ad4658cd977ef15ca85ea4
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils__linux.cpp) = f75a135bddcbddcbdfacd4f2470bcde30063fbd9
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_compiler_translator_SymbolTable__ESSL__autogen.cpp) = de312dcb7c963a3d35e2885fcaf4bf3c78b8c091
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h) = 75bd0ea19bb5ea5929821ba02d4f61945db6d23b
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp) = b742d7b6a08f231a916ad9d961145439abb45449
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp) = c41650e26450372e6b04f4ff49738bb72e7e1f74
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp) = 809071fd924c50cd99d15a69004d87f852b85da4
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp) = 1399a0e5cde293100f4bcba264f10457088c9ee4
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp) = b9be88ba78de61a1fa723f03fc0ebcee3fc6aa61
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp) = 9ef698da8165aef6a36acf9995cbe34ece2b813c
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h) = 909eb8c6699e19b7afb53c01cf0063246ebc0856
+SHA1 (patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn) = 937b534ac694f70c6455575db8f922e38fda9f9d
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc) = 7c86b2a6f9abdbf532c1308f5a78e1c8f44691b1
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h) = f38b709d2cdebdb2fa577089335a86fd00d9744e
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h) = 18364af054852fb537e6dc2577852432bb4da32d
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h) = c80717444fbb1996221780cc825cc001497dc5bd
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_public_platform_web__vector.h) = 891a92e74d3b7898818f0161cc9ec903120f7a6b
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py) = 35a023f27e740f863b5edc3a964e1c906c6d7931
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_build_scripts_run__with__pythonpath.py) = e0d41b7dc611fd9bd34a71ed96a13f42a9455ce4
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc) = a00bef8e201666ae078324387dbbe09df7db483c
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc) = da609482ea0a82e6b9bcc95e666a143b6e6f0680
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h) = b7dcb2da184995b5ba3f0785d7ea648a9b3a602f
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_css_properties_css__color__function__parser.cc) = 4ef540534b17ec70b38a9f1743fae57da6104eba
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc) = 4e8b0a004e1fd44002d2453d7f5ac868bed7d604
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_execution__context_navigator__base.cc) = cd3d4a3358c7d6e0a6de4c96d7e28f6581984c82
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc) = 833682d6eeab3523bf48e80693553ba2165a4201
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc) = b96cf711a21fb37c681267f3d5ca2d417dcff739
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc) = 5f74418265561e1a1c4264e62b4db06dc65ebebb
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_track_vtt_vtt__cue__layout__algorithm.cc) = 05fab5f2c789087d21cf7605b33f7d55dbaf9f12
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc) = 6e5cae1e1722f494cfc52244e98412735e7e1d4c
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc) = 0788b591d44b37a32c1b11a4490501210137cc5a
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc) = 45dd43290fc72bfd8fca6b02589dec39d3e62514
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc) = 429b0ecd5ff057f704a93b9cef86ba9db505f8c1
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_miscellaneous__operations.cc) = 20ed92adab9421731cae10fc9c9ffbd4b7dfe90e
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_queue__with__sizes.cc) = 32110924daf47cc7091f39ba3e53b42f476c7897
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_core_style_style__crossfade__image.cc) = 33cc3c57254ca4c086bc2173e57bfa53abab4f47
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__device__factory.cc) = 244927596a35ca45ab89456a59a94785ab28df32
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc) = 28a45766bca76eabb8f6ef51f6577443b6ea083b
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni) = 5034f774b92efa05b02081b946b459c1a9f5f5f6
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc) = f74816e9e38f4e413b5374374ab8a02af6ee3bcc
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc) = e62fd7786161bf544a22dc0ead08af4e531f241a
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc) = 3eb4c6af3ef84450a2cd918ed2862e8ca9d08147
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc) = e516793e753c121391b0b005ace1e87379706410
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc) = d393518da3f25d558f2540010279330d7ffa207f
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn) = 5e4eff5b05e576dfc9be1f2331ca274ac2fb8952
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc) = cce2f6f172517c1a9b4b5abfed354858263319f3
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h) = 2208cd66c8568d6446aed10c6d126e03538b193b
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc) = 71bc1c0b961821011b436fcb3a0b3a69e6856141
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__metrics.cc) = ec1d58bdd85d9decfac7193cb0b5c99e93391adb
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc) = adb035a3f5c3163dcf10bc7be0e4874fc199097c
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc) = 6a1fcbdf0b37292dbc935e258eab585593978038
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc) = 8fe09027e048660a5bdd90a5b79be3f8ae6ced24
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc) = 7590c583f0d24e22810619cc1c34f5e2b7190619
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_color.cc) = 114db343a2f260db6c39c8a00fd13f708b915b11
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc) = d9a81cb9e7416f9f2d9ba13d8c5c388bfb2fe81a
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc) = acc575358d959c5149c968eafa2ddfb61d121cf6
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc) = f6f31aa03ad53edb67ac68dcfd5ffb86613b8254
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5) = 4cb8d728585cc75410bf3d327a1948e4614c6fc6
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc) = 089fff93a14d4fd7ea5fe4e37008964222ad91b8
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc) = fec0f1093e52ab27941b92f0189c1609ce2046ec
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_container__annotations.h) = f425805a50ae5f0b07b886b1e338bf055d53b1be
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h) = 6748c595e0a4ebfc6d0cf2b0f36a74f7f393f031
+SHA1 (patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_stack__util.cc) = f9290ad20511b1c7f78a49789037f3718aadd582
+SHA1 (patch-src_3rdparty_chromium_third__party_brotli_common_platform.h) = 2246c2c9135c6fd8e5fecb51a3c4fcda1a935183
+SHA1 (patch-src_3rdparty_chromium_third__party_cpuinfo_cpuinfo.gni) = 395d8334db6e712670b31b392633b49f5920f8f7
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni) = 824408609b62e5f54368fc97ed13c9d9b323c146
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn) = 2e748e393bb9368617890a8ead82006db2d20f12
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc) = 3473de5baf8d0e78c90d046ae1a1620bb782c88e
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc) = d6d97941051e4d8c2fa8c737cfb77cfbda5280e5
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h) = 45b803881f701b5ed37c9fc0f1527d6d5289ebf9
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h) = f5faf84ae44b282c386ee9b856f62c5924c5a9b3
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc) = c21349bdaabf894a60d714e0a732211f0168eeef
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc) = 90722f81545f5100f9de640258ca70a78ed80628
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc) = f459f5b61bf22912d77f7b05192fe4307fd56943
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc) = 070274145e61273acdcb9441b646bc2b43d85881
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc) = ac090058943b52a508fce44e958d7f03d22930df
+SHA1 (patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc) = fa045385b45456a5dfebe1007951d096fa318536
+SHA1 (patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn) = cb6b21ecff03ac54032ecb554acb3bcbc5af84ef
+SHA1 (patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h) = 9a17af605529adbf19b2f556b5a94d17bae9aeaf
+SHA1 (patch-src_3rdparty_chromium_third__party_dawn_src_dawn_common_Platform.h) = fedcd17e6aa2c10875c45ee291a90169e39b35c2
+SHA1 (patch-src_3rdparty_chromium_third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp) = b5b83663c12a569c0b1bd17d393d38593737ad6d
+SHA1 (patch-src_3rdparty_chromium_third__party_ffmpeg_BUILD.gn) = b363c013b32624cfd48deb161eeb2a82e4c5a07f
+SHA1 (patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_cabac.h) = 0a15ceb24598babcb781e3b99364f7ce11766766
+SHA1 (patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_cpu.c) = 20dfcf32711e1851db67988ea63bdcbc6da8fd4c
+SHA1 (patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_mem.c) = b833a7cd7c4f21fa1c8266c20c5fae18a19142da
+SHA1 (patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_random__seed.c) = 3d6e1415a5f6d3d129776d75e36a603ba362ac78
+SHA1 (patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_x86_x86inc.asm) = 9a51e157818b3588caca2c26b95a65900992e80e
+SHA1 (patch-src_3rdparty_chromium_third__party_fontconfig_include_config.h) = 2a1cb6f208d0fd4597b777c5f92e8f77fd12dc21
+SHA1 (patch-src_3rdparty_chromium_third__party_fontconfig_src_src_fccompat.c) = 589973cf310da6153b7e44c26268bfe46514a225
+SHA1 (patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc) = ba0a891a0d4965cbaa4b8fd9b4a05eda4f3452b4
+SHA1 (patch-src_3rdparty_chromium_third__party_ipcz_src_standalone_base_logging.cc) = bbac877e4349235ee5219c191d401f8af1912467
+SHA1 (patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc) = 37961107b08698a2a82dd7dec2aa3b1ea986f2ca
+SHA1 (patch-src_3rdparty_chromium_third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c) = 7f65641425dcb7a104a65b3ae0d8d0bc9f813493
+SHA1 (patch-src_3rdparty_chromium_third__party_libc++_src_src_chrono.cpp) = 38ea9926b1fcec60d2fca7d79e597625a4838449
+SHA1 (patch-src_3rdparty_chromium_third__party_libc++_src_src_filesystem_filesystem__clock.cpp) = 4a1cf3d71015ad140508bec6d7f271ceb30af5ec
+SHA1 (patch-src_3rdparty_chromium_third__party_libc++abi_src_src_cxa__guard__impl.h) = 92e6ec7fd34bf4b658950f5202f0388d22ee5819
+SHA1 (patch-src_3rdparty_chromium_third__party_libdrm_src_xf86drmMode.c) = fa74b75d282ee925fe464f424cfeeb2f8def9522
+SHA1 (patch-src_3rdparty_chromium_third__party_libsync_src_include_sync_sync.h) = 3731956e885427cd4534437589f72cd27bd68ea4
+SHA1 (patch-src_3rdparty_chromium_third__party_libsync_src_sync.c) = d92e42f32a46b265600ec6a799bc12808682317d
+SHA1 (patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn) = 60a7424fcb4445f01e410a98956f7765596944c7
+SHA1 (patch-src_3rdparty_chromium_third__party_libusb_src_libusb_core.c) = 155575c1c3aeeb5cd46cf859347a0ecc06f21275
+SHA1 (patch-src_3rdparty_chromium_third__party_libusb_src_libusb_os_threads__posix.c) = 3e8af30a02eca054b66c89ec56fcdf64d3000187
+SHA1 (patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c) = 74e8149c3361eec09b8b776e6f6083fd7ab22e34
+SHA1 (patch-src_3rdparty_chromium_third__party_lzma__sdk_C_CpuArch.c) = c36888d5d42a76119a976e96de4efb55f46f589f
+SHA1 (patch-src_3rdparty_chromium_third__party_material__color__utilities_src_cpp_palettes_tones.cc) = 1aefa7e80df8390175f74c70f27f77d65ed93bca
+SHA1 (patch-src_3rdparty_chromium_third__party_nasm_BUILD.gn) = 0b50568657bcc262e1c5ea4aae21a553d94b5b24
+SHA1 (patch-src_3rdparty_chromium_third__party_nasm_config_config-linux.h) = 5525eec5323dc2d61a7752edaa60d21a6bab26c8
+SHA1 (patch-src_3rdparty_chromium_third__party_node_node.gni) = dfd975d2432243af57f959e65ed08c2fab508943
+SHA1 (patch-src_3rdparty_chromium_third__party_node_node.py) = 6ad9a2e4936aab8eca60c11236447ac8ce604d2a
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_core_fpdfapi_page_cpdf__psengine.cpp) = b9c4a4c0fe2863d19e2b6fdcc065aa377f825684
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp) = 34b3da62c4f3bcd5ec38f5ab0b7a055f1027d766
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp) = ce24162529896464f3d6f0ee7f78705cacc07db6
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_fxjs_cjs__publicmethods.cpp) = f6c6d4a78b9d537d7e462f481154e5e21dd5f56b
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_fxjs_fx__date__helpers.cpp) = 696dde7bcffe347f72ff6b069c7fa08ce49b0668
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_fxjs_xfa_cfxjse__formcalc__context.cpp) = 2d1c414e9b56c331cd0c42c3ca7036682d5fb032
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni) = 757c04aa30d76758153e282b6ca251a3b337ca1e
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_third__party_BUILD.gn) = cf77c0c4918da3ef1a61e58c0fd06414ee3e29a9
+SHA1 (patch-src_3rdparty_chromium_third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp) = 8117c2d7f3bc45c4ef0347ecf13309e9b3d8068e
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_build__config.h) = a6b07de8236bb7ffeaf64bc4a1eed93a830504ed
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_thread__utils.h) = 21bd61b286a0680efc1b60f15f05ce2f40a285a6
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_time.h) = e0bed95971b15152deb22e6a393b7ee5b42e2ee9
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_event__fd.h) = 9d140021967fb83d459572ab5d3cf69eafd95c86
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_thread__utils.h) = b989f90813534e0b66506b4f99e82b93e5dad49f
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h) = 6276edbba2b4fdb8dcfa0aea268312b53d2aaf58
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto) = fa7743b69c539b09acda94767856e67db934b6aa
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_base_event__fd.cc) = b431b33e915699c983df5d11d752be2a127b3830
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_base_periodic__task.cc) = 5a89bc08741f96515612b08d8af24e836137a4e3
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_base_string__utils.cc) = 93ad8ca8c7dfa2c917729d3825fb9665e7e3a940
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_base_subprocess__posix.cc) = 27b5691eb45f95cfc837f312957276b255e62f1e
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_base_thread__task__runner.cc) = 841157940ada6e9564365780a6e5b259612493f0
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc) = 88298c19a31130f3d2673650db891469eddf6f5a
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_base_utils.cc) = c6baed2fb4675e9b12d9400168c5a6a1a134bc48
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_db_column_utils.cc) = f0ca551bfe0c3be43acd65f339a7b5b0060980fe
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc) = bcd40d5a6f8c0c3ff38b970ed1688307da19009f
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc) = 691a03d0e1cc1332c575cce4b68aa51fb9d619cf
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_ipc_memfd.cc) = f6f2c733e3f8f4e9cb4f8c5c97b730bcf129e54f
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_platform__posix.cc) = 6ff0b8d739a348a121341a3a7b40cdc8e8d3e183
+SHA1 (patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_track.cc) = 823035d49f1e03cc2a3318fc30341357ee6b5a20
+SHA1 (patch-src_3rdparty_chromium_third__party_skia_src_base_SkContainers.cpp) = 8c6a45c130f2910452fd4624045986a5759d9a60
+SHA1 (patch-src_3rdparty_chromium_third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h) = 68f39b077cfd899ee0a1490e8b43b6bb6836555b
+SHA1 (patch-src_3rdparty_chromium_third__party_skia_src_ports_SkOSFile__posix.cpp) = 74dfdd87fa7db18dc392924f1c73b1abb779d851
+SHA1 (patch-src_3rdparty_chromium_third__party_speech-dispatcher_libspeechd__version.h) = fc37204dbc47f25d4ef1dff098e11735d7b22a45
+SHA1 (patch-src_3rdparty_chromium_third__party_speech-dispatcher_speechd__types.h) = 68c895161dd035f9e05857fffce705782a5e5e45
+SHA1 (patch-src_3rdparty_chromium_third__party_sqlite_BUILD.gn) = 867b1e91f9221c305703ba4a56c720ba8b0b2c04
+SHA1 (patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation__dev_sqlite3.c) = 684d3a0bff38eff6603c732bbaf0fd9e577cc38c
+SHA1 (patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c) = 43793a17b6cf30abaaae232a1d9d25da9902493d
+SHA1 (patch-src_3rdparty_chromium_third__party_swiftshader_src_Reactor_Debug.cpp) = 1b070226eef73beca7636d4186951772dae4a886
+SHA1 (patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Configurator.cpp) = 436dfe5c4394f7cdbd0e94363743e7a50b26c55e
+SHA1 (patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Linux_MemFd.cpp) = 53981e76f34b1a30edd8779e0cb3a7d0e3fee9f9
+SHA1 (patch-src_3rdparty_chromium_third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp) = 7b003ac869ac8989b2fc77691d23685804755927
+SHA1 (patch-src_3rdparty_chromium_third__party_swiftshader_src_WSI_libXCB.cpp) = d032a3a56c2f55c1966870adcba406978018fc8b
+SHA1 (patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_BUILD.gn) = ce51b5d4a1e141999b6b8fc2eba7382c1416e018
+SHA1 (patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_fontconfig__util__linux.cc) = 8f48901f46d9bb6ab59bd6f04516ee70031aad0e
+SHA1 (patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc) = 5f41bd37e10c8d3df3c0bc69b47ee898cdf47615
+SHA1 (patch-src_3rdparty_chromium_third__party_tflite_features.gni) = 18342d6e3e0de9ff0c4eb98b91277496bf902a5b
+SHA1 (patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h) = 2634e989d6ba486c83d993958ff8e8d887479f07
+SHA1 (patch-src_3rdparty_chromium_third__party_wayland_BUILD.gn) = 7dab5e94758883e727b08e218a393424bada9f12
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn) = 3fa27897054e21f75ac31b7e2637953b2dcd696a
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn) = 3036097971f762745969808e3bf89c8778bb0257
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc) = 51d1cadd64c06cd1c4e94f4b27fdc8aa9e2428b7
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc) = 894e88dfdad080cbded546cd4defa31ad99eec9a
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byte__order.h) = fede3ffdd92c47c7c2e61a67b6396662b82f398e
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.cc) = ae88a2f430f8cd6b3a81450f22071cbecc9e5d67
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_net__test__helpers.cc) = 1c3baafcd76d083bf53c348794b79249f7d0795b
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc) = 1da624f0e1eb594d56b3f2be34d386dcbe8280c8
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc) = 319fe416b45fd5e8eeee94db705df888a1ba670b
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h) = 92687366a43b7a10d5015c15b6f53ea02e576838
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread__types.cc) = 0adb63f6e91bb4473c023064e88b743278007a02
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h) = c9fd798d2df4b4d4de9ef6f55e0f3aa333e44c81
+SHA1 (patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn) = 96cfc37e2fedbe1a5f8a1f69ab8f3212d9cdb013
+SHA1 (patch-src_3rdparty_chromium_third__party_widevine_cdm_widevine.gni) = c436d85e02e3b83899d21bc6f4ee2e4c078bf80a
+SHA1 (patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn) = fb018cc4c880fe2fd8a6772a97ce97d07edfe10d
+SHA1 (patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c) = 7beebe75d37bae8eaae57737a59a5cc39f176042
+SHA1 (patch-src_3rdparty_chromium_tools_generate__stubs_rules.gni) = 6f46457dc136e1aec0ac211221f9762d58791557
+SHA1 (patch-src_3rdparty_chromium_tools_grit_grit_node_base.py) = d617dbdd658da4d54668235a9c30a0f6f753f3c9
+SHA1 (patch-src_3rdparty_chromium_tools_json__schema__compiler_cpp__bundle__generator.py) = c52a89f391eb78e8e2475f6abc07da99baf5c7ad
+SHA1 (patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py) = 2da895f81d1a14dad22bed0cdf66d796fb9e3b39
+SHA1 (patch-src_3rdparty_chromium_tools_licenses_licenses.py) = a22e644354ffefafdcc84d919cb28129e6d67b30
+SHA1 (patch-src_3rdparty_chromium_tools_memory_partition__allocator_inspect__utils.h) = c50e6f6d3eebb970d8ecc54c61c4f2b57cbf4268
+SHA1 (patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn) = 13bd4d2e9dd8b2c005eaba83011895ca03936517
+SHA1 (patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py) = 24b853f2e4ba3be607dc901dbc8edfe1955e1ff3
+SHA1 (patch-src_3rdparty_chromium_tools_v8__context__snapshot_BUILD.gn) = 55a050ee389d109c34d887a8de7b18449617af6e
+SHA1 (patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py) = 7d6bb6973d43143c160385a3f251b489fd3cbcb0
+SHA1 (patch-src_3rdparty_chromium_ui_aura_client_drag__drop__client.h) = dc1e80fcc112c70b2c960c40de169f9b4426576b
+SHA1 (patch-src_3rdparty_chromium_ui_aura_screen__ozone.cc) = 19217aad8c6b61ea2630db2001081fd113ef2e3d
+SHA1 (patch-src_3rdparty_chromium_ui_aura_screen__ozone.h) = 6fc915f73fc5e1ef20180ade0c7f2969caf6c456
+SHA1 (patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.cc) = 0270a848dee77a152dcef0b0fd3ef5e19c3d564f
+SHA1 (patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h) = 9cb888e2ec1643770828d36f709f62e2bd44bd26
+SHA1 (patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__non__backed.cc) = ec03b64d5d232efa8e31fecc3df22aad62241637
+SHA1 (patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc) = fc5275eb127330b060f5937b724458c7a67c168c
+SHA1 (patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h) = 44c8642c18d5f2c7879cc6a80e7e2ed5d4e9d597
+SHA1 (patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc) = 58cf0ca03e00430ae03e3e2aa48917b2990488e6
+SHA1 (patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__non__backed.cc) = f702bf5b2b55683e6bf7f101f0c880541f6b9bc8
+SHA1 (patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.cc) = 8663e038cbfebef27fea2539a315ff797afacfc8
+SHA1 (patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.h) = b195f49f2c19bdac71dec75f22284e494017ee15
+SHA1 (patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc) = adafa88c8c07ede908e17e12802c22cbfe0ed47c
+SHA1 (patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h) = 6ca1c6d31c3d71e74cee5e79178f5a8a371e4468
+SHA1 (patch-src_3rdparty_chromium_ui_base_ime_init_input__method__initializer.cc) = 68c727203577b8c1d53216783552a37efe4b7fe9
+SHA1 (patch-src_3rdparty_chromium_ui_base_ime_linux_linux__input__method__context__factory.cc) = 3dc0a2ae872de9b42d086b4fd44db7f2c88349fd
+SHA1 (patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h) = a6e6148eeccb4650be74eb7a0bb1b477ccc2ffbe
+SHA1 (patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc) = 2788d493cc9a465c7a8baa3b2c7e6922d3c42479
+SHA1 (patch-src_3rdparty_chromium_ui_base_ui__base__features.cc) = d667aea51c949f2597131302a59ec4793b3543cf
+SHA1 (patch-src_3rdparty_chromium_ui_base_ui__base__switches.cc) = de3e3ee87a5f55ed1c002a1307c0710b8c2e0352
+SHA1 (patch-src_3rdparty_chromium_ui_base_ui__base__switches.h) = f3614c1a12ed8b7e61dfb81c981cf4cbf1d25e88
+SHA1 (patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc) = 954006f61d11c484ed8febe899dc086778844c48
+SHA1 (patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc) = c54e4e3d1faaa60c51856abf55f94f04cd9de1c9
+SHA1 (patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h) = 1ab6a2ca574b828bf9cb5253423a8043a34c766a
+SHA1 (patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc) = 5d73e8f9cc72b042ca2a3c5ffd92fbc9dabcfda8
+SHA1 (patch-src_3rdparty_chromium_ui_base_x_x11__display__manager.cc) = 94e0b3918605943da1476f7b636b938658d0e545
+SHA1 (patch-src_3rdparty_chromium_ui_base_x_x11__shm__image__pool.cc) = 346a95f95c9744f6d1595cf315b31b071e997c09
+SHA1 (patch-src_3rdparty_chromium_ui_color_color__id.h) = cd43bbbefacdd2aa59d29129f7b8f305fdefb348
+SHA1 (patch-src_3rdparty_chromium_ui_color_color__provider__utils.cc) = ca1acb20a80a1e4f271e3586cb481d86b984121f
+SHA1 (patch-src_3rdparty_chromium_ui_color_system__theme.h) = e01922042b1b8665970a52a1d071843a84b688b2
+SHA1 (patch-src_3rdparty_chromium_ui_compositor_compositor.cc) = 5fa5d3d22afeb1b3597bbeb3ba40de9727e7d085
+SHA1 (patch-src_3rdparty_chromium_ui_compositor_compositor.h) = 4ae653f9f2d2b4d4f9374bb7f3c063b6e051228c
+SHA1 (patch-src_3rdparty_chromium_ui_compositor_compositor__observer.h) = fc661d6ba2ba7f753e143dfbaf901c841c16e36b
+SHA1 (patch-src_3rdparty_chromium_ui_display_screen.cc) = d4e1167ea14fc80b3672589633e5b806f36cd9f5
+SHA1 (patch-src_3rdparty_chromium_ui_display_screen.h) = 3bcc99dbe2ca3fb19391853984d0f69468df82ef
+SHA1 (patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc) = 031027c1e5bfcdba677445f0c56f896d99d06c68
+SHA1 (patch-src_3rdparty_chromium_ui_events_event.cc) = e42240534ee9171d18220788cbf11494185d161d
+SHA1 (patch-src_3rdparty_chromium_ui_events_event__switches.cc) = 620c15a03a74a7a09828b0e1ad6bc1c0371118b0
+SHA1 (patch-src_3rdparty_chromium_ui_events_event__switches.h) = cc81b7c9e1c4720ab2de8bff41212879168b3944
+SHA1 (patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.cc) = fbc9662e277f3e72954126971186628f438a9bbf
+SHA1 (patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.h) = bcf0ba6db9e9e4bf7f62c5d9b8457cc872a24ce4
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_BUILD.gn) = b2e342f95147c5d3249d0ea889ea9204b5c0ce4c
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc) = da75d7ac270bd3d74a1d304f9c54c2982e863428
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_font__fallback__linux.cc) = c2aa6e6d11eb94e77117ab453962e2c307fecdac
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_font__render__params.h) = 08eaceec7482835830ac2aad4aa60eb3020df802
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_font__render__params__linux.cc) = 1f6769dc8da5d69ea8c6be20a579279e146ec910
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_font__util.cc) = 69a0752918d604e218c402a34d541cce8dd3027b
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.cc) = 364e0d5f86090f262a164becee85b0792a544191
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h) = 5252ba816307dca3c5311cf9aa20044dfad7c872
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h) = 6bd6f10d86be19fcbe41c20f138a638f5115f445
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_linux_gbm__wrapper.cc) = 3d05f2f2dbf13ec0421dcfe93a20c49c3cfc25cf
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_mojom_buffer__types__mojom__traits.cc) = 677262c0432458bc46fc819444407ff7407e9a85
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.cc) = ada5d52bb8dfbaed5389ffa69adedec0841a3776
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.h) = a5342b913e233f86acddc209e64c69e06b1ad4a5
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc) = 994bf93553dc2830cfb6ff468a236b761eb93a7b
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h) = 4f5274f16354095186791eb7814d94b55b573059
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h) = a36dda4d10b05b8b8d24e41da0d0779629fde26a
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_platform__font__skia.cc) = 36c17a123c21947f500be6d24f380726b8b842ce
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_render__text__api__fuzzer.cc) = 9050e3c6009cc52f592b2e4f1c9135422eabe803
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_render__text__fuzzer.cc) = 422423f93f63353679bafa7653c905ef5e502b0a
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_switches.cc) = 803c35f62d3bda5e25bfeac0a57bca93ce55c244
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_switches.h) = 8c411adb75affc3721c70ea70d1329c954e75ea8
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_x_BUILD.gn) = dbf347cfb061e6841775729bdf0676dbe7fa915b
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_dri3.cc) = 2a79364ca9212cc349d6a295ee431ff6400d457b
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_shm.cc) = d91560b904f00f42a5fe43b04cd34a0262dba32d
+SHA1 (patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc) = 8d60e48aaac3ae0181903694839e6af46c5f1d68
+SHA1 (patch-src_3rdparty_chromium_ui_gl_BUILD.gn) = b01b94124dadb35fe6b93ff1cf4ac0d0123917c5
+SHA1 (patch-src_3rdparty_chromium_ui_gl_gl__context.cc) = 79fbd156b810f93df8e790568470fc05cef4b420
+SHA1 (patch-src_3rdparty_chromium_ui_gl_gl__fence.cc) = 8e3fe08ec3e9c20f7a7841ea719cd7b1210f2e2c
+SHA1 (patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc) = 74d9d586f05b746a37889e2482dfec57a7468f18
+SHA1 (patch-src_3rdparty_chromium_ui_gl_gl__switches.cc) = b7dbd0661ec5b4f6834de1b7c04ac5422e7b8dba
+SHA1 (patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.cc) = 85e0439246112dae32294520dcd447c0a8c95ed4
+SHA1 (patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.h) = 173367fdd60289d0eff73c49e5fca855220d1f9c
+SHA1 (patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc) = 226be04c5ae1eecaf11de1555a139a1f97aa43a9
+SHA1 (patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc) = b62d843f227d2e613c3b289abb406b328edd6822
+SHA1 (patch-src_3rdparty_chromium_ui_message__center_views_message__popup__view.cc) = bc9b993837d0f7245a2d8c22dd74a1e682721ab3
+SHA1 (patch-src_3rdparty_chromium_ui_native__theme_native__theme.h) = 76783e1583ebed16f4cbad33fd1c704ebd6b4b03
+SHA1 (patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc) = 687f531733f7a321c5a31ea009337a0432236a06
+SHA1 (patch-src_3rdparty_chromium_ui_native__theme_native__theme__features.cc) = 440eb65c9f9570583503b19a92eb3967f92a3dad
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_common_egl__util.cc) = ec3c7173b7a097cc04bf9ee0d4d14ab575cef340
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_common_features.cc) = 4d3c9f518e8453772199ed95ea3c6658c6435b95
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_headless_headless__surface__factory.cc) = 5434d492cc95566e2e2eb3174e8fd4f69eb1eea3
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_headless_ozone__platform__headless.cc) = eb566a47edecd5d31261807513ebb8e9d170fbfb
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc) = 8a3423f4d516535d22a4845fe344d29c8c76edf7
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_common_wayland__util.cc) = fbf597f1e3dae1f0b98777084c9c7e13c784567c
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.cc) = 2885cfd1f02a0f7d4391150bb4e2a82fb29688dd
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.h) = 2d3510a296387fae414690f8f8ef328413d630d4
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc) = 13f1b5a4661179500e4058696dc99425533daaa6
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc) = ab2affb4ac88b21ddc883e55c0d5c8ded3d0a251
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h) = 9a494376a485b6904e9462b89113e89546db301a
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.cc) = 56a2a93bbd815bce469f16e596a8aa23f07fed3d
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h) = 46653e82e068d8e8fac64fbb7a8427796ca5b0fa
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc) = 585e8e372912cd5ee4b11d79345665aa857850b3
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc) = 4fc070e4f7b7185047d2f8d065ac01620e39c1b4
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc) = 0168b046877047ccbce2386466d649d35ade65a3
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_x11_vulkan__implementation__x11.cc) = ae1d46c31049a61062daf83c6725e39f02f8167a
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.cc) = 0c811a79bbba1397371841f5284be508094e2470
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.h) = ca1371177b4cbef8bb0ffe045dc82fa83b2bb6f3
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__window.cc) = 61ff55061c25cbb4438c2e237d5cd3d4ec49ca6c
+SHA1 (patch-src_3rdparty_chromium_ui_ozone_test_mock__platform__window__delegate.h) = 4ad39335f80a5fea7a8a6ea590b0cd7bc0afd883
+SHA1 (patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc) = 8b82ccab2f1711c33fb94afa62190209c5ace458
+SHA1 (patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h) = 5d254ad133f35cdb7aafbf0a95c82593824f4c94
+SHA1 (patch-src_3rdparty_chromium_ui_platform__window_platform__window__init__properties.h) = 93cd7274fae34a5ec5995de4255c2f4d6e34a8e2
+SHA1 (patch-src_3rdparty_chromium_ui_qt_BUILD.gn) = e14d6224bee0fc93845f69f4a130df90a325c624
+SHA1 (patch-src_3rdparty_chromium_ui_qt_qt.gni) = ae2ec970e499ab05c5a60511a593e2d9bb9da968
+SHA1 (patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__bn.xtb) = e784f6bacbc70c3af6864767fd11be487269f3af
+SHA1 (patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ja.xtb) = 4b47394e17f61e869544d8a2b4c8eb82d35b1ae4
+SHA1 (patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ko.xtb) = c4313f40088716dd7bd6f439a97b6bd781772132
+SHA1 (patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ml.xtb) = 6e8927f1dd5eab1bdaeeed9fc1b71a02970884ad
+SHA1 (patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__th.xtb) = eb544609ffe059e9ac5148bb9ef3c7048b5a058b
+SHA1 (patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-CN.xtb) = 4608d2cd5f7ac21fe41558f2a31ec4918b28127c
+SHA1 (patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-TW.xtb) = 4dcc921c9527eb5823442096c564a62d5062961e
+SHA1 (patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.cc) = 1e74eaa18a662a33a2ee543858605358bbbfede1
+SHA1 (patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.h) = 2c17a49dbd3774acfdd0374ca37c8d0dd7268840
+SHA1 (patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc) = 42947e370a1bcbb8aad7f51193370c0dfb0f778b
+SHA1 (patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h) = b248646d5f32742c220cb71b06f99f8daee393b8
+SHA1 (patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc) = 7cdf95188c079c45d05e7d1fdb633752607b8e62
+SHA1 (patch-src_3rdparty_chromium_ui_views_examples_widget__example.cc) = a8015cd1a291aa2890ef13ab2f093050352da521
+SHA1 (patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc) = 0a020e8156838586314fdcf6177ea16561e225dc
+SHA1 (patch-src_3rdparty_chromium_ui_views_style_platform__style.cc) = ea157a8f0ef1bc8b5bfeb298fa53172e82f8300d
+SHA1 (patch-src_3rdparty_chromium_ui_views_test_ui__controls__factory__desktop__aura__ozone.cc) = 390b285419e53d1ac89c0f14a4863de293eb9754
+SHA1 (patch-src_3rdparty_chromium_ui_views_views__delegate.cc) = e984ce8a4875f6484b3df788082d52d0ddfaa407
+SHA1 (patch-src_3rdparty_chromium_ui_views_views__delegate.h) = 61bff9693b167ed790cf4265719cd789d5a189b6
+SHA1 (patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc) = 7e9e3297340e128db897ee216ee0d5165ad0aaeb
+SHA1 (patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h) = bfd67e044ed7582de5da280a3064e3d3cb767242
+SHA1 (patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc) = 8b172a5eaff44b09a7f03e0e2e385468fef481df
+SHA1 (patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc) = d7c68bafa61ac489e0f2993e5a03567c525a6601
+SHA1 (patch-src_3rdparty_chromium_ui_views_widget_root__view.cc) = eb0ad2854e5187747a6f3bed655b67030672aafa
+SHA1 (patch-src_3rdparty_chromium_ui_views_widget_widget.cc) = 35dc2e313d32ac138170efb5fa92a39e74bdc964
+SHA1 (patch-src_3rdparty_chromium_ui_views_window_custom__frame__view.cc) = 1ecf900cc7f6726de602614c6aab48a4068d78e9
+SHA1 (patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc) = c8d4bf164ef4fad4ed746dbfb20b298cb8588947
+SHA1 (patch-src_3rdparty_chromium_ui_views_window_frame__background.cc) = 39ff13df30968db8b89c361ba240d185b33a0d9e
+SHA1 (patch-src_3rdparty_chromium_v8_BUILD.gn) = edb1ec28679729f04516cc775f288ac08321ca2d
+SHA1 (patch-src_3rdparty_chromium_v8_include_v8-internal.h) = b4916e57f3c10b98c04a8e70ee9029e4ab9456df
+SHA1 (patch-src_3rdparty_chromium_v8_include_v8config.h) = fc8474273a61a608f92386cdb31d04531753e072
+SHA1 (patch-src_3rdparty_chromium_v8_src_api_api.cc) = c72c79f6ef5e6dbce9288959e8dea91136bc40f2
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_atomicops.h) = 551c88bbeb5468cdbca7415aaafd11460b4012e1
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_platform_memory.h) = 9dcee6ac83b5be5dffb4f7e03efa6d5fe7937b48
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc) = 46aa0770ab4653e9e7ffd73602e2fdc9e872efef
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc) = 3bd45ce64d3a4437b710c00a4cb1dbe94fbafd14
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc) = 04d122db02a0b5ab2a1e877af7c4386bb54d94de
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_small-vector.h) = 41d3deaa3ea7db610cca34405f228f87500a6d05
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_strings.h) = 9ef15de696a54c09a1ed811715edb3741059b170
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_sys-info.cc) = d1b78af2510c0351207282ce15fd68bb8a5b172b
+SHA1 (patch-src_3rdparty_chromium_v8_src_base_utils_random-number-generator.cc) = 0bb8662e79fc8dfb12a4dc0bc082c0e8051ff39a
+SHA1 (patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc) = b95859ed1ca6564031ff27b8cf303baa2da7651c
+SHA1 (patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.h) = d1fd0a2773b949d9f517b3b47a43e6e4963e5268
+SHA1 (patch-src_3rdparty_chromium_v8_src_execution_isolate.cc) = 679dac38e83c4d9e4a50aee9c16c8bddb4c14801
+SHA1 (patch-src_3rdparty_chromium_v8_src_flags_flags.cc) = 5b8170a384ef248a10a5d510bf4ac73e1e67ec60
+SHA1 (patch-src_3rdparty_chromium_v8_src_sandbox_sandbox.cc) = e49f0032cfa1cc93999f765b63c05f42f476a59c
+SHA1 (patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc) = 79458dcfe06ccc83de202db32bbcb9ee91a795c3
+SHA1 (patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.h) = 22e34dff559feb7517709b6dac4a42d7930642b5
+SHA1 (patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc) = 544b64c38280a5d0eca016a68b165a3ab258dff3
+SHA1 (patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc) = 9eb9fe7e0213dbd91726ddaaaebf1e1e0f1d326a
+SHA1 (patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.h) = 160954b206c5699884e15b439151b896e631a5ad
+SHA1 (patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h) = 3098aae852022383c29a98f19e5e81eb1ee5ccb9
+SHA1 (patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h) = 5edc0269929f0011b439ea49328ae6a470908412
+SHA1 (patch-src_3rdparty_chromium_v8_tools_run-paxctl.py) = 0a2aa78fd50836fb66f6c7ec818739553e96a258
+SHA1 (patch-src_3rdparty_gn_src_gn_c__tool.c) = faea99e8c5fc9ed4b449302b3756c38228311b1b
+SHA1 (patch-src_3rdparty_gn_src_gn_ninja__binary__target__writer.cc) = 2cc5e43ab3c87ee7d965f1c88c6aac158c993e1d
+SHA1 (patch-src_3rdparty_gn_src_gn_tool.h) = c136d13d8be6e21d6d3441b3f8cae35245ef1081
+SHA1 (patch-src_core_CMakeLists.txt) = ae74a3d4ea1762233be50e72c70e5b2a058b2f53
+SHA1 (patch-src_core_api_configure.cmake) = 63c06b0363a0d982fc73077d3460395ceab5e672
+SHA1 (patch-src_core_api_qt__cmdline.cmake) = f2bbc96b5acae3e86c6492b7deb3f1aafc12bdc1
+SHA1 (patch-src_pdf_CMakeLists.txt) = d53bdb4eb7670a8099631411b64b73566af701a9
+SHA1 (patch-src_pdf_configure_BUILD.root.gn.in) = 668cc2d420f1cf5e2730dbf374a0841f5c235808
diff --git a/qt6-qtwebengine/patches/patch-cmake_Functions.cmake b/qt6-qtwebengine/patches/patch-cmake_Functions.cmake
new file mode 100644
index 0000000000..82b412b534
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-cmake_Functions.cmake
@@ -0,0 +1,51 @@
+$NetBSD$
+
+--- cmake/Functions.cmake.orig	2024-11-21 04:36:37.000000000 +0000
++++ cmake/Functions.cmake
+@@ -416,7 +416,7 @@ function(add_linker_options target build
+     set(libs_rsp "${buildDir}/${ninjaTarget}_libs.rsp")
+     set(ldir_rsp "${buildDir}/${ninjaTarget}_ldir.rsp")
+     set_target_properties(${cmakeTarget} PROPERTIES STATIC_LIBRARY_OPTIONS "@${objects_rsp}")
+-    if(LINUX OR ANDROID)
++    if(UNIX OR ANDROID)
+          get_gn_arch(cpu ${TEST_architecture_arch})
+          if(CMAKE_CROSSCOMPILING AND cpu STREQUAL "arm" AND ${config} STREQUAL "Debug")
+              target_link_options(${cmakeTarget} PRIVATE "LINKER:--long-plt")
+@@ -672,6 +672,10 @@ function(get_gn_os result)
+         set(${result} "win" PARENT_SCOPE)
+     elseif(LINUX)
+         set(${result} "linux" PARENT_SCOPE)
++    elseif(OPENBSD)
++        set(${result} "linux" PARENT_SCOPE)
++    elseif(NETBSD)
++        set(${result} "linux" PARENT_SCOPE)
+     elseif(MACOS)
+         set(${result} "mac" PARENT_SCOPE)
+     elseif(IOS)
+@@ -895,7 +899,7 @@ macro(append_compiler_linker_sdk_setup)
+     extend_gn_list(gnArgArg ARGS is_clang CONDITION CLANG)
+     extend_gn_list(gnArgArg ARGS is_mingw CONDITION MINGW)
+     extend_gn_list(gnArgArg ARGS is_msvc CONDITION MSVC)
+-    extend_gn_list(gnArgArg ARGS is_gcc CONDITION LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
++    extend_gn_list(gnArgArg ARGS is_gcc CONDITION UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ 
+     if(CLANG)
+         if(MACOS)
+@@ -1331,7 +1335,7 @@ endfunction()
+ 
+ function(check_for_ulimit)
+     message("-- Checking 'ulimit -n'")
+-    execute_process(COMMAND bash -c "ulimit -n"
++    execute_process(COMMAND sh -c "ulimit -n"
+         OUTPUT_VARIABLE ulimitOutput
+     )
+     string(REGEX MATCHALL "[0-9]+" limit "${ulimitOutput}")
+@@ -1340,7 +1344,7 @@ function(check_for_ulimit)
+         if(NOT ${CMAKE_VERSION} VERSION_LESS "3.21.0")
+             message(" -- Creating linker launcher")
+             file(GENERATE OUTPUT ${PROJECT_BINARY_DIR}/linker_ulimit.sh
+-                CONTENT "#!/bin/bash\nulimit -n 4096\nexec \"$@\""
++                CONTENT "#!/bin/sh\nulimit -n 4096\nexec \"$@\""
+                 FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
+             )
+             set(COIN_BUG_699 ON PARENT_SCOPE)
diff --git a/qt6-qtwebengine/patches/patch-configure.cmake b/qt6-qtwebengine/patches/patch-configure.cmake
new file mode 100644
index 0000000000..b99df833fc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-configure.cmake
@@ -0,0 +1,103 @@
+$NetBSD$
+
+--- configure.cmake.orig	2024-11-21 04:36:37.000000000 +0000
++++ configure.cmake
+@@ -73,7 +73,7 @@ if(Python3_EXECUTABLE)
+ endif()
+ 
+ #### Tests
+-if(LINUX)
++if(UNIX)
+    check_for_ulimit()
+ endif()
+ 
+@@ -434,7 +434,7 @@ qt_feature("webengine-system-libpci" PRI
+ 
+ qt_feature("webengine-ozone-x11" PRIVATE
+     LABEL "Support X11 on qpa-xcb"
+-    CONDITION LINUX
++    CONDITION UNIX
+         AND TARGET Qt::Gui
+         AND QT_FEATURE_xcb
+         AND X11_FOUND
+@@ -474,12 +474,12 @@ assertTargets(
+ )
+ add_check_for_support(
+    MODULES QtWebEngine
+-   CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR MACOS
++   CONDITION UNIX OR (WIN32 AND NOT WIN_ARM_64) OR MACOS
+    MESSAGE "Build can be done only on Linux, Windows or macOS."
+ )
+ add_check_for_support(
+    MODULES QtPdf
+-   CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR MACOS OR IOS OR ANDROID
++   CONDITION UNIX OR (WIN32 AND NOT WIN_ARM_64) OR MACOS OR IOS OR ANDROID
+    MESSAGE "Build can be done only on Linux, Windows, macO, iOS and Android."
+ )
+ if(LINUX AND CMAKE_CROSSCOMPILING)
+@@ -503,7 +503,7 @@ add_check_for_support(
+ )
+ add_check_for_support(
+     MODULES QtWebEngine
+-    CONDITION NOT (Nodejs_ARCH STREQUAL "ia32") AND
++    CONDITION NOT (Nodejs_ARCH STREQUAL "i386") AND
+               NOT (Nodejs_ARCH STREQUAL "x86") AND
+               NOT (Nodejs_ARCH STREQUAL "arm")
+     MESSAGE "32bit version of Nodejs is not supported."
+@@ -535,7 +535,7 @@ add_check_for_support(
+ )
+ add_check_for_support(
+    MODULES QtWebEngine QtPdf
+-   CONDITION NOT LINUX OR PkgConfig_FOUND
++   CONDITION NOT UNIX OR PkgConfig_FOUND
+    MESSAGE "A pkg-config support is required."
+ )
+ add_check_for_support(
+@@ -550,30 +550,30 @@ add_check_for_support(
+ )
+ add_check_for_support(
+    MODULES QtWebEngine
+-   CONDITION NOT LINUX OR FONTCONFIG_FOUND
++   CONDITION NOT UNIX OR FONTCONFIG_FOUND
+    MESSAGE "Build requires fontconfig."
+ )
+ add_check_for_support(
+    MODULES QtWebEngine
+-   CONDITION NOT LINUX OR NSS_FOUND
++   CONDITION NOT UNIX OR NSS_FOUND
+    MESSAGE "Build requires nss >= 3.26."
+ )
+ add_check_for_support(
+    MODULES QtWebEngine
+-   CONDITION NOT LINUX OR DBUS_FOUND
++   CONDITION NOT UNIX OR DBUS_FOUND
+    MESSAGE "Build requires dbus."
+ )
+ add_check_for_support(
+     MODULES QtWebEngine
+-    CONDITION NOT LINUX OR NOT QT_FEATURE_webengine_system_ffmpeg OR TEST_libavformat
++    CONDITION NOT UNIX OR NOT QT_FEATURE_webengine_system_ffmpeg OR TEST_libavformat
+     MESSAGE "Unmodified ffmpeg >= 5.0 is not supported."
+ )
+ 
+ add_check_for_support(
+    MODULES QtWebEngine
+    CONDITION MSVC OR
+-       (LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
+-       (LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
++       (UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
++       (UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
+        (MACOS AND CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+    MESSAGE
+        "${CMAKE_CXX_COMPILER_ID} compiler is not supported."
+@@ -582,8 +582,8 @@ add_check_for_support(
+ add_check_for_support(
+    MODULES QtPdf
+    CONDITION MSVC OR
+-       (LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
+-       (LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
++       (UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
++       (UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
+        (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR
+        (ANDROID AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
+        (MINGW AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_BUILD.gn
new file mode 100644
index 0000000000..16bde65dbf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_BUILD.gn
@@ -0,0 +1,59 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/BUILD.gn
+@@ -64,7 +64,7 @@ declare_args() {
+   qtwebengine_target = "//tools/gn"
+ }
+ 
+-if (is_official_build) {
++if (is_official_build && !is_bsd) {
+   # An official (maximally optimized!) component (optimized for build times)
+   # build doesn't make sense and usually doesn't work.
+   assert(!is_component_build)
+@@ -96,7 +96,6 @@ group("gn_all") {
+       "//codelabs",
+       "//components:components_unittests",
+       "//components/gwp_asan:gwp_asan_unittests",
+-      "//infra/orchestrator:orchestrator_all",
+       "//net:net_unittests",
+       "//sandbox:sandbox_unittests",
+       "//services:services_unittests",
+@@ -426,7 +425,7 @@ group("gn_all") {
+       }
+     }
+ 
+-    if (is_linux || is_chromeos || is_android) {
++    if ((is_linux && !is_bsd) || is_chromeos || is_android) {
+       deps += [
+         "//third_party/breakpad:breakpad_unittests",
+         "//third_party/breakpad:core-2-minidump",
+@@ -626,6 +625,15 @@ group("gn_all") {
+       }
+     }
+ 
++    if (is_bsd) {
++      deps -= [
++        "//third_party/breakpad:dump_syms($host_system_allocator_toolchain)",
++        "//third_party/breakpad:microdump_stackwalk($host_system_allocator_toolchain)",
++        "//third_party/breakpad:minidump_dump($host_system_allocator_toolchain)",
++        "//third_party/breakpad:minidump_stackwalk($host_system_allocator_toolchain)",
++      ]
++    }
++
+     if (is_mac) {
+       deps += [
+         "//third_party/breakpad:dump_syms",
+@@ -1093,7 +1101,7 @@ if (use_blink && !is_cronet_build) {
+     ]
+   }
+ 
+-  if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) {
++  if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) {
+     script_test("chrome_wpt_tests") {
+       script = "//third_party/blink/tools/run_wpt_tests.py"
+       args = [
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_BUILD.gn
new file mode 100644
index 0000000000..e4fc70b12d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_BUILD.gn
@@ -0,0 +1,176 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/BUILD.gn
+@@ -188,7 +188,7 @@ buildflag_header("ios_cronet_buildflags"
+   flags = [ "CRONET_BUILD=$is_cronet_build" ]
+ }
+ 
+-enable_message_pump_epoll = is_linux || is_chromeos || is_android
++enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd
+ buildflag_header("message_pump_buildflags") {
+   header = "message_pump_buildflags.h"
+   header_dir = "base/message_loop"
+@@ -967,7 +967,7 @@ jumbo_component("base") {
+     #"system/sys_info_openbsd.cc",
+   ]
+ 
+-  if (is_apple || current_os == "freebsd" || current_os == "openbsd") {
++  if (is_apple || current_os == "freebsd" || current_os == "openbsd" || current_os == "netbsd") {
+     sources += [
+       "posix/sysctl.cc",
+       "posix/sysctl.h",
+@@ -1125,11 +1125,26 @@ jumbo_component("base") {
+   # Needed for <atomic> 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_chromeos || (is_linux && !is_castos)) &&
++  if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) &&
+       host_toolchain != "//build/toolchain/cros:host") {
+     libs += [ "atomic" ]
+   }
+ 
++  # *BSD needs libkvm
++  if (is_bsd) {
++    libs += [
++      "kvm",
++      "epoll-shim",
++    ]
++  }
++
++  if (is_freebsd) {
++    libs += [
++      "execinfo",
++      "util",
++    ]
++  }
++
+   if (use_allocator_shim) {
+     if (is_apple) {
+       sources += [ "allocator/early_zone_registration_apple.h" ]
+@@ -1149,7 +1164,7 @@ jumbo_component("base") {
+ 
+   # Allow more direct string conversions on platforms with native utf8
+   # strings
+-  if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) {
++  if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) {
+     defines += [ "SYSTEM_NATIVE_UTF8" ]
+   }
+ 
+@@ -2100,6 +2115,29 @@ jumbo_component("base") {
+     ]
+   }
+ 
++  if (is_openbsd) {
++    sources += [
++      "process/process_handle_openbsd.cc",
++      "process/process_iterator_openbsd.cc",
++      "process/process_metrics_openbsd.cc",
++      "system/sys_info_openbsd.cc",
++    ]
++  } else if (is_freebsd) {
++    sources += [
++      "process/process_handle_freebsd.cc",
++      "process/process_iterator_freebsd.cc",
++      "process/process_metrics_freebsd.cc",
++      "system/sys_info_freebsd.cc",
++    ]
++  }  else if (is_netbsd) {
++    sources += [
++      "process/process_handle_netbsd.cc",
++      "process/process_iterator_netbsd.cc",
++      "process/process_metrics_netbsd.cc",
++      "system/sys_info_netbsd.cc",
++    ]
++  }
++
+   # iOS
+   if (is_ios) {
+     sources += [
+@@ -2206,7 +2244,7 @@ jumbo_component("base") {
+ 
+     configs += linux_configs
+     all_dependent_configs += linux_configs
+-    sources += [ "system/sys_info_linux.cc" ]
++    #sources += [ "system/sys_info_linux.cc" ]
+     if (!is_cronet_build) {
+       # These dependencies are not required on Android.
+       sources += [
+@@ -2230,6 +2268,28 @@ jumbo_component("base") {
+     }
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "files/file_path_watcher_inotify.cc",
++      "files/scoped_file_linux.cc",
++      "process/process_iterator_linux.cc",
++      "process/process_linux.cc",
++      "process/process_metrics_linux.cc",
++      "process/process_handle_linux.cc",
++      "profiler/stack_copier_signal.cc",
++      "profiler/stack_copier_signal.h",
++      "profiler/thread_delegate_posix.cc",
++      "profiler/thread_delegate_posix.h",
++      "threading/platform_thread_linux.cc",
++    ]
++    sources += [
++      "files/file_path_watcher_kqueue.cc",
++      "files/file_path_watcher_kqueue.h",
++      "files/file_path_watcher_bsd.cc",
++      "threading/platform_thread_bsd.cc",
++    ]
++  }
++
+   if (use_blink) {
+     sources += [
+       "files/file_path_watcher.cc",
+@@ -3005,7 +3065,7 @@ if (is_apple) {
+   }
+ }
+ 
+-if (!is_nacl && (is_linux || is_chromeos)) {
++if (!is_nacl && !is_bsd && (is_linux || is_chromeos)) {
+   # This test must compile with -fstack-protector-all
+   source_set("stack_canary_linux_unittests") {
+     testonly = true
+@@ -3642,7 +3702,7 @@ test("base_unittests") {
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if (!is_bsd && (is_linux || is_chromeos)) {
+     sources += [
+       "debug/proc_maps_linux_unittest.cc",
+       "files/scoped_file_linux_unittest.cc",
+@@ -3664,7 +3724,7 @@ test("base_unittests") {
+       "posix/file_descriptor_shuffle_unittest.cc",
+       "posix/unix_domain_socket_unittest.cc",
+     ]
+-    if (!is_nacl && !is_apple) {
++    if (!is_nacl && !is_apple && !is_bsd) {
+       sources += [
+         "profiler/stack_base_address_posix_unittest.cc",
+         "profiler/stack_copier_signal_unittest.cc",
+@@ -3675,7 +3735,7 @@ test("base_unittests") {
+ 
+   # Allow more direct string conversions on platforms with native utf8
+   # strings
+-  if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) {
++  if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) {
+     defines += [ "SYSTEM_NATIVE_UTF8" ]
+   }
+ 
+@@ -3938,7 +3998,7 @@ test("base_unittests") {
+     }
+   }
+ 
+-  if (is_fuchsia || is_linux || is_chromeos) {
++  if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "debug/elf_reader_unittest.cc",
+       "debug/test_elf_image_builder.cc",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h
new file mode 100644
index 0000000000..deb0ba252c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_dispatcher_tls.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/dispatcher/tls.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/dispatcher/tls.h
+@@ -74,7 +74,7 @@ struct BASE_EXPORT MMapAllocator {
+       partition_alloc::PartitionPageSize();
+ #elif BUILDFLAG(IS_APPLE)
+   constexpr static size_t AllocationChunkSize = 16384;
+-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)
+   constexpr static size_t AllocationChunkSize = 16384;
+ #else
+   constexpr static size_t AllocationChunkSize = 4096;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni
new file mode 100644
index 0000000000..9c40fd231a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc.gni
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni
+@@ -30,7 +30,7 @@ if (is_nacl) {
+ }
+ 
+ has_memory_tagging =
+-    current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android)
++    current_cpu == "arm64" && is_clang && !is_asan && !is_bsd && (is_linux || is_android)
+ 
+ declare_args() {
+   # Causes all the allocations to be routed via allocator_shim.cc. Usually,
+@@ -335,7 +335,7 @@ declare_args() {
+   # dependencies that use partition_allocator are compiled in AOSP against a
+   # version of glibc that does not include pkeys syscall numbers.
+   enable_pkeys =
+-      (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build
++      ((is_linux && !is_bsd) || is_chromeos) && target_cpu == "x64" && !is_cronet_build
+ }
+ assert(!enable_pkeys || ((is_linux || is_chromeos) && target_cpu == "x64"),
+        "Pkeys are only supported on x64 linux and ChromeOS")
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_BUILD.gn
new file mode 100644
index 0000000000..c024606b29
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn
+@@ -856,7 +856,7 @@ if (is_clang_or_gcc || is_msvc || is_min
+         configs -= [ "//build/config/compiler:enable_arc" ]
+       }
+     }
+-    if (is_chromeos || is_linux) {
++    if ((is_chromeos || is_linux) && !is_bsd) {
+       shim_headers += [
+         "shim/allocator_shim_override_cpp_symbols.h",
+         "shim/allocator_shim_override_glibc_weak_symbols.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h
new file mode 100644
index 0000000000..b56b7da7f0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h
+@@ -38,7 +38,7 @@ AslrMask(uintptr_t bits) {
+ 
+ #if defined(ARCH_CPU_64_BITS)
+ 
+-  #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
++  #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !BUILDFLAG(IS_BSD)
+ 
+     // We shouldn't allocate system pages at all for sanitizer builds. However,
+     // we do, and if random hint addresses interfere with address ranges
+@@ -126,7 +126,7 @@ AslrMask(uintptr_t bits) {
+         return AslrAddress(0x20000000ULL);
+       }
+ 
+-      #elif BUILDFLAG(IS_LINUX)
++      #elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+ 
+       // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on
+       // page size and number of levels of translation pages used. We use
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator.h
new file mode 100644
index 0000000000..5f2b5112f8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h
+@@ -256,7 +256,7 @@ bool DecommitAndZeroSystemPages(void* ad
+ // recommitted. Do not assume that this will not change over time.
+ constexpr PA_COMPONENT_EXPORT(
+     PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() {
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   return false;
+ #else
+   return true;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h
new file mode 100644
index 0000000000..a659bf3f8a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
+@@ -25,7 +25,7 @@
+ // elimination.
+ #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const))
+ 
+-#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64)
++#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)
+ // This should work for all POSIX (if needed), but currently all other
+ // supported OS/architecture combinations use either hard-coded values
+ // (such as x86) or have means to determine these values without needing
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h
new file mode 100644
index 0000000000..1aadbeb76e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h
+@@ -411,8 +411,12 @@ bool TryRecommitSystemPagesInternal(
+ 
+ void DiscardSystemPagesInternal(uintptr_t address, size_t length) {
+   void* ptr = reinterpret_cast<void*>(address);
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_BSD)
++  int ret = madvise(ptr, length, MADV_FREE);
++#else
+   int ret = madvise(ptr, length, MADV_FREE_REUSABLE);
++#endif
+   if (ret) {
+     // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED.
+     ret = madvise(ptr, length, MADV_DONTNEED);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc
new file mode 100644
index 0000000000..1211aa48e8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc
+@@ -13,11 +13,11 @@
+ #include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h"
+ #include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h"
+ 
+-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+ #include <link.h>  // For ElfW() macro.
+ #endif
+ 
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+ #include <dlfcn.h>
+ #endif
+ 
+@@ -25,7 +25,7 @@ namespace partition_alloc::internal::bas
+ 
+ namespace {
+ 
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+ 
+ // On Android the 'open' function has two versions:
+ // int open(const char *pathname, int flags);
+@@ -369,7 +369,7 @@ void PrintStackTraceInternal(const void*
+ }
+ #endif  // !BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+ // Since /proc/self/maps is not available, use dladdr() to obtain module
+ // names and offsets inside the modules from the given addresses.
+ void PrintStackTraceInternal(const void* const* trace, size_t size) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc
new file mode 100644
index 0000000000..b6cfbe1a2b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc
+@@ -102,6 +102,10 @@ void RandBytes(void* output, size_t outp
+   if (getentropy(output, output_length) == 0) {
+     return;
+   }
++#elif BUILDFLAG(IS_BSD)
++  if (getentropy(output, output_length) == 0) {
++    return;
++  }
+ #endif
+   // If getrandom(2) above returned with an error and the /dev/urandom fallback
+   // took place on Linux/ChromeOS bots, they would fail with a CHECK in
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h
new file mode 100644
index 0000000000..70657359a4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h
+@@ -23,6 +23,8 @@
+ #include <zircon/types.h>
+ #elif BUILDFLAG(IS_APPLE)
+ #include <mach/mach_types.h>
++#elif BUILDFLAG(IS_BSD)
++typedef uint64_t PlatformThreadId;
+ #elif BUILDFLAG(IS_POSIX)
+ #include <pthread.h>
+ #include <unistd.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h
new file mode 100644
index 0000000000..fa4c23e660
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h
+@@ -10,7 +10,7 @@
+ 
+ namespace partition_alloc::internal::base::internal {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Current thread id is cached in thread local storage for performance reasons.
+ // In some rare cases it's important to invalidate that cache explicitly (e.g.
+ // after going through clone() syscall which does not call pthread_atfork()
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc
new file mode 100644
index 0000000000..8b50947087
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc
+@@ -18,7 +18,7 @@
+ #include "partition_alloc/partition_alloc_base/logging.h"
+ #include "partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <sys/syscall.h>
+ #include <atomic>
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
new file mode 100644
index 0000000000..2b061cf32c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h
+@@ -251,7 +251,7 @@ constexpr bool kUseLazyCommit = false;
+ // On these platforms, lock all the partitions before fork(), and unlock after.
+ // This may be required on more platforms in the future.
+ #define PA_CONFIG_HAS_ATFORK_HANDLER() \
+-  (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++  (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ 
+ // PartitionAlloc uses PartitionRootEnumerator to acquire all
+ // PartitionRoots at BeforeFork and to release at AfterFork.
+@@ -299,7 +299,7 @@ constexpr bool kUseLazyCommit = false;
+ //
+ // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to
+ // larger slot spans.
+-#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64))
++#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD)
+ #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 1
+ #else
+ #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 0
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h
new file mode 100644
index 0000000000..62a2978183
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
+@@ -316,7 +316,7 @@ constexpr size_t kNumPools = kMaxPoolHan
+ #if BUILDFLAG(IS_IOS)
+ constexpr size_t kPoolMaxSize = 1 * kGiB;
+ #elif BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(ENABLE_POINTER_COMPRESSION)
++    BUILDFLAG(ENABLE_POINTER_COMPRESSION) || BUILDFLAG(IS_BSD)
+ constexpr size_t kPoolMaxSize = 8 * kGiB;
+ #else
+ constexpr size_t kPoolMaxSize = 16 * kGiB;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h
new file mode 100644
index 0000000000..6eabb51845
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h
+@@ -28,9 +28,13 @@ namespace internal {
+ // the second one 16. We could technically return something different for
+ // malloc() and operator new(), but this would complicate things, and most of
+ // our allocations are presumably coming from operator new() anyway.
++#if defined(__i386__) && defined(OS_FREEBSD)
++constexpr size_t kAlignment = 8;
++#else
+ constexpr size_t kAlignment =
+     std::max(alignof(max_align_t),
+              static_cast<size_t>(__STDCPP_DEFAULT_NEW_ALIGNMENT__));
++#endif
+ static_assert(kAlignment <= 16,
+               "PartitionAlloc doesn't support a fundamental alignment larger "
+               "than 16 bytes.");
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__root.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__root.cc
new file mode 100644
index 0000000000..b2d0e6f10c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_partition__root.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
+@@ -47,7 +47,7 @@
+ #include "wow64apiset.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <pthread.h>
+ #endif
+ 
+@@ -278,7 +278,7 @@ void PartitionAllocMallocInitOnce() {
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // When fork() is called, only the current thread continues to execute in the
+   // child process. If the lock is held, but *not* by this thread when fork() is
+   // called, we have a deadlock.
+@@ -942,7 +942,7 @@ void PartitionRoot::Init(PartitionOption
+     // apple OSes.
+     PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) ||
+              (internal::SystemPageSize() == (size_t{1} << 14)));
+-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)
+     // Check runtime pagesize. Though the code is currently the same, it is
+     // not merged with the IS_APPLE case above as a 1 << 16 case needs to be
+     // added here in the future, to allow 64 kiB pagesize. That is only
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc
new file mode 100644
index 0000000000..87b0ff1fb4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc
@@ -0,0 +1,65 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc
+@@ -17,7 +17,16 @@
+ #endif
+ 
+ #if PA_CONFIG(HAS_LINUX_KERNEL)
++#if defined(OS_OPENBSD) || defined(OS_NETBSD)
++#include <sys/time.h>
++#include <sys/futex.h>
++#elif defined(OS_FREEBSD)
++#include <sys/types.h>
++#include <sys/thr.h>
++#include <sys/umtx.h>
++#else
+ #include <linux/futex.h>
++#endif
+ #include <sys/syscall.h>
+ #include <unistd.h>
+ 
+@@ -106,8 +115,19 @@ void SpinningMutex::FutexWait() {
+   // |kLockedContended| anymore. Note that even without spurious wakeups, the
+   // value of |state_| is not guaranteed when this returns, as another thread
+   // may get the lock before we get to run.
++#if defined(OS_FREEBSD)
++  int err = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE,
++                    kLockedContended, nullptr, nullptr);
++#elif defined(OS_OPENBSD)
++  int err = futex(reinterpret_cast<volatile unsigned int *>(&state_), FUTEX_WAIT | FUTEX_PRIVATE_FLAG,
++                    kLockedContended, nullptr, nullptr);
++#elif defined(OS_NETBSD)
++  int err = syscall(SYS___futex, reinterpret_cast<int *>(&state_), FUTEX_WAIT | FUTEX_PRIVATE_FLAG,
++                     kLockedContended, nullptr, nullptr, 0, 0);
++#else
+   int err = syscall(SYS_futex, &state_, FUTEX_WAIT | FUTEX_PRIVATE_FLAG,
+                     kLockedContended, nullptr, nullptr, 0);
++#endif
+ 
+   if (err) {
+     // These are programming error, check them.
+@@ -119,8 +139,19 @@ void SpinningMutex::FutexWait() {
+ 
+ void SpinningMutex::FutexWake() {
+   int saved_errno = errno;
++#if defined(OS_FREEBSD)
++  long retval = _umtx_op(&state_, UMTX_OP_WAKE_PRIVATE,
++                         1 /* wake up a single waiter */, nullptr, nullptr);
++#elif defined(OS_OPENBSD)
++  long retval = futex(reinterpret_cast<volatile unsigned int *>(&state_), FUTEX_WAKE | FUTEX_PRIVATE_FLAG,
++                        1 /* wake up a single waiter */, nullptr, nullptr);
++#elif defined(OS_NETBSD)
++  long retval = syscall(SYS___futex, reinterpret_cast<int *>(&state_), FUTEX_WAKE | FUTEX_PRIVATE_FLAG,
++                         1 /* wake up a single waiter */, nullptr, nullptr, 0, 0);
++#else
+   long retval = syscall(SYS_futex, &state_, FUTEX_WAKE | FUTEX_PRIVATE_FLAG,
+                         1 /* wake up a single waiter */, nullptr, nullptr, 0);
++#endif
+   PA_CHECK(retval != -1);
+   errno = saved_errno;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc
new file mode 100644
index 0000000000..eaaaf3aaed
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc
+@@ -16,7 +16,7 @@
+ #include "partition_alloc/partition_alloc_check.h"
+ #include "partition_alloc/thread_isolation/thread_isolation.h"
+ 
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ #error "This pkey code is currently only supported on Linux and ChromeOS"
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_atomicops.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_atomicops.h
new file mode 100644
index 0000000000..99baf33f86
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_atomicops.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/atomicops.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/atomicops.h
+@@ -71,7 +71,11 @@ typedef intptr_t Atomic64;
+ 
+ // Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or
+ // Atomic64 routines below, depending on your architecture.
++#if !defined(OS_OPENBSD) && defined(__i386__)
++typedef Atomic32 AtomicWord;
++#else
+ typedef intptr_t AtomicWord;
++#endif
+ 
+ // Atomically execute:
+ //      result = *ptr;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_base__paths__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_base__paths__posix.cc
new file mode 100644
index 0000000000..ba64a40941
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_base__paths__posix.cc
@@ -0,0 +1,129 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/base_paths_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/base_paths_posix.cc
+@@ -15,6 +15,7 @@
+ #include <ostream>
+ #include <string>
+ 
++#include "base/command_line.h"
+ #include "base/environment.h"
+ #include "base/files/file_path.h"
+ #include "base/files/file_util.h"
+@@ -26,9 +27,13 @@
+ #include "base/process/process_metrics.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_BSD)
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
++#if BUILDFLAG(IS_OPENBSD)
++#include <kvm.h>
++#define MAXTOKENS 2
++#endif
+ #elif BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_AIX)
+ #include <stdlib.h>
+ #endif
+@@ -48,14 +53,22 @@ bool PathProviderPosix(int key, FilePath
+       *result = bin_dir;
+       return true;
+ #elif BUILDFLAG(IS_FREEBSD)
+-      int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
+-      absl::optional<std::string> bin_dir = StringSysctl(name, std::size(name));
++      absl::optional<std::string> bin_dir = StringSysctl({ CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 });
+       if (!bin_dir.has_value() || bin_dir.value().length() <= 1) {
+         NOTREACHED() << "Unable to resolve path.";
+         return false;
+       }
+       *result = FilePath(bin_dir.value());
+       return true;
++#elif BUILDFLAG(IS_NETBSD)
++      absl::optional<std::string> bin_dir = StringSysctl({ CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_PATHNAME });
++      if (!bin_dir.has_value() || bin_dir.value().length() <= 1) {
++        NOTREACHED() << "Unable to resolve path.";
++        return false;
++      }
++      *result = FilePath(bin_dir.value());
++      VLOG(1) << "PathProviderPosix result: " << bin_dir.value();
++      return true;
+ #elif BUILDFLAG(IS_SOLARIS)
+       char bin_dir[PATH_MAX + 1];
+       if (realpath(getexecname(), bin_dir) == NULL) {
+@@ -65,13 +78,65 @@ bool PathProviderPosix(int key, FilePath
+       *result = FilePath(bin_dir);
+       return true;
+ #elif BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_AIX)
+-      // There is currently no way to get the executable path on OpenBSD
+-      char* cpath;
+-      if ((cpath = getenv("CHROME_EXE_PATH")) != NULL)
+-        *result = FilePath(cpath);
+-      else
+-        *result = FilePath("/usr/local/chrome/chrome");
+-      return true;
++      char *cpath;
++#if !BUILDFLAG(IS_AIX)
++      struct kinfo_file *files;
++      kvm_t *kd = NULL;
++      char errbuf[_POSIX2_LINE_MAX];
++      static char retval[PATH_MAX];
++      int cnt;
++      struct stat sb;
++      pid_t cpid = getpid();
++      bool ret = false;
++
++      const base::CommandLine* command_line =
++          base::CommandLine::ForCurrentProcess();
++
++      VLOG(1) << "PathProviderPosix argv: " << command_line->argv()[0];
++
++      if (realpath(command_line->argv()[0].c_str(), retval) == NULL)
++        goto out;
++
++      if (stat(command_line->argv()[0].c_str(), &sb) < 0)
++        goto out;
++
++      if (!command_line->HasSwitch("no-sandbox")) {
++        ret = true;
++        *result = FilePath(retval);
++        VLOG(1) << "PathProviderPosix (sandbox) result: " << retval;
++        goto out;
++      }
++
++      if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES, errbuf)) == NULL)
++        goto out;
++
++      if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid,
++                                sizeof(struct kinfo_file), &cnt)) == NULL)
++        goto out;
++
++      for (int i = 0; i < cnt; i++) {
++        if (files[i].fd_fd == KERN_FILE_TEXT &&
++            files[i].va_fsid == static_cast<uint32_t>(sb.st_dev) &&
++            files[i].va_fileid == sb.st_ino) {
++          ret = true;
++          *result = FilePath(retval);
++          VLOG(1) << "PathProviderPosix result: " << retval;
++        }
++      }
++out:
++      if (kd)
++        kvm_close(kd);
++      if (!ret) {
++#endif
++        if ((cpath = getenv("CHROME_EXE_PATH")) != NULL)
++          *result = FilePath(cpath);
++        else
++          *result = FilePath("@PREFIX@/lib/chromium/chrome");
++        return true;
++#if !BUILDFLAG(IS_AIX)
++      }
++      return ret;
++#endif
+ #endif
+     }
+     case DIR_SRC_TEST_DATA_ROOT: {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_compiler__specific.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_compiler__specific.h
new file mode 100644
index 0000000000..6395e286f1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_compiler__specific.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/compiler_specific.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/compiler_specific.h
+@@ -446,7 +446,7 @@ inline constexpr bool AnalyzerAssumeTrue
+ // See https://clang.llvm.org/docs/AttributeReference.html#preserve-most for
+ // more details.
+ #if defined(ARCH_CPU_64_BITS) &&                       \
+-    !(BUILDFLAG(IS_WIN) && defined(ARCH_CPU_ARM64)) && \
++    !((BUILDFLAG(IS_WIN) || BUILDFLAG(IS_OPENBSD)) && defined(ARCH_CPU_ARM64)) && \
+     !defined(COMPONENT_BUILD) && defined(__clang__) && \
+     __clang_major__ >= 17 && HAS_ATTRIBUTE(preserve_most)
+ #define PRESERVE_MOST __attribute__((preserve_most))
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc
new file mode 100644
index 0000000000..7f67786ab0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc
@@ -0,0 +1,106 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/debug/debugger_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/debug/debugger_posix.cc
+@@ -41,6 +41,10 @@
+ #include <sys/sysctl.h>
+ #endif
+ 
++#if BUILDFLAG(IS_OPENBSD)
++#include <sys/proc.h>
++#endif
++
+ #if BUILDFLAG(IS_FREEBSD)
+ #include <sys/user.h>
+ #endif
+@@ -86,6 +90,7 @@ bool BeingDebugged() {
+ 
+   // Initialize mib, which tells sysctl what info we want.  In this case,
+   // we're looking for information about a specific process ID.
++#if !BUILDFLAG(IS_NETBSD)
+   int mib[] = {
+     CTL_KERN,
+     KERN_PROC,
+@@ -97,36 +102,75 @@ bool BeingDebugged() {
+     0
+ #endif
+   };
++#else
++  int mib[] = {
++    CTL_KERN,
++    KERN_PROC2,
++    KERN_PROC_PID,
++    getpid(),
++    sizeof(struct kinfo_proc2),
++    1
++  };
++#endif
+ 
+   // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE.  The source and
+   // binary interfaces may change.
++#if BUILDFLAG(IS_OPENBSD)
++  struct kinfo_proc *info;
++  size_t info_size;
++#elif BUILDFLAG(IS_NETBSD)
++  struct kinfo_proc2 info;
++  size_t info_size = sizeof(info);
++#else
+   struct kinfo_proc info;
+   size_t info_size = sizeof(info);
++#endif
+ 
+ #if BUILDFLAG(IS_OPENBSD)
+   if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0)
+     return -1;
+ 
+-  mib[5] = (info_size / sizeof(struct kinfo_proc));
++  mib[5] = static_cast<int>((info_size / sizeof(struct kinfo_proc)));
++  if ((info = reinterpret_cast<kinfo_proc*>(malloc(info_size))) == NULL) {
++    is_set = true;
++    being_debugged = false;
++    return being_debugged;
++  }
++
++  int sysctl_result = sysctl(mib, std::size(mib), info, &info_size, NULL, 0);
++#elif BUILDFLAG(IS_NETBSD)
++  if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0)
++    return -1;
++
++  mib[5] = (info_size / sizeof(struct kinfo_proc2));
+ #endif
+ 
++#if !BUILDFLAG(IS_OPENBSD)
+   int sysctl_result = sysctl(mib, std::size(mib), &info, &info_size, NULL, 0);
++#endif
+   DCHECK_EQ(sysctl_result, 0);
+   if (sysctl_result != 0) {
+     is_set = true;
+     being_debugged = false;
+-    return being_debugged;
++    goto out;
+   }
+ 
+   // This process is being debugged if the P_TRACED flag is set.
+   is_set = true;
+ #if BUILDFLAG(IS_FREEBSD)
+   being_debugged = (info.ki_flag & P_TRACED) != 0;
+-#elif BUILDFLAG(IS_BSD)
++#elif BUILDFLAG(IS_OPENBSD)
++  being_debugged = (info->p_psflags & PS_TRACED) != 0;
++#elif BUILDFLAG(IS_NETBSD)
+   being_debugged = (info.p_flag & P_TRACED) != 0;
+ #else
+   being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
+ #endif
++
++out:
++#if BUILDFLAG(IS_OPENBSD)
++  free(info);
++#endif
+   return being_debugged;
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_elf__reader.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_elf__reader.cc
new file mode 100644
index 0000000000..5ca2d7251d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_elf__reader.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/debug/elf_reader.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/debug/elf_reader.cc
+@@ -50,6 +50,10 @@ using Xword = Elf64_Xword;
+ 
+ constexpr char kGnuNoteName[] = "GNU";
+ 
++#ifndef NT_GNU_BUILD_ID
++#define NT_GNU_BUILD_ID 3
++#endif
++
+ // Returns a pointer to the header of the ELF binary mapped into memory, or a
+ // null pointer if the header is invalid. Here and below |elf_mapped_base| is a
+ // pointer to the start of the ELF image.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc
new file mode 100644
index 0000000000..ea324b0e6a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_proc__maps__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/debug/proc_maps_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/debug/proc_maps_linux.cc
+@@ -18,7 +18,7 @@
+ #include "base/strings/string_split.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include <inttypes.h>
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_stack__trace.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_stack__trace.cc
new file mode 100644
index 0000000000..474fe5f9fe
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_stack__trace.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/debug/stack_trace.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/debug/stack_trace.cc
+@@ -234,7 +234,7 @@ bool StackTrace::WillSymbolizeToStreamFo
+   // Symbols are not expected to be reliable when gn args specifies
+   // symbol_level=0.
+   return false;
+-#elif defined(__UCLIBC__) || defined(_AIX)
++#elif defined(__UCLIBC__) || defined(_AIX) || BUILDFLAG(IS_BSD)
+   // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
+   // See https://crbug.com/706728
+   return false;
+@@ -274,14 +274,14 @@ std::string StackTrace::ToString() const
+ }
+ std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
+   std::stringstream stream;
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD)
+   OutputToStreamWithPrefix(&stream, prefix_string);
+ #endif
+   return stream.str();
+ }
+ 
+ std::ostream& operator<<(std::ostream& os, const StackTrace& s) {
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD)
+   s.OutputToStream(&os);
+ #else
+   os << "StackTrace::OutputToStream not implemented.";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc
new file mode 100644
index 0000000000..b893be6446
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc
@@ -0,0 +1,109 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/debug/stack_trace_posix.cc
+@@ -45,8 +45,8 @@
+ // Surprisingly, uClibc defines __GLIBC__ in some build configs, but
+ // execinfo.h and backtrace(3) are really only present in glibc and in macOS
+ // libc.
+-#if BUILDFLAG(IS_APPLE) || \
+-    (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX))
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_NETBSD) || \
++    (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX) && !BUILDFLAG(IS_BSD))
+ #define HAVE_BACKTRACE
+ #include <execinfo.h>
+ #endif
+@@ -64,8 +64,10 @@
+ #include <AvailabilityMacros.h>
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/prctl.h>
++#endif
+ 
+ #include "base/debug/proc_maps_linux.h"
+ #endif
+@@ -322,7 +324,7 @@ void PrintToStderr(const char* output) {
+   std::ignore = HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output)));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void AlarmSignalHandler(int signal, siginfo_t* info, void* void_context) {
+   // We have seen rare cases on AMD linux where the default signal handler
+   // either does not run or a thread (Probably an AMD driver thread) prevents
+@@ -339,7 +341,11 @@ void AlarmSignalHandler(int signal, sigi
+       "Warning: Default signal handler failed to terminate process.\n");
+   PrintToStderr("Calling exit_group() directly to prevent timeout.\n");
+   // See: https://man7.org/linux/man-pages/man2/exit_group.2.html
++#if BUILDFLAG(IS_BSD) 
++  _exit(EXIT_FAILURE);
++#else
+   syscall(SYS_exit_group, EXIT_FAILURE);
++#endif
+ }
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) ||
+         // BUILDFLAG(IS_CHROMEOS)
+@@ -537,7 +543,7 @@ void StackDumpSignalHandler(int signal, 
+     _exit(EXIT_FAILURE);
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Set an alarm to trigger in case the default handler does not terminate
+   // the process. See 'AlarmSignalHandler' for more details.
+   struct sigaction action;
+@@ -562,6 +568,7 @@ void StackDumpSignalHandler(int signal, 
+   // signals that do not re-raise autonomously), such as signals delivered via
+   // kill() and asynchronous hardware faults such as SEGV_MTEAERR, which would
+   // otherwise be lost when re-raising the signal via raise().
++#if !BUILDFLAG(IS_BSD)
+   long retval = syscall(SYS_rt_tgsigqueueinfo, getpid(), syscall(SYS_gettid),
+                         info->si_signo, info);
+   if (retval == 0) {
+@@ -576,6 +583,7 @@ void StackDumpSignalHandler(int signal, 
+   if (errno != EPERM) {
+     _exit(EXIT_FAILURE);
+   }
++#endif
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) ||
+         // BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -772,6 +780,7 @@ class SandboxSymbolizeHelper {
+     return -1;
+   }
+ 
++#if !BUILDFLAG(IS_BSD)
+   // This class is copied from
+   // third_party/crashpad/crashpad/util/linux/scoped_pr_set_dumpable.h.
+   // It aims at ensuring the process is dumpable before opening /proc/self/mem.
+@@ -864,11 +873,15 @@ class SandboxSymbolizeHelper {
+       r.base = cur_base;
+     }
+   }
++#endif
+ 
+   // Parses /proc/self/maps in order to compile a list of all object file names
+   // for the modules that are loaded in the current process.
+   // Returns true on success.
+   bool CacheMemoryRegions() {
++#if BUILDFLAG(IS_BSD)
++    return false;
++#else
+     // Reads /proc/self/maps.
+     std::string contents;
+     if (!ReadProcMaps(&contents)) {
+@@ -886,6 +899,7 @@ class SandboxSymbolizeHelper {
+ 
+     is_initialized_ = true;
+     return true;
++#endif
+   }
+ 
+   // Opens all object files and caches their file descriptors.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_dir__reader__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_dir__reader__linux.h
new file mode 100644
index 0000000000..2cf5f8e21a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_dir__reader__linux.h
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/dir_reader_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/files/dir_reader_linux.h
+@@ -21,10 +21,16 @@
+ #include "base/logging.h"
+ #include "base/posix/eintr_wrapper.h"
+ 
++#include "build/build_config.h"
++
+ // See the comments in dir_reader_posix.h about this.
+ 
+ namespace base {
+ 
++#if BUILDFLAG(IS_BSD)
++#include <dirent.h>
++typedef struct dirent linux_dirent;
++#else
+ struct linux_dirent {
+   uint64_t        d_ino;
+   int64_t         d_off;
+@@ -32,6 +38,7 @@ struct linux_dirent {
+   unsigned char   d_type;
+   char            d_name[0];
+ };
++#endif
+ 
+ class DirReaderLinux {
+  public:
+@@ -66,7 +73,11 @@ class DirReaderLinux {
+     if (offset_ != size_)
+       return true;
+ 
++#if BUILDFLAG(IS_BSD)
++    const int r = getdents(fd_, reinterpret_cast<char *>(buf_), sizeof(buf_));
++#else
+     const long r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#endif
+     if (r == 0)
+       return false;
+     if (r < 0) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_dir__reader__posix.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_dir__reader__posix.h
new file mode 100644
index 0000000000..5f911393f6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_dir__reader__posix.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/dir_reader_posix.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/files/dir_reader_posix.h
+@@ -17,7 +17,7 @@
+ // seems worse than falling back to enumerating all file descriptors so we will
+ // probably never implement this on the Mac.
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "base/files/dir_reader_linux.h"
+ #else
+ #include "base/files/dir_reader_fallback.h"
+@@ -25,7 +25,7 @@
+ 
+ namespace base {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ typedef DirReaderLinux DirReaderPosix;
+ #else
+ typedef DirReaderFallback DirReaderPosix;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher.h
new file mode 100644
index 0000000000..1fad3bac4f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/file_path_watcher.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/files/file_path_watcher.h
+@@ -105,7 +105,7 @@ class BASE_EXPORT FilePathWatcher {
+     Type type = Type::kNonRecursive;
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // The callback will return the full path to a changed file instead of
+     // the watched path supplied as |path| when Watch is called.
+     // So the full path can be different from the watched path when a folder is
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__bsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__bsd.cc
new file mode 100644
index 0000000000..c1737c8ddd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__bsd.cc
@@ -0,0 +1,63 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/file_path_watcher_bsd.cc.orig	2024-12-21 10:25:09.571560110 +0000
++++ src/3rdparty/chromium/base/files/file_path_watcher_bsd.cc
+@@ -0,0 +1,54 @@
++// Copyright 2021 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 <memory>
++
++#include "base/files/file_path_watcher.h"
++#include "base/files/file_path_watcher_kqueue.h"
++#include "base/memory/ptr_util.h"
++#include "build/build_config.h"
++
++namespace base {
++
++namespace {
++
++class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate {
++ public:
++  FilePathWatcherImpl() = default;
++  FilePathWatcherImpl(const FilePathWatcherImpl&) = delete;
++  FilePathWatcherImpl& operator=(const FilePathWatcherImpl&) = delete;
++  ~FilePathWatcherImpl() override = default;
++
++  bool Watch(const FilePath& path,
++             Type type,
++             const FilePathWatcher::Callback& callback) override {
++    DCHECK(!impl_.get());
++    if (type == Type::kRecursive) {
++      if (!FilePathWatcher::RecursiveWatchAvailable())
++        return false;
++    } else {
++      impl_ = std::make_unique<FilePathWatcherKQueue>();
++    }
++    DCHECK(impl_.get());
++    return impl_->Watch(path, type, callback);
++  }
++
++  void Cancel() override {
++    if (impl_.get())
++      impl_->Cancel();
++    set_cancelled();
++  }
++
++ private:
++  std::unique_ptr<PlatformDelegate> impl_;
++};
++
++}  // namespace
++
++FilePathWatcher::FilePathWatcher() {
++  DETACH_FROM_SEQUENCE(sequence_checker_);
++  impl_ = std::make_unique<FilePathWatcherImpl>();
++}
++
++}  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc
new file mode 100644
index 0000000000..6b99fad7f2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/file_path_watcher_kqueue.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/files/file_path_watcher_kqueue.cc
+@@ -81,9 +81,15 @@ size_t FilePathWatcherKQueue::EventsForP
+     FilePath::StringType subdir = (i != (components.end() - 1)) ? *(i + 1) : "";
+     EventData* data = new EventData(built_path, subdir);
+     struct kevent event;
++#if defined(__NetBSD__) && __NetBSD_Version__ < 999000000
++    EV_SET(&event, fd, EVFILT_VNODE, (EV_ADD | EV_CLEAR | EV_RECEIPT),
++           (NOTE_DELETE | NOTE_WRITE | NOTE_ATTRIB |
++            NOTE_RENAME | NOTE_REVOKE | NOTE_EXTEND), 0, reinterpret_cast<intptr_t>(data));
++#else
+     EV_SET(&event, fd, EVFILT_VNODE, (EV_ADD | EV_CLEAR | EV_RECEIPT),
+            (NOTE_DELETE | NOTE_WRITE | NOTE_ATTRIB |
+             NOTE_RENAME | NOTE_REVOKE | NOTE_EXTEND), 0, data);
++#endif
+     events->push_back(event);
+   }
+   return last_existing_entry;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.h
new file mode 100644
index 0000000000..29b1183e20
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__kqueue.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/file_path_watcher_kqueue.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/files/file_path_watcher_kqueue.h
+@@ -5,6 +5,7 @@
+ #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+ #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+ 
++#include <sys/time.h>
+ #include <sys/event.h>
+ 
+ #include <memory>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc
new file mode 100644
index 0000000000..8125e67f31
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/file_path_watcher_unittest.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/files/file_path_watcher_unittest.cc
+@@ -847,7 +847,7 @@ TEST_F(FilePathWatcherTest, WatchDirecto
+   }
+   delegate.RunUntilEventsMatch(event_expecter);
+ 
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD)
+   ASSERT_TRUE(WriteFile(file1, "content v2"));
+   // Mac implementation does not detect files modified in a directory.
+   // TODO(https://crbug.com/1432064): Expect that no events are fired on Mac.
+@@ -1783,7 +1783,7 @@ namespace {
+ 
+ enum Permission { Read, Write, Execute };
+ 
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+ bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) {
+   struct stat stat_buf;
+ 
+@@ -1817,7 +1817,7 @@ bool ChangeFilePermissions(const FilePat
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD)
+ // Linux implementation of FilePathWatcher doesn't catch attribute changes.
+ // http://crbug.com/78043
+ // Windows implementation of FilePathWatcher catches attribute changes that
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__util__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__util__posix.cc
new file mode 100644
index 0000000000..86c2ead7ce
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__util__posix.cc
@@ -0,0 +1,59 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/file_util_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/files/file_util_posix.cc
+@@ -779,33 +779,33 @@ bool CreateDirectoryAndGetError(const Fi
+                                 File::Error* error) {
+   ScopedBlockingCall scoped_blocking_call(
+       FROM_HERE, BlockingType::MAY_BLOCK);  // For call to mkdir().
++  const FilePath kFileSystemRoot("/");
+   std::vector<FilePath> subpaths;
+ 
+   // Collect a list of all parent directories.
+   FilePath last_path = full_path;
+-  subpaths.push_back(full_path);
+-  for (FilePath path = full_path.DirName();
+-       path.value() != last_path.value(); path = path.DirName()) {
++  if (full_path != kFileSystemRoot)
++    subpaths.push_back(full_path);
++  for (FilePath path = full_path.DirName(); (path.value() != last_path.value() &&
++       (path != kFileSystemRoot)); path = path.DirName()) {
+     subpaths.push_back(path);
+     last_path = path;
+   }
+ 
+   // Iterate through the parents and create the missing ones.
+   for (const FilePath& subpath : base::Reversed(subpaths)) {
+-    if (DirectoryExists(subpath))
+-      continue;
+-    if (mkdir(subpath.value().c_str(), 0700) == 0)
+-      continue;
+-    // Mkdir failed, but it might have failed with EEXIST, or some other error
+-    // due to the directory appearing out of thin air. This can occur if
+-    // two processes are trying to create the same file system tree at the same
+-    // time. Check to see if it exists and make sure it is a directory.
+-    int saved_errno = errno;
+-    if (!DirectoryExists(subpath)) {
+-      if (error)
+-        *error = File::OSErrorToFileError(saved_errno);
+-      errno = saved_errno;
+-      return false;
++    if (!PathExists(subpath)) {
++      if ((mkdir(subpath.value().c_str(), 0700) == -1) &&
++          ((full_path != subpath) ? (errno != ENOENT) : (-1))) {
++        int saved_errno = errno;
++        if (error)
++          *error = File::OSErrorToFileError(saved_errno);
++        return false;
++      }
++    } else if (!DirectoryExists(subpath)) {
++        if (error)
++          *error = File::OSErrorToFileError(ENOTDIR);
++        return false;
+     }
+   }
+   return true;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__util__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__util__unittest.cc
new file mode 100644
index 0000000000..7c0ea746b9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_file__util__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/file_util_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/files/file_util_unittest.cc
+@@ -3928,7 +3928,7 @@ TEST_F(FileUtilTest, ReadFileToStringWit
+ }
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+ TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) {
+   FilePath file_path("/proc/cpuinfo");
+   std::string data = "temp";
+@@ -4665,7 +4665,7 @@ TEST(FileUtilMultiThreadedTest, MultiThr
+                 NULL);
+ #else
+     size_t bytes_written =
+-        ::write(::fileno(output_file.get()), content.c_str(), content.length());
++        ::write(fileno(output_file.get()), content.c_str(), content.length());
+ #endif
+     EXPECT_EQ(content.length(), bytes_written);
+     ::fflush(output_file.get());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_important__file__writer__cleaner.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_important__file__writer__cleaner.cc
new file mode 100644
index 0000000000..79cabb5714
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_important__file__writer__cleaner.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/important_file_writer_cleaner.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/files/important_file_writer_cleaner.cc
+@@ -25,7 +25,8 @@ namespace base {
+ namespace {
+ 
+ base::Time GetUpperBoundTime() {
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA)
++// needed because of .CreationTime() pledge
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // If process creation time is not available then use instance creation
+   // time as the upper-bound for old files. Modification times may be
+   // rounded-down to coarse-grained increments, e.g. FAT has 2s granularity,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_scoped__file.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_scoped__file.cc
new file mode 100644
index 0000000000..91193c693d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_files_scoped__file.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/files/scoped_file.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/files/scoped_file.cc
+@@ -32,7 +32,7 @@ void ScopedFDCloseTraits::Free(int fd) {
+   int ret = IGNORE_EINTR(close(fd));
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // NB: Some file descriptors can return errors from close() e.g. network
+   // filesystems such as NFS and Linux input devices. On Linux, macOS, and
+   // Fuchsia's POSIX layer, errors from close other than EBADF do not indicate
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_functional_unretained__traits.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_functional_unretained__traits.h
new file mode 100644
index 0000000000..8de5b279a0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_functional_unretained__traits.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/functional/unretained_traits.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/functional/unretained_traits.h
+@@ -93,7 +93,7 @@ struct SupportsUnretainedImpl {
+ // official builds, and then in non-test code as well.
+ #if defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) || \
+     (!defined(UNIT_TEST) && !defined(OFFICIAL_BUILD) &&        \
+-     (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)))
++     (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)))
+       static_assert(v,
+                     "Argument requires unretained storage, but type is not "
+                     "fully defined. This prevents determining whether "
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_i18n_icu__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_i18n_icu__util.cc
new file mode 100644
index 0000000000..9f6f85ceaf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_i18n_icu__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/i18n/icu_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/i18n/icu_util.cc
+@@ -52,7 +52,7 @@
+ #include "third_party/icu/source/common/unicode/unistr.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \
+     BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
+ #include "third_party/icu/source/i18n/unicode/timezone.h"
+ #endif
+@@ -328,7 +328,7 @@ void InitializeIcuTimeZone() {
+       FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization();
+   icu::TimeZone::adoptDefault(
+       icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id)));
+-#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
++#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)
+   // To respond to the time zone change properly, the default time zone
+   // cache in ICU has to be populated on starting up.
+   // See TimeZoneMonitorLinux::NotifyClientsFromImpl().
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_linux__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_linux__util.cc
new file mode 100644
index 0000000000..80e35da978
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_linux__util.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/linux_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/linux_util.cc
+@@ -154,10 +154,14 @@ void SetLinuxDistro(const std::string& d
+ }
+ 
+ bool GetThreadsForProcess(pid_t pid, std::vector<pid_t>* tids) {
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+   // 25 > strlen("/proc//task") + strlen(std::to_string(INT_MAX)) + 1 = 22
+   char buf[25];
+   strings::SafeSPrintf(buf, "/proc/%d/task", pid);
+   return GetThreadsFromProcessDir(buf, tids);
++#endif
+ }
+ 
+ bool GetThreadsForCurrentProcess(std::vector<pid_t>* tids) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_logging__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_logging__unittest.cc
new file mode 100644
index 0000000000..8a1dae5a85
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_logging__unittest.cc
@@ -0,0 +1,37 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/logging_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/logging_unittest.cc
+@@ -41,7 +41,7 @@
+ #include "base/posix/eintr_wrapper.h"
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD)
+ #include <ucontext.h>
+ #endif
+ 
+@@ -585,14 +585,18 @@ void CheckCrashTestSighandler(int, sigin
+   // need the arch-specific boilerplate below, which is inspired by breakpad.
+   // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine.
+   uintptr_t crash_addr = 0;
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   crash_addr = reinterpret_cast<uintptr_t>(info->si_addr);
+ #else  // OS_*
+   ucontext_t* context = reinterpret_cast<ucontext_t*>(context_ptr);
+ #if defined(ARCH_CPU_X86)
+   crash_addr = static_cast<uintptr_t>(context->uc_mcontext.gregs[REG_EIP]);
+ #elif defined(ARCH_CPU_X86_64)
++#if BUILDFLAG(IS_OPENBSD)
++  crash_addr = static_cast<uintptr_t>(context->sc_rip);
++#else
+   crash_addr = static_cast<uintptr_t>(context->uc_mcontext.gregs[REG_RIP]);
++#endif
+ #elif defined(ARCH_CPU_ARMEL)
+   crash_addr = static_cast<uintptr_t>(context->uc_mcontext.arm_pc);
+ #elif defined(ARCH_CPU_ARM64)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc
new file mode 100644
index 0000000000..b9cc02e468
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/memory/discardable_memory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/memory/discardable_memory.cc
+@@ -26,7 +26,7 @@ BASE_FEATURE(kMadvFreeDiscardableMemory,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kDiscardableMemoryBackingTrial,
+              "DiscardableMemoryBackingTrial",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -39,7 +39,7 @@ BASE_FEATURE(kDiscardableMemoryBackingTr
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ DiscardableMemoryBacking GetBackingForFieldTrial() {
+   DiscardableMemoryTrialGroup trial_group =
+@@ -58,7 +58,7 @@ DiscardableMemoryBacking GetBackingForFi
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ // Probe capabilities of this device to determine whether we should participate
+ // in the discardable memory backing trial.
+@@ -88,7 +88,7 @@ DiscardableMemory::DiscardableMemory() =
+ DiscardableMemory::~DiscardableMemory() = default;
+ 
+ DiscardableMemoryBacking GetDiscardableMemoryBacking() {
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (DiscardableMemoryBackingFieldTrialIsEnabled()) {
+     return GetBackingForFieldTrial();
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h
new file mode 100644
index 0000000000..8356de46a7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_discardable__memory__internal.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/memory/discardable_memory_internal.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/memory/discardable_memory_internal.h
+@@ -12,7 +12,7 @@
+ #include "base/metrics/field_trial_params.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ namespace base {
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc
new file mode 100644
index 0000000000..f8dc3144ba
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_madv__free__discardable__memory__posix.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/memory/madv_free_discardable_memory_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/memory/madv_free_discardable_memory_posix.cc
+@@ -310,6 +310,10 @@ void MadvFreeDiscardableMemoryPosix::Set
+ 
+ bool MadvFreeDiscardableMemoryPosix::IsResident() const {
+   DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_);
++// XXX mincore
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+ #if BUILDFLAG(IS_APPLE)
+   std::vector<char> vec(allocated_pages_);
+ #else
+@@ -325,6 +329,7 @@ bool MadvFreeDiscardableMemoryPosix::IsR
+       return false;
+   }
+   return true;
++#endif
+ }
+ 
+ bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h
new file mode 100644
index 0000000000..40118ba386
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/memory/platform_shared_memory_region.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/memory/platform_shared_memory_region.h
+@@ -16,7 +16,7 @@
+ 
+ #include <stdint.h>
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ namespace content {
+ class SandboxIPCHandler;
+ }
+@@ -83,7 +83,7 @@ class BASE_EXPORT PlatformSharedMemoryRe
+     kMaxValue = GET_SHMEM_TEMP_DIR_FAILURE
+   };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Structure to limit access to executable region creation.
+   struct ExecutableRegion {
+    private:
+@@ -215,7 +215,7 @@ class BASE_EXPORT PlatformSharedMemoryRe
+                            CheckPlatformHandlePermissionsCorrespondToMode);
+   static PlatformSharedMemoryRegion Create(Mode mode,
+                                            size_t size
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                                            ,
+                                            bool executable = false
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc
new file mode 100644
index 0000000000..80ae3f646e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_memory_platform__shared__memory__region__posix.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/memory/platform_shared_memory_region_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/memory/platform_shared_memory_region_posix.cc
+@@ -55,7 +55,7 @@ bool CheckFDAccessMode(int fd, int expec
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion::CreateFD(size_t size) {
+   PlatformSharedMemoryRegion region =
+@@ -168,7 +168,7 @@ bool PlatformSharedMemoryRegion::Convert
+ // static
+ PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode,
+                                                               size_t size
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                                                               ,
+                                                               bool executable
+ #endif
+@@ -197,7 +197,7 @@ PlatformSharedMemoryRegion PlatformShare
+   // flag.
+   FilePath directory;
+   if (!GetShmemTempDir(
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+           executable,
+ #else
+           false /* executable */,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_message__loop_message__pump__glib.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_message__loop_message__pump__glib.cc
new file mode 100644
index 0000000000..80b18e32fc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_message__loop_message__pump__glib.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/message_loop/message_pump_glib.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/message_loop/message_pump_glib.cc
+@@ -8,6 +8,15 @@
+ #include <glib.h>
+ #include <math.h>
+ 
++#if BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_NETBSD)
++#include <lwp.h>
++#else
++#include <pthread.h>
++#include <pthread_np.h>
++#endif
++#endif
++
+ #include "base/logging.h"
+ #include "base/memory/raw_ptr.h"
+ #include "base/notreached.h"
+@@ -51,9 +60,19 @@ int GetTimeIntervalMilliseconds(TimeTick
+ }
+ 
+ bool RunningOnMainThread() {
++#if BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_NETBSD)
++  auto pid = getpid();
++  auto tid = _lwp_self();
++  return pid > 0 && tid > 0 && pid == tid;
++#else
++  return pthread_main_np();
++#endif
++#else
+   auto pid = getpid();
+   auto tid = PlatformThread::CurrentId();
+   return pid > 0 && tid > 0 && pid == tid;
++#endif
+ }
+ 
+ // A brief refresher on GLib:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_native__library__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_native__library__posix.cc
new file mode 100644
index 0000000000..fd9e82e152
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_native__library__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/native_library_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/native_library_posix.cc
+@@ -34,7 +34,7 @@ NativeLibrary LoadNativeLibraryWithOptio
+   // http://crbug.com/17943, http://crbug.com/17557, http://crbug.com/36892,
+   // and http://crbug.com/40794.
+   int flags = RTLD_LAZY;
+-#if BUILDFLAG(IS_ANDROID) || !defined(RTLD_DEEPBIND)
++#if BUILDFLAG(IS_ANDROID) || !defined(RTLD_DEEPBIND) || BUILDFLAG(IS_BSD)
+   // Certain platforms don't define RTLD_DEEPBIND. Android dlopen() requires
+   // further investigation, as it might vary across versions. Crash here to
+   // warn developers that they're trying to rely on uncertain behavior.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_native__library__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_native__library__unittest.cc
new file mode 100644
index 0000000000..cf6935f925
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_native__library__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/native_library_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/native_library_unittest.cc
+@@ -135,7 +135,7 @@ TEST(NativeLibraryTest, LoadLibrary) {
+ // versions with respect to symbol resolution scope.
+ // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255
+ #if !BUILDFLAG(IS_ANDROID) && !defined(THREAD_SANITIZER) && \
+-    !defined(MEMORY_SANITIZER)
++    !defined(MEMORY_SANITIZER) && !BUILDFLAG(IS_BSD)
+ 
+ // Verifies that the |prefer_own_symbols| option satisfies its guarantee that
+ // a loaded library will always prefer local symbol resolution before
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_can__lower__nice__to.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_can__lower__nice__to.cc
new file mode 100644
index 0000000000..daf41ff3d4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_can__lower__nice__to.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/posix/can_lower_nice_to.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/posix/can_lower_nice_to.cc
+@@ -11,8 +11,12 @@
+ 
+ #include "build/build_config.h"
+ 
++#if BUILDFLAG(IS_FREEBSD)
++#include <sys/param.h>
++#endif
++
+ // Not defined on AIX by default.
+-#if BUILDFLAG(IS_AIX)
++#if BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ #if defined(RLIMIT_NICE)
+ #error Assumption about OS_AIX is incorrect
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_file__descriptor__shuffle.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_file__descriptor__shuffle.h
new file mode 100644
index 0000000000..aa55e3c803
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_file__descriptor__shuffle.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/posix/file_descriptor_shuffle.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/posix/file_descriptor_shuffle.h
+@@ -26,6 +26,8 @@
+ #include "base/base_export.h"
+ #include "base/compiler_specific.h"
+ 
++#undef close
++
+ namespace base {
+ 
+ // A Delegate which performs the actions required to perform an injective
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_sysctl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_sysctl.cc
new file mode 100644
index 0000000000..2c3f5f01a0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_sysctl.cc
@@ -0,0 +1,38 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/posix/sysctl.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/posix/sysctl.cc
+@@ -4,6 +4,7 @@
+ 
+ #include "base/posix/sysctl.h"
+ 
++#include <sys/types.h>
+ #include <sys/sysctl.h>
+ 
+ #include <initializer_list>
+@@ -16,17 +17,17 @@
+ #include "third_party/abseil-cpp/absl/types/optional.h"
+ 
+ namespace {
+-
++// NetBSD has sysctl_func macro in sys/sysctl.h, workaround: sysctl_func -> sysctl_func2
+ absl::optional<std::string> StringSysctlImpl(
+-    base::FunctionRef<int(char* /*out*/, size_t* /*out_len*/)> sysctl_func) {
++    base::FunctionRef<int(char* /*out*/, size_t* /*out_len*/)> sysctl_func2) {
+   size_t buf_len;
+-  int result = sysctl_func(nullptr, &buf_len);
++  int result = sysctl_func2(nullptr, &buf_len);
+   if (result < 0 || buf_len < 1) {
+     return absl::nullopt;
+   }
+ 
+   std::string value(buf_len - 1, '\0');
+-  result = sysctl_func(&value[0], &buf_len);
++  result = sysctl_func2(&value[0], &buf_len);
+   if (result < 0) {
+     return absl::nullopt;
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc
new file mode 100644
index 0000000000..cb84f5e5e5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc
@@ -0,0 +1,63 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/posix/unix_domain_socket.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/posix/unix_domain_socket.cc
+@@ -56,7 +56,7 @@ bool CreateSocketPair(ScopedFD* one, Sco
+ 
+ // static
+ bool UnixDomainSocket::EnableReceiveProcessId(int fd) {
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+   const int enable = 1;
+   return setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable)) == 0;
+ #else
+@@ -82,7 +82,7 @@ bool UnixDomainSocket::SendMsg(int fd,
+ 
+     struct cmsghdr* cmsg;
+     msg.msg_control = control_buffer;
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+     msg.msg_controllen = checked_cast<socklen_t>(control_len);
+ #else
+     msg.msg_controllen = control_len;
+@@ -90,7 +90,7 @@ bool UnixDomainSocket::SendMsg(int fd,
+     cmsg = CMSG_FIRSTHDR(&msg);
+     cmsg->cmsg_level = SOL_SOCKET;
+     cmsg->cmsg_type = SCM_RIGHTS;
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+     cmsg->cmsg_len = checked_cast<u_int>(CMSG_LEN(sizeof(int) * fds.size()));
+ #else
+     cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size());
+@@ -154,7 +154,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
+ 
+   const size_t kControlBufferSize =
+       CMSG_SPACE(sizeof(int) * kMaxFileDescriptors)
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+       // macOS does not support ucred.
+       // macOS supports xucred, but this structure is insufficient.
+       + CMSG_SPACE(sizeof(struct ucred))
+@@ -182,7 +182,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
+         wire_fds = reinterpret_cast<int*>(CMSG_DATA(cmsg));
+         wire_fds_len = payload_len / sizeof(int);
+       }
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+       // macOS does not support SCM_CREDENTIALS.
+       if (cmsg->cmsg_level == SOL_SOCKET &&
+           cmsg->cmsg_type == SCM_CREDENTIALS) {
+@@ -216,6 +216,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
+     socklen_t pid_size = sizeof(pid);
+     if (getsockopt(fd, SOL_LOCAL, LOCAL_PEERPID, &pid, &pid_size) != 0)
+       pid = -1;
++#elif BUILDFLAG(IS_BSD)
++    NOTIMPLEMENTED();
++    pid = -1;
+ #else
+     // |pid| will legitimately be -1 if we read EOF, so only DCHECK if we
+     // actually received a message.  Unfortunately, Linux allows sending zero
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc
new file mode 100644
index 0000000000..3077bf45b7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/posix/unix_domain_socket_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/posix/unix_domain_socket_unittest.cc
+@@ -15,6 +15,8 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#include <signal.h>
++
+ #include "base/files/file_util.h"
+ #include "base/files/scoped_file.h"
+ #include "base/functional/bind.h"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_internal__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_internal__linux.h
new file mode 100644
index 0000000000..539d6d03a7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_internal__linux.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/internal_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/internal_linux.h
+@@ -140,6 +140,9 @@ TimeDelta ClockTicksToTimeDelta(int64_t 
+ // arguments to the lambda.
+ template <typename Lambda>
+ void ForEachProcessTask(base::ProcessHandle process, Lambda&& lambda) {
++#if BUILDFLAG(IS_BSD)
++  return;
++#else
+   // Iterate through the different threads tracked in /proc/<pid>/task.
+   FilePath fd_path = GetProcPidDir(process).Append("task");
+ 
+@@ -159,6 +162,7 @@ void ForEachProcessTask(base::ProcessHan
+     FilePath task_path = fd_path.Append(tid_str);
+     lambda(tid, task_path);
+   }
++#endif
+ }
+ 
+ }  // namespace internal
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_kill.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_kill.h
new file mode 100644
index 0000000000..038d951303
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_kill.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/kill.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/kill.h
+@@ -123,7 +123,7 @@ BASE_EXPORT TerminationStatus GetTermina
+ BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus(
+     ProcessHandle handle, int* exit_code);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Spawns a thread to wait asynchronously for the child |process| to exit
+ // and then reaps it.
+ BASE_EXPORT void EnsureProcessGetsReaped(Process process);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_kill__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_kill__posix.cc
new file mode 100644
index 0000000000..e5c1ef8424
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_kill__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/kill_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/kill_posix.cc
+@@ -157,7 +157,7 @@ void EnsureProcessTerminated(Process pro
+       0, new BackgroundReaper(std::move(process), Seconds(2)));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void EnsureProcessGetsReaped(Process process) {
+   DCHECK(!process.is_current());
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_launch.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_launch.h
new file mode 100644
index 0000000000..46d4f84863
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_launch.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/launch.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/process/launch.h
+@@ -7,6 +7,13 @@
+ #ifndef BASE_PROCESS_LAUNCH_H_
+ #define BASE_PROCESS_LAUNCH_H_
+ 
++#if defined(__NetBSD__)
++#define _NETBSD_SOURCE 1
++#ifndef PTHREAD_STACK_MIN
++#define PTHREAD_STACK_MIN 4096
++#endif
++#endif
++
+ #include <stddef.h>
+ 
+ #include <string>
+@@ -200,7 +207,7 @@ struct BASE_EXPORT LaunchOptions {
+   bool clear_environment = false;
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // If non-zero, start the process using clone(), using flags as provided.
+   // Unlike in clone, clone_flags may not contain a custom termination signal
+   // that is sent to the parent when the child dies. The termination signal will
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_launch__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_launch__posix.cc
new file mode 100644
index 0000000000..96b360429f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_launch__posix.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/launch_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/launch_posix.cc
+@@ -67,6 +67,9 @@
+ #error "macOS should use launch_mac.cc"
+ #endif
+ 
++#if defined(OS_FREEBSD)
++#pragma weak environ
++#endif
+ extern char** environ;
+ 
+ namespace base {
+@@ -223,6 +226,8 @@ static const char kFDDir[] = "/dev/fd";
+ static const char kFDDir[] = "/dev/fd";
+ #elif BUILDFLAG(IS_OPENBSD)
+ static const char kFDDir[] = "/dev/fd";
++#elif BUILDFLAG(IS_NETBSD)
++static const char kFDDir[] = "/dev/fd";
+ #elif BUILDFLAG(IS_ANDROID)
+ static const char kFDDir[] = "/proc/self/fd";
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_memory__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_memory__linux.cc
new file mode 100644
index 0000000000..992b472eaa
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_memory__linux.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/memory_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/process/memory_linux.cc
+@@ -28,6 +28,7 @@ void __libc_free(void*);
+ 
+ namespace base {
+ 
++#if !BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ void ReleaseReservationOrTerminate() {
+@@ -37,12 +38,14 @@ void ReleaseReservationOrTerminate() {
+ }
+ 
+ }  // namespace
++#endif
+ 
+ void EnableTerminationOnHeapCorruption() {
+   // On Linux, there nothing to do AFAIK.
+ }
+ 
+ void EnableTerminationOnOutOfMemory() {
++#if !BUILDFLAG(IS_BSD)
+   // Set the new-out of memory handler.
+   std::set_new_handler(&ReleaseReservationOrTerminate);
+   // If we're using glibc's allocator, the above functions will override
+@@ -51,8 +54,10 @@ void EnableTerminationOnOutOfMemory() {
+ #if BUILDFLAG(USE_ALLOCATOR_SHIM)
+   allocator_shim::SetCallNewHandlerOnMallocFailure(true);
+ #endif
++#endif
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ // ScopedAllowBlocking() has private constructor and it can only be used in
+ // friend classes/functions. Declaring a class is easier in this situation to
+ // avoid adding more dependency to thread_restrictions.h because of the
+@@ -112,6 +117,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScor
+ bool AdjustOOMScore(ProcessId process, int score) {
+   return AdjustOOMScoreHelper::AdjustOOMScore(process, score);
+ }
++#endif
+ 
+ bool UncheckedMalloc(size_t size, void** result) {
+ #if BUILDFLAG(USE_ALLOCATOR_SHIM)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle.cc
new file mode 100644
index 0000000000..d26f5872da
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_handle.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_handle.cc
+@@ -30,7 +30,7 @@ UniqueProcId GetUniqueIdForProcess() {
+              : UniqueProcId(GetCurrentProcId());
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ 
+ void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) {
+   DCHECK(pid_outside_of_namespace != kNullProcessId);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle.h
new file mode 100644
index 0000000000..87e016c342
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_handle.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_handle.h
+@@ -86,7 +86,7 @@ BASE_EXPORT ProcessId GetCurrentProcId()
+ // processes may be reused.
+ BASE_EXPORT UniqueProcId GetUniqueIdForProcess();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // When a process is started in a different PID namespace from the browser
+ // process, this function must be called with the process's PID in the browser's
+ // PID namespace in order to initialize its unique ID. Not thread safe.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc
new file mode 100644
index 0000000000..5c845d332b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_handle_freebsd.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_handle_freebsd.cc
+@@ -3,6 +3,7 @@
+ // found in the LICENSE file.
+ 
+ #include "base/process/process_handle.h"
++#include "base/files/file_util.h"
+ 
+ #include <limits.h>
+ #include <stddef.h>
+@@ -20,12 +21,15 @@ namespace base {
+ 
+ ProcessId GetParentProcessId(ProcessHandle process) {
+   struct kinfo_proc info;
+-  size_t length;
++  size_t length = sizeof(struct kinfo_proc);
+   int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process };
+ 
+   if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0)
+     return -1;
+ 
++  if (length < sizeof(struct kinfo_proc))
++    return -1;
++
+   return info.ki_ppid;
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__netbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__netbsd.cc
new file mode 100644
index 0000000000..5339aa0e39
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__netbsd.cc
@@ -0,0 +1,64 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_handle_netbsd.cc.orig	2024-12-21 10:25:09.614530232 +0000
++++ src/3rdparty/chromium/base/process/process_handle_netbsd.cc
+@@ -0,0 +1,55 @@
++// Copyright 2011 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/process/process_handle.h"
++#include "base/files/file_util.h"
++
++#include <stddef.h>
++#include <sys/param.h>
++#include <sys/proc.h>
++#include <sys/sysctl.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++#include <optional>
++
++#include "base/files/file_path.h"
++#include "base/posix/sysctl.h"
++
++namespace base {
++
++ProcessId GetParentProcessId(ProcessHandle process) {
++  struct kinfo_proc2 *info;
++  size_t length;
++  pid_t ppid;
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, process,
++                sizeof(struct kinfo_proc2), 1 };
++
++  if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0)
++    return -1;
++
++  info = (struct kinfo_proc2 *)malloc(length);
++
++  mib[5] = static_cast<int>((length / sizeof(struct kinfo_proc2)));
++
++  if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) {
++    ppid = -1;
++    goto out;
++  }
++
++  ppid = info->p_ppid;
++
++out:
++  free(info);
++  return ppid;
++}
++
++FilePath GetProcessExecutablePath(ProcessHandle process) {
++  std::optional<std::string> pathname =
++      base::StringSysctl({CTL_KERN, KERN_PROC_ARGS, process, KERN_PROC_PATHNAME});
++
++  return FilePath(pathname.value_or(std::string{}));
++}
++
++}  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__openbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__openbsd.cc
new file mode 100644
index 0000000000..d2e06ef320
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__handle__openbsd.cc
@@ -0,0 +1,140 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_handle_openbsd.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_handle_openbsd.cc
+@@ -3,48 +3,112 @@
+ // found in the LICENSE file.
+ 
+ #include "base/process/process_handle.h"
++#include "base/files/file_util.h"
+ 
+ #include <stddef.h>
++#include <stdlib.h>
++#include <sys/param.h>
++#include <sys/proc.h>
++#include <sys/stat.h>
+ #include <sys/sysctl.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#include <kvm.h>
++
+ namespace base {
+ 
+ ProcessId GetParentProcessId(ProcessHandle process) {
+-  struct kinfo_proc info;
++  struct kinfo_proc *info;
+   size_t length;
++  pid_t ppid;
+   int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process,
+                 sizeof(struct kinfo_proc), 0 };
+ 
+   if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0)
+     return -1;
+ 
+-  mib[5] = (length / sizeof(struct kinfo_proc));
++  info = (struct kinfo_proc *)malloc(length);
+ 
+-  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0)
+-    return -1;
++  mib[5] = static_cast<int>((length / sizeof(struct kinfo_proc)));
++
++  if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) {
++    ppid = -1;
++    goto out;
++  }
++
++  ppid = info->p_ppid;
+ 
+-  return info.p_ppid;
++out:
++  free(info);
++  return ppid;
+ }
+ 
+ FilePath GetProcessExecutablePath(ProcessHandle process) {
+-  struct kinfo_proc kp;
++  struct kinfo_file *files;
++  kvm_t *kd = NULL;
++  char errbuf[_POSIX2_LINE_MAX];
++  char **retvalargs, *cpath, retval[PATH_MAX];
++  int cnt;
+   size_t len;
+-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process,
+-                sizeof(struct kinfo_proc), 0 };
+-
+-  if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) == -1)
+-    return FilePath();
+-  mib[5] = (len / sizeof(struct kinfo_proc));
+-  if (sysctl(mib, std::size(mib), &kp, &len, NULL, 0) < 0)
+-    return FilePath();
+-  if ((kp.p_flag & P_SYSTEM) != 0)
+-    return FilePath();
+-  if (strcmp(kp.p_comm, "chrome") == 0)
+-    return FilePath(kp.p_comm);
++  char *tokens[2];
++  struct stat sb;
++  FilePath result;
++
++  int mib[] = { CTL_KERN, KERN_PROC_ARGS, process, KERN_PROC_ARGV };
++
++  if ((cpath = getenv("CHROME_EXE_PATH")) != NULL)
++    result = FilePath(cpath);
++  else
++    result = FilePath("@PREFIX@/lib/chromium/chrome");
++
++  if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) != -1) {
++    retvalargs = static_cast<char**>(malloc(len));
++    if (!retvalargs)
++      return result;
++
++    if (sysctl(mib, std::size(mib), retvalargs, &len, NULL, 0) < 0) {
++      free(retvalargs);
++      return result;
++    }
++
++    if ((*tokens = strtok(retvalargs[0], ":")) == NULL) {
++      free(retvalargs);
++      return result;
++    }
++
++    free(retvalargs);
++
++    if (tokens[0] == NULL)
++      return result;
++
++    if (realpath(tokens[0], retval) == NULL)
++      return result;
++
++    if (stat(retval, &sb) < 0)
++      return result;
++
++    if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES,
++         errbuf)) == NULL)
++      return result;
++
++    if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process,
++        sizeof(struct kinfo_file), &cnt)) == NULL) {
++      kvm_close(kd);
++      return result;
++    }
++
++    for (int i = 0; i < cnt; i++) {
++      if (files[i].fd_fd == KERN_FILE_TEXT &&
++          files[i].va_fsid == static_cast<uint32_t>(sb.st_dev) &&
++          files[i].va_fileid == sb.st_ino) {
++            kvm_close(kd);
++            result = FilePath(retval);
++      }
++    }
++  }
+ 
+-  return FilePath();
++  return result;
+ }
+ 
+ }  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator.h
new file mode 100644
index 0000000000..00b53f8ee9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_iterator.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_iterator.h
+@@ -24,7 +24,7 @@
+ #include <windows.h>
+ 
+ #include <tlhelp32.h>
+-#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
+ #include <sys/sysctl.h>
+ #elif BUILDFLAG(IS_FREEBSD)
+ #include <sys/user.h>
+@@ -116,7 +116,11 @@ class BASE_EXPORT ProcessIterator {
+   HANDLE snapshot_;
+   bool started_iteration_ = false;
+ #elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
++# if BUILDFLAG(IS_NETBSD)
++  std::vector<kinfo_proc2> kinfo_procs_;
++# else
+   std::vector<kinfo_proc> kinfo_procs_;
++# endif
+   size_t index_of_kinfo_proc_ = 0;
+ #elif BUILDFLAG(IS_POSIX)
+   struct DIRClose {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc
new file mode 100644
index 0000000000..562273196f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc
@@ -0,0 +1,57 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_iterator_freebsd.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_iterator_freebsd.cc
+@@ -18,7 +18,7 @@ namespace base {
+ 
+ ProcessIterator::ProcessIterator(const ProcessFilter* filter)
+     : filter_(filter) {
+-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid() };
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, (int) getuid() };
+ 
+   bool done = false;
+   int try_num = 1;
+@@ -37,7 +37,7 @@ ProcessIterator::ProcessIterator(const P
+       num_of_kinfo_proc += 16;
+       kinfo_procs_.resize(num_of_kinfo_proc);
+       len = num_of_kinfo_proc * sizeof(struct kinfo_proc);
+-      if (sysctl(mib, std::size(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) {
++      if (sysctl(mib, std::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) {
+@@ -47,7 +47,7 @@ ProcessIterator::ProcessIterator(const P
+         }
+       } else {
+         // Got the list, just make sure we're sized exactly right
+-        size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
++	num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
+         kinfo_procs_.resize(num_of_kinfo_proc);
+         done = true;
+       }
+@@ -68,18 +68,13 @@ bool ProcessIterator::CheckForNextProces
+   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_];
+-    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid };
++    int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, kinfo.ki_pid };
+ 
+     if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB))
+       continue;
+ 
+-    length = 0;
+-    if (sysctl(mib, std::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, std::size(mib), &data[0], &length, NULL, 0) < 0) {
+       LOG(ERROR) << "failed to fetch a commandline";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__netbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__netbsd.cc
new file mode 100644
index 0000000000..6b1a074343
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__netbsd.cc
@@ -0,0 +1,141 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_iterator_netbsd.cc.orig	2024-12-21 10:25:09.617721988 +0000
++++ src/3rdparty/chromium/base/process/process_iterator_netbsd.cc
+@@ -0,0 +1,132 @@
++// Copyright 2013 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/process/process_iterator.h"
++
++#include <errno.h>
++#include <stddef.h>
++#include <unistd.h>
++#include <sys/param.h>
++#include <sys/proc.h>
++#include <sys/sysctl.h>
++
++#include "base/logging.h"
++#include "base/strings/string_split.h"
++#include "base/strings/string_util.h"
++
++namespace base {
++
++ProcessIterator::ProcessIterator(const ProcessFilter* filter)
++    : filter_(filter) {
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_UID, static_cast<int>(getuid()),
++                sizeof(struct kinfo_proc2), 1 };
++
++  bool done = false;
++  int try_num = 1;
++  const int max_tries = 10;
++  size_t num_of_kinfo_proc;
++
++  do {
++    size_t len = 0;
++    if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) < 0) {
++      DLOG(ERROR) << "failed to get the size needed for the process list";
++      kinfo_procs_.resize(0);
++      done = true;
++    } else {
++      num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
++      // Leave some spare room for process table growth (more could show up
++      // between when we check and now)
++      num_of_kinfo_proc += 16;
++      kinfo_procs_.resize(num_of_kinfo_proc);
++      len = num_of_kinfo_proc * sizeof(struct kinfo_proc2);
++      if (sysctl(mib, std::size(mib), &kinfo_procs_[0], &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) {
++          DLOG(ERROR) << "failed to get the process list";
++          kinfo_procs_.resize(0);
++          done = true;
++        }
++      } else {
++        // Got the list, just make sure we're sized exactly right
++        num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
++        kinfo_procs_.resize(num_of_kinfo_proc);
++        done = true;
++      }
++    }
++  } while (!done && (try_num++ < max_tries));
++
++  if (!done) {
++    DLOG(ERROR) << "failed to collect the process list in a few tries";
++    kinfo_procs_.resize(0);
++  }
++}
++
++ProcessIterator::~ProcessIterator() = default;
++
++bool ProcessIterator::CheckForNextProcess() {
++  std::string data;
++  for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
++    kinfo_proc2& kinfo = kinfo_procs_[index_of_kinfo_proc_];
++
++    // Skip processes just awaiting collection
++    if ((kinfo.p_pid > 0) && (kinfo.p_stat == SZOMB))
++      continue;
++
++    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.p_pid };
++
++    // Find out what size buffer we need.
++    size_t data_len = 0;
++    if (sysctl(mib, std::size(mib), NULL, &data_len, NULL, 0) < 0) {
++      DVPLOG(1) << "failed to figure out the buffer size for a commandline";
++      continue;
++    }
++
++    data.resize(data_len);
++    if (sysctl(mib, std::size(mib), &data[0], &data_len, NULL, 0) < 0) {
++      DVPLOG(1) << "failed to fetch a commandline";
++      continue;
++    }
++
++    // |data| contains all the command line parameters of the process, separated
++    // by blocks of one or more null characters. We tokenize |data| into a
++    // vector of strings using '\0' as a delimiter and populate
++    // |entry_.cmd_line_args_|.
++    std::string delimiters;
++    delimiters.push_back('\0');
++    entry_.cmd_line_args_ = SplitString(data, delimiters, KEEP_WHITESPACE,
++                                        SPLIT_WANT_NONEMPTY);
++
++    // |data| starts with the full executable path followed by a null character.
++    // We search for the first instance of '\0' and extract everything before it
++    // to populate |entry_.exe_file_|.
++    size_t exec_name_end = data.find('\0');
++    if (exec_name_end == std::string::npos) {
++      DLOG(ERROR) << "command line data didn't match expected format";
++      continue;
++    }
++
++    entry_.pid_ = kinfo.p_pid;
++    entry_.ppid_ = kinfo.p_ppid;
++    entry_.gid_ = kinfo.p__pgid;
++    size_t last_slash = data.rfind('/', exec_name_end);
++    if (last_slash == std::string::npos)
++      entry_.exe_file_.assign(data, 0, exec_name_end);
++    else
++      entry_.exe_file_.assign(data, last_slash + 1,
++                              exec_name_end - last_slash - 1);
++    // Start w/ the next entry next time through
++    ++index_of_kinfo_proc_;
++    // Done
++    return true;
++  }
++  return false;
++}
++
++bool NamedProcessIterator::IncludeEntry() {
++  return (executable_name_ == entry().exe_file() &&
++          ProcessIterator::IncludeEntry());
++}
++
++}  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__openbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__openbsd.cc
new file mode 100644
index 0000000000..46371783de
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__iterator__openbsd.cc
@@ -0,0 +1,51 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_iterator_openbsd.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_iterator_openbsd.cc
+@@ -6,6 +6,9 @@
+ 
+ #include <errno.h>
+ #include <stddef.h>
++#include <unistd.h>
++#include <sys/param.h>
++#include <sys/proc.h>
+ #include <sys/sysctl.h>
+ 
+ #include "base/logging.h"
+@@ -16,12 +19,13 @@ namespace base {
+ 
+ ProcessIterator::ProcessIterator(const ProcessFilter* filter)
+     : filter_(filter) {
+-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid(),
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, static_cast<int>(getuid()),
+                 sizeof(struct kinfo_proc), 0 };
+ 
+   bool done = false;
+   int try_num = 1;
+   const int max_tries = 10;
++  size_t num_of_kinfo_proc;
+ 
+   do {
+     size_t len = 0;
+@@ -30,7 +34,7 @@ ProcessIterator::ProcessIterator(const P
+       kinfo_procs_.resize(0);
+       done = true;
+     } else {
+-      size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
++      num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
+       // Leave some spare room for process table growth (more could show up
+       // between when we check and now)
+       num_of_kinfo_proc += 16;
+@@ -46,7 +50,7 @@ ProcessIterator::ProcessIterator(const P
+         }
+       } else {
+         // Got the list, just make sure we're sized exactly right
+-        size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
++        num_of_kinfo_proc = len / sizeof(struct kinfo_proc);
+         kinfo_procs_.resize(num_of_kinfo_proc);
+         done = true;
+       }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics.cc
new file mode 100644
index 0000000000..98765e62bb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics.cc
@@ -0,0 +1,60 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_metrics.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_metrics.cc
+@@ -17,7 +17,7 @@ namespace base {
+ namespace {
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ int CalculateEventsPerSecond(uint64_t event_count,
+                              uint64_t* last_event_count,
+                              base::TimeTicks* last_calculated) {
+@@ -54,7 +54,7 @@ SystemMetrics SystemMetrics::Sample() {
+   SystemMetrics system_metrics;
+ 
+   system_metrics.committed_memory_ = GetSystemCommitCharge();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   GetSystemMemoryInfo(&system_metrics.memory_info_);
+   GetVmStatInfo(&system_metrics.vmstat_info_);
+   GetSystemDiskInfo(&system_metrics.disk_info_);
+@@ -73,7 +73,7 @@ Value::Dict SystemMetrics::ToDict() cons
+   Value::Dict res;
+ 
+   res.Set("committed_memory", static_cast<int>(committed_memory_));
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   Value::Dict meminfo = memory_info_.ToDict();
+   meminfo.Merge(vmstat_info_.ToDict());
+   res.Set("meminfo", std::move(meminfo));
+@@ -100,7 +100,6 @@ std::unique_ptr<ProcessMetrics> ProcessM
+ #endif  // !BUILDFLAG(IS_MAC)
+ }
+ 
+-#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX)
+ double ProcessMetrics::GetPlatformIndependentCPUUsage(
+     TimeDelta cumulative_cpu) {
+   TimeTicks time = TimeTicks::Now();
+@@ -126,7 +125,6 @@ double ProcessMetrics::GetPlatformIndepe
+ double ProcessMetrics::GetPlatformIndependentCPUUsage() {
+   return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage());
+ }
+-#endif
+ 
+ #if BUILDFLAG(IS_WIN)
+ double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) {
+@@ -157,7 +155,7 @@ double ProcessMetrics::GetPreciseCPUUsag
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ int ProcessMetrics::CalculateIdleWakeupsPerSecond(
+     uint64_t absolute_idle_wakeups) {
+   return CalculateEventsPerSecond(absolute_idle_wakeups,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics.h
new file mode 100644
index 0000000000..a7940d3356
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics.h
@@ -0,0 +1,126 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_metrics.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_metrics.h
+@@ -37,7 +37,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ #include <string>
+ #include <utility>
+ #include <vector>
+@@ -50,7 +50,7 @@ namespace base {
+ // Full declaration is in process_metrics_iocounters.h.
+ struct IoCounters;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ // Minor and major page fault counts since the process creation.
+ // Both counts are process-wide, and exclude child processes.
+ //
+@@ -105,7 +105,7 @@ class BASE_EXPORT ProcessMetrics {
+   // convenience wrapper for CreateProcessMetrics().
+   static std::unique_ptr<ProcessMetrics> CreateCurrentProcessMetrics();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_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;
+@@ -163,7 +163,7 @@ class BASE_EXPORT ProcessMetrics {
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   // Emits the cumulative CPU usage for all currently active threads since they
+   // were started into the output parameter (replacing its current contents).
+   // Threads that have already terminated will not be reported. Thus, the sum of
+@@ -219,7 +219,7 @@ class BASE_EXPORT ProcessMetrics {
+   int GetOpenFdSoftLimit() const;
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Bytes of swap as reported by /proc/[pid]/status.
+   uint64_t GetVmSwapBytes() const;
+ 
+@@ -240,7 +240,7 @@ class BASE_EXPORT ProcessMetrics {
+ #endif  // !BUILDFLAG(IS_MAC)
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
+ #endif
+ #if BUILDFLAG(IS_APPLE)
+@@ -262,9 +262,7 @@ class BASE_EXPORT ProcessMetrics {
+   // Used to store the previous times and CPU usage counts so we can
+   // compute the CPU usage between calls.
+   TimeTicks last_cpu_time_;
+-#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX)
+   TimeDelta last_cumulative_cpu_;
+-#endif
+ 
+ #if BUILDFLAG(IS_WIN)
+   TimeTicks last_cpu_time_for_precise_cpu_usage_;
+@@ -272,7 +270,7 @@ class BASE_EXPORT ProcessMetrics {
+ #endif
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   // Same thing for idle wakeups.
+   TimeTicks last_idle_wakeups_time_;
+   uint64_t last_absolute_idle_wakeups_;
+@@ -313,7 +311,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsig
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) ||      \
+     BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // Data about system-wide memory consumption. Values are in KB. Available on
+ // Windows, Mac, Linux, Android and Chrome OS.
+ //
+@@ -348,7 +346,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   // 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
+@@ -363,7 +361,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+ #endif
+ 
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   int buffers = 0;
+   int cached = 0;
+   int active_anon = 0;
+@@ -400,7 +398,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(Sys
+         // BUILDFLAG(IS_FUCHSIA)
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+ // Parse the data found in /proc/<pid>/stat and return the sum of the
+ // CPU-related ticks.  Returns -1 on parse error.
+ // Exposed for testing.
+@@ -588,7 +586,7 @@ class BASE_EXPORT SystemMetrics {
+   FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics);
+ 
+   size_t committed_memory_;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   SystemMemoryInfoKB memory_info_;
+   VmStatInfo vmstat_info_;
+   SystemDiskInfo disk_info_;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc
new file mode 100644
index 0000000000..b8aa6277cf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc
@@ -0,0 +1,307 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_metrics_freebsd.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_metrics_freebsd.cc
+@@ -3,20 +3,38 @@
+ // found in the LICENSE file.
+ 
+ #include "base/process/process_metrics.h"
++#include "base/notreached.h"
+ 
+ #include <stddef.h>
++#include <sys/types.h>
+ #include <sys/sysctl.h>
+ #include <sys/user.h>
+ #include <unistd.h>
+ 
++#include <fcntl.h> /* O_RDONLY */
++#include <kvm.h>
++#include <libutil.h>
++
+ #include "base/memory/ptr_util.h"
+ #include "base/process/process_metrics_iocounters.h"
++#include "base/values.h"
+ 
+ namespace base {
++namespace {
++int GetPageShift() {
++  int pagesize = getpagesize();
++  int pageshift = 0;
++
++  while (pagesize > 1) {
++    pageshift++;
++    pagesize >>= 1;
++  }
++
++  return pageshift;
++}
++}
+ 
+-ProcessMetrics::ProcessMetrics(ProcessHandle process)
+-    : process_(process),
+-      last_cpu_(0) {}
++ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {}
+ 
+ // static
+ std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
+@@ -24,20 +42,17 @@ std::unique_ptr<ProcessMetrics> ProcessM
+   return WrapUnique(new ProcessMetrics(process));
+ }
+ 
+-double ProcessMetrics::GetPlatformIndependentCPUUsage() {
++TimeDelta ProcessMetrics::GetCumulativeCPUUsage() {
+   struct kinfo_proc info;
+-  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process_};
+-  size_t length = sizeof(info);
++  size_t length = sizeof(struct kinfo_proc);
++  struct timeval tv;
+ 
+-  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0)
+-    return 0;
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ };
+ 
+-  return (info.ki_pctcpu / FSCALE) * 100.0;
+-}
++  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0)
++    return TimeDelta();
+ 
+-TimeDelta ProcessMetrics::GetCumulativeCPUUsage() {
+-  NOTREACHED();
+-  return TimeDelta();
++  return Microseconds(info.ki_runtime)
+ }
+ 
+ bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
+@@ -67,4 +82,228 @@ size_t GetSystemCommitCharge() {
+   return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
+ }
+ 
++int64_t GetNumberOfThreads(ProcessHandle process) {
++  // Taken from FreeBSD top (usr.bin/top/machine.c)
++
++  kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
++  if (kd == NULL)
++    return 0;
++
++  struct kinfo_proc* pbase;
++  int nproc;
++  pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc);
++  if (pbase == NULL)
++    return 0;
++
++  if (kvm_close(kd) == -1)
++    return 0;
++
++  return nproc;
++}
++
++bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) {
++  unsigned int mem_total, mem_free, swap_total, swap_used;
++  size_t length;
++  int pagesizeKB;
++
++  pagesizeKB = getpagesize() / 1024;
++
++  length = sizeof(mem_total);
++  if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total,
++      &length, NULL, 0) != 0 || length != sizeof(mem_total))
++    return false;
++
++  length = sizeof(mem_free);
++  if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0)
++      != 0 || length != sizeof(mem_free))
++    return false;
++
++  length = sizeof(swap_total);
++  if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0)
++      != 0 || length != sizeof(swap_total))
++    return false;
++
++  length = sizeof(swap_used);
++  if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0)
++      != 0 || length != sizeof(swap_used))
++    return false;
++
++  meminfo->total = mem_total * pagesizeKB;
++  meminfo->free = mem_free * pagesizeKB;
++  meminfo->swap_total = swap_total * pagesizeKB;
++  meminfo->swap_free = (swap_total - swap_used) * pagesizeKB;
++
++  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, std::size(mib), &total_count, &length, NULL, 0) < 0) {
++    total_count = -1;
++  }
++
++  return total_count;
++}
++
++size_t ProcessMetrics::GetResidentSetSize() const {
++  kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open");
++
++  if (kd == nullptr)
++    return 0;
++
++  struct kinfo_proc *pp;
++  int nproc;
++
++  if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) {
++    kvm_close(kd);
++    return 0;
++  }
++
++  size_t rss;
++
++  if (nproc > 0) {
++    rss = pp->ki_rssize << GetPageShift();
++  } else {
++    rss = 0;
++  }
++
++  kvm_close(kd);
++  return rss;
++}
++
++uint64_t ProcessMetrics::GetVmSwapBytes() const {
++  kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open");
++
++  if (kd == nullptr)
++    return 0;
++
++  struct kinfo_proc *pp;
++  int nproc;
++
++  if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) {
++    kvm_close(kd);
++    return 0;
++  }
++
++  size_t swrss;
++
++  if (nproc > 0) {
++    swrss = pp->ki_swrss > pp->ki_rssize
++      ? (pp->ki_swrss - pp->ki_rssize) << GetPageShift()
++      : 0;
++  } else {
++    swrss = 0;
++  }
++
++  kvm_close(kd);
++  return swrss;
++}
++
++int ProcessMetrics::GetIdleWakeupsPerSecond() {
++  NOTIMPLEMENTED();
++  return 0;
++}
++
++bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetVmStatInfo(VmStatInfo* vmstat) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++SystemDiskInfo::SystemDiskInfo() {
++  reads = 0;
++  reads_merged = 0;
++  sectors_read = 0;
++  read_time = 0;
++  writes = 0;
++  writes_merged = 0;
++  sectors_written = 0;
++  write_time = 0;
++  io = 0;
++  io_time = 0;
++  weighted_io_time = 0;
++}
++
++SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default;
++
++SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
++
++Value::Dict SystemDiskInfo::ToDict() const {
++  Value::Dict res;
++
++  // Write out uint64_t variables as doubles.
++  // Note: this may discard some precision, but for JS there's no other option.
++  res.Set("reads", static_cast<double>(reads));
++  res.Set("reads_merged", static_cast<double>(reads_merged));
++  res.Set("sectors_read", static_cast<double>(sectors_read));
++  res.Set("read_time", static_cast<double>(read_time));
++  res.Set("writes", static_cast<double>(writes));
++  res.Set("writes_merged", static_cast<double>(writes_merged));
++  res.Set("sectors_written", static_cast<double>(sectors_written));
++  res.Set("write_time", static_cast<double>(write_time));
++  res.Set("io", static_cast<double>(io));
++  res.Set("io_time", static_cast<double>(io_time));
++  res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++Value::Dict SystemMemoryInfoKB::ToDict() const {
++  Value::Dict res;
++  res.Set("total", total);
++  res.Set("free", free);
++  res.Set("available", available);
++  res.Set("buffers", buffers);
++  res.Set("cached", cached);
++  res.Set("active_anon", active_anon);
++  res.Set("inactive_anon", inactive_anon);
++  res.Set("active_file", active_file);
++  res.Set("inactive_file", inactive_file);
++  res.Set("swap_total", swap_total);
++  res.Set("swap_free", swap_free);
++  res.Set("swap_used", swap_total - swap_free);
++  res.Set("dirty", dirty);
++  res.Set("reclaimable", reclaimable);
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++Value::Dict VmStatInfo::ToDict() const {
++  Value::Dict res;
++  // TODO(crbug.com/1334256): Make base::Value able to hold uint64_t and remove
++  // casts below.
++  res.Set("pswpin", static_cast<int>(pswpin));
++  res.Set("pswpout", static_cast<int>(pswpout));
++  res.Set("pgmajfault", static_cast<int>(pgmajfault));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
+ }  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__netbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__netbsd.cc
new file mode 100644
index 0000000000..7b865ae887
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__netbsd.cc
@@ -0,0 +1,183 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_metrics_netbsd.cc.orig	2024-12-21 10:25:09.621647360 +0000
++++ src/3rdparty/chromium/base/process/process_metrics_netbsd.cc
+@@ -0,0 +1,174 @@
++// Copyright 2013 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/process/process_metrics.h"
++
++#include <stddef.h>
++#include <stdint.h>
++#include <fcntl.h>
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <sys/vmmeter.h>
++
++#include "base/memory/ptr_util.h"
++#include "base/types/expected.h"
++#include "base/values.h"
++#include "base/notreached.h"
++
++namespace base {
++
++ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {}
++
++TimeDelta ProcessMetrics::GetCumulativeCPUUsage() {
++  struct kinfo_proc2 info;
++  size_t length = sizeof(struct kinfo_proc2);
++  struct timeval tv;
++
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, process_,
++                sizeof(struct kinfo_proc2), 1 };
++
++  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) {
++    return TimeDelta();
++  }
++
++  tv.tv_sec = info.p_rtime_sec;
++  tv.tv_usec = info.p_rtime_usec;
++
++  return Microseconds(TimeValToMicroseconds(tv));
++}
++
++// static
++std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
++    ProcessHandle process) {
++  return WrapUnique(new ProcessMetrics(process));
++}
++
++size_t GetSystemCommitCharge() {
++  int mib[] = { CTL_VM, VM_METER };
++  size_t pagesize;
++  struct vmtotal vmtotal;
++  unsigned long mem_total, mem_free, mem_inactive;
++  size_t len = sizeof(vmtotal);
++
++  if (sysctl(mib, std::size(mib), &vmtotal, &len, NULL, 0) < 0) {
++    return 0;
++  }
++
++  mem_total = vmtotal.t_vm;
++  mem_free = vmtotal.t_free;
++  mem_inactive = vmtotal.t_vm - vmtotal.t_avm;
++
++  pagesize = checked_cast<size_t>(getpagesize());
++
++  return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
++}
++
++int ProcessMetrics::GetOpenFdCount() const {
++  return -1;
++}
++
++int ProcessMetrics::GetOpenFdSoftLimit() const {
++  return getdtablesize();
++//  return GetMaxFds();
++}
++
++uint64_t ProcessMetrics::GetVmSwapBytes() const {
++  NOTIMPLEMENTED();
++  return 0;
++}
++
++bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
++  NOTIMPLEMENTED_LOG_ONCE();
++  return false;
++}
++
++bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetVmStatInfo(VmStatInfo* vmstat) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++int ProcessMetrics::GetIdleWakeupsPerSecond() {
++  NOTIMPLEMENTED();
++  return 0;
++}
++
++Value::Dict SystemMemoryInfoKB::ToDict() const {
++  Value::Dict res;
++  res.Set("total", total);
++  res.Set("free", free);
++  res.Set("available", available);
++  res.Set("buffers", buffers);
++  res.Set("cached", cached);
++  res.Set("active_anon", active_anon);
++  res.Set("inactive_anon", inactive_anon);
++  res.Set("active_file", active_file);
++  res.Set("inactive_file", inactive_file);
++  res.Set("swap_total", swap_total);
++  res.Set("swap_free", swap_free);
++  res.Set("swap_used", swap_total - swap_free);
++  res.Set("dirty", dirty);
++  res.Set("reclaimable", reclaimable);
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++Value::Dict VmStatInfo::ToDict() const {
++  Value::Dict res;
++  res.Set("pswpin", static_cast<int>(pswpin));
++  res.Set("pswpout", static_cast<int>(pswpout));
++  res.Set("pgmajfault", static_cast<int>(pgmajfault));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++SystemDiskInfo::SystemDiskInfo() {
++  reads = 0;
++  reads_merged = 0;
++  sectors_read = 0;
++  read_time = 0;
++  writes = 0;
++  writes_merged = 0;
++  sectors_written = 0;
++  write_time = 0;
++  io = 0;
++  io_time = 0;
++  weighted_io_time = 0;
++}
++
++SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default;
++
++SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
++
++Value::Dict SystemDiskInfo::ToDict() const {
++  Value::Dict res;
++
++  // Write out uint64_t variables as doubles.
++  // Note: this may discard some precision, but for JS there's no other option.
++  res.Set("reads", static_cast<double>(reads));
++  res.Set("reads_merged", static_cast<double>(reads_merged));
++  res.Set("sectors_read", static_cast<double>(sectors_read));
++  res.Set("read_time", static_cast<double>(read_time));
++  res.Set("writes", static_cast<double>(writes));
++  res.Set("writes_merged", static_cast<double>(writes_merged));
++  res.Set("sectors_written", static_cast<double>(sectors_written));
++  res.Set("write_time", static_cast<double>(write_time));
++  res.Set("io", static_cast<double>(io));
++  res.Set("io_time", static_cast<double>(io_time));
++  res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++}  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc
new file mode 100644
index 0000000000..ea02ed8d59
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__openbsd.cc
@@ -0,0 +1,228 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_metrics_openbsd.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_metrics_openbsd.cc
+@@ -6,11 +6,17 @@
+ 
+ #include <stddef.h>
+ #include <stdint.h>
++#include <fcntl.h>
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
++#include <sys/vmmeter.h>
++
++#include <kvm.h>
+ 
+ #include "base/memory/ptr_util.h"
+ #include "base/process/process_metrics_iocounters.h"
++#include "base/values.h"
++#include "base/notreached.h"
+ 
+ namespace base {
+ 
+@@ -24,52 +30,28 @@ bool ProcessMetrics::GetIOCounters(IoCou
+   return false;
+ }
+ 
+-static int GetProcessCPU(pid_t pid) {
+-  struct kinfo_proc info;
+-  size_t length;
+-  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid,
+-                sizeof(struct kinfo_proc), 0 };
++ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {}
+ 
+-  if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0)
+-    return -1;
++TimeDelta ProcessMetrics::GetCumulativeCPUUsage() {
++  struct kinfo_proc info;
++  size_t length = sizeof(struct kinfo_proc);
++  struct timeval tv;
+ 
+-  mib[5] = (length / sizeof(struct kinfo_proc));
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_,
++                sizeof(struct kinfo_proc), 1 };
+ 
+   if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0)
+     return 0;
+ 
+-  return info.p_pctcpu;
+-}
+-
+-double ProcessMetrics::GetPlatformIndependentCPUUsage() {
+-  TimeTicks time = TimeTicks::Now();
+-
+-  if (last_cpu_time_.is_zero()) {
+-    // First call, just set the last values.
+-    last_cpu_time_ = time;
+-    return 0;
+-  }
+-
+-  int cpu = GetProcessCPU(process_);
++  tv.tv_sec = info.p_rtime_sec;
++  tv.tv_usec = info.p_rtime_usec;
+ 
+-  last_cpu_time_ = time;
+-  double percentage = static_cast<double>((cpu * 100.0) / FSCALE);
+-
+-  return percentage;
++  return Microseconds(TimeValToMicroseconds(tv));
+ }
+ 
+-TimeDelta ProcessMetrics::GetCumulativeCPUUsage() {
+-  NOTREACHED();
+-  return TimeDelta();
+-}
+-
+-ProcessMetrics::ProcessMetrics(ProcessHandle process)
+-    : process_(process),
+-      last_cpu_(0) {}
+-
+ size_t GetSystemCommitCharge() {
+   int mib[] = { CTL_VM, VM_METER };
+-  int pagesize;
++  size_t pagesize;
+   struct vmtotal vmtotal;
+   unsigned long mem_total, mem_free, mem_inactive;
+   size_t len = sizeof(vmtotal);
+@@ -81,9 +63,136 @@ size_t GetSystemCommitCharge() {
+   mem_free = vmtotal.t_free;
+   mem_inactive = vmtotal.t_vm - vmtotal.t_avm;
+ 
+-  pagesize = getpagesize();
++  pagesize = checked_cast<size_t>(getpagesize());
+ 
+   return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
+ }
+ 
++int ProcessMetrics::GetOpenFdCount() const {
++#if 0
++  struct kinfo_file *files;
++  kvm_t *kd = NULL;
++  int total_count = 0;
++  char errbuf[_POSIX2_LINE_MAX];
++
++  if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL)
++    goto out;
++  
++  if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_,  
++        sizeof(struct kinfo_file), &total_count)) == NULL) {
++	  total_count = 0;
++	  goto out;
++  }
++
++  kvm_close(kd);
++
++out:
++  return total_count;
++#endif
++  return getdtablecount();
++}
++
++int ProcessMetrics::GetOpenFdSoftLimit() const {
++  return getdtablesize();
++//  return GetMaxFds();
++}
++
++uint64_t ProcessMetrics::GetVmSwapBytes() const {
++  NOTIMPLEMENTED();
++  return 0;
++}
++
++bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
++  NOTIMPLEMENTED_LOG_ONCE();
++  return false;
++}
++
++bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++bool GetVmStatInfo(VmStatInfo* vmstat) {
++  NOTIMPLEMENTED();
++  return false;
++}
++
++int ProcessMetrics::GetIdleWakeupsPerSecond() {
++  NOTIMPLEMENTED();
++  return 0;
++}
++
++Value::Dict SystemMemoryInfoKB::ToDict() const {
++  Value::Dict res;
++  res.Set("total", total);
++  res.Set("free", free);
++  res.Set("available", available);
++  res.Set("buffers", buffers);
++  res.Set("cached", cached);
++  res.Set("active_anon", active_anon);   
++  res.Set("inactive_anon", inactive_anon);
++  res.Set("active_file", active_file);
++  res.Set("inactive_file", inactive_file);
++  res.Set("swap_total", swap_total);
++  res.Set("swap_free", swap_free);
++  res.Set("swap_used", swap_total - swap_free);
++  res.Set("dirty", dirty);   
++  res.Set("reclaimable", reclaimable);
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
++Value::Dict VmStatInfo::ToDict() const {
++  Value::Dict res;
++  res.Set("pswpin", static_cast<int>(pswpin));
++  res.Set("pswpout", static_cast<int>(pswpout));
++  res.Set("pgmajfault", static_cast<int>(pgmajfault));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}   
++
++SystemDiskInfo::SystemDiskInfo() {
++  reads = 0;
++  reads_merged = 0;
++  sectors_read = 0;
++  read_time = 0;
++  writes = 0;
++  writes_merged = 0;
++  sectors_written = 0;
++  write_time = 0;
++  io = 0;
++  io_time = 0;
++  weighted_io_time = 0;
++}
++
++SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default;
++
++SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
++
++Value::Dict SystemDiskInfo::ToDict() const {
++  Value::Dict res;
++ 
++  // Write out uint64_t variables as doubles.
++  // Note: this may discard some precision, but for JS there's no other option.
++  res.Set("reads", static_cast<double>(reads));
++  res.Set("reads_merged", static_cast<double>(reads_merged));
++  res.Set("sectors_read", static_cast<double>(sectors_read));
++  res.Set("read_time", static_cast<double>(read_time));
++  res.Set("writes", static_cast<double>(writes));
++  res.Set("writes_merged", static_cast<double>(writes_merged));
++  res.Set("sectors_written", static_cast<double>(sectors_written));
++  res.Set("write_time", static_cast<double>(write_time));
++  res.Set("io", static_cast<double>(io));
++  res.Set("io_time", static_cast<double>(io_time));
++  res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
++
++  NOTIMPLEMENTED();
++
++  return res;
++}
++
+ }  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc
new file mode 100644
index 0000000000..23cb04086b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_metrics_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_metrics_posix.cc
+@@ -21,6 +21,8 @@
+ 
+ #if BUILDFLAG(IS_APPLE)
+ #include <malloc/malloc.h>
++#elif BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -134,7 +136,7 @@ size_t ProcessMetrics::GetMallocUsage() 
+   return stats.size_in_use;
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+   return GetMallocUsageMallinfo();
+-#elif BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
+   return 0;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__unittest.cc
new file mode 100644
index 0000000000..0245b0ff67
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__metrics__unittest.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_metrics_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_metrics_unittest.cc
+@@ -62,7 +62,8 @@
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||      \
+     BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || \
++    BUILDFLAG(IS_BSD)
+ #define ENABLE_CPU_TESTS 1
+ #else
+ #define ENABLE_CPU_TESTS 0
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__posix.cc
new file mode 100644
index 0000000000..95eb82d2a6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__posix.cc
@@ -0,0 +1,100 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_posix.cc
+@@ -23,10 +23,15 @@
+ #include "base/trace_event/base_tracing.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include <sys/event.h>
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include <sys/types.h>
++#include <sys/sysctl.h> 
++#endif
++
+ #if BUILDFLAG(CLANG_PROFILING)
+ #include "base/test/clang_profiling.h"
+ #endif
+@@ -93,7 +98,7 @@ bool WaitpidWithTimeout(base::ProcessHan
+   return ret_pid > 0;
+ }
+ 
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ // Using kqueue on Mac so that we can wait on non-child processes.
+ // We can't use kqueues on child processes because we need to reap
+ // our own children using wait.
+@@ -198,7 +203,7 @@ bool WaitForExitWithTimeoutImpl(base::Pr
+   const bool exited = (parent_pid < 0);
+ 
+   if (!exited && parent_pid != our_pid) {
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     // On Mac we can wait on non child processes.
+     return WaitForSingleNonChildProcess(handle, timeout);
+ #else
+@@ -387,7 +392,56 @@ void Process::Exited(int exit_code) cons
+ 
+ int Process::GetOSPriority() const {
+   DCHECK(IsValid());
++// avoid pledge(2) violation
++#if BUILDFLAG(IS_BSD)
++  return 0;
++#else
+   return getpriority(PRIO_PROCESS, static_cast<id_t>(process_));
++#endif
++}
++
++Time Process::CreationTime() const {
++// avoid ps pledge in the network process
++#if !BUILDFLAG(IS_BSD)
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(),
++               sizeof(struct kinfo_proc), 0 };
++  struct kinfo_proc *info = nullptr;
++  size_t info_size;
++#endif
++  Time ct = Time();
++
++#if !BUILDFLAG(IS_BSD)
++  if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0)
++    goto out;
++
++  mib[5] = (info_size / sizeof(struct kinfo_proc));
++  if ((info = reinterpret_cast<kinfo_proc*>(malloc(info_size))) == NULL)
++    goto out;
++
++  if (sysctl(mib, std::size(mib), info, &info_size, NULL, 0) < 0)
++    goto out;
++
++  ct = Time::FromTimeT(info->p_ustart_sec);
++
++out:
++  if (info)
++    free(info);
++#endif
++  return ct;
++}
++
++#if BUILDFLAG(IS_BSD)
++Process::Priority Process::GetPriority() const {
++  return Priority::kUserBlocking;
+ }
+ 
++bool Process::SetPriority(Priority priority) {
++  return false;
++}
++
++bool Process::CanSetPriority() {
++  return false;
++}
++#endif
++
+ }  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__unittest.cc
new file mode 100644
index 0000000000..323b43f32b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_process_process__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/process/process_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/process/process_unittest.cc
+@@ -203,7 +203,7 @@ TEST_F(ProcessTest, CreationTimeOtherPro
+   // was spawned and a time recorded after it was spawned. However, since the
+   // base::Time and process creation clocks don't match, tolerate some error.
+   constexpr base::TimeDelta kTolerance =
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // On Linux, process creation time is relative to boot time which has a
+       // 1-second resolution. Tolerate 1 second for the imprecise boot time and
+       // 100 ms for the imprecise clock.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_module__cache.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_module__cache.cc
new file mode 100644
index 0000000000..31f6ff4489
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_module__cache.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/profiler/module_cache.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/profiler/module_cache.cc
+@@ -38,7 +38,7 @@ std::string TransformModuleIDToSymbolSer
+   // Android and Linux Chrome builds use the "breakpad" format to index their
+   // build id, so we transform the build id for these platforms. All other
+   // platforms keep their symbols indexed by the original build ID.
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Linux ELF module IDs are 160bit integers, which we need to mangle
+   // down to 128bit integers to match the id that Breakpad outputs.
+   // Example on version '66.0.3359.170' x64:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc
new file mode 100644
index 0000000000..e6bee75af9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.cc
+@@ -6,7 +6,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <pthread.h>
+ 
+ #include "base/profiler/stack_base_address_posix.h"
+@@ -18,7 +18,7 @@ SamplingProfilerThreadToken GetSamplingP
+   PlatformThreadId id = PlatformThread::CurrentId();
+ #if BUILDFLAG(IS_ANDROID)
+   return {id, pthread_self()};
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   absl::optional<uintptr_t> maybe_stack_base =
+       GetThreadStackBaseAddress(id, pthread_self());
+   return {id, maybe_stack_base};
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h
new file mode 100644
index 0000000000..ccee464015
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_sampling__profiler__thread__token.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/profiler/sampling_profiler_thread_token.h
+@@ -13,7 +13,7 @@
+ 
+ #if BUILDFLAG(IS_ANDROID)
+ #include <pthread.h>
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <stdint.h>
+ #endif
+ 
+@@ -27,7 +27,7 @@ struct SamplingProfilerThreadToken {
+   PlatformThreadId id;
+ #if BUILDFLAG(IS_ANDROID)
+   pthread_t pthread_id;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Due to the sandbox, we can only retrieve the stack base address for the
+   // current thread. We must grab it during
+   // GetSamplingProfilerCurrentThreadToken() and not try to get it later.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__base__address__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__base__address__posix.cc
new file mode 100644
index 0000000000..9714e4451c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__base__address__posix.cc
@@ -0,0 +1,69 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/profiler/stack_base_address_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/profiler/stack_base_address_posix.cc
+@@ -17,6 +17,14 @@
+ #include "base/files/scoped_file.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#if BUILDFLAG(IS_NETBSD)
++#include <pthread.h>
++#else
++#include <pthread_np.h>
++#endif
++#endif
++
+ #if BUILDFLAG(IS_CHROMEOS)
+ extern "C" void* __libc_stack_end;
+ #endif
+@@ -45,7 +53,21 @@ absl::optional<uintptr_t> GetAndroidMain
+ 
+ #if !BUILDFLAG(IS_LINUX)
+ uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthread_id) {
++#if BUILDFLAG(IS_OPENBSD)
++  stack_t ss;
++  void *address;
++  size_t size;
++  if (pthread_stackseg_np(pthread_id, &ss) != 0)
++    return 0;
++  size = ss.ss_size;
++  address = (void*)((size_t) ss.ss_sp - ss.ss_size);
++#else
+   pthread_attr_t attr;
++#if BUILDFLAG(IS_FREEBSD)
++  int result;
++  pthread_attr_init(&attr);
++  pthread_attr_get_np(pthread_id, &attr);
++#else
+   // pthread_getattr_np will crash on ChromeOS & Linux if we are in the sandbox
+   // and pthread_id refers to a different thread, due to the use of
+   // sched_getaffinity().
+@@ -58,12 +80,14 @@ uintptr_t GetThreadStackBaseAddressImpl(
+                       << logging::SystemErrorCodeToString(result);
+   // See crbug.com/617730 for limitations of this approach on Linux-like
+   // systems.
++#endif
+   void* address;
+   size_t size;
+   result = pthread_attr_getstack(&attr, &address, &size);
+   CHECK_EQ(result, 0) << "pthread_attr_getstack returned "
+                       << logging::SystemErrorCodeToString(result);
+   pthread_attr_destroy(&attr);
++#endif
+   const uintptr_t base_address = reinterpret_cast<uintptr_t>(address) + size;
+   return base_address;
+ }
+@@ -80,7 +104,7 @@ absl::optional<uintptr_t> GetThreadStack
+   // trying to work around the problem.
+   return absl::nullopt;
+ #else
+-  const bool is_main_thread = id == GetCurrentProcId();
++  const bool is_main_thread = id == checked_cast<PlatformThreadId>(GetCurrentProcId());
+   if (is_main_thread) {
+ #if BUILDFLAG(IS_ANDROID)
+     // The implementation of pthread_getattr_np() in Bionic reads proc/self/maps
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc
new file mode 100644
index 0000000000..4405d33c1b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__test__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/profiler/stack_sampling_profiler_test_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/profiler/stack_sampling_profiler_test_util.cc
+@@ -42,7 +42,7 @@
+ // Fortunately, it provides _alloca, which functions identically.
+ #include <malloc.h>
+ #define alloca _alloca
+-#else
++#elif !BUILDFLAG(IS_BSD)
+ #include <alloca.h>
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc
new file mode 100644
index 0000000000..041f1d54a3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/profiler/stack_sampling_profiler_unittest.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/profiler/stack_sampling_profiler_unittest.cc
+@@ -41,7 +41,7 @@
+ #include <intrin.h>
+ #include <malloc.h>
+ #include <windows.h>
+-#else
++#elif !BUILDFLAG(IS_BSD)
+ #include <alloca.h>
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc
new file mode 100644
index 0000000000..973bcdf845
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_profiler_thread__delegate__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/profiler/thread_delegate_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/profiler/thread_delegate_posix.cc
+@@ -13,7 +13,7 @@
+ #include "build/build_config.h"
+ #include "third_party/abseil-cpp/absl/types/optional.h"
+ 
+-#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ #include "base/profiler/stack_base_address_posix.h"
+ #endif
+ 
+@@ -22,7 +22,7 @@ namespace base {
+ std::unique_ptr<ThreadDelegatePosix> ThreadDelegatePosix::Create(
+     SamplingProfilerThreadToken thread_token) {
+   absl::optional<uintptr_t> base_address;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base_address = thread_token.stack_base_address;
+ #else
+   base_address =
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_rand__util.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_rand__util.h
new file mode 100644
index 0000000000..884960aad5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_rand__util.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/rand_util.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/rand_util.h
+@@ -147,7 +147,7 @@ void RandomShuffle(Itr first, Itr last) 
+   std::shuffle(first, last, RandomBitGenerator());
+ }
+ 
+-#if BUILDFLAG(IS_POSIX)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD)
+ BASE_EXPORT int GetUrandomFD();
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_rand__util__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_rand__util__posix.cc
new file mode 100644
index 0000000000..678b59fce3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_rand__util__posix.cc
@@ -0,0 +1,68 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/rand_util_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/rand_util_posix.cc
+@@ -23,7 +23,7 @@
+ #include "base/time/time.h"
+ #include "build/build_config.h"
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD)
+ #include "third_party/lss/linux_syscall_support.h"
+ #elif BUILDFLAG(IS_MAC)
+ // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK.
+@@ -40,6 +40,7 @@ namespace base {
+ 
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_AIX)
+ // AIX has no 64-bit support for O_CLOEXEC.
+ static constexpr int kOpenFlags = O_RDONLY;
+@@ -64,10 +65,11 @@ class URandomFd {
+  private:
+   const int fd_;
+ };
++#endif
+ 
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+      BUILDFLAG(IS_ANDROID)) &&                        \
+-    !BUILDFLAG(IS_NACL)
++    !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD)
+ // TODO(pasko): Unify reading kernel version numbers in:
+ // mojo/core/channel_linux.cc
+ // chrome/browser/android/seccomp_support_detector.cc
+@@ -177,6 +179,7 @@ bool UseBoringSSLForRandBytes() {
+ namespace {
+ 
+ void RandBytes(span<uint8_t> output, bool avoid_allocation) {
++#if !BUILDFLAG(IS_BSD)
+ #if !BUILDFLAG(IS_NACL)
+   // The BoringSSL experiment takes priority over everything else.
+   if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) {
+@@ -215,6 +218,9 @@ void RandBytes(span<uint8_t> output, boo
+   const int urandom_fd = GetUrandomFD();
+   const bool success = ReadFromFD(urandom_fd, as_writable_chars(output));
+   CHECK(success);
++#else
++  arc4random_buf(output.data(), output.size());
++#endif
+ }
+ 
+ }  // namespace
+@@ -239,9 +245,11 @@ void RandBytes(void* output, size_t outp
+   RandBytes(make_span(reinterpret_cast<uint8_t*>(output), output_length));
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ int GetUrandomFD() {
+   static NoDestructor<URandomFd> urandom_fd;
+   return urandom_fd->fd();
+ }
++#endif
+ 
+ }  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_strings_safe__sprintf__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_strings_safe__sprintf__unittest.cc
new file mode 100644
index 0000000000..d858243a60
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_strings_safe__sprintf__unittest.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/strings/safe_sprintf_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/strings/safe_sprintf_unittest.cc
+@@ -740,6 +740,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) {
+ #endif
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ TEST(SafeSPrintfTest, EmitNULL) {
+   char buf[40];
+ #if defined(__GNUC__)
+@@ -756,6 +757,7 @@ TEST(SafeSPrintfTest, EmitNULL) {
+ #pragma GCC diagnostic pop
+ #endif
+ }
++#endif
+ 
+ TEST(SafeSPrintfTest, PointerSize) {
+   // The internal data representation is a 64bit value, independent of the
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_synchronization_lock__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_synchronization_lock__impl.h
new file mode 100644
index 0000000000..647e843ad0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_synchronization_lock__impl.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/synchronization/lock_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/synchronization/lock_impl.h
+@@ -109,6 +109,10 @@ void LockImpl::Unlock() {
+ }
+ 
+ #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FREEBSD)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wthread-safety-analysis"
++#endif
+ 
+ #if DCHECK_IS_ON()
+ BASE_EXPORT void dcheck_trylock_result(int rv);
+@@ -129,6 +133,9 @@ void LockImpl::Unlock() {
+   dcheck_unlock_result(rv);
+ #endif
+ }
++#if BUILDFLAG(IS_FREEBSD)
++#pragma GCC diagnostic pop
++#endif
+ #endif
+ 
+ // This is an implementation used for AutoLock templated on the lock type.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_syslog__logging.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_syslog__logging.cc
new file mode 100644
index 0000000000..0a4214c895
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_syslog__logging.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/syslog_logging.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/syslog_logging.cc
+@@ -17,7 +17,7 @@
+ #include "base/strings/string_util.h"
+ #include "base/win/scoped_handle.h"
+ #include "base/win/win_util.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // <syslog.h> defines LOG_INFO, LOG_WARNING macros that could conflict with
+ // base::LOG_INFO, base::LOG_WARNING.
+ #include <syslog.h>
+@@ -149,7 +149,7 @@ EventLogMessage::~EventLogMessage() {
+ 
+   if (user_sid != nullptr)
+     ::LocalFree(user_sid);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   const char kEventSource[] = "chrome";
+   openlog(kEventSource, LOG_NOWAIT | LOG_PID, LOG_USER);
+   // We can't use the defined names for the logging severity from syslog.h
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info.cc
new file mode 100644
index 0000000000..a932116f26
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/system/sys_info.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/system/sys_info.cc
+@@ -229,7 +229,7 @@ std::string SysInfo::SocManufacturer() {
+ #endif
+ 
+ void SysInfo::GetHardwareInfo(base::OnceCallback<void(HardwareInfo)> callback) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   constexpr base::TaskTraits kTraits = {base::MayBlock()};
+ #else
+   constexpr base::TaskTraits kTraits = {};
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info.h
new file mode 100644
index 0000000000..7b8096c7fe
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/system/sys_info.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/system/sys_info.h
+@@ -331,6 +331,8 @@ class BASE_EXPORT SysInfo {
+   static void ResetCpuSecurityMitigationsEnabledForTesting();
+ #endif
+ 
++  static uint64_t MaxSharedMemorySize();
++
+  private:
+   friend class test::ScopedAmountOfPhysicalMemoryOverride;
+   FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory);
+@@ -343,7 +345,7 @@ class BASE_EXPORT SysInfo {
+   static HardwareInfo GetHardwareInfoSync();
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_AIX)
++    BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
+   static uint64_t AmountOfAvailablePhysicalMemory(
+       const SystemMemoryInfoKB& meminfo);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__freebsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__freebsd.cc
new file mode 100644
index 0000000000..f098969735
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__freebsd.cc
@@ -0,0 +1,119 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/system/sys_info_freebsd.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/system/sys_info_freebsd.cc
+@@ -9,25 +9,87 @@
+ #include <sys/sysctl.h>
+ 
+ #include "base/notreached.h"
++#include "base/process/process_metrics.h"
++#include "base/strings/string_util.h"
+ 
+ namespace base {
+ 
+-int64_t SysInfo::AmountOfPhysicalMemoryImpl() {
+-  int pages, page_size;
++int SysInfo::NumberOfProcessors() {
++  int mib[] = {CTL_HW, HW_NCPU};
++  int ncpu;
++  size_t size = sizeof(ncpu);
++  if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) {
++    NOTREACHED();
++    return 1;
++  }
++  return ncpu;
++}
++  
++uint64_t SysInfo::AmountOfPhysicalMemoryImpl() {
++  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 static_cast<uint64_t>(pages) * page_size;
++}
++
++uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() {
++  int page_size, r = 0;
++  unsigned int 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<int64_t>(pages) * page_size;
++
++  return static_cast<uint64_t>((pgfree + pginact + pgcache) * page_size);
++}
++
++// static
++uint64_t SysInfo::AmountOfAvailablePhysicalMemory(const SystemMemoryInfoKB& info) {
++  uint64_t res_kb = info.available != 0
++                       ? info.available - info.active_file
++                       : info.free + info.reclaimable + info.inactive_file;
++  return res_kb * 1024;
++}
++
++// static
++std::string SysInfo::CPUModelName() {
++  int mib[] = { CTL_HW, HW_MODEL };
++  char name[256];
++  size_t size = std::size(name);
++
++  if (sysctl(mib, std::size(mib), &name, &size, NULL, 0) == 0) {
++    return name;
++  }
++
++  return std::string();
+ }
+ 
+ // static
+ uint64_t SysInfo::MaxSharedMemorySize() {
+   size_t limit;
+   size_t size = sizeof(limit);
++
+   if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) {
+     NOTREACHED();
+     return 0;
+@@ -35,4 +97,16 @@ uint64_t SysInfo::MaxSharedMemorySize() 
+   return static_cast<uint64_t>(limit);
+ }
+ 
++SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() {
++  HardwareInfo info;
++
++  info.manufacturer = "FreeBSD";
++  info.model = HardwareModelName();
++
++  DCHECK(IsStringUTF8(info.manufacturer));
++  DCHECK(IsStringUTF8(info.model));
++
++  return info;
++}
++
+ }  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__netbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__netbsd.cc
new file mode 100644
index 0000000000..f42ca58cd5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__netbsd.cc
@@ -0,0 +1,97 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/system/sys_info_netbsd.cc.orig	2024-12-21 10:25:09.641329812 +0000
++++ src/3rdparty/chromium/base/system/sys_info_netbsd.cc
+@@ -0,0 +1,88 @@
++// Copyright 2011 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/system/sys_info.h"
++
++#include <stddef.h>
++#include <stdint.h>
++#include <sys/param.h>
++#include <sys/shm.h>
++#include <sys/sysctl.h>
++
++#include "base/notreached.h"
++#include "base/posix/sysctl.h"
++#include "base/strings/string_util.h"
++
++namespace {
++
++uint64_t AmountOfMemory(int pages_name) {
++  long pages = sysconf(pages_name);
++  long page_size = sysconf(_SC_PAGESIZE);
++  if (pages < 0 || page_size < 0)
++    return 0;
++  return static_cast<uint64_t>(pages) * static_cast<uint64_t>(page_size);
++}
++
++}  // namespace
++
++namespace base {
++
++// static
++int SysInfo::NumberOfProcessors() {
++  int mib[] = {CTL_HW, HW_NCPU};
++  int ncpu;
++  size_t size = sizeof(ncpu);
++  if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) {
++    NOTREACHED();
++  }
++  return ncpu;
++}
++
++// static
++uint64_t SysInfo::AmountOfPhysicalMemoryImpl() {
++  return AmountOfMemory(_SC_PHYS_PAGES);
++}
++
++// static
++uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() {
++  return AmountOfMemory(_SC_PHYS_PAGES);
++}
++
++// static
++uint64_t SysInfo::MaxSharedMemorySize() {
++  int mib[] = {CTL_KERN, KERN_SYSVIPC, KERN_SYSVIPC_SHMMAX};
++  size_t limit;
++  size_t size = sizeof(limit);
++  if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) {
++    NOTREACHED();
++  }
++  return static_cast<uint64_t>(limit);
++}
++
++// static
++std::string SysInfo::CPUModelName() {
++  int mib[] = { CTL_HW, HW_MODEL };
++  char name[256];
++  size_t size = std::size(name);
++
++  if (sysctl(mib, std::size(mib), &name, &size, NULL, 0) == 0) {
++    return name;
++  }
++
++  return std::string();
++}
++
++// static
++SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() {
++  HardwareInfo info;
++  // Set the manufacturer to "NetBSD" and the model to
++  // an empty string.
++  info.manufacturer = "NetBSD";
++  info.model = HardwareModelName();
++  DCHECK(IsStringUTF8(info.manufacturer));
++  DCHECK(IsStringUTF8(info.model));
++  return info;
++}
++
++}  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__openbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__openbsd.cc
new file mode 100644
index 0000000000..bbd2ffae9f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__openbsd.cc
@@ -0,0 +1,89 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/system/sys_info_openbsd.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/system/sys_info_openbsd.cc
+@@ -12,6 +12,7 @@
+ 
+ #include "base/notreached.h"
+ #include "base/posix/sysctl.h"
++#include "base/strings/string_util.h"
+ 
+ namespace {
+ 
+@@ -27,9 +28,14 @@ uint64_t AmountOfMemory(int pages_name) 
+ 
+ namespace base {
+ 
++// pledge(2)
++uint64_t aofpmem = 0;
++uint64_t shmmax = 0;
++char cpumodel[256];
++
+ // static
+ int SysInfo::NumberOfProcessors() {
+-  int mib[] = {CTL_HW, HW_NCPU};
++  int mib[] = {CTL_HW, HW_NCPUONLINE};
+   int ncpu;
+   size_t size = sizeof(ncpu);
+   if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) {
+@@ -41,7 +47,23 @@ int SysInfo::NumberOfProcessors() {
+ 
+ // static
+ uint64_t SysInfo::AmountOfPhysicalMemoryImpl() {
+-  return AmountOfMemory(_SC_PHYS_PAGES);
++  // pledge(2)
++  if (!aofpmem)
++    aofpmem = AmountOfMemory(_SC_PHYS_PAGES);
++  return aofpmem;
++}
++
++// static
++std::string SysInfo::CPUModelName() {
++  int mib[] = {CTL_HW, HW_MODEL};
++  size_t len = std::size(cpumodel);
++  
++  if (cpumodel[0] == '\0') {
++    if (sysctl(mib, std::size(mib), cpumodel, &len, NULL, 0) < 0)
++      return std::string();
++  }
++ 
++  return std::string(cpumodel, len - 1);
+ }
+ 
+ // static
+@@ -56,16 +78,28 @@ uint64_t SysInfo::MaxSharedMemorySize() 
+   int mib[] = {CTL_KERN, KERN_SHMINFO, KERN_SHMINFO_SHMMAX};
+   size_t limit;
+   size_t size = sizeof(limit);
++  // pledge(2)
++  if (shmmax)
++    goto out;
+   if (sysctl(mib, std::size(mib), &limit, &size, NULL, 0) < 0) {
+     NOTREACHED();
+     return 0;
+   }
+-  return static_cast<uint64_t>(limit);
++  shmmax = static_cast<uint64_t>(limit);
++out:
++  return shmmax;
+ }
+ 
+ // static
+-std::string SysInfo::CPUModelName() {
+-  return StringSysctl({CTL_HW, HW_MODEL}).value();
++SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() {
++  HardwareInfo info;
++  // Set the manufacturer to "OpenBSD" and the model to
++  // an empty string.
++  info.manufacturer = "OpenBSD";
++  info.model = HardwareModelName();
++  DCHECK(IsStringUTF8(info.manufacturer));
++  DCHECK(IsStringUTF8(info.model));
++  return info;
+ }
+ 
+ }  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
new file mode 100644
index 0000000000..465edc7c53
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__posix.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/system/sys_info_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/system/sys_info_posix.cc
+@@ -117,7 +117,7 @@ bool GetDiskSpaceInfo(const base::FilePa
+ 
+ namespace base {
+ 
+-#if !BUILDFLAG(IS_OPENBSD)
++#if !BUILDFLAG(IS_BSD)
+ // static
+ int SysInfo::NumberOfProcessors() {
+ #if BUILDFLAG(IS_MAC)
+@@ -173,7 +173,7 @@ int SysInfo::NumberOfProcessors() {
+ 
+   return cached_num_cpus;
+ }
+-#endif  // !BUILDFLAG(IS_OPENBSD)
++#endif  // !BUILDFLAG(IS_BSD)
+ 
+ // static
+ uint64_t SysInfo::AmountOfVirtualMemory() {
+@@ -256,6 +256,8 @@ std::string SysInfo::OperatingSystemArch
+     arch = "x86";
+   } else if (arch == "amd64") {
+     arch = "x86_64";
++  } else if (arch == "arm64") {
++    arch = "aarch64";
+   } else if (std::string(info.sysname) == "AIX") {
+     arch = "ppc64";
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__unittest.cc
new file mode 100644
index 0000000000..1d71c4a569
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_system_sys__info__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/system/sys_info_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/system/sys_info_unittest.cc
+@@ -265,12 +265,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) {
+   EXPECT_TRUE(IsStringUTF8(hardware_info->model));
+   bool empty_result_expected =
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+       false;
+ #else
+       true;
+ #endif
+   EXPECT_EQ(hardware_info->manufacturer.empty(), empty_result_expected);
++#if BUILDFLAG(IS_BSD)
++  empty_result_expected = true;
++#endif
+   EXPECT_EQ(hardware_info->model.empty(), empty_result_expected);
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_task_thread__pool_environment__config__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_task_thread__pool_environment__config__unittest.cc
new file mode 100644
index 0000000000..847162c950
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_task_thread__pool_environment__config__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/task/thread_pool/environment_config_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/task/thread_pool/environment_config_unittest.cc
+@@ -15,7 +15,7 @@ TEST(ThreadPoolEnvironmentConfig, CanUse
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE)
+   EXPECT_TRUE(CanUseBackgroundThreadTypeForWorkerThread());
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   EXPECT_FALSE(CanUseBackgroundThreadTypeForWorkerThread());
+ #else
+ #error Platform doesn't match any block
+@@ -24,7 +24,7 @@ TEST(ThreadPoolEnvironmentConfig, CanUse
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID)
+   EXPECT_TRUE(CanUseUtilityThreadTypeForWorkerThread());
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   EXPECT_FALSE(CanUseUtilityThreadTypeForWorkerThread());
+ #else
+ #error Platform doesn't match any block
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc
new file mode 100644
index 0000000000..d98be2ec9b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_test_test__file__util__linux.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/test/test_file_util_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/test/test_file_util_linux.cc
+@@ -54,8 +54,10 @@ bool EvictFileFromSystemCache(const File
+     return false;
+   if (fdatasync(fd.get()) != 0)
+     return false;
++#if !BUILDFLAG(IS_BSD)
+   if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0)
+     return false;
++#endif
+   return true;
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_test_test__file__util__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_test_test__file__util__posix.cc
new file mode 100644
index 0000000000..08b748d4dd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_test_test__file__util__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/test/test_file_util_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/test/test_file_util_posix.cc
+@@ -91,7 +91,7 @@ void SyncPageCacheToDisk() {
+ }
+ 
+ #if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \
+-    !BUILDFLAG(IS_ANDROID)
++    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD)
+ bool EvictFileFromSystemCache(const FilePath& file) {
+   // There doesn't seem to be a POSIX way to cool the disk cache.
+   NOTIMPLEMENTED();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_hang__watcher.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_hang__watcher.cc
new file mode 100644
index 0000000000..0e14334bf1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_hang__watcher.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/threading/hang_watcher.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/threading/hang_watcher.cc
+@@ -352,7 +352,7 @@ void HangWatcher::InitializeOnMainThread
+ 
+   bool enable_hang_watcher = base::FeatureList::IsEnabled(kEnableHangWatcher);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   if (is_zygote_child) {
+     enable_hang_watcher =
+         enable_hang_watcher &&
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread.h
new file mode 100644
index 0000000000..e0e6b63f27
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/threading/platform_thread.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/threading/platform_thread.h
+@@ -49,6 +49,8 @@ typedef DWORD PlatformThreadId;
+ typedef zx_koid_t PlatformThreadId;
+ #elif BUILDFLAG(IS_APPLE)
+ typedef mach_port_t PlatformThreadId;
++#elif BUILDFLAG(IS_BSD)
++typedef uint64_t PlatformThreadId;
+ #elif BUILDFLAG(IS_POSIX)
+ typedef pid_t PlatformThreadId;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__bsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__bsd.cc
new file mode 100644
index 0000000000..8307e89f05
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__bsd.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/threading/platform_thread_bsd.cc.orig	2024-12-21 10:25:09.653322994 +0000
++++ src/3rdparty/chromium/base/threading/platform_thread_bsd.cc
+@@ -0,0 +1,31 @@
++// Copyright 2023 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++// Description: These are stubs for *BSD.
++
++#include "base/threading/platform_thread.h"
++
++namespace base {
++namespace internal {
++
++bool CanSetThreadTypeToRealtimeAudio() {
++  return false;
++}
++
++bool SetCurrentThreadTypeForPlatform(ThreadType thread_type,
++                                MessagePumpType pump_type_hint) {
++  return false;
++}
++
++std::optional<ThreadPriorityForTest>
++GetCurrentThreadPriorityForPlatformForTest() {
++  return std::nullopt;
++}
++}  // namespace internal
++
++// static
++void PlatformThreadBase::SetName(const std::string& name) {
++  SetNameCommon(name);
++}
++
++}  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.cc
new file mode 100644
index 0000000000..d0cd9a376f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__internal__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/threading/platform_thread_internal_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/threading/platform_thread_internal_posix.cc
+@@ -41,7 +41,7 @@ ThreadPriorityForTest NiceValueToThreadP
+ }
+ 
+ int GetCurrentThreadNiceValue() {
+-#if BUILDFLAG(IS_NACL)
++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   NOTIMPLEMENTED();
+   return 0;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc
new file mode 100644
index 0000000000..068a08ae7a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc
@@ -0,0 +1,60 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/threading/platform_thread_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/threading/platform_thread_posix.cc
+@@ -78,12 +78,12 @@ void* ThreadFunc(void* params) {
+     if (!thread_params->joinable)
+       base::DisallowSingleton();
+ 
+-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN)
++#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) && !BUILDFLAG(IS_BSD)
+     partition_alloc::internal::PCScan::NotifyThreadCreated(
+         partition_alloc::internal::GetStackPointer());
+ #endif
+ 
+-#if !BUILDFLAG(IS_NACL)
++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_APPLE)
+     PlatformThread::SetCurrentThreadRealtimePeriodValue(
+         delegate->GetRealtimePeriod());
+@@ -267,6 +267,8 @@ PlatformThreadId PlatformThreadBase::Cur
+   return reinterpret_cast<int32_t>(pthread_self());
+ #elif BUILDFLAG(IS_POSIX) && BUILDFLAG(IS_AIX)
+   return pthread_self();
++#elif BUILDFLAG(IS_BSD)
++  return reinterpret_cast<uint64_t>(pthread_self());
+ #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_AIX)
+   return reinterpret_cast<int64_t>(pthread_self());
+ #endif
+@@ -357,7 +359,7 @@ void PlatformThreadBase::Detach(Platform
+ 
+ // static
+ bool PlatformThreadBase::CanChangeThreadType(ThreadType from, ThreadType to) {
+-#if BUILDFLAG(IS_NACL)
++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   return false;
+ #else
+   if (from >= to) {
+@@ -378,6 +380,9 @@ void SetCurrentThreadTypeImpl(ThreadType
+                               MessagePumpType pump_type_hint) {
+ #if BUILDFLAG(IS_NACL)
+   NOTIMPLEMENTED();
++// avoid pledge(2) violation
++#elif BUILDFLAG(IS_BSD)
++   NOTIMPLEMENTED();
+ #else
+   if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint))
+     return;
+@@ -400,7 +405,7 @@ void SetCurrentThreadTypeImpl(ThreadType
+ 
+ // static
+ ThreadPriorityForTest PlatformThreadBase::GetCurrentThreadPriorityForTest() {
+-#if BUILDFLAG(IS_NACL)
++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD)
+   NOTIMPLEMENTED();
+   return ThreadPriorityForTest::kNormal;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__unittest.cc
new file mode 100644
index 0000000000..192d38d7a8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_threading_platform__thread__unittest.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/threading/platform_thread_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/threading/platform_thread_unittest.cc
+@@ -38,7 +38,7 @@
+ #include "base/time/time.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <pthread.h>
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+@@ -362,7 +362,7 @@ TEST(PlatformThreadTest,
+ // and hardcodes what we know. Please inform scheduler-dev%chromium.org@localhost if this
+ // proprerty changes for a given platform.
+ TEST(PlatformThreadTest, CanChangeThreadType) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Ubuntu, RLIMIT_NICE and RLIMIT_RTPRIO are 0 by default, so we won't be
+   // able to increase priority to any level unless we are root (euid == 0).
+   bool kCanIncreasePriority = false;
+@@ -616,12 +616,16 @@ INSTANTIATE_TEST_SUITE_P(
+ 
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ namespace {
+ 
+ bool IsTidCacheCorrect() {
++#if BUILDFLAG(IS_BSD)
++  return PlatformThread::CurrentId() == reinterpret_cast<int64_t>(pthread_self());
++#else
+   return PlatformThread::CurrentId() == syscall(__NR_gettid);
++#endif
+ }
+ 
+ void* CheckTidCacheCorrectWrapper(void*) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc
new file mode 100644
index 0000000000..2cb3259d64
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
+@@ -25,6 +25,8 @@
+ 
+ #if BUILDFLAG(IS_APPLE)
+ #include <malloc/malloc.h>
++#elif BUILDFLAG(IS_BSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -182,7 +184,7 @@ void ReportAppleAllocStats(size_t* total
+ 
+ #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
+     (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) &&    \
+-     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA))
++     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD))
+ void ReportMallinfoStats(ProcessMemoryDump* pmd,
+                          size_t* total_virtual_size,
+                          size_t* resident_size,
+@@ -353,6 +355,9 @@ bool MallocDumpProvider::OnMemoryDump(co
+                      &allocated_objects_count);
+ #elif BUILDFLAG(IS_FUCHSIA)
+ // TODO(fuchsia): Port, see https://crbug.com/706592.
++#elif BUILDFLAG(IS_BSD)
++  total_virtual_size = 0;
++  allocated_objects_size = 0;
+ #else
+   ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
+                       &allocated_objects_size, &allocated_objects_count);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_memory__dump__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_memory__dump__manager.cc
new file mode 100644
index 0000000000..40bb3453dc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_memory__dump__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/trace_event/memory_dump_manager.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/trace_event/memory_dump_manager.cc
+@@ -83,7 +83,7 @@ const char* const MemoryDumpManager::kSy
+ #if defined(MALLOC_MEMORY_TRACING_SUPPORTED)
+     MallocDumpProvider::kAllocatedObjects;
+ #else
+-    nullptr;
++    "";
+ #endif
+ 
+ // static
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc
new file mode 100644
index 0000000000..373da6807b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/trace_event/process_memory_dump.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/base/trace_event/process_memory_dump.cc
+@@ -134,7 +134,7 @@ absl::optional<size_t> ProcessMemoryDump
+ 
+     for (size_t i = 0; i < page_count; i++)
+       resident_page_count += vec[i].VirtualAttributes.Valid;
+-#elif BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/851760): Implement counting resident bytes.
+     // For now, log and avoid unused variable warnings.
+     NOTIMPLEMENTED_LOG_ONCE();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_tracing_trace__time.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_tracing_trace__time.cc
new file mode 100644
index 0000000000..eb635c69b3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_tracing_trace__time.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/tracing/trace_time.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/tracing/trace_time.cc
+@@ -8,13 +8,19 @@
+ #include "build/build_config.h"
+ #include "third_party/perfetto/include/perfetto/base/time.h"
+ 
++#if BUILDFLAG(IS_FREEBSD)
++#define CLOCK_BOOTTIME CLOCK_UPTIME
++#elif BUILDFLAG(IS_NETBSD)
++#define CLOCK_BOOTTIME CLOCK_MONOTONIC
++#endif
++
+ namespace base {
+ namespace tracing {
+ 
+ int64_t TraceBootTicksNow() {
+   // On Windows and Mac, TRACE_TIME_TICKS_NOW() behaves like boottime already.
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   struct timespec ts;
+   int res = clock_gettime(CLOCK_BOOTTIME, &ts);
+   if (res != -1)
+@@ -24,4 +30,4 @@ int64_t TraceBootTicksNow() {
+ }
+ 
+ }  // namespace tracing
+-}  // namespace base
+\ No newline at end of file
++}  // namespace base
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_tracing_trace__time.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_tracing_trace__time.h
new file mode 100644
index 0000000000..f6c448b569
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_tracing_trace__time.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/tracing/trace_time.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/tracing/trace_time.h
+@@ -12,7 +12,7 @@ namespace base {
+ namespace tracing {
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // Linux, Android, and Fuchsia all use CLOCK_MONOTONIC. See crbug.com/166153
+ // about efforts to unify base::TimeTicks across all platforms.
+ constexpr perfetto::protos::pbzero::BuiltinClock kTraceClockId =
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_version__info_version__info.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_version__info_version__info.h
new file mode 100644
index 0000000000..5f10554f62
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_base_version__info_version__info.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/base/version_info/version_info.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/base/version_info/version_info.h
+@@ -74,6 +74,8 @@ constexpr std::string_view GetOSType() {
+   return "FreeBSD";
+ #elif BUILDFLAG(IS_OPENBSD)
+   return "OpenBSD";
++#elif BUILDFLAG(IS_NETBSD)
++  return "NetBSD";
+ #elif BUILDFLAG(IS_SOLARIS)
+   return "Solaris";
+ #elif BUILDFLAG(IS_FUCHSIA)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_BUILD.gn
new file mode 100644
index 0000000000..b8878a92b5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_BUILD.gn
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/config/BUILD.gn
+@@ -213,6 +213,10 @@ config("default_libs") {
+     # Targets should choose to explicitly link frameworks they require. Since
+     # linking can have run-time side effects, nothing should be listed here.
+     libs = []
++  } else if (is_bsd) {
++    libs = [
++      "pthread",
++    ]
+   } else if (is_linux || is_chromeos) {
+     libs = [
+       "dl",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn
new file mode 100644
index 0000000000..796c8402df
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/build/config/BUILDCONFIG.gn
+@@ -136,7 +136,8 @@ declare_args() {
+   is_official_build = false
+ 
+   # Set to true when compiling with the Clang compiler.
+-  is_clang = current_os != "linux" ||
++  is_clang = current_os != "linux" || current_os == "openbsd" ||
++             current_os == "freebsd" || current_os == "netbsd" ||
+              (current_cpu != "s390x" && current_cpu != "s390" &&
+               current_cpu != "ppc64" && current_cpu != "ppc" &&
+               current_cpu != "mips" && current_cpu != "mips64" &&
+@@ -235,6 +236,16 @@ if (host_toolchain == "") {
+     host_toolchain = "//build/toolchain/aix:$host_cpu"
+   } else if (host_os == "zos") {
+     host_toolchain = "//build/toolchain/zos:$host_cpu"
++  } else if (host_os == "openbsd") {
++    host_toolchain = "//build/toolchain/openbsd:clang_$host_cpu"
++  } else if (host_os == "freebsd") {
++    host_toolchain = "//build/toolchain/freebsd:clang_$host_cpu"
++  } else if (host_os == "netbsd") {
++    if (is_clang) {
++      host_toolchain = "//build/toolchain/netbsd:clang_$host_cpu"
++    } else {
++      host_toolchain = "//build/toolchain/netbsd:$host_cpu"
++    }
+   } else {
+     assert(false, "Unsupported host_os: $host_os")
+   }
+@@ -278,6 +289,8 @@ if (target_os == "android") {
+   _default_toolchain = "//build/toolchain/aix:$target_cpu"
+ } else if (target_os == "zos") {
+   _default_toolchain = "//build/toolchain/zos:$target_cpu"
++} else if (target_os == "openbsd" || target_os == "freebsd" || target_os == "netbsd") {
++  _default_toolchain = host_toolchain
+ } else {
+   assert(false, "Unsupported target_os: $target_os")
+ }
+@@ -312,7 +325,12 @@ is_android = current_os == "android"
+ is_chromeos = current_os == "chromeos"
+ is_fuchsia = current_os == "fuchsia"
+ is_ios = current_os == "ios"
+-is_linux = current_os == "linux"
++is_linux = current_os == "linux" || current_os == "openbsd" ||
++           current_os == "freebsd" || current_os == "netbsd"
++is_openbsd = current_os == "openbsd"
++is_freebsd = current_os == "freebsd"
++is_netbsd = current_os == "netbsd"
++is_bsd = current_os == "openbsd" || current_os == "freebsd" || current_os == "netbsd"
+ is_mac = current_os == "mac"
+ is_nacl = current_os == "nacl"
+ is_win = current_os == "win" || current_os == "winuwp"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_clang_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_clang_BUILD.gn
new file mode 100644
index 0000000000..c1017bf6e0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_clang_BUILD.gn
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/clang/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/build/config/clang/BUILD.gn
+@@ -173,6 +173,11 @@ clang_lib("compiler_builtins") {
+     # the Rust stdlib's intrinsics here.
+     #
+     # Don't define libname which makes this target do nothing.
++  } else if (is_bsd) {
++    # Since there's no Rust in the toolchain, there's no concern that we'll use
++    # the Rust stdlib's intrinsics here.
++    #
++    # Don't define libname which makes this target do nothing.
+   } else if (is_mac) {
+     libname = "osx"
+   } else if (is_ios) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn
new file mode 100644
index 0000000000..0db1533865
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn
@@ -0,0 +1,127 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/build/config/compiler/BUILD.gn
+@@ -210,7 +210,7 @@ declare_args() {
+   # This greatly reduces the size of debug builds, at the cost of
+   # debugging information which is required by some specialized
+   # debugging tools.
+-  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
++  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple && !is_bsd
+ }
+ 
+ declare_args() {
+@@ -274,13 +274,16 @@ config("default_include_dirs") {
+ # Compiler instrumentation can introduce dependencies in DSOs to symbols in
+ # the executable they are loaded into, so they are unresolved at link-time.
+ config("no_unresolved_symbols") {
+-  if (!using_sanitizer &&
++  if (!using_sanitizer && !is_bsd &&
+       (is_linux || is_chromeos || is_android || is_fuchsia)) {
+     ldflags = [
+       "-Wl,-z,defs",
+       "-Wl,--as-needed",
+     ]
+   }
++  if (current_cpu == "x86" && is_openbsd) {
++    ldflags = [ "-Wl,-z,notext", "-Wl,--strip-all" ]
++  }
+ }
+ 
+ # compiler ---------------------------------------------------------------------
+@@ -568,6 +571,10 @@ config("compiler") {
+     }
+   }
+ 
++  if (is_openbsd) {
++    ldflags += [ "-Wl,-z,wxneeded" ]
++  }
++
+   # Linux-specific compiler flags setup.
+   # ------------------------------------
+   if (use_gold) {
+@@ -643,7 +650,7 @@ config("compiler") {
+     ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+   }
+ 
+-  if (is_clang && !is_nacl && current_os != "zos" && !is_qtwebengine) {
++  if (is_clang && !is_nacl && !is_bsd && current_os != "zos" && !is_qtwebengine) {
+     cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+     if (save_reproducers_on_lld_crash && use_lld) {
+       ldflags += [
+@@ -1232,7 +1239,7 @@ config("compiler_cpu_abi") {
+         ]
+       }
+     } else if (current_cpu == "arm") {
+-      if (is_clang && !is_android && !is_nacl &&
++      if (is_clang && !is_android && !is_nacl && !is_bsd &&
+           !(is_chromeos_lacros && is_chromeos_device)) {
+         cflags += [ "--target=arm-linux-gnueabihf" ]
+         ldflags += [ "--target=arm-linux-gnueabihf" ]
+@@ -1250,7 +1257,7 @@ config("compiler_cpu_abi") {
+         cflags += [ "-mtune=$arm_tune" ]
+       }
+     } else if (current_cpu == "arm64") {
+-      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
++      if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd &&
+           !(is_chromeos_lacros && is_chromeos_device)) {
+         cflags += [ "--target=aarch64-linux-gnu" ]
+         ldflags += [ "--target=aarch64-linux-gnu" ]
+@@ -1585,7 +1592,7 @@ config("compiler_deterministic") {
+     # different build directory like "out/feature_a" and "out/feature_b" if
+     # we build same files with same compile flag.
+     # Other paths are already given in relative, no need to normalize them.
+-    if (is_nacl) {
++    if (is_nacl || is_bsd) {
+       # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+       cflags += [
+         "-Xclang",
+@@ -1637,7 +1644,7 @@ config("compiler_deterministic") {
+ }
+ 
+ config("clang_revision") {
+-  if (is_clang && clang_base_path == default_clang_base_path) {
++  if (is_clang && !is_bsd && clang_base_path == default_clang_base_path) {
+     update_args = [
+       "--print-revision",
+       "--verify-version=$clang_version",
+@@ -2107,7 +2114,7 @@ config("default_warnings") {
+         "-Wno-thread-safety-reference-return",
+       ]
+ 
+-      if (!is_nacl) {
++      if (!is_nacl && !is_openbsd) {
+         cflags_cc += [
+           # TODO(https://crbug.com/1513724): Fix and re-enable.
+           "-Wno-c++11-narrowing-const-reference",
+@@ -2832,7 +2839,7 @@ config("afdo_optimize_size") {
+ # There are some targeted places that AFDO regresses, so we provide a separate
+ # config to allow AFDO to be disabled per-target.
+ config("afdo") {
+-  if (is_clang) {
++  if (is_clang && !is_bsd) {
+     cflags = []
+     if (clang_emit_debug_info_for_profiling) {
+       # Add the following flags to generate debug info for profiling.
+@@ -2859,7 +2866,7 @@ config("afdo") {
+       cflags += [ "-Wno-backend-plugin" ]
+       inputs = [ _clang_sample_profile ]
+     }
+-  } else if (auto_profile_path != "" && is_a_target_toolchain) {
++  } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) {
+     cflags = [ "-fauto-profile=${auto_profile_path}" ]
+     inputs = [ auto_profile_path ]
+   }
+@@ -3023,7 +3030,7 @@ config("symbols") {
+     configs += [ "//build/config:compress_debug_sections" ]
+   }
+ 
+-  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && !is_qtwebengine) {
++  if (is_clang && (!is_nacl || is_nacl_saigo) && !is_bsd && current_os != "zos" && !is_qtwebengine) {
+     if (is_apple) {
+       # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+       # Make sure we don't use constructor homing on mac.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn
new file mode 100644
index 0000000000..a919b1baa6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/linux/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/config/linux/BUILD.gn
+@@ -41,7 +41,7 @@ config("runtime_library") {
+   }
+ 
+   if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") &&
+-      (!use_custom_libcxx || current_cpu == "mipsel")) {
++      (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) {
+     libs = [ "atomic" ]
+   }
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_linux_pkg-config.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_linux_pkg-config.py
new file mode 100644
index 0000000000..bda6041685
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_linux_pkg-config.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/linux/pkg-config.py.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/build/config/linux/pkg-config.py
+@@ -113,7 +113,7 @@ def main():
+   # If this is run on non-Linux platforms, just return nothing and indicate
+   # success. This allows us to "kind of emulate" a Linux build from other
+   # platforms.
+-  if 'linux' not in sys.platform and 'darwin' not in sys.platform:
++  if not sys.platform.startswith(tuple(['linux', 'openbsd', 'freebsd', 'netbsd', 'darwin'])):
+     print("[[],[],[],[],[]]")
+     return 0
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_ozone.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_ozone.gni
new file mode 100644
index 0000000000..40c55c1f07
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_ozone.gni
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/ozone.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/config/ozone.gni
+@@ -84,7 +84,19 @@ declare_args() {
+     } else if (is_chromeos_lacros) {
+       ozone_platform = "wayland"
+       ozone_platform_wayland = true
+-    } else if (is_linux) {
++    } else if (is_linux && !is_bsd) {
++      ozone_platform = "x11"
++      ozone_platform_wayland = true
++      ozone_platform_x11 = true
++    } else if (is_openbsd) {
++      ozone_platform = "x11"
++      ozone_platform_wayland = false
++      ozone_platform_x11 = true
++    } else if (is_netbsd) {
++      ozone_platform = "x11"
++      ozone_platform_wayland = false
++      ozone_platform_x11 = true
++    } else if (is_freebsd) {
+       ozone_platform = "x11"
+       ozone_platform_wayland = true
+       ozone_platform_x11 = true
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_rust.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_rust.gni
new file mode 100644
index 0000000000..d45001ba77
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_rust.gni
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/rust.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/config/rust.gni
+@@ -321,6 +321,10 @@ if (is_linux || is_chromeos) {
+   }
+ }
+ 
++if (is_bsd) {
++  rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os)
++}
++
+ assert(!toolchain_has_rust || rust_abi_target != "")
+ 
+ # This variable is passed to the Rust libstd build.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_v8__target__cpu.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_v8__target__cpu.gni
new file mode 100644
index 0000000000..1831a40076
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_config_v8__target__cpu.gni
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/config/v8_target_cpu.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/config/v8_target_cpu.gni
+@@ -36,6 +36,10 @@ declare_args() {
+ if (v8_target_cpu == "") {
+   if (current_toolchain == "//build/toolchain/linux:clang_x64_v8_arm64") {
+     v8_target_cpu = "arm64"
++  } else if (current_toolchain == "//build/toolchain/openbsd:clang_arm64") {
++    v8_target_cpu = "arm64"
++  } else if (current_toolchain == "//build/toolchain/freebsd:clang_arm64") {
++    v8_target_cpu = "arm64"
+   } else if (current_toolchain == "//build/toolchain/linux:clang_x86_v8_arm") {
+     v8_target_cpu = "arm"
+   } else if (current_toolchain ==
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_detect__host__arch.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_detect__host__arch.py
new file mode 100644
index 0000000000..b6f27507a0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_detect__host__arch.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/detect_host_arch.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/detect_host_arch.py
+@@ -20,6 +20,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'):
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_gn__run__binary.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_gn__run__binary.py
new file mode 100644
index 0000000000..fa1febc071
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_gn__run__binary.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/gn_run_binary.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/gn_run_binary.py
+@@ -23,7 +23,7 @@ if not os.path.isabs(path):
+ # The rest of the arguments are passed directly to the executable.
+ args = [path] + sys.argv[2:]
+ 
+-ret = subprocess.call(args)
++ret = subprocess.call(args, env={"CHROME_EXE_PATH":"${WRKSRC}/out/Release/chrome","LD_LIBRARY_PATH":"${WRKSRC}/out/Release"})
+ if ret != 0:
+   if ret <= -100:
+     # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_chrome.map b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_chrome.map
new file mode 100644
index 0000000000..44414a2b84
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_chrome.map
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/linux/chrome.map.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/linux/chrome.map
+@@ -20,6 +20,10 @@ global:
+   # Program entry point.
+   _start;
+ 
++  # FreeBSD specific variables.
++  __progname;
++  environ;
++
+   # Memory allocation symbols.  We want chrome and any libraries to
+   # share the same heap, so it is correct to export these symbols.
+   aligned_alloc;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_strip__binary.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_strip__binary.py
new file mode 100644
index 0000000000..ac38b85d1c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_strip__binary.py
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/linux/strip_binary.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/linux/strip_binary.py
+@@ -10,6 +10,7 @@ import sys
+ 
+ 
+ def main():
++  return 0
+   argparser = argparse.ArgumentParser(description='eu-strip binary.')
+ 
+   argparser.add_argument('--eu-strip-binary-path', help='eu-strip path.')
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_icu.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_icu.gn
new file mode 100644
index 0000000000..1766fde7ff
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_icu.gn
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/linux/unbundle/icu.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/linux/unbundle/icu.gn
+@@ -17,6 +17,15 @@ config("icu_config") {
+     "USING_SYSTEM_ICU=1",
+     "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC",
+ 
++    # As of icu 73 C++ nullptr, char16_t, override, final and noexcept are used
++    # instead of defines. These definitions can be removed when the bundled icu
++    # gets updated to 73. For more details, see:
++    # https://unicode-org.atlassian.net/browse/ICU-21833 and
++    # https://github.com/unicode-org/icu/commit/28643799377ecf654564f6f31854b02788cebe33
++    "U_FINAL=final",
++    "U_NOEXCEPT=noexcept",
++    "U_OVERRIDE=override",
++
+     # U_EXPORT (defined in unicode/platform.h) is used to set public visibility
+     # on classes through the U_COMMON_API and U_I18N_API macros (among others).
+     # When linking against the system ICU library, we want its symbols to have
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_libevent.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_libevent.gn
new file mode 100644
index 0000000000..4cd0af0692
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_libevent.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/linux/unbundle/libevent.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/linux/unbundle/libevent.gn
+@@ -9,7 +9,12 @@ shim_headers("libevent_shim") {
+   headers = [ "event.h" ]
+ }
+ 
++config("system_libevent") {
++  defines = [ "USE_SYSTEM_LIBEVENT=1" ]
++}
++
+ source_set("libevent") {
+   deps = [ ":libevent_shim" ]
+   libs = [ "event" ]
++  public_configs = [ ":system_libevent" ]
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_libusb.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_libusb.gn
new file mode 100644
index 0000000000..e2feb52840
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_linux_unbundle_libusb.gn
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/linux/unbundle/libusb.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/linux/unbundle/libusb.gn
+@@ -1,3 +1,27 @@
++# Copyright 2016 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.
++
++import("//build/config/linux/pkg_config.gni")
++import("//build/shim_headers.gni")
++
++pkg_config("system_libusb") {
++  packages = [ "libusb-1.0" ]
++}
++
++shim_headers("libusb_shim") {
++  root_path = "src/libusb"
++  headers = [
++    "libusb.h",
++  ]
++}
++
++source_set("libusb") {
++  deps = [
++    ":libusb_shim",
++  ]
++  public_configs = [ ":system_libusb" ]
++}
+ import("//build/config/linux/pkg_config.gni")
+ import("//build/shim_headers.gni")
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_rust_rust__bindgen.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_rust_rust__bindgen.gni
new file mode 100644
index 0000000000..6a6c6a4a50
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_rust_rust__bindgen.gni
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/rust/rust_bindgen.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/rust/rust_bindgen.gni
+@@ -11,14 +11,14 @@ if (is_win) {
+   import("//build/toolchain/win/win_toolchain_data.gni")
+ }
+ 
+-_bindgen_path = "${rust_bindgen_root}/bin/bindgen"
++_bindgen_path = "@PREFIX@/bin/bindgen"
+ if (host_os == "win") {
+   _bindgen_path = "${_bindgen_path}.exe"
+ }
+ 
+ # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
+ # ../lib.
+-_libclang_path = rust_bindgen_root
++_libclang_path = "@PREFIX@"
+ if (host_os == "win") {
+   _libclang_path += "/bin"
+ } else {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_rust_std_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_rust_std_BUILD.gn
new file mode 100644
index 0000000000..05152404cc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_rust_std_BUILD.gn
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/rust/std/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/rust/std/BUILD.gn
+@@ -100,7 +100,6 @@ if (toolchain_has_rust) {
+   # don't need to pass to the C++ linker because they're used for specialized
+   # purposes.
+   skip_stdlib_files = [
+-    "profiler_builtins",
+     "rustc_std_workspace_alloc",
+     "rustc_std_workspace_core",
+     "rustc_std_workspace_std",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_freebsd_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_freebsd_BUILD.gn
new file mode 100644
index 0000000000..4f7b8e11ef
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_freebsd_BUILD.gn
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/toolchain/freebsd/BUILD.gn.orig	2024-12-21 10:25:09.679847957 +0000
++++ src/3rdparty/chromium/build/toolchain/freebsd/BUILD.gn
+@@ -0,0 +1,66 @@
++# Copyright 2013 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.
++
++import("//build/config/sysroot.gni")
++import("//build/toolchain/gcc_toolchain.gni")
++
++clang_toolchain("clang_x86") {
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "freebsd"
++  }
++}
++
++gcc_toolchain("x86") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "freebsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_x64") {
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "freebsd"
++  }
++}
++
++gcc_toolchain("x64") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "freebsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_arm") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "freebsd"
++  }
++}
++
++clang_toolchain("clang_arm64") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "freebsd"
++  }
++}
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_gcc__solink__wrapper.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_gcc__solink__wrapper.py
new file mode 100644
index 0000000000..5644842547
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_gcc__solink__wrapper.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/toolchain/gcc_solink_wrapper.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/build/toolchain/gcc_solink_wrapper.py
+@@ -39,7 +39,7 @@ def CollectDynSym(args):
+   """Replaces: nm --format=posix -g -D -p $sofile | cut -f1-2 -d' '"""
+   toc = ''
+   nm = subprocess.Popen(wrapper_utils.CommandToRun(
+-      [args.nm, '--format=posix', '-g', '-D', '-p', args.sofile]),
++      [args.nm, '-g', '-D', '-p', args.sofile]),
+                         stdout=subprocess.PIPE,
+                         bufsize=-1,
+                         universal_newlines=True)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni
new file mode 100644
index 0000000000..5cc2be9eac
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni
+@@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation
+       "enable_resource_allowlist_generation=true does not work for target_os=$target_os")
+ }
+ 
++declare_args() {
++  extra_cflags = ""
++  extra_cppflags = ""
++  extra_cxxflags = ""
++  extra_ldflags = ""
++}
++
+ # This template defines a toolchain for something that works like gcc
+ # (including clang).
+ #
+@@ -900,22 +907,12 @@ template("gcc_toolchain") {
+ # use_gold too.
+ template("clang_toolchain") {
+   gcc_toolchain(target_name) {
+-    _path = "$clang_base_path/bin"
+-    _is_path_absolute = get_path_info(_path, "abspath") == _path
+-
+-    # Preserve absolute paths for tools like distcc.
+-    if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) {
+-      prefix = _path
+-    } else {
+-      prefix = rebase_path(_path, root_build_dir)
+-    }
+-
+-    cc = "${prefix}/clang"
+-    cxx = "${prefix}/clang++"
++    cc = "cc"
++    cxx = "c++"
+     ld = cxx
+-    readelf = "${prefix}/llvm-readelf"
+-    ar = "${prefix}/llvm-ar"
+-    nm = "${prefix}/llvm-nm"
++    readelf = "readelf"
++    ar = "ar"
++    nm = "nm"
+ 
+     forward_variables_from(invoker, "*", [ "toolchain_args" ])
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_netbsd_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_netbsd_BUILD.gn
new file mode 100644
index 0000000000..d1439bf98f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_netbsd_BUILD.gn
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/toolchain/netbsd/BUILD.gn.orig	2024-12-21 10:25:09.682613681 +0000
++++ src/3rdparty/chromium/build/toolchain/netbsd/BUILD.gn
+@@ -0,0 +1,66 @@
++# Copyright 2013 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.
++
++import("//build/config/sysroot.gni")
++import("//build/toolchain/gcc_toolchain.gni")
++
++clang_toolchain("clang_x86") {
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "netbsd"
++  }
++}
++
++gcc_toolchain("x86") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "netbsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_x64") {
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "netbsd"
++  }
++}
++
++gcc_toolchain("x64") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "netbsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_arm") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "netbsd"
++  }
++}
++
++clang_toolchain("clang_arm64") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "netbsd"
++  }
++}
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_openbsd_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_openbsd_BUILD.gn
new file mode 100644
index 0000000000..5a3d30513a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_openbsd_BUILD.gn
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/build/toolchain/openbsd/BUILD.gn.orig	2024-12-21 10:25:09.683434179 +0000
++++ src/3rdparty/chromium/build/toolchain/openbsd/BUILD.gn
+@@ -0,0 +1,66 @@
++# Copyright 2013 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.
++
++import("//build/config/sysroot.gni")
++import("//build/toolchain/gcc_toolchain.gni")
++
++clang_toolchain("clang_x86") {
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "openbsd"
++  }
++}
++
++gcc_toolchain("x86") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x86"
++    current_os = "openbsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_x64") {
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "openbsd"
++  }
++}
++
++gcc_toolchain("x64") {
++  cc = "gcc"
++  cxx = "g++"
++
++  readelf = "readelf"
++  nm = "nm"
++  ar = "ar"
++  ld = cxx
++
++  toolchain_args = {
++    current_cpu = "x64"
++    current_os = "openbsd"
++    is_clang = false
++  }
++}
++
++clang_toolchain("clang_arm") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "openbsd"
++  }
++}
++
++clang_toolchain("clang_arm64") {
++  toolchain_args = {
++    current_cpu = "arm64"
++    current_os = "openbsd"
++  }
++}
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_toolchain.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_toolchain.gni
new file mode 100644
index 0000000000..733cc2e9cb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_build_toolchain_toolchain.gni
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/build/toolchain/toolchain.gni.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/build/toolchain/toolchain.gni
+@@ -72,7 +72,7 @@ if (host_os == "mac") {
+   host_shlib_extension = ".dylib"
+ } else if (host_os == "win") {
+   host_shlib_extension = ".dll"
+-} else if (host_os == "linux" || host_os == "aix") {
++} else if (host_os == "linux" || host_os == "aix" || host_os == "openbsd" || host_os == "netbsd") {
+   host_shlib_extension = ".so"
+ } else {
+   assert(false, "Host platform not supported")
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_cc_base_features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_cc_base_features.cc
new file mode 100644
index 0000000000..59982933e4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_cc_base_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/cc/base/features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/cc/base/features.cc
+@@ -89,7 +89,7 @@ BASE_FEATURE(kNormalPriorityImageDecodin
+ // Note that kUseDMSAAForTiles only controls vulkan launch on android. We will
+ // be using a separate flag to control the launch on GL.
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kUseDMSAAForTiles,
+              "UseDMSAAForTiles",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn
new file mode 100644
index 0000000000..8f72a4033d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/BUILD.gn
+@@ -6980,6 +6980,13 @@ static_library("browser") {
+     }
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "metrics/bluetooth_metrics_provider.cc",
++      "metrics/bluetooth_metrics_provider.h",
++    ]
++  }
++
+   if (is_linux && use_dbus) {
+     sources += [
+       "dbus_memory_pressure_evaluator_linux.cc",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc
new file mode 100644
index 0000000000..02d77b7eef
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_custom__handlers_chrome__protocol__handler__registry__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc
+@@ -68,7 +68,7 @@ void ChromeProtocolHandlerRegistryDelega
+ // If true default protocol handlers will be removed if the OS level
+ // registration for a protocol is no longer Chrome.
+ bool ChromeProtocolHandlerRegistryDelegate::ShouldRemoveHandlersNotInOS() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // We don't do this on Linux as the OS registration there is not reliable,
+   // and Chrome OS doesn't have any notion of OS registration.
+   // TODO(benwells): When Linux support is more reliable remove this
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn
new file mode 100644
index 0000000000..a7dc0f882e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/BUILD.gn
+@@ -1387,6 +1387,10 @@ static_library("extensions") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ]
++  }
++
+   if (enable_pdf) {
+     sources += [
+       "api/pdf_viewer_private/pdf_viewer_private_event_router.cc",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc
new file mode 100644
index 0000000000..062d0a09df
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc
+@@ -44,7 +44,7 @@
+ #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h"
+ #include "printing/buildflags/buildflags.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h"
+ #endif
+ 
+@@ -127,7 +127,7 @@ void EnsureApiBrowserContextKeyedService
+   extensions::SettingsPrivateEventRouterFactory::GetInstance();
+   extensions::SettingsOverridesAPI::GetFactoryInstance();
+   extensions::SidePanelService::GetFactoryInstance();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   extensions::SystemIndicatorManagerFactory::GetInstance();
+ #endif
+   extensions::TabGroupsEventRouterFactory::GetInstance();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc
new file mode 100644
index 0000000000..c38fe6d798
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc
+@@ -24,7 +24,7 @@
+ #include "base/win/registry.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/environment.h"
+ #include "base/nix/xdg_util.h"
+ #endif
+@@ -255,7 +255,7 @@ base::FilePath GetEndpointVerificationDi
+   bool got_path = false;
+ #if BUILDFLAG(IS_WIN)
+   got_path = base::PathService::Get(base::DIR_LOCAL_APP_DATA, &path);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<base::Environment> env(base::Environment::Create());
+   path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar,
+                                     base::nix::kDotConfigDir);
+@@ -266,7 +266,7 @@ base::FilePath GetEndpointVerificationDi
+   if (!got_path)
+     return path;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   path = path.AppendASCII("google");
+ #else
+   path = path.AppendASCII("Google");
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc
new file mode 100644
index 0000000000..6bcb869ac0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc
+@@ -8,7 +8,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ #include <memory>
+ #include <utility>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h
new file mode 100644
index 0000000000..0838378785
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h
+@@ -7,7 +7,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ #include <optional>
+ #include <vector>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc
new file mode 100644
index 0000000000..f5e932d751
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
+@@ -32,7 +32,7 @@
+ #include "components/reporting/util/statusor.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <optional>
+ 
+ #include "base/strings/string_util.h"
+@@ -149,7 +149,7 @@ api::enterprise_reporting_private::Conte
+   return info;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ device_signals::SignalsAggregationRequest CreateAggregationRequest(
+     device_signals::SignalName signal_name) {
+@@ -210,7 +210,7 @@ EnterpriseReportingPrivateGetDeviceIdFun
+ 
+ // getPersistentSecret
+ 
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+ 
+ EnterpriseReportingPrivateGetPersistentSecretFunction::
+     EnterpriseReportingPrivateGetPersistentSecretFunction() = default;
+@@ -636,7 +636,7 @@ void EnterpriseReportingPrivateEnqueueRe
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ // getFileSystemInfo
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h
new file mode 100644
index 0000000000..15335a085e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h
+@@ -20,7 +20,7 @@
+ #include "components/reporting/proto/synced/record.pb.h"
+ #include "components/reporting/proto/synced/record_constants.pb.h"
+ #include "components/reporting/util/statusor.h"
+-#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/time/time.h"
+ #include "components/device_signals/core/browser/signals_types.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+@@ -56,7 +56,7 @@ class EnterpriseReportingPrivateGetDevic
+   ~EnterpriseReportingPrivateGetDeviceIdFunction() override;
+ };
+ 
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+ 
+ class EnterpriseReportingPrivateGetPersistentSecretFunction
+     : public ExtensionFunction {
+@@ -266,7 +266,7 @@ class EnterpriseReportingPrivateEnqueueR
+ 
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+ class EnterpriseReportingPrivateGetFileSystemInfoFunction
+     : public ExtensionFunction {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
new file mode 100644
index 0000000000..41f98bc1c1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc
+@@ -20,6 +20,7 @@ static base::LazyInstance<scoped_refptr<
+ 
+ void RemovableStorageProvider::GetAllDevices(DeviceListReadyCallback callback) {
+   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
++#if !BUILDFLAG(IS_BSD)
+   if (g_test_device_list.Get().get() != nullptr) {
+     base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
+         FROM_HERE,
+@@ -33,6 +34,9 @@ void RemovableStorageProvider::GetAllDev
+        base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},
+       base::BindOnce(&RemovableStorageProvider::PopulateDeviceList),
+       std::move(callback));
++#else
++  NOTIMPLEMENTED();
++#endif
+ }
+ 
+ // static
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_management_chrome__management__api__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_management_chrome__management__api__delegate.cc
new file mode 100644
index 0000000000..13219eb32d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_management_chrome__management__api__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
+@@ -405,7 +405,7 @@ bool ChromeManagementAPIDelegate::Launch
+   apps::LaunchContainer launch_container =
+       GetLaunchContainer(extensions::ExtensionPrefs::Get(context), extension);
+   Profile* profile = Profile::FromBrowserContext(context);
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     BUILDFLAG(IS_FUCHSIA)
+   if (extensions::IsExtensionUnsupportedDeprecatedApp(profile,
+                                                       extension->id())) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc
new file mode 100644
index 0000000000..c7eaa1f340
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc
+@@ -652,7 +652,7 @@ void PasswordsPrivateDelegateImpl::OnFet
+ }
+ 
+ void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() {
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   PasswordsPrivateEventRouter* router =
+       PasswordsPrivateEventRouterFactory::GetForProfile(profile_);
+   if (router) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
new file mode 100644
index 0000000000..14b28f5747
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
+@@ -279,7 +279,11 @@ bool ChromeRuntimeAPIDelegate::GetPlatfo
+   } else if (strcmp(os, "linux") == 0) {
+     info->os = extensions::api::runtime::PlatformOs::kLinux;
+   } else if (strcmp(os, "openbsd") == 0) {
+-    info->os = extensions::api::runtime::PlatformOs::kOpenbsd;
++    info->os = extensions::api::runtime::PlatformOs::kLinux;
++  } else if (strcmp(os, "freebsd") == 0) {
++    info->os = extensions::api::runtime::PlatformOs::kLinux;
++  } else if (strcmp(os, "netbsd") == 0) {
++    info->os = extensions::api::runtime::PlatformOs::kLinux;
+   } else if (strcmp(os, "fuchsia") == 0) {
+     info->os = extensions::api::runtime::PlatformOs::kFuchsia;
+   } else {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc
new file mode 100644
index 0000000000..a23e915f6c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc
+@@ -196,7 +196,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
+   (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] =
+       settings_api::PrefType::kBoolean;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   (*s_allowlist)[::prefs::kUseCustomChromeFrame] =
+       settings_api::PrefType::kBoolean;
+ #endif
+@@ -205,7 +205,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
+   // Appearance settings.
+   (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
+   (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::kNumber;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   (*s_allowlist)[::prefs::kSystemTheme] = settings_api::PrefType::kNumber;
+ #endif
+   (*s_allowlist)[::prefs::kHomePage] = settings_api::PrefType::kUrl;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_tabs_tabs__api.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_tabs_tabs__api.cc
new file mode 100644
index 0000000000..b150de5e0a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_tabs_tabs__api.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/tabs/tabs_api.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/tabs/tabs_api.cc
+@@ -836,7 +836,7 @@ ExtensionFunction::ResponseAction Window
+ // minimized.
+ // TODO(crbug.com/1410400): Remove this workaround when linux is fixed.
+ // TODO(crbug.com/1410400): Find a fix for wayland as well.
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   if (new_window->initial_show_state() == ui::SHOW_STATE_MINIMIZED) {
+     new_window->window()->Minimize();
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc
new file mode 100644
index 0000000000..92aacbb1d3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
+@@ -28,7 +28,7 @@
+ #include "extensions/browser/process_manager.h"
+ #include "extensions/common/error_utils.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "extensions/common/permissions/permissions_data.h"
+ #endif
+ 
+@@ -37,7 +37,7 @@ namespace {
+ bool CanEnableAudioDebugRecordingsFromExtension(
+     const extensions::Extension* extension) {
+   bool enabled_by_permissions = false;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (extension) {
+     enabled_by_permissions =
+         extension->permissions_data()->active_permissions().HasAPIPermission(
+@@ -575,7 +575,7 @@ void WebrtcLoggingPrivateStartEventLoggi
+ 
+ ExtensionFunction::ResponseAction
+ WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object,
+   // this function shouldn't be called by a component extension on behalf of
+   // some web code. It returns a DirectoryEntry for use directly in the calling
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webstore__private_webstore__private__api.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webstore__private_webstore__private__api.cc
new file mode 100644
index 0000000000..0287d6a434
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_extensions_api_webstore__private_webstore__private__api.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
+@@ -904,7 +904,7 @@ void WebstorePrivateBeginInstallWithMani
+         RequestExtensionApproval(contents);
+         return;
+       }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+       // Shows a parental permission dialog directly bypassing the extension
+       // install dialog view. The parental permission dialog contains a superset
+       // of data from the extension install dialog: requested extension
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_gcm_gcm__profile__service__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_gcm_gcm__profile__service__factory.cc
new file mode 100644
index 0000000000..ec95634886
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_gcm_gcm__profile__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/gcm/gcm_profile_service_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/gcm/gcm_profile_service_factory.cc
+@@ -89,7 +89,7 @@ GCMProfileServiceFactory::ScopedTestingF
+ // static
+ GCMProfileService* GCMProfileServiceFactory::GetForProfile(
+     content::BrowserContext* profile) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On desktop, incognito profiles are checked with IsIncognitoProfile().
+   // It's possible for non-incognito profiles to also be off-the-record.
+   bool is_profile_supported =
+@@ -132,7 +132,7 @@ GCMProfileServiceFactory::~GCMProfileSer
+ KeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor(
+     content::BrowserContext* context) const {
+   Profile* profile = Profile::FromBrowserContext(context);
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   DCHECK(!profile->IsIncognitoProfile());
+ #else
+   DCHECK(!profile->IsOffTheRecord());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc
new file mode 100644
index 0000000000..98b53c2884
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_gcm_instance__id_instance__id__profile__service__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/gcm/instance_id/instance_id_profile_service_factory.cc
+@@ -16,7 +16,7 @@ namespace instance_id {
+ // static
+ InstanceIDProfileService* InstanceIDProfileServiceFactory::GetForProfile(
+     content::BrowserContext* profile) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On desktop, the guest profile is actually the primary OTR profile of
+   // the "regular" guest profile.  The regular guest profile is never used
+   // directly by users.  Also, user are not able to create child OTR profiles
+@@ -64,7 +64,7 @@ InstanceIDProfileServiceFactory::~Instan
+ KeyedService* InstanceIDProfileServiceFactory::BuildServiceInstanceFor(
+     content::BrowserContext* context) const {
+   Profile* profile = Profile::FromBrowserContext(context);
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On desktop, incognito profiles are checked with IsIncognitoProfile().
+   // It's possible for non-incognito profiles to also be off-the-record.
+   bool is_incognito = profile->IsIncognitoProfile();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_router_discovery_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_router_discovery_BUILD.gn
new file mode 100644
index 0000000000..e30fd29eb1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_router_discovery_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/media/router/discovery/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/media/router/discovery/BUILD.gn
+@@ -82,7 +82,7 @@ static_library("discovery") {
+   ]
+   configs += [ "//build/config/compiler:wexit_time_destructors" ]
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "discovery_network_list_wifi_linux.cc" ]
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc
new file mode 100644
index 0000000000..caf902ab63
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/media/webrtc/chrome_screen_enumerator.cc
+@@ -21,7 +21,7 @@
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+ #include "ash/shell.h"
+ #include "ui/aura/window.h"
+-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/functional/callback.h"
+ #include "content/public/browser/desktop_capture.h"
+ #endif
+@@ -32,7 +32,7 @@ base::LazyInstance<std::vector<raw_ptr<a
+     DestructorAtExit root_windows_for_testing_ = LAZY_INSTANCE_INITIALIZER;
+ }  // namespace
+ 
+-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace {
+ base::LazyInstance<std::unique_ptr<webrtc::DesktopCapturer>>::DestructorAtExit
+     g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER;
+@@ -79,7 +79,7 @@ blink::mojom::StreamDevicesSetPtr Enumer
+   return stream_devices_set;
+ }
+ 
+-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ blink::mojom::StreamDevicesSetPtr EnumerateScreens(
+     blink::mojom::MediaStreamType stream_type) {
+   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+@@ -130,7 +130,7 @@ void ChromeScreenEnumerator::SetRootWind
+   root_windows_for_testing_.Get() = std::move(root_windows);
+ }
+ 
+-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void ChromeScreenEnumerator::SetDesktopCapturerForTesting(
+     std::unique_ptr<webrtc::DesktopCapturer> capturer) {
+   g_desktop_capturer_for_testing.Get() = std::move(capturer);
+@@ -143,7 +143,7 @@ void ChromeScreenEnumerator::EnumerateSc
+     ScreensCallback screens_callback) const {
+   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult(
+       FROM_HERE, base::BindOnce(::EnumerateScreens, stream_type),
+       base::BindOnce(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.h
new file mode 100644
index 0000000000..1d65f2f7a2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_chrome__screen__enumerator.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/media/webrtc/chrome_screen_enumerator.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/media/webrtc/chrome_screen_enumerator.h
+@@ -20,7 +20,7 @@ namespace aura {
+ class Window;
+ }
+ 
+-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace webrtc {
+ class DesktopCapturer;
+ }
+@@ -42,7 +42,7 @@ class ChromeScreenEnumerator : public me
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+   static void SetRootWindowsForTesting(
+       std::vector<raw_ptr<aura::Window, VectorExperimental>> root_windows);
+-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   static void SetDesktopCapturerForTesting(
+       std::unique_ptr<webrtc::DesktopCapturer> capturer);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_desktop__media__picker__controller.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_desktop__media__picker__controller.cc
new file mode 100644
index 0000000000..e2c5f97691
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_desktop__media__picker__controller.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/media/webrtc/desktop_media_picker_controller.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/media/webrtc/desktop_media_picker_controller.cc
+@@ -92,7 +92,7 @@ bool DesktopMediaPickerController::IsSys
+   } else {
+     return base::FeatureList::IsEnabled(media::kMacLoopbackAudioForScreenShare);
+   }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (request_source == Params::RequestSource::kCast) {
+     return base::FeatureList::IsEnabled(media::kPulseaudioLoopbackForCast);
+   } else {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc
new file mode 100644
index 0000000000..4a45acb4eb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__log__uploader.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_log_uploader.cc
+@@ -102,7 +102,7 @@ std::string GetLogUploadProduct() {
+   const char product[] = "Chrome_Mac";
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ #if !defined(ADDRESS_SANITIZER)
+   const char product[] = "Chrome_Linux";
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc
new file mode 100644
index 0000000000..2bc2b7c16f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.cc
@@ -0,0 +1,39 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.cc
+@@ -25,10 +25,10 @@
+ #include "components/webrtc_logging/browser/text_log_list.h"
+ #include "content/public/browser/render_process_host.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/public/browser/child_process_security_policy.h"
+ #include "storage/browser/file_system/isolated_context.h"
+-#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ using webrtc_event_logging::WebRtcEventLogManager;
+ 
+@@ -303,7 +303,7 @@ void WebRtcLoggingController::StartEvent
+         web_app_id, callback);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void WebRtcLoggingController::GetLogsDirectory(
+     LogsDirectoryCallback callback,
+     LogsDirectoryErrorCallback error_callback) {
+@@ -351,7 +351,7 @@ void WebRtcLoggingController::GrantLogsD
+       FROM_HERE,
+       base::BindOnce(std::move(callback), file_system.id(), registered_name));
+ }
+-#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ void WebRtcLoggingController::OnRtpPacket(
+     std::unique_ptr<uint8_t[]> packet_header,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h
new file mode 100644
index 0000000000..ab2eea0ec7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_media_webrtc_webrtc__logging__controller.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/media/webrtc/webrtc_logging_controller.h
+@@ -133,7 +133,7 @@ class WebRtcLoggingController
+                          size_t web_app_id,
+                          const StartEventLoggingCallback& callback);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Ensures that the WebRTC Logs directory exists and then grants render
+   // process access to the 'WebRTC Logs' directory, and invokes |callback| with
+   // the ids necessary to create a DirectoryEntry object.
+@@ -197,7 +197,7 @@ class WebRtcLoggingController
+ 
+   content::BrowserContext* GetBrowserContext() const;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Grants the render process access to the 'WebRTC Logs' directory, and
+   // invokes |callback| with the ids necessary to create a DirectoryEntry
+   // object. If the |logs_path| couldn't be created or found, |error_callback|
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.cc
new file mode 100644
index 0000000000..08bf5262ff
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.cc
@@ -0,0 +1,180 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/net/system_network_context_manager.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/net/system_network_context_manager.cc
+@@ -92,7 +92,7 @@
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ #include "chrome/common/chrome_paths_internal.h"
+ #include "chrome/grit/branded_strings.h"
+ #include "ui/base/l10n/l10n_util.h"
+@@ -137,7 +137,7 @@ SystemNetworkContextManager* g_system_ne
+ // received a failed launch for a sandboxed network service.
+ bool g_previously_failed_to_launch_sandboxed_service = false;
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Whether kerberos library loading will work in the network service due to the
+ // sandbox.
+ bool g_network_service_will_allow_gssapi_library_load = false;
+@@ -145,7 +145,7 @@ bool g_network_service_will_allow_gssapi
+ const char* kGssapiDesiredPref =
+ #if BUILDFLAG(IS_CHROMEOS)
+     prefs::kKerberosEnabled;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     prefs::kReceivedHttpAuthNegotiateHeader;
+ #endif
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+@@ -191,7 +191,7 @@ network::mojom::HttpAuthDynamicParamsPtr
+   auth_dynamic_params->basic_over_http_enabled =
+       local_state->GetBoolean(prefs::kBasicAuthOverHttpEnabled);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   auth_dynamic_params->delegate_by_kdc_policy =
+       local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+@@ -206,7 +206,7 @@ network::mojom::HttpAuthDynamicParamsPtr
+       local_state->GetString(prefs::kAuthAndroidNegotiateAccountType);
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auth_dynamic_params->allow_gssapi_library_load =
+       local_state->GetBoolean(kGssapiDesiredPref);
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+@@ -216,7 +216,7 @@ network::mojom::HttpAuthDynamicParamsPtr
+ 
+ void OnNewHttpAuthDynamicParams(
+     network::mojom::HttpAuthDynamicParamsPtr& params) {
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // The kerberos library is incompatible with the network service sandbox, so
+   // if library loading is now enabled, the network service needs to be
+   // restarted. It will be restarted unsandboxed because is
+@@ -258,11 +258,11 @@ NetworkSandboxState IsNetworkSandboxEnab
+   if (g_previously_failed_to_launch_sandboxed_service) {
+     return NetworkSandboxState::kDisabledBecauseOfFailedLaunch;
+   }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* local_state = g_browser_process->local_state();
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // The network service sandbox and the kerberos library are incompatible.
+   // If kerberos is enabled by policy, disable the network service sandbox.
+   if (g_network_service_will_allow_gssapi_library_load ||
+@@ -278,7 +278,7 @@ NetworkSandboxState IsNetworkSandboxEnab
+   }
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (local_state &&
+       local_state->HasPrefPath(prefs::kNetworkServiceSandboxEnabled)) {
+     return local_state->GetBoolean(prefs::kNetworkServiceSandboxEnabled)
+@@ -508,7 +508,7 @@ void SystemNetworkContextManager::Delete
+   g_system_network_context_manager = nullptr;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ SystemNetworkContextManager::GssapiLibraryLoadObserver::
+     GssapiLibraryLoadObserver(SystemNetworkContextManager* owner)
+     : owner_(owner) {}
+@@ -566,7 +566,7 @@ SystemNetworkContextManager::SystemNetwo
+   pref_change_registrar_.Add(prefs::kAllHttpAuthSchemesAllowedForOrigins,
+                              auth_pref_callback);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy,
+                              auth_pref_callback);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+@@ -580,7 +580,7 @@ SystemNetworkContextManager::SystemNetwo
+                              auth_pref_callback);
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   pref_change_registrar_.Add(kGssapiDesiredPref, auth_pref_callback);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
+@@ -606,7 +606,7 @@ SystemNetworkContextManager::SystemNetwo
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   pref_change_registrar_.Add(
+       prefs::kEnforceLocalAnchorConstraintsEnabled,
+       base::BindRepeating(&SystemNetworkContextManager::
+@@ -661,7 +661,7 @@ void SystemNetworkContextManager::Regist
+   registry->RegisterBooleanPref(prefs::kKerberosEnabled, false);
+ #endif  // BUILDFLAG(IS_CHROMEOS_LACROS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy,
+                                 false);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+@@ -685,7 +685,7 @@ void SystemNetworkContextManager::Regist
+   registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, -1);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Note that the default value is not relevant because the pref is only
+   // evaluated when it is managed.
+   registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled,
+@@ -694,11 +694,11 @@ void SystemNetworkContextManager::Regist
+ 
+   registry->RegisterListPref(prefs::kExplicitlyAllowedNetworkPorts);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kNetworkServiceSandboxEnabled, true);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterBooleanPref(prefs::kReceivedHttpAuthNegotiateHeader, false);
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -751,7 +751,7 @@ void SystemNetworkContextManager::OnNetw
+   OnNewHttpAuthDynamicParams(http_auth_dynamic_params);
+   network_service->ConfigureHttpAuthPrefs(std::move(http_auth_dynamic_params));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   gssapi_library_loader_observer_.Install(network_service);
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -954,7 +954,7 @@ bool SystemNetworkContextManager::IsNetw
+       break;
+   }
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!enabled) {
+     g_network_service_will_allow_gssapi_library_load = true;
+   }
+@@ -1040,7 +1040,7 @@ void SystemNetworkContextManager::Update
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() {
+   const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref =
+       local_state_->FindPreference(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.h
new file mode 100644
index 0000000000..e414b62858
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_net_system__network__context__manager.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/net/system_network_context_manager.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/net/system_network_context_manager.h
+@@ -200,7 +200,7 @@ class SystemNetworkContextManager {
+   class URLLoaderFactoryForSystem;
+   class NetworkProcessLaunchWatcher;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   class GssapiLibraryLoadObserver
+       : public network::mojom::GssapiLibraryLoadObserver {
+    public:
+@@ -236,7 +236,7 @@ class SystemNetworkContextManager {
+   void UpdateExplicitlyAllowedNetworkPorts();
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled
+   // pref to the enforcement state.
+   void UpdateEnforceLocalAnchorConstraintsEnabled();
+@@ -284,7 +284,7 @@ class SystemNetworkContextManager {
+ 
+   static std::optional<bool> certificate_transparency_enabled_for_testing_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   GssapiLibraryLoadObserver gssapi_library_loader_observer_{this};
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_prefs_browser__prefs.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_prefs_browser__prefs.cc
new file mode 100644
index 0000000000..c6439e74e5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_prefs_browser__prefs.cc
@@ -0,0 +1,54 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/prefs/browser_prefs.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/prefs/browser_prefs.cc
+@@ -486,18 +486,18 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS_ASH)
++    BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #include "components/device_signals/core/browser/pref_names.h"  // nogncheck due to crbug.com/1125897
+ #endif
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
+ #include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h"
+ #endif
+ 
+@@ -529,7 +529,7 @@
+ #include "chrome/browser/sessions/session_service_log.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/color/system_theme.h"
+ #endif
+ 
+@@ -1986,12 +1986,12 @@ void RegisterProfilePrefs(user_prefs::Pr
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS_ASH)
++    BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+   device_signals::RegisterProfilePrefs(registry);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+         // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry);
+   enterprise_signin::RegisterProfilePrefs(registry);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_prefs_pref__service__incognito__allowlist.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_prefs_pref__service__incognito__allowlist.cc
new file mode 100644
index 0000000000..284de014d4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_prefs_pref__service__incognito__allowlist.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/prefs/pref_service_incognito_allowlist.cc
+@@ -199,7 +199,7 @@ const char* const kPersistentPrefNames[]
+     prefs::kShowFullscreenToolbar,
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // Toggleing custom frames affects all open windows in the profile, hence
+     // should be written to the regular profile when changed in incognito mode.
+     prefs::kUseCustomChromeFrame,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_printing_print__backend__service__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_printing_print__backend__service__manager.cc
new file mode 100644
index 0000000000..decc3ec727
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_printing_print__backend__service__manager.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/printing/print_backend_service_manager.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/printing/print_backend_service_manager.cc
+@@ -36,7 +36,7 @@
+ #include "printing/printing_context.h"
+ #include "printing/printing_features.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "content/public/common/content_switches.h"
+ #endif
+ 
+@@ -884,7 +884,7 @@ PrintBackendServiceManager::GetServiceFr
+         host.BindNewPipeAndPassReceiver(),
+         content::ServiceProcessHost::Options()
+             .WithDisplayName(IDS_UTILITY_PROCESS_PRINT_BACKEND_SERVICE_NAME)
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+             .WithExtraCommandLineSwitches({switches::kMessageLoopTypeUi})
+ #endif
+             .Pass());
+@@ -1061,7 +1061,7 @@ PrintBackendServiceManager::DetermineIdl
+       return kNoClientsRegisteredResetOnIdleTimeout;
+ 
+     case ClientType::kQueryWithUi:
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       // No need to update if there were other query with UI clients.
+       if (HasQueryWithUiClientForRemoteId(remote_id)) {
+         return std::nullopt;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_printing_printer__query.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_printing_printer__query.cc
new file mode 100644
index 0000000000..24b3d2ae8e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_printing_printer__query.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/printing/printer_query.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/printing/printer_query.cc
+@@ -341,7 +341,7 @@ void PrinterQuery::UpdatePrintSettings(b
+     crash_key = std::make_unique<crash_keys::ScopedPrinterInfo>(
+         printer_name, print_backend->GetPrinterDriverInfo(printer_name));
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)
++#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS)
+     PrinterBasicInfo basic_info;
+     if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) ==
+         mojom::ResultCode::kSuccess) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_resources_signin_signin__shared.css b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_resources_signin_signin__shared.css
new file mode 100644
index 0000000000..6f9d1b9c9e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_resources_signin_signin__shared.css
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/resources/signin/signin_shared.css.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/resources/signin/signin_shared.css
+@@ -54,7 +54,7 @@ a {
+   border-radius: var(--scrollbar-width);
+ }
+ 
+-<if expr="is_macosx or is_linux or is_chromeos">
++<if expr="is_macosx or is_posix or is_chromeos">
+ .action-container {
+   flex-flow: row-reverse;
+   justify-content: flex-start;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_signin_signin__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_signin_signin__util.cc
new file mode 100644
index 0000000000..a02bc6691e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_signin_signin__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/signin/signin_util.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/signin/signin_util.cc
+@@ -79,7 +79,7 @@ CookiesMover::CookiesMover(base::WeakPtr
+ CookiesMover::~CookiesMover() = default;
+ 
+ void CookiesMover::StartMovingCookies() {
+-#if (BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) && !BUILDFLAG(IS_QTWEBENGINE)
++#if (BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_QTWEBENGINE)
+   bool allow_cookies_to_be_moved = base::FeatureList::IsEnabled(
+       profile_management::features::kThirdPartyProfileManagement);
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about_about__ui.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about_about__ui.cc
new file mode 100644
index 0000000000..b155b15b8c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about_about__ui.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/about/about_ui.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/about/about_ui.cc
+@@ -592,7 +592,7 @@ std::string ChromeURLs(content::BrowserC
+   return html;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ std::string AboutLinuxProxyConfig() {
+   std::string data;
+   AppendHeader(&data,
+@@ -646,7 +646,7 @@ void AboutUIHTMLSource::StartDataRequest
+       response =
+           ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(idr);
+     }
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) {
+     response = AboutLinuxProxyConfig();
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
new file mode 100644
index 0000000000..79a9184115
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+@@ -212,7 +212,7 @@
+ #include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h"
+ #endif
+ 
+@@ -238,7 +238,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/discards/discards_ui.h"
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc
new file mode 100644
index 0000000000..8a1ed0c912
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc
+@@ -6,7 +6,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "base/base64url.h"
+ #include "chrome/browser/browser_process.h"
+ #include "chrome/browser/policy/chrome_browser_policy_connector.h"
+@@ -29,7 +29,7 @@ namespace utils {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ 
+ connectors_internals::mojom::KeyTrustLevel ParseTrustLevel(
+     BPKUR::KeyTrustLevel trust_level) {
+@@ -97,7 +97,7 @@ connectors_internals::mojom::Int32ValueP
+ }  // namespace
+ 
+ connectors_internals::mojom::KeyInfoPtr GetKeyInfo() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   auto* key_manager = g_browser_process->browser_policy_connector()
+                           ->chrome_browser_cloud_management_controller()
+                           ->GetDeviceTrustKeyManager();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui.cc
new file mode 100644
index 0000000000..6a1f5cf36a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui.cc
+@@ -98,11 +98,11 @@ content::WebUIDataSource* CreateAndAddMa
+       {kManagementOnFileTransferVisibleData,
+        IDS_MANAGEMENT_FILE_TRANSFER_VISIBLE_DATA},
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       {kManagementScreenCaptureEvent, IDS_MANAGEMENT_SCREEN_CAPTURE_EVENT},
+       {kManagementScreenCaptureData, IDS_MANAGEMENT_SCREEN_CAPTURE_DATA},
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       {kManagementDeviceSignalsDisclosure,
+        IDS_MANAGEMENT_DEVICE_SIGNALS_DISCLOSURE},
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.cc
new file mode 100644
index 0000000000..0694800639
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.cc
@@ -0,0 +1,59 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui_handler.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui_handler.cc
+@@ -95,7 +95,7 @@
+ #include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/enterprise/signals/user_permission_service_factory.h"
+ #include "components/device_signals/core/browser/user_permission_service.h"  // nogncheck
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+@@ -191,12 +191,12 @@ enum class ReportingType {
+   kLegacyTech,
+ };
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kManagementScreenCaptureEvent[] = "managementScreenCaptureEvent";
+ const char kManagementScreenCaptureData[] = "managementScreenCaptureData";
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ const char kManagementDeviceSignalsDisclosure[] =
+     "managementDeviceSignalsDisclosure";
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+@@ -830,7 +830,7 @@ void ManagementUIHandler::AddReportingIn
+              GetReportingTypeValue(report_definition.reporting_type));
+     report_sources->Append(std::move(data));
+   }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Insert the device signals consent disclosure at the end of browser
+   // reporting section.
+   auto* user_permission_service = GetUserPermissionService();
+@@ -1118,7 +1118,7 @@ base::Value::Dict ManagementUIHandler::G
+                                   kManagementOnPageVisitedVisibleData, &info);
+   }
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (capture_policy::IsGetAllScreensMediaAllowedForAnySite(profile)) {
+     AddThreatProtectionPermission(kManagementScreenCaptureEvent,
+                                   kManagementScreenCaptureData, &info);
+@@ -1202,7 +1202,7 @@ policy::PolicyService* ManagementUIHandl
+       ->policy_service();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ device_signals::UserPermissionService*
+ ManagementUIHandler::GetUserPermissionService() {
+   return enterprise_signals::UserPermissionServiceFactory::GetForProfile(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.h
new file mode 100644
index 0000000000..c1b4982925
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_management_management__ui__handler.h
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui_handler.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/management/management_ui_handler.h
+@@ -24,14 +24,14 @@
+ #include "extensions/common/extension_id.h"
+ #include "url/gurl.h"
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Constants defining the IDs for the localized strings sent to the page as
+ // load time data.
+ extern const char kManagementScreenCaptureEvent[];
+ extern const char kManagementScreenCaptureData[];
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ extern const char kManagementDeviceSignalsDisclosure[];
+ #endif  // #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+@@ -119,7 +119,7 @@ class StatusCollector;
+ class SystemLogUploader;
+ }  // namespace policy
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ namespace device_signals {
+ class UserPermissionService;
+ }  // namespace device_signals
+@@ -179,7 +179,7 @@ class ManagementUIHandler : public conte
+   base::Value::List GetManagedWebsitesInfo(Profile* profile) const;
+   base::Value::List GetApplicationsInfo(Profile* profile) const;
+   virtual policy::PolicyService* GetPolicyService();
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   virtual device_signals::UserPermissionService* GetUserPermissionService();
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards__handler.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards__handler.cc
new file mode 100644
index 0000000000..d0297be6b6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards__handler.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/password_manager/promo_cards_handler.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/password_manager/promo_cards_handler.cc
+@@ -28,7 +28,7 @@
+ #include "chrome/browser/ui/webui/password_manager/promo_cards/web_password_manager_promo.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.h"
+ #endif
+ 
+@@ -81,7 +81,7 @@ std::vector<std::unique_ptr<PasswordProm
+           .get()));
+ #endif
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   promo_cards.push_back(
+       std::make_unique<RelaunchChromePromo>(profile->GetPrefs()));
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc
new file mode 100644
index 0000000000..f43b6a4083
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_password__manager_promo__cards_relaunch__chrome__promo.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/password_manager/promo_cards/relaunch_chrome_promo.cc
+@@ -37,7 +37,7 @@ std::u16string RelaunchChromePromo::GetT
+   return l10n_util::GetStringUTF16(
+ #if BUILDFLAG(IS_MAC)
+       IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_TITLE
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_TITLE_LINUX
+ #endif
+   );
+@@ -47,7 +47,7 @@ std::u16string RelaunchChromePromo::GetD
+   return l10n_util::GetStringUTF16(
+ #if BUILDFLAG(IS_MAC)
+       IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_DESCRIPTION
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       IDS_PASSWORD_MANAGER_UI_RELAUNCH_CHROME_PROMO_CARD_DESCRIPTION_LINUX
+ #endif
+   );
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_appearance__handler.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_appearance__handler.cc
new file mode 100644
index 0000000000..12b4b645a6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_appearance__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/settings/appearance_handler.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/settings/appearance_handler.cc
+@@ -34,7 +34,7 @@ void AppearanceHandler::RegisterMessages
+       "useDefaultTheme",
+       base::BindRepeating(&AppearanceHandler::HandleUseTheme,
+                           base::Unretained(this), ui::SystemTheme::kDefault));
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   web_ui()->RegisterMessageCallback(
+       "useGtkTheme",
+       base::BindRepeating(&AppearanceHandler::HandleUseTheme,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc
new file mode 100644
index 0000000000..6e9d8fb9bc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+@@ -138,7 +138,7 @@
+ #include "ash/webui/settings/public/constants/routes.mojom.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+ #include "ui/display/screen.h"
+ #endif
+ 
+@@ -157,7 +157,7 @@
+ #include "chrome/browser/ui/webui/certificate_manager_localized_strings_provider.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui_factory.h"
+ #include "ui/ozone/public/ozone_platform.h"
+ #endif
+@@ -295,7 +295,7 @@ void AddA11yStrings(content::WebUIDataSo
+       {"focusHighlightLabel",
+        IDS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION},
+ #endif
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       {"overscrollHistoryNavigationTitle",
+        IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE},
+       {"overscrollHistoryNavigationSubtitle",
+@@ -440,7 +440,7 @@ void AddAppearanceStrings(content::WebUI
+       {"huge", IDS_SETTINGS_HUGE_FONT_SIZE},
+       {"sidePanelAlignLeft", IDS_SETTINGS_SIDE_PANEL_ALIGN_LEFT},
+       {"sidePanelAlignRight", IDS_SETTINGS_SIDE_PANEL_ALIGN_RIGHT},
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       {"gtkTheme", IDS_SETTINGS_GTK_THEME},
+       {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME},
+       {"qtTheme", IDS_SETTINGS_QT_THEME},
+@@ -450,7 +450,7 @@ void AddAppearanceStrings(content::WebUI
+ #else
+       {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME},
+ #endif
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+       {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS},
+ #endif
+ #if BUILDFLAG(IS_MAC)
+@@ -475,7 +475,7 @@ void AddAppearanceStrings(content::WebUI
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+   bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance()
+                                       ->GetPlatformRuntimeProperties()
+                                       .supports_server_side_window_decorations;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_channel__info.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_channel__info.h
new file mode 100644
index 0000000000..87cbed5244
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_channel__info.h
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/channel_info.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/channel_info.h
+@@ -104,13 +104,13 @@ void ClearChannelForTesting();
+ std::string GetChannelSuffixForDataDir();
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::string GetChannelSuffixForExtraFlagsEnvVarName();
+ #endif
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ // Returns the channel-specific filename of the desktop shortcut used to launch
+ // the browser.
+ std::string GetDesktopName(base::Environment* env);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_channel__info__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_channel__info__posix.cc
new file mode 100644
index 0000000000..7acf16c13c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_channel__info__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/channel_info_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/channel_info_posix.cc
+@@ -92,7 +92,7 @@ std::string GetChannelSuffixForDataDir()
+   }
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ std::string GetChannelSuffixForExtraFlagsEnvVarName() {
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   const auto channel_state = GetChannelImpl();
+@@ -118,7 +118,7 @@ std::string GetChannelSuffixForExtraFlag
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ std::string GetDesktopName(base::Environment* env) {
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   // Google Chrome packaged as a snap is a special case: the application name
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__features.cc
new file mode 100644
index 0000000000..2d75f41be2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__features.cc
@@ -0,0 +1,88 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/chrome_features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/chrome_features.cc
+@@ -76,14 +76,14 @@ BASE_FEATURE(kAppShimNotificationAttribu
+ 
+ // Enables the built-in DNS resolver.
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kAsyncDns, "AsyncDns", base::FEATURE_ENABLED_BY_DEFAULT);
+ #else
+ BASE_FEATURE(kAsyncDns, "AsyncDns", base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // Enables or disables the Autofill survey triggered by opening a prompt to
+ // save address info.
+ BASE_FEATURE(kAutofillAddressSurvey,
+@@ -101,7 +101,7 @@ BASE_FEATURE(kAutofillPasswordSurvey,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Enables the Restart background mode optimization. When all Chrome UI is
+ // closed and it goes in the background, allows to restart the browser to
+ // discard memory.
+@@ -311,7 +311,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSe
+ 
+ // Enables or disables Desktop PWAs to be auto-started on OS login.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kDesktopPWAsRunOnOsLogin,
+              "DesktopPWAsRunOnOsLogin",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -354,7 +354,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSetting
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // Controls whether Chrome Apps are supported. See https://crbug.com/1221251.
+ // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome
+ // Apps will not launch and will be marked in the UI as deprecated.
+@@ -372,7 +372,7 @@ BASE_FEATURE(kDisruptiveNotificationPerm
+ 
+ // Enable DNS over HTTPS (DoH).
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kDnsOverHttps, "DnsOverHttps", base::FEATURE_ENABLED_BY_DEFAULT);
+ #else
+ BASE_FEATURE(kDnsOverHttps, "DnsOverHttps", base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -387,7 +387,7 @@ const base::FeatureParam<bool> kDnsOverH
+ const base::FeatureParam<bool> kDnsOverHttpsShowUiParam {
+   &kDnsOverHttps, "ShowUi",
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       true
+ #else
+       false
+@@ -954,7 +954,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir,
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kLinuxLowMemoryMonitor,
+              "LinuxLowMemoryMonitor",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -967,7 +967,7 @@ constexpr base::FeatureParam<int> kLinux
+     &kLinuxLowMemoryMonitor, "critical_level", 255};
+ #endif  // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kListWebAppsSwitch,
+              "ListWebAppsSwitch",
+              base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__features.h
new file mode 100644
index 0000000000..6d2f3976b7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__features.h
@@ -0,0 +1,51 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/chrome_features.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/chrome_features.h
+@@ -60,13 +60,13 @@ BASE_DECLARE_FEATURE(kAppShimNotificatio
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAsyncDns);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey);
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey);
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -226,7 +226,7 @@ COMPONENT_EXPORT(CHROME_FEATURES)
+ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation);
+ #endif
+ 
+@@ -567,7 +567,7 @@ COMPONENT_EXPORT(CHROME_FEATURES)
+ BASE_DECLARE_FEATURE(kLacrosSharedComponentsDir);
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLinuxLowMemoryMonitor);
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::FeatureParam<int> kLinuxLowMemoryMonitorModerateLevel;
+@@ -575,7 +575,7 @@ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::FeatureParam<int> kLinuxLowMemoryMonitorCriticalLevel;
+ #endif  // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch);
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc
new file mode 100644
index 0000000000..bd6ceab185
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc
@@ -0,0 +1,81 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/chrome_paths.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/chrome_paths.cc
+@@ -30,7 +30,7 @@
+ #include "base/apple/foundation_util.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
+ #include "components/policy/core/common/policy_paths.h"
+ #endif
+ 
+@@ -52,14 +52,14 @@
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // The path to the external extension <id>.json files.
+ // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/
+ const base::FilePath::CharType kFilepathSinglePrefExtensions[] =
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+-    FILE_PATH_LITERAL("/usr/share/google-chrome/extensions");
++    FILE_PATH_LITERAL("@PREFIX@/share/chromium/extensions");
+ #else
+-    FILE_PATH_LITERAL("/usr/share/chromium/extensions");
++    FILE_PATH_LITERAL("@PREFIX@/share/chromium/extensions");
+ #endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ 
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -225,7 +225,7 @@ bool PathProvider(int key, base::FilePat
+       }
+       break;
+     case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       if (!GetUserDownloadsDirectorySafe(&cur)) {
+         return false;
+       }
+@@ -539,7 +539,7 @@ bool PathProvider(int key, base::FilePat
+         return false;
+       }
+       break;
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
+     case chrome::DIR_POLICY_FILES: {
+       cur = base::FilePath(policy::kPolicyPath);
+       break;
+@@ -550,7 +550,7 @@ bool PathProvider(int key, base::FilePat
+ #if BUILDFLAG(IS_CHROMEOS_ASH) ||                              \
+     ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
+      BUILDFLAG(CHROMIUM_BRANDING)) ||                          \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+     case chrome::DIR_USER_EXTERNAL_EXTENSIONS: {
+       if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) {
+         return false;
+@@ -559,7 +559,7 @@ bool PathProvider(int key, base::FilePat
+       break;
+     }
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: {
+       cur = base::FilePath(kFilepathSinglePrefExtensions);
+       break;
+@@ -621,6 +621,9 @@ bool PathProvider(int key, base::FilePat
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+       cur = base::FilePath(
+           FILE_PATH_LITERAL("/etc/opt/chrome/native-messaging-hosts"));
++#elif BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
++      cur = base::FilePath(FILE_PATH_LITERAL(
++          "@PREFIX@/etc/chromium/native-messaging-hosts"));
+ #else
+       cur = base::FilePath(
+           FILE_PATH_LITERAL("/etc/chromium/native-messaging-hosts"));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h
new file mode 100644
index 0000000000..9ce9c93f9e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/chrome_paths.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/chrome_paths.h
+@@ -59,7 +59,7 @@ enum {
+ #if BUILDFLAG(IS_CHROMEOS_ASH) ||                              \
+     ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
+      BUILDFLAG(CHROMIUM_BRANDING)) ||                          \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   DIR_USER_EXTERNAL_EXTENSIONS,  // Directory for per-user external extensions
+                                  // on Chrome Mac and Chromium Linux.
+                                  // On Chrome OS, this path is used for OEM
+@@ -67,7 +67,7 @@ enum {
+                                  // create it.
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   DIR_STANDALONE_EXTERNAL_EXTENSIONS,  // Directory for 'per-extension'
+                                        // definition manifest files that
+                                        // describe extensions which are to be
+@@ -126,7 +126,7 @@ enum {
+ 
+ #endif
+ #if BUILDFLAG(ENABLE_EXTENSIONS) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD))
+   DIR_NATIVE_MESSAGING,       // System directory where native messaging host
+                               // manifest files are stored.
+   DIR_USER_NATIVE_MESSAGING,  // Directory with Native Messaging Hosts
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h
new file mode 100644
index 0000000000..0d90710651
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/chrome_paths_internal.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/chrome_paths_internal.h
+@@ -43,7 +43,7 @@ void GetUserCacheDirectory(const base::F
+ // Get the path to the user's documents directory.
+ bool GetUserDocumentsDirectory(base::FilePath* result);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Gets the path to a safe default download directory for a user.
+ bool GetUserDownloadsDirectorySafe(base::FilePath* result);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc
new file mode 100644
index 0000000000..be5eb52df2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/chrome_switches.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/chrome_switches.cc
+@@ -865,14 +865,14 @@ const char kAllowNaClSocketAPI[] = "allo
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon";
+ 
+ // Causes the browser to launch directly in guest mode.
+ const char kGuest[] = "guest";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Writes open and installed web apps for each profile to the specified file
+ // without launching a new browser window or tab. Pass a absolute file path to
+ // specify where to output the information. Can be used together with optional
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h
new file mode 100644
index 0000000000..cccd437c57
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h
@@ -0,0 +1,23 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/chrome_switches.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/chrome_switches.h
+@@ -274,12 +274,12 @@ extern const char kAllowNaClSocketAPI[];
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ extern const char kEnableNewAppMenuIcon[];
+ extern const char kGuest[];
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ extern const char kListApps[];
+ extern const char kProfileBaseName[];
+ extern const char kProfileManagementAttributes[];
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_extensions_permissions_chrome__permission__message__rules.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_extensions_permissions_chrome__permission__message__rules.cc
new file mode 100644
index 0000000000..61fbde32fb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_extensions_permissions_chrome__permission__message__rules.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/extensions/permissions/chrome_permission_message_rules.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/extensions/permissions/chrome_permission_message_rules.cc
+@@ -287,7 +287,7 @@ int GetEnterpriseReportingPrivatePermiss
+ #endif
+ #if BUILDFLAG(IS_WIN)
+   return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_WIN;
+-#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC)
++#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC) or BUILDFLAG(IS_BSD)
+   return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_LINUX_AND_MACOS;
+ #else
+   return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_cdm__host__file__path.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_cdm__host__file__path.cc
new file mode 100644
index 0000000000..10d6594797
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_cdm__host__file__path.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/media/cdm_host_file_path.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/media/cdm_host_file_path.cc
+@@ -90,7 +90,7 @@ void AddCdmHostFilePaths(
+   cdm_host_file_paths->emplace_back(chrome_framework_path,
+                                     chrome_framework_sig_path);
+ 
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+   base::FilePath chrome_exe_dir;
+   if (!base::PathService::Get(base::DIR_EXE, &chrome_exe_dir))
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_cdm__registration.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_cdm__registration.cc
new file mode 100644
index 0000000000..5338f9f810
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_cdm__registration.cc
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/media/cdm_registration.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/media/cdm_registration.cc
+@@ -26,11 +26,11 @@
+ 
+ #if BUILDFLAG(ENABLE_WIDEVINE)
+ #include "third_party/widevine/cdm/widevine_cdm_common.h"  // nogncheck
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "base/native_library.h"
+ #include "chrome/common/chrome_paths.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/no_destructor.h"
+ #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h"
+ #include "media/cdm/supported_audio_codecs.h"
+@@ -56,7 +56,7 @@ using Robustness = content::CdmInfo::Rob
+ #if BUILDFLAG(ENABLE_WIDEVINE)
+ #if (BUILDFLAG(BUNDLE_WIDEVINE_CDM) ||            \
+      BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ // Create a CdmInfo for a Widevine CDM, using |version|, |cdm_library_path|, and
+ // |capability|.
+ std::unique_ptr<content::CdmInfo> CreateWidevineCdmInfo(
+@@ -101,7 +101,7 @@ std::unique_ptr<content::CdmInfo> Create
+         // BUILDFLAG(IS_CHROMEOS))
+ 
+ #if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ // On Linux/ChromeOS we have to preload the CDM since it uses the zygote
+ // sandbox. On Windows and Mac, the bundled CDM is handled by the component
+ // updater.
+@@ -125,7 +125,7 @@ content::CdmInfo* GetBundledWidevine() {
+         // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
+ 
+ #if BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ // This code checks to see if a component updated Widevine CDM can be found. If
+ // there is one and it looks valid, return the CdmInfo for that CDM. Otherwise
+ // return nullptr.
+@@ -160,7 +160,7 @@ void AddSoftwareSecureWidevine(std::vect
+       /*supports_sub_key_systems=*/false, kWidevineCdmDisplayName,
+       kWidevineCdmType, base::Version(), base::FilePath());
+ 
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
+   base::Version glibc_version(gnu_get_libc_version());
+   DCHECK(glibc_version.IsValid());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_component__widevine__cdm__hint__file__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_component__widevine__cdm__hint__file__linux.h
new file mode 100644
index 0000000000..4b8909f60b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_media_component__widevine__cdm__hint__file__linux.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/media/component_widevine_cdm_hint_file_linux.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/media/component_widevine_cdm_hint_file_linux.h
+@@ -15,7 +15,7 @@
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ #error "This file only applies to desktop Linux and ChromeOS."
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_pref__names.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_pref__names.h
new file mode 100644
index 0000000000..92fb690c7e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_pref__names.h
@@ -0,0 +1,88 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/pref_names.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/pref_names.h
+@@ -1323,7 +1323,7 @@ inline constexpr char kUseAshProxy[] = "
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ // Linux specific preference on whether we should match the system theme.
+ inline constexpr char kSystemTheme[] = "extensions.theme.system_theme";
+ #endif
+@@ -1449,7 +1449,7 @@ inline constexpr char kShowUpdatePromoti
+     "browser.show_update_promotion_info_bar";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Boolean that is false if we should show window manager decorations.  If
+ // true, we draw a custom chrome frame (thicker title bar and blue border).
+ inline constexpr char kUseCustomChromeFrame[] = "browser.custom_chrome_frame";
+@@ -2001,7 +2001,7 @@ inline constexpr char kDownloadDefaultDi
+ inline constexpr char kDownloadDirUpgraded[] = "download.directory_upgrade";
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ inline constexpr char kOpenPdfDownloadInSystemReader[] =
+     "download.open_pdf_in_system_reader";
+ #endif
+@@ -2439,14 +2439,14 @@ inline constexpr char kMediaStorageIdSal
+ inline constexpr char kMediaCdmOriginData[] = "media.cdm.origin_data";
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // A boolean pref to determine whether or not the network service is running
+ // sandboxed.
+ inline constexpr char kNetworkServiceSandboxEnabled[] =
+     "net.network_service_sandbox";
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Records whether the user has seen an HTTP auth "negotiate" header.
+ inline constexpr char kReceivedHttpAuthNegotiateHeader[] =
+     "net.received_http_auth_negotiate_headers";
+@@ -2524,7 +2524,7 @@ inline constexpr char kAmbientAuthentica
+ inline constexpr char kBasicAuthOverHttpEnabled[] =
+     "auth.basic_over_http_enabled";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected
+ // along with kAuthNegotiateDelegateAllowlist.
+ inline constexpr char kAuthNegotiateDelegateByKdcPolicy[] =
+@@ -3575,7 +3575,7 @@ inline constexpr char kFileOrDirectoryPi
+ inline constexpr char kSandboxExternalProtocolBlocked[] =
+     "profile.sandbox_external_protocol_blocked";
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Boolean that indicates if system notifications are allowed to be used in
+ // place of Chrome notifications.
+ inline constexpr char kAllowSystemNotifications[] =
+@@ -3624,7 +3624,7 @@ inline constexpr char kCACertificateMana
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ inline constexpr char kEnforceLocalAnchorConstraintsEnabled[] =
+     "enforce_local_anchor_constraints_enabled";
+ #endif
+@@ -3938,7 +3938,7 @@ inline constexpr char kThrottleNonVisibl
+ inline constexpr char kNewBaseUrlInheritanceBehaviorAllowed[] =
+     "new_base_url_inheritance_behavior_allowed";
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // If this exists and is true, Chrome may run system DNS resolution out of the
+ // network process. If false, Chrome will run system DNS resolution in the
+ // network process. If non-existent, Chrome will decide where to run system DNS
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_url__constants.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_url__constants.h
new file mode 100644
index 0000000000..ac8dba56d9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_url__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/url_constants.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/url_constants.h
+@@ -822,7 +822,7 @@ inline constexpr char kPhoneHubPermissio
+     "https://support.google.com/chromebook?p=multidevice";;
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // "Learn more" URL for the chrome apps deprecation dialog.
+ inline constexpr char kChromeAppsDeprecationLearnMoreURL[] =
+     "https://support.google.com/chrome?p=chrome_app_deprecation";;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc
new file mode 100644
index 0000000000..dac493d8e5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc
@@ -0,0 +1,100 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/webui_url_constants.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/webui_url_constants.cc
+@@ -511,18 +511,18 @@ const char kOsUISystemURL[] = "os://syst
+ const char kOsUIVersionURL[] = "os://version";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kChromeUIWebUIJsErrorHost[] = "webuijserror";
+ const char kChromeUIWebUIJsErrorURL[] = "chrome://webuijserror/";
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS_ASH)
++    BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ const char kChromeUIConnectorsInternalsHost[] = "connectors-internals";
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kChromeUIDiscardsHost[] = "discards";
+ const char kChromeUIDiscardsURL[] = "chrome://discards/";
+ #endif
+@@ -537,14 +537,14 @@ const char kChromeUILinuxProxyConfigHost
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ const char kChromeUISandboxHost[] = "sandbox";
+ #endif
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD)
+ const char kChromeUIBrowserSwitchHost[] = "browser-switch";
+ const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/";
+ const char kChromeUIIntroHost[] = "intro";
+@@ -563,7 +563,7 @@ const char kChromeUIProfilePickerUrl[] =
+ const char kChromeUIProfilePickerStartupQuery[] = "startup";
+ #endif
+ 
+-#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+      defined(TOOLKIT_VIEWS)) ||                         \
+     defined(USE_AURA)
+ const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog";
+@@ -647,7 +647,7 @@ const char kCookiesSubPagePath[] = "/coo
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ const char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/";
+ const char kChromeUIWebAppSettingsHost[] = "app-settings";
+ #endif
+@@ -807,21 +807,21 @@ const char* const kChromeHostURLs[] = {
+     kChromeUIAssistantOptInHost,
+ #endif
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS_ASH)
++    BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+     kChromeUIConnectorsInternalsHost,
+ #endif
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     kChromeUIDiscardsHost,
+ #endif
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     kChromeUIWebAppSettingsHost,
+ #endif
+ #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID)
+     kChromeUILinuxProxyConfigHost,
+ #endif
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+     kChromeUISandboxHost,
+ #endif
+ #if BUILDFLAG(IS_WIN)
+@@ -895,7 +895,7 @@ const char* const kChromeDebugURLs[] = {
+     blink::kChromeUIGpuJavaCrashURL,
+     kChromeUIJavaCrashURL,
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     kChromeUIWebUIJsErrorURL,
+ #endif
+     kChromeUIQuitURL,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h
new file mode 100644
index 0000000000..786670390b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h
@@ -0,0 +1,63 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/common/webui_url_constants.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/common/webui_url_constants.h
+@@ -430,24 +430,24 @@ extern const char kOsUISystemURL[];
+ extern const char kOsUIVersionURL[];
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kChromeUIWebUIJsErrorHost[];
+ extern const char kChromeUIWebUIJsErrorURL[];
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS_ASH)
++    BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ extern const char kChromeUIConnectorsInternalsHost[];
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ extern const char kChromeUIDiscardsHost[];
+ extern const char kChromeUIDiscardsURL[];
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ extern const char kChromeUIWebAppSettingsURL[];
+ extern const char kChromeUIWebAppSettingsHost[];
+ #endif
+@@ -462,14 +462,14 @@ extern const char kChromeUILinuxProxyCon
+ #endif
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ extern const char kChromeUISandboxHost[];
+ #endif
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD)
+ extern const char kChromeUIBrowserSwitchHost[];
+ extern const char kChromeUIBrowserSwitchURL[];
+ extern const char kChromeUIIntroHost[];
+@@ -485,7 +485,7 @@ extern const char kChromeUIProfilePicker
+ extern const char kChromeUIProfilePickerStartupQuery[];
+ #endif
+ 
+-#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+      defined(TOOLKIT_VIEWS)) ||                         \
+     defined(USE_AURA)
+ extern const char kChromeUITabModalConfirmDialogHost[];
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_BUILD.gn
new file mode 100644
index 0000000000..c0b54f83fb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/chrome/test/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/test/BUILD.gn
+@@ -11652,7 +11652,7 @@ test("chrome_app_unittests") {
+     "//components/heap_profiling/in_process",
+     "//components/safe_browsing:buildflags",
+   ]
+-  if (!is_fuchsia && !is_mac) {
++  if (!is_fuchsia && !is_mac && !is_bsd) {
+     deps += [ "//third_party/breakpad:client" ]
+   }
+   if (is_android) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome__launcher.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome__launcher.cc
new file mode 100644
index 0000000000..d4c671f4f7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome__launcher.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/test/chromedriver/chrome_launcher.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/test/chromedriver/chrome_launcher.cc
+@@ -73,6 +73,7 @@
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/wait.h>
+ #include <unistd.h>
+ #elif BUILDFLAG(IS_WIN)
+ #include <windows.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome_chrome__finder.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome_chrome__finder.cc
new file mode 100644
index 0000000000..77eb0f4518
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_chrome_chrome__finder.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/test/chromedriver/chrome/chrome_finder.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/test/chromedriver/chrome/chrome_finder.cc
+@@ -58,7 +58,7 @@ void GetApplicationDirs(std::vector<base
+         installation_locations[i].Append(L"Chromium\\Application"));
+   }
+ }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void GetApplicationDirs(std::vector<base::FilePath>* locations) {
+   // TODO: Respect users' PATH variables.
+   // Until then, we use an approximation of the most common defaults.
+@@ -125,7 +125,7 @@ std::vector<base::FilePath> GetChromePro
+             chrome::kGoogleChromeForTestingBrowserProcessExecutablePath),
+         base::FilePath(chrome::kGoogleChromeBrowserProcessExecutablePath),
+         base::FilePath(chrome::kChromiumBrowserProcessExecutablePath),
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     base::FilePath(chrome::kBrowserProcessExecutablePath),
+         base::FilePath("chrome"),  // Chrome for Testing or Google Chrome
+         base::FilePath("google-chrome"), base::FilePath("chromium"),
+@@ -141,7 +141,7 @@ std::vector<base::FilePath> GetHeadlessS
+   return {
+ #if BUILDFLAG(IS_WIN)
+     base::FilePath(FILE_PATH_LITERAL("chrome-headless-shell.exe")),
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     base::FilePath("chrome-headless-shell"),
+ #else
+     // it will compile but won't work on other OSes
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_key__converter__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_key__converter__unittest.cc
new file mode 100644
index 0000000000..3aabbc0116
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_key__converter__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/test/chromedriver/key_converter_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/chrome/test/chromedriver/key_converter_unittest.cc
+@@ -251,7 +251,7 @@ TEST(KeyConverter, ToggleModifiers) {
+   CheckEventsReleaseModifiers(keys, key_events);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Fails on bots: crbug.com/174962
+ #define MAYBE_AllEnglishKeyboardSymbols DISABLED_AllEnglishKeyboardSymbols
+ #else
+@@ -308,7 +308,7 @@ TEST(KeyConverter, AllEnglishKeyboardTex
+ TEST(KeyConverter, AllSpecialWebDriverKeysOnEnglishKeyboard) {
+   ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_ENGLISH_US);
+   const char kTextForKeys[] = {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       0, 0, 0, 0, '\t', 0, '\r', '\r', 0, 0, 0, 0, 0,
+ #else
+       0, 0, 0, 0, 0, 0, '\r', '\r', 0, 0, 0, 0, 0,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_keycode__text__conversion__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_keycode__text__conversion__unittest.cc
new file mode 100644
index 0000000000..dc913f13bc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_chrome_test_chromedriver_keycode__text__conversion__unittest.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/chrome/test/chromedriver/keycode_text_conversion_unittest.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/chrome/test/chromedriver/keycode_text_conversion_unittest.cc
+@@ -67,7 +67,7 @@ std::string ConvertKeyCodeToTextNoError(
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ // Fails on bots: crbug.com/174962
+ #define MAYBE_KeyCodeToText DISABLED_KeyCodeToText
+ #else
+@@ -104,7 +104,7 @@ TEST(KeycodeTextConversionTest, MAYBE_Ke
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ // Fails on bots: crbug.com/174962
+ #define MAYBE_CharToKeyCode DISABLED_CharToKeyCode
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc
new file mode 100644
index 0000000000..ade0fbb39a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_autofill_core_common_autofill__payments__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/autofill/core/common/autofill_payments_features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/autofill/core/common/autofill_payments_features.cc
+@@ -289,7 +289,7 @@ BASE_FEATURE(kAutofillEnableVirtualCards
+ bool ShouldShowImprovedUserConsentForCreditCardSave() {
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || \
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
+   // The new user consent UI is fully launched on MacOS, Windows and Linux.
+   return true;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_commerce_core_commerce__feature__list.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_commerce_core_commerce__feature__list.cc
new file mode 100644
index 0000000000..13f0666072
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_commerce_core_commerce__feature__list.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/commerce/core/commerce_feature_list.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/commerce/core/commerce_feature_list.cc
+@@ -167,7 +167,7 @@ BASE_FEATURE(kPriceInsights,
+              "PriceInsights",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kPriceInsightsRegionLaunched,
+              "PriceInsightsRegionLaunched",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -205,7 +205,7 @@ BASE_FEATURE(kEnableDiscountInfoApi,
+              "EnableDiscountInfoApi",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEnableDiscountInfoApiRegionLaunched,
+              "EnableDiscountInfoApiRegionLaunched",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -240,7 +240,7 @@ BASE_FEATURE(kShoppingCollection,
+ 
+ BASE_FEATURE(kShoppingList, "ShoppingList", base::FEATURE_DISABLED_BY_DEFAULT);
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kShoppingListRegionLaunched,
+              "ShoppingListRegionLaunched",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_constrained__window_constrained__window__views.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_constrained__window_constrained__window__views.cc
new file mode 100644
index 0000000000..412f93225e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_constrained__window_constrained__window__views.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/constrained_window/constrained_window_views.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/constrained_window/constrained_window_views.cc
+@@ -372,7 +372,7 @@ bool SupportsGlobalScreenCoordinates() {
+ }
+ 
+ bool PlatformClipsChildrenToViewport() {
+-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc
new file mode 100644
index 0000000000..6b1b4cd49d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc
+@@ -67,7 +67,7 @@ const WebsiteSettingsInfo* WebsiteSettin
+ #if BUILDFLAG(IS_WIN)
+   if (!(platform & PLATFORM_WINDOWS))
+     return nullptr;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!(platform & PLATFORM_LINUX))
+     return nullptr;
+ #elif BUILDFLAG(IS_MAC)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc
new file mode 100644
index 0000000000..87288a3683
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/cookie_config/cookie_store_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/cookie_config/cookie_store_util.cc
+@@ -12,7 +12,7 @@
+ namespace cookie_config {
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ // Use the operating system's mechanisms to encrypt cookies before writing
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn
new file mode 100644
index 0000000000..d8831c999c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_BUILD.gn
@@ -0,0 +1,49 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/crash/core/app/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/crash/core/app/BUILD.gn
+@@ -76,7 +76,7 @@ static_library("app") {
+     "crashpad.h",
+   ]
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "crashpad_linux.cc" ]
+   }
+ 
+@@ -89,6 +89,10 @@ static_library("app") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [ "crashpad.cc" ]
++  }
++
+   defines = [ "CRASH_IMPLEMENTATION" ]
+ 
+   public_deps = [ ":lib" ]
+@@ -117,7 +121,7 @@ static_library("app") {
+     libs = [ "log" ]
+   }
+ 
+-  if (is_android || is_linux || is_chromeos) {
++  if ((is_android || is_linux || is_chromeos) && !is_bsd) {
+     deps += [
+       "//base:base_static",
+       "//components/crash/core/common",
+@@ -246,11 +250,6 @@ if (is_mac || is_android || is_linux || 
+   executable("chrome_crashpad_handler") {
+     sources = [ "chrome_crashpad_handler.cc" ]
+ 
+-    deps = [
+-      ":crashpad_handler_main",
+-      "//third_party/crashpad/crashpad/handler",
+-    ]
+-
+     if (is_mac && (is_component_build || is_asan)) {
+       ldflags = [
+         # The handler is in
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_chrome__crashpad__handler.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_chrome__crashpad__handler.cc
new file mode 100644
index 0000000000..43c828203c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_chrome__crashpad__handler.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/crash/core/app/chrome_crashpad_handler.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/crash/core/app/chrome_crashpad_handler.cc
+@@ -6,5 +6,9 @@
+ extern "C" int CrashpadHandlerMain(int argc, char* argv[]);
+ 
+ int main(int argc, char* argv[]) {
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++  return -1;
++#else
+   return CrashpadHandlerMain(argc, argv);
++#endif
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_crashpad__handler__main.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_crashpad__handler__main.cc
new file mode 100644
index 0000000000..d7d3684bdd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_app_crashpad__handler__main.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/crash/core/app/crashpad_handler_main.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/crash/core/app/crashpad_handler_main.cc
+@@ -10,7 +10,7 @@
+ #include "third_party/crashpad/crashpad/handler/handler_main.h"
+ #include "third_party/crashpad/crashpad/handler/user_stream_data_source.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #include "components/stability_report/user_stream_data_source_posix.h"
+ #endif
+ 
+@@ -31,7 +31,7 @@ __attribute__((visibility("default"), us
+     char* argv[]) {
+   crashpad::UserStreamDataSources user_stream_data_sources;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   user_stream_data_sources.push_back(
+       std::make_unique<stability_report::UserStreamDataSourcePosix>());
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_browser_crash__upload__list__crashpad.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_browser_crash__upload__list__crashpad.cc
new file mode 100644
index 0000000000..8729a69a25
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_browser_crash__upload__list__crashpad.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/crash/core/browser/crash_upload_list_crashpad.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/crash/core/browser/crash_upload_list_crashpad.cc
+@@ -38,7 +38,9 @@ CrashUploadListCrashpad::~CrashUploadLis
+ std::vector<std::unique_ptr<UploadList::UploadInfo>>
+ CrashUploadListCrashpad::LoadUploadList() {
+   std::vector<crash_reporter::Report> reports;
++#if !BUILDFLAG(IS_BSD)
+   crash_reporter::GetReports(&reports);
++#endif
+ 
+   std::vector<std::unique_ptr<UploadInfo>> uploads;
+   for (const crash_reporter::Report& report : reports) {
+@@ -52,9 +54,13 @@ CrashUploadListCrashpad::LoadUploadList(
+ 
+ void CrashUploadListCrashpad::ClearUploadList(const base::Time& begin,
+                                               const base::Time& end) {
++#if !BUILDFLAG(IS_BSD)
+   crash_reporter::ClearReportsBetween(begin, end);
++#endif
+ }
+ 
+ void CrashUploadListCrashpad::RequestSingleUpload(const std::string& local_id) {
++#if !BUILDFLAG(IS_BSD)
+   crash_reporter::RequestSingleCrashUpload(local_id);
++#endif
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn
new file mode 100644
index 0000000000..bf0d941bfa
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/crash/core/common/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/crash/core/common/BUILD.gn
+@@ -9,7 +9,7 @@ import("//components/gwp_asan/buildflags
+ 
+ declare_args() {
+   # If set to true, this will stub out and disable the entire crash key system.
+-  use_crash_key_stubs = is_fuchsia
++  use_crash_key_stubs = is_fuchsia || is_bsd
+ }
+ 
+ group("common") {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_mock__signals__aggregator.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_mock__signals__aggregator.h
new file mode 100644
index 0000000000..25b7c6a46e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_mock__signals__aggregator.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/browser/mock_signals_aggregator.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/browser/mock_signals_aggregator.h
+@@ -17,7 +17,7 @@ class MockSignalsAggregator : public Sig
+   MockSignalsAggregator();
+   ~MockSignalsAggregator() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   MOCK_METHOD(void,
+               GetSignalsForUser,
+               (const UserContext&,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator.h
new file mode 100644
index 0000000000..bfaf0f6e04
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator.h
+@@ -22,7 +22,7 @@ class SignalsAggregator : public KeyedSe
+ 
+   ~SignalsAggregator() override = default;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Will asynchronously collect signals whose names are specified in the
+   // `request` object, and will also use a `user_context` to validate that the
+   // user has permissions to the device's signals. Invokes `callback` with the
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.cc
new file mode 100644
index 0000000000..3d40a4827e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator_impl.cc
+@@ -65,7 +65,7 @@ SignalsAggregatorImpl::SignalsAggregator
+ 
+ SignalsAggregatorImpl::~SignalsAggregatorImpl() = default;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void SignalsAggregatorImpl::GetSignalsForUser(
+     const UserContext& user_context,
+     const SignalsAggregationRequest& request,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.h
new file mode 100644
index 0000000000..a6165d5627
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_signals__aggregator__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/browser/signals_aggregator_impl.h
+@@ -29,7 +29,7 @@ class SignalsAggregatorImpl : public Sig
+   ~SignalsAggregatorImpl() override;
+ 
+   // SignalsAggregator:
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void GetSignalsForUser(const UserContext& user_context,
+                          const SignalsAggregationRequest& request,
+                          GetSignalsCallback callback) override;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service.h
new file mode 100644
index 0000000000..9db73ad664
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service.h
+@@ -57,7 +57,7 @@ class UserPermissionService : public Key
+   // missing.
+   virtual bool ShouldCollectConsent() const = 0;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Will verify whether context-aware signals can be collected
+   // on behalf of the user represented by `user_context`. Returns `kGranted` if
+   // collection is allowed.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.cc
new file mode 100644
index 0000000000..21ffefe554
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service_impl.cc
+@@ -87,7 +87,7 @@ bool UserPermissionServiceImpl::ShouldCo
+          consent_required_by_dependent_policy;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ UserPermission UserPermissionServiceImpl::CanUserCollectSignals(
+     const UserContext& user_context) const {
+   // Return "unknown user" if no user ID was given.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.h
new file mode 100644
index 0000000000..48d0dd22a3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_browser_user__permission__service__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/browser/user_permission_service_impl.h
+@@ -38,7 +38,7 @@ class UserPermissionServiceImpl : public
+ 
+   // UserPermissionService:
+   bool ShouldCollectConsent() const override;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   UserPermission CanUserCollectSignals(
+       const UserContext& user_context) const override;
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.cc
new file mode 100644
index 0000000000..4e935b4475
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/common/signals_features.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/common/signals_features.cc
+@@ -50,7 +50,7 @@ bool IsNewFunctionEnabled(NewEvFunction 
+ }
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS_ASH)
++    BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ // Enables the triggering of device signals consent dialog when conditions met
+ // This feature also requires UnmanagedDeviceSignalsConsentFlowEnabled policy to
+ // be enabled
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.h
new file mode 100644
index 0000000000..313bd787f3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_common_signals__features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/common/signals_features.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/common/signals_features.h
+@@ -31,7 +31,7 @@ enum class NewEvFunction { kFileSystemIn
+ bool IsNewFunctionEnabled(NewEvFunction new_ev_function);
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_CHROMEOS_ASH)
++    BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kDeviceSignalsConsentDialog);
+ 
+ // Returns true if device signals consent dialog has been enabled for
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_system__signals_platform__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_system__signals_platform__delegate.cc
new file mode 100644
index 0000000000..02bd1b45ed
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_device__signals_core_system__signals_platform__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/device_signals/core/system_signals/platform_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/device_signals/core/system_signals/platform_delegate.cc
+@@ -11,7 +11,7 @@ namespace device_signals {
+ 
+ bool CustomFilePathComparator::operator()(const base::FilePath& a,
+                                           const base::FilePath& b) const {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Linux, the file system is case sensitive.
+   return a < b;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_discardable__memory_service_discardable__shared__memory__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_discardable__memory_service_discardable__shared__memory__manager.cc
new file mode 100644
index 0000000000..dbe6c661a8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_discardable__memory_service_discardable__shared__memory__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/discardable_memory/service/discardable_shared_memory_manager.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/discardable_memory/service/discardable_shared_memory_manager.cc
+@@ -172,7 +172,7 @@ uint64_t GetDefaultMemoryLimit() {
+   // Limits the number of FDs used to 32, assuming a 4MB allocation size.
+   uint64_t max_default_memory_limit = 128 * kMegabyte;
+ #else
+-  uint64_t max_default_memory_limit = 512 * kMegabyte;
++  uint64_t max_default_memory_limit = 128 * kMegabyte;
+ #endif
+ 
+   // Use 1/8th of discardable memory on low-end devices.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils.cc
new file mode 100644
index 0000000000..003d84ba15
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/embedder_support/user_agent_utils.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/embedder_support/user_agent_utils.cc
+@@ -445,6 +445,9 @@ std::string GetPlatformForUAMetadata() {
+ # else
+   return "Chromium OS";
+ # endif
++#elif BUILDFLAG(IS_BSD)
++  // The internet is weird...
++  return "Linux";
+ #else
+   return std::string(version_info::GetOSType());
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils__unittest.cc
new file mode 100644
index 0000000000..934477d84e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_embedder__support_user__agent__utils__unittest.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/embedder_support/user_agent_utils_unittest.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/embedder_support/user_agent_utils_unittest.cc
+@@ -71,7 +71,7 @@ const char kDesktop[] =
+     "X11; CrOS x86_64 14541.0.0"
+ #elif BUILDFLAG(IS_FUCHSIA)
+     "Fuchsia"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     "X11; Linux x86_64"
+ #elif BUILDFLAG(IS_MAC)
+     "Macintosh; Intel Mac OS X 10_15_7"
+@@ -84,7 +84,7 @@ const char kDesktop[] =
+     "Safari/537.36";
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ std::string GetMachine() {
+   struct utsname unixinfo;
+   uname(&unixinfo);
+@@ -192,7 +192,7 @@ void CheckUserAgentStringOrdering(bool m
+     int value;
+     ASSERT_TRUE(base::StringToInt(pieces[i], &value));
+   }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // X11; Linux x86_64
+   ASSERT_EQ(2u, pieces.size());
+   ASSERT_EQ("X11", pieces[0]);
+@@ -750,7 +750,7 @@ TEST_F(UserAgentUtilsTest, UserAgentMeta
+ #endif
+ #elif BUILDFLAG(IS_ANDROID)
+   EXPECT_EQ(metadata.platform, "Android");
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   EXPECT_EQ(metadata.platform, "Linux");
+ #elif BUILDFLAG(IS_FREEBSD)
+   EXPECT_EQ(metadata.platform, "FreeBSD");
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_eye__dropper_eye__dropper__view.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_eye__dropper_eye__dropper__view.cc
new file mode 100644
index 0000000000..890acc6ecd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_eye__dropper_eye__dropper__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/eye_dropper/eye_dropper_view.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/eye_dropper/eye_dropper_view.cc
+@@ -200,7 +200,7 @@ EyeDropperView::EyeDropperView(gfx::Nati
+   // EyeDropper/WidgetDelegate.
+   set_owned_by_client();
+   SetPreferredSize(GetSize());
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Use TYPE_MENU for Linux to ensure that the eye dropper view is displayed
+   // above the color picker.
+   views::Widget::InitParams params(views::Widget::InitParams::TYPE_MENU);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.cc
new file mode 100644
index 0000000000..7daf3d18cc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feature_engagement/public/event_constants.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/feature_engagement/public/event_constants.cc
+@@ -11,7 +11,7 @@ namespace feature_engagement {
+ namespace events {
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ const char kNewTabOpened[] = "new_tab_opened";
+ const char kSixthTabOpened[] = "sixth_tab_opened";
+ const char kTabGroupCreated[] = "tab_group_created";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.h
new file mode 100644
index 0000000000..55c001c340
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_event__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feature_engagement/public/event_constants.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/feature_engagement/public/event_constants.h
+@@ -14,7 +14,7 @@ namespace events {
+ 
+ // Desktop
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // The user has explicitly opened a new tab via an entry point from inside of
+ // Chrome.
+ extern const char kNewTabOpened[];
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__configurations.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__configurations.cc
new file mode 100644
index 0000000000..3f5f771b18
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__configurations.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feature_engagement/public/feature_configurations.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/feature_engagement/public/feature_configurations.cc
+@@ -48,7 +48,7 @@ FeatureConfig CreateAlwaysTriggerConfig(
+ 
+ absl::optional<FeatureConfig> GetClientSideFeatureConfig(
+     const base::Feature* feature) {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ 
+   // The IPH bubble for link capturing has a trigger set to ANY so that it
+   // always shows up. The per app specific guardrails are independently stored
+@@ -67,7 +67,7 @@ absl::optional<FeatureConfig> GetClientS
+ 
+ #endif  // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (kIPHPasswordsAccountStorageFeature.name == feature->name) {
+     absl::optional<FeatureConfig> config = FeatureConfig();
+     config->valid = true;
+@@ -1530,7 +1530,8 @@ absl::optional<FeatureConfig> GetClientS
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+ 
+   if (kIPHAutofillExternalAccountProfileSuggestionFeature.name ==
+       feature->name) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.cc
new file mode 100644
index 0000000000..1017953ef6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feature_engagement/public/feature_constants.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/feature_engagement/public/feature_constants.cc
+@@ -21,7 +21,7 @@ BASE_FEATURE(kUseClientConfigIPH,
+ BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kIPHBatterySaverModeFeature,
+              "IPH_BatterySaverMode",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -611,7 +611,8 @@ constexpr base::FeatureParam<int> kDefau
+ #endif  // BUILDFLAG(IS_IOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature,
+              "IPH_AutofillExternalAccountProfileSuggestion",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -736,7 +737,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeatur
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)|| BUILDFLAG(IS_BSD)
+ // This can be enabled by default, as the DesktopPWAsLinkCapturing flag is
+ // needed for the IPH linked to this feature to work, and use-cases to show
+ // the IPH are guarded by that flag.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.h
new file mode 100644
index 0000000000..ca8b6f97f3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__constants.h
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feature_engagement/public/feature_constants.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/feature_engagement/public/feature_constants.h
+@@ -25,7 +25,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH
+ BASE_DECLARE_FEATURE(kIPHDummyFeature);
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature);
+ BASE_DECLARE_FEATURE(kIPHCompanionSidePanelFeature);
+ BASE_DECLARE_FEATURE(kIPHCompanionSidePanelRegionSearchFeature);
+@@ -81,7 +81,7 @@ BASE_DECLARE_FEATURE(kIPHWebUiHelpBubble
+ BASE_DECLARE_FEATURE(kIPHPriceTrackingInSidePanelFeature);
+ BASE_DECLARE_FEATURE(kIPHBackNavigationMenuFeature);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) ||
+-        // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++        // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ 
+ // All the features declared for Android below that are also used in Java,
+ // should also be declared in:
+@@ -253,7 +253,8 @@ extern const base::FeatureParam<int>
+ #endif  // BUILDFLAG(IS_IOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature);
+ BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardCVCSuggestionFeature);
+ BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardSuggestionFeature);
+@@ -300,7 +301,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelp
+ BASE_DECLARE_FEATURE(kIPHScalableIphGamingFeature);
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunch);
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.cc
new file mode 100644
index 0000000000..28cb65490d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feature_engagement/public/feature_list.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/feature_engagement/public/feature_list.cc
+@@ -157,7 +157,7 @@ const base::Feature* const kAllFeatures[
+     &kIPHiOSPromoStaySafeFeature,
+ #endif  // BUILDFLAG(IS_IOS)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     &kIPHBatterySaverModeFeature,
+     &kIPHCompanionSidePanelFeature,
+     &kIPHCompanionSidePanelRegionSearchFeature,
+@@ -215,7 +215,8 @@ const base::Feature* const kAllFeatures[
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+     &kIPHAutofillExternalAccountProfileSuggestionFeature,
+     &kIPHAutofillVirtualCardCVCSuggestionFeature,
+     &kIPHAutofillVirtualCardSuggestionFeature,
+@@ -262,7 +263,7 @@ const base::Feature* const kAllFeatures[
+     &kIPHScalableIphGamingFeature,
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     &kIPHDesktopPWAsLinkCapturingLaunch,
+ #endif  // BUILDFLAG(IS_WIN) ||  BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.h
new file mode 100644
index 0000000000..09e8b821d8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feature__engagement_public_feature__list.h
@@ -0,0 +1,64 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feature_engagement/public/feature_list.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/feature_engagement/public/feature_list.h
+@@ -288,7 +288,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSPromoStayS
+ #endif  // BUILDFLAG(IS_IOS)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode");
+ DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelFeature, "IPH_CompanionSidePanel");
+ DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelRegionSearchFeature,
+@@ -387,7 +387,8 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigatio
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+ DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature,
+                        "IPH_AutofillExternalAccountProfileSuggestion");
+ DEFINE_VARIATION_PARAM(kIPHAutofillVirtualCardCVCSuggestionFeature,
+@@ -470,7 +471,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHe
+ DEFINE_VARIATION_PARAM(kIPHScalableIphGamingFeature, "IPH_ScalableIphGaming");
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunch,
+                        "IPH_DesktopPWAsLinkCapturingLaunch");
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+@@ -615,7 +616,7 @@ constexpr flags_ui::FeatureEntry::Featur
+         VARIATION_ENTRY(kIPHiOSPromoMadeForIOSFeature),
+         VARIATION_ENTRY(kIPHiOSPromoStaySafeFeature),
+ #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+         VARIATION_ENTRY(kIPHBatterySaverModeFeature),
+         VARIATION_ENTRY(kIPHCompanionSidePanelFeature),
+         VARIATION_ENTRY(kIPHCompanionSidePanelRegionSearchFeature),
+@@ -673,7 +674,8 @@ constexpr flags_ui::FeatureEntry::Featur
+         // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_BSD)
+         VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature),
+         VARIATION_ENTRY(kIPHAutofillVirtualCardCVCSuggestionFeature),
+         VARIATION_ENTRY(kIPHAutofillVirtualCardSuggestionFeature),
+@@ -720,7 +722,7 @@ constexpr flags_ui::FeatureEntry::Featur
+         VARIATION_ENTRY(kIPHScalableIphGamingFeature),
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+         VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunch),
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_proto_v2_wire_version.proto b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_proto_v2_wire_version.proto
new file mode 100644
index 0000000000..f62e01ebb0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_proto_v2_wire_version.proto
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feed/core/proto/v2/wire/version.proto.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/feed/core/proto/v2/wire/version.proto
+@@ -25,8 +25,8 @@ message Version {
+     BETA = 3;
+     RELEASE = 4;
+   }
+-  optional int32 major = 1;
+-  optional int32 minor = 2;
++  optional int32 gmajor = 1;
++  optional int32 gminor = 2;
+   optional int32 build = 3;
+   optional int32 revision = 4;
+   optional Architecture architecture = 5;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_feed__network__impl__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_feed__network__impl__unittest.cc
new file mode 100644
index 0000000000..4594893ec6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_feed__network__impl__unittest.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feed/core/v2/feed_network_impl_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/feed/core/v2/feed_network_impl_unittest.cc
+@@ -747,8 +747,8 @@ TEST_F(FeedNetworkTest, SendApiRequest_D
+ 
+   EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, client_info.app_type());
+   EXPECT_EQ(feedwire::Version::RELEASE, client_info.app_version().build_type());
+-  EXPECT_EQ(1, client_info.app_version().major());
+-  EXPECT_EQ(2, client_info.app_version().minor());
++  EXPECT_EQ(1, client_info.app_version().gmajor());
++  EXPECT_EQ(2, client_info.app_version().gminor());
+   EXPECT_EQ(3, client_info.app_version().build());
+   EXPECT_EQ(4, client_info.app_version().revision());
+   EXPECT_FALSE(client_info.chrome_client_info().start_surface());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util.cc
new file mode 100644
index 0000000000..6470dd041d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feed/core/v2/proto_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/feed/core/v2/proto_util.cc
+@@ -93,8 +93,8 @@ feedwire::Version GetPlatformVersionMess
+ 
+   int32_t major, minor, revision;
+   base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &revision);
+-  result.set_major(major);
+-  result.set_minor(minor);
++  result.set_gmajor(major);
++  result.set_gminor(minor);
+   result.set_revision(revision);
+ #if BUILDFLAG(IS_ANDROID)
+   result.set_api_version(base::android::BuildInfo::GetInstance()->sdk_int());
+@@ -109,8 +109,8 @@ feedwire::Version GetAppVersionMessage(c
+   // Chrome's version is in the format: MAJOR,MINOR,BUILD,PATCH.
+   const std::vector<uint32_t>& numbers = chrome_info.version.components();
+   if (numbers.size() > 3) {
+-    result.set_major(static_cast<int32_t>(numbers[0]));
+-    result.set_minor(static_cast<int32_t>(numbers[1]));
++    result.set_gmajor(static_cast<int32_t>(numbers[0]));
++    result.set_gminor(static_cast<int32_t>(numbers[1]));
+     result.set_build(static_cast<int32_t>(numbers[2]));
+     result.set_revision(static_cast<int32_t>(numbers[3]));
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util__unittest.cc
new file mode 100644
index 0000000000..e303b58378
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_feed_core_v2_proto__util__unittest.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/feed/core/v2/proto_util_unittest.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/feed/core/v2/proto_util_unittest.cc
+@@ -44,8 +44,8 @@ TEST(ProtoUtilTest, CreateClientInfo) {
+   feedwire::ClientInfo result = CreateClientInfo(request_metadata);
+   EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, result.app_type());
+   EXPECT_EQ(feedwire::Version::RELEASE, result.app_version().build_type());
+-  EXPECT_EQ(1, result.app_version().major());
+-  EXPECT_EQ(2, result.app_version().minor());
++  EXPECT_EQ(1, result.app_version().gmajor());
++  EXPECT_EQ(2, result.app_version().gminor());
+   EXPECT_EQ(3, result.app_version().build());
+   EXPECT_EQ(4, result.app_version().revision());
+   EXPECT_FALSE(result.chrome_client_info().start_surface());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc
new file mode 100644
index 0000000000..9c5c468e1d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/flags_ui/flags_state.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/flags_ui/flags_state.cc
+@@ -755,7 +755,7 @@ unsigned short FlagsState::GetCurrentPla
+   return kOsCrOS;
+ #elif BUILDFLAG(IS_CHROMEOS_LACROS)
+   return kOsLacros;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return kOsLinux;
+ #elif BUILDFLAG(IS_ANDROID)
+   return kOsAndroid;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_BUILD.gn
new file mode 100644
index 0000000000..657905080c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/gwp_asan/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/gwp_asan/BUILD.gn
+@@ -15,7 +15,7 @@ test("gwp_asan_unittests") {
+     "//testing/gtest",
+     "//third_party/boringssl",
+   ]
+-  if (is_win || is_mac || is_linux || is_chromeos || is_android) {
++  if ((is_win || is_mac || is_linux || is_chromeos || is_android) && !is_bsd) {
+     deps += [
+       "//components/gwp_asan/client:unit_tests",
+       "//components/gwp_asan/crash_handler:unit_tests",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_guarded__page__allocator__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_guarded__page__allocator__posix.cc
new file mode 100644
index 0000000000..8e9275214c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_guarded__page__allocator__posix.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/gwp_asan/client/guarded_page_allocator_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/gwp_asan/client/guarded_page_allocator_posix.cc
+@@ -35,8 +35,9 @@ void GuardedPageAllocator::MarkPageInacc
+   // mmap() a PROT_NONE page over the address to release it to the system, if
+   // we used mprotect() here the system would count pages in the quarantine
+   // against the RSS.
++  // MAP_ANONYMOUS requires the fd to be -1 on !linux
+   void* err = mmap(ptr, state_.page_size, PROT_NONE,
+-                   MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
++                   MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+   PCHECK(err == ptr) << "mmap";
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan.cc
new file mode 100644
index 0000000000..b59cd7deae
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/gwp_asan/client/gwp_asan.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/gwp_asan/client/gwp_asan.cc
+@@ -75,7 +75,7 @@ namespace {
+ // ProcessSamplingBoost is the multiplier to increase the
+ // ProcessSamplingProbability in scenarios where we want to perform additional
+ // testing (e.g., on canary/dev builds).
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ constexpr int kDefaultMaxAllocations = 50;
+ constexpr int kDefaultMaxMetadata = 210;
+ constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan__features.cc
new file mode 100644
index 0000000000..871bcabe8d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_client_gwp__asan__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/gwp_asan/client/gwp_asan_features.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/gwp_asan/client/gwp_asan_features.cc
+@@ -9,7 +9,7 @@
+ namespace gwp_asan::internal {
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) ||                                          \
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ||                     \
+     (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS))
+ constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_crash__handler_crash__analyzer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_crash__handler_crash__analyzer.cc
new file mode 100644
index 0000000000..d4cccb9ffc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_gwp__asan_crash__handler_crash__analyzer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/gwp_asan/crash_handler/crash_analyzer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/gwp_asan/crash_handler/crash_analyzer.cc
+@@ -35,7 +35,7 @@
+ #include "third_party/crashpad/crashpad/snapshot/process_snapshot.h"
+ #include "third_party/crashpad/crashpad/util/process/process_memory.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include <signal.h>
+ #elif BUILDFLAG(IS_APPLE)
+ #include <mach/exception_types.h>
+@@ -95,7 +95,7 @@ bool CrashAnalyzer::GetExceptionInfo(
+ 
+ crashpad::VMAddress CrashAnalyzer::GetAccessAddress(
+     const crashpad::ExceptionSnapshot& exception) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   if (exception.Exception() == SIGSEGV || exception.Exception() == SIGBUS)
+     return exception.ExceptionAddress();
+ #elif BUILDFLAG(IS_APPLE)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_live__caption_caption__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_live__caption_caption__util.cc
new file mode 100644
index 0000000000..60ffcfcb72
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_live__caption_caption__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/live_caption/caption_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/live_caption/caption_util.cc
+@@ -139,7 +139,7 @@ std::string GetCaptionSettingsUrl() {
+   return "chrome://os-settings/audioAndCaptions";
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "chrome://settings/captions";
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_live__caption_caption__util.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_live__caption_caption__util.h
new file mode 100644
index 0000000000..119e997c40
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_live__caption_caption__util.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/live_caption/caption_util.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/live_caption/caption_util.h
+@@ -15,7 +15,7 @@ class PrefService;
+ namespace captions {
+ 
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ extern const char kCaptionSettingsUrl[];
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
+         // BUILDFLAG(IS_MAC)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_media__router_common_media__source.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_media__router_common_media__source.cc
new file mode 100644
index 0000000000..110db7a071
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_media__router_common_media__source.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/media_router/common/media_source.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/media_router/common/media_source.cc
+@@ -59,7 +59,7 @@ bool IsSystemAudioCaptureSupported() {
+   }
+ #if BUILDFLAG(IS_MAC)
+   return base::FeatureList::IsEnabled(media::kMacLoopbackAudioForCast);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(media::kPulseaudioLoopbackForCast);
+ #else
+   return true;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_media__router_common_providers_cast_channel_cast__message__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_media__router_common_providers_cast_channel_cast__message__util.cc
new file mode 100644
index 0000000000..437f06a753
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_media__router_common_providers_cast_channel_cast__message__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/media_router/common/providers/cast/channel/cast_message_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/media_router/common/providers/cast/channel/cast_message_util.cc
+@@ -169,7 +169,7 @@ int GetVirtualConnectPlatformValue() {
+   return 4;
+ #elif BUILDFLAG(IS_CHROMEOS_ASH)
+   return 5;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   return 6;
+ #else
+   return 0;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc
new file mode 100644
index 0000000000..407ca352d8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/metrics/drive_metrics_provider_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/metrics/drive_metrics_provider_linux.cc
+@@ -4,7 +4,13 @@
+ 
+ #include "components/metrics/drive_metrics_provider.h"
+ 
++#if BUILDFLAG(IS_BSD)
++#include <sys/types.h>
++#define MAJOR(dev) major(dev)
++#define MINOR(dev) minor(dev)
++#else
+ #include <linux/kdev_t.h>  // For MAJOR()/MINOR().
++#endif
+ #include <sys/stat.h>
+ #include <string>
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc
new file mode 100644
index 0000000000..eddef0bfd4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_metrics__log.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/metrics/metrics_log.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/metrics/metrics_log.cc
+@@ -56,7 +56,7 @@
+ #include "base/win/current_module.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/environment.h"
+ #include "base/nix/xdg_util.h"
+ #endif
+@@ -146,7 +146,7 @@ void RecordCurrentTime(
+   }
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType(
+     base::nix::SessionType session_type) {
+   switch (session_type) {
+@@ -415,7 +415,7 @@ void MetricsLog::RecordCoreSystemProfile
+ // OperatingSystemVersion refers to the ChromeOS release version.
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+   os->set_kernel_version(base::SysInfo::KernelVersion());
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   // Linux operating system version is copied over into kernel version to be
+   // consistent.
+   os->set_kernel_version(base::SysInfo::OperatingSystemVersion());
+@@ -432,7 +432,7 @@ void MetricsLog::RecordCoreSystemProfile
+   os->set_build_number(base::SysInfo::GetIOSBuildNumber());
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<base::Environment> env = base::Environment::Create();
+   os->set_xdg_session_type(ToProtoSessionType(base::nix::GetSessionType(*env)));
+   os->set_xdg_current_desktop(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_motherboard.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_motherboard.cc
new file mode 100644
index 0000000000..0ba1f3a8a4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_metrics_motherboard.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/metrics/motherboard.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/metrics/motherboard.cc
+@@ -1,6 +1,7 @@
+ // Copyright 2022 The Chromium Authors
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
++// CHECK
+ 
+ #include "components/metrics/motherboard.h"
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_named__mojo__ipc__server_connection__info.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_named__mojo__ipc__server_connection__info.h
new file mode 100644
index 0000000000..c3bcf5df00
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_named__mojo__ipc__server_connection__info.h
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/named_mojo_ipc_server/connection_info.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/named_mojo_ipc_server/connection_info.h
+@@ -13,8 +13,14 @@
+ #include "base/win/scoped_handle.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include <bsm/libbsm.h>
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include <sys/socket.h>
++#if defined(__NetBSD__)
++#include <sys/un.h>
++#define ucred unpcbid
++#define SO_PEERCRED LOCAL_PEEREID
++#define pid unp_pid
++#endif
+ #endif
+ 
+ namespace named_mojo_ipc_server {
+@@ -32,7 +38,7 @@ struct ConnectionInfo {
+   absl::optional<base::win::ScopedHandle> impersonation_token{};
+ #elif BUILDFLAG(IS_MAC)
+   audit_token_t audit_token{};
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   ucred credentials{};
+ #endif
+ };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc
new file mode 100644
index 0000000000..9458fce9ee
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_named__mojo__ipc__server_named__mojo__ipc__server__client__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc
+@@ -23,7 +23,7 @@ namespace named_mojo_ipc_server {
+ // static
+ mojo::PlatformChannelEndpoint ConnectToServer(
+     const mojo::NamedPlatformChannel::ServerName& server_name) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return mojo::NamedPlatformChannel::ConnectToServer(server_name);
+ #elif BUILDFLAG(IS_MAC)
+   mojo::PlatformChannelEndpoint endpoint =
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js
new file mode 100644
index 0000000000..f5b8cb9ccb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/neterror/resources/neterror.js.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/neterror/resources/neterror.js
+@@ -142,7 +142,7 @@ function detailsButtonClick() {
+ 
+ let primaryControlOnLeft = true;
+ // clang-format off
+-// <if expr="is_macosx or is_ios or is_linux or is_chromeos or is_android">
++// <if expr="is_macosx or is_ios or is_posix or is_chromeos or is_android">
+ // clang-format on
+ primaryControlOnLeft = false;
+ // </if>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_optimization__guide_core_optimization__guide__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_optimization__guide_core_optimization__guide__util.cc
new file mode 100644
index 0000000000..67f2b1f6fc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_optimization__guide_core_optimization__guide__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/optimization_guide/core/optimization_guide_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/optimization_guide/core/optimization_guide_util.cc
+@@ -37,7 +37,7 @@ optimization_guide::proto::Platform GetP
+   return optimization_guide::proto::PLATFORM_CHROMEOS;
+ #elif BUILDFLAG(IS_ANDROID)
+   return optimization_guide::proto::PLATFORM_ANDROID;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return optimization_guide::proto::PLATFORM_LINUX;
+ #else
+   return optimization_guide::proto::PLATFORM_UNDEFINED;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_os__crypt_sync_libsecret__util__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_os__crypt_sync_libsecret__util__linux.cc
new file mode 100644
index 0000000000..fe152cac6b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_os__crypt_sync_libsecret__util__linux.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/os_crypt/sync/libsecret_util_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/os_crypt/sync/libsecret_util_linux.cc
+@@ -99,16 +99,22 @@ bool LibsecretLoader::EnsureLibsecretLoa
+ 
+ // static
+ bool LibsecretLoader::LoadLibsecret() {
++#if BUILDFLAG(IS_BSD)
++  const char* kSecretLib = "libsecret-1.so";
++#else
++  const char* kSecretLib = "libsecret-1.so.0";
++#endif
++
+   if (libsecret_loaded_)
+     return true;
+ 
+-  static void* handle = dlopen("libsecret-1.so.0", RTLD_NOW | RTLD_GLOBAL);
++  static void* handle = dlopen(kSecretLib, RTLD_NOW | RTLD_GLOBAL);
+   if (!handle) {
+     // We wanted to use libsecret, but we couldn't load it. Warn, because
+     // either the user asked for this, or we autodetected it incorrectly. (Or
+     // the system has broken libraries, which is also good to warn about.)
+     // TODO(crbug.com/607435): Channel this message to the user-facing log
+-    VLOG(1) << "Could not load libsecret-1.so.0: " << dlerror();
++    VLOG(1) << "Could not load " << kSecretLib << ": " << dlerror();
+     return false;
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_os__crypt_sync_os__crypt.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_os__crypt_sync_os__crypt.h
new file mode 100644
index 0000000000..a916f95133
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_os__crypt_sync_os__crypt.h
@@ -0,0 +1,78 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/os_crypt/sync/os_crypt.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/os_crypt/sync/os_crypt.h
+@@ -14,7 +14,7 @@
+ #include "build/build_config.h"
+ #include "build/chromecast_buildflags.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class KeyStorageLinux;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -23,7 +23,7 @@ class PrefRegistrySimple;
+ class PrefService;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+ namespace crypto {
+ class SymmetricKey;
+ }
+@@ -36,7 +36,7 @@ struct Config;
+ // Temporary interface due to OSCrypt refactor. See OSCryptImpl for descriptions
+ // of what each function does.
+ namespace OSCrypt {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(OS_CRYPT)
+ void SetConfig(std::unique_ptr<os_crypt::Config> config);
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -81,7 +81,7 @@ COMPONENT_EXPORT(OS_CRYPT) void UseMockK
+ COMPONENT_EXPORT(OS_CRYPT) void SetLegacyEncryptionForTesting(bool legacy);
+ COMPONENT_EXPORT(OS_CRYPT) void ResetStateForTesting();
+ #endif  // BUILDFLAG(IS_WIN)
+-#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(OS_CRYPT)
+ void UseMockKeyStorageForTesting(
+     base::OnceCallback<std::unique_ptr<KeyStorageLinux>()>
+@@ -108,7 +108,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCrypt
+   // Returns singleton instance of OSCryptImpl.
+   static OSCryptImpl* GetInstance();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Set the configuration of OSCryptImpl.
+   // This method, or SetRawEncryptionKey(), must be called before using
+   // EncryptString() and DecryptString().
+@@ -200,7 +200,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCrypt
+   void ResetStateForTesting();
+ #endif
+ 
+-#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)
+   // For unit testing purposes, inject methods to be used.
+   // |storage_provider_factory| provides the desired |KeyStorage|
+   // implementation. If the provider returns |nullptr|, a hardcoded password
+@@ -225,13 +225,13 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCrypt
+   crypto::SymmetricKey* GetEncryptionKey();
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   // This lock is used to make the GetEncryptionKey and
+   // GetRawEncryptionKey methods thread-safe.
+   static base::Lock& GetLock();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Create the KeyStorage. Will be null if no service is found. A Config must
+   // be set before every call to this method.
+   std::unique_ptr<KeyStorageLinux> CreateKeyStorage();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client.cc
new file mode 100644
index 0000000000..c4e4b1c8de
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/paint_preview/browser/paint_preview_client.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/paint_preview/browser/paint_preview_client.cc
+@@ -326,8 +326,8 @@ void PaintPreviewClient::CapturePaintPre
+   metadata->set_version(kPaintPreviewVersion);
+   auto* chromeVersion = metadata->mutable_chrome_version();
+   const auto& current_chrome_version = version_info::GetVersion();
+-  chromeVersion->set_major(current_chrome_version.components()[0]);
+-  chromeVersion->set_minor(current_chrome_version.components()[1]);
++  chromeVersion->set_gmajor(current_chrome_version.components()[0]);
++  chromeVersion->set_gminor(current_chrome_version.components()[1]);
+   chromeVersion->set_build(current_chrome_version.components()[2]);
+   chromeVersion->set_patch(current_chrome_version.components()[3]);
+   document_data.callback = std::move(callback);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client__unittest.cc
new file mode 100644
index 0000000000..5066d1e6ad
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_browser_paint__preview__client__unittest.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/paint_preview/browser/paint_preview_client_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/paint_preview/browser/paint_preview_client_unittest.cc
+@@ -174,8 +174,8 @@ TEST_P(PaintPreviewClientRenderViewHostT
+   metadata->set_version(kPaintPreviewVersion);
+   auto* chromeVersion = metadata->mutable_chrome_version();
+   const auto& current_chrome_version = version_info::GetVersion();
+-  chromeVersion->set_major(current_chrome_version.components()[0]);
+-  chromeVersion->set_minor(current_chrome_version.components()[1]);
++  chromeVersion->set_gmajor(current_chrome_version.components()[0]);
++  chromeVersion->set_gminor(current_chrome_version.components()[1]);
+   chromeVersion->set_build(current_chrome_version.components()[2]);
+   chromeVersion->set_patch(current_chrome_version.components()[3]);
+   PaintPreviewFrameProto* main_frame = expected_proto.mutable_root_frame();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_common_proto_paint__preview.proto b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_common_proto_paint__preview.proto
new file mode 100644
index 0000000000..f81215db30
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_common_proto_paint__preview.proto
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/paint_preview/common/proto/paint_preview.proto.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/paint_preview/common/proto/paint_preview.proto
+@@ -82,8 +82,8 @@ message PaintPreviewFrameProto {
+ // Stores Chrome version.
+ // NEXT_TAG = 5
+ message ChromeVersionProto {
+-  optional uint64 major = 1;
+-  optional uint64 minor = 2;
++  optional uint64 gmajor = 1;
++  optional uint64 gminor = 2;
+   optional uint64 build = 3;
+   optional uint64 patch = 4;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_player_player__compositor__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_player_player__compositor__delegate.cc
new file mode 100644
index 0000000000..fee2656099
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_paint__preview_player_player__compositor__delegate.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/paint_preview/player/player_compositor_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/paint_preview/player/player_compositor_delegate.cc
+@@ -434,8 +434,8 @@ void PlayerCompositorDelegate::ValidateP
+   auto chrome_version = capture_result_->proto.metadata().chrome_version();
+   const auto& current_chrome_version = version_info::GetVersion();
+   if (capture_result_->proto.metadata().has_chrome_version() &&
+-      chrome_version.major() == current_chrome_version.components()[0] &&
+-      chrome_version.minor() == current_chrome_version.components()[1] &&
++      chrome_version.gmajor() == current_chrome_version.components()[0] &&
++      chrome_version.gminor() == current_chrome_version.components()[1] &&
+       chrome_version.build() == current_chrome_version.components()[2] &&
+       chrome_version.patch() == current_chrome_version.components()[3]) {
+     paint_preview_service_->GetFileMixin()->GetAXTreeUpdate(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.cc
new file mode 100644
index 0000000000..24761b7f0b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/password_manager/core/browser/features/password_features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/password_manager/core/browser/features/password_features.cc
+@@ -24,7 +24,7 @@ BASE_FEATURE(kButterOnDesktopFollowup,
+ 
+ BASE_FEATURE(kClearUndecryptablePasswordsOnSync,
+              "ClearUndecryptablePasswordsInSync",
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
+@@ -104,7 +104,7 @@ BASE_FEATURE(kPasswordManagerLogToTermin
+              "PasswordManagerLogToTerminal",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kRestartToGainAccessToKeychain,
+              "RestartToGainAccessToKeychain",
+              base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.h
new file mode 100644
index 0000000000..96e47a9ed8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_features_password__features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/password_manager/core/browser/features/password_features.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/password_manager/core/browser/features/password_features.h
+@@ -94,7 +94,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerEna
+ // terminal.
+ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal);
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enables "Needs access to keychain, restart chrome" bubble and banner.
+ BASE_DECLARE_FEATURE(kRestartToGainAccessToKeychain);
+ #endif  // BUILDFLAG(IS_MAC)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__form__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__form__manager.cc
new file mode 100644
index 0000000000..0857055497
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__form__manager.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/password_manager/core/browser/password_form_manager.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/password_manager/core/browser/password_form_manager.cc
+@@ -58,7 +58,7 @@
+ #include "components/webauthn/android/webauthn_cred_man_delegate.h"
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "components/os_crypt/sync/os_crypt.h"
+ #endif
+ 
+@@ -229,7 +229,7 @@ bool ShouldUploadCrowdsourcingVotes(cons
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool ShouldShowKeychainErrorBubble(
+     absl::optional<PasswordStoreBackendError> backend_error) {
+   if (!backend_error.has_value()) {
+@@ -794,7 +794,7 @@ void PasswordFormManager::OnFetchComplet
+         error.value().type);
+   }
+ 
+-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (ShouldShowKeychainErrorBubble(
+           form_fetcher_->GetProfileStoreBackendError())) {
+     client_->NotifyKeychainError();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__manager.cc
new file mode 100644
index 0000000000..d555d94701
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/password_manager/core/browser/password_manager.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/password_manager/core/browser/password_manager.cc
+@@ -363,7 +363,7 @@ void PasswordManager::RegisterProfilePre
+   registry->RegisterListPref(prefs::kPasswordManagerPromoCardsList);
+ #endif  // BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
+   registry->RegisterBooleanPref(prefs::kPasswordSharingEnabled, true);
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   registry->RegisterIntegerPref(prefs::kRelaunchChromeBubbleDismissedCounter,
+                                 0);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__async__helper.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__async__helper.cc
new file mode 100644
index 0000000000..163b54db1d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__async__helper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/password_manager/core/browser/password_store/login_database_async_helper.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/password_manager/core/browser/password_store/login_database_async_helper.cc
+@@ -154,7 +154,7 @@ LoginsResultOrError LoginDatabaseAsyncHe
+     std::vector<PasswordForm> matched_forms;
+     if (!login_db_ ||
+         !login_db_->GetLogins(form, include_psl, &matched_forms)) {
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       return PasswordStoreBackendError(
+           OSCrypt::IsEncryptionAvailable()
+               ? PasswordStoreBackendErrorType::kUncategorized
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__unittest.cc
new file mode 100644
index 0000000000..771b8f421d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_browser_password__store_login__database__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/password_manager/core/browser/password_store/login_database_unittest.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/password_manager/core/browser/password_store/login_database_unittest.cc
+@@ -2106,7 +2106,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCur
+                          LoginDatabaseMigrationTestBroken,
+                          testing::Values(1, 2, 3, 24));
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+ class LoginDatabaseUndecryptableLoginsTest : public testing::Test {
+  protected:
+   LoginDatabaseUndecryptableLoginsTest() = default;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__pref__names.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__pref__names.h
new file mode 100644
index 0000000000..d5df5cab16
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_password__manager_core_common_password__manager__pref__names.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/password_manager/core/common/password_manager_pref_names.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/password_manager/core/common/password_manager_pref_names.h
+@@ -324,7 +324,7 @@ inline constexpr char kPasswordManagerPr
+ inline constexpr char kPasswordSharingEnabled[] =
+     "password_manager.password_sharing_enabled";
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Integer pref indicating how many times relaunch Chrome bubble was dismissed.
+ inline constexpr char kRelaunchChromeBubbleDismissedCounter[] =
+     "password_manager.relaunch_chrome_bubble_dismissed_counter";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_performance__manager_public_features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_performance__manager_public_features.h
new file mode 100644
index 0000000000..0881432135
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_performance__manager_public_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/performance_manager/public/features.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/performance_manager/public/features.h
+@@ -21,7 +21,7 @@ BASE_DECLARE_FEATURE(kRunOnMainThreadSyn
+ 
+ #if !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() false
+ #else
+ #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() true
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_permissions_prediction__service_prediction__common.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_permissions_prediction__service_prediction__common.cc
new file mode 100644
index 0000000000..285e8af209
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_permissions_prediction__service_prediction__common.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/permissions/prediction_service/prediction_common.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/permissions/prediction_service/prediction_common.cc
+@@ -33,7 +33,7 @@ int BucketizeValue(int count) {
+ 
+ ClientFeatures_Platform GetCurrentPlatformProto() {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return permissions::ClientFeatures_Platform_PLATFORM_DESKTOP;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
+   return permissions::ClientFeatures_Platform_PLATFORM_MOBILE;
+@@ -44,7 +44,7 @@ ClientFeatures_Platform GetCurrentPlatfo
+ 
+ ClientFeatures_PlatformEnum GetCurrentPlatformEnumProto() {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return permissions::ClientFeatures_PlatformEnum_PLATFORM_DESKTOP_V2;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
+   return permissions::ClientFeatures_PlatformEnum_PLATFORM_MOBILE_V2;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_browser_policy__pref__mapping__test.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_browser_policy__pref__mapping__test.cc
new file mode 100644
index 0000000000..7d0bfb24a2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_browser_policy__pref__mapping__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/policy/core/browser/policy_pref_mapping_test.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/policy/core/browser/policy_pref_mapping_test.cc
+@@ -411,7 +411,7 @@ class PolicyTestCase {
+     const std::string os("chromeos_lacros");
+ #elif BUILDFLAG(IS_IOS)
+     const std::string os("ios");
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     const std::string os("linux");
+ #elif BUILDFLAG(IS_MAC)
+     const std::string os("mac");
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__client.cc
new file mode 100644
index 0000000000..acf522a7fd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/policy/core/common/cloud/cloud_policy_client.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/policy/core/common/cloud/cloud_policy_client.cc
+@@ -720,7 +720,7 @@ void CloudPolicyClient::FetchPolicy(Poli
+         fetch_request->set_invalidation_payload(invalidation_payload_);
+       }
+     }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // Only set browser device identifier for CBCM Chrome cloud policy on
+     // desktop.
+     if (type_to_fetch.first ==
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__util.cc
new file mode 100644
index 0000000000..5ab26e0cb1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_cloud_cloud__policy__util.cc
@@ -0,0 +1,61 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/policy/core/common/cloud/cloud_policy_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/policy/core/common/cloud/cloud_policy_util.cc
+@@ -20,7 +20,7 @@
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \
+-    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #include <pwd.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -35,10 +35,15 @@
+ #import <SystemConfiguration/SCDynamicStoreCopySpecific.h>
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ #include <limits.h>  // For HOST_NAME_MAX
+ #endif
+ 
++#if BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
++#include <sys/param.h>
++#define HOST_NAME_MAX MAXHOSTNAMELEN
++#endif
++
+ #include <algorithm>
+ #include <utility>
+ 
+@@ -88,7 +93,7 @@ namespace em = enterprise_management;
+ 
+ std::string GetMachineName() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   char hostname[HOST_NAME_MAX];
+   if (gethostname(hostname, HOST_NAME_MAX) == 0)  // Success.
+     return hostname;
+@@ -145,7 +150,7 @@ std::string GetMachineName() {
+ 
+ std::string GetOSVersion() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return base::SysInfo::OperatingSystemVersion();
+ #elif BUILDFLAG(IS_WIN)
+   base::win::OSInfo::VersionNumber version_number =
+@@ -168,7 +173,7 @@ std::string GetOSArchitecture() {
+ }
+ 
+ std::string GetOSUsername() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   struct passwd* creds = getpwuid(getuid());
+   if (!creds || !creds->pw_name)
+     return std::string();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__loader__common.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__loader__common.cc
new file mode 100644
index 0000000000..e8b88870b9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__loader__common.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/policy/core/common/policy_loader_common.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/policy/core/common/policy_loader_common.cc
+@@ -46,7 +46,7 @@ const char* kSensitivePolicies[] = {
+     key::kDefaultSearchProviderEnabled,
+     key::kSafeBrowsingEnabled,
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     key::kAutoOpenFileTypes,
+     key::kHomepageIsNewTabPage,
+     key::kPasswordProtectionChangePasswordURL,
+@@ -56,7 +56,7 @@ const char* kSensitivePolicies[] = {
+     key::kSafeBrowsingAllowlistDomains,
+     key::kSiteSearchSettings,
+ #endif
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     key::kCommandLineFlagSecurityWarningsEnabled,
+ #endif
+ #if !BUILDFLAG(IS_IOS)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__paths.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__paths.cc
new file mode 100644
index 0000000000..c39a5c2e89
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__paths.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/policy/core/common/policy_paths.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/policy/core/common/policy_paths.cc
+@@ -17,6 +17,10 @@ namespace policy {
+ const char kPolicyPath[] = "/etc/opt/chrome/policies";
+ #elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING)
+ const char kPolicyPath[] = "/etc/opt/chrome_for_testing/policies";
++#elif BUILDFLAG(IS_FREEBSD)
++const char kPolicyPath[] = "/usr/local/etc/chromium/policies";
++#elif BUILDFLAG(IS_NETBSD)
++const char kPolicyPath[] = "@PKG_SYSCONFBASE@/chromium/policies";
+ #else
+ const char kPolicyPath[] = "/etc/chromium/policies";
+ #endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__utils.cc
new file mode 100644
index 0000000000..5663780dea
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_core_common_policy__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/policy/core/common/policy_utils.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/policy/core/common/policy_utils.cc
+@@ -28,7 +28,7 @@ bool IsPolicyTestingEnabled(PrefService*
+     return true;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (channel == version_info::Channel::DEV) {
+     return true;
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_tools_generate__policy__source.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_tools_generate__policy__source.py
new file mode 100644
index 0000000000..56b8ffa7a5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_policy_tools_generate__policy__source.py
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/policy/tools/generate_policy_source.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/policy/tools/generate_policy_source.py
+@@ -38,9 +38,9 @@ PLATFORM_STRINGS = {
+     'ios': ['ios'],
+     'fuchsia': ['fuchsia'],
+     'chrome.win': ['win'],
+-    'chrome.linux': ['linux'],
++    'chrome.linux': ['linux', 'openbsd', 'freebsd', 'netbsd'],
+     'chrome.mac': ['mac'],
+-    'chrome.*': ['win', 'mac', 'linux'],
++    'chrome.*': ['win', 'mac', 'linux', 'openbsd', 'freebsd', 'netbsd'],
+     'chrome.win7': ['win'],
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_power__metrics_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_power__metrics_BUILD.gn
new file mode 100644
index 0000000000..4e15e01cbf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_power__metrics_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/power_metrics/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/power_metrics/BUILD.gn
+@@ -41,7 +41,7 @@ static_library("power_metrics") {
+     ldflags = [ "/DELAYLOAD:setupapi.dll" ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux && !is_bsd) || is_chromeos) {
+     sources += [
+       "energy_metrics_provider_linux.cc",
+       "energy_metrics_provider_linux.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_power__metrics_energy__metrics__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_power__metrics_energy__metrics__provider.cc
new file mode 100644
index 0000000000..0123417371
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_power__metrics_energy__metrics__provider.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/power_metrics/energy_metrics_provider.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/power_metrics/energy_metrics_provider.cc
+@@ -9,6 +9,8 @@
+ #include "components/power_metrics/energy_metrics_provider_win.h"
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ #include "components/power_metrics/energy_metrics_provider_linux.h"
++#elif BUILDFLAG(IS_BSD)
++#include "base/notreached.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+ namespace power_metrics {
+@@ -22,6 +24,9 @@ std::unique_ptr<EnergyMetricsProvider> E
+   return EnergyMetricsProviderWin::Create();
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+   return EnergyMetricsProviderLinux::Create();
++#elif BUILDFLAG(IS_BSD)
++  NOTIMPLEMENTED();
++  return nullptr;
+ #else
+   return nullptr;
+ #endif  // BUILDFLAG(IS_WIN)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_content_common_file__type__policies__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_content_common_file__type__policies__unittest.cc
new file mode 100644
index 0000000000..9af9d2564b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_content_common_file__type__policies__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/safe_browsing/content/common/file_type_policies_unittest.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/safe_browsing/content/common/file_type_policies_unittest.cc
+@@ -139,7 +139,7 @@ TEST_F(FileTypePoliciesTest, UnpackResou
+   EXPECT_EQ(DownloadFileType::FULL_PING, file_type.ping_setting());
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   EXPECT_EQ(DownloadFileType::ALLOW_ON_USER_GESTURE,
+             file_type.platform_settings(0).danger_level());
+   EXPECT_EQ(DownloadFileType::DISALLOW_AUTO_OPEN,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_content_resources_gen__file__type__proto.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_content_resources_gen__file__type__proto.py
new file mode 100644
index 0000000000..f2407709df
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_content_resources_gen__file__type__proto.py
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/safe_browsing/content/resources/gen_file_type_proto.py.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/safe_browsing/content/resources/gen_file_type_proto.py
+@@ -38,6 +38,9 @@ def PlatformTypes():
+         "fuchsia":
+         download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_FUCHSIA,
+         "linux": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX,
++        "openbsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX,
++        "freebsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX,
++        "netbsd": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_LINUX,
+         "mac": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_MAC,
+         "win": download_file_types_pb2.DownloadFileType.PLATFORM_TYPE_WINDOWS,
+     }
+@@ -181,7 +184,7 @@ class DownloadFileTypeProtoGenerator(Bin
+             '-t',
+             '--type',
+             help='The platform type. One of android, chromeos, ' +
+-            'linux, mac, win')
++            'linux, mac, win, openbsd, freebsd, netbsd')
+ 
+     def AddExtraCommandLineArgsForVirtualEnvRun(self, opts, command):
+         if opts.type is not None:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc
new file mode 100644
index 0000000000..983435d410
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc
+@@ -119,7 +119,7 @@ std::ostream& operator<<(std::ostream& o
+ PlatformType GetCurrentPlatformType() {
+ #if BUILDFLAG(IS_WIN)
+   return WINDOWS_PLATFORM;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return LINUX_PLATFORM;
+ #elif BUILDFLAG(IS_IOS)
+   return IOS_PLATFORM;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc
new file mode 100644
index 0000000000..a910026c04
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc
+@@ -109,7 +109,7 @@ RTLookupRequest::OSType GetRTLookupReque
+   return RTLookupRequest::OS_TYPE_FUCHSIA;
+ #elif BUILDFLAG(IS_IOS)
+   return RTLookupRequest::OS_TYPE_IOS;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return RTLookupRequest::OS_TYPE_LINUX;
+ #elif BUILDFLAG(IS_MAC)
+   return RTLookupRequest::OS_TYPE_MAC;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_common_features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_common_features.cc
new file mode 100644
index 0000000000..7f5d236d49
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_safe__browsing_core_common_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/safe_browsing/core/common/features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/safe_browsing/core/common/features.cc
+@@ -201,7 +201,7 @@ BASE_FEATURE(kSafeBrowsingSkipSubresourc
+ BASE_FEATURE(kSafeBrowsingSkipSubresources2,
+              "SafeBrowsingSkipSubResources2",
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS_LACROS)
++    BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_search__engines_search__engine__choice_search__engine__choice__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_search__engines_search__engine__choice_search__engine__choice__service.cc
new file mode 100644
index 0000000000..ce458582b3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_search__engines_search__engine__choice_search__engine__choice__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/search_engines/search_engine_choice/search_engine_choice_service.cc
+@@ -613,7 +613,7 @@ void SearchEngineChoiceService::Register
+ 
+ int SearchEngineChoiceService::GetCountryIdInternal() {
+   // `country_codes::kCountryIDAtInstall` may not be set yet.
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Android, ChromeOS and Linux, `country_codes::kCountryIDAtInstall` is
+   // computed asynchronously using platform-specific signals, and may not be
+   // available yet.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_search__engines_template__url__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_search__engines_template__url__service.cc
new file mode 100644
index 0000000000..dffdc13a9a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_search__engines_template__url__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/search_engines/template_url_service.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/search_engines/template_url_service.cc
+@@ -2915,7 +2915,7 @@ bool TemplateURLService::MatchesDefaultS
+ std::unique_ptr<EnterpriseSiteSearchManager>
+ TemplateURLService::GetEnterpriseSiteSearchManager(PrefService* prefs) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS_ASH)
++    BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(omnibox::kSiteSearchSettingsPolicy)
+              ? std::make_unique<EnterpriseSiteSearchManager>(
+                    prefs, base::BindRepeating(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_security__interstitials_content_utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_security__interstitials_content_utils.cc
new file mode 100644
index 0000000000..7cd522ec10
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_security__interstitials_content_utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/security_interstitials/content/utils.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/security_interstitials/content/utils.cc
+@@ -38,7 +38,7 @@ void LaunchDateAndTimeSettings() {
+ #if BUILDFLAG(IS_ANDROID)
+   JNIEnv* env = base::android::AttachCurrentThread();
+   Java_DateAndTimeSettingsHelper_openDateAndTimeSettings(env);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   struct ClockCommand {
+     const char* const pathname;
+     const char* const argument;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc
new file mode 100644
index 0000000000..79f9de8662
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_segmentation__platform_embedder_default__model_cross__device__user__segment.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/segmentation_platform/embedder/default_model/cross_device_user_segment.cc
+@@ -148,7 +148,7 @@ void CrossDeviceUserSegment::ExecuteMode
+ // Check for current device type and subtract it from the device count
+ // calculation.
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   desktop_count -= 1;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
+   if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc
new file mode 100644
index 0000000000..3dc5aa90f7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_services_paint__preview__compositor_paint__preview__compositor__collection__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/services/paint_preview_compositor/paint_preview_compositor_collection_impl.cc
+@@ -22,7 +22,7 @@
+ 
+ #if BUILDFLAG(IS_WIN)
+ #include "content/public/child/dwrite_font_proxy_init_win.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/services/font/public/cpp/font_loader.h"
+ #endif
+ 
+@@ -79,7 +79,7 @@ PaintPreviewCompositorCollectionImpl::Pa
+     // Initialize font access for Skia.
+ #if BUILDFLAG(IS_WIN)
+   content::InitializeDWriteFontProxy();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojo::PendingRemote<font_service::mojom::FontService> font_service;
+   content::UtilityThread::Get()->BindHostReceiver(
+       font_service.InitWithNewPipeAndPassReceiver());
+@@ -102,7 +102,7 @@ PaintPreviewCompositorCollectionImpl::Pa
+                              base::BindOnce([] { skia::DefaultFontMgr(); }));
+ 
+   // Sanity check that fonts are working.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // No WebSandbox is provided on Linux so the local fonts aren't accessible.
+   // This is fine since since the subsetted fonts are provided in the SkPicture.
+   // However, we still need to check that the SkFontMgr starts as it is used by
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn
new file mode 100644
index 0000000000..8ceafbfc2c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/storage_monitor/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/storage_monitor/BUILD.gn
+@@ -75,7 +75,7 @@ static_library("storage_monitor") {
+       deps += [ "//services/device/public/mojom" ]
+     }
+   } else if (is_linux || is_chromeos_lacros) {
+-    if (use_udev) {
++    if (use_udev && !is_bsd) {
+       sources += [
+         "mtab_watcher_linux.cc",
+         "mtab_watcher_linux.h",
+@@ -180,7 +180,7 @@ source_set("unit_tests") {
+         "storage_monitor_chromeos_unittest.cc",
+       ]
+     }
+-  } else if (is_linux || is_chromeos_lacros) {
++  } else if ((is_linux || is_chromeos_lacros) && !is_bsd) {
+     if (use_udev) {
+       sources += [ "storage_monitor_linux_unittest.cc" ]
+     }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc
new file mode 100644
index 0000000000..c7fe59bebd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/storage_monitor/removable_device_constants.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ 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 BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kVendorModelVolumeStoragePrefix[] = "VendorModelVolumeStorage:";
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h
new file mode 100644
index 0000000000..5a80433a15
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_storage__monitor_removable__device__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/storage_monitor/removable_device_constants.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/storage_monitor/removable_device_constants.h
+@@ -14,7 +14,7 @@ namespace storage_monitor {
+ extern const char kFSUniqueIdPrefix[];
+ extern const char kVendorModelSerialPrefix[];
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ extern const char kVendorModelVolumeStoragePrefix[];
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_browser_supervised__user__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_browser_supervised__user__service.cc
new file mode 100644
index 0000000000..839d496977
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_browser_supervised__user__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/supervised_user/core/browser/supervised_user_service.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/supervised_user/core/browser/supervised_user_service.cc
+@@ -164,7 +164,7 @@ FirstTimeInterstitialBannerState Supervi
+     const FirstTimeInterstitialBannerState original_state) {
+   FirstTimeInterstitialBannerState target_state = original_state;
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+   if (supervised_user::CanDisplayFirstTimeInterstitialBanner()) {
+     if (original_state != FirstTimeInterstitialBannerState::kSetupComplete &&
+         can_show_first_time_interstitial_banner_) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_common_features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_common_features.cc
new file mode 100644
index 0000000000..ed5b0e3e8d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_common_features.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/supervised_user/core/common/features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/supervised_user/core/common/features.cc
+@@ -64,7 +64,7 @@ bool IsLocalWebApprovalsEnabled() {
+ // particular aspects. If one or more of these sub-feature flags are enabled,
+ // then child account detection logic is implicitly enabled.
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kFilterWebsitesForSupervisedUsersOnDesktopAndIOS,
+              "FilterWebsitesForSupervisedUsersOnDesktopAndIOS",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -74,7 +74,7 @@ BASE_FEATURE(kFilterWebsitesForSupervise
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kSupervisedPrefsControlledBySupervisedStore,
+              "SupervisedPrefsControlledBySupervisedStore",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -86,7 +86,7 @@ BASE_FEATURE(kSupervisedPrefsControlledB
+ 
+ // Whether to display a "Managed by your parent" or similar text for supervised
+ // users in various UI surfaces.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEnableManagedByParentUi,
+              "EnableManagedByParentUi",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -96,7 +96,7 @@ BASE_FEATURE(kEnableManagedByParentUi,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop,
+              "EnableExtensionsPermissionsForSupervisedUsersOnDesktop",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -115,7 +115,7 @@ bool CanDisplayFirstTimeInterstitialBann
+ 
+ // When enabled non-syncing signed in supervised users will not be signed out of
+ // their google account when cookies are cleared
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kClearingCookiesKeepsSupervisedUsersSignedIn,
+              "ClearingCookiesKeepsSupervisedUsersSignedIn",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -162,7 +162,7 @@ bool IsChildAccountSupervisionEnabled() 
+   return base::FeatureList::IsEnabled(
+              supervised_user::
+                  kFilterWebsitesForSupervisedUsersOnDesktopAndIOS) ||
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+          base::FeatureList::IsEnabled(
+              supervised_user::
+                  kEnableExtensionsPermissionsForSupervisedUsersOnDesktop) ||
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_common_features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_common_features.h
new file mode 100644
index 0000000000..3a6b54ebe0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_supervised__user_core_common_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/supervised_user/core/common/features.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/supervised_user/core/common/features.h
+@@ -24,7 +24,7 @@ BASE_DECLARE_FEATURE(kEnableManagedByPar
+ extern const base::FeatureParam<std::string> kManagedByParentUiMoreInfoUrl;
+ BASE_DECLARE_FEATURE(kClearingCookiesKeepsSupervisedUsersSignedIn);
+ 
+-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ BASE_DECLARE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop);
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util.cc
new file mode 100644
index 0000000000..906ae78306
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/sync_device_info/local_device_info_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/sync_device_info/local_device_info_util.cc
+@@ -85,7 +85,7 @@ void OnMachineStatisticsLoaded(LocalDevi
+ sync_pb::SyncEnums::DeviceType GetLocalDeviceType() {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return sync_pb::SyncEnums_DeviceType_TYPE_CROS;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return sync_pb::SyncEnums_DeviceType_TYPE_LINUX;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
+   switch (ui::GetDeviceFormFactor()) {
+@@ -110,7 +110,7 @@ DeviceInfo::OsType GetLocalDeviceOSType(
+   return DeviceInfo::OsType::kChromeOsAsh;
+ #elif BUILDFLAG(IS_CHROMEOS_LACROS)
+   return DeviceInfo::OsType::kChromeOsLacros;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return DeviceInfo::OsType::kLinux;
+ #elif BUILDFLAG(IS_ANDROID)
+   return DeviceInfo::OsType::kAndroid;
+@@ -129,7 +129,7 @@ DeviceInfo::OsType GetLocalDeviceOSType(
+ 
+ DeviceInfo::FormFactor GetLocalDeviceFormFactor() {
+ #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return DeviceInfo::FormFactor::kDesktop;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
+   return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util__linux.cc
new file mode 100644
index 0000000000..6000b8157b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_sync__device__info_local__device__info__util__linux.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/sync_device_info/local_device_info_util_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/sync_device_info/local_device_info_util_linux.cc
+@@ -9,6 +9,11 @@
+ 
+ #include "base/linux_util.h"
+ 
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++#include <sys/param.h>
++#define HOST_NAME_MAX MAXHOSTNAMELEN
++#endif
++
+ namespace syncer {
+ 
+ std::string GetPersonalizableDeviceNameInternal() {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_system__cpu_cpu__probe.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_system__cpu_cpu__probe.cc
new file mode 100644
index 0000000000..367e3ad9c7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_system__cpu_cpu__probe.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/system_cpu/cpu_probe.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/system_cpu/cpu_probe.cc
+@@ -30,6 +30,9 @@ std::unique_ptr<CpuProbe> CpuProbe::Crea
+   return CpuProbeWin::Create();
+ #elif BUILDFLAG(IS_MAC)
+   return CpuProbeMac::Create();
++#elif BUILDFLAG(IS_BSD)
++  NOTIMPLEMENTED();
++  return nullptr;
+ #else
+   return nullptr;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc
new file mode 100644
index 0000000000..77ede53e76
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/update_client/update_query_params.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/update_client/update_query_params.cc
+@@ -40,6 +40,10 @@ const char kOs[] =
+     "fuchsia";
+ #elif BUILDFLAG(IS_OPENBSD)
+     "openbsd";
++#elif defined(OS_FREEBSD)
++    "freebsd";
++#elif defined(OS_NETBSD)
++    "netbsd";
+ #else
+ #error "unknown os"
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc
new file mode 100644
index 0000000000..b86a4f9ad5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_url__formatter_spoof__checks_idn__spoof__checker.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
+@@ -294,7 +294,7 @@ IDNSpoofChecker::IDNSpoofChecker() {
+   // The ideal fix would be to change the omnibox font used for Thai. In
+   // that case, the Linux-only list should be revisited and potentially
+   // removed.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+        "[ทนบพรหเแ๐ดลปฟม]",
+ #else
+        "[บพเแ๐]",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_user__education_views_help__bubble__view.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_user__education_views_help__bubble__view.cc
new file mode 100644
index 0000000000..adc139ebd2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_user__education_views_help__bubble__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/user_education/views/help_bubble_view.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/user_education/views/help_bubble_view.cc
+@@ -1009,7 +1009,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect(
+ void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params,
+                                               views::Widget* widget) const {
+   BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Help bubbles anchored to menus may be clipped to their anchors' bounds,
+   // resulting in visual errors, unless they use accelerated rendering. See
+   // crbug.com/1445770 for details.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_variations_service_variations__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_variations_service_variations__service.cc
new file mode 100644
index 0000000000..7a59402192
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_variations_service_variations__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/variations/service/variations_service.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/variations/service/variations_service.cc
+@@ -102,7 +102,7 @@ std::string GetPlatformString() {
+   return "android";
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return "fuchsia";
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_BSD)
+   // Default BSD and SOLARIS to Linux to not break those builds, although these
+   // platforms are not officially supported by Chrome.
+   return "linux";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_host_host__display__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_host_host__display__client.cc
new file mode 100644
index 0000000000..71e3353d37
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_host_host__display__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/viz/host/host_display_client.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/viz/host/host_display_client.cc
+@@ -65,7 +65,7 @@ void HostDisplayClient::AddChildWindowTo
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+ void HostDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) {
+   NOTIMPLEMENTED();
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_host_host__display__client.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_host_host__display__client.h
new file mode 100644
index 0000000000..5f3fa091ce
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_host_host__display__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/viz/host/host_display_client.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/viz/host/host_display_client.h
+@@ -52,7 +52,7 @@ class VIZ_HOST_EXPORT HostDisplayClient 
+   void AddChildWindowToBrowser(gpu::SurfaceHandle child_window) override;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   void DidCompleteSwapWithNewSize(const gfx::Size& size) override;
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc
new file mode 100644
index 0000000000..a157e7290c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_skia__output__surface__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/viz/service/display_embedder/skia_output_surface_impl.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/viz/service/display_embedder/skia_output_surface_impl.cc
+@@ -1549,7 +1549,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::G
+             ->GetDeviceQueue()
+             ->GetVulkanPhysicalDevice(),
+         VK_IMAGE_TILING_OPTIMAL, vk_format, yuv_color_space, ycbcr_info);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // Textures that were allocated _on linux_ with ycbcr info came from
+     // VaapiVideoDecoder, which exports using DRM format modifiers.
+     return GrBackendFormats::MakeVk(gr_ycbcr_info,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.cc
new file mode 100644
index 0000000000..b7aedf8fd1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/viz/service/display_embedder/software_output_surface.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/viz/service/display_embedder/software_output_surface.cc
+@@ -124,7 +124,7 @@ void SoftwareOutputSurface::SwapBuffersC
+       now.SnappedToNextTick(refresh_timebase_, refresh_interval_) - now;
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   if (needs_swap_size_notifications_)
+     client_->DidSwapWithSize(pixel_size);
+ #endif
+@@ -153,7 +153,7 @@ gfx::OverlayTransform SoftwareOutputSurf
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ void SoftwareOutputSurface::SetNeedsSwapSizeNotifications(
+     bool needs_swap_size_notifications) {
+   needs_swap_size_notifications_ = needs_swap_size_notifications;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.h
new file mode 100644
index 0000000000..e15eab5d8a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display__embedder_software__output__surface.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/viz/service/display_embedder/software_output_surface.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/viz/service/display_embedder/software_output_surface.h
+@@ -47,7 +47,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputS
+   gfx::OverlayTransform GetDisplayTransform() override;
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   void SetNeedsSwapSizeNotifications(
+       bool needs_swap_size_notifications) override;
+ #endif
+@@ -70,7 +70,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputS
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   bool needs_swap_size_notifications_ = false;
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc
new file mode 100644
index 0000000000..43b0bac3f0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_display_skia__renderer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/viz/service/display/skia_renderer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/components/viz/service/display/skia_renderer.cc
+@@ -1364,7 +1364,7 @@ void SkiaRenderer::ClearFramebuffer() {
+   if (current_frame()->current_render_pass->has_transparent_background) {
+     ClearCanvas(SkColors::kTransparent);
+   } else {
+-#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX)
++#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+     // On DEBUG builds, opaque render passes are cleared to blue
+     // to easily see regions that were not drawn on the screen.
+     // ClearCavas() call causes slight pixel difference, so linux-ref and
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc
new file mode 100644
index 0000000000..7bf6ec1144
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+@@ -109,7 +109,7 @@ RootCompositorFrameSinkImpl::Create(
+   output_surface->SetNeedsSwapSizeNotifications(
+       params->send_swap_size_notifications);
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   // For X11, we need notify client about swap completion after resizing, so the
+   // client can use it for synchronize with X11 WM.
+   output_surface->SetNeedsSwapSizeNotifications(true);
+@@ -713,7 +713,7 @@ void RootCompositorFrameSinkImpl::Displa
+ #if BUILDFLAG(IS_ANDROID)
+   if (display_client_ && enable_swap_competion_callback_)
+     display_client_->DidCompleteSwapWithSize(pixel_size);
+-#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   if (display_client_ && pixel_size != last_swap_pixel_size_) {
+     last_swap_pixel_size_ = pixel_size;
+     display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h
new file mode 100644
index 0000000000..7e616f0c70
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h
+@@ -210,7 +210,7 @@ class VIZ_SERVICE_EXPORT RootCompositorF
+   // to actually unref.
+   LocalSurfaceId to_evict_on_next_draw_and_swap_ = LocalSurfaceId();
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   gfx::Size last_swap_pixel_size_;
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_BUILD.gn
new file mode 100644
index 0000000000..b3e83cac89
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_BUILD.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/app/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/app/BUILD.gn
+@@ -96,9 +96,9 @@ source_set("content_main_runner_app") {
+       "//chromeos/startup:constants",
+     ]
+   }
+-  if (build_tflite_with_xnnpack) {
+-    deps += [ "//third_party/cpuinfo" ]
+-  }
++#  if (build_tflite_with_xnnpack) {
++#    deps += [ "//third_party/cpuinfo" ]
++#  }
+ }
+ 
+ source_set("app") {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_content__main.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_content__main.cc
new file mode 100644
index 0000000000..436af08b55
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_content__main.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/app/content_main.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/app/content_main.cc
+@@ -64,7 +64,7 @@
+ #include "content/common/shared_file_util.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/files/scoped_file.h"
+ #endif
+ 
+@@ -209,7 +209,7 @@ RunContentProcess(ContentMainParams para
+     base::EnableTerminationOnOutOfMemory();
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_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
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc
new file mode 100644
index 0000000000..b66c88694c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc
@@ -0,0 +1,144 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/app/content_main_runner_impl.cc.orig	2025-01-24 10:49:20.000000000 +0000
++++ src/3rdparty/chromium/content/app/content_main_runner_impl.cc
+@@ -143,13 +143,13 @@
+ #include "content/browser/posix_file_descriptor_info_impl.h"
+ #include "content/public/common/content_descriptors.h"
+ 
+-#if !BUILDFLAG(IS_MAC)
++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+ #include "content/public/common/zygote/zygote_fork_delegate_linux.h"
+ #endif
+ 
+ #endif  // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/file_path_watcher_inotify.h"
+ #include "base/native_library.h"
+ #include "base/rand_util.h"
+@@ -190,6 +190,10 @@
+ #endif
+ #endif // BUILDFLAG(USE_ZYGOTE_HANDLE)
+ 
++#if BUILDFLAG(IS_BSD)
++#include "base/system/sys_info.h"
++#endif
++
+ #if BUILDFLAG(IS_ANDROID)
+ #include "base/system/sys_info.h"
+ #include "content/browser/android/battery_metrics.h"
+@@ -379,7 +383,7 @@ void InitializeZygoteSandboxForBrowserPr
+ }
+ #endif  // BUILDFLAG(USE_ZYGOTE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ #if BUILDFLAG(ENABLE_PPAPI)
+ // Loads the (native) libraries but does not initialize them (i.e., does not
+@@ -417,7 +421,10 @@ void PreloadLibraryCdms() {
+ 
+ void PreSandboxInit() {
+   // Ensure the /dev/urandom is opened.
++  // we use arc4random
++#if !BUILDFLAG(IS_BSD)
+   base::GetUrandomFD();
++#endif
+ 
+   // May use sysinfo(), sched_getaffinity(), and open various /sys/ and /proc/
+   // files.
+@@ -429,9 +436,16 @@ void PreSandboxInit() {
+   // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md
+   CRYPTO_pre_sandbox_init();
+ 
++#if BUILDFLAG(IS_BSD)
++  // "cache" the amount of physical memory before pledge(2)
++  base::SysInfo::AmountOfPhysicalMemoryMB();
++#endif
++
++#if !BUILDFLAG(IS_BSD)
+   // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be
+   // allowed by the sandbox.
+   base::GetMaxNumberOfInotifyWatches();
++#endif
+ 
+ #if BUILDFLAG(ENABLE_PPAPI)
+   // Ensure access to the Pepper plugins before the sandbox is turned on.
+@@ -441,7 +455,7 @@ void PreSandboxInit() {
+   // Ensure access to the library CDMs before the sandbox is turned on.
+   PreloadLibraryCdms();
+ #endif
+-#if BUILDFLAG(ENABLE_WEBRTC)
++#if BUILDFLAG(ENABLE_WEBRTC) && !BUILDFLAG(IS_BSD)
+   InitializeWebRtcModule();
+ #endif
+ 
+@@ -748,7 +762,7 @@ RunOtherNamedProcessTypeMain(const std::
+     unregister_thread_closure = base::HangWatcher::RegisterThread(
+         base::HangWatcher::ThreadType::kMainThread);
+     bool start_hang_watcher_now;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // On Linux/ChromeOS, the HangWatcher can't start until after the sandbox is
+     // initialized, because the sandbox can't be started with multiple threads.
+     // TODO(mpdenton): start the HangWatcher after the sandbox is initialized.
+@@ -842,11 +856,10 @@ int ContentMainRunnerImpl::Initialize(Co
+              kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor);
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+   g_fds->Set(kCrashDumpSignal,
+              kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor);
+-#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+-        // BUILDFLAG(IS_OPENBSD)
++#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+ #endif  // !BUILDFLAG(IS_WIN)
+ 
+@@ -1041,6 +1054,18 @@ int ContentMainRunnerImpl::Initialize(Co
+       process_type == switches::kZygoteProcess) {
+     PreSandboxInit();
+   }
++#elif BUILDFLAG(IS_BSD)
++  PreSandboxInit();
++#endif
++
++#if BUILDFLAG(IS_BSD)
++  if (process_type.empty()) {
++    sandbox::policy::SandboxLinux::Options sandbox_options;
++    sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox(
++        sandbox::policy::SandboxTypeFromCommandLine(
++            *base::CommandLine::ForCurrentProcess()),
++        sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options);
++  }
+ #endif
+ 
+   delegate_->SandboxInitialized(process_type);
+@@ -1110,7 +1135,7 @@ int NO_STACK_PROTECTOR ContentMainRunner
+           ->ReconfigureAfterFeatureListInit(process_type);
+     }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // If dynamic Mojo Core is being used, ensure that it's loaded very early in
+     // the child/zygote process, before any sandbox is initialized. The library
+     // is not fully initialized with IPC support until a ChildProcess is later
+@@ -1146,6 +1171,11 @@ int NO_STACK_PROTECTOR ContentMainRunner
+ 
+   RegisterMainThreadFactories();
+ 
++#if BUILDFLAG(IS_BSD)
++  if (!process_type.empty())
++    PreSandboxInit();
++#endif 
++
+   if (process_type.empty())
+     return RunBrowser(std::move(main_params), start_minimal_browser);
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_BUILD.gn
new file mode 100644
index 0000000000..16c2461053
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/BUILD.gn
+@@ -2463,6 +2463,13 @@ jumbo_source_set("browser") {
+     deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "sandbox_ipc_linux.cc",
++      "sandbox_ipc_linux.h",
++    ]
++  }
++
+   if (is_chromeos) {
+     sources += [
+       "handwriting/handwriting_recognition_service_impl_cros.cc",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_audio_audio__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_audio_audio__service.cc
new file mode 100644
index 0000000000..85ecf96675
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_audio_audio__service.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/audio/audio_service.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/audio/audio_service.cc
+@@ -32,7 +32,7 @@
+ #if BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS)
+ #include "ui/display/util/edid_parser.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/display/display_util.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -200,7 +200,7 @@ audio::mojom::AudioService& GetAudioServ
+         ->PostTaskAndReplyWithResult(
+             FROM_HERE, base::BindOnce(&ScanEdidBitstreams),
+             base::BindOnce(&LaunchAudioService, std::move(receiver)));
+-#elif BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) && BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+     LaunchAudioService(
+         std::move(receiver),
+         ConvertEdidBitstreams(display::DisplayUtil::GetAudioFormats()));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc
new file mode 100644
index 0000000000..1d8ee82399
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/browser_child_process_host_impl.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/browser_child_process_host_impl.cc
+@@ -335,6 +335,7 @@ void BrowserChildProcessHostImpl::Launch
+       switches::kTraceToConsole,
+       switches::kV,
+       switches::kVModule,
++      switches::kDisableUnveil,
+   };
+   cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches);
+ 
+@@ -635,7 +636,7 @@ void BrowserChildProcessHostImpl::OnProc
+           ->child_process());
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   child_thread_type_switcher_.SetPid(process.Pid());
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.h
new file mode 100644
index 0000000000..efe8d3c65b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/browser_child_process_host_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/browser_child_process_host_impl.h
+@@ -35,7 +35,7 @@
+ #include "base/win/object_watcher.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/browser/child_thread_type_switcher_linux.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -269,7 +269,7 @@ class BrowserChildProcessHostImpl
+   std::unique_ptr<tracing::SystemTracingService> system_tracing_service_;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   ChildThreadTypeSwitcher child_thread_type_switcher_;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl__receiver__bindings.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl__receiver__bindings.cc
new file mode 100644
index 0000000000..1a05ebd781
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__child__process__host__impl__receiver__bindings.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/browser_child_process_host_impl_receiver_bindings.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/browser_child_process_host_impl_receiver_bindings.cc
+@@ -62,7 +62,7 @@ void BrowserChildProcessHostImpl::BindHo
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (auto r = receiver.As<mojom::ThreadTypeSwitcher>()) {
+     child_thread_type_switcher_.Bind(std::move(r));
+     return;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc
new file mode 100644
index 0000000000..0f4ec341cf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/browser_main_loop.cc
+@@ -254,6 +254,12 @@
+ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "content/browser/sandbox_host_linux.h"
++#include "content/public/common/zygote/sandbox_support_linux.h"
++#include "sandbox/policy/sandbox.h"
++#endif
++
+ // One of the linux specific headers defines this as a macro.
+ #ifdef DestroyAll
+ #undef DestroyAll
+@@ -559,6 +565,12 @@ int BrowserMainLoop::EarlyInitialization
+   // by now since a thread to start the ServiceManager has been created
+   // before the browser main loop starts.
+   DCHECK(SandboxHostLinux::GetInstance()->IsInitialized());
++#elif BUILDFLAG(IS_BSD)
++  base::FileHandleMappingVector additional_remapped_fds;
++  base::LaunchOptions options;
++  SandboxHostLinux::GetInstance()->Init();
++  const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket();
++  options.fds_to_remap.push_back(std::make_pair(sfd, GetSandboxFD()));
+ #endif
+ 
+   // GLib's spawning of new processes is buggy, so it's important that at this
+@@ -599,7 +611,7 @@ int BrowserMainLoop::EarlyInitialization
+           features::kBrowserUseCompositingThreadPriority));
+ 
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // We use quite a few file descriptors for our IPC as well as disk the disk
+   // cache, and the default limit on Apple is low (256), so bump it up.
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper.h
new file mode 100644
index 0000000000..68a091251e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/child_process_launcher_helper.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/child_process_launcher_helper.h
+@@ -269,7 +269,7 @@ class ChildProcessLauncherHelper
+   std::unique_ptr<SandboxedProcessLauncherDelegate> delegate_;
+   base::WeakPtr<ChildProcessLauncher> child_process_launcher_;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The priority of the process. The state is stored to avoid changing the
+   // setting repeatedly.
+   std::optional<base::Process::Priority> priority_;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc
new file mode 100644
index 0000000000..6ad3c46412
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc
@@ -0,0 +1,131 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc
+@@ -21,7 +21,9 @@
+ #include "content/public/common/result_codes.h"
+ #include "content/public/common/sandboxed_process_launcher_delegate.h"
+ #include "content/public/common/zygote/sandbox_support_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "content/public/common/zygote/zygote_handle.h"
++#endif
+ #include "sandbox/policy/linux/sandbox_linux.h"
+ 
+ namespace content {
+@@ -46,14 +48,20 @@ ChildProcessLauncherHelper::GetFilesToMa
+ }
+ 
+ bool ChildProcessLauncherHelper::IsUsingLaunchOptions() {
++#if !BUILDFLAG(IS_BSD)
+   return !GetZygoteForLaunch();
++#else
++  return true;
++#endif
+ }
+ 
+ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
+     PosixFileDescriptorInfo& files_to_register,
+     base::LaunchOptions* options) {
+   if (options) {
++#if !BUILDFLAG(IS_BSD)
+     DCHECK(!GetZygoteForLaunch());
++#endif
+     // Convert FD mapping to FileHandleMappingVector
+     options->fds_to_remap = files_to_register.GetMappingWithIDAdjustment(
+         base::GlobalDescriptors::kBaseDescriptor);
+@@ -65,7 +73,9 @@ bool ChildProcessLauncherHelper::BeforeL
+ 
+     options->environment = delegate_->GetEnvironment();
+   } else {
++#if !BUILDFLAG(IS_BSD)
+     DCHECK(GetZygoteForLaunch());
++#endif
+     // Environment variables could be supported in the future, but are not
+     // currently supported when launching with the zygote.
+     DCHECK(delegate_->GetEnvironment().empty());
+@@ -82,6 +92,7 @@ ChildProcessLauncherHelper::LaunchProces
+     int* launch_result) {
+   *is_synchronous_launch = true;
+   Process process;
++#if !BUILDFLAG(IS_BSD)
+   ZygoteCommunication* zygote_handle = GetZygoteForLaunch();
+   if (zygote_handle) {
+     // TODO(crbug.com/569191): If chrome supported multiple zygotes they could
+@@ -92,7 +103,6 @@ ChildProcessLauncherHelper::LaunchProces
+         GetProcessType());
+     *launch_result = LAUNCH_RESULT_SUCCESS;
+ 
+-#if !BUILDFLAG(IS_OPENBSD)
+     if (handle) {
+       // It could be a renderer process or an utility process.
+       int oom_score = content::kMiscOomScore;
+@@ -101,15 +111,17 @@ ChildProcessLauncherHelper::LaunchProces
+         oom_score = content::kLowestRendererOomScore;
+       ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore(handle, oom_score);
+     }
+-#endif
+ 
+     process.process = base::Process(handle);
+     process.zygote = zygote_handle;
+   } else {
++#endif
+     process.process = base::LaunchProcess(*command_line(), *options);
+     *launch_result = process.process.IsValid() ? LAUNCH_RESULT_SUCCESS
+                                                : LAUNCH_RESULT_FAILURE;
++#if !BUILDFLAG(IS_BSD)
+   }
++#endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS)
+   if (GetProcessType() == switches::kRendererProcess) {
+@@ -131,10 +143,14 @@ ChildProcessTerminationInfo ChildProcess
+     const ChildProcessLauncherHelper::Process& process,
+     bool known_dead) {
+   ChildProcessTerminationInfo info;
++#if !BUILDFLAG(IS_BSD)
+   if (process.zygote) {
+     info.status = process.zygote->GetTerminationStatus(
+         process.process.Handle(), known_dead, &info.exit_code);
+   } else if (known_dead) {
++#else
++  if (known_dead) {
++#endif
+     info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(),
+                                                       &info.exit_code);
+   } else {
+@@ -160,13 +176,17 @@ void ChildProcessLauncherHelper::ForceNo
+   DCHECK(CurrentlyOnProcessLauncherTaskRunner());
+   process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
+   // On POSIX, we must additionally reap the child.
++#if !BUILDFLAG(IS_BSD)
+   if (process.zygote) {
+     // If the renderer was created via a zygote, we have to proxy the reaping
+     // through the zygote process.
+     process.zygote->EnsureProcessTerminated(process.process.Handle());
+   } else {
++#endif
+     base::EnsureProcessTerminated(std::move(process.process));
++#if !BUILDFLAG(IS_BSD)
+   }
++#endif
+ }
+ 
+ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread(
+@@ -179,11 +199,13 @@ void ChildProcessLauncherHelper::SetProc
+   }
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() {
+   return base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote)
+              ? nullptr
+              : delegate_->GetZygote();
+ }
++#endif
+ 
+ base::File OpenFileToShare(const base::FilePath& path,
+                            base::MemoryMappedFile::Region* region) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__thread__type__switcher__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__thread__type__switcher__linux.cc
new file mode 100644
index 0000000000..496c3a469d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_child__thread__type__switcher__linux.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/child_thread_type_switcher_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/child_thread_type_switcher_linux.cc
+@@ -20,6 +20,9 @@ void SetThreadTypeOnLauncherThread(base:
+                                    base::ThreadType thread_type) {
+   DCHECK(CurrentlyOnProcessLauncherTaskRunner());
+ 
++#if BUILDFLAG(IS_BSD)
++  NOTIMPLEMENTED();
++#else
+   bool ns_pid_supported = false;
+   pid_t peer_tid = base::FindThreadID(peer_pid, ns_tid, &ns_pid_supported);
+   if (peer_tid == -1) {
+@@ -39,6 +42,7 @@ void SetThreadTypeOnLauncherThread(base:
+ 
+   base::PlatformThread::SetThreadType(peer_pid, peer_tid, thread_type,
+                                       base::IsViaIPC(true));
++#endif
+ }
+ 
+ }  // namespace
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc
new file mode 100644
index 0000000000..1fc34a223d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_compositor_viz__process__transport__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc
+@@ -110,7 +110,7 @@ class HostDisplayClient : public viz::Ho
+   HostDisplayClient& operator=(const HostDisplayClient&) = delete;
+ 
+   // viz::HostDisplayClient:
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   void DidCompleteSwapWithNewSize(const gfx::Size& size) override {
+     compositor_->OnCompleteSwapWithNewSize(size);
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.cc
new file mode 100644
index 0000000000..69b126aed0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/devtools/devtools_frontend_host_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/devtools/devtools_frontend_host_impl.cc
+@@ -27,7 +27,7 @@
+ #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
+ #include "ui/base/webui/resource_path.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/crash/content/browser/error_reporting/javascript_error_report.h"  // nogncheck
+ #include "components/crash/content/browser/error_reporting/js_error_report_processor.h"  // nogncheck
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -42,7 +42,7 @@ const char kCompatibilityScriptSourceURL
+     "\n//# "
+     "sourceURL=devtools://devtools/bundled/devtools_compatibility.js";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Remove the pieces of the URL we don't want to send back with the error
+ // reports. In particular, do not send query or fragments as those can have
+ // privacy-sensitive information in them.
+@@ -112,7 +112,7 @@ DevToolsFrontendHostImpl::DevToolsFronte
+     const HandleMessageCallback& handle_message_callback)
+     : web_contents_(WebContents::FromRenderFrameHost(frame_host)),
+       handle_message_callback_(handle_message_callback) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   Observe(web_contents_);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+   mojo::AssociatedRemote<blink::mojom::DevToolsFrontend> frontend;
+@@ -137,7 +137,7 @@ void DevToolsFrontendHostImpl::DispatchE
+   handle_message_callback_.Run(std::move(message));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void DevToolsFrontendHostImpl::OnDidAddMessageToConsole(
+     RenderFrameHost* source_frame,
+     blink::mojom::ConsoleMessageLevel log_level,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.h
new file mode 100644
index 0000000000..d7b0bc4f7f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_devtools__frontend__host__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/devtools/devtools_frontend_host_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/devtools/devtools_frontend_host_impl.h
+@@ -34,7 +34,7 @@ class DevToolsFrontendHostImpl : public 
+ 
+   void BadMessageReceived() override;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   void OnDidAddMessageToConsole(
+       RenderFrameHost* source_frame,
+       blink::mojom::ConsoleMessageLevel log_level,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc
new file mode 100644
index 0000000000..cc4273bac5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_devtools_protocol_system__info__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/devtools/protocol/system_info_handler.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/devtools/protocol/system_info_handler.cc
+@@ -51,7 +51,7 @@ std::unique_ptr<SystemInfo::Size> GfxSiz
+ // 1046598, and 1153667.
+ // Windows builds need more time -- see Issue 873112 and 1004472.
+ // Mac builds need more time - see Issue angleproject:6182.
+-#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !defined(NDEBUG)) || \
++#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && !defined(NDEBUG)) || \
+     BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_OZONE)
+ static constexpr int kGPUInfoWatchdogTimeoutMultiplierOS = 3;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_file__system__access_file__system__access__local__path__watcher.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_file__system__access_file__system__access__local__path__watcher.cc
new file mode 100644
index 0000000000..5173aceb5e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_file__system__access_file__system__access__local__path__watcher.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/file_system_access/file_system_access_local_path_watcher.cc
+@@ -63,7 +63,7 @@ void FileSystemAccessLocalPathWatcher::I
+   base::FilePathWatcher::WatchOptions watch_options {
+     .type = scope().IsRecursive() ? base::FilePathWatcher::Type::kRecursive
+                                   : base::FilePathWatcher::Type::kNonRecursive,
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // Note: `report_modified_path` is also present on Android
+     // and Fuchsia. Update this switch if support for watching
+     // the local file system is added on those platforms.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_font__access_font__enumeration__data__source.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_font__access_font__enumeration__data__source.cc
new file mode 100644
index 0000000000..da4af1ee8e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_font__access_font__enumeration__data__source.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/font_access/font_enumeration_data_source.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/font_access/font_enumeration_data_source.cc
+@@ -16,7 +16,7 @@
+ #include "content/browser/font_access/font_enumeration_data_source_win.h"
+ #elif BUILDFLAG(IS_APPLE)
+ #include "content/browser/font_access/font_enumeration_data_source_mac.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/browser/font_access/font_enumeration_data_source_linux.h"
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+@@ -61,7 +61,7 @@ std::unique_ptr<FontEnumerationDataSourc
+   return std::make_unique<FontEnumerationDataSourceWin>();
+ #elif BUILDFLAG(IS_APPLE)
+   return std::make_unique<FontEnumerationDataSourceMac>();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return std::make_unique<FontEnumerationDataSourceLinux>();
+ #else
+   return std::make_unique<FontEnumerationDataSourceNull>();
+@@ -76,7 +76,7 @@ bool FontEnumerationDataSource::IsOsSupp
+   return true;
+ #elif BUILDFLAG(IS_APPLE)
+   return true;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_compositor__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_compositor__util.cc
new file mode 100644
index 0000000000..02597a5855
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_compositor__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/gpu/compositor_util.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/gpu/compositor_util.cc
+@@ -149,7 +149,7 @@ const GpuFeatureData GetGpuFeatureData(
+       {"video_decode",
+        SafeGetFeatureStatus(gpu_feature_info,
+                             gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+        !base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) ||
+ #endif  // BUILDFLAG(IS_LINUX)
+            command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
+@@ -160,7 +160,7 @@ const GpuFeatureData GetGpuFeatureData(
+       {"video_encode",
+        SafeGetFeatureStatus(gpu_feature_info,
+                             gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE),
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+        !base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux),
+ #else
+        command_line.HasSwitch(switches::kDisableAcceleratedVideoEncode),
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.cc
new file mode 100644
index 0000000000..2c6a6529a9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl.cc
+@@ -402,7 +402,7 @@ void GpuDataManagerImpl::OnDisplayMetric
+   private_->OnDisplayMetricsChanged(display, changed_metrics);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool GpuDataManagerImpl::IsGpuMemoryBufferNV12Supported() {
+   base::AutoLock auto_lock(lock_);
+   return private_->IsGpuMemoryBufferNV12Supported();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.h
new file mode 100644
index 0000000000..91f066210d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl.h
+@@ -220,7 +220,7 @@ class CONTENT_EXPORT GpuDataManagerImpl 
+   void OnDisplayMetricsChanged(const display::Display& display,
+                                uint32_t changed_metrics) override;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool IsGpuMemoryBufferNV12Supported();
+   void SetGpuMemoryBufferNV12Supported(bool supported);
+ #endif  // BUILDFLAG(IS_LINUX)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc
new file mode 100644
index 0000000000..139356dba6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc
+@@ -1672,7 +1672,7 @@ void GpuDataManagerImplPrivate::RecordCo
+   UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() {
+   return is_gpu_memory_buffer_NV12_supported_;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h
new file mode 100644
index 0000000000..5ad26c135a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.h
+@@ -147,7 +147,7 @@ class CONTENT_EXPORT GpuDataManagerImplP
+   void OnDisplayMetricsChanged(const display::Display& display,
+                                uint32_t changed_metrics);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool IsGpuMemoryBufferNV12Supported();
+   void SetGpuMemoryBufferNV12Supported(bool supported);
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -311,7 +311,7 @@ class CONTENT_EXPORT GpuDataManagerImplP
+   bool application_is_visible_ = true;
+ 
+   bool disable_gpu_compositing_ = false;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool is_gpu_memory_buffer_NV12_supported_ = false;
+ #endif  // BUILDFLAG(IS_LINUX)
+ };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__memory__buffer__manager__singleton.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__memory__buffer__manager__singleton.cc
new file mode 100644
index 0000000000..4fe63e1238
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__memory__buffer__manager__singleton.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/gpu/gpu_memory_buffer_manager_singleton.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/gpu/gpu_memory_buffer_manager_singleton.cc
+@@ -54,7 +54,7 @@ scoped_refptr<base::SingleThreadTaskRunn
+ #endif
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool IsGpuMemoryBufferNV12Supported() {
+   static bool is_computed = false;
+   static bool supported = false;
+@@ -117,7 +117,7 @@ void GpuMemoryBufferManagerSingleton::On
+     SetNativeConfigurations(std::move(configs));
+   }
+ #endif  // BUILDFLAG(IS_OZONE_X11)
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Dynamic check whether the NV12 format is supported as it may be
+   // inconsistent between the system GBM (Generic Buffer Management) and
+   // chromium miniGBM.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc
new file mode 100644
index 0000000000..c94d588ed7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc
+@@ -264,6 +264,7 @@ static const char* const kSwitchNames[] 
+     switches::kEnableLowEndDeviceMode,
+     switches::kDisableSkiaGraphite,
+     switches::kDisableLowEndDeviceMode,
++    switches::kDisableUnveil,
+     switches::kProfilingAtStart,
+     switches::kProfilingFile,
+     switches::kProfilingFlush,
+@@ -292,7 +293,7 @@ static const char* const kSwitchNames[] 
+     switches::kDisableExplicitDmaFences,
+     switches::kOzoneDumpFile,
+ #endif
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     switches::kX11Display,
+     switches::kNoXshm,
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_media_frameless__media__interface__proxy.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_media_frameless__media__interface__proxy.h
new file mode 100644
index 0000000000..63af8e3d4f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_media_frameless__media__interface__proxy.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/media/frameless_media_interface_proxy.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/media/frameless_media_interface_proxy.h
+@@ -19,7 +19,7 @@
+ #include "mojo/public/cpp/bindings/receiver_set.h"
+ #include "mojo/public/cpp/bindings/remote.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "media/mojo/mojom/stable/stable_video_decoder.mojom.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -105,7 +105,7 @@ class FramelessMediaInterfaceProxy final
+   // Connections to the renderer.
+   mojo::ReceiverSet<media::mojom::InterfaceFactory> receivers_;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Connection to the StableVideoDecoderFactory that lives in a utility
+   // process. This is only used for out-of-process video decoding and only when
+   // the FramelessMediaInterfaceProxy is created without a RenderProcessHost
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc
new file mode 100644
index 0000000000..1b111a2510
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_media_media__keys__listener__manager__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/media/media_keys_listener_manager_impl.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/media/media_keys_listener_manager_impl.cc
+@@ -299,7 +299,7 @@ void MediaKeysListenerManagerImpl::Start
+     return;
+   }
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) || \
+     BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+   // Create SystemMediaControls with the SingletonHwnd.
+   browser_system_media_controls_ =
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc
new file mode 100644
index 0000000000..9b053d4d99
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_network__service__instance__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/network_service_instance_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/network_service_instance_impl.cc
+@@ -85,7 +85,7 @@
+ #include "content/browser/network/network_service_process_tracker_win.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/browser/system_dns_resolution/system_dns_resolver.h"
+ #include "services/network/public/mojom/system_dns_resolution.mojom-forward.h"
+ #endif
+@@ -368,7 +368,7 @@ void CreateInProcessNetworkService(
+                                 std::move(receiver)));
+ }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Runs a self-owned SystemDnsResolverMojoImpl. This is meant to run on a
+ // high-priority thread pool.
+ void RunSystemDnsResolverOnThreadPool(
+@@ -437,7 +437,7 @@ network::mojom::NetworkServiceParamsPtr 
+   }
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (GetContentClient()
+           ->browser()
+           ->ShouldRunOutOfProcessSystemDnsResolution() &&
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc
new file mode 100644
index 0000000000..6340b48e61
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host__receiver__bindings.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/ppapi_plugin_process_host_receiver_bindings.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/ppapi_plugin_process_host_receiver_bindings.cc
+@@ -8,7 +8,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/services/font/public/mojom/font_service.mojom.h"  // nogncheck
+ #include "content/browser/font_service.h"  // nogncheck
+ #endif
+@@ -17,7 +17,7 @@ namespace content {
+ 
+ void PpapiPluginProcessHost::BindHostReceiver(
+     mojo::GenericPendingReceiver receiver) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (auto font_receiver = receiver.As<font_service::mojom::FontService>())
+     ConnectToFontService(std::move(font_receiver));
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc
new file mode 100644
index 0000000000..0abbfa564c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_delegated__frame__host.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/renderer_host/delegated_frame_host.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/renderer_host/delegated_frame_host.cc
+@@ -318,7 +318,7 @@ void DelegatedFrameHost::EmbedSurface(
+ 
+   if (!primary_surface_id ||
+       primary_surface_id->local_surface_id() != local_surface_id_) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+     // On Windows and Linux, we would like to produce new content as soon as
+     // possible or the OS will create an additional black gutter. Until we can
+     // block resize on surface synchronization on these platforms, we will not
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_media_service__video__capture__device__launcher.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_media_service__video__capture__device__launcher.cc
new file mode 100644
index 0000000000..fdb9d17179
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_media_service__video__capture__device__launcher.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/renderer_host/media/service_video_capture_device_launcher.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/renderer_host/media/service_video_capture_device_launcher.cc
+@@ -25,7 +25,7 @@
+ #include "media/base/media_switches.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "content/browser/gpu/gpu_data_manager_impl.h"
+ #endif
+ 
+@@ -173,7 +173,7 @@ void ServiceVideoCaptureDeviceLauncher::
+   }
+ #else
+   if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // On Linux, additionally check whether the NV12 GPU memory buffer is
+     // supported.
+     if (GpuDataManagerImpl::GetInstance()->IsGpuMemoryBufferNV12Supported())
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc
new file mode 100644
index 0000000000..1f4b5e08f4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__file__io__host.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/renderer_host/pepper/pepper_file_io_host.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/renderer_host/pepper/pepper_file_io_host.cc
+@@ -462,7 +462,7 @@ void PepperFileIOHost::OnLocalFileOpened
+     ppapi::host::ReplyMessageContext reply_context,
+     const base::FilePath& path,
+     base::File::Error error_code) {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Quarantining a file before its contents are available is only supported on
+   // Windows and Linux.
+   if (!FileOpenForWrite(open_flags_) || error_code != base::File::FILE_OK) {
+@@ -496,7 +496,7 @@ void PepperFileIOHost::OnLocalFileOpened
+ #endif
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void PepperFileIOHost::OnLocalFileQuarantined(
+     ppapi::host::ReplyMessageContext reply_context,
+     const base::FilePath& path,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h
new file mode 100644
index 0000000000..9bc2238949
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h
+@@ -548,7 +548,7 @@ class CONTENT_EXPORT RenderProcessHostIm
+   // Sets this RenderProcessHost to be guest only. For Testing only.
+   void SetForGuestsOnlyForTesting();
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+   // Launch the zygote early in the browser startup.
+   static void EarlyZygoteLaunch();
+ #endif  // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC)
+@@ -1092,7 +1092,7 @@ class CONTENT_EXPORT RenderProcessHostIm
+   // if the request isn't handled on the IO thread.
+   void OnBindHostReceiver(mojo::GenericPendingReceiver receiver);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Provides /proc/{renderer pid}/status and statm files for the renderer,
+   // because the files are required to calculate the renderer's private
+   // footprint on Chromium Linux. Regarding MacOS X and Windows, we have
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc
new file mode 100644
index 0000000000..aff1104f08
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc
+@@ -274,7 +274,7 @@ void RenderViewHostImpl::GetPlatformSpec
+       display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL);
+   prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips =
+       display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL);
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+   if (command_line->HasSwitch(switches::kSystemFontFamily)) {
+     prefs->system_font_family_name =
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc
new file mode 100644
index 0000000000..fba952539a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc
+@@ -120,7 +120,7 @@
+ #include "ui/gfx/gdi_util.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "content/browser/accessibility/browser_accessibility_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/text_input_flags.h"
+@@ -458,7 +458,7 @@ gfx::NativeViewAccessible RenderWidgetHo
+     return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot())
+         ->GetCOM();
+ 
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   BrowserAccessibilityManager* manager =
+       host()->GetOrCreateRootBrowserAccessibilityManager();
+   if (manager && manager->GetBrowserAccessibilityRoot())
+@@ -1696,7 +1696,7 @@ bool RenderWidgetHostViewAura::ShouldDoL
+   return GetTextInputManager() && GetTextInputManager()->should_do_learning();
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool RenderWidgetHostViewAura::SetCompositionFromExistingText(
+     const gfx::Range& range,
+     const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) {
+@@ -2540,7 +2540,7 @@ bool RenderWidgetHostViewAura::NeedsInpu
+ }
+ 
+ bool RenderWidgetHostViewAura::NeedsMouseCapture() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   return NeedsInputGrab();
+ #else
+   return false;
+@@ -2723,7 +2723,7 @@ void RenderWidgetHostViewAura::ForwardKe
+   if (!target_host)
+     return;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* linux_ui = ui::LinuxUi::instance();
+   std::vector<ui::TextEditCommandAuraLinux> commands;
+   if (!event.skip_if_unhandled && linux_ui && event.os_event &&
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h
new file mode 100644
index 0000000000..c7d5204d72
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.h
+@@ -267,7 +267,7 @@ class CONTENT_EXPORT RenderWidgetHostVie
+   ukm::SourceId GetClientSourceForMetrics() const override;
+   bool ShouldDoLearning() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc
new file mode 100644
index 0000000000..438f491bf2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc
+@@ -599,7 +599,7 @@ bool RenderWidgetHostViewEventHandler::C
+   if (event->type() == ui::ET_MOUSE_EXITED) {
+     if (mouse_locked || selection_popup)
+       return false;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // Don't forward the mouse leave message which is received when the context
+     // menu is displayed by the page. This confuses the page and causes state
+     // changes.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc
new file mode 100644
index 0000000000..245dea45bd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_sandbox__host__linux.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/sandbox_host_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/sandbox_host_linux.cc
+@@ -45,6 +45,7 @@ void SandboxHostLinux::Init() {
+   // Instead, it replies on a temporary socket provided by the caller.
+   PCHECK(0 == shutdown(browser_socket, SHUT_WR)) << "shutdown";
+ 
++#if !BUILDFLAG(IS_BSD) 
+   int pipefds[2];
+   CHECK(0 == pipe(pipefds));
+   const int child_lifeline_fd = pipefds[0];
+@@ -55,6 +56,7 @@ void SandboxHostLinux::Init() {
+   ipc_thread_ = std::make_unique<base::DelegateSimpleThread>(
+       ipc_handler_.get(), "sandbox_ipc_thread");
+   ipc_thread_->Start();
++#endif
+ }
+ 
+ }  // namespace content
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc
new file mode 100644
index 0000000000..75ed0f9955
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_jank__monitor__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/jank_monitor_impl.cc
+@@ -340,7 +340,7 @@ void JankMonitorImpl::ThreadExecutionSta
+     // in context menus, among others). Simply ignore the mismatches for now.
+     // See https://crbug.com/929813 for the details of why the mismatch
+     // happens.
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \
+     BUILDFLAG(IS_OZONE)
+     task_execution_metadata_.clear();
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc
new file mode 100644
index 0000000000..fa73620b4f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.cc
+@@ -15,7 +15,7 @@
+ 
+ #include "ui/events/platform/platform_event_source.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/aura/env.h"
+ #include "ui/events/event.h"
+ #endif
+@@ -39,7 +39,7 @@ NativeEventObserver::~NativeEventObserve
+   DeregisterObserver();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void NativeEventObserver::RegisterObserver() {
+   aura::Env::GetInstance()->AddWindowEventDispatcherObserver(this);
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h
new file mode 100644
index 0000000000..fd940f2fdf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_scheduler_responsiveness_native__event__observer.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/scheduler/responsiveness/native_event_observer.h
+@@ -16,7 +16,7 @@
+ #include "content/public/browser/native_event_processor_observer_mac.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/aura/window_event_dispatcher_observer.h"
+ #endif
+ 
+@@ -41,7 +41,7 @@ namespace responsiveness {
+ class CONTENT_EXPORT NativeEventObserver
+ #if BUILDFLAG(IS_MAC)
+     : public NativeEventProcessorObserver
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     : public aura::WindowEventDispatcherObserver
+ #elif BUILDFLAG(IS_WIN)
+     : public base::MessagePumpForUI::Observer
+@@ -58,7 +58,7 @@ class CONTENT_EXPORT NativeEventObserver
+   NativeEventObserver(WillRunEventCallback will_run_event_callback,
+                       DidRunEventCallback did_run_event_callback);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+   NativeEventObserver(const NativeEventObserver&) = delete;
+   NativeEventObserver& operator=(const NativeEventObserver&) = delete;
+@@ -74,7 +74,7 @@ class CONTENT_EXPORT NativeEventObserver
+   // Exposed for tests.
+   void WillRunNativeEvent(const void* opaque_identifier) override;
+   void DidRunNativeEvent(const void* opaque_identifier) override;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // aura::WindowEventDispatcherObserver overrides:
+   void OnWindowEventDispatcherStartedProcessing(
+       aura::WindowEventDispatcher* dispatcher,
+@@ -91,7 +91,7 @@ class CONTENT_EXPORT NativeEventObserver
+   void RegisterObserver();
+   void DeregisterObserver();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   struct EventInfo {
+     raw_ptr<const void> unique_id;
+   };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc
new file mode 100644
index 0000000000..bad885ee22
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host.cc
@@ -0,0 +1,78 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/utility_process_host.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/utility_process_host.cc
+@@ -61,7 +61,7 @@
+ #include "content/browser/v8_snapshot_files.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/file_util.h"
+ #include "base/files/scoped_file.h"
+ #include "base/pickle.h"
+@@ -75,7 +75,7 @@
+ #include "services/network/public/mojom/network_service.mojom.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #include "base/task/sequenced_task_runner.h"
+ #include "components/viz/host/gpu_client.h"
+ #include "media/capture/capture_switches.h"
+@@ -86,7 +86,7 @@ namespace content {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ base::ScopedFD PassNetworkContextParentDirs(
+     std::vector<base::FilePath> network_context_parent_dirs) {
+   base::Pickle pickle;
+@@ -150,7 +150,7 @@ UtilityProcessHost::UtilityProcessHost(s
+       started_(false),
+       name_(u"utility process"),
+       file_data_(std::make_unique<ChildProcessLauncherFileData>()),
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+       gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)),
+ #endif
+       client_(std::move(client)) {
+@@ -373,7 +373,7 @@ bool UtilityProcessHost::StartProcess() 
+       switches::kMuteAudio,
+       switches::kUseFileForFakeAudioCapture,
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
+-    BUILDFLAG(IS_SOLARIS)
++    BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_NETBSD)
+       switches::kAlsaInputDevice,
+       switches::kAlsaOutputDevice,
+ #endif
+@@ -435,7 +435,7 @@ bool UtilityProcessHost::StartProcess() 
+     file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload());
+ #endif  // BUILDFLAG(IS_POSIX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // The network service should have access to the parent directories
+     // necessary for its usage.
+     if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) {
+@@ -446,13 +446,13 @@ bool UtilityProcessHost::StartProcess() 
+     }
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+     // Pass `kVideoCaptureUseGpuMemoryBuffer` flag to video capture service only
+     // when the video capture use GPU memory buffer enabled.
+     if (metrics_name_ == video_capture::mojom::VideoCaptureService::Name_) {
+       bool pass_gpu_buffer_flag =
+           switches::IsVideoCaptureUseGpuMemoryBufferEnabled();
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       // Check if NV12 GPU memory buffer supported at the same time.
+       pass_gpu_buffer_flag =
+           pass_gpu_buffer_flag &&
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host.h
new file mode 100644
index 0000000000..e8f2fb8aab
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/utility_process_host.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/utility_process_host.h
+@@ -39,7 +39,7 @@ namespace base {
+ class Thread;
+ }  // namespace base
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ namespace viz {
+ class GpuClient;
+ }  // namespace viz
+@@ -225,7 +225,7 @@ class CONTENT_EXPORT UtilityProcessHost
+   std::vector<RunServiceDeprecatedCallback> pending_run_service_callbacks_;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<viz::GpuClient, base::OnTaskRunnerDeleter> gpu_client_;
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc
new file mode 100644
index 0000000000..f6cf059ff7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__process__host__receiver__bindings.cc
@@ -0,0 +1,39 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc
+@@ -10,12 +10,12 @@
+ #include "content/public/browser/content_browser_client.h"
+ #include "content/public/common/content_client.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/services/font/public/mojom/font_service.mojom.h"  // nogncheck
+ #include "content/browser/font_service.h"  // nogncheck
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #include "components/viz/host/gpu_client.h"
+ #include "content/public/browser/gpu_client.h"
+ #endif
+@@ -24,13 +24,13 @@ namespace content {
+ 
+ void UtilityProcessHost::BindHostReceiver(
+     mojo::GenericPendingReceiver receiver) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (auto font_receiver = receiver.As<font_service::mojom::FontService>()) {
+     ConnectToFontService(std::move(font_receiver));
+     return;
+   }
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+   if (auto gpu_receiver = receiver.As<viz::mojom::Gpu>()) {
+     gpu_client_ =
+         content::CreateGpuClient(std::move(gpu_receiver), base::DoNothing());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc
new file mode 100644
index 0000000000..199f34471a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_utility__sandbox__delegate.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/utility_sandbox_delegate.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/utility_sandbox_delegate.cc
+@@ -67,10 +67,10 @@ UtilitySandboxedProcessLauncherDelegate:
+ #if BUILDFLAG(IS_FUCHSIA)
+       sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture ||
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding ||
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding ||
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+@@ -126,10 +126,10 @@ ZygoteCommunication* UtilitySandboxedPro
+   // process upon startup.
+   if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork ||
+       sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceModelExecution ||
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding ||
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding ||
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc
new file mode 100644
index 0000000000..e7d15ba7c6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_v8__snapshot__files.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/v8_snapshot_files.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/v8_snapshot_files.cc
+@@ -13,7 +13,7 @@ namespace content {
+ std::map<std::string, absl::variant<base::FilePath, base::ScopedFD>>
+ GetV8SnapshotFilesToPreload() {
+   std::map<std::string, absl::variant<base::FilePath, base::ScopedFD>> files;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(USE_V8_CONTEXT_SNAPSHOT)
+   files[kV8ContextSnapshotDataDescriptor] = base::FilePath(
+       FILE_PATH_LITERAL(BUILDFLAG(V8_CONTEXT_SNAPSHOT_FILENAME)));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc
new file mode 100644
index 0000000000..e8599a8609
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura.cc
+@@ -174,7 +174,7 @@ class WebDragSourceAura : public content
+   raw_ptr<aura::Window> window_;
+ };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Fill out the OSExchangeData with a file contents, synthesizing a name if
+ // necessary.
+ void PrepareDragForFileContents(const DropData& drop_data,
+@@ -258,7 +258,7 @@ void PrepareDragData(const DropData& dro
+   if (!drop_data.download_metadata.empty())
+     PrepareDragForDownload(drop_data, provider, web_contents);
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // We set the file contents before the URL because the URL also sets file
+   // contents (to a .URL shortcut).  We want to prefer file content data over
+   // a shortcut so we add it first.
+@@ -1326,7 +1326,7 @@ void WebContentsViewAura::OnMouseEvent(u
+     // Linux window managers like to handle raise-on-click themselves.  If we
+     // raise-on-click manually, this may override user settings that prevent
+     // focus-stealing.
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+     // It is possible for the web-contents to be destroyed while it is being
+     // activated. Use a weak-ptr to track whether that happened or not.
+     // More in https://crbug.com/1040725
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura__unittest.cc
new file mode 100644
index 0000000000..17d82039d1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_web__contents_web__contents__view__aura__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/web_contents/web_contents_view_aura_unittest.cc
+@@ -97,7 +97,7 @@ class TestDragDropClient : public aura::
+     drag_drop_data_ = std::move(data);
+     return DragOperation::kCopy;
+   }
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void UpdateDragImage(const gfx::ImageSkia& image,
+                        const gfx::Vector2d& offset) override {}
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc
new file mode 100644
index 0000000000..791ff27b8d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/webui/web_ui_main_frame_observer.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/webui/web_ui_main_frame_observer.cc
+@@ -13,7 +13,7 @@
+ #include "content/public/browser/navigation_handle.h"
+ #include "content/public/browser/web_ui_controller.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/feature_list.h"
+ #include "base/functional/callback_helpers.h"
+ #include "base/logging.h"
+@@ -31,7 +31,7 @@ namespace content {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Remove the pieces of the URL we don't want to send back with the error
+ // reports. In particular, do not send query or fragments as those can have
+ // privacy-sensitive information in them.
+@@ -55,7 +55,7 @@ WebUIMainFrameObserver::WebUIMainFrameOb
+ 
+ WebUIMainFrameObserver::~WebUIMainFrameObserver() = default;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void WebUIMainFrameObserver::OnDidAddMessageToConsole(
+     RenderFrameHost* source_frame,
+     blink::mojom::ConsoleMessageLevel log_level,
+@@ -167,7 +167,7 @@ void WebUIMainFrameObserver::ReadyToComm
+ 
+ // TODO(crbug.com/1129544) This is currently disabled due to Windows DLL
+ // thunking issues. Fix & re-enable.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   MaybeEnableWebUIJavaScriptErrorReporting(navigation_handle);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.h
new file mode 100644
index 0000000000..223110ba72
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_webui_web__ui__main__frame__observer.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/webui/web_ui_main_frame_observer.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/browser/webui/web_ui_main_frame_observer.h
+@@ -44,7 +44,7 @@ class CONTENT_EXPORT WebUIMainFrameObser
+ 
+ // TODO(crbug.com/1129544) This is currently disabled due to Windows DLL
+ // thunking issues. Fix & re-enable.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On official Google builds, capture and report JavaScript error messages on
+   // WebUI surfaces back to Google. This allows us to fix JavaScript errors and
+   // exceptions.
+@@ -60,7 +60,7 @@ class CONTENT_EXPORT WebUIMainFrameObser
+   void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override;
+ 
+  private:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   void MaybeEnableWebUIJavaScriptErrorReporting(
+       NavigationHandle* navigation_handle);
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc
new file mode 100644
index 0000000000..7eb7cab0dc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.cc
@@ -0,0 +1,87 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.cc
+@@ -19,8 +19,10 @@
+ #include "build/chromeos_buildflags.h"
+ #include "content/common/zygote/zygote_commands_linux.h"
+ #include "content/common/zygote/zygote_communication_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "content/common/zygote/zygote_handle_impl_linux.h"
+ #include "content/public/common/zygote/zygote_handle.h"
++#endif
+ #include "sandbox/linux/services/credentials.h"
+ #include "sandbox/linux/services/namespace_sandbox.h"
+ #include "sandbox/linux/suid/client/setuid_sandbox_host.h"
+@@ -38,6 +40,7 @@ namespace content {
+ 
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ // Receive a fixed message on fd and return the sender's PID.
+ // Returns true if the message received matches the expected message.
+ bool ReceiveFixedMessage(int fd,
+@@ -60,6 +63,7 @@ bool ReceiveFixedMessage(int fd,
+     return false;
+   return true;
+ }
++#endif
+ 
+ }  // namespace
+ 
+@@ -69,9 +73,13 @@ ZygoteHost* ZygoteHost::GetInstance() {
+ }
+ 
+ ZygoteHostImpl::ZygoteHostImpl()
++#if !BUILDFLAG(IS_BSD)
+     : use_namespace_sandbox_(false),
+       use_suid_sandbox_(false),
+       use_suid_sandbox_for_adj_oom_score_(false),
++#else
++    :
++#endif
+       sandbox_binary_(),
+       zygote_pids_lock_(),
+       zygote_pids_() {}
+@@ -84,6 +92,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInsta
+ }
+ 
+ void ZygoteHostImpl::Init(const base::CommandLine& command_line) {
++#if !BUILDFLAG(IS_BSD)
+   if (command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) {
+     return;
+   }
+@@ -138,6 +147,7 @@ void ZygoteHostImpl::Init(const base::Co
+            "you can try using --"
+         << sandbox::policy::switches::kNoSandbox << ".";
+   }
++#endif
+ }
+ 
+ void ZygoteHostImpl::AddZygotePid(pid_t pid) {
+@@ -162,6 +172,7 @@ pid_t ZygoteHostImpl::LaunchZygote(
+     base::CommandLine* cmd_line,
+     base::ScopedFD* control_fd,
+     base::FileHandleMappingVector additional_remapped_fds) {
++#if !BUILDFLAG(IS_BSD)
+   int fds[2];
+   CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, fds));
+   CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0]));
+@@ -230,9 +241,12 @@ pid_t ZygoteHostImpl::LaunchZygote(
+ 
+   AddZygotePid(pid);
+   return pid;
++#else
++  return 0;
++#endif
+ }
+ 
+-#if !BUILDFLAG(IS_OPENBSD)
++#if !BUILDFLAG(IS_BSD)
+ void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid,
+                                             int score) {
+   // 1) You can't change the oom_score_adj of a non-dumpable process
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.h
new file mode 100644
index 0000000000..3a3ddca2f0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_zygote__host_zygote__host__impl__linux.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/browser/zygote_host/zygote_host_impl_linux.h
+@@ -47,12 +47,14 @@ class CONTENT_EXPORT ZygoteHostImpl : pu
+                      base::ScopedFD* control_fd,
+                      base::FileHandleMappingVector additional_remapped_fds);
+ 
++#if !BUILDFLAG(IS_BSD)
+   void AdjustRendererOOMScore(base::ProcessHandle process_handle,
+                               int score) override;
+ #if BUILDFLAG(IS_CHROMEOS)
+   void ReinitializeLogging(uint32_t logging_dest,
+                            base::PlatformFile log_file_fd) override;
+ #endif  // BUILDFLAG(IS_CHROMEOS)
++#endif
+ 
+   bool HasZygote() { return !zygote_pids_.empty(); }
+ 
+@@ -67,9 +69,11 @@ class CONTENT_EXPORT ZygoteHostImpl : pu
+ 
+   int renderer_sandbox_status_;
+ 
++#if !BUILDFLAG(IS_BSD)
+   bool use_namespace_sandbox_;
+   bool use_suid_sandbox_;
+   bool use_suid_sandbox_for_adj_oom_score_;
++#endif
+   std::string sandbox_binary_;
+ 
+   // This lock protects the |zygote_pids_| set.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_child_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_child_BUILD.gn
new file mode 100644
index 0000000000..1dc4b01f2b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_child_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/child/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/child/BUILD.gn
+@@ -130,6 +130,13 @@ target(link_target_type, "child") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "sandboxed_process_thread_type_handler.cc",
++      "sandboxed_process_thread_type_handler.h",
++    ]
++  }
++
+   if (is_win) {
+     sources += [
+       "dwrite_font_proxy/dwrite_font_proxy_init_impl_win.cc",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_child_child__process.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_child_child__process.cc
new file mode 100644
index 0000000000..e628e54efc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_child_child__process.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/child/child_process.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/child/child_process.cc
+@@ -66,7 +66,7 @@ ChildProcess::ChildProcess(base::ThreadT
+                                thread_pool_init_params)
+     : resetter_(&child_process, this, nullptr),
+       io_thread_(std::make_unique<ChildIOThread>()) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   const base::CommandLine& command_line =
+       *base::CommandLine::ForCurrentProcess();
+   const bool is_embedded_in_browser_process =
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_BUILD.gn
new file mode 100644
index 0000000000..58e046d18a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_BUILD.gn
@@ -0,0 +1,54 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/common/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/common/BUILD.gn
+@@ -452,19 +452,30 @@ jumbo_source_set("common") {
+   }
+ 
+   if (is_linux || is_chromeos) {
+-    sources += [
+-      "gpu_pre_sandbox_hook_linux.cc",
+-      "gpu_pre_sandbox_hook_linux.h",
+-    ]
++    if (is_bsd) {
++      sources += [
++        "gpu_pre_sandbox_hook_bsd.cc",
++        "gpu_pre_sandbox_hook_bsd.h",
++      ]
++    } else {
++      sources += [
++        "gpu_pre_sandbox_hook_linux.cc",
++        "gpu_pre_sandbox_hook_linux.h",
++      ]
++    }
+     public_deps += [ "//sandbox/policy" ]
+     deps += [
+       ":sandbox_support_linux",
+-      ":set_process_title_linux",
+       "//media/gpu:buildflags",
+       "//sandbox/linux:sandbox_services",
+-      "//sandbox/linux:seccomp_bpf",
+       "//sandbox/policy:chromecast_sandbox_allowlist_buildflags",
+     ]
++    if (!is_bsd) {
++      deps += [ ":set_process_title_linux" ]
++    }
++    if (use_seccomp_bpf) {
++      deps += [ "//sandbox/linux:seccomp_bpf" ]
++    }
+     if (use_v4l2_codec) {
+       deps += [ "//media/gpu/v4l2" ]
+     }
+@@ -538,7 +549,7 @@ component("main_frame_counter") {
+   deps = [ "//base:base" ]
+ }
+ 
+-if (is_linux || is_chromeos) {
++if ((is_linux && !is_bsd) || is_chromeos) {
+   source_set("set_process_title_linux") {
+     public = [ "set_process_title_linux.h" ]
+     sources = [ "set_process_title_linux.cc" ]
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_features.cc
new file mode 100644
index 0000000000..68dc8cdeb2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/common/features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/common/features.cc
+@@ -170,7 +170,7 @@ BASE_FEATURE(kEnableBackForwardCacheForO
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ 
+ // Enables error reporting for JS errors inside DevTools frontend host
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEnableDevToolsJsErrorReporting,
+              "EnableDevToolsJsErrorReporting",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -258,7 +258,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin,
+ // process and having browser process handle adjusting thread properties (nice
+ // value, c-group, latency sensitivity...) for children which have sandbox
+ // restrictions.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kHandleChildThreadTypeChangesInBrowser,
+              "HandleChildThreadTypeChangesInBrowser",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_features.h
new file mode 100644
index 0000000000..d21f986dcf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_features.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/common/features.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/common/features.h
+@@ -37,7 +37,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDoc
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableBackForwardCacheForScreenReader);
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(
+     kEnableBackForwardCacheForOngoingSubframeNavigation);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableDevToolsJsErrorReporting);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnsureAllowBindingsIsAlwaysForWebUI);
+@@ -58,7 +58,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kFor
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kGpuInfoCollectionSeparatePrefetch);
+ #endif
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kGroupNIKByJoiningOrigin);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kHandleChildThreadTypeChangesInBrowser);
+ #endif
+ CONTENT_EXPORT BASE_DECLARE_FEATURE(kHighPriorityBeforeUnload);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_font__list__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_font__list__unittest.cc
new file mode 100644
index 0000000000..432e722d53
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_font__list__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/common/font_list_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/common/font_list_unittest.cc
+@@ -48,7 +48,7 @@ TEST(FontList, GetFontList) {
+         EXPECT_TRUE(HasFontWithName(fonts, "MS Gothic", "MS Gothic"));
+         EXPECT_TRUE(HasFontWithName(fonts, "Segoe UI", "Segoe UI"));
+         EXPECT_TRUE(HasFontWithName(fonts, "Verdana", "Verdana"));
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+         EXPECT_TRUE(HasFontWithName(fonts, "Arimo", "Arimo"));
+ #else
+         EXPECT_TRUE(HasFontWithName(fonts, "Arial", "Arial"));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.cc
new file mode 100644
index 0000000000..decaaf1c3c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.cc
@@ -0,0 +1,77 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/common/gpu_pre_sandbox_hook_bsd.cc.orig	2024-12-21 10:25:10.309586963 +0000
++++ src/3rdparty/chromium/content/common/gpu_pre_sandbox_hook_bsd.cc
+@@ -0,0 +1,68 @@
++// Copyright 2023 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "content/common/gpu_pre_sandbox_hook_bsd.h"
++
++#include <dlfcn.h>
++#include <errno.h>
++#include <sys/stat.h>
++
++#include <memory>
++#include <sstream>
++#include <utility>
++#include <vector>
++
++#include "base/base_paths.h"
++#include "base/files/file_enumerator.h"
++#include "base/files/file_path.h"
++#include "base/files/scoped_file.h"
++#include "base/functional/bind.h"
++#include "base/logging.h"
++#include "base/path_service.h"
++#include "base/strings/stringprintf.h"
++#include "build/build_config.h"
++#include "build/buildflag.h"
++#include "build/chromeos_buildflags.h"
++#include "content/public/common/content_switches.h"
++#include "media/gpu/buildflags.h"
++
++namespace content {
++namespace {
++
++constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE;
++
++void LoadVulkanLibraries() {
++  // Try to preload Vulkan libraries. Failure is not an error as not all may be
++  // present.
++  const char* kLibraries[] = {
++      "libvulkan.so",
++      "libvulkan_intel.so",
++      "libvulkan_intel_hasvk.so",
++      "libvulkan_radeon.so",
++  };
++  for (const auto* library : kLibraries) {
++    dlopen(library, dlopen_flag);
++  }
++}
++
++bool LoadLibrariesForGpu(
++    const sandbox::policy::SandboxSeccompBPF::Options& options) {
++  LoadVulkanLibraries();
++
++  return true;
++}
++
++}  // namespace
++
++bool GpuPreSandboxHook(sandbox::policy::SandboxLinux::Options options) {
++  if (!LoadLibrariesForGpu(options))
++    return false;
++
++  // TODO(tsepez): enable namspace sandbox here once crashes are understood.
++
++  errno = 0;
++  return true;
++}
++
++}  // namespace content
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.h
new file mode 100644
index 0000000000..6936a3f654
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__bsd.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/common/gpu_pre_sandbox_hook_bsd.h.orig	2024-12-21 10:25:10.310090101 +0000
++++ src/3rdparty/chromium/content/common/gpu_pre_sandbox_hook_bsd.h
+@@ -0,0 +1,20 @@
++// Copyright 2017 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_
++#define CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_
++
++#include "base/component_export.h"
++#include "sandbox/policy/sandbox.h"
++
++namespace content {
++
++// A pre-sandbox hook to use on Linux-based systems in sandboxed processes that
++// require general GPU usage.
++COMPONENT_EXPORT(GPU_PRE_SANDBOX_HOOK)
++bool GpuPreSandboxHook(sandbox::policy::SandboxLinux::Options options);
++
++}  // namespace content
++
++#endif  // CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_BSD_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__linux.h
new file mode 100644
index 0000000000..9a710479b9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_gpu__pre__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/common/gpu_pre_sandbox_hook_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/common/gpu_pre_sandbox_hook_linux.h
+@@ -5,8 +5,13 @@
+ #ifndef CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_LINUX_H_
+ #define CONTENT_COMMON_GPU_PRE_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
+ #include "base/component_export.h"
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace content {
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_user__agent.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_user__agent.cc
new file mode 100644
index 0000000000..aaf755b320
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_common_user__agent.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/common/user_agent.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/common/user_agent.cc
+@@ -45,7 +45,7 @@ std::string GetUserAgentPlatform() {
+   return "";
+ #elif BUILDFLAG(IS_MAC)
+   return "Macintosh; ";
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return "X11; ";  // strange, but that's what Firefox uses
+ #elif BUILDFLAG(IS_ANDROID)
+   return "Linux; ";
+@@ -71,7 +71,7 @@ std::string GetUnifiedPlatform() {
+   return "Windows NT 10.0; Win64; x64";
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return "Fuchsia";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "X11; Linux x86_64";
+ #elif BUILDFLAG(IS_IOS)
+   if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) {
+@@ -296,6 +296,16 @@ std::string BuildOSCpuInfoFromOSVersionA
+                       "Android %s", os_version.c_str()
+ #elif BUILDFLAG(IS_FUCHSIA)
+                       "Fuchsia"
++#elif BUILDFLAG(IS_BSD)
++#if defined(__x86_64__)
++                      "Linux x86_64; %s %s",
++#elif defined(__aarch64__)
++                      "Linux aarch64; %s %s",
++#else
++                      "Linux i686; %s %s",
++#endif
++                      unixinfo.sysname,  // e.g. Linux
++                      cpu_type.c_str()   // e.g. i686
+ #elif BUILDFLAG(IS_IOS)
+                       "CPU %s OS %s like Mac OS X", cpu_type.c_str(),
+                       os_version.c_str()
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_gpu_gpu__child__thread.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_gpu_gpu__child__thread.cc
new file mode 100644
index 0000000000..ee468f8379
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_gpu_gpu__child__thread.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/gpu/gpu_child_thread.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/gpu/gpu_child_thread.cc
+@@ -58,7 +58,7 @@
+ #include "third_party/skia/include/ports/SkFontConfigInterface.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #endif
+ 
+@@ -142,7 +142,8 @@ void GpuChildThread::Init(const base::Ti
+ 
+   viz_main_.gpu_service()->set_start_time(process_start_time);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++// XXX BSD
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated();
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc
new file mode 100644
index 0000000000..655955c047
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc
@@ -0,0 +1,79 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/gpu/gpu_main.cc.orig	2025-01-24 10:49:20.000000000 +0000
++++ src/3rdparty/chromium/content/gpu/gpu_main.cc
+@@ -91,10 +91,14 @@
+ #include "sandbox/win/src/sandbox.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #include "content/common/gpu_pre_sandbox_hook_linux.h"
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ #include "sandbox/policy/sandbox_type.h"
+ #endif
+ 
+@@ -114,7 +118,7 @@ namespace content {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool StartSandboxLinux(gpu::GpuWatchdogThread*,
+                        const gpu::GPUInfo*,
+                        const gpu::GpuPreferences&);
+@@ -179,7 +183,7 @@ class ContentSandboxHelper : public gpu:
+   bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread,
+                                 const gpu::GPUInfo* gpu_info,
+                                 const gpu::GpuPreferences& gpu_prefs) override {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs);
+ #elif BUILDFLAG(IS_WIN)
+     return StartSandboxWindows(sandbox_info_);
+@@ -291,7 +295,7 @@ int GpuMain(MainFunctionParams parameter
+           std::make_unique<base::SingleThreadTaskExecutor>(
+               gpu_preferences.message_pump_type);
+     }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #error "Unsupported Linux platform."
+ #elif BUILDFLAG(IS_MAC)
+     // Cross-process CoreAnimation requires a CFRunLoop to function at all, and
+@@ -330,7 +334,8 @@ int GpuMain(MainFunctionParams parameter
+   // before it.
+   InitializeSkia();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++// XXX BSD
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   // Thread type delegate of the process should be registered before
+   // first thread type change in ChildProcess constructor.
+   // It also needs to be registered before the process has multiple threads,
+@@ -438,7 +443,7 @@ int GpuMain(MainFunctionParams parameter
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread,
+                        const gpu::GPUInfo* gpu_info,
+                        const gpu::GpuPreferences& gpu_prefs) {
+@@ -478,7 +483,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogT
+   sandbox_options.accelerated_video_encode_enabled =
+       !gpu_prefs.disable_accelerated_video_encode;
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Video decoding of many video streams can use thousands of FDs as well as
+   // Exo clients like Lacros.
+   // See https://crbug.com/1417237
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc
new file mode 100644
index 0000000000..9c194576b8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc
+@@ -21,7 +21,7 @@
+ 
+ #if BUILDFLAG(IS_MAC)
+ #include "content/child/child_process_sandbox_support_impl_mac.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/child_process_sandbox_support_impl_linux.h"
+ #include "mojo/public/cpp/bindings/pending_remote.h"
+ #endif
+@@ -36,7 +36,7 @@ typedef struct CGFont* CGFontRef;
+ namespace content {
+ 
+ PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojo::PendingRemote<font_service::mojom::FontService> font_service;
+   ChildThread::Get()->BindHostReceiver(
+       font_service.InitWithNewPipeAndPassReceiver());
+@@ -55,7 +55,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatf
+ void PpapiBlinkPlatformImpl::Shutdown() {}
+ 
+ blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetSandboxSupport() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return sandbox_support_.get();
+ #else
+   return nullptr;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h
new file mode 100644
index 0000000000..36d7d3c396
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h
+@@ -36,7 +36,7 @@ class PpapiBlinkPlatformImpl : public Bl
+   blink::WebString DefaultLocale() override;
+ 
+  private:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<blink::WebSandboxSupport> sandbox_support_;
+ #endif
+ };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc
new file mode 100644
index 0000000000..805b8d6cc3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc
+@@ -52,6 +52,11 @@
+ #include "gin/v8_initializer.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#include "sandbox/policy/sandbox_type.h"
++#endif
++
+ #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID)
+ #include <stdlib.h>
+ #endif
+@@ -141,7 +146,7 @@ int PpapiPluginMain(MainFunctionParams p
+   gin::V8Initializer::LoadV8Snapshot();
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD)
+   sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox(
+       sandbox::policy::SandboxTypeFromCommandLine(command_line),
+       sandbox::policy::SandboxLinux::PreSandboxHook(),
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_browser_content__browser__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_browser_content__browser__client.cc
new file mode 100644
index 0000000000..d0f02d158c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_browser_content__browser__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/public/browser/content_browser_client.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/public/browser/content_browser_client.cc
+@@ -1343,7 +1343,7 @@ bool ContentBrowserClient::ShouldRunOutO
+ // that can be adequately sandboxed.
+ // Currently Android's network service will not run out of process or sandboxed,
+ // so OutOfProcessSystemDnsResolution is not currently enabled on Android.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_browser_zygote__host_zygote__host__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_browser_zygote__host_zygote__host__linux.h
new file mode 100644
index 0000000000..48045bf29e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_browser_zygote__host_zygote__host__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/public/browser/zygote_host/zygote_host_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/public/browser/zygote_host/zygote_host_linux.h
+@@ -35,11 +35,13 @@ class ZygoteHost {
+   // after the first render has been forked.
+   virtual int GetRendererSandboxStatus() = 0;
+ 
++#if !BUILDFLAG(IS_BSD)
+   // Adjust the OOM score of the given renderer's PID.  The allowed
+   // range for the score is [0, 1000], where higher values are more
+   // likely to be killed by the OOM killer.
+   virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle,
+                                       int score) = 0;
++#endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS)
+   // Reinitialize logging for the Zygote processes. Needed on ChromeOS, which
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__features.cc
new file mode 100644
index 0000000000..007b8e8cd8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__features.cc
@@ -0,0 +1,47 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/public/common/content_features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/public/common/content_features.cc
+@@ -37,7 +37,7 @@ BASE_FEATURE(kAudioServiceLaunchOnStartu
+ 
+ // Runs the audio service in a separate process.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+-    (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS))
++    (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD))
+ BASE_FEATURE(kAudioServiceOutOfProcess,
+              "AudioServiceOutOfProcess",
+              // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros
+@@ -670,7 +670,7 @@ BASE_FEATURE(kOverscrollHistoryNavigatio
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+ // Setting to control overscroll history navigation.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kOverscrollHistoryNavigationSetting,
+              "OverscrollHistoryNavigationSetting",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -1220,7 +1220,7 @@ BASE_FEATURE(kWebAssemblyTiering,
+ 
+ // Enable WebAssembly trap handler.
+ #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-      BUILDFLAG(IS_MAC)) &&                                                 \
++      BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) &&                            \
+      defined(ARCH_CPU_X86_64)) ||                                           \
+     (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64))
+ BASE_FEATURE(kWebAssemblyTrapHandler,
+@@ -1265,7 +1265,11 @@ BASE_FEATURE(kWebUICodeCache,
+ 
+ // Controls whether the WebUSB API is enabled:
+ // https://wicg.github.io/webusb
++#if BUILDFLAG(IS_BSD)
++BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_DISABLED_BY_DEFAULT);
++#else
+ BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_ENABLED_BY_DEFAULT);
++#endif
+ 
+ // Controls whether the WebXR Device API is enabled.
+ BASE_FEATURE(kWebXr, "WebXR", base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__switches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__switches.cc
new file mode 100644
index 0000000000..9b5b1e3969
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__switches.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/public/common/content_switches.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/public/common/content_switches.cc
+@@ -366,6 +366,8 @@ const char kEnableIsolatedWebAppsInRende
+ // builds.
+ const char kEnableLogging[]                 = "enable-logging";
+ 
++const char kDisableUnveil[]                 = "disable-unveil";
++
+ // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables
+ // triggering of change attribute of the NetInfo API when there is a change in
+ // the connection type.
+@@ -1011,7 +1013,7 @@ const char kPreventResizingContentsForTe
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ // Allows sending text-to-speech requests to speech-dispatcher, a common
+ // Linux speech service. Because it's buggy, the user must explicitly
+ // enable it so that visiting a random webpage can't cause instability.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__switches.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__switches.h
new file mode 100644
index 0000000000..bc317afae7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_content__switches.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/public/common/content_switches.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/public/common/content_switches.h
+@@ -115,6 +115,7 @@ CONTENT_EXPORT extern const char kEnable
+ CONTENT_EXPORT extern const char kEnableIsolatedWebAppsInRenderer[];
+ CONTENT_EXPORT extern const char kEnableLCDText[];
+ CONTENT_EXPORT extern const char kEnableLogging[];
++CONTENT_EXPORT extern const char kDisableUnveil[];
+ CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[];
+ CONTENT_EXPORT extern const char kEnableCanvas2DLayers[];
+ CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[];
+@@ -271,7 +272,7 @@ CONTENT_EXPORT extern const char kPreven
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ CONTENT_EXPORT extern const char kEnableSpeechDispatcher[];
+ CONTENT_EXPORT extern const char kLLVMProfileFile[];
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_zygote_features.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_zygote_features.gni
new file mode 100644
index 0000000000..ce0af68f20
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_public_common_zygote_features.gni
@@ -0,0 +1,14 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/public/common/zygote/features.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/public/common/zygote/features.gni
+@@ -2,4 +2,4 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
+-use_zygote = is_posix && !is_android && !is_apple
++use_zygote = is_posix && !is_android && !is_mac && !is_bsd
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc
new file mode 100644
index 0000000000..89bface6e1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/renderer/render_thread_impl.cc
+@@ -203,6 +203,8 @@
+ 
+ #if BUILDFLAG(IS_APPLE)
+ #include <malloc/malloc.h>
++#elif BUILDFLAG(IS_BSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -942,7 +944,7 @@ media::GpuVideoAcceleratorFactories* Ren
+                              kGpuStreamIdMedia, kGpuStreamPriorityMedia);
+ 
+   const bool enable_video_decode_accelerator =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) &&
+ #endif  // BUILDFLAG(IS_LINUX)
+       !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) &&
+@@ -951,7 +953,7 @@ media::GpuVideoAcceleratorFactories* Ren
+        gpu::kGpuFeatureStatusEnabled);
+ 
+   const bool enable_video_encode_accelerator =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) &&
+ #else
+       !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) &&
+@@ -1741,7 +1743,7 @@ std::unique_ptr<CodecFactory> RenderThre
+     bool enable_video_encode_accelerator) {
+   mojo::PendingRemote<media::mojom::VideoEncodeAcceleratorProvider>
+       vea_provider;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoEncoding)) {
+     BindHostReceiver(vea_provider.InitWithNewPipeAndPassReceiver());
+   } else {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc
new file mode 100644
index 0000000000..734cc25bf8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc
@@ -0,0 +1,51 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc
+@@ -127,7 +127,7 @@
+ 
+ #if BUILDFLAG(IS_MAC)
+ #include "content/child/child_process_sandbox_support_impl_mac.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/child_process_sandbox_support_impl_linux.h"
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #endif
+@@ -197,13 +197,13 @@ RendererBlinkPlatformImpl::RendererBlink
+       is_locked_to_site_(false),
+       main_thread_scheduler_(main_thread_scheduler),
+       next_frame_sink_id_(uint32_t{std::numeric_limits<int32_t>::max()} + 1) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   sk_sp<font_service::FontLoader> font_loader;
+ #endif
+ 
+   // RenderThread may not exist in some tests.
+   if (RenderThreadImpl::current()) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     mojo::PendingRemote<font_service::mojom::FontService> font_service;
+     RenderThreadImpl::current()->BindHostReceiver(
+         font_service.InitWithNewPipeAndPassReceiver());
+@@ -223,7 +223,7 @@ RendererBlinkPlatformImpl::RendererBlink
+ #endif
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   if (sandboxEnabled()) {
+ #if BUILDFLAG(IS_MAC)
+     sandbox_support_ = std::make_unique<WebSandboxSupportMac>();
+@@ -284,7 +284,7 @@ void RendererBlinkPlatformImpl::SetThrea
+ #endif
+ 
+ blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return sandbox_support_.get();
+ #else
+   // These platforms do not require sandbox support.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h
new file mode 100644
index 0000000000..50203b5d00
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h
+@@ -254,7 +254,7 @@ class CONTENT_EXPORT RendererBlinkPlatfo
+   void Collect3DContextInformation(blink::Platform::GraphicsInfo* gl_info,
+                                    const gpu::GPUInfo& gpu_info) const;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<blink::WebSandboxSupport> sandbox_support_;
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc
new file mode 100644
index 0000000000..1f60dde510
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc
+@@ -44,6 +44,7 @@ bool RendererMainPlatformDelegate::Enabl
+   // any renderer has been started.
+   // Here, we test that the status of SeccompBpf in the renderer is consistent
+   // with what SandboxLinux::GetStatus() said we would do.
++#if !BUILDFLAG(IS_BSD)
+   auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance();
+   if (linux_sandbox->GetStatus() & sandbox::policy::SandboxLinux::kSeccompBPF) {
+     CHECK(linux_sandbox->seccomp_bpf_started());
+@@ -65,6 +66,7 @@ bool RendererMainPlatformDelegate::Enabl
+     CHECK_EQ(errno, EPERM);
+   }
+ #endif  // __x86_64__
++#endif
+ 
+   return true;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_BUILD.gn
new file mode 100644
index 0000000000..e0b154819c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/shell/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/shell/BUILD.gn
+@@ -1086,7 +1086,7 @@ group("content_shell_crash_test") {
+   if (is_win) {
+     data_deps += [ "//build/win:copy_cdb_to_output" ]
+   }
+-  if (is_posix) {
++  if (is_posix && !is_bsd) {
+     data_deps += [
+       "//third_party/breakpad:dump_syms",
+       "//third_party/breakpad:minidump_stackwalk",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc
new file mode 100644
index 0000000000..65e89233e0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_app_shell__main__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/shell/app/shell_main_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/shell/app/shell_main_delegate.cc
+@@ -269,7 +269,7 @@ void ShellMainDelegate::PreSandboxStartu
+     // Reporting for sub-processes will be initialized in ZygoteForked.
+     if (process_type != switches::kZygoteProcess) {
+       crash_reporter::InitializeCrashpad(process_type.empty(), process_type);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       crash_reporter::SetFirstChanceExceptionHandler(
+           v8::TryHandleWebAssemblyTrapPosix);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_utility_shell__content__utility__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_utility_shell__content__utility__client.cc
new file mode 100644
index 0000000000..414624d223
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_shell_utility_shell__content__utility__client.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/shell/utility/shell_content_utility_client.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/shell/utility/shell_content_utility_client.cc
+@@ -38,7 +38,7 @@
+ #include "sandbox/policy/sandbox.h"
+ #include "services/test/echo/echo_service.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/test/sandbox_status_service.h"
+ #endif
+ 
+@@ -187,7 +187,7 @@ void ShellContentUtilityClient::ExposeIn
+   binders->Add<mojom::PowerMonitorTest>(
+       base::BindRepeating(&PowerMonitorTestImpl::MakeSelfOwnedReceiver),
+       base::SingleThreadTaskRunner::GetCurrentDefault());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (register_sandbox_status_helper_) {
+     binders->Add<content::mojom::SandboxStatusService>(
+         base::BindRepeating(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_test_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_test_BUILD.gn
new file mode 100644
index 0000000000..a7f8321e70
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_test_BUILD.gn
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/test/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/test/BUILD.gn
+@@ -1612,7 +1612,7 @@ test("content_browsertests") {
+     "../test/url_loader_interceptor_browsertest.cc",
+   ]
+ 
+-  if (is_linux) {
++  if ((is_linux) && !is_bsd) {
+     sources += [ "../browser/network/address_map_linux_browsertest.cc" ]
+   }
+ 
+@@ -2271,7 +2271,7 @@ static_library("run_all_unittests") {
+     ":test_support",
+     "//base/test:test_support",
+   ]
+-  if (is_linux || is_chromeos) {
++  if ((is_linux && !is_bsd) || is_chromeos) {
+     deps += [ "//content/common:set_process_title_linux" ]
+   }
+ }
+@@ -3375,7 +3375,7 @@ test("content_unittests") {
+     deps += [ "//third_party/boringssl" ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux && !is_bsd) || is_chromeos) {
+     sources += [ "../common/set_process_title_linux_unittest.cc" ]
+     deps += [ "//content/common:set_process_title_linux" ]
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_services.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_services.cc
new file mode 100644
index 0000000000..b3f00678d4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_services.cc
@@ -0,0 +1,98 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/utility/services.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/utility/services.cc
+@@ -69,7 +69,7 @@
+ extern sandbox::TargetServices* g_utility_target_services;
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "media/mojo/services/mojo_video_encode_accelerator_provider_factory.h"
+ #include "sandbox/linux/services/libc_interceptor.h"
+ #include "sandbox/policy/mojom/sandbox.mojom.h"
+@@ -92,7 +92,7 @@ extern sandbox::TargetServices* g_utilit
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
+         // BUILDFLAG(USE_V4L2_CODEC))
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \
+     (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
+ #include "content/common/features.h"
+ #include "media/mojo/services/stable_video_decoder_factory_process_service.h"  // nogncheck
+@@ -109,7 +109,7 @@ extern sandbox::TargetServices* g_utilit
+ #include "ui/accessibility/accessibility_features.h"
+ #endif  // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #include "media/capture/capture_switches.h"
+ #include "services/viz/public/cpp/gpu/gpu.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
+@@ -228,7 +228,7 @@ auto RunAudio(mojo::PendingReceiver<audi
+       << "task_policy_set TASK_QOS_POLICY";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   auto* command_line = base::CommandLine::ForCurrentProcess();
+   if (sandbox::policy::SandboxTypeFromCommandLine(*command_line) ==
+       sandbox::mojom::Sandbox::kNoSandbox) {
+@@ -310,7 +310,7 @@ auto RunVideoCapture(
+     mojo::PendingReceiver<video_capture::mojom::VideoCaptureService> receiver) {
+   auto service = std::make_unique<UtilityThreadVideoCaptureServiceImpl>(
+       std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+   {
+ #else
+@@ -356,7 +356,7 @@ auto RunOOPArcVideoAcceleratorFactorySer
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
+         // BUILDFLAG(USE_V4L2_CODEC))
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \
+     (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
+ auto RunStableVideoDecoderFactoryProcessService(
+     mojo::PendingReceiver<
+@@ -367,7 +367,7 @@ auto RunStableVideoDecoderFactoryProcess
+ #endif  // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) &&
+         // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ auto RunVideoEncodeAcceleratorProviderFactory(
+     mojo::PendingReceiver<media::mojom::VideoEncodeAcceleratorProviderFactory>
+         receiver) {
+@@ -390,7 +390,7 @@ void RegisterIOThreadServices(mojo::Serv
+   // loop of type IO that can get notified when pipes have data.
+   services.Add(RunNetworkService);
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \
+     (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
+   if (base::FeatureList::IsEnabled(
+           features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) {
+@@ -440,7 +440,7 @@ void RegisterMainThreadServices(mojo::Se
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) ||
+         // BUILDFLAG(USE_V4L2_CODEC))
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \
+     (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
+   if (!base::FeatureList::IsEnabled(
+           features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) {
+@@ -449,7 +449,7 @@ void RegisterMainThreadServices(mojo::Se
+ #endif  // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) &&
+         // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC))
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   services.Add(RunVideoEncodeAcceleratorProviderFactory);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..a002020672
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/utility/speech/speech_recognition_sandbox_hook_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/utility/speech/speech_recognition_sandbox_hook_linux.cc
+@@ -12,11 +12,14 @@
+ #include "sandbox/linux/syscall_broker/broker_command.h"
+ #include "sandbox/linux/syscall_broker/broker_file_permission.h"
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
+ using sandbox::syscall_broker::MakeBrokerCommandSet;
++#endif
+ 
+ namespace speech {
+ 
++#if !BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ // Gets the file permissions required by the Speech On-Device API (SODA).
+@@ -50,9 +53,11 @@ std::vector<BrokerFilePermission> GetSod
+ }
+ 
+ }  // namespace
++#endif
+ 
+ bool SpeechRecognitionPreSandboxHook(
+     sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(ENABLE_SODA_INTEGRATION_TESTS)
+   base::FilePath test_binary_path = GetSodaTestBinaryPath();
+   DVLOG(0) << "SODA test binary path: " << test_binary_path.value().c_str();
+@@ -77,6 +82,7 @@ bool SpeechRecognitionPreSandboxHook(
+                                sandbox::policy::SandboxLinux::PreSandboxHook(),
+                                options);
+   instance->EngageNamespaceSandboxIfPossible();
++#endif
+ 
+   return true;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h
new file mode 100644
index 0000000000..0911769882
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_speech_speech__recognition__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/utility/speech/speech_recognition_sandbox_hook_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/utility/speech/speech_recognition_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef CONTENT_UTILITY_SPEECH_SPEECH_RECOGNITION_SANDBOX_HOOK_LINUX_H_
+ #define CONTENT_UTILITY_SPEECH_SPEECH_RECOGNITION_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace speech {
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc
new file mode 100644
index 0000000000..a4934e0ccc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.cc
+@@ -9,7 +9,7 @@
+ 
+ #if BUILDFLAG(IS_MAC)
+ #include "content/child/child_process_sandbox_support_impl_mac.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/child_process_sandbox_support_impl_linux.h"
+ #endif
+ 
+@@ -17,7 +17,7 @@ namespace content {
+ 
+ UtilityBlinkPlatformWithSandboxSupportImpl::
+     UtilityBlinkPlatformWithSandboxSupportImpl() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojo::PendingRemote<font_service::mojom::FontService> font_service;
+   UtilityThread::Get()->BindHostReceiver(
+       font_service.InitWithNewPipeAndPassReceiver());
+@@ -35,7 +35,7 @@ UtilityBlinkPlatformWithSandboxSupportIm
+ 
+ blink::WebSandboxSupport*
+ UtilityBlinkPlatformWithSandboxSupportImpl::GetSandboxSupport() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   return sandbox_support_.get();
+ #else
+   return nullptr;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h
new file mode 100644
index 0000000000..fe5034e31a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__blink__platform__with__sandbox__support__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/utility/utility_blink_platform_with_sandbox_support_impl.h
+@@ -33,7 +33,7 @@ class UtilityBlinkPlatformWithSandboxSup
+   blink::WebSandboxSupport* GetSandboxSupport() override;
+ 
+  private:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<blink::WebSandboxSupport> sandbox_support_;
+ #endif
+ };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__main.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__main.cc
new file mode 100644
index 0000000000..30c6f7c68f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__main.cc
@@ -0,0 +1,128 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/utility/utility_main.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/utility/utility_main.cc
+@@ -39,7 +39,7 @@
+ #include "third_party/icu/source/common/unicode/unistr.h"
+ #include "third_party/icu/source/i18n/unicode/timezone.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/file_descriptor_store.h"
+ #include "base/files/file_util.h"
+ #include "base/pickle.h"
+@@ -49,7 +49,9 @@
+ #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h"
+ #include "gpu/config/gpu_info_collector.h"
+ #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ #include "services/audio/audio_sandbox_hook_linux.h"
+ #include "services/network/network_sandbox_hook_linux.h"
+ // gn check is not smart enough to realize that this include only applies to
+@@ -61,7 +63,7 @@
+ #endif
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+@@ -75,8 +77,13 @@
+ #endif  // BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#include "content/common/gpu_pre_sandbox_hook_bsd.h"
++#endif
++
+ #if (BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \
+-     (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)))
++     (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)))
+ #include "components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h"  // nogncheck
+ #endif
+ 
+@@ -102,7 +109,7 @@ namespace content {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ std::vector<std::string> GetNetworkContextsParentDirectories() {
+   base::MemoryMappedFile::Region region;
+   base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD(
+@@ -128,9 +135,10 @@ std::vector<std::string> GetNetworkConte
+   return dirs;
+ }
+ 
++#if !BUILDFLAG(IS_BSD)
+ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) {
+   const bool obtain_gpu_info =
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+       sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding ||
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+       sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding;
+@@ -145,6 +153,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojo
+ 
+   return false;
+ }
++#endif
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+ #if BUILDFLAG(IS_WIN)
+@@ -255,7 +264,8 @@ int UtilityMain(MainFunctionParams param
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++// XXX BSD
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   // Thread type delegate of the process should be registered before
+   // first thread type change in ChildProcess constructor.
+   // It also needs to be registered before the process has multiple threads,
+@@ -266,7 +276,7 @@ int UtilityMain(MainFunctionParams param
+   }
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Initializes the sandbox before any threads are created.
+   // TODO(jorgelo): move this after GTK initialization when we enable a strict
+   // Seccomp-BPF policy.
+@@ -307,7 +317,7 @@ int UtilityMain(MainFunctionParams param
+ #endif
+       break;
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+     case sandbox::mojom::Sandbox::kHardwareVideoDecoding:
+       pre_sandbox_hook =
+           base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook);
+@@ -334,6 +344,7 @@ int UtilityMain(MainFunctionParams param
+     default:
+       break;
+   }
++#if !BUILDFLAG(IS_BSD)
+   if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) &&
+       (parameters.zygote_child || !pre_sandbox_hook.is_null())) {
+     sandbox_options.use_amd_specific_policies =
+@@ -341,6 +352,11 @@ int UtilityMain(MainFunctionParams param
+     sandbox::policy::Sandbox::Initialize(
+         sandbox_type, std::move(pre_sandbox_hook), sandbox_options);
+   }
++#else
++  sandbox::policy::Sandbox::Initialize(
++      sandbox_type, std::move(pre_sandbox_hook),
++      sandbox::policy::SandboxLinux::Options());
++#endif
+ 
+   // Start the HangWatcher now that the sandbox is engaged, if it hasn't
+   // already been started.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__thread__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__thread__impl.cc
new file mode 100644
index 0000000000..8375a0c856
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_utility_utility__thread__impl.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/utility/utility_thread_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/utility/utility_thread_impl.cc
+@@ -31,7 +31,7 @@
+ #include "mojo/public/cpp/bindings/pending_receiver.h"
+ #include "mojo/public/cpp/bindings/service_factory.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "content/child/sandboxed_process_thread_type_handler.h"
+ #endif
+ 
+@@ -251,7 +251,8 @@ void UtilityThreadImpl::Init() {
+ 
+   GetContentClient()->utility()->UtilityThreadStarted();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++// XXX BSD
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD)
+   SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated();
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_BUILD.gn
new file mode 100644
index 0000000000..270e86319a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/zygote/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/zygote/BUILD.gn
+@@ -5,7 +5,7 @@
+ import("//build/config/nacl/config.gni")
+ import("//content/public/common/zygote/features.gni")
+ 
+-if (is_linux || is_chromeos) {
++if ((is_linux || is_chromeos) && !is_bsd) {
+   source_set("zygote") {
+     sources = [
+       "zygote_linux.cc",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc
new file mode 100644
index 0000000000..93e436a406
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_zygote__linux.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/zygote/zygote_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/content/zygote/zygote_linux.cc
+@@ -1,6 +1,7 @@
+ // Copyright 2012 The Chromium Authors
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
++#if 0
+ 
+ #include "content/zygote/zygote_linux.h"
+ 
+@@ -709,3 +710,4 @@ void Zygote::HandleReinitializeLoggingRe
+ }
+ 
+ }  // namespace content
++#endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc
new file mode 100644
index 0000000000..cda8d5effa
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_content_zygote_zygote__main__linux.cc
@@ -0,0 +1,64 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/content/zygote/zygote_main_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/content/zygote/zygote_main_linux.cc
+@@ -11,7 +11,9 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -41,7 +43,9 @@
+ #include "sandbox/linux/services/thread_helpers.h"
+ #include "sandbox/linux/suid/client/setuid_sandbox_client.h"
+ #include "sandbox/policy/linux/sandbox_debug_handling_linux.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ #include "sandbox/policy/sandbox.h"
+ #include "sandbox/policy/switches.h"
+ #include "third_party/icu/source/i18n/unicode/timezone.h"
+@@ -50,11 +54,13 @@ namespace content {
+ 
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ void CloseFds(const std::vector<int>& fds) {
+   for (const auto& it : fds) {
+     PCHECK(0 == IGNORE_EINTR(close(it)));
+   }
+ }
++#endif
+ 
+ base::OnceClosure ClosureFromTwoClosures(base::OnceClosure one,
+                                          base::OnceClosure two) {
+@@ -157,9 +163,11 @@ static void EnterLayerOneSandbox(sandbox
+     CHECK(!using_layer1_sandbox);
+   }
+ }
++#endif
+ 
+ bool ZygoteMain(
+     std::vector<std::unique_ptr<ZygoteForkDelegate>> fork_delegates) {
++#if !BUILDFLAG(IS_BSD)
+   sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD());
+ 
+   auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance();
+@@ -224,6 +232,9 @@ bool ZygoteMain(
+ 
+   // This function call can return multiple times, once per fork().
+   return zygote.ProcessRequests();
++#else
++  return false;
++#endif
+ }
+ 
+ }  // namespace content
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc
new file mode 100644
index 0000000000..7f2bcc7228
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_bluetooth_bluetooth__adapter.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/device/bluetooth/bluetooth_adapter.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/device/bluetooth/bluetooth_adapter.cc
+@@ -32,7 +32,7 @@ namespace device {
+ BluetoothAdapter::ServiceOptions::ServiceOptions() = default;
+ BluetoothAdapter::ServiceOptions::~ServiceOptions() = default;
+ 
+-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && \
++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) && \
+     !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX)
+ // static
+ scoped_refptr<BluetoothAdapter> BluetoothAdapter::CreateAdapter() {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_bluetooth_cast__bluetooth.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_bluetooth_cast__bluetooth.gni
new file mode 100644
index 0000000000..40227f98f1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_bluetooth_cast__bluetooth.gni
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/device/bluetooth/cast_bluetooth.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/device/bluetooth/cast_bluetooth.gni
+@@ -2,5 +2,5 @@ import("//build/config/features.gni")
+ 
+ declare_args() {
+   force_cast_bluetooth = false
+-  use_bluez = (is_linux && !is_castos && use_dbus) || is_chromeos
++  use_bluez = use_dbus && !is_bsd
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_BUILD.gn
new file mode 100644
index 0000000000..458adfe36c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/device/gamepad/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/device/gamepad/BUILD.gn
+@@ -99,7 +99,7 @@ component("gamepad") {
+       "hid_writer_linux.cc",
+       "hid_writer_linux.h",
+     ]
+-    if (use_udev) {
++    if (use_udev && !is_bsd) {
+       sources += [
+         "gamepad_device_linux.cc",
+         "gamepad_device_linux.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc
new file mode 100644
index 0000000000..4d5960a048
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/device/gamepad/gamepad_provider.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/device/gamepad/gamepad_provider.cc
+@@ -224,7 +224,7 @@ void GamepadProvider::Initialize(std::un
+ 
+   if (!polling_thread_)
+     polling_thread_ = std::make_unique<base::Thread>("Gamepad polling thread");
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Linux, the data fetcher needs to watch file descriptors, so the message
+   // loop needs to be a libevent loop.
+   const base::MessagePumpType kMessageLoopType = base::MessagePumpType::IO;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_hid__writer__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_hid__writer__linux.cc
new file mode 100644
index 0000000000..9c95115c3c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_device_gamepad_hid__writer__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/device/gamepad/hid_writer_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/device/gamepad/hid_writer_linux.cc
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#include <unistd.h>
++
+ #include "device/gamepad/hid_writer_linux.h"
+ 
+ #include <unistd.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc
new file mode 100644
index 0000000000..64fc84f303
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_api__browser__context__keyed__service__factories.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/extensions/browser/api/api_browser_context_keyed_service_factories.cc
+@@ -121,7 +121,7 @@ void EnsureApiBrowserContextKeyedService
+   MessagingAPIMessageFilter::EnsureAssociatedFactoryBuilt();
+ #endif
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+   NetworkingPrivateEventRouterFactory::GetInstance();
+ #endif
+   OffscreenDocumentManager::GetFactory();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_management_management__api.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_management_management__api.cc
new file mode 100644
index 0000000000..e52d4a8e9c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_management_management__api.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/browser/api/management/management_api.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/browser/api/management/management_api.cc
+@@ -285,7 +285,7 @@ bool PlatformSupportsApprovalFlowForExte
+ #if BUILDFLAG(IS_CHROMEOS)
+   // ChromeOS devices have this feature already shipped.
+   return true;
+-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(
+       supervised_user::kEnableExtensionsPermissionsForSupervisedUsersOnDesktop);
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc
new file mode 100644
index 0000000000..a3e33563f6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc
+@@ -78,7 +78,7 @@ namespace {
+ const char kReceivingEndDoesntExistError[] =
+     "Could not establish connection. Receiving end does not exist.";
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kMissingPermissionError[] =
+     "Access to native messaging requires nativeMessaging permission.";
+ const char kProhibitedByPoliciesError[] =
+@@ -551,7 +551,7 @@ void MessageService::OpenChannelToNative
+     return;
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool has_permission = extension->permissions_data()->HasAPIPermission(
+       mojom::APIPermissionID::kNativeMessaging);
+   if (!has_permission) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc
new file mode 100644
index 0000000000..b3bd430f4e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__delegate__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_delegate_factory.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_delegate_factory.cc
+@@ -14,7 +14,7 @@
+ #include "extensions/browser/api/networking_private/networking_private_chromeos.h"
+ #elif BUILDFLAG(IS_CHROMEOS_LACROS)
+ #include "extensions/browser/api/networking_private/networking_private_lacros.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "extensions/browser/api/networking_private/networking_private_linux.h"
+ #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+ #include "components/wifi/wifi_service.h"
+@@ -67,7 +67,7 @@ NetworkingPrivateDelegateFactory::BuildS
+   delegate = std::make_unique<NetworkingPrivateChromeOS>(browser_context);
+ #elif BUILDFLAG(IS_CHROMEOS_LACROS)
+   delegate = std::make_unique<NetworkingPrivateLacros>(browser_context);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   delegate = std::make_unique<NetworkingPrivateLinux>();
+ #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+   std::unique_ptr<wifi::WiFiService> wifi_service(wifi::WiFiService::Create());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_api___permission__features.json b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_api___permission__features.json
new file mode 100644
index 0000000000..9127bbe890
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_api___permission__features.json
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/common/api/_permission_features.json.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/common/api/_permission_features.json
+@@ -138,7 +138,7 @@
+     {
+       "channel": "stable",
+       "extension_types": ["platform_app"],
+-      "platforms": ["chromeos", "lacros", "win", "mac", "linux"],
++      "platforms": ["chromeos", "lacros", "win", "mac", "linux", "openbsd", "freebsd", "netbsd"],
+       "allowlist": [
+         "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80",  // http://crbug.com/387169
+         "A3BC37E2148AC4E99BE4B16AF9D42DD1E592BBBE",  // http://crbug.com/387169
+@@ -432,7 +432,7 @@
+   }, {
+     "channel": "stable",
+     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
+-    "platforms": ["chromeos", "mac", "win", "linux", "fuchsia"],
++    "platforms": ["chromeos", "mac", "win", "linux", "fuchsia", "openbsd", "freebsd", "netbsd"],
+     "allowlist": [
+       "0DE0F05680A4A056BCEC864ED8DDA84296F82B40",  // http://crbug.com/434651
+       "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80",  // http://crbug.com/293683
+@@ -476,7 +476,7 @@
+   "networkingPrivate": {
+     "channel": "stable",
+     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
+-    "platforms": ["chromeos", "lacros", "mac", "win", "linux", "fuchsia"],
++    "platforms": ["chromeos", "lacros", "mac", "win", "linux", "fuchsia", "openbsd", "freebsd", "netbsd"],
+     "allowlist": [
+       // DO NOT ADD ANY MORE ENTRIES HERE.
+       // networkingPrivate is being migrated to networking.onc.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_api_runtime.json b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_api_runtime.json
new file mode 100644
index 0000000000..165fb5c678
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_api_runtime.json
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/common/api/runtime.json.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/common/api/runtime.json
+@@ -86,6 +86,8 @@
+             {"name": "cros", "description": "Specifies the Chrome operating system."},
+             {"name": "linux", "description": "Specifies the Linux operating system."},
+             {"name": "openbsd", "description": "Specifies the OpenBSD operating system."},
++            {"name": "freebsd", "description": "Specifies the FreeBSD operating system."},
++            {"name": "netbsd", "description": "Specifies the NetBSD operating system."},
+             {"name": "fuchsia", "description": "Specifies the Fuchsia operating system."}
+         ]
+       },
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_command.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_command.cc
new file mode 100644
index 0000000000..59e3dc764c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_command.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/common/command.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/extensions/common/command.cc
+@@ -283,7 +283,7 @@ std::string Command::CommandPlatform() {
+   return values::kKeybindingPlatformMac;
+ #elif BUILDFLAG(IS_CHROMEOS)
+   return values::kKeybindingPlatformChromeOs;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return values::kKeybindingPlatformLinux;
+ #elif BUILDFLAG(IS_FUCHSIA)
+   // TODO(crbug.com/1312215): Change this once we decide what string should be
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_features_feature.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_features_feature.cc
new file mode 100644
index 0000000000..427757a04e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_common_features_feature.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/common/features/feature.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/common/features/feature.cc
+@@ -34,6 +34,8 @@ Feature::Platform Feature::GetCurrentPla
+   return WIN_PLATFORM;
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return FUCHSIA_PLATFORM;
++#elif BUILDFLAG(IS_BSD)
++  return LINUX_PLATFORM;
+ #else
+   return UNSPECIFIED_PLATFORM;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_renderer_bindings_api__binding__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_renderer_bindings_api__binding__util.cc
new file mode 100644
index 0000000000..8180d1ceeb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_renderer_bindings_api__binding__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/renderer/bindings/api_binding_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/renderer/bindings/api_binding_util.cc
+@@ -133,7 +133,7 @@ std::string GetPlatformString() {
+   return "lacros";
+ #elif BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
+   return "chromeos";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "linux";
+ #elif BUILDFLAG(IS_MAC)
+   return "mac";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_renderer_bindings_argument__spec.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_renderer_bindings_argument__spec.cc
new file mode 100644
index 0000000000..35ee541fd0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_renderer_bindings_argument__spec.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/renderer/bindings/argument_spec.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/renderer/bindings/argument_spec.cc
+@@ -18,6 +18,8 @@
+ #include "gin/data_object_builder.h"
+ #include "gin/dictionary.h"
+ 
++#include <cmath>
++
+ namespace extensions {
+ 
+ namespace {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc
new file mode 100644
index 0000000000..0a5778ff80
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_app_shell__main__delegate.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/shell/app/shell_main_delegate.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/extensions/shell/app/shell_main_delegate.cc
+@@ -43,7 +43,7 @@
+ #if BUILDFLAG(IS_WIN)
+ #include "base/base_paths_win.h"
+ #include "base/process/process_info.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/nix/xdg_util.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "base/base_paths_mac.h"
+@@ -62,7 +62,7 @@ base::FilePath GetDataPath() {
+     return cmd_line->GetSwitchValuePath(switches::kContentShellDataPath);
+ 
+   base::FilePath data_dir;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<base::Environment> env(base::Environment::Create());
+   data_dir = base::nix::GetXDGDirectory(
+       env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc
new file mode 100644
index 0000000000..5de05cbf7a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc
+@@ -45,7 +45,7 @@ void ShellRuntimeAPIDelegate::OpenURL(co
+ bool ShellRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+   info->os = api::runtime::PlatformOs::kCros;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   info->os = api::runtime::PlatformOs::kLinux;
+ #endif
+   return true;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__browser__main__parts.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__browser__main__parts.cc
new file mode 100644
index 0000000000..c0b8faee29
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__browser__main__parts.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/shell/browser/shell_browser_main_parts.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/extensions/shell/browser/shell_browser_main_parts.cc
+@@ -150,7 +150,7 @@ void ShellBrowserMainParts::PostCreateMa
+       switches::kAppShellAllowRoaming)) {
+     network_controller_->SetCellularAllowRoaming(true);
+   }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   // app_shell doesn't need GTK, so the fake input method context can work.
+   // See crbug.com/381852 and revision fb69f142.
+   // TODO(michaelpg): Verify this works for target environments.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.cc
new file mode 100644
index 0000000000..318a033ebc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/shell/browser/shell_extensions_api_client.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/extensions/shell/browser/shell_extensions_api_client.cc
+@@ -20,7 +20,7 @@
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ #include "extensions/shell/browser/api/file_system/shell_file_system_delegate.h"
+ #endif
+ 
+@@ -58,7 +58,7 @@ ShellExtensionsAPIClient::CreateDisplayI
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ FileSystemDelegate* ShellExtensionsAPIClient::GetFileSystemDelegate() {
+   if (!file_system_delegate_)
+     file_system_delegate_ = std::make_unique<ShellFileSystemDelegate>();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.h
new file mode 100644
index 0000000000..811c477bc0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_extensions_shell_browser_shell__extensions__api__client.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/extensions/shell/browser/shell_extensions_api_client.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/extensions/shell/browser/shell_extensions_api_client.h
+@@ -36,7 +36,7 @@ class ShellExtensionsAPIClient : public 
+       const override;
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   FileSystemDelegate* GetFileSystemDelegate() override;
+ #endif
+   MessagingDelegate* GetMessagingDelegate() override;
+@@ -45,7 +45,7 @@ class ShellExtensionsAPIClient : public 
+  private:
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<FileSystemDelegate> file_system_delegate_;
+ #endif
+   std::unique_ptr<MessagingDelegate> messaging_delegate_;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc
new file mode 100644
index 0000000000..07cb237ee5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_google__apis_gcm_engine_heartbeat__manager.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/google_apis/gcm/engine/heartbeat_manager.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/google_apis/gcm/engine/heartbeat_manager.cc
+@@ -32,7 +32,7 @@ const int kMinClientHeartbeatIntervalMs 
+ // Minimum time spent sleeping before we force a new heartbeat.
+ const int kMinSuspendTimeMs = 1000 * 10; // 10 seconds.
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ // The period at which to check if the heartbeat time has passed. Used to
+ // protect against platforms where the timer is delayed by the system being
+ // suspended.  Only needed on linux because the other OSes provide a standard
+@@ -191,7 +191,7 @@ void HeartbeatManager::RestartTimer() {
+       base::BindRepeating(&HeartbeatManager::OnHeartbeatTriggered,
+                           weak_ptr_factory_.GetWeakPtr()));
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   // Windows, Mac, Android, iOS, and Chrome OS all provide a way to be notified
+   // when the system is suspending or resuming.  The only one that does not is
+   // Linux so we need to poll to check for missed heartbeats.
+@@ -214,7 +214,7 @@ void HeartbeatManager::CheckForMissedHea
+     return;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   // Otherwise check again later.
+   io_task_runner_->PostDelayedTask(
+       FROM_HERE,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc
new file mode 100644
index 0000000000..773de79458
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_common_gpu__memory__buffer__support.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc
+@@ -182,7 +182,7 @@ uint32_t GetPlatformSpecificTextureTarge
+ #if BUILDFLAG(IS_MAC)
+   return macos_specific_texture_target;
+ #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return GL_TEXTURE_EXTERNAL_OES;
+ #elif BUILDFLAG(IS_IOS)
+   return GL_TEXTURE_2D;
+@@ -217,7 +217,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatfor
+     gfx::BufferFormat format,
+     gfx::BufferPlane plane) {
+ #if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // Always use GL_TEXTURE_2D as the target for RGB textures.
+   // https://crbug.com/916728
+   if (format == gfx::BufferFormat::R_8 || format == gfx::BufferFormat::RG_88 ||
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_dawn__context__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_dawn__context__provider.cc
new file mode 100644
index 0000000000..089f9248a1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_dawn__context__provider.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/dawn_context_provider.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/dawn_context_provider.cc
+@@ -302,7 +302,7 @@ wgpu::BackendType DawnContextProvider::G
+   return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12)
+              ? wgpu::BackendType::D3D12
+              : wgpu::BackendType::D3D11;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   return wgpu::BackendType::Vulkan;
+ #elif BUILDFLAG(IS_APPLE)
+   return wgpu::BackendType::Metal;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc
new file mode 100644
index 0000000000..ee7a5fffd2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_gles2__cmd__decoder.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc
+@@ -3001,7 +3001,7 @@ GLES2Decoder* GLES2Decoder::Create(
+ // Fix for Qt WebEngine Crash when QSG_RHI_BACKEND=opengl
+ // Allow linux to run fuzzers.
+ #if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return new GLES2DecoderImpl(client, command_buffer_service, outputter, group);
+ #else
+   LOG(FATAL) << "Validating command decoder is not supported.";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc
new file mode 100644
index 0000000000..20e609baf3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc
+@@ -21,7 +21,7 @@ namespace {
+ // TODO(penghuang): verify the scanout is the right usage for video playback.
+ // crbug.com/1280798
+ constexpr uint32_t kSupportedUsage =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     SHARED_IMAGE_USAGE_SCANOUT |
+ #endif
+     SHARED_IMAGE_USAGE_GLES2_READ | SHARED_IMAGE_USAGE_GLES2_WRITE |
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc
new file mode 100644
index 0000000000..005efd59be
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing.cc
+@@ -57,7 +57,7 @@
+ #include "ui/gl/gl_version_info.h"
+ #include "ui/gl/scoped_binders.h"
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN)
+ #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h"
+ #if BUILDFLAG(DAWN_ENABLE_BACKEND_OPENGLES)
+ #include "gpu/command_buffer/service/shared_image/dawn_gl_texture_representation.h"
+@@ -704,7 +704,7 @@ std::unique_ptr<DawnImageRepresentation>
+     wgpu::BackendType backend_type,
+     std::vector<wgpu::TextureFormat> view_formats,
+     scoped_refptr<SharedContextState> context_state) {
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN)
+   auto wgpu_format = ToDawnFormat(format());
+ 
+   if (wgpu_format == wgpu::TextureFormat::Undefined) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc
new file mode 100644
index 0000000000..fb2a149e50
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc
+@@ -147,7 +147,7 @@ bool IsFormatSupported(viz::SharedImageF
+ }  // namespace
+ 
+ constexpr uint32_t kSupportedUsage =
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN)
+     SHARED_IMAGE_USAGE_WEBGPU | SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE |
+     SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE |
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__factory.cc
new file mode 100644
index 0000000000..898eead8d0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_factory.cc
+@@ -143,7 +143,7 @@ gfx::GpuMemoryBufferType GetNativeBuffer
+   return gfx::GpuMemoryBufferType::IO_SURFACE_BUFFER;
+ #elif BUILDFLAG(IS_ANDROID)
+   return gfx::GpuMemoryBufferType::ANDROID_HARDWARE_BUFFER;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return gfx::GpuMemoryBufferType::NATIVE_PIXMAP;
+ #elif BUILDFLAG(IS_WIN)
+   return gfx::GpuMemoryBufferType::DXGI_SHARED_HANDLE;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc
new file mode 100644
index 0000000000..4f7da34226
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_shared__image__manager.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/shared_image_manager.cc
+@@ -550,7 +550,7 @@ bool SharedImageManager::SupportsScanout
+   return true;
+ #elif BUILDFLAG(IS_ANDROID)
+   return base::AndroidHardwareBufferCompat::IsSupportAvailable();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return ui::OzonePlatform::GetInstance()
+       ->GetPlatformRuntimeProperties()
+       .supports_native_pixmaps;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc
new file mode 100644
index 0000000000..2dd712fcd2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc
+@@ -214,7 +214,7 @@ bool WrappedSkImageBacking::Initialize(c
+ 
+     constexpr GrRenderable is_renderable = GrRenderable::kYes;
+     constexpr GrProtected is_protected = GrProtected::kNo;
+-#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX)
++#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+     // Blue for single-planar and magenta-ish for multi-planar.
+     SkColor4f fallback_color =
+         format().is_single_plane() ? SkColors::kBlue : SkColors::kWhite;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc
new file mode 100644
index 0000000000..28a83c5efc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_command__buffer_service_webgpu__decoder__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/command_buffer/service/webgpu_decoder_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/command_buffer/service/webgpu_decoder_impl.cc
+@@ -1390,7 +1390,7 @@ WGPUFuture WebGPUDecoderImpl::RequestAda
+     force_fallback_adapter = true;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!shared_context_state_->GrContextIsVulkan() &&
+       !shared_context_state_->IsGraphiteDawnVulkan() &&
+       use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) {
+@@ -2075,7 +2075,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn(
+   }
+ 
+ #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \
+-    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX)
++    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   if (usage & wgpu::TextureUsage::StorageBinding) {
+     LOG(ERROR) << "AssociateMailbox: wgpu::TextureUsage::StorageBinding is NOT "
+                   "supported yet on this platform.";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc
new file mode 100644
index 0000000000..aabff53264
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/config/gpu_control_list.cc
+@@ -277,7 +277,7 @@ bool GpuControlList::More::GLVersionInfo
+ GpuControlList::GLType GpuControlList::More::GetDefaultGLType() {
+ #if BUILDFLAG(IS_CHROMEOS)
+   return kGLTypeGL;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return kGLTypeGL;
+ #elif BUILDFLAG(IS_MAC)
+   return kGLTypeGL;
+@@ -848,7 +848,7 @@ GpuControlList::OsType GpuControlList::G
+   return kOsAndroid;
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return kOsFuchsia;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return kOsLinux;
+ #elif BUILDFLAG(IS_MAC)
+   return kOsMacosx;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc
new file mode 100644
index 0000000000..384b575c0b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__finch__features.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/config/gpu_finch_features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/config/gpu_finch_features.cc
+@@ -61,7 +61,7 @@ bool IsDeviceBlocked(const char* field, 
+ 
+ // Used to limit GL version to 2.0 for skia raster and compositing.
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \
+-    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kUseGles2ForOopR,
+              "UseGles2ForOopR",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+@@ -142,7 +142,8 @@ BASE_FEATURE(kAggressiveSkiaGpuResourceP
+ // DefaultEnableGpuRasterization has launched on Mac, Windows, ChromeOS,
+ // Android and Linux.
+ #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \
++    BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kDefaultEnableGpuRasterization,
+              "DefaultEnableGpuRasterization",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__info__collector.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__info__collector.cc
new file mode 100644
index 0000000000..ced2e57e00
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__info__collector.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/config/gpu_info_collector.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/config/gpu_info_collector.cc
+@@ -362,7 +362,7 @@ void ReportWebGPUAdapterMetrics(dawn::na
+ void ReportWebGPUSupportMetrics(dawn::native::Instance* instance) {
+   static BASE_FEATURE(kCollectWebGPUSupportMetrics,
+                       "CollectWebGPUSupportMetrics",
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+                       base::FEATURE_DISABLED_BY_DEFAULT);
+ #else
+                       base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc
new file mode 100644
index 0000000000..7e38de7232
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/config/gpu_test_config.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/config/gpu_test_config.cc
+@@ -29,7 +29,7 @@ GPUTestConfig::OS GetCurrentOS() {
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+   return GPUTestConfig::kOsChromeOS;
+ #elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \
+-    BUILDFLAG(IS_OPENBSD)
++    BUILDFLAG(IS_BSD)
+   return GPUTestConfig::kOsLinux;
+ #elif BUILDFLAG(IS_WIN)
+   int32_t major_version = 0;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc
new file mode 100644
index 0000000000..b2261fff8a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc
+@@ -26,7 +26,7 @@
+ #include "ui/ozone/public/ozone_platform.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h"
+ #endif
+ 
+@@ -55,7 +55,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemo
+   return gfx::IO_SURFACE_BUFFER;
+ #elif BUILDFLAG(IS_ANDROID)
+   return gfx::ANDROID_HARDWARE_BUFFER;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+   return gfx::NATIVE_PIXMAP;
+ #elif BUILDFLAG(IS_WIN)
+   return gfx::DXGI_SHARED_HANDLE;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h
new file mode 100644
index 0000000000..a8982bb6b2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h
+@@ -21,7 +21,7 @@
+ #include "ui/gfx/geometry/size.h"
+ #include "ui/gfx/gpu_memory_buffer.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ namespace gfx {
+ class ClientNativePixmapFactory;
+ }  // namespace gfx
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc
new file mode 100644
index 0000000000..f15aa90944
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc
@@ -0,0 +1,80 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc
+@@ -387,7 +387,7 @@ bool GpuInit::InitializeAndStartSandbox(
+   enable_watchdog = false;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early;
+ #else   // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
+   // For some reasons MacOSX's VideoToolbox might crash when called after
+@@ -424,7 +424,7 @@ bool GpuInit::InitializeAndStartSandbox(
+   }
+ 
+   bool attempted_startsandbox = false;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Chrome OS ARM Mali, GPU driver userspace creates threads when
+   // initializing a GL context, so start the sandbox early.
+   // TODO(zmo): Need to collect OS version before this.
+@@ -528,7 +528,7 @@ bool GpuInit::InitializeAndStartSandbox(
+     gpu_preferences_.gr_context_type = GrContextType::kGL;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The ContentSandboxHelper is currently the only one implementation of
+   // GpuSandboxHelper and it has no dependency. Except on Linux where
+   // VaapiWrapper checks the GL implementation to determine which display
+@@ -610,7 +610,7 @@ bool GpuInit::InitializeAndStartSandbox(
+           command_line, gpu_feature_info_,
+           gpu_preferences_.disable_software_rasterizer, false);
+       if (gl_use_swiftshader_) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+         VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly "
+                 << "on Linux";
+         return false;
+@@ -766,7 +766,7 @@ bool GpuInit::InitializeAndStartSandbox(
+ 
+   InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Driver may create a compatibility profile context when collect graphics
+   // information on Linux platform. Try to collect graphics information
+   // based on core profile context after disabling platform extensions.
+@@ -821,7 +821,7 @@ bool GpuInit::InitializeAndStartSandbox(
+       }
+     }
+   }
+-#if BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE))
+   if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) {
+     // https://rr-project.org/ is a Linux-only record-and-replay debugger that
+@@ -1008,7 +1008,7 @@ void GpuInit::InitializeInProcess(base::
+   }
+   bool gl_disabled = gl::GetGLImplementation() == gl::kGLImplementationDisabled;
+ 
+-#if BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE))
+   if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) {
+     // https://rr-project.org/ is a Linux-only record-and-replay debugger that
+@@ -1063,7 +1063,7 @@ void GpuInit::InitializeInProcess(base::
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Driver may create a compatibility profile context when collect graphics
+   // information on Linux platform. Try to collect graphics information
+   // based on core profile context after disabling platform extensions.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc
new file mode 100644
index 0000000000..09ef695069
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/ipc/service/gpu_memory_buffer_factory.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/ipc/service/gpu_memory_buffer_factory.cc
+@@ -13,7 +13,7 @@
+ #include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #include "gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h"
+ #endif
+ 
+@@ -36,7 +36,7 @@ GpuMemoryBufferFactory::CreateNativeType
+   return std::make_unique<GpuMemoryBufferFactoryIOSurface>();
+ #elif BUILDFLAG(IS_ANDROID)
+   return std::make_unique<GpuMemoryBufferFactoryAndroidHardwareBuffer>();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return std::make_unique<GpuMemoryBufferFactoryNativePixmap>(
+       vulkan_context_provider);
+ #elif BUILDFLAG(IS_WIN)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_x__util.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_x__util.h
new file mode 100644
index 0000000000..99ced9630c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_ipc_service_x__util.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/ipc/service/x_util.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/ipc/service/x_util.h
+@@ -12,7 +12,7 @@
+ #include "gpu/ipc/service/gpu_config.h"
+ #include "ui/base/ozone_buildflags.h"
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+ 
+ namespace gpu {
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py
new file mode 100644
index 0000000000..0cd7373938
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_generate__bindings.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/vulkan/generate_bindings.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/vulkan/generate_bindings.py
+@@ -271,7 +271,7 @@ VULKAN_DEVICE_FUNCTIONS = [
+     ]
+   },
+   {
+-    'ifdef': 'BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)',
++    'ifdef': 'BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)',
+     'extension': 'VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME',
+     'functions': [
+       'vkGetImageDrmFormatModifierPropertiesEXT',
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_semaphore__handle.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_semaphore__handle.cc
new file mode 100644
index 0000000000..67ef621048
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_semaphore__handle.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/vulkan/semaphore_handle.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/vulkan/semaphore_handle.cc
+@@ -39,7 +39,7 @@ SemaphoreHandle::SemaphoreHandle(gfx::Gp
+   // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic.
+   Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA,
+        fence_handle.Release());
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   Init(VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR,
+        fence_handle.Release());
+ #elif BUILDFLAG(IS_POSIX)
+@@ -64,7 +64,7 @@ gfx::GpuFenceHandle SemaphoreHandle::ToG
+   // VkSemaphore, which can then be used to submit present work, see
+   // https://fuchsia.dev/reference/fidl/fuchsia.ui.scenic.
+   fence_handle.Adopt(TakeHandle());
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   if (type_ == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR) {
+     fence_handle.Adopt(TakeHandle());
+   } else {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc
new file mode 100644
index 0000000000..155542f57e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.cc
+@@ -154,7 +154,7 @@ bool VulkanDeviceQueue::Initialize(
+ 
+       // In dual-CPU cases, we cannot detect the active GPU correctly on Linux,
+       // so don't select GPU device based on the |gpu_info|.
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+     // If gpu_info is provided, the device should match it.
+     if (gpu_info && (device_properties.vendorID != gpu_info->gpu.vendor_id ||
+                      device_properties.deviceID != gpu_info->gpu.device_id)) {
+@@ -297,7 +297,7 @@ bool VulkanDeviceQueue::Initialize(
+   // Android, Fuchsia, Linux, and CrOS (VaapiVideoDecoder) need YCbCr sampler
+   // support.
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!physical_device_info.feature_sampler_ycbcr_conversion) {
+     LOG(ERROR) << "samplerYcbcrConversion is not supported.";
+     return false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h
new file mode 100644
index 0000000000..2312851455
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__device__queue.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/gpu/vulkan/vulkan_device_queue.h
+@@ -169,7 +169,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanDev
+   bool allow_protected_memory_ = false;
+ 
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   VkPhysicalDeviceSamplerYcbcrConversionFeatures
+       sampler_ycbcr_conversion_features_{
+           VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES};
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc
new file mode 100644
index 0000000000..dcd5b5f2cb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc
+@@ -1297,7 +1297,7 @@ bool VulkanFunctionPointers::BindDeviceF
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (gfx::HasExtension(enabled_extensions,
+                         VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME)) {
+     constexpr char kvkGetImageDrmFormatModifierPropertiesEXT[] =
+@@ -1498,7 +1498,7 @@ void VulkanFunctionPointers::ResetForTes
+   vkGetSwapchainImagesKHR = nullptr;
+   vkQueuePresentKHR = nullptr;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   vkGetImageDrmFormatModifierPropertiesEXT = nullptr;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h
new file mode 100644
index 0000000000..ec64a8c57e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__function__pointers.h
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h
+@@ -322,7 +322,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFu
+   VulkanFunction<PFN_vkGetSwapchainImagesKHR> vkGetSwapchainImagesKHR;
+   VulkanFunction<PFN_vkQueuePresentKHR> vkQueuePresentKHR;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   VulkanFunction<PFN_vkGetImageDrmFormatModifierPropertiesEXT>
+       vkGetImageDrmFormatModifierPropertiesEXT;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -1336,7 +1336,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR
+                                                              pPresentInfo);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierPropertiesEXT(
+     VkDevice device,
+     VkImage image,
+@@ -1346,4 +1346,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmForm
+ }
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+-#endif  // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_
+\ No newline at end of file
++#endif  // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__image.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__image.h
new file mode 100644
index 0000000000..743bd97dd6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__image.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/vulkan/vulkan_image.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/vulkan/vulkan_image.h
+@@ -87,7 +87,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanIma
+       VkImageUsageFlags usage,
+       VkImageCreateFlags flags);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static std::unique_ptr<VulkanImage> CreateWithExternalMemoryAndModifiers(
+       VulkanDeviceQueue* device_queue,
+       const gfx::Size& size,
+@@ -199,7 +199,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanIma
+       VkImageTiling image_tiling,
+       uint32_t queue_family_index);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool InitializeWithExternalMemoryAndModifiers(VulkanDeviceQueue* device_queue,
+                                                 const gfx::Size& size,
+                                                 VkFormat format,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc
new file mode 100644
index 0000000000..b9e440be2a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_gpu_vulkan_vulkan__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/gpu/vulkan/vulkan_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/gpu/vulkan/vulkan_util.cc
+@@ -473,7 +473,7 @@ bool CheckVulkanCompatibilities(
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) && !defined(OZONE_PLATFORM_IS_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(OZONE_PLATFORM_IS_X11)
+   // Vulkan is only supported with X11 on Linux for now.
+   return false;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc
new file mode 100644
index 0000000000..80cf6f9be6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__browser__main__parts__posix.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/headless/lib/browser/headless_browser_main_parts_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/headless/lib/browser/headless_browser_main_parts_posix.cc
+@@ -21,13 +21,13 @@
+ #include "content/public/browser/browser_thread.h"
+ #include "headless/lib/browser/headless_browser_impl.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/command_line.h"
+ #include "components/os_crypt/sync/key_storage_config_linux.h"
+ #include "components/os_crypt/sync/os_crypt.h"
+ #include "headless/public/switches.h"
+ 
+-#if defined(USE_DBUS)
++#if defined(USE_DBUS) && !BUILDFLAG(IS_BSD)
+ #include "device/bluetooth/dbus/bluez_dbus_manager.h"
+ #endif
+ 
+@@ -161,7 +161,7 @@ class BrowserShutdownHandler {
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr char kProductName[] = "HeadlessChrome";
+ #endif
+ 
+@@ -169,9 +169,9 @@ void HeadlessBrowserMainParts::PostCreat
+   BrowserShutdownHandler::Install(base::BindOnce(
+       &HeadlessBrowserImpl::ShutdownWithExitCode, browser_->GetWeakPtr()));
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ 
+-#if defined(USE_DBUS)
++#if defined(USE_DBUS) && !BUILDFLAG(IS_BSD)
+   bluez::BluezDBusManager::Initialize(/*system_bus=*/nullptr);
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc
new file mode 100644
index 0000000000..450a87080d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc
+@@ -48,7 +48,7 @@
+ #include "ui/base/ui_base_switches.h"
+ #include "ui/gfx/switches.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/crash/core/app/crash_switches.h"  // nogncheck
+ #include "components/crash/core/app/crashpad.h"        // nogncheck
+ #include "content/public/common/content_descriptors.h"
+@@ -66,7 +66,7 @@
+ 
+ namespace headless {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ int GetCrashSignalFD(const base::CommandLine& command_line,
+@@ -164,7 +164,7 @@ HeadlessContentBrowserClient::GetGenerat
+   return content::GeneratedCodeCacheSettings(true, 0, context->GetPath());
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ void HeadlessContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
+     const base::CommandLine& command_line,
+     int child_process_id,
+@@ -183,7 +183,7 @@ void HeadlessContentBrowserClient::Appen
+ 
+   command_line->AppendSwitch(::switches::kHeadless);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   int fd;
+   pid_t pid;
+   if (crash_reporter::GetHandlerSocket(&fd, &pid)) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h
new file mode 100644
index 0000000000..90725fe760
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h
+@@ -45,7 +45,7 @@ class HeadlessContentBrowserClient : pub
+   CreateDevToolsManagerDelegate() override;
+   content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings(
+       content::BrowserContext* context) override;
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+   void GetAdditionalMappedFilesForChildProcess(
+       const base::CommandLine& command_line,
+       int child_process_id,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc
new file mode 100644
index 0000000000..0d93765500
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_browser_headless__web__contents__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/headless/lib/browser/headless_web_contents_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/headless/lib/browser/headless_web_contents_impl.cc
+@@ -62,7 +62,7 @@ namespace headless {
+ namespace {
+ 
+ void UpdatePrefsFromSystemSettings(blink::RendererPreferences* prefs) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   content::UpdateFontRendererPreferencesFromSystemSettings(prefs);
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc
new file mode 100644
index 0000000000..0ba035bf63
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_headless_lib_headless__content__main__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc
+@@ -407,7 +407,7 @@ void HeadlessContentMainDelegate::InitCr
+   if (process_type != ::switches::kZygoteProcess) {
+     g_headless_crash_client.Pointer()->set_crash_dumps_dir(
+         command_line.GetSwitchValuePath(switches::kCrashDumpsDir));
+-#if !BUILDFLAG(IS_WIN)
++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD)
+     crash_reporter::InitializeCrashpad(process_type.empty(), process_type);
+ #endif  // !BUILDFLAG(IS_WIN)
+     crash_keys::SetSwitchesFromCommandLine(command_line, nullptr);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel.h
new file mode 100644
index 0000000000..ac03964c8a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ipc/ipc_channel.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ipc/ipc_channel.h
+@@ -218,7 +218,7 @@ class COMPONENT_EXPORT(IPC) Channel : pu
+   static std::string GenerateUniqueRandomChannelID();
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Sandboxed processes live in a PID namespace, so when sending the IPC hello
+   // message from client to server we need to send the PID from the global
+   // PID namespace.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc
new file mode 100644
index 0000000000..d0a33c1827
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ipc/ipc_channel_common.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ipc/ipc_channel_common.cc
+@@ -10,7 +10,7 @@
+ 
+ namespace IPC {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ namespace {
+ int g_global_pid = 0;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc
new file mode 100644
index 0000000000..d2c87068ab
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ipc/ipc_channel_mojo.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ipc/ipc_channel_mojo.cc
+@@ -105,7 +105,7 @@ class ThreadSafeChannelProxy : public mo
+ };
+ 
+ base::ProcessId GetSelfPID() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (int global_pid = Channel::GetGlobalPid())
+     return global_pid;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc
new file mode 100644
index 0000000000..0793f875fa
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ipc/ipc_message_utils.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ipc/ipc_message_utils.cc
+@@ -399,7 +399,7 @@ void ParamTraits<unsigned int>::Log(cons
+ }
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_FUCHSIA) ||                                              \
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) ||                         \
+     (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS))
+ void ParamTraits<long>::Log(const param_type& p, std::string* l) {
+   l->append(base::NumberToString(p));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h
new file mode 100644
index 0000000000..f1be7d7af1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ipc/ipc_message_utils.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ipc/ipc_message_utils.h
+@@ -214,7 +214,7 @@ struct ParamTraits<unsigned int> {
+ // Since we want to support Android 32<>64 bit IPC, as long as we don't have
+ // these traits for 32 bit ARM then that'll catch any errors.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_FUCHSIA) ||                                              \
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) ||                         \
+     (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS))
+ template <>
+ struct ParamTraits<long> {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_BUILD.gn
new file mode 100644
index 0000000000..17c993fb06
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_BUILD.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/BUILD.gn
+@@ -99,6 +99,12 @@ config("media_config") {
+       defines += [ "DLOPEN_PULSEAUDIO" ]
+     }
+   }
++  if (use_sndio) {
++    defines += [ "USE_SNDIO" ]
++  }
++#  if (use_audioio) {
++#    defines += [ "USE_AUDIOIO" ]
++#  }
+   if (use_cras) {
+     defines += [ "USE_CRAS" ]
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_BUILD.gn
new file mode 100644
index 0000000000..d94c1779cd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_BUILD.gn
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/audio/BUILD.gn
+@@ -268,10 +268,35 @@ source_set("audio") {
+     deps += [ "//media/base/android:media_jni_headers" ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "linux/audio_manager_linux.cc" ]
+   }
+ 
++  if (is_bsd && !use_audioio) {
++    sources += [ "sndio/audio_manager_sndio.cc" ]
++  }
++
++  if (use_sndio) {
++    libs += [ "sndio" ]
++    sources += [
++      "sndio/sndio_input.cc",
++      "sndio/sndio_input.h",
++      "sndio/sndio_output.cc",
++      "sndio/sndio_output.h"
++    ]
++   }
++
++  if (use_audioio) {
++    sources += [
++      "audioio/audio_manager_audioio.cc",
++      "audioio/audio_manager_audioio.h",
++      "audioio/audioio_input.cc",
++      "audioio/audioio_input.h",
++      "audioio/audioio_output.cc",
++      "audioio/audioio_output.h"
++    ]
++   }
++
+   if (use_alsa) {
+     libs += [ "asound" ]
+     sources += [
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc
new file mode 100644
index 0000000000..aefefd7cb5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc
@@ -0,0 +1,60 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc
+@@ -88,7 +88,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+   int card = -1;
+ 
+   // Loop through the sound cards to get ALSA device hints.
++#if !BUILDFLAG(IS_BSD) 
+   while (!wrapper_->CardNext(&card) && card >= 0) {
++#endif
+     void** hints = NULL;
+     int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
+     if (!error) {
+@@ -100,7 +102,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+       DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: "
+                     << wrapper_->StrError(error);
+     }
++#if !BUILDFLAG(IS_BSD) 
+   }
++#endif
+ }
+ 
+ void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type,
+@@ -183,7 +187,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvail
+   // goes through software conversion if needed (e.g. incompatible
+   // sample rate).
+   // TODO(joi): Should we prefer "hw" instead?
++#if BUILDFLAG(IS_BSD)
++  static const char kDeviceTypeDesired[] = "plug";
++#else
+   static const char kDeviceTypeDesired[] = "plughw";
++#endif
+   return strncmp(kDeviceTypeDesired, device_name,
+                  std::size(kDeviceTypeDesired) - 1) == 0;
+ }
+@@ -205,7 +213,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+   // Loop through the sound cards.
+   // Don't use snd_device_name_hint(-1,..) since there is an access violation
+   // inside this ALSA API with libasound.so.2.0.0.
++#if !BUILDFLAG(IS_BSD)
+   while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) {
++#endif
+     int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
+     if (!error) {
+       for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) {
+@@ -229,7 +239,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+       DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: "
+                     << wrapper_->StrError(error);
+     }
++#if !BUILDFLAG(IS_BSD)
+   }
++#endif
+ 
+   return has_device;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc
new file mode 100644
index 0000000000..5db023cb10
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_audio__input__device.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/audio_input_device.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/audio/audio_input_device.cc
+@@ -269,7 +269,7 @@ void AudioInputDevice::OnStreamCreated(
+ // here. See comments in AliveChecker and PowerObserverHelper for details and
+ // todos.
+   if (detect_dead_stream_ == DeadStreamDetection::kEnabled) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     const bool stop_at_first_alive_notification = true;
+     const bool pause_check_during_suspend = false;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_audio__output__proxy__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_audio__output__proxy__unittest.cc
new file mode 100644
index 0000000000..39b7e19fa5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_audio__output__proxy__unittest.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/audio_output_proxy_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/audio/audio_output_proxy_unittest.cc
+@@ -443,7 +443,11 @@ class AudioOutputProxyTest : public test
+     // |stream| is closed at this point. Start() should reopen it again.
+     EXPECT_CALL(manager(), MakeAudioOutputStream(_, _, _))
+         .Times(2)
++#if BUILDFLAG(IS_BSD)
++        .WillRepeatedly(Return(static_cast<AudioOutputStream*>(NULL)));
++#else
+         .WillRepeatedly(Return(reinterpret_cast<AudioOutputStream*>(NULL)));
++#endif
+ 
+     EXPECT_CALL(callback_, OnError(_)).Times(2);
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_pulse_pulse__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_pulse_pulse__util.cc
new file mode 100644
index 0000000000..055c94e562
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_pulse_pulse__util.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/pulse/pulse_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/audio/pulse/pulse_util.cc
+@@ -50,8 +50,12 @@ constexpr char kBrowserDisplayName[] = "
+ 
+ #if defined(DLOPEN_PULSEAUDIO)
+ static const base::FilePath::CharType kPulseLib[] =
++#if BUILDFLAG(IS_BSD)
++    FILE_PATH_LITERAL("libpulse.so");
++#else
+     FILE_PATH_LITERAL("libpulse.so.0");
+ #endif
++#endif
+ 
+ void DestroyMainloop(pa_threaded_mainloop* mainloop) {
+   pa_threaded_mainloop_stop(mainloop);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.cc
new file mode 100644
index 0000000000..e3d339db2d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.cc
@@ -0,0 +1,222 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.cc.orig	2024-12-21 10:25:10.410710748 +0000
++++ src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.cc
+@@ -0,0 +1,213 @@
++// Copyright (c) 2012 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 "base/command_line.h"
++#include "base/metrics/histogram_macros.h"
++#include "base/memory/ptr_util.h"
++
++#include "media/audio/sndio/audio_manager_sndio.h"
++
++#include "media/audio/audio_device_description.h"
++#include "media/audio/audio_output_dispatcher.h"
++#if defined(USE_SNDIO)
++#include "media/audio/sndio/sndio_input.h"
++#include "media/audio/sndio/sndio_output.h"
++#endif
++#if defined(USE_PULSEAUDIO)
++#include "media/audio/pulse/audio_manager_pulse.h"
++#include "media/audio/pulse/pulse_util.h"
++#endif
++#if defined(USE_ALSA)
++#include "media/audio/alsa/audio_manager_alsa.h"
++#endif
++#include "media/audio/fake_audio_manager.h"
++#include "media/base/limits.h"
++#include "media/base/media_switches.h"
++
++namespace media {
++
++#if defined(USE_SNDIO)
++// Maximum number of output streams that can be open simultaneously.
++static const int kMaxOutputStreams = 50;
++
++// Default sample rate for input and output streams.
++static const int kDefaultSampleRate = 48000;
++
++void AddDefaultDevice(AudioDeviceNames* device_names) {
++  DCHECK(device_names->empty());
++  device_names->push_front(AudioDeviceName::CreateDefault());
++}
++
++bool AudioManagerSndio::HasAudioOutputDevices() {
++  return true;
++}
++
++bool AudioManagerSndio::HasAudioInputDevices() {
++  return true;
++}
++
++void AudioManagerSndio::GetAudioInputDeviceNames(
++    AudioDeviceNames* device_names) {
++  DCHECK(device_names->empty());
++  AddDefaultDevice(device_names);
++}
++
++void AudioManagerSndio::GetAudioOutputDeviceNames(
++    AudioDeviceNames* device_names) {
++  AddDefaultDevice(device_names);
++}
++
++#if defined(USE_SNDIO)
++const char* AudioManagerSndio::GetName() {
++  return "SNDIO";
++}
++#endif
++
++AudioParameters AudioManagerSndio::GetInputStreamParameters(
++    const std::string& device_id) {
++  static const int kDefaultInputBufferSize = 1024;
++
++  int user_buffer_size = GetUserBufferSize();
++  int buffer_size = user_buffer_size ?
++      user_buffer_size : kDefaultInputBufferSize;
++
++  return AudioParameters(
++      AudioParameters::AUDIO_PCM_LOW_LATENCY, ChannelLayoutConfig::Stereo(),
++      kDefaultSampleRate, buffer_size);
++}
++
++AudioManagerSndio::AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
++                                         AudioLogFactory* audio_log_factory)
++    : AudioManagerBase(std::move(audio_thread),
++                       audio_log_factory) {
++  DLOG(WARNING) << "AudioManagerSndio";
++  SetMaxOutputStreamsAllowed(kMaxOutputStreams);
++}
++
++AudioManagerSndio::~AudioManagerSndio() = default;
++
++AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream(
++    const AudioParameters& params,
++    const LogCallback& log_callback) {
++  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
++  return MakeOutputStream(params);
++}
++
++AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream(
++    const AudioParameters& params,
++    const std::string& device_id,
++    const LogCallback& log_callback) {
++  DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
++  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
++  return MakeOutputStream(params);
++}
++
++AudioInputStream* AudioManagerSndio::MakeLinearInputStream(
++    const AudioParameters& params,
++    const std::string& device_id,
++    const LogCallback& log_callback) {
++  DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
++  return MakeInputStream(params);
++}
++
++AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream(
++    const AudioParameters& params,
++    const std::string& device_id,
++    const LogCallback& log_callback) {
++  DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
++  return MakeInputStream(params);
++}
++
++AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters(
++    const std::string& output_device_id,
++    const AudioParameters& input_params) {
++  // TODO(tommi): Support |output_device_id|.
++  DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!";
++  static const int kDefaultOutputBufferSize = 2048;
++
++  ChannelLayoutConfig channel_layout_config = ChannelLayoutConfig::Stereo();
++  int sample_rate = kDefaultSampleRate;
++  int buffer_size = kDefaultOutputBufferSize;
++  if (input_params.IsValid()) {
++    sample_rate = input_params.sample_rate();
++    channel_layout_config = input_params.channel_layout_config();
++    buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
++  }
++
++  int user_buffer_size = GetUserBufferSize();
++  if (user_buffer_size)
++    buffer_size = user_buffer_size;
++
++  return AudioParameters(
++      AudioParameters::AUDIO_PCM_LOW_LATENCY,
++      channel_layout_config, sample_rate, buffer_size);
++}
++
++AudioInputStream* AudioManagerSndio::MakeInputStream(
++    const AudioParameters& params) {
++  DLOG(WARNING) << "MakeInputStream";
++  return new SndioAudioInputStream(this,
++             AudioDeviceDescription::kDefaultDeviceId, params);
++}
++
++AudioOutputStream* AudioManagerSndio::MakeOutputStream(
++    const AudioParameters& params) {
++  DLOG(WARNING) << "MakeOutputStream";
++  return new SndioAudioOutputStream(params, this);
++}
++#endif
++
++std::unique_ptr<media::AudioManager> CreateAudioManager(
++    std::unique_ptr<AudioThread> audio_thread,
++    AudioLogFactory* audio_log_factory) {
++  DLOG(WARNING) << "CreateAudioManager";
++
++  auto _ab = kAudioBackendParam.Get();
++
++  // For testing allow audio output to be disabled.
++  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
++          switches::kDisableAudioOutput) ||
++	  !base::FeatureList::IsEnabled(media::kAudioBackend)) {
++    return std::make_unique<FakeAudioManager>(std::move(audio_thread),
++                                              audio_log_factory);
++  }
++
++#if defined(USE_PULSEAUDIO)
++  pa_threaded_mainloop* pa_mainloop = nullptr;
++  pa_context* pa_context = nullptr;
++  if (_ab != AudioBackend::kSndio && _ab != AudioBackend::kAlsa &&
++          pulse::InitPulse(&pa_mainloop, &pa_context)) {
++    return std::make_unique<AudioManagerPulse>(
++        std::move(audio_thread), audio_log_factory, pa_mainloop, pa_context);
++  } else if (_ab == AudioBackend::kAuto) {
++    LOG(WARNING) << "Falling back to SNDIO for audio output. PulseAudio is not "
++                    "available or could not be initialized.";
++  }
++#endif
++
++#if defined(USE_SNDIO)
++  if (_ab != AudioBackend::kPulseAudio && _ab != AudioBackend::kAlsa) {
++    return std::make_unique<AudioManagerSndio>(std::move(audio_thread),
++                                              audio_log_factory);
++  } else if (_ab == AudioBackend::kAuto) {
++    LOG(WARNING) << "Falling back to ALSA audio output. SNDIO is not "
++                    "available or could not be initialized.";
++  }
++#endif
++
++#if defined(USE_ALSA)
++  if (_ab != AudioBackend::kPulseAudio && _ab != AudioBackend::kSndio) {
++    return std::make_unique<AudioManagerAlsa>(std::move(audio_thread),
++                                              audio_log_factory);
++  } else if (_ab == AudioBackend::kAuto) {
++    LOG(WARNING) << "Falling back to fake audio output. ALSA is not "
++                    "available or could not be initialized.";
++  }
++#endif
++
++  return std::make_unique<FakeAudioManager>(std::move(audio_thread),
++                                            audio_log_factory);
++}
++
++}  // namespace media
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.h
new file mode 100644
index 0000000000..3821eb32c3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_audio__manager__sndio.h
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.h.orig	2024-12-21 10:25:10.411266407 +0000
++++ src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.h
+@@ -0,0 +1,66 @@
++// Copyright (c) 2012 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 MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
++#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
++
++#include <set>
++
++#include "base/compiler_specific.h"
++#include "base/memory/ref_counted.h"
++#include "base/threading/thread.h"
++#include "media/audio/audio_manager_base.h"
++
++namespace media {
++
++class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase {
++ public:
++  AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
++                   AudioLogFactory* audio_log_factory);
++
++  AudioManagerSndio(const AudioManagerSndio&) = delete;
++  AudioManagerSndio& operator=(const AudioManagerSndio&) = delete;
++
++  ~AudioManagerSndio() override;
++
++  // Implementation of AudioManager.
++  bool HasAudioOutputDevices() override;
++  bool HasAudioInputDevices() override;
++  void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
++  void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
++  AudioParameters GetInputStreamParameters(
++      const std::string& device_id) override;
++  const char* GetName() override;
++
++  // Implementation of AudioManagerBase.
++  AudioOutputStream* MakeLinearOutputStream(
++      const AudioParameters& params,
++      const LogCallback& log_callback) override;
++  AudioOutputStream* MakeLowLatencyOutputStream(
++      const AudioParameters& params,
++      const std::string& device_id,
++      const LogCallback& log_callback) override;
++  AudioInputStream* MakeLinearInputStream(
++      const AudioParameters& params,
++      const std::string& device_id,
++      const LogCallback& log_callback) override;
++  AudioInputStream* MakeLowLatencyInputStream(
++      const AudioParameters& params,
++      const std::string& device_id,
++      const LogCallback& log_callback) override;
++
++ protected:
++  AudioParameters GetPreferredOutputStreamParameters(
++      const std::string& output_device_id,
++      const AudioParameters& input_params) override;
++
++ private:
++  // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
++  AudioOutputStream* MakeOutputStream(const AudioParameters& params);
++  AudioInputStream* MakeInputStream(const AudioParameters& params);
++};
++
++}  // namespace media
++
++#endif  // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc
new file mode 100644
index 0000000000..4848db0a98
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.cc
@@ -0,0 +1,209 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/sndio/sndio_input.cc.orig	2024-12-21 10:25:10.411774574 +0000
++++ src/3rdparty/chromium/media/audio/sndio/sndio_input.cc
+@@ -0,0 +1,200 @@
++// Copyright 2013 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 "base/logging.h"
++#include "media/base/audio_timestamp_helper.h"
++#include "media/audio/sndio/audio_manager_sndio.h"
++#include "media/audio/audio_manager.h"
++#include "media/audio/sndio/sndio_input.h"
++
++namespace media {
++
++static const SampleFormat kSampleFormat = kSampleFormatS16;
++
++void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
++{
++  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
++
++  self->hw_delay += delta;
++}
++
++void *SndioAudioInputStream::ThreadEntry(void *arg) {
++  SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
++
++  self->ThreadLoop();
++  return NULL;
++}
++
++SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
++                                             const std::string& device_name,
++                                             const AudioParameters& params)
++    : manager(manager),
++      params(params),
++      audio_bus(AudioBus::Create(params)),
++      state(kClosed) {
++}
++
++SndioAudioInputStream::~SndioAudioInputStream() {
++  if (state != kClosed)
++    Close();
++}
++
++AudioInputStream::OpenOutcome SndioAudioInputStream::Open() {
++  struct sio_par par;
++  int sig;
++
++  if (state != kClosed)
++    return OpenOutcome::kFailed;
++
++  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
++      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
++    LOG(WARNING) << "Unsupported audio format.";
++    return OpenOutcome::kFailed;
++  }
++
++  sio_initpar(&par);
++  par.rate = params.sample_rate();
++  par.rchan = params.channels();
++  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
++  par.bps = par.bits / 8;
++  par.sig = sig = par.bits != 8 ? 1 : 0;
++  par.le = SIO_LE_NATIVE;
++  par.appbufsz = params.frames_per_buffer();
++
++  hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
++
++  if (hdl == NULL) {
++    LOG(ERROR) << "Couldn't open audio device.";
++    return OpenOutcome::kFailed;
++  }
++
++  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
++    LOG(ERROR) << "Couldn't set audio parameters.";
++    goto bad_close;
++  }
++
++  if (par.rate  != (unsigned int)params.sample_rate() ||
++      par.rchan != (unsigned int)params.channels() ||
++      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
++      par.sig   != (unsigned int)sig ||
++      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
++      (par.bits != par.bps * 8)) {
++    LOG(ERROR) << "Unsupported audio parameters.";
++    goto bad_close;
++  }
++  state = kStopped;
++  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
++  sio_onmove(hdl, &OnMoveCallback, this);
++  return OpenOutcome::kSuccess;
++bad_close:
++  sio_close(hdl);
++  return OpenOutcome::kFailed;
++}
++
++void SndioAudioInputStream::Start(AudioInputCallback* cb) {
++
++  StartAgc();
++
++  state = kRunning;
++  hw_delay = 0;
++  callback = cb;
++  sio_start(hdl);
++  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
++    LOG(ERROR) << "Failed to create real-time thread for recording.";
++    sio_stop(hdl);
++    state = kStopped;
++  }
++}
++
++void SndioAudioInputStream::Stop() {
++
++  if (state == kStopped)
++    return;
++
++  state = kStopWait;
++  pthread_join(thread, NULL);
++  sio_stop(hdl);
++  state = kStopped;
++
++  StopAgc();
++}
++
++void SndioAudioInputStream::Close() {
++
++  if (state == kClosed)
++    goto release;
++
++  if (state == kRunning)
++    Stop();
++
++  state = kClosed;
++  delete [] buffer;
++  sio_close(hdl);
++
++release:
++  manager->ReleaseInputStream(this);
++}
++
++double SndioAudioInputStream::GetMaxVolume() {
++  // Not supported
++  return 0.0;
++}
++
++void SndioAudioInputStream::SetVolume(double volume) {
++  // Not supported. Do nothing.
++}
++
++double SndioAudioInputStream::GetVolume() {
++  // Not supported.
++  return 0.0;
++}
++
++bool SndioAudioInputStream::IsMuted() {
++  // Not supported.
++  return false;
++}
++
++void SndioAudioInputStream::SetOutputDeviceForAec(
++    const std::string& output_device_id) {
++  // Not supported.
++}
++
++void SndioAudioInputStream::ThreadLoop(void) {
++  size_t todo, n;
++  char *data;
++  unsigned int nframes;
++  double normalized_volume = 0.0;
++
++  nframes = audio_bus->frames();
++
++  while (state == kRunning && !sio_eof(hdl)) {
++
++    GetAgcVolume(&normalized_volume);
++
++    // read one block
++    todo = nframes * params.GetBytesPerFrame(kSampleFormat);
++    data = buffer;
++    while (todo > 0) {
++      n = sio_read(hdl, data, todo);
++      if (n == 0)
++        return;	// unrecoverable I/O error
++      todo -= n;
++      data += n;
++    }
++    hw_delay -= nframes;
++
++    // convert frames count to TimeDelta
++    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
++      params.sample_rate());
++
++    // push into bus
++    audio_bus->FromInterleaved<SignedInt16SampleTypeTraits>(reinterpret_cast<int16_t*>(buffer), nframes);
++
++
++    // invoke callback
++    callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1., {});
++  }
++}
++
++}  // namespace media
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.h
new file mode 100644
index 0000000000..c3e3069992
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__input.h
@@ -0,0 +1,100 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/sndio/sndio_input.h.orig	2024-12-21 10:25:10.412355655 +0000
++++ src/3rdparty/chromium/media/audio/sndio/sndio_input.h
+@@ -0,0 +1,91 @@
++// Copyright 2013 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 MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
++#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
++
++#include <stdint.h>
++#include <string>
++#include <sndio.h>
++
++#include "base/compiler_specific.h"
++#include "base/memory/weak_ptr.h"
++#include "base/time/time.h"
++#include "media/audio/agc_audio_stream.h"
++#include "media/audio/audio_io.h"
++#include "media/audio/audio_device_description.h"
++#include "media/base/audio_parameters.h"
++
++namespace media {
++
++class AudioManagerBase;
++
++// Implementation of AudioOutputStream using sndio(7)
++class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
++ public:
++  // Pass this to the constructor if you want to attempt auto-selection
++  // of the audio recording device.
++  static const char kAutoSelectDevice[];
++
++  // Create a PCM Output stream for the SNDIO device identified by
++  // |device_name|. If unsure of what to use for |device_name|, use
++  // |kAutoSelectDevice|.
++  SndioAudioInputStream(AudioManagerBase* audio_manager,
++                     const std::string& device_name,
++                     const AudioParameters& params);
++
++  SndioAudioInputStream(const SndioAudioInputStream&) = delete;
++  SndioAudioInputStream& operator=(const SndioAudioInputStream&) = delete;
++
++  ~SndioAudioInputStream() override;
++
++  // Implementation of AudioInputStream.
++  OpenOutcome Open() override;
++  void Start(AudioInputCallback* callback) override;
++  void Stop() override;
++  void Close() override;
++  double GetMaxVolume() override;
++  void SetVolume(double volume) override;
++  double GetVolume() override;
++  bool IsMuted() override;
++  void SetOutputDeviceForAec(const std::string& output_device_id) override;
++
++ private:
++
++  enum StreamState {
++    kClosed,            // Not opened yet
++    kStopped,           // Device opened, but not started yet
++    kRunning,           // Started, device playing
++    kStopWait           // Stopping, waiting for the real-time thread to exit
++  };
++
++  // C-style call-backs
++  static void OnMoveCallback(void *arg, int delta);
++  static void* ThreadEntry(void *arg);
++
++  // Continuously moves data from the device to the consumer
++  void ThreadLoop();
++  // Our creator, the audio manager needs to be notified when we close.
++  AudioManagerBase* manager;
++  // Parameters of the source
++  AudioParameters params;
++  // We store data here for consumer
++  std::unique_ptr<AudioBus> audio_bus;
++  // Call-back that consumes recorded data
++  AudioInputCallback* callback;  // Valid during a recording session.
++  // Handle of the audio device
++  struct sio_hdl* hdl;
++  // Current state of the stream
++  enum StreamState state;
++  // High priority thread running ThreadLoop()
++  pthread_t thread;
++  // Number of frames buffered in the hardware
++  int hw_delay;
++  // Temporary buffer where data is stored sndio-compatible format
++  char* buffer;
++};
++
++}  // namespace media
++
++#endif  // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.cc
new file mode 100644
index 0000000000..a7320710e1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.cc
@@ -0,0 +1,196 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/sndio/sndio_output.cc.orig	2024-12-21 10:25:10.412830019 +0000
++++ src/3rdparty/chromium/media/audio/sndio/sndio_output.cc
+@@ -0,0 +1,187 @@
++// Copyright (c) 2012 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 "base/logging.h"
++#include "base/time/time.h"
++#include "base/time/default_tick_clock.h"
++#include "media/audio/audio_manager_base.h"
++#include "media/base/audio_timestamp_helper.h"
++#include "media/audio/sndio/sndio_output.h"
++
++namespace media {
++
++static const SampleFormat kSampleFormat = kSampleFormatS16;
++
++void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
++  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
++
++  self->hw_delay -= delta;
++}
++
++void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
++  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
++
++  self->vol = vol;
++}
++
++void *SndioAudioOutputStream::ThreadEntry(void *arg) {
++  SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
++
++  self->ThreadLoop();
++  return NULL;
++}
++
++SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
++                                               AudioManagerBase* manager)
++    : manager(manager),
++      params(params),
++      audio_bus(AudioBus::Create(params)),
++      state(kClosed),
++      mutex(PTHREAD_MUTEX_INITIALIZER) {
++}
++
++SndioAudioOutputStream::~SndioAudioOutputStream() {
++  if (state != kClosed)
++    Close();
++}
++
++bool SndioAudioOutputStream::Open() {
++  if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
++      params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
++    LOG(WARNING) << "Unsupported audio format.";
++    return false;
++  }
++  state = kStopped;
++  volpending = 0;
++  vol = SIO_MAXVOL;
++  buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
++  return true;
++}
++
++void SndioAudioOutputStream::Close() {
++  if (state == kClosed)
++    goto release;
++  if (state == kRunning)
++    Stop();
++  state = kClosed;
++  delete [] buffer;
++release:
++  manager->ReleaseOutputStream(this);  // Calls the destructor
++}
++
++void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
++  struct sio_par par;
++  int sig;
++
++  sio_initpar(&par);
++  par.rate = params.sample_rate();
++  par.pchan = params.channels();
++  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
++  par.bps = par.bits / 8;
++  par.sig = sig = par.bits != 8 ? 1 : 0;
++  par.le = SIO_LE_NATIVE;
++  par.appbufsz = params.frames_per_buffer();
++
++  hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
++  if (hdl == NULL) {
++    LOG(ERROR) << "Couldn't open audio device.";
++    return;
++  }
++  if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
++    LOG(ERROR) << "Couldn't set audio parameters.";
++    sio_close(hdl);
++    return;
++  }
++  if (par.rate  != (unsigned int)params.sample_rate() ||
++      par.pchan != (unsigned int)params.channels() ||
++      par.bits  != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
++      par.sig   != (unsigned int)sig ||
++      (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
++      (par.bits != par.bps * 8)) {
++    LOG(ERROR) << "Unsupported audio parameters.";
++    sio_close(hdl);
++    return;
++  }
++
++  sio_onmove(hdl, &OnMoveCallback, this);
++  sio_onvol(hdl, &OnVolCallback, this);
++
++  state = kRunning;
++  hw_delay = 0;
++  source = callback;
++  sio_start(hdl);
++
++  if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
++    LOG(ERROR) << "Failed to create real-time thread.";
++    sio_stop(hdl);
++    sio_close(hdl);
++    state = kStopped;
++  }
++}
++
++void SndioAudioOutputStream::Stop() {
++  if (state == kStopped)
++    return;
++  state = kStopWait;
++  pthread_join(thread, NULL);
++  sio_stop(hdl);
++  sio_close(hdl);
++  state = kStopped;
++}
++
++void SndioAudioOutputStream::SetVolume(double v) {
++  pthread_mutex_lock(&mutex);
++  vol = v * SIO_MAXVOL;
++  volpending = 1;
++  pthread_mutex_unlock(&mutex);
++}
++
++void SndioAudioOutputStream::GetVolume(double* v) {
++  pthread_mutex_lock(&mutex);
++  *v = vol * (1. / SIO_MAXVOL);
++  pthread_mutex_unlock(&mutex);
++}
++
++// This stream is always used with sub second buffer sizes, where it's
++// sufficient to simply always flush upon Start().
++void SndioAudioOutputStream::Flush() {}
++
++void SndioAudioOutputStream::ThreadLoop(void) {
++  int avail, count, result;
++
++  while (state == kRunning) {
++    // Update volume if needed
++    pthread_mutex_lock(&mutex);
++    if (volpending) {
++      volpending = 0;
++      sio_setvol(hdl, vol);
++    }
++    pthread_mutex_unlock(&mutex);
++
++    // Get data to play
++    const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
++	params.sample_rate());
++    count = source->OnMoreData(delay, base::TimeTicks::Now(), {}, audio_bus.get());
++    audio_bus->ToInterleaved<SignedInt16SampleTypeTraits>(count, reinterpret_cast<int16_t*>(buffer));
++    if (count == 0) {
++      // We have to submit something to the device
++      count = audio_bus->frames();
++      memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
++      LOG(WARNING) << "No data to play, running empty cycle.";
++    }
++
++    // Submit data to the device
++    avail = count * params.GetBytesPerFrame(kSampleFormat);
++    result = sio_write(hdl, buffer, avail);
++    if (result == 0) {
++      LOG(WARNING) << "Audio device disconnected.";
++      break;
++    }
++
++    // Update hardware pointer
++    hw_delay += count;
++  }
++}
++
++}  // namespace media
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.h
new file mode 100644
index 0000000000..c158e4b65e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_audio_sndio_sndio__output.h
@@ -0,0 +1,97 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/audio/sndio/sndio_output.h.orig	2024-12-21 10:25:10.413377576 +0000
++++ src/3rdparty/chromium/media/audio/sndio/sndio_output.h
+@@ -0,0 +1,88 @@
++// Copyright (c) 2012 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 MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
++#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
++
++#include <pthread.h>
++#include <sndio.h>
++
++#include "base/time/tick_clock.h"
++#include "base/time/time.h"
++#include "media/audio/audio_io.h"
++
++namespace media {
++
++class AudioManagerBase;
++
++// Implementation of AudioOutputStream using sndio(7)
++class SndioAudioOutputStream : public AudioOutputStream {
++ public:
++  // The manager is creating this object
++  SndioAudioOutputStream(const AudioParameters& params,
++                         AudioManagerBase* manager);
++
++  SndioAudioOutputStream(const SndioAudioOutputStream&) = delete;
++  SndioAudioOutputStream& operator=(const SndioAudioOutputStream&) = delete;
++
++  virtual ~SndioAudioOutputStream();
++
++  // Implementation of AudioOutputStream.
++  bool Open() override;
++  void Close() override;
++  void Start(AudioSourceCallback* callback) override;
++  void Stop() override;
++  void SetVolume(double volume) override;
++  void GetVolume(double* volume) override;
++  void Flush() override;
++
++  friend void sndio_onmove(void *arg, int delta);
++  friend void sndio_onvol(void *arg, unsigned int vol);
++  friend void *sndio_threadstart(void *arg);
++
++ private:
++  enum StreamState {
++    kClosed,            // Not opened yet
++    kStopped,           // Device opened, but not started yet
++    kRunning,           // Started, device playing
++    kStopWait           // Stopping, waiting for the real-time thread to exit
++  };
++
++  // C-style call-backs
++  static void OnMoveCallback(void *arg, int delta);
++  static void OnVolCallback(void *arg, unsigned int vol);
++  static void* ThreadEntry(void *arg);
++
++  // Continuously moves data from the producer to the device
++  void ThreadLoop(void);
++
++  // Our creator, the audio manager needs to be notified when we close.
++  AudioManagerBase* manager;
++  // Parameters of the source
++  AudioParameters params;
++  // Source stores data here
++  std::unique_ptr<AudioBus> audio_bus;
++  // Call-back that produces data to play
++  AudioSourceCallback* source;
++  // Handle of the audio device
++  struct sio_hdl* hdl;
++  // Current state of the stream
++  enum StreamState state;
++  // High priority thread running ThreadLoop()
++  pthread_t thread;
++  // Protects vol, volpending and hw_delay
++  pthread_mutex_t mutex;
++  // Current volume in the 0..SIO_MAXVOL range
++  int vol;
++  // Set to 1 if volumes must be refreshed in the realtime thread
++  int volpending;
++  // Number of frames buffered in the hardware
++  int hw_delay;
++  // Temporary buffer where data is stored sndio-compatible format
++  char* buffer;
++};
++
++}  // namespace media
++
++#endif  // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_audio__latency.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_audio__latency.cc
new file mode 100644
index 0000000000..c7c80cc926
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_audio__latency.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/base/audio_latency.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/base/audio_latency.cc
+@@ -148,7 +148,7 @@ int AudioLatency::GetRtcBufferSize(int s
+   }
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // On Linux, MacOS and Fuchsia, the low level IO implementations on the
+   // browser side supports all buffer size the clients want. We use the native
+   // peer connection buffer size (10ms) to achieve best possible performance.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_libaom__thread__wrapper.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_libaom__thread__wrapper.cc
new file mode 100644
index 0000000000..120c1dd2e4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_libaom__thread__wrapper.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/base/libaom_thread_wrapper.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/base/libaom_thread_wrapper.cc
+@@ -5,16 +5,20 @@
+ #include "base/logging.h"
+ #include "media/base/codec_worker_impl.h"
+ #include "media/base/libvpx_thread_wrapper.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "third_party/libaom/source/libaom/aom_util/aom_thread.h"
++#endif
+ 
+ namespace media {
+ 
+ void InitLibAomThreadWrapper() {
++#if !BUILDFLAG(IS_BSD)
+   const AVxWorkerInterface interface =
+       CodecWorkerImpl<AVxWorkerInterface, AVxWorkerImpl, AVxWorker,
+                       AVxWorkerStatus, NOT_OK, OK,
+                       WORK>::GetCodecWorkerInterface();
+   CHECK(aom_set_worker_interface(&interface));
++#endif
+ }
+ 
+ }  // namespace media
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_libvpx__thread__wrapper.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_libvpx__thread__wrapper.cc
new file mode 100644
index 0000000000..a9f765a375
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_libvpx__thread__wrapper.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/base/libvpx_thread_wrapper.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/base/libvpx_thread_wrapper.cc
+@@ -5,17 +5,21 @@
+ #include "media/base/libvpx_thread_wrapper.h"
+ 
+ #include "media/base/codec_worker_impl.h"
++#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_NETBSD)
+ #include "third_party/libvpx/source/libvpx/vpx_util/vpx_thread.h"
++#endif
+ 
+ namespace media {
+ 
+ void InitLibVpxThreadWrapper() {
++#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_NETBSD)
+   const VPxWorkerInterface interface =
+       CodecWorkerImpl<VPxWorkerInterface, VPxWorkerImpl, VPxWorker,
+                       VPxWorkerStatus, NOT_OK, OK,
+                       WORK>::GetCodecWorkerInterface();
+ 
+   CHECK(vpx_set_worker_interface(&interface));
++#endif
+ }
+ 
+ }  // namespace media
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_media__switches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_media__switches.cc
new file mode 100644
index 0000000000..7dbcae0bfb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_media__switches.cc
@@ -0,0 +1,130 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/base/media_switches.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/base/media_switches.cc
+@@ -21,7 +21,7 @@
+ #include "ui/gl/gl_features.h"
+ #include "ui/gl/gl_utils.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/cpu.h"
+ #endif
+ 
+@@ -61,7 +61,7 @@ const char kReportVp9AsAnUnsupportedMime
+     "report-vp9-as-an-unsupported-mime-type";
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
+-    BUILDFLAG(IS_SOLARIS)
++    BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_NETBSD)
+ // The Alsa device to use when opening an audio input stream.
+ const char kAlsaInputDevice[] = "alsa-input-device";
+ // The Alsa device to use when opening an audio stream.
+@@ -370,7 +370,7 @@ BASE_FEATURE(kMacLoopbackAudioForScreenS
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enables system audio mirroring using pulseaudio.
+ BASE_FEATURE(kPulseaudioLoopbackForCast,
+              "PulseaudioLoopbackForCast",
+@@ -380,6 +380,31 @@ BASE_FEATURE(kPulseaudioLoopbackForCast,
+ BASE_FEATURE(kPulseaudioLoopbackForScreenShare,
+              "PulseaudioLoopbackForScreenShare",
+              base::FEATURE_DISABLED_BY_DEFAULT);
++
++BASE_FEATURE(kAudioBackend,
++             "AudioBackend",
++             base::FEATURE_ENABLED_BY_DEFAULT);
++
++constexpr base::FeatureParam<AudioBackend>::Option
++    kAudioBackendOptions[] = {
++        {AudioBackend::kAuto,
++         "auto"},
++        {AudioBackend::kAudioIO, "audioio"},
++        {AudioBackend::kPulseAudio, "pulseaudio"},
++        {AudioBackend::kSndio, "sndio"},
++        {AudioBackend::kAlsa, "alsa"}};
++
++const base::FeatureParam<AudioBackend>
++    kAudioBackendParam{
++        &kAudioBackend, "audio-backend",
++#if BUILDFLAG(IS_OPENBSD)
++        AudioBackend::kSndio,
++#elif BUILDFLAG(IS_NETBSD)
++        AudioBackend::kAudioIO,
++#elif BUILDFLAG(IS_FREEBSD)
++        AudioBackend::kAuto,
++#endif
++        &kAudioBackendOptions};
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+ // When enabled, MediaCapabilities will check with GPU Video Accelerator
+@@ -608,7 +633,7 @@ BASE_FEATURE(kUseWritePixelsYUV,
+ // Enables creating single shared image and mailbox for multi-planar formats for
+ // hardware video decoders.
+ #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \
+-    BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kUseMultiPlaneFormatForHardwareVideo,
+              "UseMultiPlaneFormatForHardwareVideo",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -719,7 +744,7 @@ BASE_FEATURE(kFallbackAfterDecodeError,
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+ // Show toolbar button that opens dialog for controlling media sessions.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kGlobalMediaControls,
+              "GlobalMediaControls",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -743,7 +768,7 @@ BASE_FEATURE(kGlobalMediaControlsCrOSUpd
+ 
+ #if !BUILDFLAG(IS_ANDROID)
+ // If enabled, users can request Media Remoting without fullscreen-in-tab.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kMediaRemotingWithoutFullscreen,
+              "MediaRemotingWithoutFullscreen",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -756,7 +781,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullsc
+ 
+ // Show picture-in-picture button in Global Media Controls.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kGlobalMediaControlsPictureInPicture,
+              "GlobalMediaControlsPictureInPicture",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -788,7 +813,7 @@ BASE_FEATURE(kUnifiedAutoplay,
+              "UnifiedAutoplay",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Enable vaapi video decoding on linux. This is already enabled by default on
+ // chromeos, but needs an experiment on linux.
+ BASE_FEATURE(kVaapiVideoDecodeLinux,
+@@ -981,7 +1006,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK,
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ 
+ // Live Caption can be used in multiple languages, as opposed to just English.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kLiveCaptionMultiLanguage,
+              "LiveCaptionMultiLanguage",
+              base::FEATURE_ENABLED_BY_DEFAULT);
+@@ -1455,7 +1480,7 @@ BASE_FEATURE(kUseOutOfProcessVideoDecodi
+ #endif
+ #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Spawn utility processes to perform hardware encode acceleration instead of
+ // using the GPU process.
+ BASE_FEATURE(kUseOutOfProcessVideoEncoding,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_media__switches.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_media__switches.h
new file mode 100644
index 0000000000..16034069a0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_media__switches.h
@@ -0,0 +1,68 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/base/media_switches.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/base/media_switches.h
+@@ -43,7 +43,7 @@ MEDIA_EXPORT extern const char kDisableB
+ MEDIA_EXPORT extern const char kReportVp9AsAnUnsupportedMimeType[];
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \
+-    BUILDFLAG(IS_SOLARIS)
++    BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_NETBSD)
+ MEDIA_EXPORT extern const char kAlsaInputDevice[];
+ MEDIA_EXPORT extern const char kAlsaOutputDevice[];
+ #endif
+@@ -307,9 +307,22 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatf
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare);
++
++enum class AudioBackend {
++  kAuto,
++  kPulseAudio,
++  kSndio,
++  kAudioIO,
++  kAlsa
++};
++
++MEDIA_EXPORT BASE_DECLARE_FEATURE(kAudioBackend);
++MEDIA_EXPORT extern const base::FeatureParam<
++    AudioBackend>
++    kAudioBackendParam;
+ #endif  // BUILDFLAG(IS_LINUX)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordMediaEngagementScores);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordWebAudioEngagement);
+@@ -325,7 +338,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifi
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamForWebRTC);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux);
+@@ -344,7 +357,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapi
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding);
+ #endif  // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder);
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+@@ -471,7 +484,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExpos
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding);
+ #endif  // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_user__input__monitor__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_user__input__monitor__unittest.cc
new file mode 100644
index 0000000000..6b338c1ea8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_user__input__monitor__unittest.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/base/user_input_monitor_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/base/user_input_monitor_unittest.cc
+@@ -13,7 +13,7 @@
+ #include "build/build_config.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/file_descriptor_watcher_posix.h"
+ #endif
+ 
+@@ -49,7 +49,7 @@ class UserInputMonitorTest : public test
+ }  // namespace
+ 
+ TEST_F(UserInputMonitorTest, CreatePlatformSpecific) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::test::TaskEnvironment task_environment(
+       base::test::TaskEnvironment::MainThreadType::IO);
+ #else
+@@ -72,7 +72,7 @@ TEST_F(UserInputMonitorTest, CreatePlatf
+ }
+ 
+ TEST_F(UserInputMonitorTest, CreatePlatformSpecificWithMapping) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::test::TaskEnvironment task_environment(
+       base::test::TaskEnvironment::MainThreadType::IO);
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_video__frame.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_video__frame.cc
new file mode 100644
index 0000000000..ab15b689d7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_video__frame.cc
@@ -0,0 +1,80 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/base/video_frame.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/base/video_frame.cc
+@@ -80,7 +80,7 @@ std::string VideoFrame::StorageTypeToStr
+       return "OWNED_MEMORY";
+     case VideoFrame::STORAGE_SHMEM:
+       return "SHMEM";
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case VideoFrame::STORAGE_DMABUFS:
+       return "DMABUFS";
+ #endif
+@@ -95,7 +95,7 @@ std::string VideoFrame::StorageTypeToStr
+ // static
+ bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) {
+   return
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // This is not strictly needed but makes explicit that, at VideoFrame
+       // level, DmaBufs are not mappable from userspace.
+       storage_type != VideoFrame::STORAGE_DMABUFS &&
+@@ -306,7 +306,7 @@ static absl::optional<VideoFrameLayout> 
+   return VideoFrameLayout::CreateWithPlanes(format, coded_size, planes);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // This class allows us to embed a vector<ScopedFD> into a scoped_refptr, and
+ // thus to have several VideoFrames share the same set of DMABUF FDs.
+ class VideoFrame::DmabufHolder
+@@ -636,7 +636,7 @@ scoped_refptr<VideoFrame> VideoFrame::Wr
+   for (size_t i = 0; i < num_planes; ++i)
+     planes[i].stride = gpu_memory_buffer->stride(i);
+   uint64_t modifier = gfx::NativePixmapHandle::kNoModifier;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) {
+     const auto gmb_handle = gpu_memory_buffer->CloneHandle();
+     if (gmb_handle.is_null() ||
+@@ -682,7 +682,7 @@ scoped_refptr<VideoFrame> VideoFrame::Wr
+   return frame;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ scoped_refptr<VideoFrame> VideoFrame::WrapExternalDmabufs(
+     const VideoFrameLayout& layout,
+@@ -901,7 +901,7 @@ scoped_refptr<VideoFrame> VideoFrame::Wr
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   DCHECK(frame->dmabuf_fds_);
+   // If there are any |dmabuf_fds_| plugged in, we should refer them too.
+   wrapping_frame->dmabuf_fds_ = frame->dmabuf_fds_;
+@@ -1312,7 +1312,7 @@ const gpu::MailboxHolder& VideoFrame::ma
+                         : mailbox_holders_[texture_index];
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ size_t VideoFrame::NumDmabufFds() const {
+   return dmabuf_fds_->size();
+ }
+@@ -1429,7 +1429,7 @@ VideoFrame::VideoFrame(const VideoFrameL
+       storage_type_(storage_type),
+       visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))),
+       natural_size_(natural_size),
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       dmabuf_fds_(base::MakeRefCounted<DmabufHolder>()),
+ #endif
+       timestamp_(timestamp),
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_video__frame.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_video__frame.h
new file mode 100644
index 0000000000..a4df3b89fc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_base_video__frame.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/base/video_frame.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/base/video_frame.h
+@@ -44,7 +44,7 @@
+ #include "base/apple/scoped_cftyperef.h"
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/scoped_file.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -110,7 +110,7 @@ class MEDIA_EXPORT VideoFrame : public b
+     STORAGE_UNOWNED_MEMORY = 2,  // External, non owned data pointers.
+     STORAGE_OWNED_MEMORY = 3,  // VideoFrame has allocated its own data buffer.
+     STORAGE_SHMEM = 4,         // Backed by read-only shared memory.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // 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
+@@ -313,7 +313,7 @@ class MEDIA_EXPORT VideoFrame : public b
+       ReleaseMailboxAndGpuMemoryBufferCB mailbox_holder_and_gmb_release_cb,
+       base::TimeDelta timestamp);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // 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
+@@ -593,7 +593,7 @@ class MEDIA_EXPORT VideoFrame : public b
+   // mailbox, the caller must wait for the included sync point.
+   const gpu::MailboxHolder& mailbox_holder(size_t texture_index) const;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The number of 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
+   // remaining planes. Should be > 0 for STORAGE_DMABUFS.
+@@ -811,7 +811,7 @@ class MEDIA_EXPORT VideoFrame : public b
+   // GPU memory buffer, if this frame is STORAGE_GPU_MEMORY_BUFFER.
+   std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   class DmabufHolder;
+ 
+   // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc
new file mode 100644
index 0000000000..8f4df5d190
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_create__video__capture__device__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/create_video_capture_device_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/create_video_capture_device_factory.cc
+@@ -13,7 +13,7 @@
+ #include "media/capture/video/fake_video_capture_device_factory.h"
+ #include "media/capture/video/file_video_capture_device_factory.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ #include "media/capture/video/linux/video_capture_device_factory_linux.h"
+ #elif BUILDFLAG(IS_CHROMEOS_ASH)
+ #include "media/capture/video/chromeos/public/cros_features.h"
+@@ -56,7 +56,7 @@ CreateFakeVideoCaptureDeviceFactory() {
+ std::unique_ptr<VideoCaptureDeviceFactory>
+ CreatePlatformSpecificVideoCaptureDeviceFactory(
+     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   return std::make_unique<VideoCaptureDeviceFactoryLinux>(ui_task_runner);
+ #elif BUILDFLAG(IS_CHROMEOS_ASH)
+   if (base::SysInfo::IsRunningOnChromeOS())
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc
new file mode 100644
index 0000000000..5a9710ba66
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc
+@@ -231,7 +231,7 @@ void FakeVideoCaptureDeviceFactory::GetD
+   int entry_index = 0;
+   for (const auto& entry : devices_config_) {
+     VideoCaptureApi api =
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+         VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE;
+ #elif BUILDFLAG(IS_IOS)
+         VideoCaptureApi::UNKNOWN;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc
new file mode 100644
index 0000000000..e11443ec64
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/file_video_capture_device_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/file_video_capture_device_factory.cc
+@@ -52,7 +52,7 @@ void FileVideoCaptureDeviceFactory::GetD
+       VideoCaptureApi::WIN_DIRECT_SHOW;
+ #elif BUILDFLAG(IS_MAC)
+       VideoCaptureApi::MACOSX_AVFOUNDATION;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE;
+ #else
+       VideoCaptureApi::UNKNOWN;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc
new file mode 100644
index 0000000000..7bf4462b1f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.cc
+@@ -562,7 +562,7 @@ int FakeV4L2Impl::close(int fd) {
+   return kSuccessReturnValue;
+ }
+ 
+-int FakeV4L2Impl::ioctl(int fd, int request, void* argp) {
++int FakeV4L2Impl::ioctl(int fd, unsigned long request, void* argp) {
+   base::AutoLock lock(lock_);
+   auto device_iter = opened_devices_.find(fd);
+   if (device_iter == opened_devices_.end())
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h
new file mode 100644
index 0000000000..64225fee22
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_fake__v4l2__impl.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/fake_v4l2_impl.h
+@@ -8,7 +8,13 @@
+ #include <map>
+ #include <string>
+ 
++#include "build/build_config.h"
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++#include <sys/videoio.h>
++typedef __uint32_t __u32;
++#else
+ #include <linux/videodev2.h>
++#endif
+ 
+ #include "base/synchronization/lock.h"
+ #include "media/capture/capture_export.h"
+@@ -38,7 +44,7 @@ class CAPTURE_EXPORT FakeV4L2Impl : publ
+   // Implementation of V4L2CaptureDevice interface:
+   int open(const char* device_name, int flags) override;
+   int close(int fd) override;
+-  int ioctl(int fd, int request, void* argp) override;
++  int ioctl(int fd, unsigned long request, void* argp) override;
+   void* mmap(void* start,
+              size_t length,
+              int prot,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc
new file mode 100644
index 0000000000..795e3ace82
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc
@@ -0,0 +1,183 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc
+@@ -5,8 +5,10 @@
+ #include "media/capture/video/linux/v4l2_capture_delegate.h"
+ 
+ #include <fcntl.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <linux/version.h>
+ #include <linux/videodev2.h>
++#endif
+ #include <poll.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+@@ -29,17 +31,19 @@
+ #include "media/capture/video/blob_utils.h"
+ #include "media/capture/video/linux/video_capture_device_linux.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "media/capture/capture_switches.h"
+ #include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h"
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+ using media::mojom::MeteringMode;
+ 
++#if !BUILDFLAG(IS_BSD)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+ // 16 bit depth, Realsense F200.
+ #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ')
+ #endif
++#endif
+ 
+ // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the
+ // format is introduced to kernel.
+@@ -49,6 +53,14 @@ using media::mojom::MeteringMode;
+ #define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z')
+ #endif
+ 
++#ifndef V4L2_COLORSPACE_OPRGB
++#define V4L2_COLORSPACE_OPRGB V4L2_COLORSPACE_ADOBERGB
++#endif
++
++#ifndef V4L2_XFER_FUNC_OPRGB
++#define V4L2_XFER_FUNC_OPRGB V4L2_XFER_FUNC_ADOBERGB
++#endif
++
+ namespace media {
+ 
+ namespace {
+@@ -268,7 +280,7 @@ bool V4L2CaptureDelegate::IsBlockedContr
+ // static
+ bool V4L2CaptureDelegate::IsControllableControl(
+     int control_id,
+-    const base::RepeatingCallback<int(int, void*)>& do_ioctl) {
++    const base::RepeatingCallback<int(unsigned int, void*)>& do_ioctl) {
+   const int special_control_id = GetControllingSpecialControl(control_id);
+   if (!special_control_id) {
+     // The control is not controlled by a special control thus the control is
+@@ -324,7 +336,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate
+       is_capturing_(false),
+       timeout_count_(0),
+       rotation_(rotation) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   use_gpu_buffer_ = switches::IsVideoCaptureUseGpuMemoryBufferEnabled();
+ #endif  // BUILDFLAG(IS_LINUX)
+ }
+@@ -451,7 +463,7 @@ void V4L2CaptureDelegate::AllocateAndSta
+ 
+   client_->OnStarted();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (use_gpu_buffer_) {
+     v4l2_gpu_helper_ = std::make_unique<V4L2CaptureDelegateGpuHelper>(
+         std::move(gmb_support_test_));
+@@ -801,7 +813,7 @@ void V4L2CaptureDelegate::SetGPUEnvironm
+ 
+ V4L2CaptureDelegate::~V4L2CaptureDelegate() = default;
+ 
+-bool V4L2CaptureDelegate::RunIoctl(int request, void* argp) {
++bool V4L2CaptureDelegate::RunIoctl(unsigned int request, void* argp) {
+   int num_retries = 0;
+   for (; DoIoctl(request, argp) < 0 && num_retries < kMaxIOCtrlRetries;
+        ++num_retries) {
+@@ -811,7 +823,7 @@ bool V4L2CaptureDelegate::RunIoctl(int r
+   return num_retries != kMaxIOCtrlRetries;
+ }
+ 
+-int V4L2CaptureDelegate::DoIoctl(int request, void* argp) {
++int V4L2CaptureDelegate::DoIoctl(unsigned int request, void* argp) {
+   return HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), request, argp));
+ }
+ 
+@@ -822,6 +834,7 @@ bool V4L2CaptureDelegate::IsControllable
+ }
+ 
+ void V4L2CaptureDelegate::ReplaceControlEventSubscriptions() {
++#if !BUILDFLAG(IS_BSD)
+   constexpr uint32_t kControlIds[] = {V4L2_CID_AUTO_EXPOSURE_BIAS,
+                                       V4L2_CID_AUTO_WHITE_BALANCE,
+                                       V4L2_CID_BRIGHTNESS,
+@@ -849,6 +862,7 @@ void V4L2CaptureDelegate::ReplaceControl
+                   << ", {type = V4L2_EVENT_CTRL, id = " << control_id << "}";
+     }
+   }
++#endif
+ }
+ 
+ mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) {
+@@ -1029,7 +1043,11 @@ void V4L2CaptureDelegate::DoCapture() {
+ 
+   pollfd device_pfd = {};
+   device_pfd.fd = device_fd_.get();
++#if !BUILDFLAG(IS_BSD)
+   device_pfd.events = POLLIN | POLLPRI;
++#else
++  device_pfd.events = POLLIN;
++#endif
+ 
+   const int result =
+       HANDLE_EINTR(v4l2_->poll(&device_pfd, 1, kCaptureTimeoutMs));
+@@ -1049,6 +1067,12 @@ void V4L2CaptureDelegate::DoCapture() {
+       // in older kernels, and stopping and starting the stream gets the camera
+       // out of this bad state. Upgrading the kernel is difficult so this is our
+       // way out for now.
++#if BUILDFLAG(IS_NETBSD)
++      // On NetBSD cause: StartStream@media/capture/video/linux/v4l2_capture_delegate.cc:1017,
++      // Error requesting MMAP buffers from V4L2, OS message: Device busy (16)
++      // so do nothing, just wait for timeout_count_ >= kContinuousTimeoutLimit
++      DLOG(WARNING) << "DoCapture: poll timeout";
++#else
+       DLOG(WARNING) << "Restarting camera stream";
+       if (!StopStream() || !StartStream())
+         return;
+@@ -1056,6 +1080,7 @@ void V4L2CaptureDelegate::DoCapture() {
+           FROM_HERE,
+           base::BindOnce(&V4L2CaptureDelegate::DoCapture, GetWeakPtr()));
+       return;
++#endif
+     } else if (timeout_count_ >= kContinuousTimeoutLimit) {
+       SetErrorState(
+           VideoCaptureError::kV4L2MultipleContinuousTimeoutsWhileReadPolling,
+@@ -1067,6 +1092,7 @@ void V4L2CaptureDelegate::DoCapture() {
+     timeout_count_ = 0;
+   }
+ 
++#if !BUILDFLAG(IS_BSD)
+   // Dequeue events if the driver has filled in some.
+   if (device_pfd.revents & POLLPRI) {
+     bool controls_changed = false;
+@@ -1102,6 +1128,7 @@ void V4L2CaptureDelegate::DoCapture() {
+       client_->OnCaptureConfigurationChanged();
+     }
+   }
++#endif
+ 
+   // Deenqueue, send and reenqueue a buffer if the driver has filled one in.
+   if (device_pfd.revents & POLLIN) {
+@@ -1155,7 +1182,7 @@ void V4L2CaptureDelegate::DoCapture() {
+       // workable on Linux.
+ 
+       // See http://crbug.com/959919.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       if (use_gpu_buffer_) {
+         v4l2_gpu_helper_->OnIncomingCapturedData(
+             client_.get(), buffer_tracker->start(),
+@@ -1228,7 +1255,7 @@ void V4L2CaptureDelegate::SetErrorState(
+   client_->OnError(error, from_here, reason);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() {
+   v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace;
+   v4l2_quantization v4l2_range =
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h
new file mode 100644
index 0000000000..640ff81693
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h
@@ -0,0 +1,66 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.h
+@@ -23,7 +23,7 @@
+ #include "media/capture/video/linux/v4l2_capture_device_impl.h"
+ #include "media/capture/video/video_capture_device.h"
+ 
+-#if BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_OPENBSD) || defined(OS_NETBSD)
+ #include <sys/videoio.h>
+ #else
+ #include <linux/videodev2.h>
+@@ -35,7 +35,7 @@ class Location;
+ 
+ namespace media {
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class V4L2CaptureDelegateGpuHelper;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
+@@ -86,7 +86,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
+   static bool IsBlockedControl(int control_id);
+   static bool IsControllableControl(
+       int control_id,
+-      const base::RepeatingCallback<int(int, void*)>& do_ioctl);
++      const base::RepeatingCallback<int(unsigned int, void*)>& do_ioctl);
+ 
+   void SetGPUEnvironmentForTesting(
+       std::unique_ptr<gpu::GpuMemoryBufferSupport> gmb_support);
+@@ -100,10 +100,10 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
+   // device file descriptor or (re)starting streaming, can fail but works after
+   // retrying (https://crbug.com/670262). Returns false if the |request| ioctl
+   // fails too many times.
+-  bool RunIoctl(int request, void* argp);
++  bool RunIoctl(unsigned int request, void* argp);
+ 
+   // Simple wrapper to do HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), ...)).
+-  int DoIoctl(int request, void* argp);
++  int DoIoctl(unsigned int request, void* argp);
+ 
+   // Check whether the control is controllable (and not changed automatically).
+   bool IsControllableControl(int control_id);
+@@ -133,7 +133,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
+                      const base::Location& from_here,
+                      const std::string& reason);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Systems which describe a "color space" usually map that to one or more of
+   // {primary, matrix, transfer, range}. BuildColorSpaceFromv4l2() will use the
+   // matched value as first priority. Otherwise, if there is no best matching
+@@ -167,7 +167,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
+   // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270.
+   int rotation_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Support GPU memory buffer.
+   bool use_gpu_buffer_;
+   std::unique_ptr<V4L2CaptureDelegateGpuHelper> v4l2_gpu_helper_;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device.h
new file mode 100644
index 0000000000..ce5067f369
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_device.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_device.h
+@@ -21,7 +21,7 @@ class CAPTURE_EXPORT V4L2CaptureDevice
+  public:
+   virtual int open(const char* device_name, int flags) = 0;
+   virtual int close(int fd) = 0;
+-  virtual int ioctl(int fd, int request, void* argp) = 0;
++  virtual int ioctl(int fd, unsigned long request, void* argp) = 0;
+   virtual void* mmap(void* start,
+                      size_t length,
+                      int prot,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.cc
new file mode 100644
index 0000000000..c757dcb8f6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_device_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_device_impl.cc
+@@ -22,7 +22,7 @@ int V4L2CaptureDeviceImpl::close(int fd)
+   return ::close(fd);
+ }
+ 
+-int V4L2CaptureDeviceImpl::ioctl(int fd, int request, void* argp) {
++int V4L2CaptureDeviceImpl::ioctl(int fd, unsigned long request, void* argp) {
+   return ::ioctl(fd, request, argp);
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.h
new file mode 100644
index 0000000000..bdb2c8513f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__device__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_device_impl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_device_impl.h
+@@ -19,7 +19,7 @@ class CAPTURE_EXPORT V4L2CaptureDeviceIm
+  public:
+   int open(const char* device_name, int flags) override;
+   int close(int fd) override;
+-  int ioctl(int fd, int request, void* argp) override;
++  int ioctl(int fd, unsigned long request, void* argp) override;
+   void* mmap(void* start,
+              size_t length,
+              int prot,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc
new file mode 100644
index 0000000000..496dce3391
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.cc
@@ -0,0 +1,98 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_v4l2.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_v4l2.cc
+@@ -23,7 +23,7 @@
+ #include "media/capture/video/linux/scoped_v4l2_device_fd.h"
+ #include "media/capture/video/linux/video_capture_device_linux.h"
+ 
+-#if BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
+ #include <sys/videoio.h>
+ #else
+ #include <linux/videodev2.h>
+@@ -38,6 +38,7 @@ bool CompareCaptureDevices(const VideoCa
+   return a.descriptor < b.descriptor;
+ }
+ 
++#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_NETBSD)
+ // USB VID and PID are both 4 bytes long.
+ const size_t kVidPidSize = 4;
+ const size_t kMaxInterfaceNameSize = 256;
+@@ -70,11 +71,15 @@ std::string ExtractFileNameFromDeviceId(
+   DCHECK(base::StartsWith(device_id, kDevDir, base::CompareCase::SENSITIVE));
+   return device_id.substr(strlen(kDevDir), device_id.length());
+ }
++#endif
+ 
+ class DevVideoFilePathsDeviceProvider
+     : public VideoCaptureDeviceFactoryV4L2::DeviceProvider {
+  public:
+   void GetDeviceIds(std::vector<std::string>* target_container) override {
++#if BUILDFLAG(IS_OPENBSD)
++    target_container->emplace_back("/dev/video");
++#else
+     const base::FilePath path("/dev/");
+     base::FileEnumerator enumerator(path, false, base::FileEnumerator::FILES,
+                                     "video*");
+@@ -82,9 +87,13 @@ class DevVideoFilePathsDeviceProvider
+       const base::FileEnumerator::FileInfo info = enumerator.GetInfo();
+       target_container->emplace_back(path.value() + info.GetName().value());
+     }
++#endif
+   }
+ 
+   std::string GetDeviceModelId(const std::string& device_id) override {
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++    return std::string();
++#else
+     const std::string file_name = ExtractFileNameFromDeviceId(device_id);
+     std::string usb_id;
+     const std::string vid_path =
+@@ -101,9 +110,13 @@ class DevVideoFilePathsDeviceProvider
+     }
+ 
+     return usb_id;
++#endif
+   }
+ 
+   std::string GetDeviceDisplayName(const std::string& device_id) override {
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++    return std::string();
++#else
+     const std::string file_name = ExtractFileNameFromDeviceId(device_id);
+     const std::string interface_path =
+         base::StringPrintf(kInterfacePathTemplate, file_name.c_str());
+@@ -114,6 +127,7 @@ class DevVideoFilePathsDeviceProvider
+       return std::string();
+     }
+     return display_name;
++#endif
+   }
+ };
+ 
+@@ -219,7 +233,7 @@ void VideoCaptureDeviceFactoryV4L2::GetD
+   std::move(callback).Run(std::move(devices_info));
+ }
+ 
+-int VideoCaptureDeviceFactoryV4L2::DoIoctl(int fd, int request, void* argp) {
++int VideoCaptureDeviceFactoryV4L2::DoIoctl(int fd, unsigned int request, void* argp) {
+   return HANDLE_EINTR(v4l2_->ioctl(fd, request, argp));
+ }
+ 
+@@ -279,6 +293,11 @@ std::vector<float> VideoCaptureDeviceFac
+         frame_rates.push_back(
+             frame_interval.discrete.denominator /
+             static_cast<float>(frame_interval.discrete.numerator));
++#if BUILDFLAG(IS_NETBSD)
++        // On NetBSD VIDIOC_ENUM_FRAMEINTERVALS(video_enum_frameival) always return the same values
++        // and not handle index, what is cause infinity loop. One round is enough.
++        break;
++#endif
+       }
+     } else if (frame_interval.type == V4L2_FRMIVAL_TYPE_CONTINUOUS ||
+                frame_interval.type == V4L2_FRMIVAL_TYPE_STEPWISE) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.h
new file mode 100644
index 0000000000..f3fdfb4bc7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__v4l2.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_v4l2.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_v4l2.h
+@@ -51,7 +51,7 @@ class CAPTURE_EXPORT VideoCaptureDeviceF
+ 
+  private:
+   // Simple wrapper to do HANDLE_EINTR(v4l2_->ioctl(fd, ...)).
+-  int DoIoctl(int fd, int request, void* argp);
++  int DoIoctl(int fd, unsigned int request, void* argp);
+ 
+   VideoCaptureControlSupport GetControlSupport(int fd);
+   bool GetControlSupport(int fd, int control_id);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc
new file mode 100644
index 0000000000..aef0e0356f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/linux/video_capture_device_linux.cc
+@@ -15,7 +15,7 @@
+ #include "build/build_config.h"
+ #include "media/capture/video/linux/v4l2_capture_delegate.h"
+ 
+-#if BUILDFLAG(IS_OPENBSD)
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
+ #include <sys/videoio.h>
+ #else
+ #include <linux/videodev2.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__tracker__factory__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__tracker__factory__impl.cc
new file mode 100644
index 0000000000..1182cce682
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_video__capture__buffer__tracker__factory__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/video_capture_buffer_tracker_factory_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/video_capture_buffer_tracker_factory_impl.cc
+@@ -14,7 +14,7 @@
+ #include "media/capture/video/chromeos/gpu_memory_buffer_tracker_cros.h"
+ #elif BUILDFLAG(IS_APPLE)
+ #include "media/capture/video/apple/gpu_memory_buffer_tracker_apple.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "media/capture/video/linux/v4l2_gpu_memory_buffer_tracker.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "media/capture/video/win/gpu_memory_buffer_tracker_win.h"
+@@ -42,7 +42,7 @@ VideoCaptureBufferTrackerFactoryImpl::Cr
+       return std::make_unique<GpuMemoryBufferTrackerCros>();
+ #elif BUILDFLAG(IS_APPLE)
+       return std::make_unique<GpuMemoryBufferTrackerApple>();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       return std::make_unique<V4L2GpuMemoryBufferTracker>();
+ #elif BUILDFLAG(IS_WIN)
+       if (!dxgi_device_manager_) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc
new file mode 100644
index 0000000000..95c3ed413b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc
+@@ -169,7 +169,7 @@ FourccAndFlip GetFourccAndFlipFromPixelF
+       CHECK(!is_width_odd && !is_height_odd);
+       return {libyuv::FOURCC_UYVY};
+     case media::PIXEL_FORMAT_RGB24:
+-      if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) {
++      if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) {
+         // Linux RGB24 defines red at lowest byte address,
+         // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html.
+         return {libyuv::FOURCC_RAW};
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_cdm_cdm__paths__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_cdm_cdm__paths__unittest.cc
new file mode 100644
index 0000000000..0a7a4c5a3a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_cdm_cdm__paths__unittest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/cdm/cdm_paths_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/cdm/cdm_paths_unittest.cc
+@@ -27,7 +27,7 @@ const char kComponentPlatform[] =
+     "win";
+ #elif BUILDFLAG(IS_CHROMEOS)
+     "cros";
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     "linux";
+ #elif BUILDFLAG(IS_FUCHSIA)
+     "fuchsia";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_cdm_library__cdm_cdm__paths.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_cdm_library__cdm_cdm__paths.gni
new file mode 100644
index 0000000000..b7f37d71d5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_cdm_library__cdm_cdm__paths.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/cdm/library_cdm/cdm_paths.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/cdm/library_cdm/cdm_paths.gni
+@@ -15,7 +15,7 @@ assert(enable_library_cdms)
+ # Explicitly define what we use to avoid confusion.
+ if (is_chromeos) {
+   component_os = "cros"
+-} else if (is_linux) {
++} else if (is_linux || is_bsd) {
+   component_os = "linux"
+ } else if (is_win) {
+   component_os = "win"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc
new file mode 100644
index 0000000000..5514c324f7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_buffer__validation.cc
@@ -0,0 +1,52 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/buffer_validation.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/buffer_validation.cc
+@@ -16,7 +16,7 @@
+ #include "ui/gfx/geometry/size.h"
+ #include "ui/gfx/gpu_memory_buffer.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <drm_fourcc.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -29,7 +29,7 @@
+ namespace media {
+ 
+ namespace {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #ifndef I915_FORMAT_MOD_4_TILED_MTL_MC_CCS
+ // TODO(b/271455200): Remove this definition once drm_fourcc.h contains it.
+ /*
+@@ -55,7 +55,7 @@ bool IsIntelMediaCompressedModifier(uint
+ }  // namespace
+ 
+ bool GetFileSize(const int fd, size_t* size) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (fd < 0) {
+     VLOG(1) << "Invalid file descriptor";
+     return false;
+@@ -109,14 +109,14 @@ bool VerifyGpuMemoryBufferHandle(
+     VLOG(1) << "Unsupported: " << pixel_format;
+     return false;
+   }
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   const uint64_t modifier = gmb_handle.native_pixmap_handle.modifier;
+   const bool is_intel_media_compressed_buffer =
+       IsIntelMediaCompressedModifier(modifier);
+   const bool is_intel_media_compression_enabled =
+ #if BUILDFLAG(IS_CHROMEOS)
+       base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       false;
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_gl__image__processor__backend.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_gl__image__processor__backend.cc
new file mode 100644
index 0000000000..4631ee079a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_gl__image__processor__backend.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/chromeos/gl_image_processor_backend.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/chromeos/gl_image_processor_backend.cc
+@@ -28,6 +28,10 @@
+ #include "ui/ozone/public/ozone_platform.h"
+ #include "ui/ozone/public/surface_factory_ozone.h"
+ 
++#ifndef GL_CONTEXT_LOST_KHR
++#define GL_CONTEXT_LOST_KHR 0x0507
++#endif
++
+ namespace media {
+ 
+ namespace {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_libyuv__image__processor__backend.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_libyuv__image__processor__backend.cc
new file mode 100644
index 0000000000..50ee0a5533
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_libyuv__image__processor__backend.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/chromeos/libyuv_image_processor_backend.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/chromeos/libyuv_image_processor_backend.cc
+@@ -47,7 +47,7 @@ static constexpr struct {
+ #define CONV(in, out, trans, result) \
+   {Fourcc::in, Fourcc::out, Transform::trans, SupportResult::result}
+     // Conversion.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     CONV(NV12, AR24, kConversion, Supported),
+ #endif
+     CONV(NV12, NV12, kConversion, Supported),
+@@ -430,7 +430,7 @@ int LibYUVImageProcessorBackend::DoConve
+           fr->GetWritableVisibleData(VideoFrame::kUVPlane)), \
+       fr->stride(VideoFrame::kUVPlane)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define ARGB_DATA(fr)                                 \
+   fr->GetWritableVisibleData(VideoFrame::kARGBPlane), \
+       fr->stride(VideoFrame::kARGBPlane)
+@@ -573,7 +573,7 @@ int LibYUVImageProcessorBackend::DoConve
+     }
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (output->format() == PIXEL_FORMAT_ARGB) {
+     if (input_config_.fourcc == Fourcc(Fourcc::NV12)) {
+       return LIBYUV_FUNC(NV12ToARGB, Y_UV_DATA(input),
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_mailbox__video__frame__converter.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_mailbox__video__frame__converter.cc
new file mode 100644
index 0000000000..5588917257
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_mailbox__video__frame__converter.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/chromeos/mailbox_video_frame_converter.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/chromeos/mailbox_video_frame_converter.cc
+@@ -61,7 +61,7 @@ viz::SharedImageFormat GetSharedImageFor
+                     << static_cast<int>(buffer_format);
+       NOTREACHED_NORETURN();
+   }
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // If format is true multiplanar format, we prefer external sampler on
+   // ChromeOS and Linux.
+   if (format.is_multi_plane()) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_platform__video__frame__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_platform__video__frame__utils.cc
new file mode 100644
index 0000000000..0f8df92531
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_platform__video__frame__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/chromeos/platform_video_frame_utils.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/chromeos/platform_video_frame_utils.cc
+@@ -67,7 +67,7 @@ static std::unique_ptr<ui::GbmDevice> Cr
+     const base::FilePath dev_path(FILE_PATH_LITERAL(
+         base::StrCat({drm_node_file_prefix, base::NumberToString(i)})));
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC)
+     const bool is_render_node = base::Contains(drm_node_file_prefix, "render");
+ 
+     // TODO(b/313513760): don't guard base::File::FLAG_WRITE behind
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc
new file mode 100644
index 0000000000..d8df56e0b7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_chromeos_video__decoder__pipeline.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/chromeos/video_decoder_pipeline.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/chromeos/video_decoder_pipeline.cc
+@@ -1009,14 +1009,14 @@ VideoDecoderPipeline::PickDecoderOutputF
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_VAAPI)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_VAAPI)
+   // Linux should always use a custom allocator (to allocate buffers using
+   // libva) and a PlatformVideoFramePool.
+   CHECK(allocator.has_value());
+   CHECK(main_frame_pool_->AsPlatformVideoFramePool());
+   main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator(
+       *allocator);
+-#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC)
+   // Linux w/ V4L2 should not use a custom allocator
+   // Only tested with video_decode_accelerator_tests
+   // TODO(wenst@) Test with full Chromium Browser
+@@ -1158,7 +1158,7 @@ VideoDecoderPipeline::PickDecoderOutputF
+              << " VideoFrames";
+     auxiliary_frame_pool_->set_parent_task_runner(decoder_task_runner_);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator(
+         *allocator);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc
new file mode 100644
index 0000000000..ca5c75213e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_gpu__video__encode__accelerator__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/gpu_video_encode_accelerator_factory.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/gpu_video_encode_accelerator_factory.cc
+@@ -119,7 +119,7 @@ std::vector<VEAFactoryFunction> GetVEAFa
+     return vea_factory_functions;
+ 
+ #if BUILDFLAG(USE_VAAPI)
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (base::FeatureList::IsEnabled(kVaapiVideoEncodeLinux))
+     vea_factory_functions.push_back(base::BindRepeating(&CreateVaapiVEA));
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..78d1fd182e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc
+@@ -15,7 +15,9 @@
+ #include "media/gpu/vaapi/vaapi_wrapper.h"
+ #endif
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
++#endif
+ 
+ // TODO(b/195769334): the hardware video decoding sandbox is really only useful
+ // when building with VA-API or V4L2 (otherwise, we're not really doing hardware
+@@ -31,6 +33,7 @@ using sandbox::syscall_broker::BrokerFil
+ namespace media {
+ namespace {
+ 
++#if !BUILDFLAG(IS_BSD)
+ void AllowAccessToRenderNodes(std::vector<BrokerFilePermission>& permissions,
+                               bool include_sys_dev_char,
+                               bool read_write) {
+@@ -165,6 +168,7 @@ bool HardwareVideoDecodingPreSandboxHook
+   NOTREACHED_NORETURN();
+ #endif  // BUILDFLAG(USE_V4L2_CODEC)
+ }
++#endif
+ 
+ }  // namespace
+ 
+@@ -180,6 +184,7 @@ bool HardwareVideoDecodingPreSandboxHook
+ //   (at least).
+ bool HardwareVideoDecodingPreSandboxHook(
+     sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+   using HardwareVideoDecodingProcessPolicy =
+       sandbox::policy::HardwareVideoDecodingProcessPolicy;
+   using PolicyType =
+@@ -217,6 +222,7 @@ bool HardwareVideoDecodingPreSandboxHook
+   sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess(
+       command_set, permissions, sandbox::policy::SandboxLinux::PreSandboxHook(),
+       options);
++#endif
+   return true;
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h
new file mode 100644
index 0000000000..d53950a304
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_DECODING_SANDBOX_HOOK_LINUX_H_
+ #define MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_DECODING_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace media {
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..69141cc948
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc
+@@ -18,12 +18,15 @@
+ #include "media/gpu/v4l2/v4l2_device.h"
+ #endif
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
++#endif
+ 
+ namespace media {
+ 
+ bool HardwareVideoEncodingPreSandboxHook(
+     sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+   sandbox::syscall_broker::BrokerCommandSet command_set;
+   std::vector<BrokerFilePermission> permissions;
+ 
+@@ -122,6 +125,7 @@ bool HardwareVideoEncodingPreSandboxHook
+     }
+   }
+ #endif
++#endif
+   return true;
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h
new file mode 100644
index 0000000000..b483e766f9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_
+ #define MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace media {
+ 
+@@ -14,4 +20,4 @@ bool HardwareVideoEncodingPreSandboxHook
+ 
+ }  // namespace media
+ 
+-#endif  // MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_
+\ No newline at end of file
++#endif  // MEDIA_GPU_SANDBOX_HARDWARE_VIDEO_ENCODING_SANDBOX_HOOK_LINUX_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc
new file mode 100644
index 0000000000..36d8b8fa4a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__video__decoder.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/vaapi/vaapi_video_decoder.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/vaapi/vaapi_video_decoder.cc
+@@ -792,7 +792,7 @@ void VaapiVideoDecoder::ApplyResolutionC
+   const gfx::Size decoder_natural_size =
+       aspect_ratio_.GetNaturalSize(decoder_visible_rect);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   absl::optional<DmabufVideoFramePool::CreateFrameCB> allocator =
+       base::BindRepeating(&AllocateCustomFrameProxy, weak_this_);
+   std::vector<ImageProcessor::PixelLayoutCandidate> candidates = {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__wrapper.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__wrapper.cc
new file mode 100644
index 0000000000..591f5ab3e0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_gpu_vaapi_vaapi__wrapper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/gpu/vaapi/vaapi_wrapper.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/gpu/vaapi/vaapi_wrapper.cc
+@@ -77,7 +77,7 @@
+ using media_gpu_vaapi::kModuleVa_prot;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "base/files/file_util.h"
+ #include "base/strings/string_split.h"
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_media__options.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_media__options.gni
new file mode 100644
index 0000000000..28efeb647f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_media__options.gni
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/media_options.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/media_options.gni
+@@ -190,12 +190,18 @@ declare_args() {
+   # Enables runtime selection of ALSA library for audio.
+   use_alsa = false
+ 
++  # Enable runtime selection of sndio(7)
++  use_sndio = false
++
++  # Enable runtime selection of audio(4)
++  use_audioio = false
++
+   # Alsa should be used on all non-Android, non-Mac POSIX systems - with the
+   # exception of CastOS desktop builds.
+   #
+   # TODO(crbug.com/1336055): Remove legacy target_cpu hack used for targeting
+   # desktop Chromecast builds.
+-  if (is_posix && !is_android && !is_apple &&
++  if (is_posix && !is_android && !is_apple && !is_bsd &&
+       (!is_castos || (target_cpu == "x86" || target_cpu == "x64") ||
+        is_cast_audio_only)) {
+     use_alsa = true
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_BUILD.gn
new file mode 100644
index 0000000000..f912a549ab
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/mojo/mojom/stable/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/mojo/mojom/stable/BUILD.gn
+@@ -196,7 +196,7 @@ source_set("unit_tests") {
+   } else if (use_v4l2_codec) {
+     deps += [ "//media/gpu/v4l2:v4l2_status" ]
+   }
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "mojom_traits_test_util.cc",
+       "mojom_traits_test_util.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc
new file mode 100644
index 0000000000..9e4a2195c2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc
+@@ -841,7 +841,7 @@ const gfx::GpuMemoryBufferId& StructTrai
+   return input.id;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ gfx::NativePixmapHandle StructTraits<
+     media::stable::mojom::NativeGpuMemoryBufferHandleDataView,
+@@ -862,7 +862,7 @@ bool StructTraits<media::stable::mojom::
+ 
+   output->type = gfx::NATIVE_PIXMAP;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!data.ReadPlatformHandle(&output->native_pixmap_handle))
+     return false;
+   return true;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h
new file mode 100644
index 0000000000..63b6804bef
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h
+@@ -695,7 +695,7 @@ struct StructTraits<media::stable::mojom
+   static const gfx::GpuMemoryBufferId& id(
+       const gfx::GpuMemoryBufferHandle& input);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static gfx::NativePixmapHandle platform_handle(
+       gfx::GpuMemoryBufferHandle& input);
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc
new file mode 100644
index 0000000000..ab267d25a9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_mojom_video__frame__mojom__traits.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/mojo/mojom/video_frame_mojom_traits.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/mojo/mojom/video_frame_mojom_traits.cc
+@@ -22,7 +22,7 @@
+ #include "ui/gfx/mojom/color_space_mojom_traits.h"
+ #include "ui/gfx/mojom/hdr_metadata_mojom_traits.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/posix/eintr_wrapper.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_services_webrtc__video__perf__history.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_services_webrtc__video__perf__history.cc
new file mode 100644
index 0000000000..9cca3055b2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_mojo_services_webrtc__video__perf__history.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/media/mojo/services/webrtc_video_perf_history.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/mojo/services/webrtc_video_perf_history.cc
+@@ -169,7 +169,7 @@ bool AreVideoStatsInvalid(const media::m
+          video_stats.frames_processed >
+              WebrtcVideoStatsDB::kFramesProcessedMaxValue ||
+          video_stats.key_frames_processed > video_stats.frames_processed ||
+-         isnan(video_stats.p99_processing_time_ms) ||
++         std::isnan(video_stats.p99_processing_time_ms) ||
+          video_stats.p99_processing_time_ms <
+              WebrtcVideoStatsDB::kP99ProcessingTimeMinValueMs ||
+          video_stats.p99_processing_time_ms >
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc
new file mode 100644
index 0000000000..172c8987ef
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_fake__gpu__memory__buffer.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/video/fake_gpu_memory_buffer.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/video/fake_gpu_memory_buffer.cc
+@@ -9,7 +9,7 @@
+ #include "media/base/format_utils.h"
+ #include "media/base/video_frame.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+@@ -47,7 +47,7 @@ class FakeGpuMemoryBufferImpl : public g
+ 
+ }  // namespace
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ base::ScopedFD GetDummyFD() {
+   base::ScopedFD fd(open("/dev/zero", O_RDWR));
+   DCHECK(fd.is_valid());
+@@ -77,7 +77,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer
+   static base::AtomicSequenceNumber buffer_id_generator;
+   handle_.id = gfx::GpuMemoryBufferId(buffer_id_generator.GetNext());
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   for (size_t i = 0; i < VideoFrame::NumPlanes(video_pixel_format_); i++) {
+     const gfx::Size plane_size_in_bytes =
+         VideoFrame::PlaneSize(video_pixel_format_, i, size_);
+@@ -132,7 +132,7 @@ gfx::GpuMemoryBufferHandle FakeGpuMemory
+   gfx::GpuMemoryBufferHandle handle;
+   handle.type = gfx::NATIVE_PIXMAP;
+   handle.id = handle_.id;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   handle.native_pixmap_handle =
+       gfx::CloneHandleForIPC(handle_.native_pixmap_handle);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc
new file mode 100644
index 0000000000..170c759a1c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_gpu__memory__buffer__video__frame__pool.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/video/gpu_memory_buffer_video_frame_pool.cc
+@@ -803,7 +803,7 @@ void GpuMemoryBufferVideoFramePool::Pool
+   }
+ 
+   bool is_software_backed_video_frame = !video_frame->HasTextures();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   is_software_backed_video_frame &= !video_frame->HasDmaBufs();
+ #endif
+ 
+@@ -1285,7 +1285,7 @@ scoped_refptr<VideoFrame> GpuMemoryBuffe
+     }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     is_webgpu_compatible = (gpu_memory_buffer != nullptr);
+     if (is_webgpu_compatible) {
+       is_webgpu_compatible &=
+@@ -1305,7 +1305,7 @@ scoped_refptr<VideoFrame> GpuMemoryBuffe
+                        gpu::SHARED_IMAGE_USAGE_DISPLAY_READ |
+                        gpu::SHARED_IMAGE_USAGE_SCANOUT;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+       // TODO(crbug.com/1241537): Always add the flag once the
+       // OzoneImageBacking is by default turned on.
+       if (base::CommandLine::ForCurrentProcess()->HasSwitch(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc
new file mode 100644
index 0000000000..9b18edbc7e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/video/video_encode_accelerator_adapter.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/video/video_encode_accelerator_adapter.cc
+@@ -154,7 +154,7 @@ VideoEncodeAccelerator::Config SetUpVeaC
+   if (is_rgb)
+     config.input_format = PIXEL_FORMAT_I420;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (format != PIXEL_FORMAT_I420 ||
+       !VideoFrame::IsStorageTypeMappable(storage_type)) {
+     // ChromeOS/Linux hardware video encoders supports I420 on-memory
+@@ -479,7 +479,7 @@ void VideoEncodeAcceleratorAdapter::Init
+       SetUpVeaConfig(profile_, options_, format, first_frame->storage_type(),
+                      supported_rc_modes_, required_encoder_type_);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Linux/ChromeOS require a special configuration to use dmabuf storage.
+   // We need to keep sending frames the same way the first frame was sent.
+   // Other platforms will happily mix GpuMemoryBuffer storage with regular
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc
new file mode 100644
index 0000000000..88ff607e53
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_video_video__encode__accelerator__adapter__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/video/video_encode_accelerator_adapter_test.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/video/video_encode_accelerator_adapter_test.cc
+@@ -461,7 +461,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest
+       CreateGreenFrame(large_size, pixel_format, base::Milliseconds(2));
+ 
+   VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (pixel_format != PIXEL_FORMAT_I420 || !small_frame->IsMappable())
+     expected_input_format = PIXEL_FORMAT_NV12;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_audio__processor.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_audio__processor.cc
new file mode 100644
index 0000000000..50c2b06000
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_audio__processor.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/webrtc/audio_processor.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/media/webrtc/audio_processor.cc
+@@ -521,7 +521,7 @@ std::optional<double> AudioProcessor::Pr
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+   DCHECK_LE(volume, 1.0);
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \
+-    BUILDFLAG(IS_OPENBSD)
++    BUILDFLAG(IS_BSD)
+   // We have a special situation on Linux where the microphone volume can be
+   // "higher than maximum". The input volume slider in the sound preference
+   // allows the user to set a scaling that is higher than 100%. It means that
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_helpers.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_helpers.cc
new file mode 100644
index 0000000000..63a9c4d2da
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_helpers.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/webrtc/helpers.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/webrtc/helpers.cc
+@@ -40,7 +40,7 @@ void ConfigAutomaticGainControl(const Au
+     apm_config.gain_controller2.enabled = false;
+     return;
+   }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Use the Hybrid AGC setup, which combines the AGC1 input volume controller
+   // and the AGC2 digital adaptive controller.
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_helpers__unittests.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_helpers__unittests.cc
new file mode 100644
index 0000000000..bfd2fc3d63
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_media_webrtc_helpers__unittests.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/media/webrtc/helpers_unittests.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/media/webrtc/helpers_unittests.cc
+@@ -39,7 +39,7 @@ TEST(CreateWebRtcAudioProcessingModuleTe
+   EXPECT_FALSE(config.pre_amplifier.enabled);
+   EXPECT_TRUE(config.echo_canceller.enabled);
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   EXPECT_TRUE(config.gain_controller1.enabled);
+   EXPECT_TRUE(config.gain_controller2.enabled);
+ #elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+@@ -77,7 +77,7 @@ TEST(CreateWebRtcAudioProcessingModuleTe
+   EXPECT_EQ(config.gain_controller2, kDefaultApmConfig.gain_controller2);
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ TEST(CreateWebRtcAudioProcessingModuleTest,
+      InputVolumeAdjustmentEnabledWithHybridAgc) {
+   ::base::test::ScopedFeatureList feature_list;
+@@ -103,7 +103,7 @@ TEST(CreateWebRtcAudioProcessingModuleTe
+ #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ TEST(CreateWebRtcAudioProcessingModuleTest,
+      OnlyOneInputVolumeControllerEnabledOnDesktopPlatforms) {
+   auto config = CreateApmGetConfig(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_BUILD.gn
new file mode 100644
index 0000000000..f7eafab763
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/mojo/core/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/mojo/core/BUILD.gn
+@@ -166,7 +166,7 @@ template("core_impl_source_set") {
+         ]
+       }
+ 
+-      if ((is_linux || is_chromeos || is_android) && !is_nacl) {
++      if ((is_linux || is_chromeos || is_android) && !is_nacl && !is_bsd) {
+         sources += [
+           "channel_linux.cc",
+           "channel_linux.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_channel.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_channel.cc
new file mode 100644
index 0000000000..4e748e2538
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_channel.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/mojo/core/channel.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/mojo/core/channel.cc
+@@ -75,7 +75,11 @@ const size_t kMaxUnusedReadBufferCapacit
+ // Fuchsia: The zx_channel_write() API supports up to 64 handles.
+ const size_t kMaxAttachedHandles = 64;
+ 
++#if defined(__i386__) && defined(OS_FREEBSD)
++const size_t kChannelMessageAlignment = 4;
++#else
+ static_assert(alignof(std::max_align_t) >= kChannelMessageAlignment, "");
++#endif
+ Channel::AlignedBuffer MakeAlignedBuffer(size_t size) {
+   // Generic allocators (such as malloc) return a pointer that is suitably
+   // aligned for storing any type of object with a fundamental alignment
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_embedder_features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_embedder_features.h
new file mode 100644
index 0000000000..6176f701f3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_core_embedder_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/mojo/core/embedder/features.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/mojo/core/embedder/features.h
+@@ -16,7 +16,7 @@ namespace core {
+ 
+ #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && \
+     !BUILDFLAG(MOJO_USE_APPLE_CHANNEL)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(MOJO_CORE_EMBEDDER_FEATURES)
+ BASE_DECLARE_FEATURE(kMojoLinuxChannelSharedMem);
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_public_cpp_platform_socket__utils__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_public_cpp_platform_socket__utils__posix.cc
new file mode 100644
index 0000000000..0cdf5ed4e5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_public_cpp_platform_socket__utils__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/mojo/public/cpp/platform/socket_utils_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/mojo/public/cpp/platform/socket_utils_posix.cc
+@@ -34,7 +34,7 @@ bool IsRecoverableError() {
+ }
+ 
+ bool GetPeerEuid(base::PlatformFile fd, uid_t* peer_euid) {
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   uid_t socket_euid;
+   gid_t socket_gid;
+   if (getpeereid(fd, &socket_euid, &socket_gid) < 0) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni
new file mode 100644
index 0000000000..fa135d5504
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/mojo/public/tools/bindings/mojom.gni.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/mojo/public/tools/bindings/mojom.gni
+@@ -748,6 +748,21 @@ template("mojom") {
+       enabled_features += [ "is_apple" ]
+     }
+ 
++    if (is_openbsd) {
++      enabled_features += [ "is_openbsd" ]
++      enabled_features += [ "is_bsd" ]
++    }
++
++    if (is_netbsd) {
++      enabled_features += [ "is_netbsd" ]
++      enabled_features += [ "is_bsd" ]
++    }
++
++    if (is_freebsd) {
++      enabled_features += [ "is_freebsd" ]
++      enabled_features += [ "is_bsd" ]
++    }
++
+     action(parser_target_name) {
+       allow_remote = true
+       custom_processor = "mojom_parser"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_native__client__sdk_src_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_native__client__sdk_src_BUILD.gn
new file mode 100644
index 0000000000..f26e692ffd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_native__client__sdk_src_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/native_client_sdk/src/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/native_client_sdk/src/BUILD.gn
+@@ -51,7 +51,7 @@ if (enable_nacl) {
+ 
+     # TODO(binji): dump_syms doesn't currently build on Windows. See
+     # http://crbug.com/245456
+-    if (!is_win && target_cpu == "x64") {
++    if (!is_win && target_cpu == "x64" && !is_bsd) {
+       deps += [
+         "//third_party/breakpad:dump_syms($host_toolchain)",
+         "//third_party/breakpad:minidump_dump($host_toolchain)",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_BUILD.gn
new file mode 100644
index 0000000000..fb2f5d80be
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_BUILD.gn
@@ -0,0 +1,101 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/BUILD.gn
+@@ -126,7 +126,7 @@ net_configs = [
+   "//build/config/compiler:wexit_time_destructors",
+ ]
+ 
+-if (is_linux || is_chromeos) {
++if ((is_linux || is_chromeos) && !is_bsd) {
+   net_configs += [ "//build/config/linux:libresolv" ]
+ }
+ 
+@@ -1183,6 +1183,19 @@ component("net") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "base/address_map_cache_linux.cc",
++      "base/address_map_cache_linux.h",
++      "base/address_map_linux.cc",
++      "base/address_map_linux.h",
++      "base/address_tracker_linux.cc",
++      "base/address_tracker_linux.h",
++      "base/network_change_notifier_linux.cc",
++      "base/network_interfaces_linux.cc",
++    ]
++  }   
++
+   if (is_mac) {
+     sources += [
+       "base/network_notification_thread_mac.cc",
+@@ -1340,7 +1353,7 @@ component("net") {
+   }
+ 
+   # Use getifaddrs() on POSIX platforms, except Linux.
+-  if (is_posix && !is_linux && !is_chromeos) {
++  if ((is_posix && !is_linux && !is_chromeos) || is_bsd) {
+     sources += [
+       "base/network_interfaces_getifaddrs.cc",
+       "base/network_interfaces_getifaddrs.h",
+@@ -1995,7 +2008,7 @@ static_library("test_support") {
+     "url_request/url_request_test_util.h",
+   ]
+ 
+-  if (is_linux || is_chromeos || is_android) {
++  if ((is_linux || is_chromeos || is_android)  && !is_bsd) {
+     sources += [
+       "base/address_tracker_linux_test_util.cc",
+       "base/address_tracker_linux_test_util.h",
+@@ -2803,14 +2816,14 @@ test("net_unittests") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     sources += [
+       "base/network_change_notifier_linux_unittest.cc",
+       "proxy_resolution/proxy_config_service_linux_unittest.cc",
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "base/address_tracker_linux_unittest.cc",
+       "base/network_interfaces_linux_unittest.cc",
+@@ -2898,6 +2911,10 @@ test("net_unittests") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    deps += [ "//sandbox/policy" ]
++  }
++
+   if (enable_websockets) {
+     deps += [ "//net/server:tests" ]
+   }
+@@ -2968,7 +2985,7 @@ test("net_unittests") {
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "tools/quic/quic_simple_server_test.cc" ]
+   }
+ 
+@@ -3103,7 +3120,7 @@ test("net_unittests") {
+   }
+ 
+   # Use getifaddrs() on POSIX platforms, except Linux.
+-  if (is_posix && !is_linux && !is_chromeos) {
++  if (is_posix && !is_linux && !is_chromeos && !is_bsd) {
+     sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ]
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_features.cc
new file mode 100644
index 0000000000..af9d21a6d5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/base/features.cc
+@@ -451,7 +451,7 @@ BASE_FEATURE(kDisableBlackholeOnNoNewNet
+              "DisableBlackHoleOnNoNewNetwork",
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kAddressTrackerLinuxIsProxied,
+              "AddressTrackerLinuxIsProxied",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.cc
new file mode 100644
index 0000000000..18aea3a196
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/mock_network_change_notifier.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/base/mock_network_change_notifier.cc
+@@ -103,7 +103,7 @@ MockNetworkChangeNotifier::GetCurrentCon
+   return connection_cost_;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ AddressMapOwnerLinux* MockNetworkChangeNotifier::GetAddressMapOwnerInternal() {
+   return address_map_owner_;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.h
new file mode 100644
index 0000000000..548af67cd6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_mock__network__change__notifier.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/mock_network_change_notifier.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/base/mock_network_change_notifier.h
+@@ -84,7 +84,7 @@ class MockNetworkChangeNotifier : public
+   // use_default_connection_cost_implementation is set to true.
+   ConnectionCost GetCurrentConnectionCost() override;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void SetAddressMapOwnerLinux(AddressMapOwnerLinux* address_map_owner) {
+     address_map_owner_ = address_map_owner;
+   }
+@@ -104,7 +104,7 @@ class MockNetworkChangeNotifier : public
+   bool use_default_connection_cost_implementation_ = false;
+   NetworkChangeNotifier::NetworkList connected_networks_;
+   std::unique_ptr<SystemDnsConfigChangeNotifier> dns_config_notifier_;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   raw_ptr<AddressMapOwnerLinux> address_map_owner_ = nullptr;
+ #endif
+ };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc
new file mode 100644
index 0000000000..cedaec17bf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/base/network_change_notifier.cc
+@@ -37,7 +37,7 @@
+ #include "net/base/network_change_notifier_linux.h"
+ #elif BUILDFLAG(IS_APPLE)
+ #include "net/base/network_change_notifier_apple.h"
+-#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "net/base/network_change_notifier_passive.h"
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #include "net/base/network_change_notifier_fuchsia.h"
+@@ -324,6 +324,9 @@ std::unique_ptr<NetworkChangeNotifier> N
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return std::make_unique<NetworkChangeNotifierFuchsia>(
+       /*require_wlan=*/false);
++#elif BUILDFLAG(IS_BSD)
++  return std::make_unique<MockNetworkChangeNotifier>(
++      /*dns_config_notifier*/nullptr);
+ #else
+   NOTIMPLEMENTED();
+   return nullptr;
+@@ -522,7 +525,7 @@ base::cstring_view NetworkChangeNotifier
+   return kConnectionTypeNames[type];
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ AddressMapOwnerLinux* NetworkChangeNotifier::GetAddressMapOwner() {
+   return g_network_change_notifier
+@@ -868,7 +871,7 @@ NetworkChangeNotifier::NetworkChangeNoti
+   }
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ AddressMapOwnerLinux* NetworkChangeNotifier::GetAddressMapOwnerInternal() {
+   return nullptr;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier.h
new file mode 100644
index 0000000000..d2644a76a2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/network_change_notifier.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/base/network_change_notifier.h
+@@ -19,7 +19,7 @@
+ #include "net/base/net_export.h"
+ #include "net/base/network_handle.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "net/base/address_map_linux.h"
+ #endif
+ 
+@@ -460,7 +460,7 @@ class NET_EXPORT NetworkChangeNotifier {
+   // packets sent lazily.
+   static bool IsDefaultNetworkActive();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Returns the AddressTrackerLinux if present.
+   static AddressMapOwnerLinux* GetAddressMapOwner();
+ #endif
+@@ -630,7 +630,7 @@ class NET_EXPORT NetworkChangeNotifier {
+       SystemDnsConfigChangeNotifier* system_dns_config_notifier = nullptr,
+       bool omit_observers_in_constructor_for_testing = false);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Returns the AddressMapOwnerLinux if present.
+   virtual AddressMapOwnerLinux* GetAddressMapOwnerInternal();
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier__passive.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier__passive.cc
new file mode 100644
index 0000000000..4b3222f5c9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__change__notifier__passive.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/network_change_notifier_passive.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/base/network_change_notifier_passive.cc
+@@ -107,7 +107,7 @@ NetworkChangeNotifierPassive::GetAddress
+ NetworkChangeNotifier::NetworkChangeCalculatorParams
+ NetworkChangeNotifierPassive::NetworkChangeCalculatorParamsPassive() {
+   NetworkChangeCalculatorParams params;
+-#if BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Delay values arrived at by simple experimentation and adjusted so as to
+   // produce a single signal when switching between network connections.
+   params.ip_address_offline_delay_ = base::Milliseconds(4000);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.h
new file mode 100644
index 0000000000..58b088f04a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/network_interfaces_posix.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/base/network_interfaces_posix.h
+@@ -8,6 +8,8 @@
+ // This file provides some basic functionality shared between
+ // network_interfaces_linux.cc and network_interfaces_getifaddrs.cc.
+ 
++#include <sys/socket.h>
++
+ #include <string>
+ 
+ struct sockaddr;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_sockaddr__util__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_sockaddr__util__posix.cc
new file mode 100644
index 0000000000..64888952b1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_sockaddr__util__posix.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/sockaddr_util_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/base/sockaddr_util_posix.cc
+@@ -46,7 +46,8 @@ bool FillUnixAddress(const std::string& 
+     return true;
+   }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
++  // XXX ?
+   // Convert the path given into abstract socket name. It must start with
+   // the '\0' character, so we are adding it. |addr_len| must specify the
+   // length of the structure exactly, as potentially the socket name may
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_sockaddr__util__posix__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_sockaddr__util__posix__unittest.cc
new file mode 100644
index 0000000000..fc4e7f5be9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_base_sockaddr__util__posix__unittest.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/base/sockaddr_util_posix_unittest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/base/sockaddr_util_posix_unittest.cc
+@@ -88,7 +88,8 @@ TEST(FillUnixAddressTest, AbstractLinuxA
+   size_t path_max = MaxPathLength(&storage);
+   std::string path(path_max, '0');
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
++  // XXX?
+   EXPECT_TRUE(FillUnixAddress(path, /*use_abstract_namespace=*/true, &storage));
+ 
+   EXPECT_EQ(path.size() + 1U + offsetof(struct sockaddr_un, sun_path),
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h
new file mode 100644
index 0000000000..2cba0185ef
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_cert_cert__verify__proc.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/cert/cert_verify_proc.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/cert/cert_verify_proc.h
+@@ -186,7 +186,7 @@ class NET_EXPORT CertVerifyProc
+     kMaxValue = kChainLengthOne
+   };
+ 
+-#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \
++#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+       BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY))
+   // Creates and returns a CertVerifyProc that uses the system verifier.
+   // |cert_net_fetcher| may not be used, depending on the implementation.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_disk__cache_simple_simple__file__tracker.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_disk__cache_simple_simple__file__tracker.cc
new file mode 100644
index 0000000000..e2e87dcbaa
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_disk__cache_simple_simple__file__tracker.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/disk_cache/simple/simple_file_tracker.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/disk_cache/simple/simple_file_tracker.cc
+@@ -35,7 +35,17 @@ void RecordFileDescripterLimiterOp(FileD
+ }  // namespace
+ 
+ SimpleFileTracker::SimpleFileTracker(int file_limit)
++#if defined(OS_OPENBSD)
++{
++  // cap the file descriptor limit at 85% of the size of the
++  // file descriptor table and also substract the amount of
++  // currently used file descriptors as this should give us
++  // enough reserve to avoid hitting the limit 
++  file_limit_ = (getdtablesize() * 0.85) -  getdtablecount();
++}
++#else
+     : file_limit_(file_limit) {}
++#endif
+ 
+ SimpleFileTracker::~SimpleFileTracker() {
+   DCHECK(lru_.empty());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_BUILD.gn
new file mode 100644
index 0000000000..f9756d3060
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_BUILD.gn
@@ -0,0 +1,37 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/BUILD.gn
+@@ -138,7 +138,7 @@ source_set("dns") {
+       "dns_config_service_android.cc",
+       "dns_config_service_android.h",
+     ]
+-  } else if (is_linux) {
++  } else if (is_linux && !is_bsd) {
+     sources += [
+       "dns_config_service_linux.cc",
+       "dns_config_service_linux.h",
+@@ -179,6 +182,7 @@ source_set("dns") {
+     ":host_resolver_manager",
+     ":mdns_client",
+     "//net:net_public_deps",
++    "//printing/buildflags",
+   ]
+ 
+   allow_circular_includes_from = [
+@@ -447,9 +451,9 @@ source_set("tests") {
+ 
+   if (is_android) {
+     sources += [ "dns_config_service_android_unittest.cc" ]
+-  } else if (is_linux) {
++  } else if (is_linux && !is_bsd) {
+     sources += [ "dns_config_service_linux_unittest.cc" ]
+-  } else if (is_posix) {
++  } else if (is_posix && !is_bsd) {
+     sources += [ "dns_config_service_posix_unittest.cc" ]
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_address__info.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_address__info.cc
new file mode 100644
index 0000000000..25c096311b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_address__info.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/address_info.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/address_info.cc
+@@ -83,8 +83,12 @@ AddressInfo::AddressInfoAndResult Addres
+     // error.
+     // http://crbug.com/134142
+     err = ERR_NAME_NOT_RESOLVED;
+-#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_FREEBSD)
++#elif BUILDFLAG(IS_POSIX)
++#ifdef EAI_NODATA
+     if (os_error != EAI_NONAME && os_error != EAI_NODATA)
++#else
++    if (os_error != EAI_NONAME)
++#endif
+       err = ERR_NAME_RESOLUTION_FAILED;
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc
new file mode 100644
index 0000000000..e4adb62022
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/address_sorter_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/dns/address_sorter_posix.cc
+@@ -27,6 +27,7 @@
+ #include "net/dns/netinet_in_var_ios.h"
+ #else
+ #include <netinet/in_var.h>
++#include <netinet6/in6_var.h>
+ #endif  // BUILDFLAG(IS_IOS)
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc
new file mode 100644
index 0000000000..eeab6d2dad
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/dns_reloader.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/dns_reloader.cc
+@@ -10,6 +10,7 @@
+ // - there's not guarantee it exists at all. :(
+ #if BUILDFLAG(IS_POSIX)
+ 
++#include <netinet/in.h>
+ #include <resolv.h>
+ 
+ // This code only works on systems where the C library provides res_ninit(3) and
+@@ -31,7 +32,7 @@
+ // an old musl bug that was fixed by musl c8fdcfe5, but Fuchsia's SDK doesn't
+ // have that change.
+ #if defined(__RES) && __RES >= 19991006 && !BUILDFLAG(IS_APPLE) && \
+-    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA)
++    !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_NETBSD)
+ // We define this so we don't need to restate the complex condition here twice
+ // below - it would be easy for the copies below to get out of sync.
+ #define USE_RES_NINIT
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_dns__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_dns__util.cc
new file mode 100644
index 0000000000..db1275e0f2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_dns__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/dns_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/dns_util.cc
+@@ -29,6 +29,8 @@
+ #include "net/dns/public/util.h"
+ #include "net/third_party/uri_template/uri_template.h"
+ 
++#include <sys/socket.h>
++
+ #if BUILDFLAG(IS_POSIX)
+ #include <net/if.h>
+ #include <netinet/in.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc
new file mode 100644
index 0000000000..42d0e926e8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/host_resolver_proc.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/host_resolver_proc.cc
+@@ -15,10 +15,6 @@
+ #include "net/base/net_errors.h"
+ #include "net/dns/host_resolver_system_task.h"
+ 
+-#if BUILDFLAG(IS_OPENBSD)
+-#define AI_ADDRCONFIG 0
+-#endif
+-
+ namespace net {
+ 
+ HostResolverProc* HostResolverProc::default_proc_ = nullptr;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_BUILD.gn
new file mode 100644
index 0000000000..91a82108ea
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/public/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/public/BUILD.gn
+@@ -78,7 +78,7 @@ source_set("tests") {
+     "doh_provider_entry_unittest.cc",
+   ]
+ 
+-  if (is_posix && !is_android) {
++  if (is_posix && !is_android && !is_bsd) {
+     sources += [ "resolv_reader_unittest.cc" ]
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_resolv__reader.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_resolv__reader.cc
new file mode 100644
index 0000000000..399051edaf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_resolv__reader.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/public/resolv_reader.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/public/resolv_reader.cc
+@@ -40,7 +40,7 @@ std::optional<std::vector<IPEndPoint>> G
+   if (!(res.options & RES_INIT))
+     return std::nullopt;
+ 
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   union res_sockaddr_union addresses[MAXNS];
+   int nscount = res_getservers(const_cast<res_state>(&res), addresses, MAXNS);
+   DCHECK_GE(nscount, 0);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_resolv__reader.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_resolv__reader.h
new file mode 100644
index 0000000000..b29712e273
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_resolv__reader.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/public/resolv_reader.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/public/resolv_reader.h
+@@ -5,6 +5,7 @@
+ #ifndef NET_DNS_PUBLIC_RESOLV_READER_H_
+ #define NET_DNS_PUBLIC_RESOLV_READER_H_
+ 
++#include <netinet/in.h>
+ #include <resolv.h>
+ 
+ #include <memory>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.cc
new file mode 100644
index 0000000000..885869d524
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/public/scoped_res_state.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
+@@ -28,7 +28,7 @@ ScopedResState::~ScopedResState() {
+ #if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
+ 
+   // Prefer res_ndestroy where available.
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   res_ndestroy(&res_);
+ #else
+   res_nclose(&res_);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.h
new file mode 100644
index 0000000000..6a082d2939
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_dns_public_scoped__res__state.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/dns/public/scoped_res_state.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/dns/public/scoped_res_state.h
+@@ -5,6 +5,7 @@
+ #ifndef NET_DNS_PUBLIC_SCOPED_RES_STATE_H_
+ #define NET_DNS_PUBLIC_SCOPED_RES_STATE_H_
+ 
++#include <netinet/in.h>
+ #include <resolv.h>
+ 
+ #include <optional>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc
new file mode 100644
index 0000000000..53695b4b30
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc
+@@ -375,8 +375,9 @@ base::NativeLibrary GSSAPISharedLibrary:
+     static const char* const kDefaultLibraryNames[] = {
+ #if BUILDFLAG(IS_APPLE)
+       "/System/Library/Frameworks/GSS.framework/GSS"
+-#elif BUILDFLAG(IS_OPENBSD)
+-      "libgssapi.so"  // Heimdal - OpenBSD
++#elif BUILDFLAG(IS_BSD)
++      "libgssapi_krb5.so.2",  // MIT Kerberos - FreeBSD
++      "libgssapi.so"          // Heimdal - OpenBSD, FreeBSD
+ #else
+       "libgssapi_krb5.so.2",  // MIT Kerberos - FC, Suse10, Debian
+       "libgssapi.so.4",       // Heimdal - Suse10, MDK
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.h
new file mode 100644
index 0000000000..f361d4b071
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/http/http_auth_gssapi_posix.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/http/http_auth_gssapi_posix.h
+@@ -21,6 +21,9 @@
+ #if BUILDFLAG(IS_APPLE)
+ #include <GSS/gssapi.h>
+ #elif BUILDFLAG(IS_FREEBSD)
++#ifndef GSS_C_DELEG_POLICY_FLAG
++#define GSS_C_DELEG_POLICY_FLAG 32768
++#endif
+ #include <gssapi/gssapi.h>
+ #else
+ #include <gssapi.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__handler__negotiate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__handler__negotiate.cc
new file mode 100644
index 0000000000..eaf390ca0e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__handler__negotiate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/http/http_auth_handler_negotiate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/http/http_auth_handler_negotiate.cc
+@@ -120,7 +120,7 @@ int HttpAuthHandlerNegotiate::Factory::C
+ #elif BUILDFLAG(IS_POSIX)
+   if (is_unsupported_)
+     return ERR_UNSUPPORTED_AUTH_SCHEME;
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Note: Don't set is_unsupported_ = true here. AllowGssapiLibraryLoad()
+   // might change to true during a session.
+   if (!http_auth_preferences() ||
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__preferences.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__preferences.cc
new file mode 100644
index 0000000000..51dc62724c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__preferences.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/http/http_auth_preferences.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/http/http_auth_preferences.cc
+@@ -39,7 +39,7 @@ std::string HttpAuthPreferences::AuthAnd
+ }
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool HttpAuthPreferences::AllowGssapiLibraryLoad() const {
+   return allow_gssapi_library_load_;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__preferences.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__preferences.h
new file mode 100644
index 0000000000..ca2ea26557
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__auth__preferences.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/http/http_auth_preferences.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/http/http_auth_preferences.h
+@@ -50,7 +50,7 @@ class NET_EXPORT HttpAuthPreferences {
+ #if BUILDFLAG(IS_ANDROID)
+   virtual std::string AuthAndroidNegotiateAccountType() const;
+ #endif
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   virtual bool AllowGssapiLibraryLoad() const;
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+   virtual bool CanUseDefaultCredentials(
+@@ -86,7 +86,7 @@ class NET_EXPORT HttpAuthPreferences {
+   }
+ #endif  // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void set_allow_gssapi_library_load(bool allow_gssapi_library_load) {
+     allow_gssapi_library_load_ = allow_gssapi_library_load;
+   }
+@@ -137,7 +137,7 @@ class NET_EXPORT HttpAuthPreferences {
+   std::string auth_android_negotiate_account_type_;
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool allow_gssapi_library_load_ = true;
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__network__session.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__network__session.cc
new file mode 100644
index 0000000000..3e1a61a74c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_http_http__network__session.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/http/http_network_session.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/http/http_network_session.cc
+@@ -19,7 +19,9 @@
+ #include "build/build_config.h"
+ #include "net/base/features.h"
+ #include "net/dns/host_resolver.h"
++#if defined(USE_KERBEROS)
+ #include "net/http/http_auth_handler_factory.h"
++#endif
+ #include "net/http/http_response_body_drainer.h"
+ #include "net/http/http_stream_factory.h"
+ #include "net/http/url_security_manager.h"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service.cc
new file mode 100644
index 0000000000..895b238fbf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service.cc
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/proxy_resolution/proxy_config_service.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/proxy_resolution/proxy_config_service.cc
+@@ -19,20 +19,20 @@
+ #include "net/proxy_resolution/proxy_config_service_ios.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "net/proxy_resolution/proxy_config_service_mac.h"
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "net/proxy_resolution/proxy_config_service_linux.h"
+ #elif BUILDFLAG(IS_ANDROID)
+ #include "net/proxy_resolution/proxy_config_service_android.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "net/traffic_annotation/network_traffic_annotation.h"
+ #endif
+ 
+ namespace net {
+ 
+ namespace {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation =
+     net::DefineNetworkTrafficAnnotation("proxy_config_system", R"(
+       semantics {
+@@ -108,7 +108,7 @@ ProxyConfigService::CreateSystemProxyCon
+              << "profile_io_data.cc::CreateProxyConfigService and this should "
+              << "be used only for examples.";
+   return std::make_unique<UnsetProxyConfigService>();
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<ProxyConfigServiceLinux> linux_config_service(
+       std::make_unique<ProxyConfigServiceLinux>());
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc
new file mode 100644
index 0000000000..6e668e0e1a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc
+@@ -6,7 +6,9 @@
+ 
+ #include <errno.h>
+ #include <limits.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/inotify.h>
++#endif
+ #include <unistd.h>
+ 
+ #include <map>
+@@ -505,6 +507,7 @@ bool SettingGetterImplGSettings::CheckVe
+ }
+ #endif  // defined(USE_GIO)
+ 
++#if !BUILDFLAG(IS_BSD)
+ // Converts |value| from a decimal string to an int. If there was a failure
+ // parsing, returns |default_value|.
+ int StringToIntOrDefault(base::StringPiece value, int default_value) {
+@@ -1033,6 +1036,7 @@ class SettingGetterImplKDE : public Prox
+   // events on.
+   scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
+ };
++#endif
+ 
+ }  // namespace
+ 
+@@ -1251,9 +1255,11 @@ ProxyConfigServiceLinux::Delegate::Deleg
+     case base::nix::DESKTOP_ENVIRONMENT_KDE4:
+     case base::nix::DESKTOP_ENVIRONMENT_KDE5:
+     case base::nix::DESKTOP_ENVIRONMENT_KDE6:
++#if !BUILDFLAG(IS_BSD)
+       setting_getter_ =
+           std::make_unique<SettingGetterImplKDE>(env_var_getter_.get());
+       break;
++#endif
+     case base::nix::DESKTOP_ENVIRONMENT_XFCE:
+     case base::nix::DESKTOP_ENVIRONMENT_LXQT:
+     case base::nix::DESKTOP_ENVIRONMENT_OTHER:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_socket__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_socket__posix.cc
new file mode 100644
index 0000000000..653351c021
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_socket__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/socket/socket_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/socket/socket_posix.cc
+@@ -516,7 +516,7 @@ void SocketPosix::ReadCompleted() {
+ }
+ 
+ int SocketPosix::DoWrite(IOBuffer* buf, int buf_len) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_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
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc
new file mode 100644
index 0000000000..a49a30e539
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/socket/socks5_client_socket.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/socket/socks5_client_socket.cc
+@@ -24,6 +24,9 @@
+ #include "net/log/net_log_event_type.h"
+ #include "net/traffic_annotation/network_traffic_annotation.h"
+ 
++#include <sys/types.h>
++#include <netinet/in.h>
++
+ namespace net {
+ 
+ const unsigned int SOCKS5ClientSocket::kGreetReadHeaderSize = 2;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc
new file mode 100644
index 0000000000..8aae7d454f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_tcp__socket__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/socket/tcp_socket_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/socket/tcp_socket_posix.cc
+@@ -98,6 +98,17 @@ bool SetTCPKeepAlive(int fd, bool enable
+       PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd;
+       return false;
+     }
++#elif BUILDFLAG(IS_FREEBSD)
++  // 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
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc
new file mode 100644
index 0000000000..12ffe0bf48
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc
@@ -0,0 +1,132 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/socket/udp_socket_posix.cc
+@@ -104,6 +104,32 @@ const guardid_t kSocketFdGuard = 0xD712B
+ 
+ #endif  // BUILDFLAG(IS_APPLE) && !BUILDFLAG(CRONET_BUILD)
+ 
++#if BUILDFLAG(IS_NETBSD)
++int GetIPv4AddressFromIndex(int socket, uint32_t index, uint32_t* address) {
++  if (!index) {
++    *address = htonl(INADDR_ANY);
++    return OK;
++  }
++
++  sockaddr_in* result = nullptr;
++
++  ifreq ifr;
++  ifr.ifr_addr.sa_family = AF_INET;
++  if (!if_indextoname(index, ifr.ifr_name))
++    return MapSystemError(errno);
++  int rv = ioctl(socket, SIOCGIFADDR, &ifr);
++  if (rv == -1)
++    return MapSystemError(errno);
++  result = reinterpret_cast<sockaddr_in*>(&ifr.ifr_addr);
++
++  if (!result)
++    return ERR_ADDRESS_INVALID;
++
++  *address = result->sin_addr.s_addr;
++  return OK;
++}
++#endif
++
+ int GetSocketFDHash(int fd) {
+   return fd ^ 1595649551;
+ }
+@@ -592,12 +618,17 @@ int UDPSocketPosix::SetRecvEcn() {
+     }
+   }
+ 
++#ifdef IP_RECVTOS
+   int rv = setsockopt(socket_, IPPROTO_IP, IP_RECVTOS, &ecn, sizeof(ecn));
++#else
++  int rv = -1;
++  errno = EOPNOTSUPP;
++#endif
+   return rv == 0 ? OK : MapSystemError(errno);
+ }
+ 
+ void UDPSocketPosix::SetMsgConfirm(bool confirm) {
+-#if !BUILDFLAG(IS_APPLE)
++#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+   if (confirm) {
+     sendto_flags_ |= MSG_CONFIRM;
+   } else {
+@@ -618,7 +649,7 @@ int UDPSocketPosix::SetBroadcast(bool br
+   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+   int value = broadcast ? 1 : 0;
+   int rv;
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   // SO_REUSEPORT on OSX permits multiple processes to each receive
+   // UDP multicast or broadcast datagrams destined for the bound
+   // port.
+@@ -894,9 +925,17 @@ int UDPSocketPosix::SetMulticastOptions(
+   if (multicast_interface_ != 0) {
+     switch (addr_family_) {
+       case AF_INET: {
++#if BUILDFLAG(IS_NETBSD)
++        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 = htonl(INADDR_ANY);
++#endif
+         int rv = setsockopt(socket_, IPPROTO_IP, IP_MULTICAST_IF,
+                             reinterpret_cast<const char*>(&mreq), sizeof(mreq));
+         if (rv)
+@@ -931,7 +970,7 @@ int UDPSocketPosix::DoBind(const IPEndPo
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+   if (last_error == EINVAL)
+     return ERR_ADDRESS_IN_USE;
+-#elif BUILDFLAG(IS_APPLE)
++#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   if (last_error == EADDRNOTAVAIL)
+     return ERR_ADDRESS_IN_USE;
+ #endif
+@@ -959,9 +998,17 @@ int UDPSocketPosix::JoinGroup(const IPAd
+     case IPAddress::kIPv4AddressSize: {
+       if (addr_family_ != AF_INET)
+         return ERR_ADDRESS_INVALID;
++#if BUILDFLAG(IS_NETBSD)
++      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 = htonl(INADDR_ANY);
++#endif
+       memcpy(&mreq.imr_multiaddr, group_address.bytes().data(),
+              IPAddress::kIPv4AddressSize);
+       int rv = setsockopt(socket_, IPPROTO_IP, IP_ADD_MEMBERSHIP,
+@@ -999,9 +1046,17 @@ int UDPSocketPosix::LeaveGroup(const IPA
+     case IPAddress::kIPv4AddressSize: {
+       if (addr_family_ != AF_INET)
+         return ERR_ADDRESS_INVALID;
++#if BUILDFLAG(IS_NETBSD)
++      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,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_udp__socket__unittest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_udp__socket__unittest.cc
new file mode 100644
index 0000000000..fc5b058945
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_socket_udp__socket__unittest.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/socket/udp_socket_unittest.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/socket/udp_socket_unittest.cc
+@@ -344,7 +344,7 @@ TEST_F(UDPSocketTest, PartialRecv) {
+   EXPECT_EQ(second_packet, received);
+ }
+ 
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ // - MacOS: requires root permissions on OSX 10.7+.
+ // - Android: devices attached to testbots don't have default network, so
+ // broadcasting to 255.255.255.255 returns error -109 (Address not reachable).
+@@ -655,7 +655,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFrag
+     EXPECT_THAT(rv, IsOk());
+ 
+     rv = client.SetDoNotFragment();
+-#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia.
+     EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED));
+ #elif BUILDFLAG(IS_MAC)
+@@ -683,7 +683,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFrag
+     EXPECT_THAT(rv, IsOk());
+ 
+     rv = server.SetDoNotFragment();
+-#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia.
+     EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED));
+ #elif BUILDFLAG(IS_MAC)
+@@ -748,7 +748,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup
+ 
+ // TODO(https://crbug.com/947115): failing on device on iOS 12.2.
+ // TODO(https://crbug.com/1227554): flaky on Mac 11.
+-#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ #define MAYBE_SharedMulticastAddress DISABLED_SharedMulticastAddress
+ #else
+ #define MAYBE_SharedMulticastAddress SharedMulticastAddress
+@@ -802,7 +802,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMultic
+                                 NetLogSource());
+   ASSERT_THAT(client_socket.Connect(send_address), IsOk());
+ 
+-#if !BUILDFLAG(IS_CHROMEOS_ASH)
++#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD)
+   // Send a message via the multicast group. That message is expected be be
+   // received by both receving sockets.
+   //
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_third__party_quiche_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_third__party_quiche_BUILD.gn
new file mode 100644
index 0000000000..7ec8339a6a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_third__party_quiche_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/third_party/quiche/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/third_party/quiche/BUILD.gn
+@@ -29,7 +29,7 @@ import("//net/third_party/quiche/src/bui
+ import("//testing/libfuzzer/fuzzer_test.gni")
+ import("//third_party/protobuf/proto_library.gni")
+ 
+-build_epoll_based_tools = is_linux || is_chromeos
++build_epoll_based_tools = (is_linux && !is_bsd) || is_chromeos
+ 
+ config("quiche_internal_config") {
+   cflags = []
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc
new file mode 100644
index 0000000000..0667a06aa1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc
+@@ -35,7 +35,7 @@
+ #include "third_party/boringssl/src/pki/trust_store.h"
+ #include "third_party/boringssl/src/pki/trust_store_collection.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "net/proxy_resolution/proxy_config.h"
+ #include "net/proxy_resolution/proxy_config_service_fixed.h"
+ #endif
+@@ -67,7 +67,7 @@ void SetUpOnNetworkThread(
+     base::WaitableEvent* initialization_complete_event) {
+   net::URLRequestContextBuilder url_request_context_builder;
+   url_request_context_builder.set_user_agent(GetUserAgent());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On Linux, use a fixed ProxyConfigService, since the default one
+   // depends on glib.
+   //
+@@ -580,7 +580,7 @@ int main(int argc, char** argv) {
+   std::string impls_str = command_line.GetSwitchValueASCII("impls");
+   if (impls_str.empty()) {
+     // Default value.
+-#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \
++#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+       BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY))
+     impls_str = "platform,";
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_tools_net__watcher_net__watcher.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_tools_net__watcher_net__watcher.cc
new file mode 100644
index 0000000000..ccbbfa124f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_tools_net__watcher_net__watcher.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/tools/net_watcher/net_watcher.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/tools/net_watcher/net_watcher.cc
+@@ -32,7 +32,7 @@
+ #include "net/proxy_resolution/proxy_config_service.h"
+ #include "net/proxy_resolution/proxy_config_with_annotation.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "net/base/network_change_notifier_linux.h"
+ #endif
+ 
+@@ -44,7 +44,7 @@ namespace {
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Flag to specifies which network interfaces to ignore. Interfaces should
+ // follow as a comma seperated list.
+ const char kIgnoreNetifFlag[] = "ignore-netif";
+@@ -163,7 +163,7 @@ int main(int argc, char* argv[]) {
+ 
+   NetWatcher net_watcher;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+   std::string ignored_netifs_str =
+       command_line->GetSwitchValueASCII(kIgnoreNetifFlag);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h
new file mode 100644
index 0000000000..3cd570b640
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_traffic__annotation_network__traffic__annotation.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/traffic_annotation/network_traffic_annotation.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/traffic_annotation/network_traffic_annotation.h
+@@ -373,7 +373,7 @@ struct MutablePartialNetworkTrafficAnnot
+ }  // namespace net
+ 
+ // Placeholder for unannotated usages.
+-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ #define TRAFFIC_ANNOTATION_WITHOUT_PROTO(ANNOTATION_ID) \
+   net::DefineNetworkTrafficAnnotation(ANNOTATION_ID, "No proto yet.")
+ #endif
+@@ -387,7 +387,7 @@ struct MutablePartialNetworkTrafficAnnot
+ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
+ // complete.
+ #if !BUILDFLAG(IS_WIN) && \
+-    !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++    !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD))
+ 
+ #define NO_TRAFFIC_ANNOTATION_YET \
+   net::DefineNetworkTrafficAnnotation("undefined", "Nothing here yet.")
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context.cc
new file mode 100644
index 0000000000..48e9471e89
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/url_request/url_request_context.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/url_request/url_request_context.cc
+@@ -117,7 +117,7 @@ const HttpNetworkSessionContext* URLRequ
+ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
+ // complete.
+ #if !BUILDFLAG(IS_WIN) && \
+-    !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++    !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD))
+ std::unique_ptr<URLRequest> URLRequestContext::CreateRequest(
+     const GURL& url,
+     RequestPriority priority,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context.h
new file mode 100644
index 0000000000..cdd2363fa2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/url_request/url_request_context.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/net/url_request/url_request_context.h
+@@ -85,7 +85,7 @@ class NET_EXPORT URLRequestContext final
+ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
+ // complete.
+ #if !BUILDFLAG(IS_WIN) && \
+-    !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++    !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD))
+   // This function should not be used in Chromium, please use the version with
+   // NetworkTrafficAnnotationTag in the future.
+   //
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc
new file mode 100644
index 0000000000..238508ca0b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/net/url_request/url_request_context_builder.cc
+@@ -446,7 +446,7 @@ std::unique_ptr<URLRequestContext> URLRe
+   }
+ 
+   if (!proxy_resolution_service_) {
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD)
+     // TODO(willchan): Switch to using this code when
+     // ProxyConfigService::CreateSystemProxyConfigService()'s
+     // signature doesn't suck.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc
new file mode 100644
index 0000000000..b4222efc46
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc
+@@ -85,7 +85,7 @@
+ #include "gin/public/cppgc.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "pdf/pdfium/pdfium_font_linux.h"
+ #endif
+ 
+@@ -525,7 +525,7 @@ void InitializeSDK(bool enable_v8,
+ 
+   FPDF_InitLibraryWithConfig(&config);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   g_font_mapping_mode = font_mapping_mode;
+   InitializeLinuxFontMapper();
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc
new file mode 100644
index 0000000000..fbcc5a372e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_backend_cups__ipp__helper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/backend/cups_ipp_helper.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/printing/backend/cups_ipp_helper.cc
+@@ -202,7 +202,7 @@ void ExtractResolutions(const CupsOption
+   // Provide a default DPI if no valid DPI is found.
+ #if BUILDFLAG(IS_MAC)
+   constexpr gfx::Size kDefaultMissingDpi(kDefaultMacDpi, kDefaultMacDpi);
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   constexpr gfx::Size kDefaultMissingDpi(kPixelsPerInch, kPixelsPerInch);
+ #else
+   constexpr gfx::Size kDefaultMissingDpi(kDefaultPdfDpi, kDefaultPdfDpi);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc
new file mode 100644
index 0000000000..88a0d56293
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.cc
+@@ -19,7 +19,7 @@
+ #include "base/numerics/safe_conversions.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "mojo/public/mojom/base/values.mojom.h"
+ #endif
+ 
+@@ -161,7 +161,7 @@ bool StructTraits<
+   }
+ 
+   out->set_pages_per_sheet(data.pages_per_sheet());
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   DCHECK(out->advanced_settings().empty());
+   if (!data.ReadAdvancedSettings(&out->advanced_settings()))
+     return false;
+@@ -238,7 +238,7 @@ bool StructTraits<
+     if (system_print_dialog_data.size() != dictionary_entries) {
+       return false;
+     }
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // The dictionary must contain three strings.
+     const base::Value* value = system_print_dialog_data.Find(
+         printing::kLinuxSystemPrintDialogDataPrinter);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h
new file mode 100644
index 0000000000..ae93a9c8d8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_mojom_printing__context__mojom__traits.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/printing/mojom/printing_context_mojom_traits.h
+@@ -166,7 +166,7 @@ struct StructTraits<printing::mojom::Pri
+     return s.pages_per_sheet();
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static const printing::PrintSettings::AdvancedSettings& advanced_settings(
+       const printing::PrintSettings& s) {
+     return s.advanced_settings();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings.cc
new file mode 100644
index 0000000000..bafe1f2cf3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/print_settings.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/printing/print_settings.cc
+@@ -319,7 +319,7 @@ PrintSettings& PrintSettings::operator=(
+ #endif
+   is_modifiable_ = settings.is_modifiable_;
+   pages_per_sheet_ = settings.pages_per_sheet_;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   for (const auto& item : settings.advanced_settings_)
+     advanced_settings_.emplace(item.first, item.second.Clone());
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -349,7 +349,7 @@ bool PrintSettings::operator==(const Pri
+ #endif
+                   is_modifiable_, requested_custom_margins_in_points_,
+                   pages_per_sheet_
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                   ,
+                   advanced_settings_
+ #endif
+@@ -373,7 +373,7 @@ bool PrintSettings::operator==(const Pri
+                   other.is_modifiable_,
+                   other.requested_custom_margins_in_points_,
+                   other.pages_per_sheet_
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                   ,
+                   other.advanced_settings_
+ #endif
+@@ -413,7 +413,7 @@ void PrintSettings::Clear() {
+ #endif
+   is_modifiable_ = true;
+   pages_per_sheet_ = 1;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   advanced_settings_.clear();
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ #if BUILDFLAG(IS_CHROMEOS)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings.h
new file mode 100644
index 0000000000..2ddbd31739
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/print_settings.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/printing/print_settings.h
+@@ -25,7 +25,7 @@
+ #include "base/values.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <map>
+ 
+ #include "base/values.h"
+@@ -51,7 +51,7 @@ inline constexpr char kMacSystemPrintDia
+     "print_settings";
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ inline constexpr char kLinuxSystemPrintDialogDataPrinter[] = "printer_name";
+ inline constexpr char kLinuxSystemPrintDialogDataPrintSettings[] =
+     "print_settings";
+@@ -101,7 +101,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS
+     std::string vendor_id;
+   };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   using AdvancedSettings = std::map<std::string, base::Value>;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -276,7 +276,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS
+     pages_per_sheet_ = pages_per_sheet;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   AdvancedSettings& advanced_settings() { return advanced_settings_; }
+   const AdvancedSettings& advanced_settings() const {
+     return advanced_settings_;
+@@ -429,7 +429,7 @@ class COMPONENT_EXPORT(PRINTING_SETTINGS
+   // Number of pages per sheet.
+   int pages_per_sheet_;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Advanced settings.
+   AdvancedSettings advanced_settings_;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings__conversion.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings__conversion.cc
new file mode 100644
index 0000000000..13b96d7657
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_print__settings__conversion.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/print_settings_conversion.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/printing/print_settings_conversion.cc
+@@ -285,7 +285,7 @@ std::unique_ptr<PrintSettings> PrintSett
+     settings->set_is_modifiable(is_modifiable.value());
+   }
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS))
++#if BUILDFLAG(IS_CHROMEOS) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS))
+   const base::Value::Dict* advanced_settings =
+       job_settings.FindDict(kSettingAdvancedSettings);
+   if (advanced_settings) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__context__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__context__linux.cc
new file mode 100644
index 0000000000..de0c552157
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__context__linux.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/printing_context_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/printing/printing_context_linux.cc
+@@ -23,7 +23,7 @@
+ #endif
+ 
+ // Avoid using LinuxUi on Fuchsia.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -66,7 +66,7 @@ mojom::ResultCode PrintingContextLinux::
+ 
+   ResetSettings();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!ui::LinuxUi::instance())
+     return mojom::ResultCode::kSuccess;
+ 
+@@ -82,7 +82,7 @@ mojom::ResultCode PrintingContextLinux::
+ }
+ 
+ gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (ui::LinuxUi::instance())
+     return ui::LinuxUi::instance()->GetPdfPaperSize(this);
+ #endif
+@@ -95,7 +95,7 @@ mojom::ResultCode PrintingContextLinux::
+   DCHECK(!printer_settings.show_system_dialog);
+   DCHECK(!in_print_job_);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (!ui::LinuxUi::instance())
+     return mojom::ResultCode::kSuccess;
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__features.cc
new file mode 100644
index 0000000000..6a8d2a92b3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/printing_features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/printing/printing_features.cc
+@@ -21,7 +21,7 @@ BASE_FEATURE(kEnableBorderlessPrinting,
+              base::FEATURE_ENABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ // Use the CUPS IPP printing backend instead of the original CUPS backend that
+ // calls the deprecated PPD API.
+ BASE_FEATURE(kCupsIppPrintingBackend,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__features.h
new file mode 100644
index 0000000000..5019cf8266
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_printing__features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/printing_features.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/printing/printing_features.h
+@@ -21,7 +21,7 @@ namespace features {
+ COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kEnableBorderlessPrinting);
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+ 
+-#if BUILDFLAG(IS_MAC)
++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kCupsIppPrintingBackend);
+ #endif  // BUILDFLAG(IS_MAC)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..4617776c37
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.cc
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.cc
+@@ -10,20 +10,27 @@
+ #include "base/path_service.h"
+ #include "build/build_config.h"
+ #include "printing/buildflags/buildflags.h"
++#if !BUILDFLAG(IS_BSD)
+ #include "sandbox/linux/syscall_broker/broker_command.h"
+ #include "sandbox/linux/syscall_broker/broker_file_permission.h"
+ #include "sandbox/policy/export.h"
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#else
++#include "sandbox/policy/sandbox.h"
++#endif
+ 
+ #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS)
+ #include "printing/backend/cups_connection_pool.h"
+ #endif
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
+ using sandbox::syscall_broker::MakeBrokerCommandSet;
++#endif
+ 
+ namespace printing {
+ 
++#if !BUILDFLAG(IS_BSD)
+ namespace {
+ 
+ sandbox::syscall_broker::BrokerCommandSet GetPrintBackendBrokerCommandSet() {
+@@ -76,9 +83,11 @@ std::vector<BrokerFilePermission> GetPri
+ }
+ 
+ }  // namespace
++#endif
+ 
+ bool PrintBackendPreSandboxHook(
+     sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_CUPS)
+   // Create the socket connections to the CUPS server before engaging the
+   // sandbox, since new connections cannot be made after that.
+@@ -92,6 +101,7 @@ bool PrintBackendPreSandboxHook(
+       sandbox::policy::SandboxLinux::PreSandboxHook(), options);
+ 
+   instance->EngageNamespaceSandboxIfPossible();
++#endif
+   return true;
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h
new file mode 100644
index 0000000000..eec92972d1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_printing_sandbox_print__backend__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/printing/sandbox/print_backend_sandbox_hook_linux.h
+@@ -5,8 +5,13 @@
+ #ifndef PRINTING_SANDBOX_PRINT_BACKEND_SANDBOX_HOOK_LINUX_H_
+ #define PRINTING_SANDBOX_PRINT_BACKEND_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
+ #include "base/component_export.h"
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace printing {
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_BUILD.gn
new file mode 100644
index 0000000000..621da6ce9a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/BUILD.gn
+@@ -49,7 +49,7 @@ group("sandbox") {
+       "//sandbox/mac:system_services",
+       "//sandbox/mac/mojom",
+     ]
+-  } else if (is_linux || is_chromeos || is_android) {
++  } else if ((is_linux && !is_bsd) || is_chromeos || is_android) {
+     public_deps = [ "//sandbox/linux:sandbox" ]
+   }
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_features.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_features.gni
new file mode 100644
index 0000000000..6d3b9da22b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_features.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/features.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/features.gni
+@@ -6,7 +6,7 @@
+ # currently.
+ # Do not disable seccomp_bpf anywhere without talking to
+ # security%chromium.org@localhost!
+-use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
++use_seccomp_bpf = !is_bsd && (is_linux || is_chromeos || is_android) &&
+                   (current_cpu == "x86" || current_cpu == "x64" ||
+                    current_cpu == "arm" || current_cpu == "arm64" ||
+                    current_cpu == "mipsel" || current_cpu == "mips64el")
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn
new file mode 100644
index 0000000000..c85c2b690e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/linux/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/linux/BUILD.gn
+@@ -12,11 +12,11 @@ if (is_android) {
+ }
+ 
+ declare_args() {
+-  compile_suid_client = is_linux || is_chromeos
++  compile_suid_client = (is_linux || is_chromeos) && !is_bsd
+ 
+-  compile_credentials = is_linux || is_chromeos
++  compile_credentials = (is_linux || is_chromeos) && !is_bsd
+ 
+-  compile_syscall_broker = is_linux || is_chromeos
++  compile_syscall_broker = (is_linux || is_chromeos) && !is_bsd
+ 
+   # On Android, use plain GTest.
+   use_base_test_suite = is_linux || is_chromeos
+@@ -380,6 +380,17 @@ component("sandbox_services") {
+       "services/libc_interceptor.h",
+     ]
+   }
++
++  if (is_bsd) {
++    sources -= [
++      "services/scoped_process.cc",
++      "services/scoped_process.h",
++      "services/syscall_wrappers.cc",
++      "services/syscall_wrappers.h",
++      "services/yama.cc",
++      "services/yama.h",
++     ]
++   }
+ }
+ 
+ source_set("sandbox_services_headers") {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_services_init__process__reaper.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_services_init__process__reaper.cc
new file mode 100644
index 0000000000..46afdb8850
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_services_init__process__reaper.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/linux/services/init_process_reaper.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/linux/services/init_process_reaper.cc
+@@ -2,6 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#if 0
+ #include "sandbox/linux/services/init_process_reaper.h"
+ 
+ #include <signal.h>
+@@ -100,3 +101,4 @@ bool CreateInitProcessReaper(base::OnceC
+ }
+ 
+ }  // namespace sandbox.
++#endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc
new file mode 100644
index 0000000000..ae111e0b8f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc
+@@ -17,7 +17,9 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
++#if !BUILDFLAG(IS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <time.h>
+@@ -173,7 +175,7 @@ bool ReadTimeStruct(base::PickleIterator
+   } else {
+     base::AutoLock lock(g_timezones_lock.Get());
+     auto ret_pair = g_timezones.Get().insert(timezone);
+-    output->tm_zone = ret_pair.first->c_str();
++    output->tm_zone = (char *)ret_pair.first->c_str();
+   }
+ 
+   return true;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn
new file mode 100644
index 0000000000..da307da5c9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_BUILD.gn
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/BUILD.gn
+@@ -50,7 +50,7 @@ component("policy") {
+       "//third_party/jni_zero",
+     ]
+   }
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "linux/bpf_audio_policy_linux.cc",
+       "linux/bpf_audio_policy_linux.h",
+@@ -129,6 +129,38 @@ component("policy") {
+       "//sandbox/linux:suid_sandbox_client",
+     ]
+   }
++  if (is_openbsd) {
++    sources += [
++      "openbsd/sandbox_openbsd.cc",
++      "openbsd/sandbox_openbsd.h",
++    ]
++    deps += [
++      "//sandbox:sandbox_buildflags",
++      "//ui/gfx/x",
++    ]
++    libs = [ "util" ]
++  }
++  if (is_netbsd) {
++    sources += [
++      "netbsd/sandbox_netbsd.cc",
++      "netbsd/sandbox_netbsd.h",
++    ]
++    deps += [
++      "//sandbox:sandbox_buildflags",
++      "//ui/gfx/x",
++    ]
++    libs = [ "util" ]
++  }
++  if (is_freebsd) {
++    sources += [
++      "freebsd/sandbox_freebsd.cc",
++      "freebsd/sandbox_freebsd.h",
++    ]
++    deps += [
++      "//sandbox:sandbox_buildflags",
++      "//ui/gfx/x",
++    ]
++  }
+   if (is_chromeos_ash) {
+     sources += [
+       "linux/bpf_ime_policy_linux.cc",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_features.cc
new file mode 100644
index 0000000000..12670e31a1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_features.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/features.cc
+@@ -20,7 +20,11 @@ namespace sandbox::policy::features {
+ // (Only causes an effect when feature kNetworkServiceInProcess is disabled.)
+ BASE_FEATURE(kNetworkServiceSandbox,
+              "NetworkServiceSandbox",
++#if BUILDFLAG(IS_BSD)
++             base::FEATURE_ENABLED_BY_DEFAULT);
++#else
+              base::FEATURE_DISABLED_BY_DEFAULT);
++#endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ // Enables a fine-grained seccomp-BPF syscall filter for the network service.
+@@ -128,7 +132,7 @@ BASE_FEATURE(kForceSpectreVariant2Mitiga
+              base::FEATURE_DISABLED_BY_DEFAULT);
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Enabling the kNetworkServiceSandbox feature automatically enables Spectre
+ // variant 2 mitigations in the network service. This can lead to performance
+ // regressions, so enabling this feature will turn off the Spectre Variant 2
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_features.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_features.h
new file mode 100644
index 0000000000..d7e3c0b3f5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/features.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/features.h
+@@ -44,7 +44,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATU
+ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kForceSpectreVariant2Mitigation);
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(
+     kForceDisableSpectreVariant2MitigationInNetworkService);
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc
new file mode 100644
index 0000000000..64f2ac178a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.cc
@@ -0,0 +1,220 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/freebsd/sandbox_freebsd.cc.orig	2024-12-21 10:25:10.566911261 +0000
++++ src/3rdparty/chromium/sandbox/policy/freebsd/sandbox_freebsd.cc
+@@ -0,0 +1,211 @@
++// Copyright (c) 2012 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 "sandbox/policy/freebsd/sandbox_freebsd.h"
++
++#include <dirent.h>
++#include <fcntl.h>
++#include <stdint.h>
++#include <sys/resource.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++#include <limits>
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/command_line.h"
++#include "base/debug/stack_trace.h"
++#include "base/feature_list.h"
++#include "base/files/file_path.h"
++#include "base/files/file_util.h"
++#include "base/files/scoped_file.h"
++#include "base/logging.h"
++#include "base/memory/singleton.h"
++#include "base/path_service.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/system/sys_info.h"
++#include "base/threading/thread.h"
++#include "base/time/time.h"
++#include "build/build_config.h"
++#include "crypto/crypto_buildflags.h"
++#include "ppapi/buildflags/buildflags.h"
++#include "sandbox/constants.h"
++#include "sandbox/linux/services/credentials.h"
++#include "sandbox/linux/services/namespace_sandbox.h"
++#include "sandbox/linux/services/proc_util.h"
++#include "sandbox/linux/services/resource_limits.h"
++#include "sandbox/linux/services/thread_helpers.h"
++#include "sandbox/linux/syscall_broker/broker_command.h"
++#include "sandbox/linux/syscall_broker/broker_process.h"
++#include "sandbox/policy/sandbox.h"
++#include "sandbox/policy/sandbox_type.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "sandbox/policy/switches.h"
++#include "sandbox/sandbox_buildflags.h" 
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++#if BUILDFLAG(USE_NSS_CERTS)
++#include "crypto/nss_util.h"
++#endif
++
++#include "third_party/boringssl/src/include/openssl/crypto.h"
++
++#include "ui/gfx/font_util.h"
++
++namespace sandbox {
++namespace policy {
++
++SandboxLinux::SandboxLinux()
++    : sandbox_status_flags_(kInvalid),
++      pre_initialized_(false),
++      initialize_sandbox_ran_(false),
++      broker_process_(nullptr) {
++}
++
++SandboxLinux::~SandboxLinux() {
++  if (pre_initialized_) {
++    CHECK(initialize_sandbox_ran_);
++  }
++}
++
++SandboxLinux* SandboxLinux::GetInstance() {
++  SandboxLinux* instance = base::Singleton<SandboxLinux>::get();
++  CHECK(instance);
++  return instance;
++}
++
++void SandboxLinux::StopThread(base::Thread* thread) {
++  DCHECK(thread);
++  thread->Stop();
++}
++
++void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) {
++  CHECK(!pre_initialized_);
++#if BUILDFLAG(USING_SANITIZER)
++  // Sanitizers need to open some resources before the sandbox is enabled.
++  // This should not fork, not launch threads, not open a directory.
++  __sanitizer_sandbox_on_notify(sanitizer_args());
++  sanitizer_args_.reset();
++#endif
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  base::SysInfo::AmountOfPhysicalMemory();
++  base::SysInfo::NumberOfProcessors();
++  base::SysInfo::CPUModelName();
++
++  switch (sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++    {
++#if BUILDFLAG(USE_NSS_CERTS)
++      // The main process has to initialize the ~/.pki dir which won't work
++      // after unveil(2).
++      crypto::EnsureNSSInit();
++#endif
++      CRYPTO_pre_sandbox_init();
++
++      base::FilePath cache_directory, local_directory;
++
++      base::PathService::Get(base::DIR_CACHE, &cache_directory);
++      base::PathService::Get(base::DIR_HOME, &local_directory);   
++
++      cache_directory = cache_directory.AppendASCII("chromium");
++      local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications");
++
++      if (!base::CreateDirectory(cache_directory)) {
++        LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory.";
++      }
++
++      if (!base::CreateDirectory(local_directory)) {
++        LOG(ERROR) << "Failed to create " << local_directory.value() << " directory.";
++      }
++
++      break;
++    }
++    case sandbox::mojom::Sandbox::kRenderer:
++      gfx::InitializeFonts();
++      break;
++    default:
++      break;
++  }
++
++  pre_initialized_ = true;
++}
++
++bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                                     SandboxLinux::PreSandboxHook hook,
++                                     const Options& options) {
++  DCHECK(!initialize_sandbox_ran_);
++  initialize_sandbox_ran_ = true;
++
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  if (command_line->HasSwitch(switches::kNoSandbox))
++    return true;
++
++  VLOG(1) << "SandboxLinux::InitializeSandbox: process_type="
++      << process_type << " sandbox_type=" << sandbox_type;
++
++  // Only one thread is running, pre-initialize if not already done.
++  if (!pre_initialized_)
++    PreinitializeSandbox(sandbox_type);
++
++  // Attempt to limit the future size of the address space of the process.
++  int error = 0;
++  const bool limited_as = LimitAddressSpace(&error);
++  if (error) {
++    // Restore errno. Internally to |LimitAddressSpace|, the errno due to
++    // setrlimit may be lost.
++    errno = error;
++    PCHECK(limited_as);
++  }
++
++  if (hook)
++    CHECK(std::move(hook).Run(options));
++
++  return true;
++}
++
++bool SandboxLinux::LimitAddressSpace(int* error) {
++#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
++    !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) {
++    return false;
++  }
++
++  // Unfortunately, it does not appear possible to set RLIMIT_AS such that it
++  // will both (a) be high enough to support V8's and WebAssembly's address
++  // space requirements while also (b) being low enough to mitigate exploits
++  // using integer overflows that require large allocations, heap spray, or
++  // other memory-hungry attack modes.
++
++  *error = sandbox::ResourceLimits::Lower(
++      RLIMIT_DATA, static_cast<rlim_t>(sandbox::kDataSizeLimit));
++
++  // Cache the resource limit before turning on the sandbox.
++  base::SysInfo::AmountOfVirtualMemory();
++  base::SysInfo::MaxSharedMemorySize();
++
++  return *error == 0;
++#else
++  base::SysInfo::AmountOfVirtualMemory();
++  return false;
++#endif  // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) &&
++        // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++}
++
++}  // namespace policy
++}  // namespace sandbox
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h
new file mode 100644
index 0000000000..bb46ef4749
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_freebsd_sandbox__freebsd.h
@@ -0,0 +1,285 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/freebsd/sandbox_freebsd.h.orig	2024-12-21 10:25:10.567580901 +0000
++++ src/3rdparty/chromium/sandbox/policy/freebsd/sandbox_freebsd.h
+@@ -0,0 +1,276 @@
++// Copyright (c) 2012 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 SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/logging.h"
++#include "base/posix/global_descriptors.h"
++#include "sandbox/policy/export.h"
++#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "base/sanitizer_buildflags.h"
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++namespace base {
++template <typename T>
++struct DefaultSingletonTraits;
++class Thread;
++}  // namespace base
++
++namespace sandbox {
++namespace syscall_broker {
++class BrokerProcess;
++}  // namespace syscall_broker
++}  // namespace sandbox
++
++namespace sandbox {
++namespace policy {
++
++// A singleton class to represent and change our sandboxing state for the
++// three main Linux sandboxes.
++// The sandboxing model allows using two layers of sandboxing. The first layer
++// can be implemented either with unprivileged namespaces or with the setuid
++// sandbox. This class provides a way to engage the namespace sandbox, but does
++// not deal with the legacy setuid sandbox directly.
++// The second layer is mainly based on seccomp-bpf and is engaged with
++// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing"
++// the first layer of sandboxing. That is, InitializeSandbox must always be
++// called to have any meaningful sandboxing at all.
++class SANDBOX_POLICY_EXPORT SandboxLinux {
++ public:
++  // This is a list of sandbox IPC methods which the renderer may send to the
++  // sandbox host. See
++  // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md
++  // This isn't the full list, values < 32 are reserved for methods called from
++  // Skia, and values < 64 are reserved for libc_interceptor.cc.
++  enum LinuxSandboxIPCMethods {
++    DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64,
++    DEPRECATED_METHOD_GET_CHILD_WITH_INODE,
++    DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE,
++    METHOD_MAKE_SHARED_MEMORY_SEGMENT,
++    DEPRECATED_METHOD_MATCH_WITH_FALLBACK,
++  };
++
++  // These form a bitmask which describes the conditions of the Linux sandbox.
++  // Note: this doesn't strictly give you the current status, it states
++  // what will be enabled when the relevant processes are initialized.
++  enum Status {
++    // SUID sandbox active.
++    kSUID = 1 << 0,
++
++    // Sandbox is using a new PID namespace.
++    kPIDNS = 1 << 1,
++
++    // Sandbox is using a new network namespace.
++    kNetNS = 1 << 2,
++
++    // seccomp-bpf sandbox active.
++    kSeccompBPF = 1 << 3,
++
++    // The Yama LSM module is present and enforcing.
++    kYama = 1 << 4,
++
++    // seccomp-bpf sandbox is active and the kernel supports TSYNC.
++    kSeccompTSYNC = 1 << 5,
++
++    // User namespace sandbox active.
++    kUserNS = 1 << 6,
++
++    // A flag that denotes an invalid sandbox status.
++    kInvalid = 1 << 31,
++  };
++
++  // SandboxLinux Options are a superset of SandboxSecompBPF Options.
++  struct Options : public SandboxSeccompBPF::Options {
++    // When running with a zygote, the namespace sandbox will have already
++    // been engaged prior to initializing SandboxLinux itself, and need not
++    // be done so again. Set to true to indicate that there isn't a zygote
++    // for this process and the step is to be performed here explicitly.
++    bool engage_namespace_sandbox = false;
++
++    // Allow starting the sandbox with multiple threads already running. This
++    // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy
++    // across all running threads.
++    bool allow_threads_during_sandbox_init = false;
++
++    // Enables the CHECK for open directories. The open directory check is only
++    // useful for the chroot jail (from the semantic layer of the sandbox), and
++    // can safely be disabled if we are only enabling the seccomp-BPF layer.
++    bool check_for_open_directories = true;
++  };
++
++  // Callers can provide this hook to run code right before the policy
++  // is passed to the BPF compiler and the sandbox is engaged. If
++  // pre_sandbox_hook() returns true, the sandbox will be engaged
++  // afterwards, otherwise the process is terminated.
++  using PreSandboxHook = base::OnceCallback<bool(Options)>;
++
++  // Get our singleton instance.
++  static SandboxLinux* GetInstance();
++
++  SandboxLinux(const SandboxLinux&) = delete;
++  SandboxLinux& operator=(const SandboxLinux&) = delete;
++
++  bool SetPledge(const char *pstring, const char *ppath);
++  bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type);
++
++  // Do some initialization that can only be done before any of the sandboxes
++  // are enabled. If using the setuid sandbox, this should be called manually
++  // before the setuid sandbox is engaged.
++  // Security: When this runs, it is imperative that either InitializeSandbox()
++  // runs as well or that all file descriptors returned in
++  // GetFileDescriptorsToClose() get closed.
++  // Otherwise file descriptors that bypass the security of the setuid sandbox
++  // would be kept open. One must be particularly careful if a process performs
++  // a fork().
++  void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type);
++
++  // Check that the current process is the init process of a new PID
++  // namespace and then proceed to drop access to the file system by using
++  // a new unprivileged namespace. This is a layer-1 sandbox.
++  // In order for this sandbox to be effective, it must be "sealed" by calling
++  // InitializeSandbox().
++  void EngageNamespaceSandbox(bool from_zygote);
++
++  // Return a list of file descriptors to close if PreinitializeSandbox() ran
++  // but InitializeSandbox() won't. Avoid using.
++  // TODO(jln): get rid of this hack.
++  std::vector<int> GetFileDescriptorsToClose();
++
++  // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with
++  // an adequate policy depending on the process type and command line
++  // arguments.
++  // Currently the layer-2 sandbox is composed of seccomp-bpf and address space
++  // limitations.
++  // This function should only be called without any thread running.
++  bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                         PreSandboxHook hook,
++                         const Options& options);
++
++  // Stop |thread| in a way that can be trusted by the sandbox.
++  void StopThread(base::Thread* thread);
++
++  // Returns the status of the renderer, worker and ppapi sandbox. Can only
++  // be queried after going through PreinitializeSandbox(). This is a bitmask
++  // and uses the constants defined in "enum Status" above. Since the
++  // status needs to be provided before the sandboxes are actually started,
++  // this returns what will actually happen once InitializeSandbox()
++  // is called from inside these processes.
++  int GetStatus();
++
++  // Returns true if the current process is single-threaded or if the number
++  // of threads cannot be determined.
++  bool IsSingleThreaded() const;
++
++  // Returns true if we started Seccomp BPF.
++  bool seccomp_bpf_started() const;
++
++  // Check the policy and eventually start the seccomp-bpf sandbox. This should
++  // never be called with threads started. If we detect that threads have
++  // started we will crash.
++  bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type,
++                       PreSandboxHook hook,
++                       const Options& options);
++
++  // Limit the address space of the current process (and its children) to make
++  // some vulnerabilities harder to exploit. Writes the errno due to setrlimit
++  // (including 0 if no error) into |error|.
++  bool LimitAddressSpace(int* error);
++
++  // Returns a file descriptor to proc. The file descriptor is no longer valid
++  // after the sandbox has been sealed.
++  int proc_fd() const {
++    DCHECK_NE(-1, proc_fd_);
++    return proc_fd_;
++  }
++
++#if BUILDFLAG(USING_SANITIZER)
++  __sanitizer_sandbox_arguments* sanitizer_args() const {
++    return sanitizer_args_.get();
++  };
++#endif
++
++  // A BrokerProcess is a helper that is started before the sandbox is engaged,
++  // typically from a pre-sandbox hook, that will serve requests to access
++  // files over an IPC channel. The client  of this runs from a SIGSYS handler
++  // triggered by the seccomp-bpf sandbox.
++  // |client_sandbox_policy| is the policy being run by the client, and is
++  // used to derive the equivalent broker-side policy.
++  // |broker_side_hook| is an alternate pre-sandbox hook to be run before the
++  // broker itself gets sandboxed, to which the broker side policy and
++  // |options| are passed.
++  // Crashes the process if the broker can not be started since continuation
++  // is impossible (and presumably unsafe).
++  // This should never be destroyed, as after the sandbox is started it is
++  // vital to the process.
++#if 0
++  void StartBrokerProcess(
++      const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set,
++      std::vector<sandbox::syscall_broker::BrokerFilePermission> permissions,
++      PreSandboxHook broker_side_hook,
++      const Options& options);
++
++  sandbox::syscall_broker::BrokerProcess* broker_process() const {
++    return broker_process_;
++  }
++#endif
++
++ private:
++  friend struct base::DefaultSingletonTraits<SandboxLinux>;
++
++  SandboxLinux();
++  ~SandboxLinux();
++
++  // We must have been pre_initialized_ before using these.
++  bool seccomp_bpf_supported() const;
++  bool seccomp_bpf_with_tsync_supported() const;
++
++  // Returns true if it can be determined that the current process has open
++  // directories that are not managed by the SandboxLinux class. This would
++  // be a vulnerability as it would allow to bypass the setuid sandbox.
++  bool HasOpenDirectories() const;
++
++  // The last part of the initialization is to make sure any temporary "hole"
++  // in the sandbox is closed. For now, this consists of closing proc_fd_.
++  void SealSandbox();
++
++  // GetStatus() makes promises as to how the sandbox will behave. This
++  // checks that no promises have been broken.
++  void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type);
++
++  // Stop |thread| and make sure it does not appear in /proc/self/tasks/
++  // anymore.
++  void StopThreadAndEnsureNotCounted(base::Thread* thread) const;
++
++  // A file descriptor to /proc. It's dangerous to have it around as it could
++  // allow for sandbox bypasses. It needs to be closed before we consider
++  // ourselves sandboxed.
++  int proc_fd_;
++
++  bool seccomp_bpf_started_;
++  // The value returned by GetStatus(). Gets computed once and then cached.
++  int sandbox_status_flags_;
++  // Did PreinitializeSandbox() run?
++  bool pre_initialized_;
++  bool seccomp_bpf_supported_;             // Accurate if pre_initialized_.
++  bool seccomp_bpf_with_tsync_supported_;  // Accurate if pre_initialized_.
++  bool yama_is_enforcing_;                 // Accurate if pre_initialized_.
++  bool initialize_sandbox_ran_;            // InitializeSandbox() was called.
++#if BUILDFLAG(USING_SANITIZER)
++  std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_;
++#endif
++  sandbox::syscall_broker::BrokerProcess* broker_process_;  // Leaked as global.
++};
++
++}  // namespace policy
++}  // namespace sandbox
++
++#endif  // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom
new file mode 100644
index 0000000000..1d73bc3501
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_mojom_sandbox.mojom
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/mojom/sandbox.mojom.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/mojom/sandbox.mojom
+@@ -81,6 +81,15 @@ enum Sandbox {
+   [EnableIf=is_fuchsia]
+   kVideoCapture,
+ 
++  [EnableIf=is_openbsd]
++  kVideoCapture,
++
++  [EnableIf=is_netbsd]
++  kVideoCapture,
++
++  [EnableIf=is_freebsd]
++  kVideoCapture,
++
+   // Allows access to file contents and Windows APIs for parsing icons from PE
+   // files.
+   [EnableIf=is_win]
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.cc
new file mode 100644
index 0000000000..bc7e88d6bc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.cc
@@ -0,0 +1,220 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/netbsd/sandbox_netbsd.cc.orig	2024-12-21 10:25:10.569003712 +0000
++++ src/3rdparty/chromium/sandbox/policy/netbsd/sandbox_netbsd.cc
+@@ -0,0 +1,211 @@
++// Copyright (c) 2012 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 "sandbox/policy/netbsd/sandbox_netbsd.h"
++
++#include <dirent.h>
++#include <fcntl.h>
++#include <stdint.h>
++#include <sys/resource.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++#include <limits>
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/command_line.h"
++#include "base/debug/stack_trace.h"
++#include "base/feature_list.h"
++#include "base/files/file_path.h"
++#include "base/files/file_util.h"
++#include "base/files/scoped_file.h"
++#include "base/logging.h"
++#include "base/memory/singleton.h"
++#include "base/path_service.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/system/sys_info.h"
++#include "base/threading/thread.h"
++#include "base/time/time.h"
++#include "build/build_config.h"
++#include "crypto/crypto_buildflags.h"
++#include "ppapi/buildflags/buildflags.h"
++#include "sandbox/constants.h"
++#include "sandbox/linux/services/credentials.h"
++#include "sandbox/linux/services/namespace_sandbox.h"
++#include "sandbox/linux/services/proc_util.h"
++#include "sandbox/linux/services/resource_limits.h"
++#include "sandbox/linux/services/thread_helpers.h"
++#include "sandbox/linux/syscall_broker/broker_command.h"
++#include "sandbox/linux/syscall_broker/broker_process.h"
++#include "sandbox/policy/sandbox.h"
++#include "sandbox/policy/sandbox_type.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "sandbox/policy/switches.h"
++#include "sandbox/sandbox_buildflags.h"
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++#if BUILDFLAG(USE_NSS_CERTS)
++#include "crypto/nss_util.h"
++#endif
++
++#include "third_party/boringssl/src/include/openssl/crypto.h"
++
++#include "ui/gfx/font_util.h"
++
++namespace sandbox {
++namespace policy {
++
++SandboxLinux::SandboxLinux()
++    : sandbox_status_flags_(kInvalid),
++      pre_initialized_(false),
++      initialize_sandbox_ran_(false),
++      broker_process_(nullptr) {
++}
++
++SandboxLinux::~SandboxLinux() {
++  if (pre_initialized_) {
++    CHECK(initialize_sandbox_ran_);
++  }
++}
++
++SandboxLinux* SandboxLinux::GetInstance() {
++  SandboxLinux* instance = base::Singleton<SandboxLinux>::get();
++  CHECK(instance);
++  return instance;
++}
++
++void SandboxLinux::StopThread(base::Thread* thread) {
++  DCHECK(thread);
++  thread->Stop();
++}
++
++void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) {
++  CHECK(!pre_initialized_);
++#if BUILDFLAG(USING_SANITIZER)
++  // Sanitizers need to open some resources before the sandbox is enabled.
++  // This should not fork, not launch threads, not open a directory.
++  __sanitizer_sandbox_on_notify(sanitizer_args());
++  sanitizer_args_.reset();
++#endif
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  base::SysInfo::AmountOfPhysicalMemory();
++  base::SysInfo::NumberOfProcessors();
++  base::SysInfo::CPUModelName();
++
++  switch (sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++    {
++#if BUILDFLAG(USE_NSS_CERTS)
++      // The main process has to initialize the ~/.pki dir which won't work
++      // after unveil(2).
++      crypto::EnsureNSSInit();
++#endif
++      CRYPTO_pre_sandbox_init();
++
++      base::FilePath cache_directory, local_directory;
++
++      base::PathService::Get(base::DIR_CACHE, &cache_directory);
++      base::PathService::Get(base::DIR_HOME, &local_directory);
++
++      cache_directory = cache_directory.AppendASCII("chromium");
++      local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications");
++
++      if (!base::CreateDirectory(cache_directory)) {
++        LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory.";
++      }
++
++      if (!base::CreateDirectory(local_directory)) {
++        LOG(ERROR) << "Failed to create " << local_directory.value() << " directory.";
++      }
++
++      break;
++    }
++    case sandbox::mojom::Sandbox::kRenderer:
++      gfx::InitializeFonts();
++      break;
++    default:
++      break;
++  }
++
++  pre_initialized_ = true;
++}
++
++bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                                     SandboxLinux::PreSandboxHook hook,
++                                     const Options& options) {
++  DCHECK(!initialize_sandbox_ran_);
++  initialize_sandbox_ran_ = true;
++
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  if (command_line->HasSwitch(switches::kNoSandbox))
++    return true;
++
++  VLOG(1) << "SandboxLinux::InitializeSandbox: process_type="
++      << process_type << " sandbox_type=" << sandbox_type;
++
++  // Only one thread is running, pre-initialize if not already done.
++  if (!pre_initialized_)
++    PreinitializeSandbox(sandbox_type);
++
++  // Attempt to limit the future size of the address space of the process.
++  int error = 0;
++  const bool limited_as = LimitAddressSpace(&error);
++  if (error) {
++    // Restore errno. Internally to |LimitAddressSpace|, the errno due to
++    // setrlimit may be lost.
++    errno = error;
++    PCHECK(limited_as);
++  }
++
++  if (hook)
++    CHECK(std::move(hook).Run(options));
++
++  return true;
++}
++
++bool SandboxLinux::LimitAddressSpace(int* error) {
++#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
++    !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) {
++    return false;
++  }
++
++  // Unfortunately, it does not appear possible to set RLIMIT_AS such that it
++  // will both (a) be high enough to support V8's and WebAssembly's address
++  // space requirements while also (b) being low enough to mitigate exploits
++  // using integer overflows that require large allocations, heap spray, or
++  // other memory-hungry attack modes.
++
++  *error = sandbox::ResourceLimits::Lower(
++      RLIMIT_DATA, static_cast<rlim_t>(sandbox::kDataSizeLimit));
++
++  // Cache the resource limit before turning on the sandbox.
++  base::SysInfo::AmountOfVirtualMemory();
++  base::SysInfo::MaxSharedMemorySize();
++
++  return *error == 0;
++#else
++  base::SysInfo::AmountOfVirtualMemory();
++  return false;
++#endif  // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) &&
++        // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++}
++
++}  // namespace policy
++}  // namespace sandbox
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.h
new file mode 100644
index 0000000000..d29639097b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_netbsd_sandbox__netbsd.h
@@ -0,0 +1,285 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/netbsd/sandbox_netbsd.h.orig	2024-12-21 10:25:10.569588425 +0000
++++ src/3rdparty/chromium/sandbox/policy/netbsd/sandbox_netbsd.h
+@@ -0,0 +1,276 @@
++// Copyright (c) 2012 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 SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/logging.h"
++#include "base/posix/global_descriptors.h"
++#include "sandbox/policy/export.h"
++#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "base/sanitizer_buildflags.h"
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++namespace base {
++template <typename T>
++struct DefaultSingletonTraits;
++class Thread;
++}  // namespace base
++
++namespace sandbox {
++namespace syscall_broker {
++class BrokerProcess;
++}  // namespace syscall_broker
++}  // namespace sandbox
++
++namespace sandbox {
++namespace policy {
++
++// A singleton class to represent and change our sandboxing state for the
++// three main Linux sandboxes.
++// The sandboxing model allows using two layers of sandboxing. The first layer
++// can be implemented either with unprivileged namespaces or with the setuid
++// sandbox. This class provides a way to engage the namespace sandbox, but does
++// not deal with the legacy setuid sandbox directly.
++// The second layer is mainly based on seccomp-bpf and is engaged with
++// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing"
++// the first layer of sandboxing. That is, InitializeSandbox must always be
++// called to have any meaningful sandboxing at all.
++class SANDBOX_POLICY_EXPORT SandboxLinux {
++ public:
++  // This is a list of sandbox IPC methods which the renderer may send to the
++  // sandbox host. See
++  // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md
++  // This isn't the full list, values < 32 are reserved for methods called from
++  // Skia, and values < 64 are reserved for libc_interceptor.cc.
++  enum LinuxSandboxIPCMethods {
++    DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64,
++    DEPRECATED_METHOD_GET_CHILD_WITH_INODE,
++    DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE,
++    METHOD_MAKE_SHARED_MEMORY_SEGMENT,
++    DEPRECATED_METHOD_MATCH_WITH_FALLBACK,
++  };
++
++  // These form a bitmask which describes the conditions of the Linux sandbox.
++  // Note: this doesn't strictly give you the current status, it states
++  // what will be enabled when the relevant processes are initialized.
++  enum Status {
++    // SUID sandbox active.
++    kSUID = 1 << 0,
++
++    // Sandbox is using a new PID namespace.
++    kPIDNS = 1 << 1,
++
++    // Sandbox is using a new network namespace.
++    kNetNS = 1 << 2,
++
++    // seccomp-bpf sandbox active.
++    kSeccompBPF = 1 << 3,
++
++    // The Yama LSM module is present and enforcing.
++    kYama = 1 << 4,
++
++    // seccomp-bpf sandbox is active and the kernel supports TSYNC.
++    kSeccompTSYNC = 1 << 5,
++
++    // User namespace sandbox active.
++    kUserNS = 1 << 6,
++
++    // A flag that denotes an invalid sandbox status.
++    kInvalid = 1 << 31,
++  };
++
++  // SandboxLinux Options are a superset of SandboxSecompBPF Options.
++  struct Options : public SandboxSeccompBPF::Options {
++    // When running with a zygote, the namespace sandbox will have already
++    // been engaged prior to initializing SandboxLinux itself, and need not
++    // be done so again. Set to true to indicate that there isn't a zygote
++    // for this process and the step is to be performed here explicitly.
++    bool engage_namespace_sandbox = false;
++
++    // Allow starting the sandbox with multiple threads already running. This
++    // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy
++    // across all running threads.
++    bool allow_threads_during_sandbox_init = false;
++
++    // Enables the CHECK for open directories. The open directory check is only
++    // useful for the chroot jail (from the semantic layer of the sandbox), and
++    // can safely be disabled if we are only enabling the seccomp-BPF layer.
++    bool check_for_open_directories = true;
++  };
++
++  // Callers can provide this hook to run code right before the policy
++  // is passed to the BPF compiler and the sandbox is engaged. If
++  // pre_sandbox_hook() returns true, the sandbox will be engaged
++  // afterwards, otherwise the process is terminated.
++  using PreSandboxHook = base::OnceCallback<bool(Options)>;
++
++  // Get our singleton instance.
++  static SandboxLinux* GetInstance();
++
++  SandboxLinux(const SandboxLinux&) = delete;
++  SandboxLinux& operator=(const SandboxLinux&) = delete;
++
++  bool SetPledge(const char *pstring, const char *ppath);
++  bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type);
++
++  // Do some initialization that can only be done before any of the sandboxes
++  // are enabled. If using the setuid sandbox, this should be called manually
++  // before the setuid sandbox is engaged.
++  // Security: When this runs, it is imperative that either InitializeSandbox()
++  // runs as well or that all file descriptors returned in
++  // GetFileDescriptorsToClose() get closed.
++  // Otherwise file descriptors that bypass the security of the setuid sandbox
++  // would be kept open. One must be particularly careful if a process performs
++  // a fork().
++  void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type);
++
++  // Check that the current process is the init process of a new PID
++  // namespace and then proceed to drop access to the file system by using
++  // a new unprivileged namespace. This is a layer-1 sandbox.
++  // In order for this sandbox to be effective, it must be "sealed" by calling
++  // InitializeSandbox().
++  void EngageNamespaceSandbox(bool from_zygote);
++
++  // Return a list of file descriptors to close if PreinitializeSandbox() ran
++  // but InitializeSandbox() won't. Avoid using.
++  // TODO(jln): get rid of this hack.
++  std::vector<int> GetFileDescriptorsToClose();
++
++  // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with
++  // an adequate policy depending on the process type and command line
++  // arguments.
++  // Currently the layer-2 sandbox is composed of seccomp-bpf and address space
++  // limitations.
++  // This function should only be called without any thread running.
++  bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                         PreSandboxHook hook,
++                         const Options& options);
++
++  // Stop |thread| in a way that can be trusted by the sandbox.
++  void StopThread(base::Thread* thread);
++
++  // Returns the status of the renderer, worker and ppapi sandbox. Can only
++  // be queried after going through PreinitializeSandbox(). This is a bitmask
++  // and uses the constants defined in "enum Status" above. Since the
++  // status needs to be provided before the sandboxes are actually started,
++  // this returns what will actually happen once InitializeSandbox()
++  // is called from inside these processes.
++  int GetStatus();
++
++  // Returns true if the current process is single-threaded or if the number
++  // of threads cannot be determined.
++  bool IsSingleThreaded() const;
++
++  // Returns true if we started Seccomp BPF.
++  bool seccomp_bpf_started() const;
++
++  // Check the policy and eventually start the seccomp-bpf sandbox. This should
++  // never be called with threads started. If we detect that threads have
++  // started we will crash.
++  bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type,
++                       PreSandboxHook hook,
++                       const Options& options);
++
++  // Limit the address space of the current process (and its children) to make
++  // some vulnerabilities harder to exploit. Writes the errno due to setrlimit
++  // (including 0 if no error) into |error|.
++  bool LimitAddressSpace(int* error);
++
++  // Returns a file descriptor to proc. The file descriptor is no longer valid
++  // after the sandbox has been sealed.
++  int proc_fd() const {
++    DCHECK_NE(-1, proc_fd_);
++    return proc_fd_;
++  }
++
++#if BUILDFLAG(USING_SANITIZER)
++  __sanitizer_sandbox_arguments* sanitizer_args() const {
++    return sanitizer_args_.get();
++  };
++#endif
++
++  // A BrokerProcess is a helper that is started before the sandbox is engaged,
++  // typically from a pre-sandbox hook, that will serve requests to access
++  // files over an IPC channel. The client  of this runs from a SIGSYS handler
++  // triggered by the seccomp-bpf sandbox.
++  // |client_sandbox_policy| is the policy being run by the client, and is
++  // used to derive the equivalent broker-side policy.
++  // |broker_side_hook| is an alternate pre-sandbox hook to be run before the
++  // broker itself gets sandboxed, to which the broker side policy and
++  // |options| are passed.
++  // Crashes the process if the broker can not be started since continuation
++  // is impossible (and presumably unsafe).
++  // This should never be destroyed, as after the sandbox is started it is
++  // vital to the process.
++#if 0
++  void StartBrokerProcess(
++      const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set,
++      std::vector<sandbox::syscall_broker::BrokerFilePermission> permissions,
++      PreSandboxHook broker_side_hook,
++      const Options& options);
++
++  sandbox::syscall_broker::BrokerProcess* broker_process() const {
++    return broker_process_;
++  }
++#endif
++
++ private:
++  friend struct base::DefaultSingletonTraits<SandboxLinux>;
++
++  SandboxLinux();
++  ~SandboxLinux();
++
++  // We must have been pre_initialized_ before using these.
++  bool seccomp_bpf_supported() const;
++  bool seccomp_bpf_with_tsync_supported() const;
++
++  // Returns true if it can be determined that the current process has open
++  // directories that are not managed by the SandboxLinux class. This would
++  // be a vulnerability as it would allow to bypass the setuid sandbox.
++  bool HasOpenDirectories() const;
++
++  // The last part of the initialization is to make sure any temporary "hole"
++  // in the sandbox is closed. For now, this consists of closing proc_fd_.
++  void SealSandbox();
++
++  // GetStatus() makes promises as to how the sandbox will behave. This
++  // checks that no promises have been broken.
++  void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type);
++
++  // Stop |thread| and make sure it does not appear in /proc/self/tasks/
++  // anymore.
++  void StopThreadAndEnsureNotCounted(base::Thread* thread) const;
++
++  // A file descriptor to /proc. It's dangerous to have it around as it could
++  // allow for sandbox bypasses. It needs to be closed before we consider
++  // ourselves sandboxed.
++  int proc_fd_;
++
++  bool seccomp_bpf_started_;
++  // The value returned by GetStatus(). Gets computed once and then cached.
++  int sandbox_status_flags_;
++  // Did PreinitializeSandbox() run?
++  bool pre_initialized_;
++  bool seccomp_bpf_supported_;             // Accurate if pre_initialized_.
++  bool seccomp_bpf_with_tsync_supported_;  // Accurate if pre_initialized_.
++  bool yama_is_enforcing_;                 // Accurate if pre_initialized_.
++  bool initialize_sandbox_ran_;            // InitializeSandbox() was called.
++#if BUILDFLAG(USING_SANITIZER)
++  std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_;
++#endif
++  sandbox::syscall_broker::BrokerProcess* broker_process_;  // Leaked as global.
++};
++
++}  // namespace policy
++}  // namespace sandbox
++
++#endif  // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc
new file mode 100644
index 0000000000..e690c98cb0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.cc
@@ -0,0 +1,401 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/openbsd/sandbox_openbsd.cc.orig	2024-12-21 10:25:10.570415628 +0000
++++ src/3rdparty/chromium/sandbox/policy/openbsd/sandbox_openbsd.cc
+@@ -0,0 +1,392 @@
++// Copyright (c) 2012 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 "sandbox/policy/openbsd/sandbox_openbsd.h"
++
++#include <dirent.h>
++#include <fcntl.h>
++#include <stdint.h>
++#include <sys/resource.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++#include <util.h>
++
++#include <limits>
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/command_line.h"
++#include "base/debug/stack_trace.h"
++#include "base/feature_list.h"
++#include "base/files/file_path.h"
++#include "base/files/file_util.h"
++#include "base/files/scoped_file.h"
++#include "base/logging.h"
++#include "base/memory/singleton.h"
++#include "base/path_service.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/system/sys_info.h"
++#include "base/threading/thread.h"
++#include "base/time/time.h"
++#include "build/build_config.h"
++#include "crypto/crypto_buildflags.h"
++#include "ppapi/buildflags/buildflags.h"
++#include "sandbox/constants.h"
++#include "sandbox/linux/services/credentials.h"
++#include "sandbox/linux/services/namespace_sandbox.h"
++#include "sandbox/linux/services/proc_util.h"
++#include "sandbox/linux/services/resource_limits.h"
++#include "sandbox/linux/services/thread_helpers.h"
++#include "sandbox/linux/syscall_broker/broker_command.h"
++#include "sandbox/linux/syscall_broker/broker_process.h"
++#include "sandbox/policy/sandbox.h"
++#include "sandbox/policy/sandbox_type.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "sandbox/policy/switches.h"
++#include "sandbox/sandbox_buildflags.h" 
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++#if BUILDFLAG(USE_NSS_CERTS)
++#include "crypto/nss_util.h"
++#endif
++
++#include "third_party/boringssl/src/include/openssl/crypto.h"
++
++#include <fontconfig/fontconfig.h>
++#include "ui/gfx/linux/fontconfig_util.h"
++
++#define MAXTOKENS	3
++
++#define _UNVEIL_MAIN		"@PKG_SYSCONFBASE@/chromium/unveil.main";
++#define _UNVEIL_GPU		"@PKG_SYSCONFBASE@/chromium/unveil.gpu";
++#define _UNVEIL_UTILITY_NETWORK	"@PKG_SYSCONFBASE@/chromium/unveil.utility_network";
++#define _UNVEIL_UTILITY_AUDIO	"@PKG_SYSCONFBASE@/chromium/unveil.utility_audio";
++#define _UNVEIL_UTILITY_VIDEO	"@PKG_SYSCONFBASE@/chromium/unveil.utility_video";
++
++namespace sandbox {
++namespace policy {
++
++SandboxLinux::SandboxLinux()
++    : unveil_initialized_(false),
++      sandbox_status_flags_(kInvalid),
++      pre_initialized_(false),
++      initialize_sandbox_ran_(false),
++      broker_process_(nullptr) {
++}
++
++SandboxLinux::~SandboxLinux() {
++  if (pre_initialized_) {
++    CHECK(initialize_sandbox_ran_);
++  }
++}
++
++SandboxLinux* SandboxLinux::GetInstance() {
++  SandboxLinux* instance = base::Singleton<SandboxLinux>::get();
++  CHECK(instance);
++  return instance;
++}
++
++void SandboxLinux::StopThread(base::Thread* thread) {
++  DCHECK(thread);
++  thread->Stop();
++}
++
++void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) {
++  CHECK(!pre_initialized_);
++#if BUILDFLAG(USING_SANITIZER)
++  // Sanitizers need to open some resources before the sandbox is enabled.
++  // This should not fork, not launch threads, not open a directory.
++  __sanitizer_sandbox_on_notify(sanitizer_args());
++  sanitizer_args_.reset();
++#endif
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  base::SysInfo::AmountOfPhysicalMemory();
++  base::SysInfo::NumberOfProcessors();
++  base::SysInfo::CPUModelName();
++
++  switch (sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++    {
++#if BUILDFLAG(USE_NSS_CERTS)
++      // The main process has to initialize the ~/.pki dir which won't work
++      // after unveil(2).
++      crypto::EnsureNSSInit();
++#endif
++      CRYPTO_pre_sandbox_init();
++
++      base::FilePath cache_directory, local_directory;
++
++      base::PathService::Get(base::DIR_CACHE, &cache_directory);
++      base::PathService::Get(base::DIR_HOME, &local_directory);   
++
++      cache_directory = cache_directory.AppendASCII("chromium");
++      local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications");
++
++      if (!base::CreateDirectory(cache_directory)) {
++        LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory.";
++      }
++
++      if (!base::CreateDirectory(local_directory)) {
++        LOG(ERROR) << "Failed to create " << local_directory.value() << " directory.";
++      }
++
++      break;
++    }
++    case sandbox::mojom::Sandbox::kRenderer:
++    {
++      FcConfig* config = gfx::GetGlobalFontConfig();
++      DCHECK(config);
++      break;
++    }
++    default:
++      break;
++  }
++
++  pre_initialized_ = true;
++}
++
++bool SandboxLinux::SetPledge(const char *pstring, const char *ppath) {
++  FILE *fp;
++  char *s = NULL;
++  size_t len = 0;
++  ssize_t read;
++
++  if (pstring != NULL) {
++    if (pledge(pstring, NULL) == -1)
++      goto err;
++    VLOG(5) << "pledge " << pstring;
++  } else if (ppath != NULL) {
++    fp = fopen(ppath, "r");
++    if (fp != NULL) {
++      while ((read = getline(&s, &len, fp)) != -1 ) {
++        if (s[strlen(s)-1] == '\n')
++          s[strlen(s)-1] = '\0';
++        if (pledge(s, NULL) == -1)
++  	  goto err;
++        VLOG(5) << "pledge " << s;
++      }
++      fclose(fp);
++    } else {
++      LOG(ERROR) << "fopen(" << ppath << ") failed, errno: " << errno;
++      return false;
++    }
++  }
++  return true;
++err:
++  LOG(ERROR) << "pledge() failed, errno: " << errno;
++  return false;
++}
++
++bool SandboxLinux::SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type) {
++  FILE *fp;
++  char *s = NULL, *cp = NULL, *home = NULL, **ap, *tokens[MAXTOKENS];
++  char path[PATH_MAX];
++  const char *ufile;
++  size_t len = 0, lineno = 0;
++
++  switch (sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++      ufile = _UNVEIL_MAIN;
++      break;
++    case sandbox::mojom::Sandbox::kGpu:
++    case sandbox::mojom::Sandbox::kOnDeviceModelExecution:
++      ufile = _UNVEIL_GPU;
++      break;
++    case sandbox::mojom::Sandbox::kNetwork:
++      ufile = _UNVEIL_UTILITY_NETWORK;
++      break;
++    case sandbox::mojom::Sandbox::kAudio:
++      ufile = _UNVEIL_UTILITY_AUDIO;
++      break;
++    case sandbox::mojom::Sandbox::kVideoCapture:
++      ufile = _UNVEIL_UTILITY_VIDEO;
++      break;
++    default:
++      unveil("/dev/null", "r");
++      goto done;
++  }
++
++  fp = fopen(ufile, "r");
++  if (fp != NULL) {
++    while (!feof(fp)) {
++      if ((s = fparseln(fp, &len, &lineno, NULL,
++          FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT)) == NULL) {
++        if (ferror(fp)) {
++          LOG(ERROR) << "ferror(), errno: " << errno;
++	  _exit(1);
++	} else {
++          continue;
++	}
++      }
++      cp = s;
++      cp += strspn(cp, " \t\n"); /* eat whitespace */
++      if (cp[0] == '\0')
++        continue;
++
++      for (ap = tokens; ap < &tokens[MAXTOKENS - 1] &&
++          (*ap = strsep(&cp, " \t")) != NULL;) {
++        if (**ap != '\0')
++          ap++;
++      }
++      *ap = NULL;
++
++      if (tokens[1] == NULL) {
++        LOG(ERROR) << ufile << ": line " << lineno << ": must supply value to " << s;
++        _exit(1);
++      }
++
++      if (tokens[0][0] == '~') {
++        if ((home = getenv("HOME")) == NULL || *home == '\0') {
++          LOG(ERROR) << "failed to get home";
++	  _exit(1);
++	}
++        memmove(tokens[0], tokens[0] + 1, strlen(tokens[0]));
++        strncpy(path, home, sizeof(path) - 1);
++        path[sizeof(path) - 1] = '\0';
++        strncat(path, tokens[0], sizeof(path) - 1 - strlen(path));
++      } else {
++        strncpy(path, tokens[0], sizeof(path) - 1);
++        path[sizeof(path) - 1] = '\0';
++      }
++
++      if (unveil(path, tokens[1]) == -1) {
++        LOG(ERROR) << "failed unveiling " << path << " with permissions " << tokens[1];
++        _exit(1);
++      } else {
++        VLOG(5) << "unveiling " << path << " with permissions " << tokens[1];
++      }
++    }
++    fclose(fp);
++  } else {
++        LOG(ERROR) << "failed to open " << ufile << " errno: " << errno;
++        _exit(1);
++  }
++
++done:
++  unveil_initialized_ = true;
++
++  return true;
++}
++
++bool SandboxLinux::unveil_initialized() const {
++  return unveil_initialized_;
++}
++
++bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                                     SandboxLinux::PreSandboxHook hook,
++                                     const Options& options) {
++  DCHECK(!initialize_sandbox_ran_);
++  initialize_sandbox_ran_ = true;
++
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  const std::string process_type =
++      command_line->GetSwitchValueASCII(switches::kProcessType);
++
++  if (command_line->HasSwitch(switches::kNoSandbox))
++    return true;
++
++  VLOG(1) << "SandboxLinux::InitializeSandbox: process_type="
++      << process_type << " sandbox_type=" << sandbox_type;
++
++  // Only one thread is running, pre-initialize if not already done.
++  if (!pre_initialized_)
++    PreinitializeSandbox(sandbox_type);
++
++  // Attempt to limit the future size of the address space of the process.
++  int error = 0;
++  const bool limited_as = LimitAddressSpace(&error);
++  if (error) {
++    // Restore errno. Internally to |LimitAddressSpace|, the errno due to
++    // setrlimit may be lost.
++    errno = error;
++    PCHECK(limited_as);
++  }
++
++  if (hook)
++    CHECK(std::move(hook).Run(options));
++
++  if (!command_line->HasSwitch(switches::kDisableUnveil))
++    SetUnveil(process_type, sandbox_type);
++
++  switch(sandbox_type) {
++    case sandbox::mojom::Sandbox::kNoSandbox:
++      SetPledge(NULL, "@PKG_SYSCONFBASE@/chromium/pledge.main");
++      break;
++    case sandbox::mojom::Sandbox::kRenderer:
++      // prot_exec needed by v8
++      // flock needed by sqlite3 locking
++      SetPledge("stdio rpath flock prot_exec recvfd sendfd ps", NULL);
++      break;
++    case sandbox::mojom::Sandbox::kGpu:
++    case sandbox::mojom::Sandbox::kOnDeviceModelExecution:
++      SetPledge("stdio drm rpath flock cpath wpath prot_exec recvfd sendfd tmppath", NULL);
++      break;
++#if BUILDFLAG(ENABLE_PPAPI)
++    case sandbox::mojom::Sandbox::kPpapi:
++      // prot_exec needed by v8
++      SetPledge("stdio rpath prot_exec recvfd sendfd", NULL);
++      break;
++#endif
++    case sandbox::mojom::Sandbox::kAudio:
++      SetPledge(NULL, "@PKG_SYSCONFBASE@/chromium/pledge.utility_audio");
++      break;
++    case sandbox::mojom::Sandbox::kNetwork:
++      SetPledge(NULL, "@PKG_SYSCONFBASE@/chromium/pledge.utility_network");
++      break;
++    case sandbox::mojom::Sandbox::kVideoCapture:
++      SetPledge(NULL, "@PKG_SYSCONFBASE@/chromium/pledge.utility_video");
++      break;
++    case sandbox::mojom::Sandbox::kUtility:
++    case sandbox::mojom::Sandbox::kService:
++      SetPledge("stdio rpath cpath wpath fattr flock sendfd recvfd prot_exec", NULL);
++      break;
++    default:
++      LOG(ERROR) << "non-pledge()'d process: " << sandbox_type;
++      break;
++  }
++
++  return true;
++}
++
++bool SandboxLinux::LimitAddressSpace(int* error) {
++#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
++    !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
++  if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) {
++    return false;
++  }
++
++  // Unfortunately, it does not appear possible to set RLIMIT_AS such that it
++  // will both (a) be high enough to support V8's and WebAssembly's address
++  // space requirements while also (b) being low enough to mitigate exploits
++  // using integer overflows that require large allocations, heap spray, or
++  // other memory-hungry attack modes.
++
++  *error = sandbox::ResourceLimits::Lower(
++      RLIMIT_DATA, static_cast<rlim_t>(sandbox::kDataSizeLimit));
++
++  // Cache the resource limit before turning on the sandbox.
++  base::SysInfo::AmountOfVirtualMemory();
++  base::SysInfo::MaxSharedMemorySize();
++
++  return *error == 0;
++#else
++  base::SysInfo::AmountOfVirtualMemory();
++  return false;
++#endif  // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) &&
++        // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER)
++}
++
++}  // namespace policy
++}  // namespace sandbox
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.h
new file mode 100644
index 0000000000..18f357bbf6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_openbsd_sandbox__openbsd.h
@@ -0,0 +1,289 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/openbsd/sandbox_openbsd.h.orig	2024-12-21 10:25:10.571038055 +0000
++++ src/3rdparty/chromium/sandbox/policy/openbsd/sandbox_openbsd.h
+@@ -0,0 +1,280 @@
++// Copyright (c) 2012 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 SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
++
++#include <memory>
++#include <string>
++#include <vector>
++
++#include "base/logging.h"
++#include "base/posix/global_descriptors.h"
++#include "sandbox/policy/export.h"
++#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
++#include "sandbox/policy/mojom/sandbox.mojom.h"
++#include "base/sanitizer_buildflags.h"
++
++#if BUILDFLAG(USING_SANITIZER)
++#include <sanitizer/common_interface_defs.h>
++#endif
++
++namespace base {
++template <typename T>
++struct DefaultSingletonTraits;
++class Thread;
++}  // namespace base
++
++namespace sandbox {
++namespace syscall_broker {
++class BrokerProcess;
++}  // namespace syscall_broker
++}  // namespace sandbox
++
++namespace sandbox {
++namespace policy {
++
++// A singleton class to represent and change our sandboxing state for the
++// three main Linux sandboxes.
++// The sandboxing model allows using two layers of sandboxing. The first layer
++// can be implemented either with unprivileged namespaces or with the setuid
++// sandbox. This class provides a way to engage the namespace sandbox, but does
++// not deal with the legacy setuid sandbox directly.
++// The second layer is mainly based on seccomp-bpf and is engaged with
++// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing"
++// the first layer of sandboxing. That is, InitializeSandbox must always be
++// called to have any meaningful sandboxing at all.
++class SANDBOX_POLICY_EXPORT SandboxLinux {
++ public:
++  // This is a list of sandbox IPC methods which the renderer may send to the
++  // sandbox host. See
++  // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md
++  // This isn't the full list, values < 32 are reserved for methods called from
++  // Skia, and values < 64 are reserved for libc_interceptor.cc.
++  enum LinuxSandboxIPCMethods {
++    DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64,
++    DEPRECATED_METHOD_GET_CHILD_WITH_INODE,
++    DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE,
++    METHOD_MAKE_SHARED_MEMORY_SEGMENT,
++    DEPRECATED_METHOD_MATCH_WITH_FALLBACK,
++  };
++
++  // These form a bitmask which describes the conditions of the Linux sandbox.
++  // Note: this doesn't strictly give you the current status, it states
++  // what will be enabled when the relevant processes are initialized.
++  enum Status {
++    // SUID sandbox active.
++    kSUID = 1 << 0,
++
++    // Sandbox is using a new PID namespace.
++    kPIDNS = 1 << 1,
++
++    // Sandbox is using a new network namespace.
++    kNetNS = 1 << 2,
++
++    // seccomp-bpf sandbox active.
++    kSeccompBPF = 1 << 3,
++
++    // The Yama LSM module is present and enforcing.
++    kYama = 1 << 4,
++
++    // seccomp-bpf sandbox is active and the kernel supports TSYNC.
++    kSeccompTSYNC = 1 << 5,
++
++    // User namespace sandbox active.
++    kUserNS = 1 << 6,
++
++    // A flag that denotes an invalid sandbox status.
++    kInvalid = 1 << 31,
++  };
++
++  // SandboxLinux Options are a superset of SandboxSecompBPF Options.
++  struct Options : public SandboxSeccompBPF::Options {
++    // When running with a zygote, the namespace sandbox will have already
++    // been engaged prior to initializing SandboxLinux itself, and need not
++    // be done so again. Set to true to indicate that there isn't a zygote
++    // for this process and the step is to be performed here explicitly.
++    bool engage_namespace_sandbox = false;
++
++    // Allow starting the sandbox with multiple threads already running. This
++    // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy
++    // across all running threads.
++    bool allow_threads_during_sandbox_init = false;
++
++    // Enables the CHECK for open directories. The open directory check is only
++    // useful for the chroot jail (from the semantic layer of the sandbox), and
++    // can safely be disabled if we are only enabling the seccomp-BPF layer.
++    bool check_for_open_directories = true;
++  };
++
++  // Callers can provide this hook to run code right before the policy
++  // is passed to the BPF compiler and the sandbox is engaged. If
++  // pre_sandbox_hook() returns true, the sandbox will be engaged
++  // afterwards, otherwise the process is terminated.
++  using PreSandboxHook = base::OnceCallback<bool(Options)>;
++
++  // Get our singleton instance.
++  static SandboxLinux* GetInstance();
++
++  SandboxLinux(const SandboxLinux&) = delete;
++  SandboxLinux& operator=(const SandboxLinux&) = delete;
++
++  bool SetPledge(const char *pstring, const char *ppath);
++  bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type);
++
++  // Do some initialization that can only be done before any of the sandboxes
++  // are enabled. If using the setuid sandbox, this should be called manually
++  // before the setuid sandbox is engaged.
++  // Security: When this runs, it is imperative that either InitializeSandbox()
++  // runs as well or that all file descriptors returned in
++  // GetFileDescriptorsToClose() get closed.
++  // Otherwise file descriptors that bypass the security of the setuid sandbox
++  // would be kept open. One must be particularly careful if a process performs
++  // a fork().
++  void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type);
++
++  // Check that the current process is the init process of a new PID
++  // namespace and then proceed to drop access to the file system by using
++  // a new unprivileged namespace. This is a layer-1 sandbox.
++  // In order for this sandbox to be effective, it must be "sealed" by calling
++  // InitializeSandbox().
++  void EngageNamespaceSandbox(bool from_zygote);
++
++  // Return a list of file descriptors to close if PreinitializeSandbox() ran
++  // but InitializeSandbox() won't. Avoid using.
++  // TODO(jln): get rid of this hack.
++  std::vector<int> GetFileDescriptorsToClose();
++
++  // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with
++  // an adequate policy depending on the process type and command line
++  // arguments.
++  // Currently the layer-2 sandbox is composed of seccomp-bpf and address space
++  // limitations.
++  // This function should only be called without any thread running.
++  bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type,
++                         PreSandboxHook hook,
++                         const Options& options);
++
++  // Stop |thread| in a way that can be trusted by the sandbox.
++  void StopThread(base::Thread* thread);
++
++  // Returns the status of the renderer, worker and ppapi sandbox. Can only
++  // be queried after going through PreinitializeSandbox(). This is a bitmask
++  // and uses the constants defined in "enum Status" above. Since the
++  // status needs to be provided before the sandboxes are actually started,
++  // this returns what will actually happen once InitializeSandbox()
++  // is called from inside these processes.
++  int GetStatus();
++
++  // Returns true if the current process is single-threaded or if the number
++  // of threads cannot be determined.
++  bool IsSingleThreaded() const;
++
++  // Returns true if we started Seccomp BPF.
++  bool seccomp_bpf_started() const;
++
++  // Returns true if unveil(2) is used.
++  bool unveil_initialized() const;
++
++  // Check the policy and eventually start the seccomp-bpf sandbox. This should
++  // never be called with threads started. If we detect that threads have
++  // started we will crash.
++  bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type,
++                       PreSandboxHook hook,
++                       const Options& options);
++
++  // Limit the address space of the current process (and its children) to make
++  // some vulnerabilities harder to exploit. Writes the errno due to setrlimit
++  // (including 0 if no error) into |error|.
++  bool LimitAddressSpace(int* error);
++
++  // Returns a file descriptor to proc. The file descriptor is no longer valid
++  // after the sandbox has been sealed.
++  int proc_fd() const {
++    DCHECK_NE(-1, proc_fd_);
++    return proc_fd_;
++  }
++
++#if BUILDFLAG(USING_SANITIZER)
++  __sanitizer_sandbox_arguments* sanitizer_args() const {
++    return sanitizer_args_.get();
++  };
++#endif
++
++  // A BrokerProcess is a helper that is started before the sandbox is engaged,
++  // typically from a pre-sandbox hook, that will serve requests to access
++  // files over an IPC channel. The client  of this runs from a SIGSYS handler
++  // triggered by the seccomp-bpf sandbox.
++  // |client_sandbox_policy| is the policy being run by the client, and is
++  // used to derive the equivalent broker-side policy.
++  // |broker_side_hook| is an alternate pre-sandbox hook to be run before the
++  // broker itself gets sandboxed, to which the broker side policy and
++  // |options| are passed.
++  // Crashes the process if the broker can not be started since continuation
++  // is impossible (and presumably unsafe).
++  // This should never be destroyed, as after the sandbox is started it is
++  // vital to the process.
++#if 0
++  void StartBrokerProcess(
++      const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set,
++      std::vector<sandbox::syscall_broker::BrokerFilePermission> permissions,
++      PreSandboxHook broker_side_hook,
++      const Options& options);
++
++  sandbox::syscall_broker::BrokerProcess* broker_process() const {
++    return broker_process_;
++  }
++#endif
++
++ private:
++  friend struct base::DefaultSingletonTraits<SandboxLinux>;
++
++  SandboxLinux();
++  ~SandboxLinux();
++
++  // We must have been pre_initialized_ before using these.
++  bool seccomp_bpf_supported() const;
++  bool seccomp_bpf_with_tsync_supported() const;
++
++  // Returns true if it can be determined that the current process has open
++  // directories that are not managed by the SandboxLinux class. This would
++  // be a vulnerability as it would allow to bypass the setuid sandbox.
++  bool HasOpenDirectories() const;
++
++  // The last part of the initialization is to make sure any temporary "hole"
++  // in the sandbox is closed. For now, this consists of closing proc_fd_.
++  void SealSandbox();
++
++  // GetStatus() makes promises as to how the sandbox will behave. This
++  // checks that no promises have been broken.
++  void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type);
++
++  // Stop |thread| and make sure it does not appear in /proc/self/tasks/
++  // anymore.
++  void StopThreadAndEnsureNotCounted(base::Thread* thread) const;
++
++  // A file descriptor to /proc. It's dangerous to have it around as it could
++  // allow for sandbox bypasses. It needs to be closed before we consider
++  // ourselves sandboxed.
++  int proc_fd_;
++
++  bool seccomp_bpf_started_;
++  bool unveil_initialized_;
++  // The value returned by GetStatus(). Gets computed once and then cached.
++  int sandbox_status_flags_;
++  // Did PreinitializeSandbox() run?
++  bool pre_initialized_;
++  bool seccomp_bpf_supported_;             // Accurate if pre_initialized_.
++  bool seccomp_bpf_with_tsync_supported_;  // Accurate if pre_initialized_.
++  bool yama_is_enforcing_;                 // Accurate if pre_initialized_.
++  bool initialize_sandbox_ran_;            // InitializeSandbox() was called.
++#if BUILDFLAG(USING_SANITIZER)
++  std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_;
++#endif
++  sandbox::syscall_broker::BrokerProcess* broker_process_;  // Leaked as global.
++};
++
++}  // namespace policy
++}  // namespace sandbox
++
++#endif  // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc
new file mode 100644
index 0000000000..6336413273
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/sandbox.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/sandbox.cc
+@@ -18,6 +18,10 @@
+ #include "sandbox/policy/linux/sandbox_linux.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#endif  // BUILDFLAG(IS_BSD)
++
+ #if BUILDFLAG(IS_MAC)
+ #include "sandbox/mac/seatbelt.h"
+ #endif  // BUILDFLAG(IS_MAC)
+@@ -32,7 +36,7 @@
+ namespace sandbox {
+ namespace policy {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool Sandbox::Initialize(sandbox::mojom::Sandbox sandbox_type,
+                          SandboxLinux::PreSandboxHook hook,
+                          const SandboxLinux::Options& options) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox.h
new file mode 100644
index 0000000000..42917a8d86
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox.h
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/sandbox.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/sandbox.h
+@@ -12,6 +12,14 @@
+ #include "sandbox/policy/linux/sandbox_linux.h"
+ #endif
+ 
++#if BUILDFLAG(IS_OPENBSD)
++#include "sandbox/policy/openbsd/sandbox_openbsd.h"
++#elif BUILDFLAG(IS_NETBSD)
++#include "sandbox/policy/netbsd/sandbox_netbsd.h"
++#elif BUILDFLAG(IS_FREEBSD)
++#include "sandbox/policy/freebsd/sandbox_freebsd.h"
++#endif
++
+ namespace sandbox {
+ namespace mojom {
+ enum class Sandbox;
+@@ -32,7 +40,7 @@ namespace policy {
+ 
+ class SANDBOX_POLICY_EXPORT Sandbox {
+  public:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static bool Initialize(sandbox::mojom::Sandbox sandbox_type,
+                          SandboxLinux::PreSandboxHook hook,
+                          const SandboxLinux::Options& options);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc
new file mode 100644
index 0000000000..1da225f0fc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_sandbox__type.cc
@@ -0,0 +1,121 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/sandbox_type.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/sandbox_type.cc
+@@ -38,7 +38,7 @@ bool IsUnsandboxedSandboxType(Sandbox sa
+ #endif
+     case Sandbox::kAudio:
+       return false;
+-#if BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     case Sandbox::kVideoCapture:
+       return false;
+ #endif
+@@ -63,7 +63,7 @@ bool IsUnsandboxedSandboxType(Sandbox sa
+     case Sandbox::kMirroring:
+     case Sandbox::kNaClLoader:
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+     case Sandbox::kHardwareVideoDecoding:
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+@@ -73,7 +73,7 @@ bool IsUnsandboxedSandboxType(Sandbox sa
+     case Sandbox::kLibassistant:
+ #endif  // BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
+ #endif  // // BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) | BUILDFLAG(IS_BSD)
+     case Sandbox::kZygoteIntermediateSandbox:
+     case Sandbox::kHardwareVideoEncoding:
+ #endif
+@@ -130,7 +130,7 @@ void SetCommandLineFlagsForSandboxType(b
+ #endif
+     case Sandbox::kPrintCompositor:
+     case Sandbox::kAudio:
+-#if BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     case Sandbox::kVideoCapture:
+ #endif
+ #if BUILDFLAG(IS_WIN)
+@@ -141,10 +141,10 @@ void SetCommandLineFlagsForSandboxType(b
+     case Sandbox::kMediaFoundationCdm:
+     case Sandbox::kWindowsSystemProxyResolver:
+ #endif  // BUILDFLAG(IS_WIN)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+     case Sandbox::kHardwareVideoDecoding:
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case Sandbox::kHardwareVideoEncoding:
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+@@ -172,7 +172,7 @@ void SetCommandLineFlagsForSandboxType(b
+     case Sandbox::kNaClLoader:
+       break;
+ #endif  // BUILDFLAG(IS_MAC)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case Sandbox::kZygoteIntermediateSandbox:
+       break;
+ #endif
+@@ -216,7 +216,7 @@ sandbox::mojom::Sandbox SandboxTypeFromC
+ #endif
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Intermediate process gains a sandbox later.
+   if (process_type == switches::kZygoteProcessType)
+     return Sandbox::kZygoteIntermediateSandbox;
+@@ -262,7 +262,7 @@ std::string StringFromUtilitySandboxType
+       return switches::kUtilitySandbox;
+     case Sandbox::kAudio:
+       return switches::kAudioSandbox;
+-#if BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     case Sandbox::kVideoCapture:
+       return switches::kVideoCaptureSandbox;
+ #endif
+@@ -292,11 +292,11 @@ std::string StringFromUtilitySandboxType
+     case Sandbox::kMirroring:
+       return switches::kMirroringSandbox;
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+     case Sandbox::kHardwareVideoDecoding:
+       return switches::kHardwareVideoDecodingSandbox;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case Sandbox::kHardwareVideoEncoding:
+       return switches::kHardwareVideoEncodingSandbox;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -316,7 +316,7 @@ std::string StringFromUtilitySandboxType
+ #if BUILDFLAG(IS_MAC)
+     case Sandbox::kNaClLoader:
+ #endif  // BUILDFLAG(IS_MAC)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     case Sandbox::kZygoteIntermediateSandbox:
+ #endif
+       NOTREACHED();
+@@ -392,11 +392,11 @@ sandbox::mojom::Sandbox UtilitySandboxTy
+   if (sandbox_string == switches::kVideoCaptureSandbox)
+     return Sandbox::kVideoCapture;
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+   if (sandbox_string == switches::kHardwareVideoDecodingSandbox)
+     return Sandbox::kHardwareVideoDecoding;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (sandbox_string == switches::kHardwareVideoEncodingSandbox)
+     return Sandbox::kHardwareVideoEncoding;
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_switches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_switches.cc
new file mode 100644
index 0000000000..4eaac8397b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_switches.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/switches.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/switches.cc
+@@ -54,10 +54,10 @@ const char kWindowsSystemProxyResolverSa
+ const char kMirroringSandbox[] = "mirroring";
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ const char kHardwareVideoDecodingSandbox[] = "hardware_video_decoding";
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ const char kHardwareVideoEncodingSandbox[] = "hardware_video_encoding";
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -96,7 +96,9 @@ const char kGpuSandboxFailuresFatal[] = 
+ // Meant to be used as a browser-level switch for testing purposes only.
+ const char kNoSandbox[] = "no-sandbox";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++const char kDisableUnveil[] = "disable-unveil";
++
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Instructs the zygote to launch without a sandbox. Processes forked from this
+ // type of zygote will apply their own custom sandboxes later.
+ const char kNoZygoteSandbox[] = "no-zygote-sandbox";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_switches.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_switches.h
new file mode 100644
index 0000000000..18498ab4f4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_sandbox_policy_switches.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/sandbox/policy/switches.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/sandbox/policy/switches.h
+@@ -57,10 +57,10 @@ SANDBOX_POLICY_EXPORT extern const char 
+ SANDBOX_POLICY_EXPORT extern const char kMirroringSandbox[];
+ #endif  // BUILDFLAG(IS_MAC)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ SANDBOX_POLICY_EXPORT extern const char kHardwareVideoDecodingSandbox[];
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ SANDBOX_POLICY_EXPORT extern const char kHardwareVideoEncodingSandbox[];
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ 
+@@ -81,7 +81,8 @@ SANDBOX_POLICY_EXPORT extern const char 
+ SANDBOX_POLICY_EXPORT extern const char kGpuSandboxAllowSysVShm[];
+ SANDBOX_POLICY_EXPORT extern const char kGpuSandboxFailuresFatal[];
+ SANDBOX_POLICY_EXPORT extern const char kNoSandbox[];
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++SANDBOX_POLICY_EXPORT extern const char kDisableUnveil[];
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ SANDBOX_POLICY_EXPORT extern const char kNoZygoteSandbox[];
+ #endif
+ #if BUILDFLAG(IS_WIN)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..64dea49b66
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc
@@ -0,0 +1,37 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.cc
+@@ -144,6 +144,7 @@ void AddPulseAudioFilePermissions(
+ }
+ #endif
+ 
++#if !BUILDFLAG(IS_BSD)
+ std::vector<BrokerFilePermission> GetAudioFilePermissions() {
+   std::vector<BrokerFilePermission> permissions{
+       BrokerFilePermission::ReadOnly("/dev/urandom"),
+@@ -172,10 +173,12 @@ void LoadAudioLibraries() {
+     }
+   }
+ }
++#endif
+ 
+ }  // namespace
+ 
+ bool AudioPreSandboxHook(sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+   LoadAudioLibraries();
+   auto* instance = sandbox::policy::SandboxLinux::GetInstance();
+   instance->StartBrokerProcess(MakeBrokerCommandSet({
+@@ -195,6 +198,7 @@ bool AudioPreSandboxHook(sandbox::policy
+   // TODO(https://crbug.com/850878) enable namespace sandbox. Currently, if
+   // enabled, connect() on pulse native socket fails with ENOENT (called from
+   // pa_context_connect).
++#endif
+ 
+   return true;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h
new file mode 100644
index 0000000000..53d3813e2e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.h
+@@ -5,7 +5,13 @@
+ #ifndef SERVICES_AUDIO_AUDIO_SANDBOX_HOOK_LINUX_H_
+ #define SERVICES_AUDIO_AUDIO_SANDBOX_HOOK_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace audio {
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_BUILD.gn
new file mode 100644
index 0000000000..d1deda5cf4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/BUILD.gn
+@@ -15,7 +15,7 @@ if (is_android) {
+ }
+ 
+ is_serial_enabled_platform =
+-    is_win || ((is_linux || is_chromeos) && use_udev) || is_mac
++    is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac
+ 
+ source_set("lib") {
+   # This should be visible only to embedders of the Device Service, and the
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc
new file mode 100644
index 0000000000..3584975756
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc.orig	2025-01-24 10:49:20.000000000 +0000
++++ src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc
+@@ -196,7 +196,7 @@ LocationArbitrator::NewNetworkLocationPr
+ 
+ std::unique_ptr<LocationProvider>
+ LocationArbitrator::NewSystemLocationProvider() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return nullptr;
+ #else
+   return device::NewSystemLocationProvider(main_task_runner_,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn
new file mode 100644
index 0000000000..791a7c9c32
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/hid/BUILD.gn
+@@ -36,7 +36,33 @@ source_set("hid") {
+     "//services/device/public/mojom",
+   ]
+ 
+-  if ((is_linux || is_chromeos) && use_udev) {
++  if (is_openbsd) {
++    sources += [
++      "hid_connection_fido.cc",
++      "hid_connection_fido.h",
++      "hid_service_fido.cc",
++      "hid_service_fido.h",
++    ]
++    libs = ["fido2", "cbor", "usbhid", "crypto", "util"]
++  }
++
++  if (is_freebsd) {
++    sources += [
++      "hid_connection_freebsd.cc",
++      "hid_connection_freebsd.h",
++      "hid_service_freebsd.cc",
++      "hid_service_freebsd.h",
++    ]
++  }
++
++  if (is_netbsd) {
++    sources += [
++      "hid_service_netbsd.cc",
++      "hid_service_netbsd.h",
++    ]
++  }
++
++  if ((is_linux || is_chromeos) && !is_bsd && use_udev) {
+     sources += [
+       "hid_connection_linux.cc",
+       "hid_connection_linux.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.cc
new file mode 100644
index 0000000000..2d3918344c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.cc
@@ -0,0 +1,225 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_connection_fido.cc.orig	2024-12-21 10:25:10.579061446 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_connection_fido.cc
+@@ -0,0 +1,216 @@
++// Copyright 2014 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "services/device/hid/hid_connection_fido.h"
++
++#include <errno.h>
++#include <sys/ioctl.h>
++
++#include <memory>
++#include <string>
++#include <utility>
++
++#include "base/files/file_descriptor_watcher_posix.h"
++#include "base/memory/ref_counted_memory.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "components/device_event_log/device_event_log.h"
++#include "services/device/hid/hid_service.h"
++
++namespace device {
++
++class HidConnectionFido::BlockingTaskRunnerHelper {
++ public:
++  BlockingTaskRunnerHelper(base::ScopedFD fd,
++                           scoped_refptr<HidDeviceInfo> device_info,
++                           base::WeakPtr<HidConnectionFido> connection)
++      : fd_(std::move(fd)),
++        connection_(connection),
++        origin_task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++    DETACH_FROM_SEQUENCE(sequence_checker_);
++    // Report buffers must always have room for the report ID.
++    report_buffer_size_ = device_info->max_input_report_size() + 1;
++    has_report_id_ = device_info->has_report_id();
++  }
++
++  BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete;
++  BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete;
++
++  ~BlockingTaskRunnerHelper() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++  }
++
++  // Starts the FileDescriptorWatcher that reads input events from the device.
++  // Must be called on a thread that has a base::MessageLoopForIO.
++  void Start() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    file_watcher_ = base::FileDescriptorWatcher::WatchReadable(
++        fd_.get(), base::BindRepeating(
++                       &BlockingTaskRunnerHelper::OnFileCanReadWithoutBlocking,
++                       base::Unretained(this)));
++  }
++
++  void Write(scoped_refptr<base::RefCountedBytes> buffer,
++             WriteCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++
++    auto data = buffer->data();
++    size_t size = buffer->size();
++    // if report id is 0, it shouldn't be included
++    if (data[0] == 0) {
++      data++;
++      size--;
++    }
++
++    ssize_t result =
++        HANDLE_EINTR(write(fd_.get(), data, size));
++    if (result < 0) {
++      HID_PLOG(EVENT) << "Write failed";
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false));
++    } else {
++      if (static_cast<size_t>(result) != size) {
++        HID_LOG(EVENT) << "Incomplete HID write: " << result
++                       << " != " << buffer->size();
++      }
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), true));
++    }
++  }
++
++  void GetFeatureReport(uint8_t report_id,
++                        scoped_refptr<base::RefCountedBytes> buffer,
++                        ReadCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    HID_PLOG(EVENT) << "GendFeatureReport not implemented on OpenBSD";
++    origin_task_runner_->PostTask(
++        FROM_HERE, base::BindOnce(std::move(callback), false, nullptr, 0));
++  }
++
++  void SendFeatureReport(scoped_refptr<base::RefCountedBytes> buffer,
++                         WriteCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    HID_PLOG(EVENT) << "SendFeatureReport not implemented on OpenBSD";
++    origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false));
++  }
++
++ private:
++  void OnFileCanReadWithoutBlocking() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    auto buffer =
++        base::MakeRefCounted<base::RefCountedBytes>(report_buffer_size_);
++    uint8_t* data = buffer->as_vector().data();
++    size_t length = report_buffer_size_;
++    if (!has_report_id_) {
++      // Fido will not prefix the buffer with a report ID if report IDs are not
++      // used by the device. Prefix the buffer with 0.
++      *data++ = 0;
++      length--;
++    }
++
++    ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length));
++    if (bytes_read < 0) {
++      if (errno != EAGAIN) {
++        HID_PLOG(EVENT) << "Read failed";
++        // This assumes that the error is unrecoverable and disables reading
++        // from the device until it has been re-opened.
++        // TODO(reillyg): Investigate starting and stopping the file descriptor
++        // watcher in response to pending read requests so that per-request
++        // errors can be returned to the client.
++        file_watcher_.reset();
++      }
++      return;
++    }
++    if (!has_report_id_) {
++      // Behave as if the byte prefixed above as the the report ID was read.
++      bytes_read++;
++    }
++
++    origin_task_runner_->PostTask(
++        FROM_HERE, base::BindOnce(&HidConnectionFido::ProcessInputReport,
++                                  connection_, buffer, bytes_read));
++  }
++
++  SEQUENCE_CHECKER(sequence_checker_);
++  base::ScopedFD fd_;
++  size_t report_buffer_size_;
++  bool has_report_id_;
++  base::WeakPtr<HidConnectionFido> connection_;
++  const scoped_refptr<base::SequencedTaskRunner> origin_task_runner_;
++  std::unique_ptr<base::FileDescriptorWatcher::Controller> file_watcher_;
++};
++
++HidConnectionFido::HidConnectionFido(
++    scoped_refptr<HidDeviceInfo> device_info,
++    base::ScopedFD fd,
++    scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
++    bool allow_protected_reports,
++    bool allow_fido_reports)
++    : HidConnection(device_info, allow_protected_reports, allow_fido_reports),
++      helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner)),
++      blocking_task_runner_(std::move(blocking_task_runner)) {
++  helper_.reset(new BlockingTaskRunnerHelper(std::move(fd), device_info,
++                                             weak_factory_.GetWeakPtr()));
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start,
++                                base::Unretained(helper_.get())));
++}
++
++HidConnectionFido::~HidConnectionFido() {}
++
++void HidConnectionFido::PlatformClose() {
++  // By closing the device on the blocking task runner 1) the requirement that
++  // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied
++  // and 2) any tasks posted to this task runner that refer to this file will
++  // complete before it is closed.
++  helper_.reset();
++}
++
++void HidConnectionFido::PlatformWrite(
++    scoped_refptr<base::RefCountedBytes> buffer,
++    WriteCallback callback) {
++  // Fido expects the first byte of the buffer to always be a report ID so the
++  // buffer can be used directly.
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Write,
++                                base::Unretained(helper_.get()), buffer,
++                                std::move(callback)));
++}
++
++void HidConnectionFido::PlatformGetFeatureReport(uint8_t report_id,
++                                                  ReadCallback callback) {
++  // The first byte of the destination buffer is the report ID being requested
++  // and is overwritten by the feature report.
++  DCHECK_GT(device_info()->max_feature_report_size(), 0u);
++  auto buffer = base::MakeRefCounted<base::RefCountedBytes>(
++      device_info()->max_feature_report_size() + 1);
++  buffer->as_vector().data()[0] = report_id;
++
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::GetFeatureReport,
++                                base::Unretained(helper_.get()), report_id,
++                                buffer, std::move(callback)));
++}
++
++void HidConnectionFido::PlatformSendFeatureReport(
++    scoped_refptr<base::RefCountedBytes> buffer,
++    WriteCallback callback) {
++  // Fido expects the first byte of the buffer to always be a report ID so the
++  // buffer can be used directly.
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::SendFeatureReport,
++                                base::Unretained(helper_.get()), buffer,
++                                std::move(callback)));
++}
++
++}  // namespace device
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.h
new file mode 100644
index 0000000000..1ab55dce34
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__fido.h
@@ -0,0 +1,69 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_connection_fido.h.orig	2024-12-21 10:25:10.579833055 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_connection_fido.h
+@@ -0,0 +1,60 @@
++// Copyright 2014 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_
++#define SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_
++
++#include <stddef.h>
++#include <stdint.h>
++
++#include "base/files/scoped_file.h"
++#include "base/memory/weak_ptr.h"
++#include "base/task/sequenced_task_runner.h"
++#include "services/device/hid/hid_connection.h"
++
++namespace base {
++class SequencedTaskRunner;
++}
++
++namespace device {
++
++class HidConnectionFido : public HidConnection {
++ public:
++  HidConnectionFido(
++      scoped_refptr<HidDeviceInfo> device_info,
++      base::ScopedFD fd,
++      scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
++      bool allow_protected_reports,
++      bool allow_fido_reports);
++  HidConnectionFido(HidConnectionFido&) = delete;
++  HidConnectionFido& operator=(HidConnectionFido&) = delete;
++
++ private:
++  friend class base::RefCountedThreadSafe<HidConnectionFido>;
++  class BlockingTaskRunnerHelper;
++
++  ~HidConnectionFido() override;
++
++  // HidConnection implementation.
++  void PlatformClose() override;
++  void PlatformWrite(scoped_refptr<base::RefCountedBytes> buffer,
++                     WriteCallback callback) override;
++  void PlatformGetFeatureReport(uint8_t report_id,
++                                ReadCallback callback) override;
++  void PlatformSendFeatureReport(scoped_refptr<base::RefCountedBytes> buffer,
++                                 WriteCallback callback) override;
++
++  // |helper_| lives on the sequence to which |blocking_task_runner_| posts
++  // tasks so all calls must be posted there including this object's
++  // destruction.
++  std::unique_ptr<BlockingTaskRunnerHelper, base::OnTaskRunnerDeleter> helper_;
++
++  const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
++
++  base::WeakPtrFactory<HidConnectionFido> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // SERVICES_DEVICE_HID_HID_CONNECTION_LINUX_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.cc
new file mode 100644
index 0000000000..a7cc793402
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.cc
@@ -0,0 +1,249 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_connection_freebsd.cc.orig	2024-12-21 10:25:10.580356867 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_connection_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 "services/device/hid/hid_connection_freebsd.h"
++
++#include <dev/usb/usbhid.h>
++#include <dev/usb/usb_ioctl.h>
++
++#include "base/files/file_descriptor_watcher_posix.h"
++#include "base/location.h"
++#include "base/numerics/safe_math.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/strings/stringprintf.h"
++#include "base/task/single_thread_task_runner.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "base/threading/thread_restrictions.h"
++#include "components/device_event_log/device_event_log.h"
++#include "services/device/hid/hid_service.h"
++
++namespace device {
++
++class HidConnectionFreeBSD::BlockingTaskRunnerHelper {
++ public:
++  BlockingTaskRunnerHelper(base::ScopedFD fd,
++                     scoped_refptr<HidDeviceInfo> device_info,
++                     base::WeakPtr<HidConnectionFreeBSD> connection)
++      : fd_(std::move(fd)),
++        connection_(connection),
++	origin_task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++    DETACH_FROM_SEQUENCE(sequence_checker_);
++    // Report buffers must always have room for the report ID.
++    report_buffer_size_ = device_info->max_input_report_size() + 1;
++    has_report_id_ = device_info->has_report_id();
++  }
++
++  BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete;
++  BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete;
++
++  ~BlockingTaskRunnerHelper() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); }
++
++  // Starts the FileDescriptorWatcher that reads input events from the device.
++  // Must be called on a thread that has a base::MessageLoopForIO.
++  void Start() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::internal::AssertBlockingAllowed();
++
++    file_watcher_ = base::FileDescriptorWatcher::WatchReadable(
++        fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnFileCanReadWithoutBlocking,
++                                       base::Unretained(this)));
++  }
++
++  void Write(scoped_refptr<base::RefCountedBytes> buffer,
++             WriteCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++
++    auto data = buffer->as_vector().data();
++    size_t size = buffer->size();
++    // if report id is 0, it shouldn't be included
++    if (data[0] == 0) {
++      data++;
++      size--;
++    }
++
++    ssize_t result = HANDLE_EINTR(write(fd_.get(), data, size));
++    if (result < 0) {
++      HID_PLOG(EVENT) << "Write failed";
++      origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false));
++    } else {
++      if (static_cast<size_t>(result) != size)
++        HID_LOG(EVENT) << "Incomplete HID write: " << result << " != " << size;
++      origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), true));
++    }
++  }
++
++  void GetFeatureReport(uint8_t report_id,
++                        scoped_refptr<base::RefCountedBytes> buffer,
++                        ReadCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    struct usb_gen_descriptor ugd;
++    ugd.ugd_report_type = UHID_FEATURE_REPORT;
++    ugd.ugd_data = buffer->as_vector().data();
++    ugd.ugd_maxlen = buffer->size();
++    int result = HANDLE_EINTR(
++        ioctl(fd_.get(), USB_GET_REPORT, &ugd));
++    if (result < 0) {
++      HID_PLOG(EVENT) << "Failed to get feature report";
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false, nullptr, 0));
++    } else if (result == 0) {
++      HID_LOG(EVENT) << "Get feature result too short.";
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false, nullptr, 0));
++    } else {
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), true, buffer, result));
++    }
++  }
++
++  void SendFeatureReport(scoped_refptr<base::RefCountedBytes> buffer,
++                         WriteCallback callback) {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    struct usb_gen_descriptor ugd;
++    ugd.ugd_report_type = UHID_FEATURE_REPORT;
++    ugd.ugd_data = buffer->as_vector().data();
++    ugd.ugd_maxlen = buffer->size();
++    // FreeBSD does not require report id if it's not used
++    if (buffer->data()[0] == 0) {
++      ugd.ugd_data = buffer->as_vector().data() + 1;
++      ugd.ugd_maxlen = buffer->size() - 1;
++    } else {
++      ugd.ugd_data = buffer->as_vector().data();
++      ugd.ugd_maxlen = buffer->size();
++    }
++    int result = HANDLE_EINTR(
++        ioctl(fd_.get(), USB_SET_REPORT, &ugd));
++    if (result < 0) {
++      HID_PLOG(EVENT) << "Failed to send feature report";
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), false));
++    } else {
++      origin_task_runner_->PostTask(FROM_HERE,
++                                    base::BindOnce(std::move(callback), true));
++    }
++  }
++
++ private:
++  void OnFileCanReadWithoutBlocking() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    scoped_refptr<base::RefCountedBytes> buffer(new base::RefCountedBytes(report_buffer_size_));
++    unsigned char* data = buffer->as_vector().data();
++    size_t length = report_buffer_size_;
++    if (!has_report_id_) {
++      // FreeBSD will not prefix the buffer with a report ID if report IDs are not
++      // used by the device. Prefix the buffer with 0.
++      *data++ = 0;
++      length--;
++    }
++
++    ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length));
++    if (bytes_read < 0) {
++      if (errno != EAGAIN) {
++        HID_PLOG(EVENT) << "Read failed";
++        // This assumes that the error is unrecoverable and disables reading
++        // from the device until it has been re-opened.
++        // TODO(reillyg): Investigate starting and stopping the file descriptor
++        // watcher in response to pending read requests so that per-request
++        // errors can be returned to the client.
++        file_watcher_.reset();
++      }
++      return;
++    }
++    if (!has_report_id_) {
++      // Behave as if the byte prefixed above as the the report ID was read.
++      bytes_read++;
++    }
++
++    origin_task_runner_->PostTask(
++        FROM_HERE, base::BindOnce(&HidConnectionFreeBSD::ProcessInputReport,
++                              connection_, buffer, bytes_read));
++  }
++
++  SEQUENCE_CHECKER(sequence_checker_);
++  base::ScopedFD fd_;
++  size_t report_buffer_size_;
++  bool has_report_id_;
++  base::WeakPtr<HidConnectionFreeBSD> connection_;
++  const scoped_refptr<base::SequencedTaskRunner> origin_task_runner_;
++  std::unique_ptr<base::FileDescriptorWatcher::Controller> file_watcher_;
++};
++
++HidConnectionFreeBSD::HidConnectionFreeBSD(
++    scoped_refptr<HidDeviceInfo> device_info,
++    base::ScopedFD fd,
++    scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
++    bool allow_protected_reports,
++    bool allow_fido_reports)
++    : HidConnection(device_info, allow_protected_reports, allow_fido_reports),
++      helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner)),
++      blocking_task_runner_(std::move(blocking_task_runner)) {
++  helper_.reset(new BlockingTaskRunnerHelper(std::move(fd), device_info,
++                                                 weak_factory_.GetWeakPtr()));
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start,
++                                base::Unretained(helper_.get())));
++}
++
++HidConnectionFreeBSD::~HidConnectionFreeBSD() {}
++
++void HidConnectionFreeBSD::PlatformClose() {
++  // By closing the device on the blocking task runner 1) the requirement that
++  // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied
++  // and 2) any tasks posted to this task runner that refer to this file will
++  // complete before it is closed.
++  blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release());
++}
++
++void HidConnectionFreeBSD::PlatformWrite(scoped_refptr<base::RefCountedBytes> buffer,
++                                     WriteCallback callback) {
++
++  blocking_task_runner_->PostTask(
++      FROM_HERE,
++      base::BindOnce(&BlockingTaskRunnerHelper::Write, base::Unretained(helper_.get()),
++                 buffer, std::move(callback)));
++}
++
++void HidConnectionFreeBSD::PlatformGetFeatureReport(uint8_t report_id,
++                                                ReadCallback callback) {
++  // The first byte of the destination buffer is the report ID being requested
++  // and is overwritten by the feature report.
++  DCHECK_GT(device_info()->max_feature_report_size(), 0u);
++  scoped_refptr<base::RefCountedBytes> buffer(
++      new base::RefCountedBytes(device_info()->max_feature_report_size() + 1));
++  if (report_id != 0)
++    buffer->as_vector().data()[0] = report_id;
++
++  blocking_task_runner_->PostTask(
++      FROM_HERE,
++      base::BindOnce(&BlockingTaskRunnerHelper::GetFeatureReport,
++                 base::Unretained(helper_.get()), report_id,
++                 buffer, std::move(callback)));
++}
++
++void HidConnectionFreeBSD::PlatformSendFeatureReport(
++    scoped_refptr<base::RefCountedBytes> buffer,
++    WriteCallback callback) {
++  base::ScopedBlockingCall scoped_blocking_call(
++      FROM_HERE, base::BlockingType::MAY_BLOCK);
++  blocking_task_runner_->PostTask(
++      FROM_HERE,
++      base::BindOnce(&BlockingTaskRunnerHelper::SendFeatureReport,
++                 base::Unretained(helper_.get()), buffer, std::move(callback)));
++}
++
++}  // namespace device
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.h
new file mode 100644
index 0000000000..fcd68bfe6a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__connection__freebsd.h
@@ -0,0 +1,76 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_connection_freebsd.h.orig	2024-12-21 10:25:10.580936830 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_connection_freebsd.h
+@@ -0,0 +1,67 @@
++// 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 DEVICE_HID_HID_CONNECTION_FREEBSD_H_
++#define DEVICE_HID_HID_CONNECTION_FREEBSD_H_
++
++#include <stddef.h>
++#include <stdint.h>
++
++#include "base/files/scoped_file.h"
++#include "base/memory/weak_ptr.h"
++#include "base/memory/ref_counted_memory.h"
++#include "base/task/sequenced_task_runner.h"
++#include "services/device/hid/hid_connection.h"
++
++namespace base {
++class SequencedTaskRunner;
++}
++
++namespace net {
++class IOBuffer;
++}
++
++namespace device {
++
++class HidConnectionFreeBSD : public HidConnection {
++ public:
++  HidConnectionFreeBSD(
++      scoped_refptr<HidDeviceInfo> device_info,
++      base::ScopedFD fd,
++      scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
++      bool allow_protected_reports,
++      bool allow_fido_reports);
++
++ private:
++  friend class base::RefCountedThreadSafe<HidConnectionFreeBSD>;
++  class BlockingTaskRunnerHelper;
++
++  HidConnectionFreeBSD(const HidConnectionFreeBSD&) = delete;
++  HidConnectionFreeBSD& operator=(const HidConnectionFreeBSD&) = delete;
++
++  ~HidConnectionFreeBSD() override;
++
++  // HidConnection implementation.
++  void PlatformClose() override;
++  void PlatformWrite(scoped_refptr<base::RefCountedBytes> buffer,
++                     WriteCallback callback) override;
++  void PlatformGetFeatureReport(uint8_t report_id,
++                                ReadCallback callback) override;
++  void PlatformSendFeatureReport(scoped_refptr<base::RefCountedBytes> buffer,
++                                 WriteCallback callback) override;
++
++  // |helper_| lives on the sequence to which |blocking_task_runner_| posts
++  // tasks so all calls must be posted there including this object's
++  // destruction.
++  std::unique_ptr<BlockingTaskRunnerHelper, base::OnTaskRunnerDeleter> helper_;
++
++  const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
++  const scoped_refptr<base::SequencedTaskRunner> task_runner_;
++
++  base::WeakPtrFactory<HidConnectionFreeBSD> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // DEVICE_HID_HID_CONNECTION_FREEBSD_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service.cc
new file mode 100644
index 0000000000..a5da1387b9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_service.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_service.cc
+@@ -20,12 +20,18 @@
+ 
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_UDEV)
+ #include "services/device/hid/hid_service_linux.h"
++#elif BUILDFLAG(IS_OPENBSD)
++#include "services/device/hid/hid_service_fido.h"
++#elif BUILDFLAG(IS_FREEBSD)
++#include "services/device/hid/hid_service_freebsd.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "services/device/hid/hid_service_mac.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "services/device/hid/hid_service_win.h"
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #include "services/device/hid/hid_service_fuchsia.h"
++#elif BUILDFLAG(IS_NETBSD)
++#include "services/device/hid/hid_service_netbsd.h"
+ #endif
+ 
+ namespace device {
+@@ -68,12 +74,18 @@ constexpr base::TaskTraits HidService::k
+ std::unique_ptr<HidService> HidService::Create() {
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_UDEV)
+   return std::make_unique<HidServiceLinux>();
++#elif BUILDFLAG(IS_OPENBSD)
++  return std::make_unique<HidServiceFido>();
++#elif BUILDFLAG(IS_FREEBSD)
++  return std::make_unique<HidServiceFreeBSD>();
+ #elif BUILDFLAG(IS_MAC)
+   return std::make_unique<HidServiceMac>();
+ #elif BUILDFLAG(IS_WIN)
+   return std::make_unique<HidServiceWin>();
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return std::make_unique<HidServiceFuchsia>();
++#elif BUILDFLAG(IS_NETBSD)
++  return std::make_unique<HidServiceNetBSD>();
+ #else
+   return nullptr;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.cc
new file mode 100644
index 0000000000..44b722576c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.cc
@@ -0,0 +1,405 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_service_fido.cc.orig	2024-12-21 10:25:10.582076644 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_service_fido.cc
+@@ -0,0 +1,396 @@
++// Copyright 2014 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "services/device/hid/hid_service_fido.h"
++
++#include <fcntl.h>
++#include <poll.h>
++#include <stdint.h>
++
++#include <dlfcn.h>
++#include <fido.h>
++
++#include <limits>
++#include <memory>
++#include <string>
++#include <utility>
++
++#include "base/files/file.h"
++#include "base/files/file_path.h"
++#include "base/files/file_util.h"
++#include "base/files/scoped_file.h"
++#include "base/location.h"
++#include "base/sequence_checker.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/strings/string_split.h"
++#include "base/strings/string_util.h"
++#include "base/task/sequenced_task_runner.h"
++#include "base/task/thread_pool.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "build/build_config.h"
++#include "build/chromeos_buildflags.h"
++#include "components/device_event_log/device_event_log.h"
++#include "device/udev_linux/scoped_udev.h"
++#include "device/udev_linux/udev_watcher.h"
++#include "services/device/hid/hid_connection_fido.h"
++
++namespace device {
++
++namespace {
++
++bool terrible_ping_kludge(int fd, const std::string &path) {
++  u_char data[256];
++  int i, n;
++  struct pollfd pfd;
++
++  for (i = 0; i < 4; i++) {
++    memset(data, 0, sizeof(data));
++    /* broadcast channel ID */
++    data[1] = 0xff;
++    data[2] = 0xff;
++    data[3] = 0xff;
++    data[4] = 0xff;
++    /* Ping command */
++    data[5] = 0x81;
++    /* One byte ping only, Vasili */
++    data[6] = 0;   
++    data[7] = 1;   
++    HID_LOG(EVENT) << "send ping " << i << " " << path;
++    if (write(fd, data, 64) == -1) {
++      HID_PLOG(ERROR) << "write " << path;
++      return false;
++    }
++    HID_LOG(EVENT) << "wait reply " << path;
++    memset(&pfd, 0, sizeof(pfd));
++    pfd.fd = fd; 
++    pfd.events = POLLIN;
++    if ((n = poll(&pfd, 1, 100)) == -1) {
++      HID_PLOG(EVENT) << "poll " << path;
++      return false;
++    } else if (n == 0) {
++      HID_LOG(EVENT) << "timed out " << path;
++      continue;
++    }
++    if (read(fd, data, 64) == -1) {  
++      HID_PLOG(ERROR) << "read " << path;
++      return false;
++    }
++    /*
++     * Ping isn't always supported on the broadcast channel,
++     * so we might get an error, but we don't care - we're
++     * synched now.
++     */
++    HID_LOG(EVENT) << "got reply " << path;
++    return true;
++  }
++  HID_LOG(ERROR) << "no response " << path;
++  return false;
++}
++
++// HID report descriptor for U2F interface. Copied from:
++// https://chromium.googlesource.com/chromiumos/platform2/+/c6c7e4e54fce11932fedaa3ea10236bf75d85a2b%5E%21/u2fd/u2fhid.cc
++// Apparently Chromium wants to see these bytes, but OpenBSD fido(4)
++// devices prohibit USB_GET_REPORT_DESC ioctl that could be used to
++// get the bytes from the USB device.
++constexpr uint8_t kU2fReportDesc[] = {
++    0x06, 0xD0, 0xF1, /* Usage Page (FIDO Alliance), FIDO_USAGE_PAGE */
++    0x09, 0x01,       /* Usage (U2F HID Auth. Device) FIDO_USAGE_U2FHID */
++    0xA1, 0x01,       /* Collection (Application), HID_APPLICATION */
++    0x09, 0x20,       /*  Usage (Input Report Data), FIDO_USAGE_DATA_IN */
++    0x15, 0x00,       /*  Logical Minimum (0) */
++    0x26, 0xFF, 0x00, /*  Logical Maximum (255) */
++    0x75, 0x08,       /*  Report Size (8) */
++    0x95, 0x40,       /*  Report Count (64), HID_INPUT_REPORT_BYTES */
++    0x81, 0x02,       /*  Input (Data, Var, Abs), Usage */
++    0x09, 0x21,       /*  Usage (Output Report Data), FIDO_USAGE_DATA_OUT */
++    0x15, 0x00,       /*  Logical Minimum (0) */
++    0x26, 0xFF, 0x00, /*  Logical Maximum (255) */
++    0x75, 0x08,       /*  Report Size (8) */
++    0x95, 0x40,       /*  Report Count (64), HID_OUTPUT_REPORT_BYTES */
++    0x91, 0x02,       /*  Output (Data, Var, Abs), Usage */
++    0xC0              /* End Collection */
++};
++
++}  // namespace
++
++struct HidServiceFido::ConnectParams {
++  ConnectParams(scoped_refptr<HidDeviceInfo> device_info,
++                bool allow_protected_reports,
++                bool allow_fido_reports,
++                ConnectCallback callback)
++      : device_info(std::move(device_info)),
++        allow_protected_reports(allow_protected_reports),
++        allow_fido_reports(allow_fido_reports),
++        callback(std::move(callback)),
++	task_runner(base::SequencedTaskRunner::GetCurrentDefault()),
++        blocking_task_runner(
++            base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)) {}
++  ~ConnectParams() {}
++
++  scoped_refptr<HidDeviceInfo> device_info;
++  bool allow_protected_reports;
++  bool allow_fido_reports;
++  ConnectCallback callback;
++  scoped_refptr<base::SequencedTaskRunner> task_runner;
++  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner;
++  base::ScopedFD fd;
++};
++
++class HidServiceFido::BlockingTaskRunnerHelper : public UdevWatcher::Observer {
++ public:
++  BlockingTaskRunnerHelper(base::WeakPtr<HidServiceFido> service)
++      : service_(std::move(service)),
++        task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++    DETACH_FROM_SEQUENCE(sequence_checker_);
++  }
++
++  BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete;
++  BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete;
++
++  ~BlockingTaskRunnerHelper() override {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++  }
++
++  void Start() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    void *library = dlopen("libudev.so", RTLD_NOW | RTLD_LOCAL);
++    if (library) {
++      dlclose(library);
++      watcher_ = UdevWatcher::StartWatching(this);
++      watcher_->EnumerateExistingDevices();
++    } else {
++      HID_LOG(ERROR) << "No udev available, failling back to single enumeration";
++      WalkFidoDevices(nullptr);
++    }
++
++    task_runner_->PostTask(
++        FROM_HERE,
++        base::BindOnce(&HidServiceFido::FirstEnumerationComplete, service_));
++  }
++
++ private:
++  void WalkFidoDevices(const char *name) {
++    fido_dev_info_t *devlist = NULL;
++    fido_dev_t *dev = NULL;
++    size_t devlist_len = 0, i;
++    const char *path;
++    int r;
++    const int MAX_FIDO_DEVICES = 256;
++
++    if ((devlist = fido_dev_info_new(MAX_FIDO_DEVICES)) == NULL) {
++      HID_LOG(ERROR) << "fido_dev_info_new failed";
++      goto out;
++    }
++    if ((r = fido_dev_info_manifest(devlist, MAX_FIDO_DEVICES, &devlist_len)) !=
++        FIDO_OK) {
++      HID_LOG(ERROR) << "fido_dev_info_manifest: " << fido_strerr(r);
++      goto out;
++    }
++
++    HID_LOG(EVENT) << "fido_dev_info_manifest found " << devlist_len
++                   << " device(s)";
++
++    for (i = 0; i < devlist_len; i++) {
++      const fido_dev_info_t *di = fido_dev_info_ptr(devlist, i);
++
++      if (di == NULL) {
++        HID_LOG(ERROR) << "fido_dev_info_ptr " << i << " failed";
++        continue;
++      }
++
++      if ((path = fido_dev_info_path(di)) == NULL) {
++        HID_LOG(ERROR) << "fido_dev_info_path " << i << " failed";
++        continue;
++      }
++
++      if (name != nullptr && !strcmp(path, name)) {
++        HID_LOG(EVENT) << "hotplug device " << i << ": " << path;
++        OnFidoDeviceAdded(di);
++        break;
++      }
++
++      HID_LOG(EVENT) << "trying device " << i << ": " << path;
++      if ((dev = fido_dev_new()) == NULL) {
++        HID_LOG(ERROR) << "fido_dev_new failed";
++        continue;
++      }
++
++      if ((r = fido_dev_open(dev, path)) != FIDO_OK) {
++        HID_LOG(ERROR) << "fido_dev_open failed " << path;
++        fido_dev_free(&dev);
++        continue;
++      }
++
++      fido_dev_close(dev);
++      fido_dev_free(&dev);
++
++      OnFidoDeviceAdded(di);
++    }
++  out:
++    if (devlist != NULL)
++      fido_dev_info_free(&devlist, MAX_FIDO_DEVICES);
++  }
++
++  void OnFidoDeviceAdded(const fido_dev_info_t *di) {
++    auto null_as_empty = [](const char *r) -> std::string {
++      return (r != nullptr) ? r : "";
++    };
++    std::string device_node(null_as_empty(fido_dev_info_path(di)));  
++    std::vector<uint8_t> report_descriptor(
++        kU2fReportDesc, kU2fReportDesc + sizeof(kU2fReportDesc));
++
++    auto device_info = base::MakeRefCounted<HidDeviceInfo>(
++        device_node, /*physical_device_id*/"", fido_dev_info_vendor(di),
++        fido_dev_info_product(di), null_as_empty(fido_dev_info_product_string(di)),
++        null_as_empty(fido_dev_info_manufacturer_string(di)),
++	device::mojom::HidBusType::kHIDBusTypeUSB, report_descriptor,
++        device_node);
++
++    task_runner_->PostTask(
++        FROM_HERE,
++        base::BindOnce(&HidServiceFido::AddDevice, service_, device_info));
++  }
++
++  // UdevWatcher::Observer
++  void OnDeviceAdded(ScopedUdevDevicePtr device) override {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++
++    const char* subsystem = udev_device_get_subsystem(device.get());
++    if (!subsystem || strcmp(subsystem, "fido") != 0)
++      return;
++
++    const char* device_path = udev_device_get_syspath(device.get());
++    if (!device_path)
++      return;
++
++    WalkFidoDevices(device_path);
++  }
++
++  void OnDeviceRemoved(ScopedUdevDevicePtr device) override {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++
++    const char* device_path = udev_device_get_syspath(device.get());
++    if (device_path) {
++      task_runner_->PostTask(
++          FROM_HERE, base::BindOnce(&HidServiceFido::RemoveDevice, service_,
++                                    std::string(device_path)));
++    }
++  }
++
++  void OnDeviceChanged(ScopedUdevDevicePtr) override {}
++
++  SEQUENCE_CHECKER(sequence_checker_);
++  std::unique_ptr<UdevWatcher> watcher_;
++
++  // This weak pointer is only valid when checked on this task runner.
++  base::WeakPtr<HidServiceFido> service_;
++  scoped_refptr<base::SequencedTaskRunner> task_runner_;
++};
++
++HidServiceFido::HidServiceFido()
++    : blocking_task_runner_(
++          base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)),
++      helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner_)) {
++  // We need to properly initialize |blocking_task_helper_| here because we need
++  // |weak_factory_| to be created first.
++  helper_.reset(new BlockingTaskRunnerHelper(weak_factory_.GetWeakPtr()));
++  blocking_task_runner_->PostTask(
++      FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start,
++                                base::Unretained(helper_.get())));
++}
++
++HidServiceFido::~HidServiceFido() = default;
++
++base::WeakPtr<HidService> HidServiceFido::GetWeakPtr() {
++  return weak_factory_.GetWeakPtr();
++}
++
++void HidServiceFido::Connect(const std::string& device_guid,
++                              bool allow_protected_reports,
++                              bool allow_fido_reports,
++                              ConnectCallback callback) {
++  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++  const auto& map_entry = devices().find(device_guid);
++  if (map_entry == devices().end()) {
++    base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
++        FROM_HERE, base::BindOnce(std::move(callback), nullptr));
++    return;
++  }
++  scoped_refptr<HidDeviceInfo> device_info = map_entry->second;
++
++  auto params =
++      std::make_unique<ConnectParams>(device_info, allow_protected_reports,
++                                      allow_fido_reports, std::move(callback));
++  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner =
++      params->blocking_task_runner;
++  blocking_task_runner->PostTask(
++      FROM_HERE, base::BindOnce(&HidServiceFido::OpenOnBlockingThread,
++                                std::move(params)));
++}
++
++// static
++void HidServiceFido::OpenOnBlockingThread(
++    std::unique_ptr<ConnectParams> params) {
++  base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
++                                                base::BlockingType::MAY_BLOCK);
++  scoped_refptr<base::SequencedTaskRunner> task_runner = params->task_runner;
++
++  base::FilePath device_path(params->device_info->device_node());
++  base::File device_file;
++  int flags =
++      base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
++  device_file.Initialize(device_path, flags);
++  if (!device_file.IsValid()) {
++    base::File::Error file_error = device_file.error_details();
++
++    if (file_error == base::File::FILE_ERROR_ACCESS_DENIED) {
++      HID_LOG(EVENT)
++          << "Access denied opening device read-write, trying read-only.";
++      flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
++      device_file.Initialize(device_path, flags);
++    }
++  }
++  if (!device_file.IsValid()) {
++    HID_LOG(EVENT) << "Failed to open '" << params->device_info->device_node()
++                   << "': "
++                   << base::File::ErrorToString(device_file.error_details());
++    task_runner->PostTask(FROM_HERE,
++                          base::BindOnce(std::move(params->callback), nullptr));
++    return;
++  }
++  if (!terrible_ping_kludge(device_file.GetPlatformFile(), params->device_info->device_node())) {
++    HID_LOG(EVENT) << "Failed to ping " << params->device_info->device_node();
++    task_runner->PostTask(FROM_HERE, base::BindOnce(std::move(params->callback), nullptr));
++    return;
++  }
++  params->fd.reset(device_file.TakePlatformFile());
++
++  task_runner->PostTask(FROM_HERE, base::BindOnce(&HidServiceFido::FinishOpen,
++                                                  std::move(params)));
++}
++
++// static
++void HidServiceFido::FinishOpen(std::unique_ptr<ConnectParams> params) {
++  DCHECK(params->fd.is_valid());
++
++  if (!base::SetNonBlocking(params->fd.get())) {
++    HID_PLOG(DEBUG) << "Failed to set the non-blocking flag on the device fd";
++    std::move(params->callback).Run(nullptr);
++    return;
++  }
++
++  std::move(params->callback)
++      .Run(base::MakeRefCounted<HidConnectionFido>(
++          std::move(params->device_info), std::move(params->fd),
++          std::move(params->blocking_task_runner),
++          params->allow_protected_reports, params->allow_fido_reports));
++}
++
++}  // namespace device
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.h
new file mode 100644
index 0000000000..0fc476b54b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__fido.h
@@ -0,0 +1,74 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_service_fido.h.orig	2024-12-21 10:25:10.582731757 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_service_fido.h
+@@ -0,0 +1,65 @@
++// Copyright 2014 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_
++#define SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_
++
++#include <memory>
++
++#include "base/compiler_specific.h"
++#include "base/files/scoped_file.h"
++#include "base/memory/weak_ptr.h"
++#include "base/task/sequenced_task_runner.h"
++#include "build/build_config.h"
++#include "build/chromeos_buildflags.h"
++#include "services/device/hid/hid_device_info.h"
++#include "services/device/hid/hid_service.h"
++
++namespace device {
++
++class HidServiceFido : public HidService {
++ public:
++  HidServiceFido();
++  HidServiceFido(HidServiceFido&) = delete;
++  HidServiceFido& operator=(HidServiceFido&) = delete;
++  ~HidServiceFido() override;
++
++  // HidService:
++  void Connect(const std::string& device_id,
++               bool allow_protected_reports,
++               bool allow_fido_reports,
++               ConnectCallback callback) override;
++  base::WeakPtr<HidService> GetWeakPtr() override;
++
++ private:
++  struct ConnectParams;
++  class BlockingTaskRunnerHelper;
++
++// These functions implement the process of locating, requesting access to and
++// opening a device. Because this operation crosses multiple threads these
++// functions are static and the necessary parameters are passed as a single
++// struct.
++#if BUILDFLAG(IS_CHROMEOS_ASH)
++  static void OnPathOpenComplete(std::unique_ptr<ConnectParams> params,
++                                 base::ScopedFD fd);
++  static void OnPathOpenError(const std::string& device_path,
++                              ConnectCallback callback,
++                              const std::string& error_name,
++                              const std::string& error_message);
++#else
++  static void OpenOnBlockingThread(std::unique_ptr<ConnectParams> params);
++#endif
++  static void FinishOpen(std::unique_ptr<ConnectParams> params);
++
++  const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
++
++  // |helper_| lives on the sequence |blocking_task_runner_| posts to and holds
++  // a weak reference back to the service that owns it.
++  std::unique_ptr<BlockingTaskRunnerHelper, base::OnTaskRunnerDeleter> helper_;
++  base::WeakPtrFactory<HidServiceFido> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // SERVICES_DEVICE_HID_HID_SERVICE_LINUX_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.cc
new file mode 100644
index 0000000000..6a9c970e59
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.cc
@@ -0,0 +1,404 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_service_freebsd.cc.orig	2024-12-21 10:25:10.583221765 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_service_freebsd.cc
+@@ -0,0 +1,395 @@
++// Copyright 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 "services/device/hid/hid_service_freebsd.h"
++
++#include <dev/usb/usb_ioctl.h>
++#include <stdint.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++
++#include <set>
++#include <string>
++#include <vector>
++
++#include "base/files/file_descriptor_watcher_posix.h"
++#include "base/files/file_enumerator.h"
++#include "base/files/file_util.h"
++#include "base/files/file.h"
++#include "base/location.h"
++#include "base/logging.h"
++#include "base/posix/eintr_wrapper.h"
++#include "base/stl_util.h"
++#include "base/strings/pattern.h"
++#include "base/strings/stringprintf.h"
++#include "base/strings/sys_string_conversions.h"
++#include "base/strings/string_util.h"
++#include "base/strings/string_split.h"
++#include "base/task/single_thread_task_runner.h"
++#include "base/task/thread_pool.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "base/threading/thread_restrictions.h"
++#include "components/device_event_log/device_event_log.h"
++#include "services/device/hid/hid_connection_freebsd.h"
++
++const int kMaxPermissionChecks = 5;
++
++namespace device {
++
++struct HidServiceFreeBSD::ConnectParams {
++  ConnectParams(scoped_refptr<HidDeviceInfo> device_info,
++                bool allow_protected_reports,
++		bool allow_fido_reports,
++                ConnectCallback callback)
++      : device_info(std::move(device_info)),
++	allow_protected_reports(allow_protected_reports),
++	allow_fido_reports(allow_fido_reports),
++        callback(std::move(callback)),
++	task_runner(base::SequencedTaskRunner::GetCurrentDefault()),
++        blocking_task_runner(
++            base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)) {}
++  ~ConnectParams() {}
++
++  scoped_refptr<HidDeviceInfo> device_info;
++  bool allow_protected_reports;
++  bool allow_fido_reports;
++  ConnectCallback callback;
++  scoped_refptr<base::SequencedTaskRunner> task_runner;
++  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner;
++  base::ScopedFD fd;
++};
++
++class HidServiceFreeBSD::BlockingTaskRunnerHelper {
++ public:
++  BlockingTaskRunnerHelper(base::WeakPtr<HidServiceFreeBSD> service)
++      : service_(std::move(service)),
++	task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++    DETACH_FROM_SEQUENCE(sequence_checker_);
++
++    timer_.reset(new base::RepeatingTimer());
++    devd_buffer_ = new net::IOBufferWithSize(1024);
++  }
++
++  BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete;
++  BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete;
++
++  ~BlockingTaskRunnerHelper() {
++  }
++
++  void Start() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++    const base::FilePath kDevRoot("/dev");
++    const std::string kUHIDPattern("/dev/uhid*");
++
++    base::FileEnumerator enumerator(kDevRoot, false, base::FileEnumerator::FILES);
++    do {
++      const base::FilePath next_device_path(enumerator.Next());
++      const std::string next_device = next_device_path.value();
++      if (next_device.empty())
++        break;
++
++      if (base::MatchPattern(next_device, kUHIDPattern))
++        OnDeviceAdded(next_device.substr(5));
++    } while (true);
++
++    SetupDevdMonitor();
++
++    task_runner_->PostTask(
++        FROM_HERE,
++        base::BindOnce(&HidServiceFreeBSD::FirstEnumerationComplete, service_));
++  }
++
++  bool HaveReadWritePermissions(std::string device_id) {
++    std::string device_node = "/dev/" + device_id;
++    base::internal::AssertBlockingAllowed();
++
++    base::FilePath device_path(device_node);
++    base::File device_file;
++    int flags =
++        base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
++    device_file.Initialize(device_path, flags);
++    if (!device_file.IsValid())
++      return false;
++
++    return true;
++  }
++
++  void OnDeviceAdded(std::string device_id) {
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    std::string device_node = "/dev/" + device_id;
++    uint16_t vendor_id = 0xffff;
++    uint16_t product_id = 0xffff;
++    std::string product_name = "";
++    std::string serial_number = "";
++
++    std::vector<uint8_t> report_descriptor;
++
++    base::internal::AssertBlockingAllowed();
++
++    base::FilePath device_path(device_node);
++    base::File device_file;
++    int flags =
++        base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
++    device_file.Initialize(device_path, flags);
++    if (!device_file.IsValid()) {
++      HID_LOG(ERROR) << "Failed to open '" << device_node
++                     << "': "
++                     << base::File::ErrorToString(device_file.error_details());
++      return;
++    }
++
++    base::ScopedFD fd;
++    fd.reset(device_file.TakePlatformFile());
++
++    struct usb_gen_descriptor ugd;
++    ugd.ugd_data = NULL;
++    ugd.ugd_maxlen = 0xffff;
++    int result = HANDLE_EINTR(
++        ioctl(fd.get(), USB_GET_REPORT_DESC, &ugd));
++
++    if (result < 0) {
++      HID_LOG(ERROR) << "Failed to get report descriptor size";
++      return;
++    }
++
++    report_descriptor.resize(ugd.ugd_actlen);
++
++    ugd.ugd_data = report_descriptor.data();
++    ugd.ugd_maxlen = ugd.ugd_actlen;
++    result = HANDLE_EINTR(
++        ioctl(fd.get(), USB_GET_REPORT_DESC, &ugd));
++
++    if (result < 0) {
++      HID_LOG(ERROR) << "Failed to get report descriptor";
++      return;
++    }
++
++    scoped_refptr<HidDeviceInfo> device_info(new HidDeviceInfo(
++        device_id,
++        /*physical_device_id*/"",
++	vendor_id,
++	product_id,
++	product_name,
++	serial_number,
++        device::mojom::HidBusType::kHIDBusTypeUSB,
++        report_descriptor,
++	device_node));
++
++    task_runner_->PostTask(FROM_HERE, base::BindOnce(&HidServiceFreeBSD::AddDevice,
++                                                 service_, device_info));
++  }
++
++  void OnDeviceRemoved(std::string device_id) {
++    base::ScopedBlockingCall scoped_blocking_call(
++        FROM_HERE, base::BlockingType::MAY_BLOCK);
++    task_runner_->PostTask(
++        FROM_HERE, base::BindOnce(&HidServiceFreeBSD::RemoveDevice, service_,
++                                  device_id));
++  }
++
++ private:
++
++  void CheckPendingPermissionChange() {
++    base::internal::AssertBlockingAllowed();
++    std::map<std::string, int>::iterator it;
++    for (it = permissions_checks_attempts_.begin(); it != permissions_checks_attempts_.end();) {
++      std::string device_name = it->first;
++      bool keep = true;
++      if (HaveReadWritePermissions(device_name)) {
++        OnDeviceAdded(device_name);
++        keep = false;
++      }
++      else if (it->second-- <= 0) {
++        HID_LOG(ERROR) << "Still don't have write permissions to '" << device_name
++                       << "' after " << kMaxPermissionChecks << " attempts";
++        keep = false;
++      }
++
++      if (keep)
++        ++it;
++      else
++        permissions_checks_attempts_.erase(it++);
++    }
++
++    if (permissions_checks_attempts_.empty())
++      timer_->Stop();
++  }
++
++  void SetupDevdMonitor() {
++    base::internal::AssertBlockingAllowed();
++
++    int devd_fd = socket(AF_UNIX, SOCK_SEQPACKET, 0);
++    if (devd_fd < 0)
++      return;
++
++    struct sockaddr_un sa;
++
++    sa.sun_family = AF_UNIX;
++    strlcpy(sa.sun_path, "@VARBASE@/run/devd.seqpacket.pipe", sizeof(sa.sun_path));
++    if (connect(devd_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
++      close(devd_fd);
++      return;
++    } 
++
++    devd_fd_.reset(devd_fd);
++    file_watcher_ = base::FileDescriptorWatcher::WatchReadable(
++        devd_fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnDevdMessageCanBeRead,
++                                            base::Unretained(this)));
++  }
++
++  void OnDevdMessageCanBeRead() {
++    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++    ssize_t bytes_read = HANDLE_EINTR(recv(devd_fd_.get(), devd_buffer_->data(),
++                                      devd_buffer_->size() - 1, MSG_WAITALL));
++    if (bytes_read < 0) {
++      if (errno != EAGAIN) {
++        HID_LOG(ERROR) << "Read failed";
++        file_watcher_.reset();
++      }
++      return;
++    }
++
++    devd_buffer_->data()[bytes_read] = 0;
++    char *data = devd_buffer_->data();
++    // It may take some time for devd to change permissions
++    // on /dev/uhidX node. So do not fail immediately if
++    // open fail. Retry each second for kMaxPermissionChecks
++    // times before giving up entirely
++    if (base::StartsWith(data, "+uhid", base::CompareCase::SENSITIVE)) {
++      std::vector<std::string> parts = base::SplitString(
++        data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
++      if (!parts.empty()) {
++        std::string device_name = parts[0].substr(1); // skip '+'
++        if (HaveReadWritePermissions(device_name))
++          OnDeviceAdded(parts[0].substr(1));
++        else {
++          // Do not re-add to checks
++          if (permissions_checks_attempts_.find(device_name) == permissions_checks_attempts_.end()) {
++            permissions_checks_attempts_.insert(std::pair<std::string, int>(device_name, kMaxPermissionChecks));
++            timer_->Start(FROM_HERE, base::Seconds(1),
++                          this, &BlockingTaskRunnerHelper::CheckPendingPermissionChange);
++          }
++        }
++      }
++    }
++
++    if (base::StartsWith(data, "-uhid", base::CompareCase::SENSITIVE)) {
++      std::vector<std::string> parts = base::SplitString(
++        data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
++      if (!parts.empty()) {
++        std::string device_name = parts[0].substr(1); // skip '-'
++        auto it = permissions_checks_attempts_.find(device_name);
++        if (it != permissions_checks_attempts_.end()) {
++          permissions_checks_attempts_.erase(it);
++          if (permissions_checks_attempts_.empty())
++            timer_->Stop();
++        }
++        OnDeviceRemoved(parts[0].substr(1));
++      }
++    }
++  }
++
++  SEQUENCE_CHECKER(sequence_checker_);
++
++  // This weak pointer is only valid when checked on this task runner.
++  base::WeakPtr<HidServiceFreeBSD> service_;
++  scoped_refptr<base::SequencedTaskRunner> task_runner_;
++  std::unique_ptr<base::FileDescriptorWatcher::Controller> file_watcher_;
++  std::unique_ptr<base::RepeatingTimer> timer_;
++  base::ScopedFD devd_fd_;
++  scoped_refptr<net::IOBufferWithSize> devd_buffer_;
++  std::map<std::string, int> permissions_checks_attempts_;
++};
++
++HidServiceFreeBSD::HidServiceFreeBSD()
++    : blocking_task_runner_(
++          base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)),
++      helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner_)) {
++  helper_.reset(new BlockingTaskRunnerHelper(weak_factory_.GetWeakPtr()));
++  blocking_task_runner_->PostTask(
++      FROM_HERE,
++      base::BindOnce(&BlockingTaskRunnerHelper::Start, base::Unretained(helper_.get())));
++}
++
++HidServiceFreeBSD::~HidServiceFreeBSD() {
++  blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release());
++}
++
++base::WeakPtr<HidService> HidServiceFreeBSD::GetWeakPtr() {
++  return weak_factory_.GetWeakPtr();
++}
++
++// static
++void HidServiceFreeBSD::OpenOnBlockingThread(
++    std::unique_ptr<ConnectParams> params) {
++  base::ScopedBlockingCall scoped_blocking_call(
++      FROM_HERE, base::BlockingType::MAY_BLOCK);
++  scoped_refptr<base::SequencedTaskRunner> task_runner = params->task_runner;
++
++  base::FilePath device_path(params->device_info->device_node());
++  base::File device_file;
++  int flags =
++      base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
++  device_file.Initialize(device_path, flags);
++  if (!device_file.IsValid()) {
++    HID_LOG(EVENT) << "Failed to open '" << params->device_info->device_node()
++                   << "': "
++                   << base::File::ErrorToString(device_file.error_details());
++    task_runner->PostTask(FROM_HERE,
++		          base::BindOnce(std::move(params->callback), nullptr));
++    return;
++  }
++  params->fd.reset(device_file.TakePlatformFile());
++  task_runner->PostTask(FROM_HERE, base::BindOnce(&HidServiceFreeBSD::FinishOpen,
++			                          std::move(params)));
++}
++
++void HidServiceFreeBSD::Connect(const std::string& device_guid,
++                                bool allow_protected_reports,
++				bool allow_fido_reports,
++                                ConnectCallback callback) {
++  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++
++  const auto& map_entry = devices().find(device_guid);
++  if (map_entry == devices().end()) {
++    base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
++        FROM_HERE, base::BindOnce(std::move(callback), nullptr));
++    return;
++  }
++
++  scoped_refptr<HidDeviceInfo> device_info = map_entry->second;
++
++  auto params = std::make_unique<ConnectParams>(device_info,
++                                                allow_protected_reports,
++						allow_fido_reports,
++						std::move(callback));
++  scoped_refptr<base::SequencedTaskRunner> blocking_task_runner =
++      params->blocking_task_runner;
++
++  blocking_task_runner->PostTask(
++      FROM_HERE, base::BindOnce(&HidServiceFreeBSD::OpenOnBlockingThread,
++                                std::move(params)));
++}
++
++// static
++void HidServiceFreeBSD::FinishOpen(std::unique_ptr<ConnectParams> params) {
++  DCHECK(params->fd.is_valid());
++
++  if (!base::SetNonBlocking(params->fd.get())) {
++    HID_PLOG(ERROR) << "Failed to set the non-blocking flag on the device fd";
++    std::move(params->callback).Run(nullptr);
++  }
++
++  std::move(params->callback).Run(base::MakeRefCounted<HidConnectionFreeBSD>(
++    std::move(params->device_info),
++    std::move(params->fd),
++    std::move(params->blocking_task_runner),
++    params->allow_protected_reports,
++    params->allow_fido_reports
++  ));
++}
++
++}  // namespace device
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.h
new file mode 100644
index 0000000000..58363018f7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__freebsd.h
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_service_freebsd.h.orig	2024-12-21 10:25:10.584262403 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_service_freebsd.h
+@@ -0,0 +1,49 @@
++// Copyright 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 DEVICE_HID_HID_SERVICE_FREEBSD_H_
++#define DEVICE_HID_HID_SERVICE_FREEBSD_H_
++
++#include <string>
++
++#include "base/memory/ref_counted.h"
++#include "base/memory/weak_ptr.h"
++#include "base/timer/timer.h"
++#include "services/device/hid/hid_service.h"
++#include "net/base/io_buffer.h"
++
++namespace device {
++
++class HidServiceFreeBSD : public HidService {
++ public:
++  HidServiceFreeBSD();
++
++  HidServiceFreeBSD(const HidServiceFreeBSD&) = delete;
++  HidServiceFreeBSD& operator=(const HidServiceFreeBSD&) = delete;
++
++  ~HidServiceFreeBSD() override;
++
++  void Connect(const std::string& device_guid,
++               bool allow_protected_reports,
++	       bool allow_fido_reports,
++               ConnectCallback connect) override;
++  base::WeakPtr<HidService> GetWeakPtr() override;
++
++ private:
++  struct ConnectParams;
++  class BlockingTaskRunnerHelper;
++
++  static void OpenOnBlockingThread(std::unique_ptr<ConnectParams> params);
++  static void FinishOpen(std::unique_ptr<ConnectParams> params);
++
++  const scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
++  // |helper_| lives on the sequence |blocking_task_runner_| posts to and holds
++  // a weak reference back to the service that owns it.
++  std::unique_ptr<BlockingTaskRunnerHelper, base::OnTaskRunnerDeleter> helper_;
++  base::WeakPtrFactory<HidServiceFreeBSD> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // DEVICE_HID_HID_SERVICE_FREEBSD_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.cc
new file mode 100644
index 0000000000..da68a49bc1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_service_netbsd.cc.orig	2024-12-21 10:25:10.584948247 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_service_netbsd.cc
+@@ -0,0 +1,27 @@
++// Copyright 2022 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "services/device/hid/hid_service_netbsd.h"
++
++#include "base/notreached.h"
++#include "services/device/hid/hid_connection.h"
++
++namespace device {
++
++HidServiceNetBSD::HidServiceNetBSD() = default;
++HidServiceNetBSD::~HidServiceNetBSD() = default;
++
++void HidServiceNetBSD::Connect(const std::string& device_id,
++                                bool allow_protected_reports,
++                                bool allow_fido_reports,
++                                ConnectCallback callback) {
++  NOTIMPLEMENTED_LOG_ONCE();
++  std::move(callback).Run(nullptr);
++}
++
++base::WeakPtr<HidService> HidServiceNetBSD::GetWeakPtr() {
++  return weak_factory_.GetWeakPtr();
++}
++
++}  // namespace device
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.h
new file mode 100644
index 0000000000..868780d3ad
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_hid_hid__service__netbsd.h
@@ -0,0 +1,42 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/hid/hid_service_netbsd.h.orig	2024-12-21 10:25:10.585482674 +0000
++++ src/3rdparty/chromium/services/device/hid/hid_service_netbsd.h
+@@ -0,0 +1,33 @@
++// Copyright 2022 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SERVICES_DEVICE_HID_HID_SERVICE_NETBSD_H_
++#define SERVICES_DEVICE_HID_HID_SERVICE_NETBSD_H_
++
++#include "services/device/hid/hid_service.h"
++
++namespace device {
++
++class HidServiceNetBSD : public HidService {
++ public:
++  HidServiceNetBSD();
++  ~HidServiceNetBSD() override;
++
++  HidServiceNetBSD(const HidServiceNetBSD&) = delete;
++  HidServiceNetBSD& operator=(const HidServiceNetBSD&) = delete;
++
++ private:
++  // HidService implementation.
++  void Connect(const std::string& device_id,
++               bool allow_protected_reports,
++               bool allow_fido_reports,
++               ConnectCallback callback) override;
++  base::WeakPtr<HidService> GetWeakPtr() override;
++
++  base::WeakPtrFactory<HidServiceNetBSD> weak_factory_{this};
++};
++
++}  // namespace device
++
++#endif  // SERVICES_DEVICE_HID_HID_SERVICE_NETBSD_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_public_cpp_generic__sensor_sensor__reading.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_public_cpp_generic__sensor_sensor__reading.h
new file mode 100644
index 0000000000..7b8ac4a07c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_public_cpp_generic__sensor_sensor__reading.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/public/cpp/generic_sensor/sensor_reading.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/public/cpp/generic_sensor/sensor_reading.h
+@@ -8,6 +8,8 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ 
++#include <cstdint>
++
+ #include <type_traits>
+ 
+ namespace device {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn
new file mode 100644
index 0000000000..b2a9e591aa
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_public_mojom_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/public/mojom/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/public/mojom/BUILD.gn
+@@ -98,7 +98,7 @@ mojom("device_service") {
+   enable_js_fuzzing = false
+ 
+   enabled_features = []
+-  if ((is_linux || is_chromeos) && use_udev) {
++  if ((is_linux || is_chromeos) && !is_bsd && use_udev) {
+     enabled_features += [ "enable_input_device_manager" ]
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn
new file mode 100644
index 0000000000..c79de605eb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/serial/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/serial/BUILD.gn
+@@ -5,7 +5,7 @@
+ import("//build/config/chromeos/ui_mode.gni")
+ import("//build/config/features.gni")
+ 
+-if (is_win || ((is_linux || is_chromeos) && use_udev) || is_mac) {
++if (is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac) {
+   config("platform_support") {
+     visibility = [ ":serial" ]
+     if (is_win) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc
new file mode 100644
index 0000000000..34815107b2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_serial__device__enumerator.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/serial/serial_device_enumerator.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/serial/serial_device_enumerator.cc
+@@ -13,7 +13,7 @@
+ #include "build/build_config.h"
+ #include "components/device_event_log/device_event_log.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "services/device/serial/serial_device_enumerator_linux.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "services/device/serial/serial_device_enumerator_mac.h"
+@@ -26,7 +26,7 @@ namespace device {
+ // static
+ std::unique_ptr<SerialDeviceEnumerator> SerialDeviceEnumerator::Create(
+     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return SerialDeviceEnumeratorLinux::Create();
+ #elif BUILDFLAG(IS_MAC)
+   return std::make_unique<SerialDeviceEnumeratorMac>();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc
new file mode 100644
index 0000000000..ebe21f3a2f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_serial_serial__io__handler__posix.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/serial/serial_io_handler_posix.cc
+@@ -73,7 +73,7 @@ bool BitrateToSpeedConstant(int bitrate,
+     BITRATE_TO_SPEED_CASE(9600)
+     BITRATE_TO_SPEED_CASE(19200)
+     BITRATE_TO_SPEED_CASE(38400)
+-#if !BUILDFLAG(IS_MAC)
++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD)
+     BITRATE_TO_SPEED_CASE(57600)
+     BITRATE_TO_SPEED_CASE(115200)
+     BITRATE_TO_SPEED_CASE(230400)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc
new file mode 100644
index 0000000000..fe1fb09b5a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor__linux.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor_linux.cc
+@@ -136,7 +136,11 @@ class TimeZoneMonitorLinuxImpl
+     // false positives are harmless, assuming the false positive rate is
+     // reasonable.
+     const char* const kFilesToWatch[] = {
++#if BUILDFLAG(IS_BSD)
++        "@PKG_SYSCONFBASE@/localtime",
++#else
+         "/etc/localtime", "/etc/timezone", "/etc/TZ",
++#endif
+     };
+     for (size_t index = 0; index < std::size(kFilesToWatch); ++index) {
+       file_path_watchers_.push_back(std::make_unique<base::FilePathWatcher>());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_BUILD.gn
new file mode 100644
index 0000000000..6748e86565
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_BUILD.gn
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/usb/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/device/usb/BUILD.gn
+@@ -92,7 +92,7 @@ static_library("usb") {
+     deps += [ "//third_party/re2" ]
+   }
+ 
+-  if (is_mac) {
++  if (is_mac || is_openbsd) {
+     sources += [
+       "usb_device_handle_mac.cc",
+       "usb_device_handle_mac.h",
+@@ -124,6 +124,13 @@ static_library("usb") {
+     deps += [ "//third_party/libusb" ]
+   }
+ 
++  if (is_freebsd || is_netbsd) {
++    sources += [
++      "usb_service_fake.cc",
++      "usb_service_fake.h",
++    ]
++  }
++
+   if (is_linux || is_chromeos) {
+     sources += [
+       "usb_device_linux.cc",
+@@ -141,7 +148,7 @@ static_library("usb") {
+     deps += [ "//device/udev_linux" ]
+   }
+ 
+-  if (is_android || is_chromeos || is_linux) {
++  if (is_android || is_chromeos || is_linux && !is_bsd) {
+     sources += [
+       "usb_device_handle_usbfs.cc",
+       "usb_device_handle_usbfs.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service.cc
new file mode 100644
index 0000000000..cb172377be
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/usb/usb_service.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/device/usb/usb_service.cc
+@@ -22,13 +22,17 @@
+ 
+ #if BUILDFLAG(IS_ANDROID)
+ #include "services/device/usb/usb_service_android.h"
+-#elif defined(USE_UDEV)
++#elif defined(USE_UDEV) && !BUILDFLAG(IS_BSD)
+ #include "services/device/usb/usb_service_linux.h"
+ #elif BUILDFLAG(IS_MAC)
+ #include "services/device/usb/usb_service_impl.h"
+ #include "services/device/usb/usb_service_mac.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "services/device/usb/usb_service_win.h"
++#elif BUILDFLAG(IS_OPENBSD)
++#include "services/device/usb/usb_service_impl.h"
++#elif BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
++#include "services/device/usb/usb_service_fake.h"
+ #endif
+ 
+ namespace device {
+@@ -51,7 +55,7 @@ constexpr base::TaskTraits UsbService::k
+ std::unique_ptr<UsbService> UsbService::Create() {
+ #if BUILDFLAG(IS_ANDROID)
+   return base::WrapUnique(new UsbServiceAndroid());
+-#elif defined(USE_UDEV)
++#elif defined(USE_UDEV) && !BUILDFLAG(IS_BSD)
+   return base::WrapUnique(new UsbServiceLinux());
+ #elif BUILDFLAG(IS_WIN)
+   return base::WrapUnique(new UsbServiceWin());
+@@ -60,6 +64,8 @@ std::unique_ptr<UsbService> UsbService::
+     return base::WrapUnique(new UsbServiceMac());
+   else
+     return base::WrapUnique(new UsbServiceImpl());
++#elif BUILDFLAG(IS_BSD)
++  return base::WrapUnique(new UsbServiceImpl());
+ #else
+   return nullptr;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.cc
new file mode 100644
index 0000000000..26a989ae97
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.cc
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/usb/usb_service_fake.cc.orig	2024-12-21 10:25:10.592547281 +0000
++++ src/3rdparty/chromium/services/device/usb/usb_service_fake.cc
+@@ -0,0 +1,49 @@
++// Copyright 2014 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "services/device/usb/usb_service_fake.h"
++
++#include <stdint.h>
++
++#include <list>
++#include <memory>
++#include <set>
++#include <utility>
++
++#include "base/barrier_closure.h"
++#include "base/containers/contains.h"
++#include "base/location.h"
++#include "base/memory/ref_counted_memory.h"
++#include "base/memory/weak_ptr.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/strings/utf_string_conversions.h"
++#include "base/task/sequenced_task_runner.h"
++#include "base/task/single_thread_task_runner.h"
++#include "base/task/thread_pool.h"
++#include "base/threading/scoped_blocking_call.h"
++#include "build/build_config.h"
++#include "components/device_event_log/device_event_log.h"
++#include "services/device/usb/usb_device_handle.h"
++#include "services/device/usb/usb_error.h"
++#include "services/device/usb/webusb_descriptors.h"
++
++namespace device {
++
++UsbServiceImpl::UsbServiceImpl()
++    : task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {
++  NOTIMPLEMENTED();
++}
++
++UsbServiceImpl::~UsbServiceImpl() {
++  NOTIMPLEMENTED();
++  NotifyWillDestroyUsbService();
++}
++
++void UsbServiceImpl::GetDevices(GetDevicesCallback callback) {
++  NOTIMPLEMENTED();
++  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
++  UsbService::GetDevices(std::move(callback));
++}
++
++}  // namespace device
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.h
new file mode 100644
index 0000000000..536846ad56
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_device_usb_usb__service__fake.h
@@ -0,0 +1,57 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/device/usb/usb_service_fake.h.orig	2024-12-21 10:25:10.593061594 +0000
++++ src/3rdparty/chromium/services/device/usb/usb_service_fake.h
+@@ -0,0 +1,48 @@
++// Copyright 2015 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_
++#define SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_
++
++#include "services/device/usb/usb_service.h"
++
++#include <stddef.h>
++
++#include <map>
++#include <set>
++#include <string>
++#include <vector>
++
++#include "base/containers/queue.h"
++#include "base/memory/weak_ptr.h"
++#include "build/build_config.h"
++#include "services/device/usb/usb_context.h"
++#include "services/device/usb/usb_device_impl.h"
++#include "third_party/abseil-cpp/absl/types/optional.h"
++
++namespace device {
++
++class UsbDeviceImpl;
++
++class UsbServiceImpl final : public UsbService {
++ public:
++  UsbServiceImpl();
++
++  UsbServiceImpl(const UsbServiceImpl&) = delete;
++  UsbServiceImpl& operator=(const UsbServiceImpl&) = delete;
++
++  ~UsbServiceImpl() override;
++
++ private:
++  // device::UsbService implementation
++  void GetDevices(GetDevicesCallback callback) override;
++
++  void OnUsbContext(scoped_refptr<UsbContext> context);
++
++  scoped_refptr<base::SequencedTaskRunner> task_runner_;
++};
++
++}  // namespace device
++
++#endif  // SERVICES_DEVICE_USB_USB_SERVICE_IMPL_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_BUILD.gn
new file mode 100644
index 0000000000..6cbe1aacc1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_BUILD.gn
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/network/BUILD.gn
+@@ -401,7 +401,6 @@ if (is_linux || is_chromeos) {
+     ]
+     deps = [
+       "//base:base",
+-      "//sandbox/linux:sandbox_services",
+       "//sandbox/policy:policy",
+     ]
+     configs += [ "//build/config/compiler:wexit_time_destructors" ]
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__context.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__context.cc
new file mode 100644
index 0000000000..f2c1239347
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__context.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/network_context.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/network/network_context.cc
+@@ -589,7 +589,7 @@ NetworkContext::NetworkContextHttpAuthPr
+ NetworkContext::NetworkContextHttpAuthPreferences::
+     ~NetworkContextHttpAuthPreferences() = default;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ bool NetworkContext::NetworkContextHttpAuthPreferences::AllowGssapiLibraryLoad()
+     const {
+   if (network_service_) {
+@@ -2444,7 +2444,7 @@ void NetworkContext::OnHttpAuthDynamicPa
+       http_auth_dynamic_network_service_params->android_negotiate_account_type);
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   http_auth_merged_preferences_.set_allow_gssapi_library_load(
+       http_auth_dynamic_network_service_params->allow_gssapi_library_load);
+ #endif  // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__context.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__context.h
new file mode 100644
index 0000000000..ff05691175
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__context.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/network_context.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/network/network_context.h
+@@ -696,7 +696,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) 
+    public:
+     explicit NetworkContextHttpAuthPreferences(NetworkService* network_service);
+     ~NetworkContextHttpAuthPreferences() override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     bool AllowGssapiLibraryLoad() const override;
+ #endif  // BUILDFLAG(IS_LINUX)
+    private:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc
new file mode 100644
index 0000000000..923b8d8d3c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc
+@@ -14,11 +14,14 @@
+ #include "sandbox/policy/features.h"
+ #include "third_party/abseil-cpp/absl/types/optional.h"
+ 
++#if !BUILDFLAG(IS_BSD)
+ using sandbox::syscall_broker::BrokerFilePermission;
+ using sandbox::syscall_broker::MakeBrokerCommandSet;
++#endif
+ 
+ namespace network {
+ 
++#if !BUILDFLAG(IS_BSD)
+ sandbox::syscall_broker::BrokerCommandSet GetNetworkBrokerCommandSet() {
+   return MakeBrokerCommandSet({
+       sandbox::syscall_broker::COMMAND_ACCESS,
+@@ -102,9 +105,11 @@ void LoadNetworkLibraries() {
+   }
+ }
+ #endif  // BUILDFLAG(IS_CHROMEOS)
++#endif
+ 
+ bool NetworkPreSandboxHook(std::vector<std::string> network_context_parent_dirs,
+                            sandbox::policy::SandboxLinux::Options options) {
++#if !BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_CHROMEOS)
+   LoadNetworkLibraries();
+ #endif
+@@ -117,6 +122,7 @@ bool NetworkPreSandboxHook(std::vector<s
+       GetNetworkBrokerCommandSet(),
+       GetNetworkFilePermissions(std::move(network_context_parent_dirs)),
+       sandbox::policy::SandboxLinux::PreSandboxHook(), options);
++#endif
+ 
+   return true;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h
new file mode 100644
index 0000000000..7527a326cd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/network/network_sandbox_hook_linux.h
+@@ -6,7 +6,11 @@
+ #define SERVICES_NETWORK_NETWORK_SANDBOX_HOOK_LINUX_H_
+ 
+ #include "base/component_export.h"
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#include "sandbox/policy/sandbox.h"
++#else
+ #include "sandbox/policy/linux/sandbox_linux.h"
++#endif
+ 
+ namespace network {
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__service.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__service.cc
new file mode 100644
index 0000000000..781dcc2fc2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__service.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/network_service.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/network/network_service.cc
+@@ -99,7 +99,7 @@
+ #include "third_party/boringssl/src/include/openssl/cpu.h"
+ #endif
+ 
+-#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || \
++#if ((BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)) || \
+     BUILDFLAG(IS_CHROMEOS_LACROS)
+ 
+ #include "components/os_crypt/sync/key_storage_config_linux.h"
+@@ -977,7 +977,7 @@ void NetworkService::SetExplicitlyAllowe
+   net::SetExplicitlyAllowedPorts(ports);
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void NetworkService::SetGssapiLibraryLoadObserver(
+     mojo::PendingRemote<mojom::GssapiLibraryLoadObserver>
+         gssapi_library_load_observer) {
+@@ -1059,7 +1059,7 @@ NetworkService::CreateHttpAuthHandlerFac
+   );
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void NetworkService::OnBeforeGssapiLibraryLoad() {
+   if (gssapi_library_load_observer_.is_bound()) {
+     gssapi_library_load_observer_->OnBeforeGssapiLibraryLoad();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__service.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__service.h
new file mode 100644
index 0000000000..81f016042b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_network__service.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/network_service.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/network/network_service.h
+@@ -221,7 +221,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) 
+       mojo::PendingReceiver<mojom::NetworkServiceTest> receiver) override;
+   void SetFirstPartySets(net::GlobalFirstPartySets sets) override;
+   void SetExplicitlyAllowedPorts(const std::vector<uint16_t>& ports) override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void SetGssapiLibraryLoadObserver(
+       mojo::PendingRemote<mojom::GssapiLibraryLoadObserver>
+           gssapi_library_load_observer) override;
+@@ -247,7 +247,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) 
+   std::unique_ptr<net::HttpAuthHandlerFactory> CreateHttpAuthHandlerFactory(
+       NetworkContext* network_context);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // This is called just before a GSSAPI library may be loaded.
+   void OnBeforeGssapiLibraryLoad();
+ #endif  // BUILDFLAG(IS_LINUX)
+@@ -477,7 +477,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) 
+   // leaking stale listeners between tests.
+   std::unique_ptr<net::NetworkChangeNotifier> mock_network_change_notifier_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   mojo::Remote<mojom::GssapiLibraryLoadObserver> gssapi_library_load_observer_;
+ #endif  // BUILDFLAG(IS_LINUX)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_cpp_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_cpp_BUILD.gn
new file mode 100644
index 0000000000..01690920f1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_cpp_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/public/cpp/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/network/public/cpp/BUILD.gn
+@@ -494,7 +494,7 @@ jumbo_component("cpp_base") {
+     sources += [ "transferable_directory_fuchsia.cc" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     sources += [
+       "network_interface_change_listener_mojom_traits.cc",
+       "network_interface_change_listener_mojom_traits.h",
+@@ -611,7 +611,7 @@ source_set("tests") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     sources += [ "network_interface_change_listener_mojom_traits_unittest.cc" ]
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_cpp_features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_cpp_features.cc
new file mode 100644
index 0000000000..b1c525ab03
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_cpp_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/public/cpp/features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/network/public/cpp/features.cc
+@@ -96,7 +96,7 @@ BASE_FEATURE(kSplitAuthCacheByNetworkIso
+ 
+ // Enable usage of hardcoded DoH upgrade mapping for use in automatic mode.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kDnsOverHttpsUpgrade,
+              "DnsOverHttpsUpgrade",
+              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_mojom_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_mojom_BUILD.gn
new file mode 100644
index 0000000000..2529bb8cf9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_public_mojom_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/public/mojom/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/network/public/mojom/BUILD.gn
+@@ -522,11 +522,11 @@ mojom("url_loader_base") {
+   }
+ 
+   enabled_features = []
+-  if (is_android || is_chromeos || is_linux) {
++  if (!is_bsd && (is_android || is_chromeos || is_linux)) {
+     enabled_features += [ "network_change_notifier_in_browser" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does
+     # not include lacros.
+     enabled_features += [ "use_network_interface_change_listener" ]
+@@ -1443,7 +1443,7 @@ mojom("mojom") {
+     }
+   }
+ 
+-  if (is_linux) {
++  if (is_linux && !is_bsd) {
+     # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does
+     # not include lacros.
+     enabled_features += [ "use_network_interface_change_listener" ]
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_shared__dictionary_shared__dictionary__writer__in__memory.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_shared__dictionary_shared__dictionary__writer__in__memory.h
new file mode 100644
index 0000000000..bf5776400e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_network_shared__dictionary_shared__dictionary__writer__in__memory.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/network/shared_dictionary/shared_dictionary_writer_in_memory.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/network/shared_dictionary/shared_dictionary_writer_in_memory.h
+@@ -9,6 +9,8 @@
+ #include <string>
+ #include <vector>
+ 
++#include <vector>
++
+ #include "base/component_export.h"
+ #include "base/functional/callback.h"
+ #include "crypto/secure_hash.h"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_on__device__model_on__device__model__service.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_on__device__model_on__device__model__service.h
new file mode 100644
index 0000000000..14e8f319c0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_on__device__model_on__device__model__service.h
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/on_device_model/on_device_model_service.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/on_device_model/on_device_model_service.h
+@@ -18,6 +18,10 @@
+ #include "sandbox/policy/linux/sandbox_linux.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include "sandbox/policy/sandbox.h"
++#endif
++
+ namespace on_device_model {
+ 
+ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelService
+@@ -27,7 +31,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) 
+   // These are defined separately in pre_sandbox_init.cc for explicit security
+   // review coverage.
+   [[nodiscard]] static bool PreSandboxInit();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static void AddSandboxLinuxOptions(
+       sandbox::policy::SandboxLinux::Options& options);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_on__device__model_pre__sandbox__init.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_on__device__model_pre__sandbox__init.cc
new file mode 100644
index 0000000000..052895dc65
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_on__device__model_pre__sandbox__init.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/on_device_model/pre_sandbox_init.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/on_device_model/pre_sandbox_init.cc
+@@ -14,7 +14,7 @@
+ #include "services/on_device_model/ml/chrome_ml.h"  // nogncheck
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "gpu/config/gpu_info_collector.h"                    // nogncheck
+ #include "third_party/dawn/include/dawn/dawn_proc.h"          // nogncheck
+ #include "third_party/dawn/include/dawn/native/DawnNative.h"  // nogncheck
+@@ -25,7 +25,7 @@ namespace on_device_model {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ constexpr uint32_t kVendorIdAMD = 0x1002;
+ constexpr uint32_t kVendorIdIntel = 0x8086;
+ constexpr uint32_t kVendorIdNVIDIA = 0x10DE;
+@@ -74,7 +74,7 @@ bool OnDeviceModelService::PreSandboxIni
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Warm any relevant drivers before attempting to bring up the sandbox. For
+   // good measure we initialize a device instance for any adapter with an
+   // appropriate backend on top of any integrated or discrete GPU.
+@@ -101,7 +101,7 @@ bool OnDeviceModelService::PreSandboxIni
+   return true;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ void OnDeviceModelService::AddSandboxLinuxOptions(
+     sandbox::policy::SandboxLinux::Options& options) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc
new file mode 100644
index 0000000000..70f0e5d5f6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
+@@ -54,7 +54,7 @@ uint32_t CalculatePrivateFootprintKb(con
+                                      uint32_t shared_resident_kb) {
+   DCHECK(os_dump.platform_private_footprint);
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   uint64_t rss_anon_bytes = os_dump.platform_private_footprint->rss_anon_bytes;
+   uint64_t vm_swap_bytes = os_dump.platform_private_footprint->vm_swap_bytes;
+   return (rss_anon_bytes + vm_swap_bytes) / 1024;
+@@ -83,7 +83,7 @@ memory_instrumentation::mojom::OSMemDump
+   os_dump->is_peak_rss_resettable = internal_os_dump.is_peak_rss_resettable;
+   os_dump->private_footprint_kb =
+       CalculatePrivateFootprintKb(internal_os_dump, shared_resident_kb);
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   os_dump->private_footprint_swap_kb =
+       internal_os_dump.platform_private_footprint->vm_swap_bytes / 1024;
+ #endif
+@@ -219,7 +219,7 @@ void QueuedRequestDispatcher::SetUpAndDi
+ 
+ // On most platforms each process can dump data about their own process
+ // so ask each process to do so Linux is special see below.
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+     request->pending_responses.insert({client_info.pid, ResponseType::kOSDump});
+     client->RequestOSMemoryDump(request->memory_map_option(),
+                                 {base::kNullProcessId},
+@@ -234,7 +234,7 @@ void QueuedRequestDispatcher::SetUpAndDi
+ 
+ // In some cases, OS stats can only be dumped from a privileged process to
+ // get around to sandboxing/selinux restrictions (see crbug.com/461788).
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::vector<base::ProcessId> pids;
+   mojom::ClientProcess* browser_client = nullptr;
+   base::ProcessId browser_client_pid = base::kNullProcessId;
+@@ -280,7 +280,7 @@ void QueuedRequestDispatcher::SetUpAndDi
+     const OsCallback& os_callback) {
+ // On Linux, OS stats can only be dumped from a privileged process to
+ // get around to sandboxing/selinux restrictions (see crbug.com/461788).
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojom::ClientProcess* browser_client = nullptr;
+   base::ProcessId browser_client_pid = 0;
+   for (const auto& client_info : clients) {
+@@ -330,7 +330,7 @@ QueuedRequestDispatcher::FinalizeVmRegio
+     // each client process provides 1 OS dump, % the case where the client is
+     // disconnected mid dump.
+     OSMemDumpMap& extra_os_dumps = response.second.os_dumps;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     for (auto& kv : extra_os_dumps) {
+       auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first;
+       DCHECK(results.find(pid) == results.end());
+@@ -391,7 +391,7 @@ void QueuedRequestDispatcher::Finalize(Q
+     // crash). In the latter case (OS_LINUX) we expect the full map to come
+     // from the browser process response.
+     OSMemDumpMap& extra_os_dumps = response.second.os_dumps;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     for (const auto& kv : extra_os_dumps) {
+       auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first;
+       DCHECK_EQ(pid_to_os_dump[pid], nullptr);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn
new file mode 100644
index 0000000000..33d9b53ec4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_BUILD.gn
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn
+@@ -29,10 +29,14 @@ component("memory_instrumentation") {
+     sources += [ "os_metrics_win.cc" ]
+   }
+ 
+-  if (is_android || is_linux || is_chromeos) {
++  if ((is_android || is_linux || is_chromeos) && !is_bsd) {
+     sources += [ "os_metrics_linux.cc" ]
+   }
+ 
++  if (is_bsd) {
++    sources += [ "os_metrics_bsd.cc" ]
++  }
++
+   if (is_fuchsia) {
+     sources += [ "os_metrics_fuchsia.cc" ]
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h
new file mode 100644
index 0000000000..9774ad0a1d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h
+@@ -53,7 +53,7 @@ class COMPONENT_EXPORT(
+                                     mojom::RawOSMemDump*);
+   static std::vector<mojom::VmRegionPtr> GetProcessMemoryMaps(base::ProcessId);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   static void SetProcSmapsForTesting(FILE*);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+         // BUILDFLAG(IS_ANDROID)
+@@ -70,7 +70,7 @@ class COMPONENT_EXPORT(
+   static std::vector<mojom::VmRegionPtr> GetProcessModules(base::ProcessId);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+   // Provides information on the dump state of resident pages. These values are
+   // written to logs. New enum values can be added, but existing enums must
+   // never be renumbered or deleted and reused.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc
new file mode 100644
index 0000000000..44412cb078
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__bsd.cc
@@ -0,0 +1,75 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_bsd.cc.orig	2024-12-21 10:25:10.608586521 +0000
++++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_bsd.cc
+@@ -0,0 +1,66 @@
++// Copyright 2022 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 "services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h"
++
++#include "base/memory/page_size.h"
++#include "base/process/process.h"
++#include "base/process/process_handle.h"
++
++#include <sys/sysctl.h>
++
++#include <vector>
++
++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_NETBSD)
++#define vm_rssize info.p_vm_rssize
++#elif BUILDFLAG(IS_FREEBSD)
++#include <sys/user.h>
++#define vm_rssize info.ki_rssize
++#endif
++
++namespace memory_instrumentation {
++
++// static
++bool OSMetrics::FillOSMemoryDump(base::ProcessId pid,
++                                 mojom::RawOSMemDump* dump) {
++  base::Process process = pid == base::kNullProcessId
++                              ? base::Process::Current()
++                              : base::Process::Open(pid);
++  const size_t kPageSize = base::GetPageSize();
++#if BUILDFLAG(IS_NETBSD)
++  struct kinfo_proc2 info;
++  size_t length = sizeof(struct kinfo_proc2);
++#else
++  struct kinfo_proc info;
++  size_t length = sizeof(struct kinfo_proc);
++#endif
++#if BUILDFLAG(IS_OPENBSD)
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process.Handle(),
++                static_cast<int>(length), 1 };
++#elif BUILDFLAG(IS_FREEBSD)
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process.Handle() };
++#elif BUILDFLAG(IS_NETBSD)
++  int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, process.Handle(),
++                sizeof(struct kinfo_proc2), 1 };
++#endif
++
++  if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0)
++    return false;
++
++  dump->resident_set_kb = (vm_rssize * kPageSize) / 1024;
++  dump->platform_private_footprint->rss_anon_bytes =
++      vm_rssize * kPageSize;
++  dump->platform_private_footprint->vm_swap_bytes = 0;
++
++  return true;
++}
++
++// static
++std::vector<mojom::VmRegionPtr> OSMetrics::GetProcessMemoryMaps(
++    base::ProcessId) {
++  NOTIMPLEMENTED();
++  return std::vector<mojom::VmRegionPtr>();
++}
++
++}  // namespace memory_instrumentation
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_service__manager_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_service__manager_BUILD.gn
new file mode 100644
index 0000000000..a9f58f571e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_service__manager_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/service_manager/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/service_manager/BUILD.gn
+@@ -66,7 +66,7 @@ source_set("service_manager") {
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     deps += [ "//sandbox/linux:sandbox_services" ]
+   }
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn
new file mode 100644
index 0000000000..b45fd8a2ed
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_service__manager_public_cpp_service__executable_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/service_manager/public/cpp/service_executable/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/service_manager/public/cpp/service_executable/BUILD.gn
+@@ -22,7 +22,7 @@ source_set("support") {
+     "//services/service_manager/public/mojom",
+   ]
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     deps += [
+       "//sandbox/linux:sandbox",
+       "//sandbox/linux:sandbox_services",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc
new file mode 100644
index 0000000000..0511b582b6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_tracing_public_cpp_stack__sampling_tracing__sampler__profiler.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc
+@@ -38,7 +38,7 @@
+ #include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h"
+ #include "third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h"
+ 
+-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
+ #include "base/profiler/thread_delegate_posix.h"
+ #define INITIALIZE_THREAD_DELEGATE_POSIX 1
+ #else  // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_APPLE)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_public_mojom_video__capture__service.mojom b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_public_mojom_video__capture__service.mojom
new file mode 100644
index 0000000000..2f8448d63d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_public_mojom_video__capture__service.mojom
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/video_capture/public/mojom/video_capture_service.mojom.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/services/video_capture/public/mojom/video_capture_service.mojom
+@@ -25,10 +25,10 @@ interface AcceleratorFactory {
+       pending_receiver<chromeos_camera.mojom.MjpegDecodeAccelerator> jda);
+ };
+ 
+-[EnableIf=is_fuchsia]
++[EnableIf=is_openbsd]
+ const sandbox.mojom.Sandbox kVideoCaptureSandbox
+   = sandbox.mojom.Sandbox.kVideoCapture;
+-[EnableIfNot=is_fuchsia]
++[EnableIfNot=is_openbsd]
+ const sandbox.mojom.Sandbox kVideoCaptureSandbox
+   = sandbox.mojom.Sandbox.kNoSandbox;
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.cc
new file mode 100644
index 0000000000..c0b268da98
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/video_capture/video_capture_service_impl.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/video_capture/video_capture_service_impl.cc
+@@ -41,7 +41,7 @@
+ #include "services/video_capture/lacros/device_factory_adapter_lacros.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS_LACROS)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #include "media/capture/capture_switches.h"
+ #include "media/capture/video/video_capture_gpu_channel_host.h"
+ #include "services/viz/public/cpp/gpu/context_provider_command_buffer.h"
+@@ -109,7 +109,7 @@ class VideoCaptureServiceImpl::GpuDepend
+       this};
+ };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ // Intended usage of this class is to create viz::Gpu in utility process and
+ // connect to viz::GpuClient of browser process, which will call to Gpu service.
+ // Also, this class holds the viz::ContextProvider to listen and monitor Gpu
+@@ -306,7 +306,7 @@ void VideoCaptureServiceImpl::LazyInitia
+   if (!gpu_dependencies_context_)
+     gpu_dependencies_context_ = std::make_unique<GpuDependenciesContext>();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+   {
+ #else
+@@ -421,7 +421,7 @@ void VideoCaptureServiceImpl::OnGpuInfoU
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ void VideoCaptureServiceImpl::SetVizGpu(std::unique_ptr<viz::Gpu> viz_gpu) {
+   viz_gpu_ = std::move(viz_gpu);
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.h
new file mode 100644
index 0000000000..73b9039dcb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_services_video__capture_video__capture__service__impl.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/services/video_capture/video_capture_service_impl.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/services/video_capture/video_capture_service_impl.h
+@@ -26,7 +26,7 @@
+ #include "services/video_capture/ash/video_capture_device_factory_ash.h"
+ #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ #include "services/viz/public/cpp/gpu/gpu.h"
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
+         // BUILDFLAG(IS_CHROMEOS_ASH)
+@@ -70,7 +70,7 @@ class VideoCaptureServiceImpl : public m
+ #if BUILDFLAG(IS_WIN)
+   void OnGpuInfoUpdate(const CHROME_LUID& luid) override;
+ #endif
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+   void SetVizGpu(std::unique_ptr<viz::Gpu> viz_gpu);
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ||
+         // BUILDFLAG(IS_CHROMEOS_ASH)
+@@ -107,7 +107,7 @@ class VideoCaptureServiceImpl : public m
+       factory_receivers_ash_;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+   class VizGpuContextProvider;
+   std::unique_ptr<VizGpuContextProvider> viz_gpu_context_provider_;
+   std::unique_ptr<viz::Gpu> viz_gpu_;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp
new file mode 100644
index 0000000000..358fd74073
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp
+@@ -86,7 +86,7 @@ static void* malloc_nothrow(size_t size)
+   // TODO(b.kelemen): we should always use UncheckedMalloc but currently it
+   // doesn't work as intended everywhere.
+   void* result;
+-#if BUILDFLAG(IS_IOS)
++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+   result = malloc(size);
+ #else
+   // It's the responsibility of the caller to check the return value.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_font__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_font__utils.cc
new file mode 100644
index 0000000000..0d82f5ddee
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_font__utils.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/skia/ext/font_utils.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/skia/ext/font_utils.cc
+@@ -19,7 +19,7 @@
+ #include "third_party/skia/include/ports/SkFontMgr_mac_ct.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "third_party/skia/include/ports/SkFontConfigInterface.h"
+ #include "third_party/skia/include/ports/SkFontMgr_FontConfigInterface.h"
+ #endif
+@@ -60,7 +60,7 @@ static sk_sp<SkFontMgr> fontmgr_factory(
+   return SkFontMgr_New_Android(nullptr);
+ #elif BUILDFLAG(IS_APPLE)
+   return SkFontMgr_New_CoreText(nullptr);
+-#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal());
+   return fci ? SkFontMgr_New_FCI(std::move(fci)) : nullptr;
+ #elif BUILDFLAG(IS_FUCHSIA)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_platform__canvas.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_platform__canvas.h
new file mode 100644
index 0000000000..0fa35621a5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_platform__canvas.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/skia/ext/platform_canvas.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/skia/ext/platform_canvas.h
+@@ -58,7 +58,7 @@ SK_API HDC GetNativeDrawingContext(SkCan
+ 
+ #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
+     defined(__sun) || defined(ANDROID) || defined(__APPLE__) ||             \
+-    defined(__Fuchsia__)
++    defined(__Fuchsia__) || defined(__NetBSD__)
+ // Construct a canvas from the given memory region. The memory is not cleared
+ // first. @data must be, at least, @height * StrideForWidth(@width) bytes.
+ SK_API std::unique_ptr<SkCanvas> CreatePlatformCanvasWithPixels(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h
new file mode 100644
index 0000000000..bdfc9b98de
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_config.h
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/config.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/abseil-cpp/absl/base/config.h
+@@ -412,7 +412,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMES
+ #ifdef ABSL_HAVE_SCHED_YIELD
+ #error ABSL_HAVE_SCHED_YIELD cannot be directly set
+ #elif defined(__linux__) || defined(__ros__) || defined(__native_client__) || \
+-    defined(__VXWORKS__)
++    defined(__VXWORKS__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+ #define ABSL_HAVE_SCHED_YIELD 1
+ #endif
+ 
+@@ -427,7 +427,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMES
+ // platforms.
+ #ifdef ABSL_HAVE_SEMAPHORE_H
+ #error ABSL_HAVE_SEMAPHORE_H cannot be directly set
+-#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__)
++#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) || \
++    defined(__OpenBSD__) || defined(__FreeBSD__)
+ #define ABSL_HAVE_SEMAPHORE_H 1
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc
new file mode 100644
index 0000000000..166b332a6b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_raw__logging.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/raw_logging.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/raw_logging.cc
+@@ -44,7 +44,7 @@
+ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
+     defined(__hexagon__) || defined(__Fuchsia__) ||                     \
+     defined(__native_client__) || defined(__OpenBSD__) ||               \
+-    defined(__EMSCRIPTEN__) || defined(__ASYLO__)
++    defined(__EMSCRIPTEN__) || defined(__ASYLO__) || defined(__NetBSD__)
+ 
+ #include <unistd.h>
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc
new file mode 100644
index 0000000000..4426a3cb41
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_base_internal_sysinfo.cc
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/abseil-cpp/absl/base/internal/sysinfo.cc
+@@ -30,7 +30,7 @@
+ #include <sys/syscall.h>
+ #endif
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ #include <sys/sysctl.h>
+ #endif
+ 
+@@ -194,6 +194,7 @@ static double GetNominalCPUFrequency() {
+ 
+ #else
+ 
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
+ // Helper function for reading a long from a file. Returns true if successful
+ // and the memory location pointed to by value is set to the value read.
+ static bool ReadLongFromFile(const char *file, long *value) {
+@@ -226,6 +227,7 @@ static bool ReadLongFromFile(const char 
+   }
+   return ret;
+ }
++#endif
+ 
+ #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY)
+ 
+@@ -325,9 +327,11 @@ static double GetNominalCPUFrequency() {
+   // a new mode (turbo mode). Essentially, those frequencies cannot
+   // always be relied upon. The same reasons apply to /proc/cpuinfo as
+   // well.
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation
+   if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/tsc_freq_khz", &freq)) {
+     return freq * 1e3;  // Value is kHz.
+   }
++#endif
+ 
+ #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY)
+   // On these platforms, the TSC frequency is the nominal CPU
+@@ -346,10 +350,12 @@ static double GetNominalCPUFrequency() {
+   // If CPU scaling is in effect, we want to use the *maximum*
+   // frequency, not whatever CPU speed some random processor happens
+   // to be using now.
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation
+   if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq",
+                        &freq)) {
+     return freq * 1e3;  // Value is kHz.
+   }
++#endif
+ 
+   return 1.0;
+ #endif  // !ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h
new file mode 100644
index 0000000000..39d2728015
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_debugging_internal_elf__mem__image.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h
+@@ -35,7 +35,8 @@
+ #if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \
+     !defined(__native_client__) && !defined(__asmjs__) &&             \
+     !defined(__wasm__) && !defined(__HAIKU__) && !defined(__sun) &&   \
+-    !defined(__VXWORKS__) && !defined(__hexagon__)
++    !defined(__VXWORKS__) && !defined(__hexagon__) && !defined(__FreeBSD__) && \
++    !defined(__NetBSD__)
+ #define ABSL_HAVE_ELF_MEM_IMAGE 1
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc
new file mode 100644
index 0000000000..6b0bd7b2ac
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc
+@@ -19,7 +19,8 @@
+ #endif
+ 
+ #if defined(HAS_STRPTIME) && HAS_STRPTIME
+-#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
++#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \
++    !defined(__NetBSD__)
+ #define _XOPEN_SOURCE 500  // Exposes definitions for SUSv2 (UNIX 98).
+ #endif
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn
new file mode 100644
index 0000000000..75649b861d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/BUILD.gn
+@@ -354,7 +354,6 @@ config("extra_warnings") {
+       "-Wtautological-type-limit-compare",
+       "-Wundefined-reinterpret-cast",
+       "-Wunneeded-internal-declaration",
+-      "-Wunused-but-set-variable",
+       "-Wsuggest-destructor-override",
+       "-Wsuggest-override",
+ 
+@@ -531,7 +530,7 @@ template("angle_common_lib") {
+       all_dependent_configs = [ ":angle_disable_pool_alloc" ]
+     }
+ 
+-    if (is_linux || is_chromeos) {
++    if ((is_linux || is_chromeos) && !is_bsd) {
+       libs = [ "dl" ]
+     }
+ 
+@@ -686,6 +685,9 @@ angle_static_library("angle_gpu_info_uti
+         "Xi",
+         "Xext",
+       ]
++      if (is_bsd) {
++        libs += [ "GL" ]
++      }
+     }
+ 
+     if (angle_use_wayland && angle_has_build) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_platform.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_platform.h
new file mode 100644
index 0000000000..f61fe7b7ab
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_platform.h
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/common/platform.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/common/platform.h
+@@ -26,8 +26,19 @@
+ #elif defined(__linux__) || defined(EMSCRIPTEN)
+ #    define ANGLE_PLATFORM_LINUX 1
+ #    define ANGLE_PLATFORM_POSIX 1
+-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) ||              \
+-    defined(__DragonFly__) || defined(__sun) || defined(__GLIBC__) || defined(__GNU__) || \
++#elif defined(__OpenBSD__)
++#    define ANGLE_PLATFORM_OPENBSD 1
++#    define ANGLE_PLATFORM_POSIX 1
++#    define ANGLE_PLATFORM_BSD 1
++#elif defined(__NetBSD__)
++#    define ANGLE_PLATFORM_NETBSD 1
++#    define ANGLE_PLATFORM_POSIX 1
++#    define ANGLE_PLATFORM_BSD 1
++#elif defined(__FreeBSD__)
++#    define ANGLE_PLATFORM_FREEBSD 1
++#    define ANGLE_PLATFORM_POSIX 1
++#    define ANGLE_PLATFORM_BSD 1
++#elif defined(__DragonFly__) || defined(__sun) || defined(__GLIBC__) || defined(__GNU__) || \
+     defined(__QNX__) || defined(__Fuchsia__) || defined(__HAIKU__)
+ #    define ANGLE_PLATFORM_POSIX 1
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_platform__helpers.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_platform__helpers.h
new file mode 100644
index 0000000000..c893e47e54
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_platform__helpers.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/common/platform_helpers.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/common/platform_helpers.h
+@@ -62,7 +62,7 @@ inline constexpr bool IsIOS()
+ 
+ inline constexpr bool IsLinux()
+ {
+-#if defined(ANGLE_PLATFORM_LINUX)
++#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+     return true;
+ #else
+     return false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils.cpp
new file mode 100644
index 0000000000..4526652f95
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/common/system_utils.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/common/system_utils.cpp
+@@ -25,7 +25,7 @@ namespace angle
+ {
+ std::string GetExecutableName()
+ {
+-#if defined(ANGLE_PLATFORM_ANDROID) && __ANDROID_API__ >= 21
++#if (defined(ANGLE_PLATFORM_ANDROID) && __ANDROID_API__ >= 21) || defined(ANGLE_PLATFORM_BSD)
+     // Support for "getprogname" function in bionic was introduced in L (API level 21)
+     const char *executableName = getprogname();
+     return (executableName) ? std::string(executableName) : "ANGLE";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils__linux.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils__linux.cpp
new file mode 100644
index 0000000000..562db45506
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_common_system__utils__linux.cpp
@@ -0,0 +1,45 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/common/system_utils_linux.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/common/system_utils_linux.cpp
+@@ -15,8 +15,15 @@
+ 
+ #include <array>
+ 
++#if ANGLE_PLATFORM_OPENBSD
++#include <pthread_np.h>
++#elif ANGLE_PLATFORM_NETBSD
++#include <pthread.h>
++#endif
++
+ namespace angle
+ {
++#if ANGLE_PLATFORM_LINUX
+ std::string GetExecutablePath()
+ {
+     // We cannot use lstat to get the size of /proc/self/exe as it always returns 0
+@@ -32,6 +39,7 @@ std::string GetExecutablePath()
+     path[result] = '\0';
+     return path;
+ }
++#endif
+ 
+ std::string GetExecutableDirectory()
+ {
+@@ -56,6 +64,12 @@ void SetCurrentThreadName(const char *na
+ {
+     // There's a 15-character (16 including '\0') limit.  If the name is too big (and ERANGE is
+     // returned), just ignore the name.
++#if ANGLE_PLATFORM_OPENBSD
++    pthread_set_name_np(pthread_self(), name);
++#elif ANGLE_PLATFORM_NETBSD
++    pthread_setname_np(pthread_self(), "%s", (void *)name);
++#else
+     pthread_setname_np(pthread_self(), name);
++#endif
+ }
+ }  // namespace angle
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_compiler_translator_SymbolTable__ESSL__autogen.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_compiler_translator_SymbolTable__ESSL__autogen.cpp
new file mode 100644
index 0000000000..869e70fbeb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_compiler_translator_SymbolTable__ESSL__autogen.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+otherwise isnan and isinf are macros on NetBSD that are applied and
+mess this up
+
+--- src/3rdparty/chromium/third_party/angle/src/compiler/translator/SymbolTable_ESSL_autogen.cpp.orig	2025-01-19 05:40:08.771794310 +0000
++++ src/3rdparty/chromium/third_party/angle/src/compiler/translator/SymbolTable_ESSL_autogen.cpp
+@@ -9,6 +9,7 @@
+ // SymbolTable_ESSL_autogen.cpp:
+ //   Compile-time initialized built-ins.
+ 
++#include <cmath>
+ #include "compiler/translator/SymbolTable.h"
+ 
+ #include "angle_gl.h"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h
new file mode 100644
index 0000000000..869ae7a1bc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_internal.h
+@@ -15,6 +15,13 @@
+ namespace angle
+ {
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++bool CollectMesaCardInfo(std::vector<GPUDeviceInfo> *devices);                
++#if defined(__FreeBSD__)
++bool GetPCIDevicesFreeBSD(std::vector<GPUDeviceInfo> *devices);
++#endif
++#endif
++
+ // Defined in SystemInfo_libpci when GPU_INFO_USE_LIBPCI is defined.
+ bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices);
+ // Defined in SystemInfo_x11 when GPU_INFO_USE_X11 is defined.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp
new file mode 100644
index 0000000000..ee99734f70
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp
@@ -0,0 +1,96 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp
+@@ -12,6 +12,11 @@
+ #include <pci/pci.h>
+ #include <unistd.h>
+ 
++#if defined(__FreeBSD__)
++#include <fcntl.h>
++#include <sys/pciio.h>
++#endif
++
+ #include "common/angleutils.h"
+ #include "common/debug.h"
+ 
+@@ -86,6 +91,75 @@ struct LibPCI : private angle::NonCopyab
+ 
+ }  // anonymous namespace
+ 
++#if defined(__FreeBSD__)
++// Adds an entry per PCI GPU found and fills the device and vendor ID.
++bool GetPCIDevicesFreeBSD(std::vector<GPUDeviceInfo> *devices)
++{
++    int fd;
++    struct pci_conf_io conf;
++    struct pci_conf *matches;
++    uint32_t offset = 0;
++
++    fd = open("/dev/pci", O_RDONLY);
++    if (fd < 0)
++        return false;
++
++    matches = new struct pci_conf[32];
++    conf.generation = 0;
++    do {
++        conf.pat_buf_len = 0;
++        conf.num_patterns = 0;
++        conf.patterns = NULL;
++        conf.match_buf_len = 32 * sizeof(struct pci_conf);
++        conf.num_matches = 32;
++        conf.matches = matches;
++        conf.offset = offset;
++        conf.status = PCI_GETCONF_ERROR;
++        if (ioctl(fd, PCIOCGETCONF, &conf) < 0) {
++            if (errno == ENODEV)
++                break;
++        }
++        /* PCI_GETCONF_LIST_CHANGED would require us to start over. */
++        if (conf.status == PCI_GETCONF_ERROR || conf.status == PCI_GETCONF_LIST_CHANGED) {
++            break;
++        }
++
++        for (unsigned int i = 0; i < conf.num_matches; i++) {
++            uint16_t device_class = (matches[i].pc_class << 8) |  matches[i].pc_subclass;
++
++            // Skip non-GPU devices
++            switch (device_class)
++            {
++                case PCI_CLASS_DISPLAY_VGA:
++                case PCI_CLASS_DISPLAY_XGA:
++                case PCI_CLASS_DISPLAY_3D:
++                    break;
++                default:
++                    continue;
++            }
++
++            // Skip unknown devices
++            if (matches[i].pc_vendor == 0 || matches[i].pc_device == 0) {
++                continue;
++            }
++
++            GPUDeviceInfo info;
++            info.vendorId = matches[i].pc_vendor;
++            info.deviceId = matches[i].pc_device;
++
++            devices->push_back(info);
++        }
++        offset += conf.num_matches;
++    } while (conf.status == PCI_GETCONF_MORE_DEVS);
++
++    delete[] matches;
++
++    close(fd);
++
++    return true;
++}
++#endif
++
+ // Adds an entry per PCI GPU found and fills the device and vendor ID.
+ bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices)
+ {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
new file mode 100644
index 0000000000..19c253bf44
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp
+@@ -71,6 +71,24 @@ bool GetPCIDevicesWithLibPCI(std::vector
+ 
+ bool GetSystemInfo(SystemInfo *info)
+ {
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++    if (!CollectMesaCardInfo(&(info->gpus)))
++    {
++#if defined(__FreeBSD__)
++        if (!GetPCIDevicesFreeBSD(&(info->gpus)))
++        {
++#endif
++#if defined(ANGLE_USE_VULKAN_SYSTEM_INFO)
++            // Try vulkan backend to get GPU info
++            return GetSystemInfoVulkan(info);
++#else
++            return false;
++#endif
++#if defined(__FreeBSD__)
++        }
++#endif
++    }
++#else
+     if (!GetPCIDevicesWithLibPCI(&(info->gpus)))
+     {
+ #if defined(ANGLE_USE_VULKAN_SYSTEM_INFO)
+@@ -85,6 +103,7 @@ bool GetSystemInfo(SystemInfo *info)
+     {
+         return false;
+     }
++#endif
+ 
+     GetDualGPUInfo(info);
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp
new file mode 100644
index 0000000000..3d101ae587
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp
@@ -0,0 +1,67 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp
+@@ -8,6 +8,10 @@
+ 
+ #include "gpu_info_util/SystemInfo_internal.h"
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#include <GL/glx.h>
++#include <GL/glxext.h>
++#endif
+ #include <X11/Xlib.h>
+ 
+ #include "common/debug.h"
+@@ -18,9 +22,47 @@
+ #    error SystemInfo_x11.cpp compiled without GPU_INFO_USE_X11
+ #endif
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#define GLX_RENDERER_VENDOR_ID_MESA	0x8183
++#define GLX_RENDERER_DEVICE_ID_MESA	0x8184
++#endif
++
+ namespace angle
+ {
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++bool CollectMesaCardInfo(std::vector<GPUDeviceInfo> *devices)
++{
++    unsigned int vid[3], did[3];
++
++    Display *display = XOpenDisplay(NULL);
++    if (!display) {
++        return false;
++    }
++
++    PFNGLXQUERYRENDERERINTEGERMESAPROC queryInteger =
++        (PFNGLXQUERYRENDERERINTEGERMESAPROC) glXGetProcAddressARB((const GLubyte *)
++        "glXQueryRendererIntegerMESA");
++
++    if (!queryInteger)
++        return false;
++
++    bool vendor_ret =
++        queryInteger(display, 0, 0, GLX_RENDERER_VENDOR_ID_MESA, vid);
++    bool device_ret =
++        queryInteger(display, 0, 0, GLX_RENDERER_DEVICE_ID_MESA, did);
++
++    if (vendor_ret && device_ret) {
++        GPUDeviceInfo info;
++        info.vendorId = vid[0];
++        info.deviceId = did[0];
++        devices->push_back(info);
++    }
++
++    return true;
++}
++#endif
++
+ bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version)
+ {
+     *version = "";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp
new file mode 100644
index 0000000000..99ccefbc5d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp
+@@ -60,7 +60,7 @@
+ #        include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
+ #    elif ANGLE_ENABLE_EAGL
+ #        include "libANGLE/renderer/gl/eagl/DisplayEAGL.h"
+-#    elif defined(ANGLE_PLATFORM_LINUX)
++#    elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+ #        include "libANGLE/renderer/gl/egl/DisplayEGL.h"
+ #        if defined(ANGLE_USE_X11)
+ #            include "libANGLE/renderer/gl/glx/DisplayGLX.h"
+@@ -408,7 +408,7 @@ rx::DisplayImpl *CreateDisplayFromAttrib
+             impl = new rx::DisplayEAGL(state);
+             break;
+ 
+-#    elif defined(ANGLE_PLATFORM_LINUX)
++#    elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+ #        if defined(ANGLE_USE_GBM)
+             if (platformType == 0)
+             {
+@@ -454,7 +454,7 @@ rx::DisplayImpl *CreateDisplayFromAttrib
+ #if defined(ANGLE_ENABLE_OPENGL)
+ #    if defined(ANGLE_PLATFORM_WINDOWS)
+             impl = new rx::DisplayWGL(state);
+-#    elif defined(ANGLE_PLATFORM_LINUX)
++#    elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+ #        if defined(ANGLE_USE_GBM)
+             if (platformType == 0)
+             {
+@@ -505,7 +505,7 @@ rx::DisplayImpl *CreateDisplayFromAttrib
+                 impl = rx::CreateVulkanWin32Display(state);
+             }
+             break;
+-#    elif defined(ANGLE_PLATFORM_LINUX)
++#    elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+ #        if defined(ANGLE_USE_GBM)
+             if (platformType == EGL_PLATFORM_GBM_KHR && rx::IsVulkanGbmDisplayAvailable())
+             {
+@@ -2089,7 +2089,7 @@ static ClientExtensions GenerateClientEx
+     extensions.platformWaylandEXT = true;
+ #endif
+ 
+-#if defined(ANGLE_PLATFORM_LINUX) && (defined(ANGLE_ENABLE_OPENGL) || defined(ANGLE_ENABLE_VULKAN))
++#if (defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)) && (defined(ANGLE_ENABLE_OPENGL) || defined(ANGLE_ENABLE_VULKAN))
+     extensions.platformSurfacelessMESA = true;
+ #endif
+ 
+@@ -2130,7 +2130,7 @@ static ClientExtensions GenerateClientEx
+     extensions.x11Visual = true;
+ #endif
+ 
+-#if defined(ANGLE_PLATFORM_LINUX)
++#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+     extensions.platformANGLEDeviceTypeEGLANGLE = true;
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp
new file mode 100644
index 0000000000..09d182a7e6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_formatutils.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/libANGLE/formatutils.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/libANGLE/formatutils.cpp
+@@ -1475,7 +1475,7 @@ static InternalFormatInfoMap BuildIntern
+     AddYUVFormat(&map,  GL_G8_B8R8_2PLANE_420_UNORM_ANGLE,            true,   8,   8,  8,   0,  0,  GL_G8_B8R8_2PLANE_420_UNORM_ANGLE,    GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>,          RequireExt<&Extensions::yuvInternalFormatANGLE>,          RequireExt<&Extensions::yuvInternalFormatANGLE>,          NeverSupported, NeverSupported);
+     AddYUVFormat(&map,  GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE,           true,   8,   8,  8,   0,  0,  GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE,   GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>,          RequireExt<&Extensions::yuvInternalFormatANGLE>,          RequireExt<&Extensions::yuvInternalFormatANGLE>,          NeverSupported, NeverSupported);
+ 
+-#if defined(ANGLE_PLATFORM_LINUX)
++#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD)
+     // From GL_OES_required_internalformat
+     // The |shared| bit shouldn't be 2. But given this hits assertion when bits
+     // are checked, it's fine to have this bit set as 2 as a workaround.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp
new file mode 100644
index 0000000000..8d49658f5d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_glx_FunctionsGLX.cpp
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/glx/FunctionsGLX.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/glx/FunctionsGLX.cpp
+@@ -144,10 +144,10 @@ bool FunctionsGLX::initialize(Display *x
+     // which a GLXWindow was ever created.
+     if (!sLibHandle)
+     {
+-        sLibHandle = dlopen("libGL.so.1", RTLD_NOW);
++        sLibHandle = dlopen("libGL.so", RTLD_NOW);
+         if (!sLibHandle)
+         {
+-            *errorString = std::string("Could not dlopen libGL.so.1: ") + dlerror();
++            *errorString = std::string("Could not dlopen libGL.so: ") + dlerror();
+             return false;
+         }
+     }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h
new file mode 100644
index 0000000000..8fade9e1eb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h
+@@ -23,7 +23,7 @@ bool IsVulkanWin32DisplayAvailable();
+ DisplayImpl *CreateVulkanWin32Display(const egl::DisplayState &state);
+ #endif  // defined(ANGLE_PLATFORM_WINDOWS)
+ 
+-#if defined(ANGLE_PLATFORM_LINUX)
++#if defined(ANGLE_PLATFORM_POSIX)
+ bool IsVulkanWaylandDisplayAvailable();
+ DisplayImpl *CreateVulkanWaylandDisplay(const egl::DisplayState &state);
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn
new file mode 100644
index 0000000000..216a39731a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_angle_util_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/angle/util/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/angle/util/BUILD.gn
+@@ -311,7 +311,7 @@ foreach(is_shared_library,
+     ]
+     libs = []
+ 
+-    if (is_linux || is_chromeos) {
++    if ((is_linux || is_chromeos) && !is_bsd) {
+       libs += [
+         "rt",
+         "dl",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc
new file mode 100644
index 0000000000..6ebb8d3118
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc
+@@ -68,7 +68,7 @@ bool StructTraits<blink::mojom::Renderer
+ 
+   out->send_subresource_notification = data.send_subresource_notification();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!data.ReadSystemFontFamilyName(&out->system_font_family_name))
+     return false;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h
new file mode 100644
index 0000000000..4fbb69cbae
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences.h
+@@ -65,7 +65,7 @@ struct BLINK_COMMON_EXPORT RendererPrefe
+   UserAgentOverride user_agent_override;
+   std::string accept_languages;
+   bool send_subresource_notification{false};
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   std::string system_font_family_name;
+ #endif
+ #if BUILDFLAG(IS_WIN)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h
new file mode 100644
index 0000000000..5e8fae947e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h
+@@ -166,7 +166,7 @@ struct BLINK_COMMON_EXPORT
+     return data.send_subresource_notification;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static const std::string& system_font_family_name(
+       const ::blink::RendererPreferences& data) {
+     return data.system_font_family_name;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h
new file mode 100644
index 0000000000..14e03b8775
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_platform_platform.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/public/platform/platform.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/public/platform/platform.h
+@@ -374,7 +374,7 @@ class BLINK_PLATFORM_EXPORT Platform {
+     return nullptr;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // This is called after the thread is created, so the embedder
+   // can initiate an IPC to change its thread type (on Linux we can't
+   // increase the nice value, so we need to ask the browser process). This
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_platform_web__vector.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_platform_web__vector.h
new file mode 100644
index 0000000000..8a663e4c52
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_public_platform_web__vector.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/public/platform/web_vector.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/public/platform/web_vector.h
+@@ -86,7 +86,7 @@ class WebVector {
+   // The vector can be populated using reserve() and emplace_back().
+   WebVector() = default;
+ 
+-#if defined(ARCH_CPU_64_BITS)
++#if defined(ARCH_CPU_64_BITS) || defined(__OpenBSD__)
+   // Create a vector with |size| default-constructed elements. We define
+   // a constructor with size_t otherwise we'd have a duplicate define.
+   explicit WebVector(size_t size) : data_(size) {}
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py
new file mode 100644
index 0000000000..0f6d3e6b14
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_bindings_scripts_bind__gen_style__format.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py
+@@ -28,7 +28,7 @@ def init(root_src_dir, enable_style_form
+     root_src_dir = os.path.abspath(root_src_dir)
+ 
+     # Determine //buildtools/<platform>/ directory
+-    if sys.platform.startswith("linux"):
++    if sys.platform.startswith(("linux","openbsd","freebsd","netbsd")):
+         platform = "linux64"
+         exe_suffix = ""
+     elif sys.platform.startswith("darwin"):
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_build_scripts_run__with__pythonpath.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_build_scripts_run__with__pythonpath.py
new file mode 100644
index 0000000000..9eaaded196
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_build_scripts_run__with__pythonpath.py
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/build/scripts/run_with_pythonpath.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/build/scripts/run_with_pythonpath.py
+@@ -22,6 +22,7 @@ def main():
+         existing_pp = (
+             os.pathsep + env['PYTHONPATH']) if 'PYTHONPATH' in env else ''
+         env['PYTHONPATH'] = os.pathsep.join(python_paths) + existing_pp
++    env['LD_LIBRARY_PATH'] = "${WRKSRC}/out/Release"
+     sys.exit(subprocess.call([sys.executable] + args, env=env))
+ 
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc
new file mode 100644
index 0000000000..59a9caaf60
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_blink__initializer.cc
@@ -0,0 +1,41 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/controller/blink_initializer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/controller/blink_initializer.cc
+@@ -81,12 +81,12 @@
+ #include "third_party/blink/renderer/controller/private_memory_footprint_provider.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h"
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/controller/highest_pmf_reporter.h"
+ #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h"
+ #endif
+@@ -255,7 +255,7 @@ void BlinkInitializer::RegisterInterface
+       main_thread_task_runner);
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   binders.Add<mojom::blink::MemoryUsageMonitorLinux>(
+       ConvertToBaseRepeatingCallback(
+           CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)),
+@@ -302,7 +302,7 @@ void BlinkInitializer::RegisterMemoryWat
+ #endif
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN)
++    BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   // Start reporting the highest private memory footprint after the first
+   // navigation.
+   HighestPmfReporter::Initialize(main_thread_task_runner);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc
new file mode 100644
index 0000000000..b8ebda02c4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.cc
+@@ -128,15 +128,17 @@ void MemoryUsageMonitorPosix::ResetFileD
+ 
+ void MemoryUsageMonitorPosix::SetProcFiles(base::File statm_file,
+                                            base::File status_file) {
++#if !BUILDFLAG(IS_BSD)
+   DCHECK(statm_file.IsValid());
+   DCHECK(status_file.IsValid());
+   DCHECK_EQ(-1, statm_fd_.get());
+   DCHECK_EQ(-1, status_fd_.get());
+   statm_fd_.reset(statm_file.TakePlatformFile());
+   status_fd_.reset(status_file.TakePlatformFile());
++#endif
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ void MemoryUsageMonitorPosix::Bind(
+     mojo::PendingReceiver<mojom::blink::MemoryUsageMonitorLinux> receiver) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h
new file mode 100644
index 0000000000..a0a1b0e35d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_controller_memory__usage__monitor__posix.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/controller/memory_usage_monitor_posix.h
+@@ -13,7 +13,7 @@
+ #include "third_party/blink/renderer/controller/controller_export.h"
+ #include "third_party/blink/renderer/controller/memory_usage_monitor.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/public/mojom/memory_usage_monitor_linux.mojom-blink.h"
+ #endif
+ 
+@@ -22,7 +22,7 @@ namespace blink {
+ // MemoryUsageMonitor implementation for Android and Linux.
+ class CONTROLLER_EXPORT MemoryUsageMonitorPosix
+     : public MemoryUsageMonitor
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     ,
+       public mojom::blink::MemoryUsageMonitorLinux
+ #endif
+@@ -30,7 +30,7 @@ class CONTROLLER_EXPORT MemoryUsageMonit
+  public:
+   MemoryUsageMonitorPosix() = default;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static void Bind(
+       mojo::PendingReceiver<mojom::blink::MemoryUsageMonitorLinux> receiver);
+ #endif
+@@ -48,7 +48,7 @@ class CONTROLLER_EXPORT MemoryUsageMonit
+                                               uint64_t* vm_size,
+                                               uint64_t* vm_hwm_size);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // mojom::MemoryUsageMonitorLinux implementations:
+   void SetProcFiles(base::File statm_file, base::File status_file) override;
+ #endif
+@@ -66,7 +66,7 @@ class CONTROLLER_EXPORT MemoryUsageMonit
+   base::ScopedFD statm_fd_;
+   base::ScopedFD status_fd_;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   mojo::Receiver<mojom::blink::MemoryUsageMonitorLinux> receiver_{this};
+ #endif
+ };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_css_properties_css__color__function__parser.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_css_properties_css__color__function__parser.cc
new file mode 100644
index 0000000000..98a38e3b33
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_css_properties_css__color__function__parser.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/css/properties/css_color_function_parser.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/css/properties/css_color_function_parser.cc
+@@ -312,7 +312,7 @@ bool ColorFunctionParser::ConsumeChannel
+ 
+     // Non-finite values should be clamped to the range [0, 360].
+     // Since 0 = 360 in this case, they can all simply become zero.
+-    if (!isfinite(channels_[i].value())) {
++    if (!std::isfinite(channels_[i].value())) {
+       channels_[i] = 0.0;
+     }
+ 
+@@ -408,7 +408,7 @@ bool ColorFunctionParser::MakePerColorSp
+         uses_bare_numbers = true;
+       }
+ 
+-      if (!isfinite(channels_[i].value())) {
++      if (!std::isfinite(channels_[i].value())) {
+         channels_[i].value() = channels_[i].value() > 0 ? 255.0 : 0;
+       } else if (!is_relative_color_) {
+         // Clamp to [0, 1] range, but allow out-of-gamut relative colors.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc
new file mode 100644
index 0000000000..51b678b6fd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/editing/editing_behavior.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/editing/editing_behavior.cc
+@@ -304,7 +304,7 @@ bool EditingBehavior::ShouldInsertCharac
+   // unexpected behaviour
+   if (ch < ' ')
+     return false;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // According to XKB map no keyboard combinations with ctrl key are mapped to
+   // printable characters, however we need the filter as the DomKey/text could
+   // contain printable characters.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_execution__context_navigator__base.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_execution__context_navigator__base.cc
new file mode 100644
index 0000000000..362bb8864f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_execution__context_navigator__base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/execution_context/navigator_base.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/execution_context/navigator_base.cc
+@@ -31,7 +31,7 @@ String GetReducedNavigatorPlatform() {
+   return "Win32";
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return "";
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return "Linux x86_64";
+ #elif BUILDFLAG(IS_IOS)
+   return "iPhone";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc
new file mode 100644
index 0000000000..63fd5c985f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_exported_web__view__impl.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/exported/web_view_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/exported/web_view_impl.cc
+@@ -428,7 +428,7 @@ SkFontHinting RendererPreferencesToSkiaH
+     const blink::RendererPreferences& prefs) {
+ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
+ // complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   if (!prefs.should_antialias_text) {
+     // When anti-aliasing is off, GTK maps all non-zero hinting settings to
+     // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight'
+@@ -3415,7 +3415,7 @@ void WebViewImpl::UpdateFontRenderingFro
+       renderer_preferences_.use_subpixel_positioning);
+ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
+ // complete.
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \
+     !BUILDFLAG(IS_ANDROID)
+   if (!renderer_preferences_.system_font_family_name.empty()) {
+     WebFontRenderStyle::SetSystemFontFamily(blink::WebString::FromUTF8(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc
new file mode 100644
index 0000000000..86b04ffb72
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_frame_web__frame__test.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/frame/web_frame_test.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/frame/web_frame_test.cc
+@@ -6474,7 +6474,7 @@ TEST_F(WebFrameTest, DISABLED_PositionFo
+ }
+ 
+ #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ // TODO(crbug.com/1090246): Fix these tests on Fuchsia and re-enable.
+ // TODO(crbug.com/1317375): Build these tests on all platforms.
+ #define MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved \
+@@ -6883,7 +6883,7 @@ TEST_F(CompositedSelectionBoundsTest, La
+ TEST_F(CompositedSelectionBoundsTest, LargeSelectionNoScroll) {
+   RunTest("composited_selection_bounds_large_selection_noscroll.html");
+ }
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if !BUILDFLAG(IS_ANDROID)
+ TEST_F(CompositedSelectionBoundsTest, Input) {
+   web_view_helper_.GetWebView()->GetSettings()->SetDefaultFontSize(16);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc
new file mode 100644
index 0000000000..7d6bd64bf5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
+@@ -55,7 +55,7 @@ constexpr base::TimeDelta kEncodeRowSlac
+ 
+ /* The value is based on user statistics on Nov 2017. */
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
+-     BUILDFLAG(IS_WIN))
++     BUILDFLAG(IS_WIN)) || BUILDFLAG(IS_BSD)
+ const double kIdleTaskStartTimeoutDelayMs = 1000.0;
+ #else
+ const double kIdleTaskStartTimeoutDelayMs = 4000.0;  // For ChromeOS, Mobile
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_track_vtt_vtt__cue__layout__algorithm.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_track_vtt_vtt__cue__layout__algorithm.cc
new file mode 100644
index 0000000000..8e4a637303
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_track_vtt_vtt__cue__layout__algorithm.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/html/track/vtt/vtt_cue_layout_algorithm.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/html/track/vtt/vtt_cue_layout_algorithm.cc
+@@ -72,7 +72,7 @@ void VttCueLayoutAlgorithm::Layout() {
+   // https://w3c.github.io/webvtt/#apply-webvtt-cue-settings
+   // 10. Adjust the positions of boxes according to the appropriate steps
+   // from the following list:
+-  if (isfinite(snap_to_lines_position_)) {
++  if (std::isfinite(snap_to_lines_position_)) {
+     // ↪ If cue’s WebVTT cue snap-to-lines flag is true
+     AdjustPositionWithSnapToLines();
+   } else {
+@@ -104,7 +104,7 @@ PhysicalSize VttCueLayoutAlgorithm::Firs
+ LayoutUnit VttCueLayoutAlgorithm::ComputeInitialPositionAdjustment(
+     LayoutUnit max_dimension,
+     const gfx::Rect& controls_rect) {
+-  DCHECK(isfinite(snap_to_lines_position_));
++  DCHECK(std::isfinite(snap_to_lines_position_));
+ 
+   // 4. Let line be cue's computed line.
+   // 5. Round line to an integer by adding 0.5 and then flooring it.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc
new file mode 100644
index 0000000000..b7c8d8b1d4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_inspector_inspector__memory__agent.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc
+@@ -192,7 +192,7 @@ InspectorMemoryAgent::GetSamplingProfile
+ 
+ Vector<String> InspectorMemoryAgent::Symbolize(
+     const WebVector<const void*>& addresses) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // TODO(alph): Move symbolization to the client.
+   Vector<const void*> addresses_to_symbolize;
+   for (const void* address : addresses) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc
new file mode 100644
index 0000000000..2eac124433
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_layout_layout__view.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/layout/layout_view.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/layout/layout_view.cc
+@@ -72,7 +72,7 @@
+ #include "ui/gfx/geometry/quad_f.h"
+ #include "ui/gfx/geometry/size_conversions.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/platform/fonts/font_cache.h"
+ #endif
+ 
+@@ -813,7 +813,7 @@ void LayoutView::UpdateLayout() {
+     intrinsic_logical_widths_ = LogicalWidth();
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_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
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc
new file mode 100644
index 0000000000..6b2b120a03
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_paint_paint__layer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/paint/paint_layer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/paint/paint_layer.cc
+@@ -120,7 +120,7 @@ namespace blink {
+ 
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ struct SameSizeAsPaintLayer : GarbageCollected<PaintLayer>, DisplayItemClient {
+   // The bit fields may fit into the machine word of DisplayItemClient which
+   // has only 8-bit data.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc
new file mode 100644
index 0000000000..0765c365de
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc
+@@ -150,7 +150,7 @@ bool ScrollbarThemeAura::SupportsDragSna
+ // is true for at least GTK and QT apps).
+ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
+ // complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   return false;
+ #else
+   return true;
+@@ -363,7 +363,7 @@ bool ScrollbarThemeAura::ShouldCenterOnT
+                                              const WebMouseEvent& event) {
+ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
+ // complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   if (event.button == WebPointerProperties::Button::kMiddle)
+     return true;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_miscellaneous__operations.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_miscellaneous__operations.cc
new file mode 100644
index 0000000000..4ceb0cc6f8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_miscellaneous__operations.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/streams/miscellaneous_operations.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/streams/miscellaneous_operations.cc
+@@ -504,7 +504,7 @@ CORE_EXPORT double ValidateAndNormalizeH
+   // https://streams.spec.whatwg.org/#validate-and-normalize-high-water-mark
+   // 2. If highWaterMark is NaN or highWaterMark < 0, throw a RangeError
+   //    exception.
+-  if (isnan(high_water_mark) || high_water_mark < 0) {
++  if (std::isnan(high_water_mark) || high_water_mark < 0) {
+     exception_state.ThrowRangeError(
+         "A queuing strategy's highWaterMark property must be a nonnegative, "
+         "non-NaN number");
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_queue__with__sizes.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_queue__with__sizes.cc
new file mode 100644
index 0000000000..62e7be47d6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_streams_queue__with__sizes.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/streams/queue_with_sizes.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/streams/queue_with_sizes.cc
+@@ -15,7 +15,7 @@ namespace {
+ 
+ // https://streams.spec.whatwg.org/#is-finite-non-negative-number
+ bool IsFiniteNonNegativeNumber(double v) {
+-  return isfinite(v) && v >= 0;
++  return std::isfinite(v) && v >= 0;
+ }
+ 
+ }  // namespace
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_style_style__crossfade__image.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_style_style__crossfade__image.cc
new file mode 100644
index 0000000000..b87f325b2c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_core_style_style__crossfade__image.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/blink/renderer/core/style/style_crossfade_image.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/core/style/style_crossfade_image.cc
+@@ -318,7 +318,7 @@ std::vector<float> StyleCrossfadeImage::
+   if (num_missing > 0) {
+     float equal_share = std::max(1.0f - sum, 0.0f) / num_missing;
+     for (float& weight : result) {
+-      if (isnan(weight)) {
++      if (std::isnan(weight)) {
+         weight = equal_share;
+       }
+     }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__device__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__device__factory.cc
new file mode 100644
index 0000000000..f054ae92a9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__device__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/modules/media/audio/audio_device_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/modules/media/audio/audio_device_factory.cc
+@@ -35,7 +35,7 @@ namespace {
+ AudioDeviceFactory* g_factory_override = nullptr;
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS_LACROS)
++    BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ // Due to driver deadlock issues on Windows (http://crbug/422522) there is a
+ // chance device authorization response is never received from the browser side.
+ // In this case we will time out, to avoid renderer hang forever waiting for
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc
new file mode 100644
index 0000000000..f1ac3ba786
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc
+@@ -874,7 +874,7 @@ TEST_F(AudioRendererMixerManagerTest, Mi
+             mixer->get_output_params_for_testing().sample_rate());
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // Use 10 ms buffer (441 frames per buffer).
+   EXPECT_EQ(output_sample_rate / 100,
+             mixer->get_output_params_for_testing().frames_per_buffer());
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni
new file mode 100644
index 0000000000..61209023eb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_ml_webnn_features.gni
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni
+@@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni"
+ declare_args() {
+   # This enables building WebNN with XNNPACK. Currently only available for
+   # Windows, macOS and Linux on x64, x86 and arm64.
+-  build_webnn_with_xnnpack = (is_linux || is_win || is_mac) &&
++  build_webnn_with_xnnpack = !is_bsd && (is_linux || is_win || is_mac) &&
+                              (current_cpu == "x64" || current_cpu == "x86" ||
+                               (current_cpu == "arm64" && !is_win))
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc
new file mode 100644
index 0000000000..9bf3fd5037
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc
+@@ -493,6 +493,7 @@ void RTCDataChannel::send(Blob* data, Ex
+   ThrowNoBlobSupportException(&exception_state);
+ }
+ 
++#undef close
+ void RTCDataChannel::close() {
+   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+   if (state_ == webrtc::DataChannelInterface::kClosing ||
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc
new file mode 100644
index 0000000000..f5111165ff
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc
+@@ -304,7 +304,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED
+   SetupRenderer(kDefaultOutputDeviceId);
+   renderer_proxy_->Start();
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   static const int kExpectedBufferSize = kHardwareSampleRate / 100;
+ #elif BUILDFLAG(IS_ANDROID)
+   static const int kExpectedBufferSize = 2 * kHardwareSampleRate / 100;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc
new file mode 100644
index 0000000000..f793140c46
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc
+@@ -469,7 +469,7 @@ class AudioWorkletThreadPriorityTest
+ 
+     // TODO(crbug.com/1022888): The worklet thread priority is always NORMAL
+     // on OS_LINUX and OS_CHROMEOS regardless of the thread priority setting.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     if (expected_priority == base::ThreadPriorityForTest::kRealtimeAudio ||
+         expected_priority == base::ThreadPriorityForTest::kDisplay) {
+       EXPECT_EQ(actual_priority, base::ThreadPriorityForTest::kNormal);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc
new file mode 100644
index 0000000000..3114f43bf0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
+@@ -6321,7 +6321,7 @@ void WebGLRenderingContextBase::TexImage
+   constexpr bool kAllowZeroCopyImages = true;
+ #endif
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // TODO(crbug.com/1175907): Only TexImage2D seems to work with the GPU path on
+   // Android M -- appears to work fine on R, but to avoid regressions in <video>
+   // limit to TexImage2D only for now. Fails conformance test on Nexus 5X:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc
new file mode 100644
index 0000000000..cd452a0097
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_modules_webgpu_gpu__queue.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/modules/webgpu/gpu_queue.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/modules/webgpu/gpu_queue.cc
+@@ -788,7 +788,7 @@ bool GPUQueue::CopyFromCanvasSourceImage
+ // on linux platform.
+ // TODO(crbug.com/1424119): using a webgpu mailbox texture on the OpenGLES
+ // backend is failing for unknown reasons.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   bool forceReadback = true;
+ #elif BUILDFLAG(IS_ANDROID)
+   // TODO(crbug.com/dawn/1969): Some Android devices don't fail to copy from
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn
new file mode 100644
index 0000000000..7443d5ef9e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/BUILD.gn
+@@ -2021,7 +2021,7 @@ static_library("test_support") {
+   ]
+ 
+   # fuzzed_data_provider may not work with a custom toolchain.
+-  if (custom_toolchain == "" && is_clang) {
++  if ((custom_toolchain == "" && is_clang) && !is_bsd) {
+     sources += [
+       "testing/fuzzed_data_provider.cc",
+       "testing/fuzzed_data_provider.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc
new file mode 100644
index 0000000000..fc0c0d879c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc
+@@ -81,7 +81,7 @@ extern const char kNotoColorEmojiCompat[
+ 
+ SkFontMgr* FontCache::static_font_manager_ = nullptr;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ float FontCache::device_scale_factor_ = 1.0;
+ #endif
+ 
+@@ -132,7 +132,7 @@ const FontPlatformData* FontCache::Syste
+     const FontDescription& font_description) {
+   const AtomicString& family = FontCache::SystemFontFamily();
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \
+-    BUILDFLAG(IS_IOS)
++    BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
+   if (family.empty() || family == font_family_names::kSystemUi)
+     return nullptr;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h
new file mode 100644
index 0000000000..da6b2ea67e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.h
+@@ -55,7 +55,7 @@
+ #include "third_party/skia/include/core/SkFontMgr.h"
+ #include "third_party/skia/include/core/SkRefCnt.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/gfx/font_fallback_linux.h"
+ #endif
+ 
+@@ -174,7 +174,7 @@ class PLATFORM_EXPORT FontCache final {
+   static void PrewarmFamily(const AtomicString& family_name) {}
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // These are needed for calling QueryRenderStyleForStrike, since
+   // gfx::GetFontRenderParams makes distinctions based on DSF.
+   static float DeviceScaleFactor() { return device_scale_factor_; }
+@@ -250,7 +250,7 @@ class PLATFORM_EXPORT FontCache final {
+       const char* locale_family_name);
+ #endif  // BUILDFLAG(IS_ANDROID)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static bool GetFontForCharacter(UChar32,
+                                   const char* preferred_locale,
+                                   gfx::FallbackFontData*);
+@@ -330,7 +330,7 @@ class PLATFORM_EXPORT FontCache final {
+                                    const FontFaceCreationParams&,
+                                    std::string& name);
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static AtomicString GetFamilyNameForCharacter(SkFontMgr*,
+                                                 UChar32,
+                                                 const FontDescription&,
+@@ -368,7 +368,7 @@ class PLATFORM_EXPORT FontCache final {
+   bool is_test_font_mgr_ = false;
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static float device_scale_factor_;
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc
new file mode 100644
index 0000000000..377345d0b7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__description.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_description.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_description.cc
+@@ -44,7 +44,7 @@
+ #include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
+ #include "third_party/blink/renderer/platform/wtf/text/string_hasher.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/platform/fonts/font_cache.h"
+ #endif
+ 
+@@ -282,7 +282,7 @@ FontCacheKey FontDescription::CacheKey(
+       static_cast<unsigned>(fields_.orientation_) << 1 |            // bit 2-3
+       static_cast<unsigned>(fields_.subpixel_text_position_);       // bit 1
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   float device_scale_factor_for_key = FontCache::DeviceScaleFactor();
+ #else
+   float device_scale_factor_for_key = 1.0f;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__metrics.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__metrics.cc
new file mode 100644
index 0000000000..9647201869
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__metrics.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_metrics.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_metrics.cc
+@@ -39,7 +39,7 @@
+ namespace blink {
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // This is the largest VDMX table which we'll try to load and parse.
+ static const size_t kMaxVDMXTableSize = 1024 * 1024;  // 1 MB
+ #endif
+@@ -67,7 +67,7 @@ void FontMetrics::AscentDescentWithHacks
+   bool is_vdmx_valid = false;
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   // Manually digging up VDMX metrics is only applicable when bytecode hinting
+   // using FreeType.  With DirectWrite or CoreText, no bytecode hinting is ever
+   // done.  This code should be pushed into FreeType (hinted font metrics).
+@@ -111,7 +111,7 @@ void FontMetrics::AscentDescentWithHacks
+     descent = SkScalarRoundToScalar(metrics.fDescent);
+ 
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     // When subpixel positioning is enabled, if the descent is rounded down,
+     // the descent part of the glyph may be truncated when displayed in a
+     // 'overflow: hidden' container.  To avoid that, borrow 1 unit from the
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc
new file mode 100644
index 0000000000..474b44d976
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__platform__data.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_platform_data.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_platform_data.cc
+@@ -54,7 +54,7 @@
+ namespace blink {
+ namespace {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Getting the system font render style takes a significant amount of time on
+ // Linux because looking up fonts using fontconfig can be very slow. We fetch
+ // the render style for each font family and text size, while it's very
+@@ -133,7 +133,7 @@ FontPlatformData::FontPlatformData(sk_sp
+   style_ = WebFontRenderStyle::GetDefault();
+ #if !BUILDFLAG(IS_WIN)
+   WebFontRenderStyle system_style;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool override_font_name_and_size =
+       base::FeatureList::IsEnabled(kOptimizeLinuxFonts);
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc
new file mode 100644
index 0000000000..2d0fe05fc7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc
+@@ -9,7 +9,7 @@
+ #if BUILDFLAG(IS_ANDROID)
+ #include "third_party/blink/public/mojom/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 BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/blink/renderer/platform/fonts/linux/font_unique_name_lookup_linux.h"
+ #elif BUILDFLAG(IS_WIN)
+ #include "third_party/blink/renderer/platform/fonts/win/font_unique_name_lookup_win.h"
+@@ -24,7 +24,7 @@ std::unique_ptr<FontUniqueNameLookup>
+ FontUniqueNameLookup::GetPlatformUniqueNameLookup() {
+ #if BUILDFLAG(IS_ANDROID)
+   return std::make_unique<FontUniqueNameLookupAndroid>();
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return std::make_unique<FontUniqueNameLookupLinux>();
+ #elif BUILDFLAG(IS_WIN)
+   return std::make_unique<FontUniqueNameLookupWin>();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc
new file mode 100644
index 0000000000..6c07afd21d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc
+@@ -65,7 +65,7 @@ AtomicString ToAtomicString(const SkStri
+   return AtomicString::FromUTF8(str.c_str(), str.size());
+ }
+ 
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // This function is called on android or when we are emulating android fonts on
+ // linux and the embedder has overriden the default fontManager with
+ // WebFontRendering::setSkiaFontMgr.
+@@ -246,7 +246,7 @@ const FontPlatformData* FontCache::Creat
+   std::string name;
+ 
+   sk_sp<SkTypeface> typeface;
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool noto_color_emoji_from_gmscore = false;
+ #if BUILDFLAG(IS_ANDROID)
+   // Use the unique local matching pathway for fetching Noto Color Emoji Compat
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc
new file mode 100644
index 0000000000..d424fa56a0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_begin__frame__provider.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/begin_frame_provider.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/begin_frame_provider.cc
+@@ -71,8 +71,12 @@ void BeginFrameProvider::CreateComposito
+ 
+   // Once we are using RAF, this thread is driving user interactive display
+   // updates. Update priority accordingly.
++  // pledge(2)
++  // stop this baloney
++#if !defined(OS_OPENBSD)
+   base::PlatformThread::SetCurrentThreadType(
+       base::ThreadType::kDisplayCritical);
++#endif
+ 
+   mojo::Remote<mojom::blink::EmbeddedFrameSinkProvider> provider;
+   Platform::Current()->GetBrowserInterfaceBroker()->GetInterface(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_color.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_color.cc
new file mode 100644
index 0000000000..d1a9dfb06d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_color.cc
@@ -0,0 +1,72 @@
+$NetBSD$
+
+In platform_jumbo_33.cc <cmath> included before <math.h>
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/color.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/color.cc
+@@ -203,7 +203,7 @@ Color Color::FromColorSpace(ColorSpace c
+     result.alpha_ = 0.0f;
+   }
+ 
+-  if (IsLightnessFirstComponent(color_space) && !isnan(result.param0_)) {
++  if (IsLightnessFirstComponent(color_space) && !std::isnan(result.param0_)) {
+     // param0_ is lightness which cannot be negative or above 100%.
+     // lab/lch have lightness in the range [0, 100].
+     // oklab/okch have lightness in the range [0, 1].
+@@ -970,10 +970,10 @@ String Color::ColorSpaceToString(Color::
+ 
+ static String ColorParamToString(float param, int precision = 6) {
+   StringBuilder result;
+-  if (!isfinite(param)) {
++  if (!std::isfinite(param)) {
+     // https://www.w3.org/TR/css-values-4/#calc-serialize
+     result.Append("calc(");
+-    if (isinf(param)) {
++    if (std::isinf(param)) {
+       // "Infinity" gets capitalized, so we can't use AppendNumber().
+       (param < 0) ? result.Append("-infinity") : result.Append("infinity");
+     } else {
+@@ -997,7 +997,7 @@ String Color::SerializeAsCanvasColor() c
+ 
+ String Color::SerializeLegacyColorAsCSSColor() const {
+   StringBuilder result;
+-  if (IsOpaque() && isfinite(alpha_)) {
++  if (IsOpaque() && std::isfinite(alpha_)) {
+     result.Append("rgb(");
+   } else {
+     result.Append("rgba(");
+@@ -1386,10 +1386,10 @@ static float ResolveNonFiniteChannel(flo
+                                      float negative_infinity_substitution,
+                                      float positive_infinity_substitution) {
+   // Finite values should be unchanged, even if they are out-of-gamut.
+-  if (isfinite(value)) {
++  if (std::isfinite(value)) {
+     return value;
+   } else {
+-    if (isnan(value)) {
++    if (std::isnan(value)) {
+       return 0.0f;
+     } else {
+       if (value < 0) {
+@@ -1415,7 +1415,7 @@ void Color::ResolveNonFiniteValues() {
+   }
+ 
+   // Chroma cannot be negative.
+-  if (IsChromaSecondComponent(color_space_) && isinf(param1_) &&
++  if (IsChromaSecondComponent(color_space_) && std::isinf(param1_) &&
+       param1_ < 0.0f) {
+     param1_ = 0.0f;
+   }
+@@ -1428,9 +1428,9 @@ void Color::ResolveNonFiniteValues() {
+   }
+ 
+   // Parsed values are `calc(NaN)` but computed values are 0 for NaN.
+-  param0_ = isnan(param0_) ? 0.0f : param0_;
+-  param1_ = isnan(param1_) ? 0.0f : param1_;
+-  param2_ = isnan(param2_) ? 0.0f : param2_;
++  param0_ = std::isnan(param0_) ? 0.0f : param0_;
++  param1_ = std::isnan(param1_) ? 0.0f : param1_;
++  param2_ = std::isnan(param2_) ? 0.0f : param2_;
+   alpha_ = ResolveNonFiniteChannel(alpha_, 0.0f, 1.0f);
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc
new file mode 100644
index 0000000000..556ef0dc70
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_graphics_video__frame__submitter.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc
+@@ -365,7 +365,7 @@ void VideoFrameSubmitter::OnBeginFrame(
+       continue;
+     auto& feedback =
+         timing_details.find(frame_token)->value.presentation_feedback;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // TODO: On Linux failure flag is unreliable, and perfectly rendered frames
+     // are reported as failures all the time.
+     bool presentation_failure = false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc
new file mode 100644
index 0000000000..913cb37ac1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_instrumentation_partition__alloc__memory__dump__provider.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/instrumentation/partition_alloc_memory_dump_provider.cc
+@@ -14,7 +14,9 @@
+ 
+ namespace blink {
+ 
++#if !BUILDFLAG(IS_BSD)
+ const char kPartitionAllocDumpName[] = "partition_alloc";
++#endif
+ 
+ PartitionAllocMemoryDumpProvider* PartitionAllocMemoryDumpProvider::Instance() {
+   DEFINE_STATIC_LOCAL(PartitionAllocMemoryDumpProvider, instance, ());
+@@ -24,6 +26,7 @@ PartitionAllocMemoryDumpProvider* Partit
+ bool PartitionAllocMemoryDumpProvider::OnMemoryDump(
+     const base::trace_event::MemoryDumpArgs& args,
+     base::trace_event::ProcessMemoryDump* memory_dump) {
++#if !BUILDFLAG(IS_BSD)
+   using base::trace_event::MemoryDumpLevelOfDetail;
+ 
+   MemoryDumpLevelOfDetail level_of_detail = args.level_of_detail;
+@@ -49,6 +52,7 @@ bool PartitionAllocMemoryDumpProvider::O
+       "size", "bytes", partition_stats_dumper.total_active_bytes());
+   memory_dump->AddOwnershipEdge(allocated_objects_dump->guid(),
+                                 partitions_dump->guid());
++#endif
+ 
+   return true;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc
new file mode 100644
index 0000000000..32bf9ff1e3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc
+@@ -260,12 +260,12 @@ SupportedFormats GetSupportedFormatsInte
+       supported_formats.scalability_modes.push_back(profile.scalability_modes);
+       supported_formats.sdp_formats.push_back(std::move(*format));
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #if BUILDFLAG(IS_WIN)
+       const bool kShouldAddH264Cbp =
+           base::FeatureList::IsEnabled(kMediaFoundationH264CbpEncoding) &&
+           profile.profile == media::VideoCodecProfile::H264PROFILE_BASELINE;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       const bool kShouldAddH264Cbp =
+           profile.profile == media::VideoCodecProfile::H264PROFILE_BASELINE;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5 b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5
new file mode 100644
index 0000000000..ee1f2baaac
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_runtime__enabled__features.json5
@@ -0,0 +1,68 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/runtime_enabled_features.json5.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/runtime_enabled_features.json5
+@@ -1944,7 +1944,7 @@
+       base_feature_status: "enabled",
+       copied_from_base_feature_if: "overridden",
+       origin_trial_feature_name: "FullscreenPopupWindows",
+-      origin_trial_os: ["win", "mac", "linux", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd", "netbsd"],
+     },
+     {
+       name: "GamepadButtonAxisEvents",
+@@ -2866,7 +2866,7 @@
+       name: "PaymentHandlerMinimalHeaderUX",
+       origin_trial_feature_name: "PaymentHandlerMinimalHeaderUX",
+       origin_trial_allows_third_party: true,
+-      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd", "netbsd"],
+       status: "stable",
+     },
+     {
+@@ -3052,7 +3052,7 @@
+     {
+       name: "PrivateNetworkAccessPermissionPrompt",
+       origin_trial_feature_name: "PrivateNetworkAccessPermissionPrompt",
+-      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd", "netbsd"],
+       status: "experimental",
+       public: true,
+       base_feature: "none",
+@@ -3879,7 +3879,7 @@
+       name: "UnrestrictedSharedArrayBuffer",
+       base_feature: "none",
+       origin_trial_feature_name: "UnrestrictedSharedArrayBuffer",
+-      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd", "netbsd"],
+     },
+     // Enables using policy-controlled feature "usb-unrestricted" to allow
+     // isolated context to access protected USB interface classes and to
+@@ -4047,7 +4047,7 @@
+     {
+       name: "WebAppScopeExtensions",
+       origin_trial_feature_name: "WebAppScopeExtensions",
+-      origin_trial_os: ["win", "mac", "linux", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd", "netbsd"],
+       status: "experimental",
+       base_feature: "none",
+     },
+@@ -4087,12 +4087,12 @@
+       status: "experimental",
+       base_feature: "none",
+       origin_trial_feature_name: "WebAppUrlHandling",
+-      origin_trial_os: ["win", "mac", "linux"],
++      origin_trial_os: ["win", "mac", "linux", "openbsd", "freebsd", "netbsd"],
+     },
+     {
+       name: "WebAppWindowControlsOverlay",
+       origin_trial_feature_name: "WebAppWindowControlsOverlay",
+-      origin_trial_os: ["win", "mac", "linux", "chromeos"],
++      origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd", "netbsd"],
+       status: "stable",
+       base_feature: "none",
+     },
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc
new file mode 100644
index 0000000000..4462b1d5c4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_scheduler_common_thread.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/common/thread.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/common/thread.cc
+@@ -82,7 +82,7 @@ void Thread::CreateAndSetCompositorThrea
+       std::make_unique<scheduler::CompositorThread>(params);
+   compositor_thread->Init();
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_OPENBSD)
+   compositor_thread->GetTaskRunner()->PostTaskAndReplyWithResult(
+       FROM_HERE, base::BindOnce(&base::PlatformThread::CurrentId),
+       base::BindOnce([](base::PlatformThreadId compositor_thread_id) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc
new file mode 100644
index 0000000000..06819f90cd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_widget_compositing_blink__categorized__worker__pool__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/widget/compositing/blink_categorized_worker_pool_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/widget/compositing/blink_categorized_worker_pool_delegate.cc
+@@ -27,7 +27,7 @@ BlinkCategorizedWorkerPoolDelegate& Blin
+ 
+ void BlinkCategorizedWorkerPoolDelegate::NotifyThreadWillRun(
+     base::PlatformThreadId tid) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   scoped_refptr<base::TaskRunner> task_runner =
+       Thread::MainThread()->GetTaskRunner(MainThreadTaskRunnerRestricted());
+   task_runner->PostTask(FROM_HERE, base::BindOnce(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_container__annotations.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_container__annotations.h
new file mode 100644
index 0000000000..4151851fa2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_container__annotations.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/container_annotations.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/container_annotations.h
+@@ -12,7 +12,7 @@
+ // TODO(ochang): Remove the ARCH_CPU_X86_64 condition to enable this for X86
+ // once the crashes there have been fixed: http://crbug.com/461406
+ #if defined(ADDRESS_SANITIZER) &&                      \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+     defined(ARCH_CPU_X86_64)
+ 
+ // Annotations require buffers to begin on an 8-byte boundary. See
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h
new file mode 100644
index 0000000000..3111015b3d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_math__extras.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/math_extras.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/math_extras.h
+@@ -128,6 +128,10 @@ constexpr float Grad2turn(float g) {
+   return g * (1.0f / 400.0f);
+ }
+ 
++#if defined(OS_FREEBSD)
++#pragma clang diagnostic push
++#pragma clang diagnostic ignored "-Winvalid-constexpr"
++#endif
+ inline double RoundHalfTowardsPositiveInfinity(double value) {
+   return std::floor(value + 0.5);
+ }
+@@ -135,6 +139,9 @@ inline double RoundHalfTowardsPositiveIn
+ inline float RoundHalfTowardsPositiveInfinity(float value) {
+   return std::floor(value + 0.5f);
+ }
++#if defined(OS_FREEBSD)
++#pragma clang diagnostic pop
++#endif
+ 
+ // ClampTo() is implemented by templated helper classes (to allow for partial
+ // template specialization) as well as several helper functions.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_stack__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_stack__util.cc
new file mode 100644
index 0000000000..5351216f8d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_stack__util.cc
@@ -0,0 +1,82 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
+@@ -23,6 +23,13 @@
+ extern "C" void* __libc_stack_end;  // NOLINT
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include <sys/signal.h>
++#if !BUILDFLAG(IS_NETBSD)
++#include <pthread_np.h>
++#endif
++#endif
++
+ namespace WTF {
+ 
+ size_t GetUnderestimatedStackSize() {
+@@ -35,7 +42,8 @@ size_t GetUnderestimatedStackSize() {
+ // correctly for the main thread.
+ 
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_FUCHSIA) || \
++    BUILDFLAG(IS_NETBSD)
+   // pthread_getattr_np() can fail if the thread is not invoked by
+   // pthread_create() (e.g., the main thread of blink_unittests).
+   // If so, a conservative size estimate is returned.
+@@ -56,7 +64,7 @@ size_t GetUnderestimatedStackSize() {
+     pthread_attr_destroy(&attr);
+     return size;
+   }
+-#if BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   pthread_attr_destroy(&attr);
+ #endif
+ 
+@@ -67,6 +75,8 @@ size_t GetUnderestimatedStackSize() {
+   //    low as 512k.
+   //
+   return 512 * 1024;
++#elif BUILDFLAG(IS_OPENBSD)
++  return 512 * 1024;
+ #elif BUILDFLAG(IS_APPLE)
+   // pthread_get_stacksize_np() returns too low a value for the main thread on
+   // OSX 10.9,
+@@ -103,7 +113,7 @@ size_t GetUnderestimatedStackSize() {
+ 
+ void* GetStackStart() {
+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
+-    BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_NETBSD)
+   pthread_attr_t attr;
+   int error;
+ #if BUILDFLAG(IS_FREEBSD)
+@@ -120,7 +130,7 @@ void* GetStackStart() {
+     pthread_attr_destroy(&attr);
+     return reinterpret_cast<uint8_t*>(base) + size;
+   }
+-#if BUILDFLAG(IS_FREEBSD)
++#if BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+   pthread_attr_destroy(&attr);
+ #endif
+ #if defined(__GLIBC__)
+@@ -154,6 +164,13 @@ void* GetStackStart() {
+   ::GetCurrentThreadStackLimits(&lowLimit, &highLimit);
+   return reinterpret_cast<void*>(highLimit);
+ #endif
++#elif BUILDFLAG(IS_OPENBSD)
++  stack_t ss;
++  void *base;
++  int error = pthread_stackseg_np(pthread_self(), &ss);
++  CHECK(!error);
++  base = (void*)((size_t) ss.ss_sp - ss.ss_size);
++  return reinterpret_cast<uint8_t*>(base) + ss.ss_size;
+ #else
+ #error Unsupported getStackStart on this platform.
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_brotli_common_platform.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_brotli_common_platform.h
new file mode 100644
index 0000000000..ec2b927f91
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_brotli_common_platform.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/brotli/common/platform.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/brotli/common/platform.h
+@@ -28,7 +28,7 @@
+ #include <brotli/port.h>
+ #include <brotli/types.h>
+ 
+-#if defined(OS_LINUX) || defined(OS_CYGWIN) || defined(__EMSCRIPTEN__)
++#if defined(OS_LINUX) || defined(OS_CYGWIN) || defined(__EMSCRIPTEN__) || defined(OS_BSD)
+ #include <endian.h>
+ #elif defined(OS_FREEBSD)
+ #include <machine/endian.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_cpuinfo_cpuinfo.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_cpuinfo_cpuinfo.gni
new file mode 100644
index 0000000000..1725179142
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_cpuinfo_cpuinfo.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/cpuinfo/cpuinfo.gni.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/cpuinfo/cpuinfo.gni
+@@ -7,7 +7,7 @@ use_cpuinfo =
+     current_cpu != "ppc64" && current_cpu != "ppc64le" &&
+     current_cpu != "s390" && current_cpu != "s390x" &&
+     # cpuinfo is not supported on fuchsia.
+-    !is_fuchsia &&
++    !is_fuchsia && !is_bsd &&
+     # There's a few arm architectures that are not supported by cpuinfo,
+     # especially amongst ChromeOS devices.
+     # See //third_party/cpuinfo/src/src/arm/linux/cp.h.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni
new file mode 100644
index 0000000000..3f22121fdb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_build_crashpad__buildconfig.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni
+@@ -61,7 +61,7 @@ if (crashpad_is_in_chromium) {
+   crashpad_is_ios = is_ios
+   crashpad_is_apple = is_apple
+   crashpad_is_win = is_win
+-  crashpad_is_linux = is_linux || is_chromeos
++  crashpad_is_linux = (is_linux || is_chromeos) && !is_bsd
+   crashpad_is_android = is_android
+   crashpad_is_fuchsia = is_fuchsia
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn
new file mode 100644
index 0000000000..187e0f1a3c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/client/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/client/BUILD.gn
+@@ -137,6 +137,13 @@ static_library("common") {
+   if (crashpad_is_win) {
+     sources += [ "crash_report_database_win.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",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc
new file mode 100644
index 0000000000..78c2e95e8f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_client_crashpad__client__posix.cc
@@ -0,0 +1,49 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/client/crashpad_client_posix.cc.orig	2024-12-21 10:25:10.726262463 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/client/crashpad_client_posix.cc
+@@ -0,0 +1,40 @@
++// 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"
++#include "base/notreached.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<std::string, std::string>& annotations,
++    const std::vector<std::string>& arguments,
++    bool restartable,
++    bool asynchronous_start,   
++    const std::vector<base::FilePath>& attachments) {
++  NOTREACHED();  // TODO(scottmg): https://crashpad.chromium.org/bug/196
++  return false;
++}
++
++}  // namespace crashpad
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc
new file mode 100644
index 0000000000..b62be9dbb1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_minidump_minidump__misc__info__writer.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+@@ -159,6 +159,12 @@ std::string MinidumpMiscInfoDebugBuildSt
+   static constexpr char kOS[] = "win";
+ #elif BUILDFLAG(IS_FUCHSIA)
+   static constexpr char kOS[] = "fuchsia";
++#elif defined(OS_OPENBSD)
++  static constexpr char kOS[] = "openbsd";
++#elif defined(OS_FREEBSD)
++  static constexpr char kOS[] = "freebsd";
++#elif defined(OS_NETBSD)
++  static constexpr char kOS[] = "netbsd";
+ #else
+ #error define kOS for this operating system
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h
new file mode 100644
index 0000000000..0aceeaaa1c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_address__types.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/address_types.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/address_types.h
+@@ -25,7 +25,7 @@
+ #include <mach/mach_types.h>
+ #elif BUILDFLAG(IS_WIN)
+ #include "util/win/address_types.h"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #include "util/linux/address_types.h"
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #include <zircon/types.h>
+@@ -55,7 +55,7 @@ using VMSize = mach_vm_size_t;
+ using VMAddress = WinVMAddress;
+ using VMSize = WinVMSize;
+ 
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ 
+ using VMAddress = LinuxVMAddress;
+ using VMSize = LinuxVMSize;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h
new file mode 100644
index 0000000000..62d3289d0e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_capture__context.h
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context.h
+@@ -21,7 +21,8 @@
+ #include <mach/mach.h>
+ #elif BUILDFLAG(IS_WIN)
+ #include <windows.h>
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
++      BUILDFLAG(IS_FREEBSD) || BUILDFLAG(IS_NETBSD)
+ #include <ucontext.h>
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
+@@ -35,7 +36,8 @@ using NativeCPUContext = arm_unified_thr
+ #endif
+ #elif BUILDFLAG(IS_WIN)
+ using NativeCPUContext = CONTEXT;
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
++      BUILDFLAG(IS_BSD)
+ using NativeCPUContext = ucontext_t;
+ #endif  // BUILDFLAG(IS_APPLE)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc
new file mode 100644
index 0000000000..7e39f173b4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_metrics.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/metrics.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/metrics.cc
+@@ -25,7 +25,7 @@
+ #define METRICS_OS_NAME "Win"
+ #elif BUILDFLAG(IS_ANDROID)
+ #define METRICS_OS_NAME "Android"
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #define METRICS_OS_NAME "Linux"
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #define METRICS_OS_NAME "Fuchsia"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc
new file mode 100644
index 0000000000..8a639f7b9e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_misc_uuid.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/uuid.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/uuid.cc
+@@ -110,7 +110,7 @@ bool UUID::InitializeWithNew() {
+   InitializeFromBytes(uuid);
+   return true;
+ #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_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.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc
new file mode 100644
index 0000000000..6b7f64f930
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_close__multiple.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/close_multiple.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/close_multiple.cc
+@@ -73,7 +73,7 @@ void CloseNowOrOnExec(int fd, bool ebadf
+ // 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 BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)
+   static constexpr char kFDDir[] = "/dev/fd";
+ #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+   static constexpr char kFDDir[] = "/proc/self/fd";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc
new file mode 100644
index 0000000000..50defa79c6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_drop__privileges.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/drop_privileges.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/drop_privileges.cc
+@@ -25,7 +25,7 @@ void DropPrivileges() {
+   gid_t gid = getgid();
+   uid_t uid = getuid();
+ 
+-#if BUILDFLAG(IS_APPLE)
++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_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
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc
new file mode 100644
index 0000000000..1555183455
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_signals.cc
@@ -0,0 +1,39 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/signals.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/signals.cc
+@@ -51,7 +51,7 @@ constexpr int kCrashSignals[] = {
+ #if defined(SIGEMT)
+     SIGEMT,
+ #endif  // defined(SIGEMT)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     SIGXCPU,
+     SIGXFSZ,
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+@@ -91,7 +91,7 @@ constexpr int kTerminateSignals[] = {
+     SIGXCPU,
+     SIGXFSZ,
+ #endif  // BUILDFLAG(IS_APPLE)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     SIGIO,
+ #endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+ };
+@@ -251,8 +251,12 @@ bool Signals::WillSignalReraiseAutonomou
+          // 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 &&
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc
new file mode 100644
index 0000000000..8dba8eb6e9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc
+@@ -68,7 +68,7 @@ constexpr const char* kSignalNames[] = {
+     "INFO",
+     "USR1",
+     "USR2",
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ #if defined(ARCH_CPU_MIPS_FAMILY)
+     "HUP",
+     "INT",
+@@ -139,7 +139,7 @@ constexpr const char* kSignalNames[] = {
+ #endif  // defined(ARCH_CPU_MIPS_FAMILY)
+ #endif
+ };
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
+ // NSIG is 64 to account for real-time signals.
+ static_assert(std::size(kSignalNames) == 32, "kSignalNames length");
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn
new file mode 100644
index 0000000000..5d6c1dcaa8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_crc32c_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/crc32c/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/crc32c/BUILD.gn
+@@ -46,7 +46,7 @@ config("crc32c_config") {
+   }
+ 
+   # Android added <sys/auxv.h> in API level 18.
+-  if (is_linux || is_chromeos || is_android) {
++  if (is_linux || is_chromeos || is_android && !is_bsd) {
+     defines += [
+       "HAVE_STRONG_GETAUXVAL=1",
+       "HAVE_WEAK_GETAUXVAL=1",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h
new file mode 100644
index 0000000000..b0503b2487
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_include_dawn_native_VulkanBackend.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/dawn/include/dawn/native/VulkanBackend.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/dawn/include/dawn/native/VulkanBackend.h
+@@ -83,7 +83,8 @@ struct ExternalImageExportInfoVk : Exter
+ };
+ 
+ // Can't use DAWN_PLATFORM_IS(LINUX) since header included in both Dawn and Chrome
+-#ifdef __linux__
++#if defined(__linux__)  || defined(__OpenBSD__) || defined(__FreeBSD__) || \
++    defined(__NetBSD__)
+ 
+ // Common properties of external images represented by FDs. On successful import the file
+ // descriptor's ownership is transferred to the Dawn implementation and they shouldn't be
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_src_dawn_common_Platform.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_src_dawn_common_Platform.h
new file mode 100644
index 0000000000..e87e8689b4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_src_dawn_common_Platform.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/dawn/src/dawn/common/Platform.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/dawn/src/dawn/common/Platform.h
+@@ -59,6 +59,11 @@
+ #error "Unsupported Windows platform."
+ #endif
+ 
++#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#define DAWN_PLATFORM_IS_LINUX 1
++#define DAWN_PLATFORM_IS_BSD 1
++#define DAWN_PLATFORM_IS_POSIX 1
++
+ #elif defined(__linux__)
+ #define DAWN_PLATFORM_IS_LINUX 1
+ #define DAWN_PLATFORM_IS_POSIX 1
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp
new file mode 100644
index 0000000000..14e24f9d27
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_dawn_src_dawn_native_vulkan_BackendVk.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp
+@@ -56,7 +56,7 @@ constexpr char kSwiftshaderLibName[] = "
+ #endif
+ 
+ #if DAWN_PLATFORM_IS(LINUX)
+-#if DAWN_PLATFORM_IS(ANDROID)
++#if DAWN_PLATFORM_IS(ANDROID) || DAWN_PLATFORM_IS(BSD)
+ constexpr char kVulkanLibName[] = "libvulkan.so";
+ #else
+ constexpr char kVulkanLibName[] = "libvulkan.so.1";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_BUILD.gn
new file mode 100644
index 0000000000..d922bc70f7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_BUILD.gn
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/ffmpeg/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/ffmpeg/BUILD.gn
+@@ -350,7 +350,6 @@ target(link_target_type, "ffmpeg_interna
+       libs += [
+         "m",
+         "z",
+-        "rt",
+       ]
+     }
+     if (is_component_ffmpeg) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_cabac.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_cabac.h
new file mode 100644
index 0000000000..8d8be842e2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavcodec_x86_cabac.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/cabac.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/cabac.h
+@@ -31,7 +31,8 @@
+ 
+ #if   (defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)))\
+    || (                  !defined(__clang__) && defined(__llvm__) && __GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)\
+-   || (defined(__INTEL_COMPILER) && defined(_MSC_VER))
++   || (defined(__INTEL_COMPILER) && defined(_MSC_VER)) \
++   || ((defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__i386))
+ #       define BROKEN_COMPILER 1
+ #else
+ #       define BROKEN_COMPILER 0
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_cpu.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_cpu.c
new file mode 100644
index 0000000000..2b2153b158
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_cpu.c
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/ffmpeg/libavutil/cpu.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/ffmpeg/libavutil/cpu.c
+@@ -38,10 +38,7 @@
+ #if HAVE_GETPROCESSAFFINITYMASK || HAVE_WINRT
+ #include <windows.h>
+ #endif
+-#if HAVE_SYSCTL
+-#if HAVE_SYS_PARAM_H
+-#include <sys/param.h>
+-#endif
++#if HAVE_SYSCTL && !defined(__OpenBSD__)
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_mem.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_mem.c
new file mode 100644
index 0000000000..f917df0f1e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_mem.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/ffmpeg/libavutil/mem.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/ffmpeg/libavutil/mem.c
+@@ -33,9 +33,6 @@
+ #include <stdlib.h>
+ #include <stdatomic.h>
+ #include <string.h>
+-#if HAVE_MALLOC_H
+-#include <malloc.h>
+-#endif
+ 
+ #include "attributes.h"
+ #include "avassert.h"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_random__seed.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_random__seed.c
new file mode 100644
index 0000000000..76535d3be7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_random__seed.c
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/ffmpeg/libavutil/random_seed.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/ffmpeg/libavutil/random_seed.c
+@@ -20,6 +20,10 @@
+ 
+ #include "config.h"
+ 
++#if defined(__NetBSD__)
++#define _NETBSD_SOURCE 1
++#endif
++
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+@@ -35,6 +39,11 @@
+ #elif CONFIG_OPENSSL
+ #include <openssl/rand.h>
+ #endif
++#if HAVE_ARC4RANDOM_BUF
++#undef __BSD_VISIBLE
++#define __BSD_VISIBLE 1
++#include <stdlib.h>
++#endif
+ #include <fcntl.h>
+ #include <math.h>
+ #include <time.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_x86_x86inc.asm b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_x86_x86inc.asm
new file mode 100644
index 0000000000..3898d11551
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ffmpeg_libavutil_x86_x86inc.asm
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/ffmpeg/libavutil/x86/x86inc.asm.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/ffmpeg/libavutil/x86/x86inc.asm
+@@ -46,6 +46,12 @@
+     %endif
+ %endif
+ 
++%if ARCH_X86_64
++    %define _CET_ENDBR endbr64
++%else
++    %define _CET_ENDBR
++%endif
++
+ %define WIN64  0
+ %define UNIX64 0
+ %if ARCH_X86_64
+@@ -861,6 +867,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, 
+     %endif
+     align function_align
+     %2:
++    _CET_ENDBR
+     RESET_MM_PERMUTATION        ; needed for x86-64, also makes disassembly somewhat nicer
+     %xdefine rstk rsp           ; copy of the original stack pointer, used when greater alignment than the known stack alignment is required
+     %assign stack_offset 0      ; stack pointer offset relative to the return address
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_fontconfig_include_config.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_fontconfig_include_config.h
new file mode 100644
index 0000000000..48d52a1797
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_fontconfig_include_config.h
@@ -0,0 +1,60 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/fontconfig/include/config.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/fontconfig/include/config.h
+@@ -24,7 +24,7 @@
+ /* #undef FC_ARCHITECTURE */
+ 
+ /* System font directory */
+-#define FC_DEFAULT_FONTS "<dir>/usr/share/fonts</dir>"
++#define FC_DEFAULT_FONTS "<dir>/usr/X11R6/lib/X11/fonts</dir>"
+ 
+ /* The type of len parameter of the gperf hash/lookup function */
+ #define FC_GPERF_SIZE_T size_t
+@@ -141,7 +141,7 @@
+ /* #undef HAVE_NDIR_H */
+ 
+ /* Define to 1 if you have the 'posix_fadvise' function. */
+-#define HAVE_POSIX_FADVISE 1
++#define HAVE_POSIX_FADVISE 0
+ 
+ /* Have POSIX threads */
+ #define HAVE_PTHREAD 1
+@@ -156,11 +156,14 @@
+ #define HAVE_RANDOM 1
+ 
+ /* Define to 1 if you have the `random_r' function. */
+-#define HAVE_RANDOM_R 1
++/* #undef HAVE_RANDOM_R */
+ 
+ /* Define to 1 if you have the `rand_r' function. */
+ #define HAVE_RAND_R 1
+ 
++/* Define to 1 if you have the `arc4_random' function. */
++#define HAVE_ARC4RANDOM 1
++
+ /* Define to 1 if you have the `readlink' function. */
+ #define HAVE_READLINK 1
+ 
+@@ -230,7 +233,7 @@
+ #define HAVE_SYS_PARAM_H 1
+ 
+ /* Define to 1 if you have the <sys/statfs.h> header file. */
+-#define HAVE_SYS_STATFS_H 1
++/* #undef HAVE_SYS_STATFS_H */
+ 
+ /* Define to 1 if you have the <sys/statvfs.h> header file. */
+ #define HAVE_SYS_STATVFS_H 1
+@@ -245,7 +248,7 @@
+ #define HAVE_SYS_VFS_H 1
+ 
+ /* Define to 1 if you have the <unistd.h> header file. */
+-#define HAVE_UNISTD_H 1
++/* #undef HAVE_UNISTD_H */
+ 
+ /* Define to 1 if you have the `vprintf' function. */
+ #define HAVE_VPRINTF 1
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_fontconfig_src_src_fccompat.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_fontconfig_src_src_fccompat.c
new file mode 100644
index 0000000000..1fe95d0538
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_fontconfig_src_src_fccompat.c
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/fontconfig/src/src/fccompat.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/fontconfig/src/src/fccompat.c
+@@ -184,7 +184,9 @@ FcRandom(void)
+ {
+     int32_t result;
+ 
+-#if HAVE_RANDOM_R
++#if HAVE_ARC4RANDOM
++    result = arc4random() & 0x7fffffff;
++#elif HAVE_RANDOM_R
+     static struct random_data fcrandbuf;
+     static char statebuf[256];
+     static FcBool initialized = FcFalse;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc
new file mode 100644
index 0000000000..5e7a9aa632
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ipcz_src_reference__drivers_random.cc
@@ -0,0 +1,55 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/ipcz/src/reference_drivers/random.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/ipcz/src/reference_drivers/random.cc
+@@ -14,7 +14,8 @@
+ #include <windows.h>
+ #elif BUILDFLAG(IS_FUCHSIA)
+ #include <zircon/syscalls.h>
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) && \
++         !BUILDFLAG(IS_NETBSD)
+ #include <asm/unistd.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
+@@ -25,7 +26,7 @@
+ #include <nacl/nacl_random.h>
+ #endif
+ 
+-#if BUILDFLAG(IS_POSIX)
++#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_NETBSD)
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -55,7 +56,7 @@ decltype(&ProcessPrng) GetProcessPrng() 
+ }
+ #endif
+ 
+-#if defined(OS_POSIX) && !BUILDFLAG(IS_MAC)
++#if (defined(OS_POSIX) && !BUILDFLAG(IS_MAC)) || BUILDFLAG(IS_NETBSD)
+ void RandomBytesFromDevUrandom(absl::Span<uint8_t> destination) {
+   static int urandom_fd = [] {
+     for (;;) {
+@@ -86,7 +87,8 @@ void RandomBytes(absl::Span<uint8_t> des
+   process_prng_fn(destination.data(), destination.size());
+ #elif BUILDFLAG(IS_FUCHSIA)
+   zx_cprng_draw(destination.data(), destination.size());
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) && \
++         !BUILDFLAG(IS_NETBSD)
+   while (!destination.empty()) {
+     ssize_t result =
+         syscall(__NR_getrandom, destination.data(), destination.size(), 0);
+@@ -102,7 +104,7 @@ void RandomBytes(absl::Span<uint8_t> des
+ #elif BUILDFLAG(IS_MAC)
+   const bool ok = getentropy(destination.data(), destination.size()) == 0;
+   ABSL_ASSERT(ok);
+-#elif BUILDFLAG(IS_IOS)
++#elif BUILDFLAG(IS_IOS) || BUILDFLAG(IS_NETBSD)
+   RandomBytesFromDevUrandom(destination);
+ #elif BUILDFLAG(IS_NACL)
+   while (!destination.empty()) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ipcz_src_standalone_base_logging.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ipcz_src_standalone_base_logging.cc
new file mode 100644
index 0000000000..1ad86b3b71
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_ipcz_src_standalone_base_logging.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/ipcz/src/standalone/base/logging.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/ipcz/src/standalone/base/logging.cc
+@@ -50,6 +50,9 @@ LogMessage::LogMessage(const char* file,
+ #elif BUILDFLAG(IS_ANDROID)
+   stream_ << getpid() << ":" << gettid() << ":";
+   const char* trimmed_file = strrchr(file, '/') + 1;
++#elif BUILDFLAG(IS_BSD)
++  stream_ << getpid() << ":" << pthread_self() << ":";
++  const char* trimmed_file = strrchr(file, '/') + 1;
+ #elif BUILDFLAG(IS_WIN)
+   const char* trimmed_file = file;
+   stream_ << (::GetCurrentProcessId()) << ":" << ::GetCurrentThreadId() << ":";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc
new file mode 100644
index 0000000000..e34cb0193a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_leveldatabase_env__chromium.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/leveldatabase/env_chromium.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/leveldatabase/env_chromium.cc
+@@ -329,7 +329,8 @@ ChromiumWritableFile::ChromiumWritableFi
+ 
+ Status ChromiumWritableFile::SyncParent() {
+   TRACE_EVENT0("leveldb", "SyncParent");
+-#if defined(OS_POSIX) || defined(OS_FUCHSIA)
++// pledge violation (directory passed as fd)
++#if (defined(OS_POSIX) || defined(OS_FUCHSIA)) && !defined(OS_OPENBSD)
+   FilePath path = FilePath::FromUTF8Unsafe(parent_dir_);
+   FileErrorOr<base::File> result = filesystem_->OpenFile(
+       path, base::File::FLAG_OPEN | base::File::FLAG_READ);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
new file mode 100644
index 0000000000..9a57033399
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c
+@@ -127,10 +127,46 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(__linux__)  // end defined(AOM_USE_ANDROID_CPU_FEATURES)
++#elif defined(__OpenBSD__)
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
++
++static int arm_get_cpu_caps(void) {
++  int flags = 0;
++  int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 };
++  uint64_t cpu_id = 0;
++  size_t len = sizeof(cpu_id);
++
++  flags |= HAS_NEON;  // Neon is mandatory in Armv8.0-A.
++
++  if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0)
++    return flags;
++
++  if (ID_AA64ISAR0_CRC32(cpu_id) >= ID_AA64ISAR0_CRC32_BASE)
++    flags |= HAS_ARM_CRC32;
++
++  return flags;
++}
++
++#elif defined(__linux__) || defined(__FreeBSD__)  // end defined(AOM_USE_ANDROID_CPU_FEATURES)
+ 
+ #include <sys/auxv.h>
+ 
++#if defined(__FreeBSD__)
++static unsigned long getauxval(unsigned long type)
++{
++    /* Only AT_HWCAP* return unsigned long */
++    if (type != AT_HWCAP && type != AT_HWCAP2) {
++        return 0;
++    }
++
++    unsigned long ret = 0;
++    elf_aux_info(type, &ret, sizeof(ret));
++    return ret;
++}
++#endif
++
+ // Define hwcap values ourselves: building with an old auxv header where these
+ // hwcap values are not defined should not prevent features from being enabled.
+ #define AOM_AARCH64_HWCAP_CRC32 (1 << 7)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++_src_src_chrono.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++_src_src_chrono.cpp
new file mode 100644
index 0000000000..d2ce2c6ed9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++_src_src_chrono.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libc++/src/src/chrono.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/libc++/src/src/chrono.cpp
+@@ -31,7 +31,7 @@
+ #  include <sys/time.h> // for gettimeofday and timeval
+ #endif
+ 
+-#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
++#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)|| defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #  define _LIBCPP_HAS_CLOCK_GETTIME
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++_src_src_filesystem_filesystem__clock.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++_src_src_filesystem_filesystem__clock.cpp
new file mode 100644
index 0000000000..22dc138794
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++_src_src_filesystem_filesystem__clock.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libc++/src/src/filesystem/filesystem_clock.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/libc++/src/src/filesystem/filesystem_clock.cpp
+@@ -29,7 +29,7 @@
+ #  include <sys/time.h> // for gettimeofday and timeval
+ #endif
+ 
+-#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
++#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #  define _LIBCPP_HAS_CLOCK_GETTIME
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++abi_src_src_cxa__guard__impl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++abi_src_src_cxa__guard__impl.h
new file mode 100644
index 0000000000..6bbeabf4b2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libc++abi_src_src_cxa__guard__impl.h
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libc++abi/src/src/cxa_guard_impl.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/libc++abi/src/src/cxa_guard_impl.h
+@@ -411,7 +411,18 @@ private:
+ //                         Futex Implementation
+ //===----------------------------------------------------------------------===//
+ 
+-#if defined(SYS_futex)
++#if defined(__NetBSD__)
++void PlatformFutexWait(int* addr, int expect) {
++  constexpr int WAIT = 0;
++  syscall(SYS___futex, addr, WAIT, expect, NULL, NULL, 0, 0);
++  __tsan_acquire(addr);
++}
++void PlatformFutexWake(int* addr) {
++  constexpr int WAKE = 1;
++  __tsan_release(addr);
++  syscall(SYS___futex, addr, WAKE, INT_MAX, NULL, NULL, 0, 0);
++}
++#elif defined(SYS_futex)
+ void PlatformFutexWait(int* addr, int expect) {
+   constexpr int WAIT = 0;
+   syscall(SYS_futex, addr, WAIT, expect, 0);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libdrm_src_xf86drmMode.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libdrm_src_xf86drmMode.c
new file mode 100644
index 0000000000..cb98bca0eb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libdrm_src_xf86drmMode.c
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libdrm/src/xf86drmMode.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/libdrm/src/xf86drmMode.c
+@@ -976,7 +976,7 @@ drm_public int drmCheckModesettingSuppor
+ 	}
+ #elif defined(__DragonFly__)
+ 	return 0;
+-#elif defined(__OpenBSD__)
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
+ 	int	fd;
+ 	struct drm_mode_card_res res;
+ 	drmModeResPtr r = 0;
+@@ -1129,7 +1129,11 @@ drm_public int drmModePageFlipTarget(int
+ 
+ drm_public int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id,
+ 		    uint32_t fb_id, uint32_t flags,
++#if defined(__NetBSD__)
++			uint32_t crtc_x, uint32_t crtc_y,
++#else
+ 		    int32_t crtc_x, int32_t crtc_y,
++#endif
+ 		    uint32_t crtc_w, uint32_t crtc_h,
+ 		    uint32_t src_x, uint32_t src_y,
+ 		    uint32_t src_w, uint32_t src_h)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libsync_src_include_sync_sync.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libsync_src_include_sync_sync.h
new file mode 100644
index 0000000000..012761efe6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libsync_src_include_sync_sync.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h
+@@ -22,7 +22,9 @@
+ #include <sys/cdefs.h>
+ #include <stdint.h>
+ 
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <linux/types.h>
++#endif
+ 
+ __BEGIN_DECLS
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libsync_src_sync.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libsync_src_sync.c
new file mode 100644
index 0000000000..8b2899f8fc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libsync_src_sync.c
@@ -0,0 +1,31 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libsync/src/sync.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/libsync/src/sync.c
+@@ -17,8 +17,8 @@
+  */
+ 
+ #include <fcntl.h>
+-#include <malloc.h>
+ #include <stdint.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <poll.h>
+@@ -29,6 +29,12 @@
+ 
+ #include <sync/sync.h>
+ 
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++typedef __uint8_t __u8;
++typedef __uint32_t __u32;
++typedef __int32_t __s32;
++#define ETIME ETIMEDOUT
++#endif
+ 
+ struct sw_sync_create_fence_data {
+   __u32 value;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn
new file mode 100644
index 0000000000..14d283864c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libusb/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/libusb/BUILD.gn
+@@ -3,7 +3,7 @@
+ # found in the LICENSE file.
+ 
+ # libusb is only used by //services/device/usb on macOS.
+-assert(is_mac)
++assert(is_mac || is_bsd)
+ 
+ import("//build/config/chromeos/ui_mode.gni")
+ import("//build/config/features.gni")
+@@ -103,7 +103,7 @@ static_library("libusb") {
+     ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "src/libusb/os/linux_usbfs.c",
+       "src/libusb/os/linux_usbfs.h",
+@@ -114,11 +114,21 @@ static_library("libusb") {
+     ]
+   }
+ 
++  if (is_openbsd) {
++    sources += [
++      "src/libusb/os/openbsd_usb.c",
++    ]
++    defines += [
++      "OS_OPENBSD=1",
++      "_GNU_SOURCE=1",
++    ]
++  }
++
+   if (is_chromeos_ash) {
+     defines += [ "USBI_TIMERFD_AVAILABLE" ]
+   }
+ 
+-  if (use_udev) {
++  if (use_udev && !is_bsd) {
+     sources += [ "src/libusb/os/linux_udev.cc" ]
+     defines += [
+       "HAVE_LIBUDEV=1",
+@@ -127,7 +137,7 @@ static_library("libusb") {
+     deps += [ "//build/linux/libudev" ]
+   }
+ 
+-  if ((is_linux || is_chromeos) && !use_udev) {
++  if ((is_linux || is_chromeos) && !use_udev && !is_bsd) {
+     sources += [ "src/libusb/os/linux_netlink.c" ]
+     defines += [ "HAVE_LINUX_NETLINK_H" ]
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_core.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_core.c
new file mode 100644
index 0000000000..ead2784168
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_core.c
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libusb/src/libusb/core.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/libusb/src/libusb/core.c
+@@ -448,7 +448,7 @@ libusb_free_device_list(list, 1);
+  * which grows when required. it can be freed once discovery has completed,
+  * eliminating the need for a list node in the libusb_device structure
+  * itself. */
+-#define DISCOVERED_DEVICES_SIZE_STEP 8
++#define DISCOVERED_DEVICES_SIZE_STEP 16
+ 
+ static struct discovered_devs *discovered_devs_alloc(void)
+ {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_os_threads__posix.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_os_threads__posix.c
new file mode 100644
index 0000000000..51d16e0eca
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libusb_src_libusb_os_threads__posix.c
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libusb/src/libusb/os/threads_posix.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/libusb/src/libusb/os/threads_posix.c
+@@ -19,9 +19,11 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+  */
+ 
+-#if defined(__linux__) || defined(__OpenBSD__)
++#if defined(__linux__)
+ # include <unistd.h>
+ # include <sys/syscall.h>
++#elif defined(__OpenBSD__)
++# include <unistd.h>
+ #elif defined(__APPLE__)
+ # include <mach/mach.h>
+ #elif defined(__CYGWIN__)
+@@ -65,7 +67,7 @@ int usbi_get_tid(void)
+ #elif defined(__OpenBSD__)
+ 	/* The following only works with OpenBSD > 5.1 as it requires
+ 	   real thread support. For 5.1 and earlier, -1 is returned. */
+-	ret = syscall(SYS_getthrid);
++	ret = getthrid();
+ #elif defined(__APPLE__)
+ 	ret = mach_thread_self();
+ 	mach_port_deallocate(mach_task_self(), ret);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
new file mode 100644
index 0000000000..dfafd1f8e4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
@@ -0,0 +1,34 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c
+@@ -120,10 +120,24 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(__linux__)  // end defined(VPX_USE_ANDROID_CPU_FEATURES)
++#elif defined(__linux__) || defined(__FreeBSD__)  // end defined(VPX_USE_ANDROID_CPU_FEATURES)
+ 
+ #include <sys/auxv.h>
+ 
++#if defined(__FreeBSD__)
++static unsigned long getauxval(unsigned long type)
++{
++    /* Only AT_HWCAP* return unsigned long */
++    if (type != AT_HWCAP && type != AT_HWCAP2) {
++        return 0;
++    }
++
++    unsigned long ret = 0;
++    elf_aux_info(type, &ret, sizeof(ret));
++    return ret;
++}
++#endif
++
+ // Define hwcap values ourselves: building with an old auxv header where these
+ // hwcap values are not defined should not prevent features from being enabled.
+ #define VPX_AARCH64_HWCAP_ASIMDDP (1 << 20)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_lzma__sdk_C_CpuArch.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_lzma__sdk_C_CpuArch.c
new file mode 100644
index 0000000000..56991e6b53
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_lzma__sdk_C_CpuArch.c
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/lzma_sdk/C/CpuArch.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/lzma_sdk/C/CpuArch.c
+@@ -412,12 +412,40 @@ BoolInt CPU_IsSupported_SHA1(void) { ret
+ BoolInt CPU_IsSupported_SHA2(void) { return APPLE_CRYPTO_SUPPORT_VAL; }
+ BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYPTO_SUPPORT_VAL; }
+ 
++#elif defined(__OpenBSD__)
++
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
++
++BoolInt CPU_IsSupported_NEON() { return 1; }
++
++#define MY_HWCAP_CHECK_FUNC_2(name1, name2) \
++  BoolInt CPU_IsSupported_ ## name1() { \
++    int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 }; \
++    size_t len = sizeof(uint64_t); \
++    uint64_t cpu_id = 0; \
++    if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0) \
++      return 0; \
++    if (ID_AA64ISAR0_ ## name2(cpu_id) >= ID_AA64ISAR0_## name2 ##_BASE) \
++      return 1; \
++    return 0; \
++  }
++
++#define MY_HWCAP_CHECK_FUNC(name) \
++  MY_HWCAP_CHECK_FUNC_2(name, name)
++
++MY_HWCAP_CHECK_FUNC (CRC32)
++MY_HWCAP_CHECK_FUNC (SHA1)
++MY_HWCAP_CHECK_FUNC (SHA2)
++MY_HWCAP_CHECK_FUNC (AES)
+ 
+ #else // __APPLE__
+ 
+ #include <sys/auxv.h>
+ 
+-#if !defined(ARMV8_OS_FUCHSIA)
++#if !defined(ARMV8_OS_FUCHSIA) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #define USE_HWCAP
+ #endif // !defined(ARMV8_OS_FUCHSIA)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_material__color__utilities_src_cpp_palettes_tones.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_material__color__utilities_src_cpp_palettes_tones.cc
new file mode 100644
index 0000000000..d517f6eab4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_material__color__utilities_src_cpp_palettes_tones.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/material_color_utilities/src/cpp/palettes/tones.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/material_color_utilities/src/cpp/palettes/tones.cc
+@@ -14,6 +14,8 @@
+  * limitations under the License.
+  */
+ 
++#include <cmath>
++
+ #include "cpp/palettes/tones.h"
+ 
+ #include <cmath>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_nasm_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_nasm_BUILD.gn
new file mode 100644
index 0000000000..9908ee758b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_nasm_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/nasm/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/nasm/BUILD.gn
+@@ -63,6 +63,13 @@ config("nasm_config") {
+ 
+   defines = [ "HAVE_CONFIG_H" ]
+ 
++  _string_h_lines =
++        read_file("/usr/include/string.h", "list lines")
++  _mempcpy = filter_include(_string_h_lines, [ "*mempcpy*" ])
++  if (_mempcpy != []) {
++    defines += [ "HAVE_MEMPCPY=1" ]
++  }
++
+   if (is_clang) {
+     cflags = [
+       # The inline functions in NASM's headers flag this.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_nasm_config_config-linux.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_nasm_config_config-linux.h
new file mode 100644
index 0000000000..e0769a7d37
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_nasm_config_config-linux.h
@@ -0,0 +1,108 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/nasm/config/config-linux.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/nasm/config/config-linux.h
+@@ -160,7 +160,7 @@
+ 
+ /* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
+    don't. */
+-#define HAVE_DECL_STRLCPY 0
++#define HAVE_DECL_STRLCPY 1
+ 
+ /* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
+    don't. */
+@@ -183,7 +183,7 @@
+ #define HAVE_DECL_STRSEP 1
+ 
+ /* Define to 1 if you have the <endian.h> header file. */
+-#define HAVE_ENDIAN_H 1
++/* #undef HAVE_ENDIAN_H */
+ 
+ /* Define to 1 if you have the `faccessat' function. */
+ #define HAVE_FACCESSAT 1
+@@ -327,16 +327,16 @@
+ #define HAVE_ISASCII 1
+ 
+ /* Define to 1 if you have the `iscntrl' function. */
+-/* #undef HAVE_ISCNTRL */
++#define HAVE_ISCNTRL 1
+ 
+ /* Define to 1 if you have the <machine/endian.h> header file. */
+-/* #undef HAVE_MACHINE_ENDIAN_H */
++#define HAVE_MACHINE_ENDIAN_H 1
+ 
+ /* Define to 1 if you have the <memory.h> header file. */
+ #define HAVE_MEMORY_H 1
+ 
+ /* Define to 1 if you have the `mempcpy' function. */
+-#define HAVE_MEMPCPY 1
++/* #undef HAVE_MEMPCPY */
+ 
+ /* Define to 1 if you have a working `mmap' system call. */
+ #define HAVE_MMAP 1
+@@ -357,7 +357,7 @@
+ #define HAVE_STDARG_H 1
+ 
+ /* Define to 1 if stdbool.h conforms to C99. */
+-/* #undef HAVE_STDBOOL_H */
++#define HAVE_STDBOOL_H 1
+ 
+ /* Define to 1 if your compiler supports C99 extern inline */
+ #define HAVE_STDC_INLINE 1
+@@ -384,7 +384,7 @@
+ #define HAVE_STRING_H 1
+ 
+ /* Define to 1 if you have the `strlcpy' function. */
+-/* #undef HAVE_STRLCPY */
++#define HAVE_STRLCPY 1
+ 
+ /* Define to 1 if you have the `strncasecmp' function. */
+ #define HAVE_STRNCASECMP 1
+@@ -411,7 +411,7 @@
+ #define HAVE_SYSCONF 1
+ 
+ /* Define to 1 if you have the <sys/endian.h> header file. */
+-/* #undef HAVE_SYS_ENDIAN_H */
++#define HAVE_SYS_ENDIAN_H 1
+ 
+ /* Define to 1 if you have the <sys/mman.h> header file. */
+ #define HAVE_SYS_MMAN_H 1
+@@ -486,13 +486,13 @@
+ /* #undef HAVE__STATI64 */
+ 
+ /* Define to 1 if you have the `__bswap_16' intrinsic function. */
+-#define HAVE___BSWAP_16 1
++/* #undef HAVE___BSWAP_16 */
+ 
+ /* Define to 1 if you have the `__bswap_32' intrinsic function. */
+-#define HAVE___BSWAP_32 1
++/* #undef HAVE___BSWAP_32 */
+ 
+ /* Define to 1 if you have the `__bswap_64' intrinsic function. */
+-#define HAVE___BSWAP_64 1
++/* #undef HAVE___BSWAP_64 */
+ 
+ /* Define to 1 if you have the `__builtin_bswap16' intrinsic function. */
+ #define HAVE___BUILTIN_BSWAP16 1
+@@ -620,7 +620,7 @@
+ /* Define to the equivalent of the C99 'restrict' keyword, or to
+    nothing if this is not supported.  Do not define if restrict is
+    supported directly.  */
+-#define restrict __restrict
++#define restrict __restrict__
+ /* Work around a bug in Sun C++: it does not support _Restrict or
+    __restrict__, even though the corresponding Sun C compiler ends up with
+    "#define restrict _Restrict" or "#define restrict __restrict__" in the
+@@ -637,7 +637,7 @@
+ /* Define if your snprintf function is not named snprintf. */
+ /* #undef snprintf */
+ 
+-/* Define if your typeof operator is not named typeof. */
++/* Define if your typeof operator is not named `typeof'. */
+ #define typeof __typeof
+ 
+ /* Define to the type of an unsigned integer type wide enough to hold a
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_node_node.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_node_node.gni
new file mode 100644
index 0000000000..98a79e44f5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_node_node.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/node/node.gni.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/node/node.gni
+@@ -21,7 +21,7 @@ template("node") {
+     # When use_remoteexec=true or use_siso=true, node actions run on remote
+     # Linux worker. So it should include linux node binary in inputs.
+     if (!is_qtwebengine) {
+-      if (is_linux || is_chromeos || use_remoteexec || use_siso) {
++      if ((is_linux || is_chromeos || use_remoteexec || use_siso) && !is_bsd) {
+         inputs += [
+           "//third_party/node/linux/node-linux-x64.tar.gz.sha1",
+           "//third_party/node/linux/node-linux-x64/bin/node",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_node_node.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_node_node.py
new file mode 100644
index 0000000000..47c0eec7cb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_node_node.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/node/node.py.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/node/node.py
+@@ -35,6 +35,9 @@ def GetBinaryPath():
+   return os_path.join(os_path.dirname(__file__), *{
+     'Darwin': ('mac', darwin_name, 'bin', 'node'),
+     'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
++    'OpenBSD': ('openbsd', 'node-openbsd', 'bin', 'node'),
++    'FreeBSD': ('freebsd', 'node-freebsd', 'bin', 'node'),
++    'NetBSD': ('netbsd', 'node-netbsd', 'bin', 'node'),
+     'Windows': ('win', 'node.exe'),
+   }[platform.system()])
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fpdfapi_page_cpdf__psengine.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fpdfapi_page_cpdf__psengine.cpp
new file mode 100644
index 0000000000..be0b81d0dc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fpdfapi_page_cpdf__psengine.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_psengine.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_psengine.cpp
+@@ -75,7 +75,7 @@ constexpr PDF_PSOpName kPsOpNames[] = {
+ // Round half up is a nearest integer round with half-way numbers always rounded
+ // up. Example: -5.5 rounds to -5.
+ float RoundHalfUp(float f) {
+-  if (isnan(f))
++  if (std::isnan(f))
+     return 0;
+   if (f > std::numeric_limits<float>::max() - 0.5f)
+     return std::numeric_limits<float>::max();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp
new file mode 100644
index 0000000000..a87b472022
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_cfx__fontmapper.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/pdfium/core/fxge/cfx_fontmapper.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/core/fxge/cfx_fontmapper.cpp
+@@ -157,7 +157,7 @@ constexpr AltFontFamily kAltFontFamilies
+     {"ForteMT", "Forte"},
+ };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(OS_ASMJS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(OS_ASMJS) || BUILDFLAG(IS_BSD)
+ const char kNarrowFamily[] = "LiberationSansNarrow";
+ #elif BUILDFLAG(IS_ANDROID)
+ const char kNarrowFamily[] = "RobotoCondensed";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp
new file mode 100644
index 0000000000..ad72232a2f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/pdfium/core/fxge/linux/fx_linux_impl.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/core/fxge/linux/fx_linux_impl.cpp
+@@ -18,7 +18,7 @@
+ #include "third_party/base/check.h"
+ 
+ #if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !defined(OS_FUCHSIA) && \
+-    !defined(OS_ASMJS)
++    !defined(OS_ASMJS) && !BUILDFLAG(IS_BSD)
+ #error "Included on the wrong platform"
+ #endif
+ 
+@@ -166,9 +166,8 @@ class CLinuxPlatform : public CFX_GEModu
+   std::unique_ptr<SystemFontInfoIface> CreateDefaultSystemFontInfo() override {
+     auto pInfo = std::make_unique<CFX_LinuxFontInfo>();
+     if (!pInfo->ParseFontCfg(CFX_GEModule::Get()->GetUserFontPaths())) {
+-      pInfo->AddPath("/usr/share/fonts");
+-      pInfo->AddPath("/usr/share/X11/fonts/Type1");
+-      pInfo->AddPath("/usr/share/X11/fonts/TTF");
++      pInfo->AddPath("/usr/X11R6/lib/X11/fonts/Type1");
++      pInfo->AddPath("/usr/X11R6/lib/X11/fonts/TTF");
+       pInfo->AddPath("/usr/local/share/fonts");
+     }
+     return pInfo;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_cjs__publicmethods.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_cjs__publicmethods.cpp
new file mode 100644
index 0000000000..311ad78ad2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_cjs__publicmethods.cpp
@@ -0,0 +1,58 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp
+@@ -442,7 +442,7 @@ double CJS_PublicMethods::ParseDateUsing
+ 
+   if (status == fxjs::ConversionStatus::kBadDate) {
+     dRet = JS_DateParse(isolate, value);
+-    if (!isnan(dRet))
++    if (!std::isnan(dRet))
+       return dRet;
+   }
+ 
+@@ -904,7 +904,7 @@ CJS_Result CJS_PublicMethods::AFDate_For
+                                  nullptr);
+   }
+ 
+-  if (isnan(dDate)) {
++  if (std::isnan(dDate)) {
+     WideString swMsg = WideString::Format(
+         JSGetStringFromID(JSMessage::kParseDateError).c_str(), sFormat.c_str());
+     AlertIfPossible(pEvent, L"AFDate_FormatEx", swMsg);
+@@ -946,7 +946,7 @@ double CJS_PublicMethods::ParseDateAsGMT
+   int nYear = StringToFloat(wsArray[7].AsStringView());
+   double dRet = FX_MakeDate(FX_MakeDay(nYear, nMonth - 1, nDay),
+                             FX_MakeTime(nHour, nMin, nSec, 0));
+-  if (isnan(dRet))
++  if (std::isnan(dRet))
+     dRet = JS_DateParse(isolate, strValue);
+ 
+   return dRet;
+@@ -976,7 +976,7 @@ CJS_Result CJS_PublicMethods::AFDate_Key
+   WideString sFormat = pRuntime->ToWideString(params[0]);
+   double dRet = ParseDateUsingFormat(pRuntime->GetIsolate(), strValue, sFormat,
+                                      &bWrongFormat);
+-  if (bWrongFormat || isnan(dRet)) {
++  if (bWrongFormat || std::isnan(dRet)) {
+     WideString swMsg = WideString::Format(
+         JSGetStringFromID(JSMessage::kParseDateError).c_str(), sFormat.c_str());
+     AlertIfPossible(pEvent, L"AFDate_KeystrokeEx", swMsg);
+@@ -1233,7 +1233,7 @@ CJS_Result CJS_PublicMethods::AFParseDat
+   WideString sFormat = pRuntime->ToWideString(params[1]);
+   double dDate =
+       ParseDateUsingFormat(pRuntime->GetIsolate(), sValue, sFormat, nullptr);
+-  if (isnan(dDate)) {
++  if (std::isnan(dDate)) {
+     WideString swMsg = WideString::Format(
+         JSGetStringFromID(JSMessage::kParseDateError).c_str(), sFormat.c_str());
+     AlertIfPossible(pRuntime->GetCurrentEventContext(), L"AFParseDateEx",
+@@ -1252,7 +1252,7 @@ CJS_Result CJS_PublicMethods::AFSimple(
+   WideString sFunction = pRuntime->ToWideString(params[0]);
+   double arg1 = pRuntime->ToDouble(params[1]);
+   double arg2 = pRuntime->ToDouble(params[2]);
+-  if (isnan(arg1) || isnan(arg2))
++  if (std::isnan(arg1) || std::isnan(arg2))
+     return CJS_Result::Failure(JSMessage::kValueError);
+ 
+   absl::optional<double> result = ApplyNamedOperation(sFunction, arg1, arg2);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_fx__date__helpers.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_fx__date__helpers.cpp
new file mode 100644
index 0000000000..27861c3fc0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_fx__date__helpers.cpp
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/pdfium/fxjs/fx_date_helpers.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/fxjs/fx_date_helpers.cpp
+@@ -39,6 +39,11 @@ double GetLocalTZA() {
+     return 0;
+   time_t t = 0;
+   FXSYS_time(&t);
++#ifdef __FreeBSD__
++  struct tm lt;
++  localtime_r(&t, &lt);
++  return (double)(-(lt.tm_gmtoff * 1000));
++#else
+   FXSYS_localtime(&t);
+ #if BUILDFLAG(IS_WIN)
+   // In gcc 'timezone' is a global variable declared in time.h. In VC++, that
+@@ -47,6 +52,7 @@ double GetLocalTZA() {
+   _get_timezone(&timezone);
+ #endif
+   return (double)(-(timezone * 1000));
++#endif // __FreeBSD__
+ }
+ 
+ int GetDaylightSavingTA(double d) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_xfa_cfxjse__formcalc__context.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_xfa_cfxjse__formcalc__context.cpp
new file mode 100644
index 0000000000..5c9c313e22
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_xfa_cfxjse__formcalc__context.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/pdfium/fxjs/xfa/cfxjse_formcalc_context.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/fxjs/xfa/cfxjse_formcalc_context.cpp
+@@ -4162,7 +4162,7 @@ void CFXJSE_FormCalcContext::WordNum(
+     bsLocale = ValueToUTF8String(info.GetIsolate(), localeValue);
+   }
+ 
+-  if (isnan(fNumber) || fNumber < 0.0f || fNumber > 922337203685477550.0f) {
++  if (std::isnan(fNumber) || fNumber < 0.0f || fNumber > 922337203685477550.0f) {
+     info.GetReturnValue().Set(fxv8::NewStringHelper(info.GetIsolate(), "*"));
+     return;
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni
new file mode 100644
index 0000000000..c4b39b3881
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/pdfium/pdfium.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/pdfium.gni
+@@ -42,7 +42,7 @@ declare_args() {
+   # PDFium will use PartitionAlloc partitions to separate strings, scalars,
+   # etc. from other allocations. However, the use of PartitionAlloc for new or
+   # malloc is controlled by args in build_overrides/partition_alloc.gni.
+-  pdf_use_partition_alloc = pdf_use_partition_alloc_override
++  pdf_use_partition_alloc = pdf_use_partition_alloc_override && use_partition_alloc_as_malloc
+ 
+   # Build PDFium to use Skia (experimental) for all PDFium graphics.
+   # If enabled, coexists in build with AGG graphics and the default
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_third__party_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_third__party_BUILD.gn
new file mode 100644
index 0000000000..fce01427ac
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_third__party_BUILD.gn
@@ -0,0 +1,16 @@
+$NetBSD$
+
+The system library is libpng16.  (Otherwise gn writes -lpng into
+src/core/Release/x86_64/QtWebEngineCore_libs.rsp)
+
+--- src/3rdparty/chromium/third_party/pdfium/third_party/BUILD.gn.orig	2025-01-24 10:49:20.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/third_party/BUILD.gn
+@@ -441,7 +441,7 @@ source_set("fx_libopenjpeg") {
+ }
+ 
+ config("system_libpng_config") {
+-  libs = [ "png" ]
++  libs = [ "png16" ]
+   defines = [ "USE_SYSTEM_LIBPNG" ]
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp
new file mode 100644
index 0000000000..e60edb37d4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_pdfium_xfa_fxfa_parser_cxfa__timezoneprovider.cpp
@@ -0,0 +1,47 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/pdfium/xfa/fxfa/parser/cxfa_timezoneprovider.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/pdfium/xfa/fxfa/parser/cxfa_timezoneprovider.cpp
+@@ -6,12 +6,16 @@
+ 
+ #include "xfa/fxfa/parser/cxfa_timezoneprovider.h"
+ 
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <time.h>
+ 
+ #include "build/build_config.h"
+ 
+ static bool g_bProviderTimeZoneSet = false;
++#if defined(OS_FREEBSD)
++static long g_lTimeZoneOffset = 0;
++#endif
+ 
+ #if BUILDFLAG(IS_WIN)
+ #define TIMEZONE _timezone
+@@ -24,9 +28,21 @@ static bool g_bProviderTimeZoneSet = fal
+ CXFA_TimeZoneProvider::CXFA_TimeZoneProvider() {
+   if (!g_bProviderTimeZoneSet) {
+     g_bProviderTimeZoneSet = true;
++#if defined(OS_FREEBSD)
++    time_t now = time(nullptr);
++    struct tm tm = {};
++
++    localtime_r(&now, &tm);
++    g_lTimeZoneOffset = tm.tm_gmtoff;
++#else
+     TZSET();
++#endif
+   }
++#if defined(OS_FREEBSD)
++  tz_minutes_ = static_cast<int8_t>((abs(g_lTimeZoneOffset) % 3600) / 60);
++#else
+   tz_minutes_ = TIMEZONE / -60;
++#endif
+ }
+ 
+ CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() = default;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_build__config.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_build__config.h
new file mode 100644
index 0000000000..dc52376166
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_build__config.h
@@ -0,0 +1,72 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/build_config.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/build_config.h
+@@ -27,6 +27,7 @@
+ #if defined(__ANDROID__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() 0
+@@ -38,6 +39,7 @@
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FUCHSIA() 0
+@@ -51,9 +53,10 @@
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_IOS() 0
+ #endif
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 1
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() 0
+@@ -64,6 +67,8 @@
+ #elif defined(_WIN32)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FREEBSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() 0
+@@ -74,6 +79,8 @@
+ #elif defined(__EMSCRIPTEN__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FREEBSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() 0
+@@ -87,6 +94,8 @@
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_IOS() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FREEBSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FUCHSIA() 1
+@@ -94,6 +103,8 @@
+ #elif defined(__native_client__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_BSD() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FREEBSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_APPLE() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MAC() 0
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_thread__utils.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_thread__utils.h
new file mode 100644
index 0000000000..23909c7949
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_thread__utils.h
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/thread_utils.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/thread_utils.h
+@@ -34,6 +34,7 @@ __declspec(dllimport) unsigned long __st
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <pthread.h>
+ #else
+ #include <pthread.h>
+ #endif
+@@ -46,6 +47,11 @@ using PlatformThreadId = pid_t;
+ inline PlatformThreadId GetThreadId() {
+   return gettid();
+ }
++#elif PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
++using PlatformThreadId = uint64_t;
++inline PlatformThreadId GetThreadId() {
++  return reinterpret_cast<uint64_t>(pthread_self());
++}
+ #elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX)
+ using PlatformThreadId = pid_t;
+ inline PlatformThreadId GetThreadId() {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_time.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_time.h
new file mode 100644
index 0000000000..568b73cc69
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_base_time.h
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/time.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/time.h
+@@ -199,6 +199,9 @@ inline TimeNanos GetTimeInternalNs(clock
+ // Return ns from boot. Conversely to GetWallTimeNs, this clock counts also time
+ // during suspend (when supported).
+ inline TimeNanos GetBootTimeNs() {
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++  return GetTimeInternalNs(kWallTimeClockSource);
++#else
+   // Determine if CLOCK_BOOTTIME is available on the first call.
+   static const clockid_t kBootTimeClockSource = [] {
+     struct timespec ts = {};
+@@ -206,6 +209,7 @@ inline TimeNanos GetBootTimeNs() {
+     return res == 0 ? CLOCK_BOOTTIME : kWallTimeClockSource;
+   }();
+   return GetTimeInternalNs(kBootTimeClockSource);
++#endif
+ }
+ 
+ inline TimeNanos GetWallTimeNs() {
+@@ -213,7 +217,13 @@ inline TimeNanos GetWallTimeNs() {
+ }
+ 
+ inline TimeNanos GetWallTimeRawNs() {
++#if defined(__OpenBSD__) || defined(__NetBSD__)
++  return GetTimeInternalNs(CLOCK_MONOTONIC);
++#elif defined(__FreeBSD__)
++  return GetTimeInternalNs(CLOCK_MONOTONIC_FAST);
++#else
+   return GetTimeInternalNs(CLOCK_MONOTONIC_RAW);
++#endif
+ }
+ 
+ inline TimeNanos GetThreadCPUTimeNs() {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_event__fd.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_event__fd.h
new file mode 100644
index 0000000000..828fe17ea1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_event__fd.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/event_fd.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/event_fd.h
+@@ -55,6 +55,8 @@ class EventFd {
+   // On Mac and other non-Linux UNIX platforms a pipe-based fallback is used.
+   // The write end of the wakeup pipe.
+   ScopedFile write_fd_;
++#else
++  ScopedFile write_fd_;
+ #endif
+ };
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_thread__utils.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_thread__utils.h
new file mode 100644
index 0000000000..30a8c41771
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_thread__utils.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+@@ -41,9 +41,10 @@
+ namespace perfetto {
+ namespace base {
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++    PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+ // Sets the "comm" of the calling thread to the first 15 chars of the given
+ // string.
+ inline bool MaybeSetThreadName(const std::string& name) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h
new file mode 100644
index 0000000000..6185718cac
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_tracing_internal_track__event__legacy.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_legacy.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_legacy.h
+@@ -249,7 +249,7 @@ class PERFETTO_EXPORT_COMPONENT LegacyTr
+ // are different. E.g. on Mac size_t is considered a different type from
+ // uint64_t even though it has the same size and signedness.
+ // Below we add overloads for those types that are known to cause ambiguity.
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || defined(__OpenBSD__)
+   explicit LegacyTraceId(size_t raw_id) : raw_id_(raw_id) {}
+   explicit LegacyTraceId(intptr_t raw_id)
+       : raw_id_(static_cast<uint64_t>(raw_id)) {}
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto
new file mode 100644
index 0000000000..dd46feeb98
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_protos_perfetto_trace_ftrace_v4l2.proto
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/protos/perfetto/trace/ftrace/v4l2.proto.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/protos/perfetto/trace/ftrace/v4l2.proto
+@@ -10,7 +10,7 @@ message V4l2QbufFtraceEvent {
+   optional uint32 field = 2;
+   optional uint32 flags = 3;
+   optional uint32 index = 4;
+-  optional int32 minor = 5;
++  optional int32 gminor = 5;
+   optional uint32 sequence = 6;
+   optional uint32 timecode_flags = 7;
+   optional uint32 timecode_frames = 8;
+@@ -30,7 +30,7 @@ message V4l2DqbufFtraceEvent {
+   optional uint32 field = 2;
+   optional uint32 flags = 3;
+   optional uint32 index = 4;
+-  optional int32 minor = 5;
++  optional int32 gminor = 5;
+   optional uint32 sequence = 6;
+   optional uint32 timecode_flags = 7;
+   optional uint32 timecode_frames = 8;
+@@ -48,7 +48,7 @@ message V4l2DqbufFtraceEvent {
+ message Vb2V4l2BufQueueFtraceEvent {
+   optional uint32 field = 1;
+   optional uint32 flags = 2;
+-  optional int32 minor = 3;
++  optional int32 gminor = 3;
+   optional uint32 sequence = 4;
+   optional uint32 timecode_flags = 5;
+   optional uint32 timecode_frames = 6;
+@@ -65,7 +65,7 @@ message Vb2V4l2BufQueueFtraceEvent {
+ message Vb2V4l2BufDoneFtraceEvent {
+   optional uint32 field = 1;
+   optional uint32 flags = 2;
+-  optional int32 minor = 3;
++  optional int32 gminor = 3;
+   optional uint32 sequence = 4;
+   optional uint32 timecode_flags = 5;
+   optional uint32 timecode_frames = 6;
+@@ -82,7 +82,7 @@ message Vb2V4l2BufDoneFtraceEvent {
+ message Vb2V4l2QbufFtraceEvent {
+   optional uint32 field = 1;
+   optional uint32 flags = 2;
+-  optional int32 minor = 3;
++  optional int32 gminor = 3;
+   optional uint32 sequence = 4;
+   optional uint32 timecode_flags = 5;
+   optional uint32 timecode_frames = 6;
+@@ -99,7 +99,7 @@ message Vb2V4l2QbufFtraceEvent {
+ message Vb2V4l2DqbufFtraceEvent {
+   optional uint32 field = 1;
+   optional uint32 flags = 2;
+-  optional int32 minor = 3;
++  optional int32 gminor = 3;
+   optional uint32 sequence = 4;
+   optional uint32 timecode_flags = 5;
+   optional uint32 timecode_frames = 6;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_event__fd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_event__fd.cc
new file mode 100644
index 0000000000..823108b801
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_event__fd.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/base/event_fd.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/base/event_fd.cc
+@@ -22,7 +22,8 @@
+ #if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
+ #include <Windows.h>
+ #include <synchapi.h>
+-#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#elif (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ #include <sys/eventfd.h>
+ #include <unistd.h>
+@@ -57,7 +58,8 @@ void EventFd::Clear() {
+     PERFETTO_DFATAL("EventFd::Clear()");
+ }
+ 
+-#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#elif (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ 
+ EventFd::EventFd() {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_periodic__task.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_periodic__task.cc
new file mode 100644
index 0000000000..0ec28dc329
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_periodic__task.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/base/periodic_task.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/base/periodic_task.cc
+@@ -24,7 +24,7 @@
+ #include "perfetto/base/time.h"
+ #include "perfetto/ext/base/file_utils.h"
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     (PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && __ANDROID_API__ >= 19)
+ #include <sys/timerfd.h>
+ #endif
+@@ -44,7 +44,7 @@ uint32_t GetNextDelayMs(const TimeMillis
+ }
+ 
+ ScopedPlatformHandle CreateTimerFd(const PeriodicTask::Args& args) {
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     (PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && __ANDROID_API__ >= 19)
+   ScopedPlatformHandle tfd(
+       timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_string__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_string__utils.cc
new file mode 100644
index 0000000000..5d18738bd1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_string__utils.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/base/string_utils.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/base/string_utils.cc
+@@ -38,9 +38,10 @@ namespace base {
+ 
+ // Locale-independant as possible version of strtod.
+ double StrToD(const char* nptr, char** endptr) {
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++    PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   static auto c_locale = newlocale(LC_ALL, "C", nullptr);
+   return strtod_l(nptr, endptr, c_locale);
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_subprocess__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_subprocess__posix.cc
new file mode 100644
index 0000000000..a334d87c19
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_subprocess__posix.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/base/subprocess_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/base/subprocess_posix.cc
+@@ -35,7 +35,8 @@
+ #include <thread>
+ #include <tuple>
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ #include <sys/prctl.h>
+ #endif
+@@ -64,7 +65,8 @@ struct ChildProcessArgs {
+ // Don't add any dynamic allocation in this function. This will be invoked
+ // under a fork(), potentially in a state where the allocator lock is held.
+ void __attribute__((noreturn)) ChildProcess(ChildProcessArgs* args) {
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+   // In no case we want a child process to outlive its parent process. This is
+   // relevant for tests, so that a test failure/crash doesn't leave child
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_thread__task__runner.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_thread__task__runner.cc
new file mode 100644
index 0000000000..560a301941
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_thread__task__runner.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/base/thread_task_runner.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/base/thread_task_runner.cc
+@@ -27,8 +27,9 @@
+ #include "perfetto/ext/base/thread_utils.h"
+ #include "perfetto/ext/base/unix_task_runner.h"
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+ #include <sys/prctl.h>
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc
new file mode 100644
index 0000000000..624a4666cb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_unix__socket.cc
@@ -0,0 +1,46 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/base/unix_socket.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/base/unix_socket.cc
+@@ -44,7 +44,7 @@
+ #include <unistd.h>
+ #endif
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/ucred.h>
+ #endif
+ 
+@@ -917,15 +917,27 @@ void UnixSocket::ReadPeerCredentialsPosi
+     return;
+   PERFETTO_CHECK(peer_cred_mode_ != SockPeerCredMode::kIgnore);
+ 
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
++  struct sockpeercred user_cred;
++#else
+   struct ucred user_cred;
++#endif
+   socklen_t len = sizeof(user_cred);
+   int fd = sock_raw_.fd();
+   int res = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &user_cred, &len);
+   PERFETTO_CHECK(res == 0);
+   peer_uid_ = user_cred.uid;
+   peer_pid_ = user_cred.pid;
++#elif defined(__NetBSD__)
++  struct unpcbid user_cred;
++  socklen_t len = sizeof(user_cred);
++  int fd = sock_raw_.fd();
++  int res = getsockopt(fd, 0, LOCAL_PEEREID, &user_cred, &len);
++  PERFETTO_CHECK(res == 0);
++  peer_uid_ = user_cred.unp_euid;
++  peer_pid_ = user_cred.unp_pid;
+ #elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
+   struct xucred user_cred;
+   socklen_t len = sizeof(user_cred);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_utils.cc
new file mode 100644
index 0000000000..62da8ecaf2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_base_utils.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/base/utils.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/base/utils.cc
+@@ -27,7 +27,8 @@
+ #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) ||   \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA)
++    PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA) || \
++    PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+ #include <limits.h>
+ #include <stdlib.h>  // For _exit()
+ #include <unistd.h>  // For getpagesize() and geteuid() & fork()
+@@ -260,14 +261,22 @@ void Daemonize(std::function<int()> pare
+ 
+ std::string GetCurExecutablePath() {
+   std::string self_path;
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) ||   \
+     PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA)
++    PERFETTO_BUILDFLAG(PERFETTO_OS_FUCHSIA)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   char buf[PATH_MAX];
+   ssize_t size = readlink("/proc/self/exe", buf, sizeof(buf));
+   PERFETTO_CHECK(size != -1);
+   // readlink does not null terminate.
+   self_path = std::string(buf, static_cast<size_t>(size));
++#elif PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
++  char *buf;
++  const char *cpath = "@PREFIX@/lib/chromium/chrome";
++  if ((buf = getenv("CHROME_EXE_PATH")) != NULL)
++    self_path = std::string(buf);
++  else
++    self_path = std::string(cpath);
+ #elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
+   uint32_t size = 0;
+   PERFETTO_CHECK(_NSGetExecutablePath(nullptr, &size));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_db_column_utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_db_column_utils.cc
new file mode 100644
index 0000000000..0117a0db25
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_db_column_utils.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+for std::floor and std::ceil on NetBSD   XXXXX
+
+--- src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column/utils.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column/utils.cc
+@@ -14,6 +14,7 @@
+  * limitations under the License.
+  */
+ 
++#include "cmath"
+ #include "src/trace_processor/db/column/utils.h"
+ 
+ namespace perfetto {
+@@ -40,12 +41,12 @@ SearchValidationResult CompareIntColumnW
+ 
+     case FilterOp::kLe:
+     case FilterOp::kGt:
+-      *sql_val = SqlValue::Long(static_cast<int64_t>(std::floor(double_val)));
++      *sql_val = SqlValue::Long(static_cast<int64_t>(floor(double_val)));
+       return SearchValidationResult::kOk;
+ 
+     case FilterOp::kLt:
+     case FilterOp::kGe:
+-      *sql_val = SqlValue::Long(static_cast<int64_t>(std::ceil(double_val)));
++      *sql_val = SqlValue::Long(static_cast<int64_t>(ceil(double_val)));
+       return SearchValidationResult::kOk;
+ 
+     case FilterOp::kIsNotNull:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc
new file mode 100644
index 0000000000..934f534342
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_trace__processor_importers_ftrace_v4l2__tracker.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/ftrace/v4l2_tracker.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/ftrace/v4l2_tracker.cc
+@@ -62,7 +62,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kV4l2QbufFieldNumber: {
+       V4l2QbufFtraceEvent::Decoder pb_evt(bytes.data, bytes.size);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = pb_evt.index();
+       evt.type = pb_evt.type();
+       evt.bytesused = pb_evt.bytesused();
+@@ -103,7 +103,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kV4l2DqbufFieldNumber: {
+       V4l2DqbufFtraceEvent::Decoder pb_evt(bytes.data, bytes.size);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = pb_evt.index();
+       evt.type = pb_evt.type();
+       evt.bytesused = pb_evt.bytesused();
+@@ -149,7 +149,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kVb2V4l2BufQueueFieldNumber: {
+       Vb2V4l2BufQueueFtraceEvent::Decoder pb_evt(bytes.data, bytes.size);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = std::nullopt;
+       evt.type = std::nullopt;
+       evt.bytesused = std::nullopt;
+@@ -180,7 +180,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kVb2V4l2BufDoneFieldNumber: {
+       Vb2V4l2BufDoneFtraceEvent::Decoder pb_evt(bytes.data, bytes.size);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = std::nullopt;
+       evt.type = std::nullopt;
+       evt.bytesused = std::nullopt;
+@@ -211,7 +211,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kVb2V4l2QbufFieldNumber: {
+       Vb2V4l2QbufFtraceEvent::Decoder pb_evt(bytes.data, bytes.size);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = std::nullopt;
+       evt.type = std::nullopt;
+       evt.bytesused = std::nullopt;
+@@ -242,7 +242,7 @@ void V4l2Tracker::ParseV4l2Event(uint64_
+     case FtraceEvent::kVb2V4l2DqbufFieldNumber: {
+       Vb2V4l2DqbufFtraceEvent::Decoder pb_evt(bytes.data, bytes.size);
+       BufferEvent evt;
+-      evt.device_minor = pb_evt.minor();
++      evt.device_minor = pb_evt.gminor();
+       evt.index = std::nullopt;
+       evt.type = std::nullopt;
+       evt.bytesused = std::nullopt;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc
new file mode 100644
index 0000000000..cc058c9adf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_core_tracing__service__impl.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/third_party/perfetto/src/tracing/core/tracing_service_impl.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/tracing/core/tracing_service_impl.cc
+@@ -3244,7 +3244,8 @@ bool TracingServiceImpl::SnapshotClocks(
+ 
+ #if !PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) && \
+     !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) &&   \
+-    !PERFETTO_BUILDFLAG(PERFETTO_OS_NACL)
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) &&  \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   struct {
+     clockid_t id;
+     protos::pbzero::BuiltinClock type;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_ipc_memfd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_ipc_memfd.cc
new file mode 100644
index 0000000000..7bf7d23196
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_ipc_memfd.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/tracing/ipc/memfd.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/tracing/ipc/memfd.cc
+@@ -20,7 +20,8 @@
+ 
+ #define PERFETTO_MEMFD_ENABLED()             \
+   PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+-      PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX)
++      (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && \
++      !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD))
+ 
+ #if PERFETTO_MEMFD_ENABLED()
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_platform__posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_platform__posix.cc
new file mode 100644
index 0000000000..3022903e76
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_platform__posix.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/tracing/platform_posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/tracing/platform_posix.cc
+@@ -110,12 +110,13 @@ std::unique_ptr<base::TaskRunner> Platfo
+ }
+ 
+ std::string PlatformPosix::GetCurrentProcessName() {
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   std::string cmdline;
+   base::ReadFile("/proc/self/cmdline", &cmdline);
+   return cmdline.substr(0, cmdline.find('\0'));
+-#elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
++#elif PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) || PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   return std::string(getprogname());
+ #else
+   return "unknown_producer";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_track.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_track.cc
new file mode 100644
index 0000000000..70870e97c3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_perfetto_src_tracing_track.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/perfetto/src/tracing/track.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/perfetto/src/tracing/track.cc
+@@ -60,8 +60,9 @@ protos::gen::TrackDescriptor ProcessTrac
+   auto desc = Track::Serialize();
+   auto pd = desc.mutable_process();
+   pd->set_pid(static_cast<int32_t>(pid));
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
+-    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
++    PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \
++    !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   std::string cmdline;
+   if (base::ReadFile("/proc/self/cmdline", &cmdline)) {
+     // Since cmdline is a zero-terminated list of arguments, this ends up
+@@ -155,7 +156,7 @@ namespace internal {
+ namespace {
+ 
+ uint64_t GetProcessStartTime() {
+-#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
++#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD)
+   std::string stat;
+   if (!base::ReadFile("/proc/self/stat", &stat))
+     return 0u;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_base_SkContainers.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_base_SkContainers.cpp
new file mode 100644
index 0000000000..7e530f4b0c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_base_SkContainers.cpp
@@ -0,0 +1,27 @@
+$NetBSD$
+
+Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/skia/src/base/SkContainers.cpp.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/skia/src/base/SkContainers.cpp
+@@ -14,7 +14,8 @@
+ 
+ #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
+ #include <malloc/malloc.h>
+-#elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_UNIX)
++#elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_UNIX) && !defined(__OpenBSD__) && \
++    !defined(__NetBSD__)
+ #include <malloc.h>
+ #elif defined(SK_BUILD_FOR_WIN)
+ #include <malloc.h>
+@@ -38,7 +39,7 @@ SkSpan<std::byte> complete_size(void* pt
+     #elif defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 17
+         completeSize = malloc_usable_size(ptr);
+         SkASSERT(completeSize >= size);
+-    #elif defined(SK_BUILD_FOR_UNIX)
++    #elif defined(SK_BUILD_FOR_UNIX) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+         completeSize = malloc_usable_size(ptr);
+         SkASSERT(completeSize >= size);
+     #elif defined(SK_BUILD_FOR_WIN)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h
new file mode 100644
index 0000000000..e62b252a38
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_gpu_ganesh_GrAutoLocaleSetter.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/skia/src/gpu/ganesh/GrAutoLocaleSetter.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/skia/src/gpu/ganesh/GrAutoLocaleSetter.h
+@@ -27,7 +27,7 @@
+ #define HAVE_XLOCALE 0
+ #endif
+ 
+-#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION)
++#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__NetBSD__)
+ #define HAVE_LOCALE_T 0
+ #else
+ #define HAVE_LOCALE_T 1
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkOSFile__posix.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkOSFile__posix.cpp
new file mode 100644
index 0000000000..9c8d737b64
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkOSFile__posix.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/skia/src/ports/SkOSFile_posix.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/skia/src/ports/SkOSFile_posix.cpp
+@@ -25,7 +25,7 @@
+ #endif
+ 
+ void sk_fsync(FILE* f) {
+-#if !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) && !defined(_NEWLIB_VERSION)
++#if !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) && !defined(_NEWLIB_VERSION) && !defined(__OpenBSD__)
+     int fd = fileno(f);
+     fsync(fd);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_speech-dispatcher_libspeechd__version.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_speech-dispatcher_libspeechd__version.h
new file mode 100644
index 0000000000..df262d7926
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_speech-dispatcher_libspeechd__version.h
@@ -0,0 +1,38 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/speech-dispatcher/libspeechd_version.h.orig	2024-12-21 10:25:10.792904662 +0000
++++ src/3rdparty/chromium/third_party/speech-dispatcher/libspeechd_version.h
+@@ -0,0 +1,29 @@
++/*
++ * libspeechd_version.h - Shared library for easy access to Speech Dispatcher functions (header)
++ *
++ * Copyright (C) 2001, 2002, 2003, 2004 Brailcom, o.p.s.
++ *
++ * This is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU Lesser General Public License as published by
++ * the Free Software Foundation; either version 2.1, or (at your option)
++ * any later version.
++ *
++ * This software is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
++ *
++ * Id: patch-third_party_speech-dispatcher_libspeechd_version_h,v 1.4 2024/03/22 13:10:56 robert
++ */
++
++#ifndef _LIBSPEECHD_VERSION_H
++#define _LIBSPEECHD_VERSION_H
++
++#define LIBSPEECHD_MAJOR_VERSION 0
++#define LIBSPEECHD_MINOR_VERSION 11
++#define LIBSPEECHD_MICRO_VERSION 5
++
++#endif /* ifndef _LIBSPEECHD_VERSION_H */
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_speech-dispatcher_speechd__types.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_speech-dispatcher_speechd__types.h
new file mode 100644
index 0000000000..66cdcfa8ea
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_speech-dispatcher_speechd__types.h
@@ -0,0 +1,148 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/speech-dispatcher/speechd_types.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/speech-dispatcher/speechd_types.h
+@@ -119,4 +119,139 @@ typedef struct {
+ 	SPDVoice voice;
+ } SPDMsgSettings;
+ 
++/* TEMP_FAILURE_RETRY seems to be available only on Linux. For systems that
++ * don't have this macro we provide our own version. This code was taken from
++ * file "/usr/include/unistd.h" from Debian package "libc6-dev"
++ * version 2.3.2.ds1-20. */
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++	(__extension__ \
++	 ({ long int __result; \
++		do __result = (long int) (expression); \
++		while (__result == -1L && errno == EINTR); \
++		__result; }))
++#endif
++
++#endif /* not ifndef SPEECHD_TYPES */
++
++/*
++ * speechd_types.h - types for Speech Dispatcher
++ *
++ * Copyright (C) 2001, 2002, 2003 Brailcom, o.p.s.
++ *
++ * This is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU Lesser General Public License as published by
++ * the Free Software Foundation; either version 2.1, or (at your option)
++ * any later version.
++ *
++ * This software is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
++ */
++
++#ifndef SPEECHD_TYPES_H
++#define SPEECHD_TYPES_H
++
++typedef enum {
++	SPD_PUNCT_ALL = 0,
++	SPD_PUNCT_NONE = 1,
++	SPD_PUNCT_SOME = 2,
++	SPD_PUNCT_MOST = 3
++} SPDPunctuation;
++
++typedef enum {
++	SPD_CAP_NONE = 0,
++	SPD_CAP_SPELL = 1,
++	SPD_CAP_ICON = 2
++} SPDCapitalLetters;
++
++typedef enum {
++	SPD_SPELL_OFF = 0,
++	SPD_SPELL_ON = 1
++} SPDSpelling;
++
++typedef enum {
++	SPD_MALE1 = 1,
++	SPD_MALE2 = 2,
++	SPD_MALE3 = 3,
++	SPD_FEMALE1 = 4,
++	SPD_FEMALE2 = 5,
++	SPD_FEMALE3 = 6,
++	SPD_CHILD_MALE = 7,
++	SPD_CHILD_FEMALE = 8,
++	SPD_UNSPECIFIED = -1
++} SPDVoiceType;
++
++typedef struct {
++	char *name;		/* Name of the voice (id) */
++	char *language;		/* 2/3-letter ISO language code,
++				 * possibly followed by 2/3-letter ISO region code,
++				 * e.g. en-US */
++	char *variant;		/* a not-well defined string describing dialect etc. */
++} SPDVoice;
++
++typedef enum {
++	SPD_DATA_TEXT = 0,
++	SPD_DATA_SSML = 1
++} SPDDataMode;
++
++typedef enum {
++	SPD_IMPORTANT = 1,
++	SPD_MESSAGE = 2,
++	SPD_TEXT = 3,
++	SPD_NOTIFICATION = 4,
++	SPD_PROGRESS = 5
++} SPDPriority;
++
++typedef enum {
++	SPD_BEGIN = 1,
++	SPD_END = 2,
++	SPD_INDEX_MARKS = 4,
++	SPD_CANCEL = 8,
++	SPD_PAUSE = 16,
++	SPD_RESUME = 32,
++
++	SPD_ALL = 0x3f
++} SPDNotification;
++
++typedef enum {
++	SPD_EVENT_BEGIN,
++	SPD_EVENT_END,
++	SPD_EVENT_INDEX_MARK,
++	SPD_EVENT_CANCEL,
++	SPD_EVENT_PAUSE,
++	SPD_EVENT_RESUME
++} SPDNotificationType;
++
++typedef enum {
++	SORT_BY_TIME = 0,
++	SORT_BY_ALPHABET = 1
++} ESort;
++
++typedef enum {
++	SPD_MSGTYPE_TEXT = 0,
++	SPD_MSGTYPE_SOUND_ICON = 1,
++	SPD_MSGTYPE_CHAR = 2,
++	SPD_MSGTYPE_KEY = 3,
++	SPD_MSGTYPE_SPELL = 99
++} SPDMessageType;
++
++typedef struct {
++	signed int rate;
++	signed int pitch;
++	signed int pitch_range;
++	signed int volume;
++
++	SPDPunctuation punctuation_mode;
++	SPDSpelling spelling_mode;
++	SPDCapitalLetters cap_let_recogn;
++
++	SPDVoiceType voice_type;
++	SPDVoice voice;
++} SPDMsgSettings;
++
+ #endif /* not ifndef SPEECHD_TYPES */
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_BUILD.gn
new file mode 100644
index 0000000000..15e5459a95
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/sqlite/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/sqlite/BUILD.gn
+@@ -142,7 +142,7 @@ config("sqlite_warnings") {
+       ]
+     }
+   }
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     cflags += [
+       # SQLite doesn't believe in compiler warnings, preferring testing.
+       # http://www.sqlite.org/faq.html#q17
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation__dev_sqlite3.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation__dev_sqlite3.c
new file mode 100644
index 0000000000..f3e57b9f60
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation__dev_sqlite3.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/sqlite/src/amalgamation_dev/sqlite3.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/sqlite/src/amalgamation_dev/sqlite3.c
+@@ -20646,6 +20646,9 @@ SQLITE_PRIVATE int sqlite3HeapNearlyFull
+ ** The alloca() routine never returns NULL.  This will cause code paths
+ ** that deal with sqlite3StackAlloc() failures to be unreachable.
+ */
++#if defined(__NetBSD__)
++# undef SQLITE_USE_ALLOCA
++#endif
+ #ifdef SQLITE_USE_ALLOCA
+ # define sqlite3StackAllocRaw(D,N)   alloca(N)
+ # define sqlite3StackAllocRawNN(D,N) alloca(N)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c
new file mode 100644
index 0000000000..a4841646c3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_sqlite_src_amalgamation_sqlite3.c
@@ -0,0 +1,47 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c
+@@ -14187,7 +14187,7 @@ struct fts5_api {
+ ** But _XOPEN_SOURCE define causes problems for Mac OS X, so omit
+ ** it.
+ */
+-#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__)
++#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__FreeBSD__)
+ #  define _XOPEN_SOURCE 600
+ #endif
+ 
+@@ -20633,6 +20633,9 @@ SQLITE_PRIVATE int sqlite3HeapNearlyFull
+ ** The alloca() routine never returns NULL.  This will cause code paths
+ ** that deal with sqlite3StackAlloc() failures to be unreachable.
+ */
++#if defined(__NetBSD__)
++# undef SQLITE_USE_ALLOCA
++#endif
+ #ifdef SQLITE_USE_ALLOCA
+ # define sqlite3StackAllocRaw(D,N)   alloca(N)
+ # define sqlite3StackAllocRawNN(D,N) alloca(N)
+@@ -45183,6 +45186,11 @@ static int unixRandomness(sqlite3_vfs *N
+   memset(zBuf, 0, nBuf);
+   randomnessPid = osGetpid(0);
+ #if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS)
++#if defined(__OpenBSD__)
++  {
++    arc4random_buf(zBuf, nBuf);
++  }
++#else
+   {
+     int fd, got;
+     fd = robust_open("/dev/urandom", O_RDONLY, 0);
+@@ -45199,6 +45207,7 @@ static int unixRandomness(sqlite3_vfs *N
+     }
+   }
+ #endif
++#endif
+   return nBuf;
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_Reactor_Debug.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_Reactor_Debug.cpp
new file mode 100644
index 0000000000..a1965598fc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_Reactor_Debug.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/swiftshader/src/Reactor/Debug.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/swiftshader/src/Reactor/Debug.cpp
+@@ -46,7 +46,8 @@ namespace {
+ 
+ bool IsUnderDebugger()
+ {
+-#if defined(PTRACE) && !defined(__APPLE__) && !defined(__MACH__)
++#if defined(PTRACE) && !defined(__APPLE__) && !defined(__MACH__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && \
++	!defined(__NetBSD__)
+ 	static bool checked = false;
+ 	static bool res = false;
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Configurator.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Configurator.cpp
new file mode 100644
index 0000000000..a2141b0d19
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Configurator.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/swiftshader/src/System/Configurator.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/swiftshader/src/System/Configurator.cpp
+@@ -38,6 +38,9 @@ namespace sw {
+ 
+ Configurator::Configurator(const std::string &filePath)
+ {
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++	return;
++#endif
+ 	std::fstream file(filePath, std::ios::in);
+ 	if(file.fail())
+ 	{
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Linux_MemFd.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Linux_MemFd.cpp
new file mode 100644
index 0000000000..5aee924b25
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_System_Linux_MemFd.cpp
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/swiftshader/src/System/Linux/MemFd.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/swiftshader/src/System/Linux/MemFd.cpp
+@@ -25,6 +25,7 @@
+ #	define MFD_CLOEXEC 0x0001U
+ #endif
+ 
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #if __aarch64__
+ #	define __NR_memfd_create 279
+ #elif __arm__
+@@ -36,6 +37,7 @@
+ #elif __x86_64__
+ #	define __NR_memfd_create 319
+ #endif /* __NR_memfd_create__ */
++#endif
+ 
+ LinuxMemFd::~LinuxMemFd()
+ {
+@@ -63,13 +65,17 @@ bool LinuxMemFd::allocate(const char *na
+ {
+ 	close();
+ 
+-#ifndef __NR_memfd_create
++#if !defined(__NR_memfd_create) || defined(__OpenBSD__)
+ 	TRACE("memfd_create() not supported on this system!");
+ 	return false;
+ #else
+ 	// In the event of no system call this returns -1 with errno set
+ 	// as ENOSYS.
++#if defined(__FreeBSD__) ||  defined(__NetBSD__)
++	fd_ = memfd_create(name, MFD_CLOEXEC);
++#else
+ 	fd_ = syscall(__NR_memfd_create, name, MFD_CLOEXEC);
++#endif
+ 	if(fd_ < 0)
+ 	{
+ 		TRACE("memfd_create() returned %d: %s", errno, strerror(errno));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp
new file mode 100644
index 0000000000..470ebadfd6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_Vulkan_VkSemaphoreExternalLinux.hpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkSemaphoreExternalLinux.hpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/swiftshader/src/Vulkan/VkSemaphoreExternalLinux.hpp
+@@ -49,13 +49,17 @@ public:
+ 	{
+ 		pthread_mutexattr_t mattr;
+ 		pthread_mutexattr_init(&mattr);
++#if 0
+ 		pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED);
++#endif
+ 		pthread_mutex_init(&mutex, &mattr);
+ 		pthread_mutexattr_destroy(&mattr);
+ 
+ 		pthread_condattr_t cattr;
+ 		pthread_condattr_init(&cattr);
++#if 0
+ 		pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_SHARED);
++#endif
+ 		pthread_cond_init(&cond, &cattr);
+ 		pthread_condattr_destroy(&cattr);
+ 	}
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_WSI_libXCB.cpp b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_WSI_libXCB.cpp
new file mode 100644
index 0000000000..363fa5b3cd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_swiftshader_src_WSI_libXCB.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/swiftshader/src/WSI/libXCB.cpp.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/swiftshader/src/WSI/libXCB.cpp
+@@ -57,7 +57,7 @@ LibXcbExports *LibXCB::loadExports()
+ 		}
+ 		else
+ 		{
+-			libxcb = loadLibrary("libxcb.so.1");
++			libxcb = loadLibrary("libxcb.so");
+ 		}
+ 
+ 		if(getProcAddress(RTLD_DEFAULT, "xcb_shm_query_version"))  // Search the global scope for pre-loaded XCB library.
+@@ -66,7 +66,7 @@ LibXcbExports *LibXCB::loadExports()
+ 		}
+ 		else
+ 		{
+-			libshm = loadLibrary("libxcb-shm.so.0");
++			libshm = loadLibrary("libxcb-shm.so");
+ 		}
+ 
+ 		return LibXcbExports(libxcb, libshm);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_BUILD.gn
new file mode 100644
index 0000000000..54f1c7bc50
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_BUILD.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/test_fonts/fontconfig/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/test_fonts/fontconfig/BUILD.gn
+@@ -26,7 +26,11 @@ if (is_linux || is_chromeos) {
+ 
+   copy("fonts_conf") {
+     sources = [ "fonts.conf" ]
+-    outputs = [ "$root_out_dir/etc/fonts/{{source_file_part}}" ]
++    if (is_freebsd) {
++      outputs = [ "$root_out_dir/usr/local/etc/fonts/{{source_file_part}}" ]
++    } else {
++      outputs = [ "$root_out_dir/etc/fonts/{{source_file_part}}" ]
++    }
+   }
+ 
+   if (current_toolchain == host_toolchain) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_fontconfig__util__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_fontconfig__util__linux.cc
new file mode 100644
index 0000000000..26a678f5bb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_fontconfig__util__linux.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/test_fonts/fontconfig/fontconfig_util_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/test_fonts/fontconfig/fontconfig_util_linux.cc
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#include "build/build_config.h"
++
+ #include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h"
+ 
+ #include <fontconfig/fontconfig.h>
+@@ -16,11 +18,15 @@
+ namespace test_fonts {
+ 
+ std::string GetSysrootDir() {
++#if BUILDFLAG(IS_BSD)
++  return std::string(".");
++#else
+   char buf[PATH_MAX + 1];
+   auto count = readlink("/proc/self/exe", buf, PATH_MAX);
+   assert(count > 0);
+   buf[count] = '\0';
+   return dirname(buf);
++#endif
+ }
+ 
+ void SetUpFontconfig() {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
new file mode 100644
index 0000000000..dae7c96b0a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_test__fonts_fontconfig_generate__fontconfig__caches.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
+@@ -28,7 +28,7 @@ int main() {
+   // fontconfig cache.
+   //     $ echo -n /test_fonts | md5sum
+   //     fb5c91b2895aa445d23aebf7f9e2189c  -
+-  static const char kCacheKey[] = "fb5c91b2895aa445d23aebf7f9e2189c";
++  static const char kCacheKey[] = "cd4b5bc7-6cfc-41dc-8982-f2db624179ba";
+ 
+   // fontconfig writes the mtime of the test_fonts directory into the cache. It
+   // presumably checks this later to ensure that the cache is still up to date.
+@@ -56,7 +56,7 @@ int main() {
+   FcFini();
+ 
+   // Check existence of intended fontconfig cache file.
+-  auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-9";
++  auto cache = fontconfig_caches + "/" + kCacheKey + "-x86_64.cache-" + FC_CACHE_VERSION;
+   bool cache_exists = access(cache.c_str(), F_OK) == 0;
+   return !cache_exists;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_tflite_features.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_tflite_features.gni
new file mode 100644
index 0000000000..3572f82fbc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_tflite_features.gni
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/tflite/features.gni.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/tflite/features.gni
+@@ -8,9 +8,9 @@ declare_args() {
+   # This enables building TFLite with XNNPACK. Currently only available for
+   # Linux or macOS arm64/x64 and Windows x64 targets.
+   build_tflite_with_xnnpack =
+-      ((is_linux || is_mac) &&
++      (((is_linux || is_mac) &&
+        (current_cpu == "arm64" || current_cpu == "x64")) ||
+-      (is_win && current_cpu == "x64")
++      (is_win && current_cpu == "x64")) && !is_bsd
+ 
+   # Turns on TFLITE_WITH_RUY, using ruy as the gemm backend instead of gemmlowp.
+   build_tflite_with_ruy = true
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h
new file mode 100644
index 0000000000..659e82c700
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_vulkan__memory__allocator_include_vk__mem__alloc.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
+@@ -2760,7 +2760,7 @@ void* vma_aligned_alloc(size_t alignment
+ 
+     return memalign(alignment, size);
+ }
+-#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC))
++#elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)) || defined(__OpenBSD__) || defined(__FreeBSD__)
+ #include <cstdlib>
+ 
+ #if defined(__APPLE__)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_wayland_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_wayland_BUILD.gn
new file mode 100644
index 0000000000..7217ca4941
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_wayland_BUILD.gn
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/wayland/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/wayland/BUILD.gn
+@@ -22,6 +22,11 @@ config("wayland_config") {
+     "src/src",
+   ]
+ 
++    if (is_bsd) {
++      include_dirs += [ "/usr/local/include/libepoll-shim" ]
++      libs = [ "epoll-shim" ]
++    }   
++
+   # Client/Server headers are automatically generated. Though, we still need
+   # to pass the path where these headers are located.
+   include_dirs += [ "$root_gen_dir/third_party/wayland/src/protocol" ]
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn
new file mode 100644
index 0000000000..8283e73ec5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/BUILD.gn
+@@ -218,6 +218,9 @@ config("common_inherited_config") {
+   if (is_linux || is_chromeos) {
+     defines += [ "WEBRTC_LINUX" ]
+   }
++  if (is_bsd) {
++    defines += [ "WEBRTC_BSD" ]
++  }
+   if (is_mac) {
+     defines += [ "WEBRTC_MAC" ]
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn
new file mode 100644
index 0000000000..3c409c6536
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/modules/audio_device/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/modules/audio_device/BUILD.gn
+@@ -330,7 +330,7 @@ rtc_library("audio_device_impl") {
+     if (rtc_use_dummy_audio_file_devices) {
+       defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]
+     } else {
+-      if (is_linux || is_chromeos) {
++      if ((is_linux || is_chromeos) && !is_bsd) {
+         sources += [
+           "linux/alsasymboltable_linux.cc",
+           "linux/alsasymboltable_linux.h",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
new file mode 100644
index 0000000000..fe5760f8ac
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_wayland_egl__dmabuf.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc
+@@ -10,11 +10,15 @@
+ 
+ #include "modules/desktop_capture/linux/wayland/egl_dmabuf.h"
+ 
++#if !defined(WEBRTC_BSD)
+ #include <asm/ioctl.h>
++#endif
+ #include <dlfcn.h>
+ #include <fcntl.h>
+ #include <libdrm/drm_fourcc.h>
++#if !defined(WEBRTC_BSD)
+ #include <linux/types.h>
++#endif
+ #include <spa/param/video/format-utils.h>
+ #include <unistd.h>
+ #include <xf86drm.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc
new file mode 100644
index 0000000000..e70347ef2c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_modules_desktop__capture_linux_x11_x__server__pixel__buffer.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc
+@@ -203,6 +203,12 @@ bool XServerPixelBuffer::Init(XAtomCache
+ void XServerPixelBuffer::InitShm(const XWindowAttributes& attributes) {
+   Visual* default_visual = attributes.visual;
+   int default_depth = attributes.depth;
++#if defined(__OpenBSD__)
++// pledge(2)
++  RTC_LOG(LS_WARNING) << "Unable to use shmget(2) while using pledge(2). "
++                         "Performance may be degraded.";
++  return;
++#endif
+ 
+   int major, minor;
+   Bool have_pixmaps;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byte__order.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byte__order.h
new file mode 100644
index 0000000000..46990101cf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byte__order.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/byte_order.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/byte_order.h
+@@ -90,6 +90,8 @@
+ #error WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN must be defined.
+ #endif  // defined(WEBRTC_ARCH_LITTLE_ENDIAN)
+ 
++#elif defined(WEBRTC_BSD)
++#include <sys/endian.h>
+ #elif defined(WEBRTC_POSIX)
+ #include <endian.h>
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.cc
new file mode 100644
index 0000000000..a7027c413c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ip__address.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/ip_address.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/ip_address.cc
+@@ -13,7 +13,8 @@
+ #include <sys/socket.h>
+ 
+ #include "absl/strings/string_view.h"
+-#ifdef OPENBSD
++#if defined(WEBRTC_BSD)
++#include <sys/types.h>
+ #include <netinet/in_systm.h>
+ #endif
+ #ifndef __native_client__
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_net__test__helpers.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_net__test__helpers.cc
new file mode 100644
index 0000000000..841c839a74
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_net__test__helpers.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/net_test_helpers.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/net_test_helpers.cc
+@@ -21,6 +21,7 @@
+ #endif
+ #if defined(WEBRTC_POSIX) && !defined(__native_client__)
+ #include <arpa/inet.h>
++#include <sys/socket.h>
+ #if defined(WEBRTC_ANDROID)
+ #include "rtc_base/ifaddrs_android.h"
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc
new file mode 100644
index 0000000000..61526f2cdb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc
+@@ -290,7 +290,12 @@ AdapterType GetAdapterTypeFromName(absl:
+   }
+ #endif
+ 
++#if defined(WEBRTC_BSD)
++  // Treat all other network interface names as ethernet on BSD
++  return ADAPTER_TYPE_ETHERNET;
++#else
+   return ADAPTER_TYPE_UNKNOWN;
++#endif
+ }
+ 
+ NetworkManager::EnumerationPermission NetworkManager::enumeration_permission()
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc
new file mode 100644
index 0000000000..660dfc9e16
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
+@@ -53,7 +53,7 @@
+ #include "rtc_base/time_utils.h"
+ #include "system_wrappers/include/field_trial.h"
+ 
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ #include <linux/sockios.h>
+ #endif
+ 
+@@ -73,7 +73,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(__native_client__) && !defined(WEBRTC_BSD)
+ 
+ int64_t GetSocketRecvTimestamp(int socket) {
+   struct timeval tv_ioctl;
+@@ -307,7 +307,7 @@ int PhysicalSocket::GetOption(Option opt
+     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_DONT) ? 1 : 0;
+ #endif
+   } else if (opt == OPT_DSCP) {
+@@ -325,7 +325,7 @@ int PhysicalSocket::SetOption(Option opt
+   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
+   } else if (opt == OPT_DSCP) {
+@@ -353,7 +353,7 @@ int PhysicalSocket::SetOption(Option opt
+ int PhysicalSocket::Send(const void* pv, size_t cb) {
+   int sent = DoSend(
+       s_, reinterpret_cast<const char*>(pv), static_cast<int>(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
+@@ -382,7 +382,7 @@ int PhysicalSocket::SendTo(const void* b
+   size_t len = addr.ToSockAddrStorage(&saddr);
+   int sent =
+       DoSendTo(s_, static_cast<const char*>(buffer), static_cast<int>(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
+@@ -641,7 +641,7 @@ int PhysicalSocket::TranslateOption(Opti
+       *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)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h
new file mode 100644
index 0000000000..afa855e701
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physical__socket__server.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.h
+@@ -18,7 +18,7 @@
+ #include "rtc_base/third_party/sigslot/sigslot.h"
+ 
+ #if defined(WEBRTC_POSIX)
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ // On Linux, use epoll.
+ #include <sys/epoll.h>
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread__types.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread__types.cc
new file mode 100644
index 0000000000..923d3e3241
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread__types.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread_types.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread_types.cc
+@@ -11,7 +11,9 @@
+ #include "rtc_base/platform_thread_types.h"
+ 
+ #if defined(WEBRTC_LINUX)
++#if !defined(WEBRTC_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/syscall.h>
+ #endif
+ 
+@@ -44,6 +46,8 @@ PlatformThreadId CurrentThreadId() {
+   return gettid();
+ #elif defined(WEBRTC_FUCHSIA)
+   return zx_thread_self();
++#elif defined(WEBRTC_BSD)
++  return reinterpret_cast<uint64_t>(pthread_self());
+ #elif defined(WEBRTC_LINUX)
+   return syscall(__NR_gettid);
+ #elif defined(__EMSCRIPTEN__)
+@@ -74,6 +78,7 @@ bool IsThreadRefEqual(const PlatformThre
+ }
+ 
+ void SetCurrentThreadName(const char* name) {
++#if !defined(WEBRTC_BSD)
+ #if defined(WEBRTC_WIN)
+   // The SetThreadDescription API works even if no debugger is attached.
+   // The names set with this API also show up in ETW traces. Very handy.
+@@ -121,6 +126,7 @@ void SetCurrentThreadName(const char* na
+                                               name, strlen(name));
+   RTC_DCHECK_EQ(status, ZX_OK);
+ #endif
++#endif
+ }
+ 
+ }  // namespace rtc
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h
new file mode 100644
index 0000000000..d9cceec21d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_third__party_sigslot_sigslot.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/third_party/sigslot/sigslot.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/third_party/sigslot/sigslot.h
+@@ -178,6 +178,10 @@ class multi_threaded_local {
+ #endif  // _SIGSLOT_HAS_WIN32_THREADS
+ 
+ #ifdef _SIGSLOT_HAS_POSIX_THREADS
++#if defined(OS_FREEBSD)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wthread-safety-analysis"
++#endif
+ // The multi threading policies only get compiled in if they are enabled.
+ class multi_threaded_global {
+  public:
+@@ -201,6 +205,9 @@ class multi_threaded_local {
+  private:
+   pthread_mutex_t m_mutex;
+ };
++#if defined(OS_FREEBSD)
++#pragma GCC diagnostic pop
++#endif
+ #endif  // _SIGSLOT_HAS_POSIX_THREADS
+ 
+ template <class mt_policy>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn
new file mode 100644
index 0000000000..d7538d07b8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn
+@@ -62,8 +62,6 @@ rtc_library("system_wrappers") {
+     if (!build_with_chromium) {
+       sources += [ "source/cpu_features_linux.cc" ]
+     }
+-
+-    libs += [ "rt" ]
+   }
+ 
+   if (is_win) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_widevine_cdm_widevine.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_widevine_cdm_widevine.gni
new file mode 100644
index 0000000000..9c69242750
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_widevine_cdm_widevine.gni
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/widevine/cdm/widevine.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/widevine/cdm/widevine.gni
+@@ -28,6 +28,9 @@ library_widevine_cdm_available =
+     (is_chromeos &&
+      (target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) ||
+     (target_os == "linux" && target_cpu == "x64") ||
++    (target_os == "openbsd" && target_cpu == "x64") ||
++    (target_os == "freebsd" && target_cpu == "x64") ||
++    (target_os == "netbsd" && target_cpu == "x64") ||
+     (target_os == "mac" && (target_cpu == "x64" || target_cpu == "arm64")) ||
+     (target_os == "win" &&
+      (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm64"))
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
new file mode 100644
index 0000000000..a33ab1cfc2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
@@ -0,0 +1,37 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/third_party/zlib/BUILD.gn
+@@ -128,7 +128,7 @@ if (use_arm_neon_optimizations) {
+     defines = [ "CRC32_ARMV8_CRC32" ]
+     if (is_android) {
+       defines += [ "ARMV8_OS_ANDROID" ]
+-    } else if (is_linux || is_chromeos) {
++    } else if ((is_linux || is_chromeos) && !is_bsd) {
+       defines += [ "ARMV8_OS_LINUX" ]
+     } else if (is_mac) {
+       defines += [ "ARMV8_OS_MACOS" ]
+@@ -138,6 +138,10 @@ if (use_arm_neon_optimizations) {
+       defines += [ "ARMV8_OS_FUCHSIA" ]
+     } else if (is_win) {
+       defines += [ "ARMV8_OS_WINDOWS" ]
++    } else if (is_openbsd) {
++      defines += [ "ARMV8_OS_OPENBSD" ]
++    } else if (is_freebsd) {
++      defines += [ "ARMV8_OS_FREEBSD" ]
+     } else {
+       assert(false, "Unsupported ARM OS")
+     }
+@@ -413,7 +417,7 @@ static_library("minizip") {
+     ]
+   }
+ 
+-  if (is_apple || is_android || is_nacl) {
++  if (is_apple || is_android || is_nacl || is_bsd) {
+     # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
+     # use fopen, ftell, and fseek instead on these systems.
+     defines = [ "USE_FILE32API" ]
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c
new file mode 100644
index 0000000000..477c5936d6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_third__party_zlib_cpu__features.c
@@ -0,0 +1,55 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/third_party/zlib/cpu_features.c.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/third_party/zlib/cpu_features.c
+@@ -35,7 +35,7 @@ int ZLIB_INTERNAL x86_cpu_enable_avx512 
+ 
+ #ifndef CPU_NO_SIMD
+ 
+-#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_IOS)
++#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_IOS) || defined(ARMV8_OS_OPENBSD) || defined(ARMV8_OS_FREEBSD)
+ #include <pthread.h>
+ #endif
+ 
+@@ -52,6 +52,10 @@ int ZLIB_INTERNAL x86_cpu_enable_avx512 
+ #include <windows.h>
+ #elif defined(ARMV8_OS_IOS)
+ #include <sys/sysctl.h>
++#elif defined(ARMV8_OS_OPENBSD)
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
+ #elif !defined(_MSC_VER)
+ #include <pthread.h>
+ #else
+@@ -62,7 +66,7 @@ int ZLIB_INTERNAL x86_cpu_enable_avx512 
+ static void _cpu_check_features(void);
+ #endif
+ 
+-#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) || defined(ARMV8_OS_IOS) || defined(__ARM_NEON__) || defined(__ARM_NEON)
++#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) || defined(ARMV8_OS_IOS) || defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(ARMV8_OS_OPENBSD) || defined(ARMV8_OS_FREEBSD)
+ #if !defined(ARMV8_OS_MACOS)
+ // _cpu_check_features() doesn't need to do anything on mac/arm since all
+ // features are known at build time, so don't call it.
+@@ -115,6 +119,17 @@ static void _cpu_check_features(void)
+     unsigned long features = getauxval(AT_HWCAP2);
+     arm_cpu_enable_crc32 = !!(features & HWCAP2_CRC32);
+     arm_cpu_enable_pmull = !!(features & HWCAP2_PMULL);
++#elif defined(ARMV8_OS_OPENBSD)
++    int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 };
++    uint64_t cpu_id = 0;
++    size_t len = sizeof(cpu_id);
++    if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0)
++        return;
++    if (ID_AA64ISAR0_AES(cpu_id) >= ID_AA64ISAR0_AES_PMULL)
++        arm_cpu_enable_pmull = 1;
++
++    if (ID_AA64ISAR0_CRC32(cpu_id) >= ID_AA64ISAR0_CRC32_BASE)
++        arm_cpu_enable_crc32 = 1;
+ #elif defined(ARMV8_OS_FUCHSIA)
+     uint32_t features;
+     zx_status_t rc = zx_system_get_features(ZX_FEATURE_KIND_CPU, &features);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_generate__stubs_rules.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_generate__stubs_rules.gni
new file mode 100644
index 0000000000..aa8dc769d2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_generate__stubs_rules.gni
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/generate_stubs/rules.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/tools/generate_stubs/rules.gni
+@@ -110,7 +110,6 @@ template("generate_stubs") {
+       "${target_gen_dir}/${invoker.output_name}.cc",
+       "${target_gen_dir}/${invoker.output_name}.h",
+     ]
+-    libs = [ "dl" ]
+     include_dirs = [ target_gen_dir ]
+     if (defined(invoker.configs)) {
+       configs += invoker.configs
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_grit_grit_node_base.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_grit_grit_node_base.py
new file mode 100644
index 0000000000..b790888db1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_grit_grit_node_base.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/grit/grit/node/base.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/tools/grit/grit/node/base.py
+@@ -498,7 +498,8 @@ class Node:
+         value = defs
+ 
+       elif name == 'is_linux':
+-        value = target_platform == 'linux'
++        value = (target_platform == 'linux'
++                 or 'bsd' in target_platform)
+       elif name == 'is_chromeos':
+         value = target_platform == 'chromeos'
+       elif name == 'is_macosx':
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_json__schema__compiler_cpp__bundle__generator.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_json__schema__compiler_cpp__bundle__generator.py
new file mode 100644
index 0000000000..d5ecd59f3c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_json__schema__compiler_cpp__bundle__generator.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/json_schema_compiler/cpp_bundle_generator.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/tools/json_schema_compiler/cpp_bundle_generator.py
+@@ -145,7 +145,7 @@ class CppBundleGenerator(object):
+         # BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(IS_CHROMEOS_LACROS).
+         ifdefs.append('BUILDFLAG(IS_CHROMEOS_LACROS)')
+       elif platform == Platforms.LINUX:
+-        ifdefs.append('BUILDFLAG(IS_LINUX)')
++        ifdefs.append('BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)')
+       elif platform == Platforms.MAC:
+         ifdefs.append('BUILDFLAG(IS_MAC)')
+       elif platform == Platforms.WIN:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py
new file mode 100644
index 0000000000..6c5f294651
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py
+@@ -292,6 +292,9 @@ FEATURE_GRAMMAR = ({
+                 'linux': 'Feature::LINUX_PLATFORM',
+                 'mac': 'Feature::MACOSX_PLATFORM',
+                 'win': 'Feature::WIN_PLATFORM',
++                'openbsd': 'Feature::LINUX_PLATFORM',
++                'freebsd': 'Feature::LINUX_PLATFORM',
++                'netbsd': 'Feature::LINUX_PLATFORM',
+             }
+         }
+     },
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_licenses_licenses.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_licenses_licenses.py
new file mode 100644
index 0000000000..3a8fef3d9b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_licenses_licenses.py
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/tools/licenses/licenses.py.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/tools/licenses/licenses.py
+@@ -816,6 +816,12 @@ def _GnBinary():
+   exe = 'gn'
+   if sys.platform.startswith('linux'):
+     subdir = 'linux64'
++  elif sys.platform.startswith('freebsd'):
++    subdir = 'linux64'
++  elif sys.platform.startswith('netbsd'):
++    subdir = 'linux64'
++  elif sys.platform.startswith('openbsd'):
++    subdir = 'linux64'
+   elif sys.platform == 'darwin':
+     subdir = 'mac'
+   elif sys.platform == 'win32':
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_memory_partition__allocator_inspect__utils.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_memory_partition__allocator_inspect__utils.h
new file mode 100644
index 0000000000..3cebfca911
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_memory_partition__allocator_inspect__utils.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/memory/partition_allocator/inspect_utils.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/tools/memory/partition_allocator/inspect_utils.h
+@@ -61,7 +61,7 @@ class RemoteProcessMemoryReader {
+   const pid_t pid_;
+   bool is_valid_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedFD mem_fd_;
+ #elif BUILDFLAG(IS_MAC)
+   task_t task_;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn
new file mode 100644
index 0000000000..5db9c68cee
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn
+@@ -47,7 +47,7 @@ group("telemetry_chrome_test") {
+     data_deps += [ "//chrome:reorder_imports" ]
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
+ 
+     # CrOS currently has issues with the locally compiled version of
+@@ -178,7 +178,7 @@ group("telemetry_chrome_test_without_chr
+   ]
+ 
+   # Cr-Fuchsia doesn't support breakpad.
+-  if (!is_win && !is_fuchsia) {
++  if (!is_win && !is_fuchsia && !is_bsd) {
+     data_deps += [
+       # This is defined for Windows, but is unused by Telemetry on
+       # Windows, and including it can have issues when cross-compiling
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py
new file mode 100644
index 0000000000..892d6ec81b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_protoc__wrapper_protoc__wrapper.py
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/protoc_wrapper/protoc_wrapper.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/tools/protoc_wrapper/protoc_wrapper.py
+@@ -183,15 +183,19 @@ def main(argv):
+     if not options.exclude_imports:
+       protoc_cmd += ["--include_imports"]
+ 
++  nenv = os.environ.copy()
++  nenv["PATH"] = "${WRKOBJDIR}/bin:" + nenv["PATH"]
++  nenv["LD_LIBRARY_PATH"] = "${WRKSRC}/out/Release"
++
+   dependency_file_data = None
+   if options.descriptor_set_out and options.descriptor_set_dependency_file:
+     protoc_cmd += ['--dependency_out', options.descriptor_set_dependency_file]
+-    ret = subprocess.call(protoc_cmd)
++    ret = subprocess.call(protoc_cmd, env=nenv)
+ 
+     with open(options.descriptor_set_dependency_file, 'rb') as f:
+       dependency_file_data = f.read().decode('utf-8')
+ 
+-  ret = subprocess.call(protoc_cmd)
++  ret = subprocess.call(protoc_cmd, env=nenv)
+   if ret != 0:
+     if ret <= -100:
+       # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_v8__context__snapshot_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_v8__context__snapshot_BUILD.gn
new file mode 100644
index 0000000000..4d16c041c3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_v8__context__snapshot_BUILD.gn
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/v8_context_snapshot/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/tools/v8_context_snapshot/BUILD.gn
+@@ -36,6 +36,24 @@ buildflag_header("buildflags") {
+   ]
+ }
+ 
++action("run_paxctl_v8_context_snapshot_generator") {
++  deps = [ ":v8_context_snapshot_generator($v8_snapshot_toolchain)" ]
++
++  script = "//v8/tools/run-paxctl.py"
++  stamp = "$target_gen_dir/paxctl_stamp"
++  outputs = [ stamp ]
++
++  sources = []
++  data = []
++
++  args = [
++    rebase_path(stamp, root_build_dir),
++    "/usr/sbin/paxctl", "+m",
++    "./" + rebase_path(get_label_info(":v8_context_snapshot_generator", "root_out_dir") + "/v8_context_snapshot_generator",
++    root_build_dir),
++  ]
++}
++
+ if (use_v8_context_snapshot) {
+   if (v8_snapshot_toolchain == current_toolchain) {
+     action("generate_v8_context_snapshot") {
+@@ -53,6 +71,9 @@ if (use_v8_context_snapshot) {
+       ]
+ 
+       deps = [ ":v8_context_snapshot_generator" ]
++      if (target_os == "netbsd") {
++        deps += [ ":run_paxctl_v8_context_snapshot_generator" ]
++      }
+ 
+       # TODO(sky): figure out why this doesn't work on android cross compile.
+       # In the case of compiling for the snapshot `shlib_extension` is ".so"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py
new file mode 100644
index 0000000000..3871ffb42f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/tools/variations/fieldtrial_to_struct.py.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/tools/variations/fieldtrial_to_struct.py
+@@ -41,6 +41,9 @@ _platforms = [
+     'linux',
+     'mac',
+     'windows',
++    'openbsd',
++    'freebsd',
++    'netbsd',
+ ]
+ 
+ _form_factors = [
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_client_drag__drop__client.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_client_drag__drop__client.h
new file mode 100644
index 0000000000..63d6344c80
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_client_drag__drop__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/aura/client/drag_drop_client.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/aura/client/drag_drop_client.h
+@@ -44,7 +44,7 @@ class AURA_EXPORT DragDropClient {
+       int allowed_operations,
+       ui::mojom::DragEventSource source) = 0;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Updates the drag image. An empty |image| may be used to hide a previously
+   // set non-empty drag image, and a non-empty |image| shows the drag image
+   // again if it was previously hidden.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_screen__ozone.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_screen__ozone.cc
new file mode 100644
index 0000000000..8975dff3ae
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_screen__ozone.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/aura/screen_ozone.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/aura/screen_ozone.cc
+@@ -107,7 +107,7 @@ display::Display ScreenOzone::GetPrimary
+   return platform_screen_->GetPrimaryDisplay();
+ }
+ 
+-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ ScreenOzone::ScreenSaverSuspenderOzone::ScreenSaverSuspenderOzone(
+     std::unique_ptr<ui::PlatformScreen::PlatformScreenSaverSuspender> suspender)
+     : suspender_(std::move(suspender)) {}
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_screen__ozone.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_screen__ozone.h
new file mode 100644
index 0000000000..902076b556
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_aura_screen__ozone.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/aura/screen_ozone.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/aura/screen_ozone.h
+@@ -45,7 +45,7 @@ class AURA_EXPORT ScreenOzone : public d
+   display::Display GetDisplayMatching(
+       const gfx::Rect& match_rect) const override;
+   display::Display GetPrimaryDisplay() const override;
+-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<display::Screen::ScreenSaverSuspender> SuspendScreenSaver()
+       override;
+ #endif  // BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
+@@ -74,7 +74,7 @@ class AURA_EXPORT ScreenOzone : public d
+   ui::PlatformScreen* platform_screen() { return platform_screen_.get(); }
+ 
+  private:
+-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   class ScreenSaverSuspenderOzone
+       : public display::Screen::ScreenSaverSuspender {
+    public:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.cc
new file mode 100644
index 0000000000..bb17ffc76a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/clipboard/clipboard_constants.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/clipboard/clipboard_constants.cc
+@@ -25,7 +25,7 @@ const char kMimeTypeOctetStream[] = "app
+ // Used for window dragging on some platforms.
+ const char kMimeTypeWindowDrag[] = "chromium/x-window-drag";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ const char kMimeTypeLinuxUtf8String[] = "UTF8_STRING";
+ const char kMimeTypeLinuxString[] = "STRING";
+ const char kMimeTypeLinuxText[] = "TEXT";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h
new file mode 100644
index 0000000000..b2afd26699
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__constants.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/clipboard/clipboard_constants.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/clipboard/clipboard_constants.h
+@@ -48,7 +48,7 @@ extern const char kMimeTypeDataTransferE
+ 
+ // ----- LINUX & CHROMEOS & FUCHSIA MIME TYPES -----
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(UI_BASE_CLIPBOARD_TYPES)
+ extern const char kMimeTypeLinuxUtf8String[];
+ COMPONENT_EXPORT(UI_BASE_CLIPBOARD_TYPES)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__non__backed.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__non__backed.cc
new file mode 100644
index 0000000000..0558685491
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_clipboard_clipboard__non__backed.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/clipboard/clipboard_non_backed.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/clipboard/clipboard_non_backed.cc
+@@ -461,7 +461,7 @@ ClipboardNonBacked::ClipboardNonBacked()
+   // so create internal clipboards for platform supported clipboard buffers.
+   constexpr ClipboardBuffer kClipboardBuffers[] = {
+     ClipboardBuffer::kCopyPaste,
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+     ClipboardBuffer::kSelection,
+ #endif
+ #if BUILDFLAG(IS_MAC)
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc
new file mode 100644
index 0000000000..6aa40ba7c4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/cursor/cursor_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/cursor/cursor_factory.cc
+@@ -96,7 +96,7 @@ void CursorFactory::ObserveThemeChanges(
+   NOTIMPLEMENTED();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ 
+ // Returns a cursor name compatible with either X11 or the FreeDesktop.org
+ // cursor spec ([1] and [2]), followed by fallbacks that can work as
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h
new file mode 100644
index 0000000000..9537e27690
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_cursor_cursor__factory.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/cursor/cursor_factory.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/cursor/cursor_factory.h
+@@ -93,7 +93,7 @@ class COMPONENT_EXPORT(UI_BASE_CURSOR) C
+   base::ObserverList<CursorFactoryObserver>::Unchecked observers_;
+ };
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(UI_BASE_CURSOR)
+ std::vector<std::string> CursorNamesFromType(mojom::CursorType type);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc
new file mode 100644
index 0000000000..1ea91fc61f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_factory.cc
+@@ -7,7 +7,7 @@
+ #include "base/notreached.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ #include "ui/base/dragdrop/os_exchange_data_provider_factory_ozone.h"
+ #include "ui/base/dragdrop/os_exchange_data_provider_non_backed.h"
+ #elif BUILDFLAG(IS_APPLE)
+@@ -21,7 +21,7 @@ namespace ui {
+ // static
+ std::unique_ptr<OSExchangeDataProvider>
+ OSExchangeDataProviderFactory::CreateProvider() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The instance can be nullptr in tests that do not instantiate the platform,
+   // or on platforms that do not implement specific drag'n'drop.  For them,
+   // falling back to the Aura provider should be fine.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__non__backed.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__non__backed.cc
new file mode 100644
index 0000000000..df4f28ad50
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__non__backed.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_non_backed.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_non_backed.cc
+@@ -96,7 +96,7 @@ void OSExchangeDataProviderNonBacked::Se
+ }
+ 
+ bool OSExchangeDataProviderNonBacked::GetString(std::u16string* data) const {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (HasFile()) {
+     // Various Linux file managers both pass a list of file:// URIs and set the
+     // string representation to the URI. We explicitly don't want to return use
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.cc
new file mode 100644
index 0000000000..a94520ab92
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ime/dummy_text_input_client.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ime/dummy_text_input_client.cc
+@@ -163,7 +163,7 @@ bool DummyTextInputClient::ShouldDoLearn
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool DummyTextInputClient::SetCompositionFromExistingText(
+     const gfx::Range& range,
+     const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.h
new file mode 100644
index 0000000000..0d1663860a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_dummy__text__input__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ime/dummy_text_input_client.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ime/dummy_text_input_client.h
+@@ -67,7 +67,7 @@ class DummyTextInputClient : public Text
+   ukm::SourceId GetClientSourceForMetrics() const override;
+   bool ShouldDoLearning() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc
new file mode 100644
index 0000000000..4d96e0f637
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ime/fake_text_input_client.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ime/fake_text_input_client.cc
+@@ -171,7 +171,7 @@ bool FakeTextInputClient::ShouldDoLearni
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool FakeTextInputClient::SetCompositionFromExistingText(
+     const gfx::Range& range,
+     const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h
new file mode 100644
index 0000000000..af63c08138
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_fake__text__input__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ime/fake_text_input_client.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ime/fake_text_input_client.h
+@@ -101,7 +101,7 @@ class FakeTextInputClient : public TextI
+   void SetTextEditCommandForNextKeyEvent(TextEditCommand command) override;
+   ukm::SourceId GetClientSourceForMetrics() const override;
+   bool ShouldDoLearning() override;
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_init_input__method__initializer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_init_input__method__initializer.cc
new file mode 100644
index 0000000000..2f604acb25
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_init_input__method__initializer.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ime/init/input_method_initializer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ime/init/input_method_initializer.cc
+@@ -10,7 +10,7 @@
+ #include "build/chromeos_buildflags.h"
+ 
+ #if !BUILDFLAG(IS_CHROMEOS_ASH) && defined(USE_AURA) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD))
+ #include "ui/base/ime/linux/fake_input_method_context.h"
+ #include "ui/base/ime/linux/linux_input_method_context_factory.h"
+ #elif BUILDFLAG(IS_WIN)
+@@ -33,7 +33,7 @@ void ShutdownInputMethod() {
+ }
+ 
+ void InitializeInputMethodForTesting() {
+-#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
++#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))
+   GetInputMethodContextFactoryForTest() =
+       base::BindRepeating([](LinuxInputMethodContextDelegate* delegate)
+                               -> std::unique_ptr<LinuxInputMethodContext> {
+@@ -46,7 +46,7 @@ void InitializeInputMethodForTesting() {
+ 
+ void ShutdownInputMethodForTesting() {
+ #if !BUILDFLAG(IS_CHROMEOS_ASH) && defined(USE_AURA) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD))
+   // The function owns the factory (as a static variable that's returned by
+   // reference), so setting this to an empty factory will free the old one.
+   GetInputMethodContextFactoryForTest() = LinuxInputMethodContextFactory();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_linux_linux__input__method__context__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_linux_linux__input__method__context__factory.cc
new file mode 100644
index 0000000000..6f9a84818f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_linux_linux__input__method__context__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ime/linux/linux_input_method_context_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ime/linux/linux_input_method_context_factory.cc
+@@ -9,7 +9,7 @@
+ #include "build/build_config.h"
+ #include "ui/base/ime/linux/fake_input_method_context.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #include "ui/linux/linux_ui_delegate.h"
+ #endif
+@@ -32,7 +32,7 @@ std::unique_ptr<LinuxInputMethodContext>
+   if (auto factory = GetInputMethodContextFactoryForTest())
+     return factory.Run(delegate);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Give the toolkit a chance to create the context.
+   if (auto* linux_ui = LinuxUi::instance()) {
+     if (auto context = linux_ui->CreateInputMethodContext(delegate))
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h
new file mode 100644
index 0000000000..f8e5bab820
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ime_text__input__client.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ime/text_input_client.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ime/text_input_client.h
+@@ -268,7 +268,7 @@ class COMPONENT_EXPORT(UI_BASE_IME) Text
+   // fields that are considered 'private' (e.g. in incognito tabs).
+   virtual bool ShouldDoLearning() = 0;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Start composition over a given UTF-16 code range from existing text. This
+   // should only be used for composition scenario when IME wants to start
+   // composition on existing text. Returns whether the operation was successful.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc
new file mode 100644
index 0000000000..6d4c436e35
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/resource/resource_bundle.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/resource/resource_bundle.cc
+@@ -914,7 +914,7 @@ void ResourceBundle::ReloadFonts() {
+ }
+ 
+ ResourceScaleFactor ResourceBundle::GetMaxResourceScaleFactor() const {
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return max_scale_factor_;
+ #else
+   return GetMaxSupportedResourceScaleFactor();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc
new file mode 100644
index 0000000000..0afe948884
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ui_base_features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ui_base_features.cc
+@@ -217,7 +217,7 @@ BASE_FEATURE(kUiCompositorScrollWithLaye
+ 
+ // Enables the use of a touch fling curve that is based on the behavior of
+ // native apps on Windows.
+-#if BUILDFLAG(IS_WIN) ||                                   \
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) ||              \
+     (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \
+      !BUILDFLAG(IS_CHROMEOS_LACROS))
+ BASE_FEATURE(kExperimentalFlingAnimation,
+@@ -321,7 +321,7 @@ bool IsForcedColorsEnabled() {
+ // and Linux. This feature will be released for other platforms in later
+ // milestones.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+-    BUILDFLAG(IS_CHROMEOS)
++    BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ BASE_FEATURE(kEyeDropper, "EyeDropper", base::FEATURE_ENABLED_BY_DEFAULT);
+ #else
+ BASE_FEATURE(kEyeDropper, "EyeDropper", base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__switches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__switches.cc
new file mode 100644
index 0000000000..588ed2bcca
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__switches.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ui_base_switches.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ui_base_switches.cc
+@@ -31,13 +31,13 @@ const char kShowMacOverlayBorders[] = "s
+ const char kEnableResourcesFileSharing[] = "enable-resources-file-sharing";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Specifies system font family name. Improves determenism when rendering
+ // pages in headless mode.
+ const char kSystemFontFamily[] = "system-font-family";
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // Specify the toolkit used to construct the Linux GUI.
+ const char kUiToolkitFlag[] = "ui-toolkit";
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__switches.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__switches.h
new file mode 100644
index 0000000000..ebeb2df56e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_ui__base__switches.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/ui_base_switches.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/base/ui_base_switches.h
+@@ -27,11 +27,11 @@ COMPONENT_EXPORT(UI_BASE) extern const c
+ COMPONENT_EXPORT(UI_BASE) extern const char kEnableResourcesFileSharing[];
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(UI_BASE) extern const char kSystemFontFamily[];
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ COMPONENT_EXPORT(UI_BASE) extern const char kUiToolkitFlag[];
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc
new file mode 100644
index 0000000000..ad22d1bfa2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_webui_web__ui__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/webui/web_ui_util.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/base/webui/web_ui_util.cc
+@@ -41,7 +41,7 @@ namespace {
+ constexpr float kMaxScaleFactor = 1000.0f;
+ 
+ std::string GetFontFamilyMd() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return "Roboto, " + GetFontFamily();
+ #else
+   return GetFontFamily();
+@@ -219,7 +219,7 @@ std::string GetFontFamily() {
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
+   if (!cmdline->HasSwitch(switches::kSingleProcess)) {
+     std::string font_name = ui::ResourceBundle::GetSharedInstance()
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc
new file mode 100644
index 0000000000..2ba28d95fd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/x/x11_cursor_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/x/x11_cursor_factory.cc
+@@ -13,7 +13,7 @@
+ #include "ui/gfx/geometry/point.h"
+ #include "ui/gfx/x/connection.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -70,7 +70,7 @@ scoped_refptr<PlatformCursor> X11CursorF
+ }
+ 
+ void X11CursorFactory::ObserveThemeChanges() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* linux_ui = LinuxUi::instance();
+   DCHECK(linux_ui);
+   cursor_theme_observation_.Observe(linux_ui);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h
new file mode 100644
index 0000000000..08844b4b02
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__factory.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/x/x11_cursor_factory.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/x/x11_cursor_factory.h
+@@ -20,7 +20,7 @@ namespace ui {
+ class X11Cursor;
+ class XCursorLoader;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ class LinuxUi;
+ #endif
+ 
+@@ -62,7 +62,7 @@ class COMPONENT_EXPORT(UI_BASE_X) X11Cur
+   // initializing `cursor_loader_` will modify `default_cursors_`.
+   std::unique_ptr<XCursorLoader> cursor_loader_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedObservation<LinuxUi, CursorThemeManagerObserver>
+       cursor_theme_observation_{this};
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc
new file mode 100644
index 0000000000..2c228d9f78
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__cursor__loader.cc
@@ -0,0 +1,47 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/x/x11_cursor_loader.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/x/x11_cursor_loader.cc
+@@ -34,7 +34,7 @@
+ #include "ui/gfx/x/connection.h"
+ #include "ui/gfx/x/xproto.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -59,7 +59,11 @@ std::string CursorPathFromLibXcursor() {
+     void operator()(void* ptr) const { dlclose(ptr); }
+   };
+ 
++#if BUILDFLAG(IS_BSD)
++  std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so", RTLD_LAZY));
++#else
+   std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so.1", RTLD_LAZY));
++#endif
+   if (!lib)
+     return "";
+ 
+@@ -170,7 +174,7 @@ scoped_refptr<base::RefCountedMemory> Re
+     const std::string& rm_xcursor_theme) {
+   constexpr const char kDefaultTheme[] = "default";
+   std::string themes[] = {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // The toolkit theme has the highest priority.
+     LinuxUi::instance() ? LinuxUi::instance()->GetCursorThemeName()
+                         : std::string(),
+@@ -359,7 +363,7 @@ uint32_t XCursorLoader::GetPreferredCurs
+     return size;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Let the toolkit have the next say.
+   auto* linux_ui = LinuxUi::instance();
+   size = linux_ui ? linux_ui->GetCursorThemeSize() : 0;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__display__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__display__manager.cc
new file mode 100644
index 0000000000..cb805938c6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__display__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/x/x11_display_manager.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/x/x11_display_manager.cc
+@@ -16,7 +16,7 @@
+ #include "ui/gfx/x/randr.h"
+ #include "ui/gfx/x/xproto.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -92,7 +92,7 @@ void XDisplayManager::FetchDisplayList()
+           ? display::Display::GetForcedDeviceScaleFactor()
+           : 1.0f};
+   const auto* display_config = &empty_display_config;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (const auto* linux_ui = ui::LinuxUi::instance()) {
+     display_config = &linux_ui->display_config();
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__shm__image__pool.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__shm__image__pool.cc
new file mode 100644
index 0000000000..b3d43f97b5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_base_x_x11__shm__image__pool.cc
@@ -0,0 +1,77 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/base/x/x11_shm_image_pool.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/base/x/x11_shm_image_pool.cc
+@@ -16,6 +16,7 @@
+ #include "base/functional/callback.h"
+ #include "base/location.h"
+ #include "base/strings/string_util.h"
++#include "base/system/sys_info.h"
+ #include "build/build_config.h"
+ #include "build/chromeos_buildflags.h"
+ #include "net/base/url_util.h"
+@@ -45,10 +46,14 @@ constexpr float kShmResizeShrinkThreshol
+     1.0f / (kShmResizeThreshold * kShmResizeThreshold);
+ 
+ std::size_t MaxShmSegmentSizeImpl() {
++#if BUILDFLAG(IS_BSD)
++  return base::SysInfo::MaxSharedMemorySize();
++#else
+   struct shminfo info;
+   if (shmctl(0, IPC_INFO, reinterpret_cast<struct shmid_ds*>(&info)) == -1)
+     return 0;
+   return info.shmmax;
++#endif
+ }
+ 
+ std::size_t MaxShmSegmentSize() {
+@@ -57,14 +62,19 @@ std::size_t MaxShmSegmentSize() {
+ }
+ 
+ #if !BUILDFLAG(IS_CHROMEOS_ASH)
++#if !BUILDFLAG(IS_BSD)
+ bool IsRemoteHost(const std::string& name) {
+   if (name.empty())
+     return false;
+ 
+   return !net::HostStringIsLocalhost(name);
+ }
++#endif
+ 
+ bool ShouldUseMitShm(x11::Connection* connection) {
++#if BUILDFLAG(IS_BSD)
++  return false;
++#else
+   // MIT-SHM may be available on remote connetions, but it will be unusable.  Do
+   // a best-effort check to see if the host is remote to disable the SHM
+   // codepath.  It may be possible in contrived cases for there to be a
+@@ -93,6 +103,7 @@ bool ShouldUseMitShm(x11::Connection* co
+     return false;
+ 
+   return true;
++#endif
+ }
+ #endif
+ 
+@@ -183,7 +194,7 @@ bool XShmImagePool::Resize(const gfx::Si
+         shmctl(state.shmid, IPC_RMID, nullptr);
+         return false;
+       }
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // On Linux, a shmid can still be attached after IPC_RMID if otherwise
+       // kept alive.  Detach before XShmAttach to prevent a memory leak in case
+       // the process dies.
+@@ -202,7 +213,7 @@ bool XShmImagePool::Resize(const gfx::Si
+         return false;
+       state.shmseg = shmseg;
+       state.shmem_attached_to_server = true;
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+       // The Linux-specific shmctl behavior above may not be portable, so we're
+       // forced to do IPC_RMID after the server has attached to the segment.
+       shmctl(state.shmid, IPC_RMID, nullptr);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_color__id.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_color__id.h
new file mode 100644
index 0000000000..9dbdb57454
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_color__id.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/color/color_id.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/color/color_id.h
+@@ -610,7 +610,7 @@
+   E_CPONLY(kColorNativeColor6) \
+   E_CPONLY(kColorNativeBaseColor) \
+   E_CPONLY(kColorNativeSecondaryColor)
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define PLATFORM_SPECIFIC_COLOR_IDS \
+   E_CPONLY(kColorNativeButtonBorder)\
+   E_CPONLY(kColorNativeHeaderButtonBorderActive) \
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_color__provider__utils.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_color__provider__utils.cc
new file mode 100644
index 0000000000..749f334a5f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_color__provider__utils.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/color/color_provider_utils.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/color/color_provider_utils.cc
+@@ -187,7 +187,7 @@ std::string_view SystemThemeName(ui::Sys
+   switch (system_theme) {
+     case ui::SystemTheme::kDefault:
+       return "kDefault";
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     case ui::SystemTheme::kGtk:
+       return "kGtk";
+     case ui::SystemTheme::kQt:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_system__theme.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_system__theme.h
new file mode 100644
index 0000000000..f588da5d53
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_color_system__theme.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/color/system_theme.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/color/system_theme.h
+@@ -15,7 +15,7 @@ namespace ui {
+ enum class SystemTheme {
+   // Classic theme, used in the default or users' chosen theme.
+   kDefault = 0,
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   kGtk = 1,
+   kQt = 2,
+   kMaxValue = kQt,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor.cc
new file mode 100644
index 0000000000..4e03da6233
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/compositor/compositor.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/compositor/compositor.cc
+@@ -894,7 +894,7 @@ void Compositor::OnResume() {
+     obs.ResetIfActive();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+ void Compositor::OnCompleteSwapWithNewSize(const gfx::Size& size) {
+   for (auto& observer : observer_list_)
+     observer.OnCompositingCompleteSwapWithNewSize(this, size);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor.h
new file mode 100644
index 0000000000..5327438f22
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/compositor/compositor.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/compositor/compositor.h
+@@ -457,7 +457,7 @@ class COMPOSITOR_EXPORT Compositor : pub
+   // base::PowerSuspendObserver:
+   void OnResume() override;
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   void OnCompleteSwapWithNewSize(const gfx::Size& size);
+ #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor__observer.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor__observer.h
new file mode 100644
index 0000000000..e3bd1409f1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_compositor_compositor__observer.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/compositor/compositor_observer.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/compositor/compositor_observer.h
+@@ -52,7 +52,7 @@ class COMPOSITOR_EXPORT CompositorObserv
+   // Called when a child of the compositor is resizing.
+   virtual void OnCompositingChildResizing(Compositor* compositor) {}
+ 
+-#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11)
+   // Called when a swap with new size is completed.
+   virtual void OnCompositingCompleteSwapWithNewSize(ui::Compositor* compositor,
+                                                     const gfx::Size& size) {}
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_display_screen.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_display_screen.cc
new file mode 100644
index 0000000000..6adf25a06c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_display_screen.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/display/screen.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/display/screen.cc
+@@ -86,7 +86,7 @@ void Screen::SetDisplayForNewWindows(int
+   display_id_for_new_windows_ = display_id;
+ }
+ 
+-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ Screen::ScreenSaverSuspender::~ScreenSaverSuspender() = default;
+ 
+ std::unique_ptr<Screen::ScreenSaverSuspender> Screen::SuspendScreenSaver() {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_display_screen.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_display_screen.h
new file mode 100644
index 0000000000..f060a3f11a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_display_screen.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/display/screen.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/display/screen.h
+@@ -140,7 +140,7 @@ class DISPLAY_EXPORT Screen {
+   // (both of which may or may not be `nearest_id`).
+   display::ScreenInfos GetScreenInfosNearestDisplay(int64_t nearest_id) const;
+ 
+-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Object which suspends the platform-specific screensaver for the duration of
+   // its existence.
+   class ScreenSaverSuspender {
+@@ -248,7 +248,7 @@ class DISPLAY_EXPORT Screen {
+   int64_t display_id_for_new_windows_;
+   int64_t scoped_display_id_for_new_windows_ = display::kInvalidDisplayId;
+ 
+-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   uint32_t screen_saver_suspension_count_ = 0;
+ #endif  // BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
+ };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc
new file mode 100644
index 0000000000..a6ae0165a4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/events/devices/x11/device_data_manager_x11.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/events/devices/x11/device_data_manager_x11.cc
+@@ -849,6 +849,7 @@ void DeviceDataManagerX11::SetDisabledKe
+ }
+ 
+ void DeviceDataManagerX11::DisableDevice(x11::Input::DeviceId deviceid) {
++  NOTIMPLEMENTED();
+   blocked_devices_.set(static_cast<uint32_t>(deviceid), true);
+   // TODO(rsadam@): Support blocking touchscreen devices.
+   std::vector<KeyboardDevice> keyboards = GetKeyboardDevices();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event.cc
new file mode 100644
index 0000000000..fb8e5c15b0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/events/event.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/events/event.cc
+@@ -366,7 +366,7 @@ std::string LocatedEvent::ToString() con
+ MouseEvent::MouseEvent(const PlatformEvent& native_event)
+     : LocatedEvent(native_event),
+       changed_button_flags_(GetChangedMouseButtonFlagsFromNative(native_event)),
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       movement_(GetMouseMovementFromNative(native_event)),
+ #endif
+       pointer_details_(GetMousePointerDetailsFromNative(native_event)) {
+@@ -622,7 +622,7 @@ std::unique_ptr<Event> MouseWheelEvent::
+   return std::make_unique<MouseWheelEvent>(*this);
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // This value matches Windows, Fuchsia WHEEL_DELTA, and (roughly) Firefox on
+ // Linux.
+ // static
+@@ -882,7 +882,7 @@ void KeyEvent::InitializeNative() {
+   if (synthesize_key_repeat_enabled_ && IsRepeated(GetLastKeyEvent()))
+     SetFlags(flags() | EF_IS_REPEAT);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   NormalizeFlags();
+ #elif BUILDFLAG(IS_WIN)
+   // Only Windows has native character events.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event__switches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event__switches.cc
new file mode 100644
index 0000000000..5a88d1e99f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event__switches.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/events/event_switches.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/events/event_switches.cc
+@@ -21,7 +21,7 @@ const char kCompensateForUnstablePinchZo
+ // value is a floating point number that is interpreted as a distance in pixels.
+ const char kTouchSlopDistance[] = "touch-slop-distance";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Tells chrome to interpret events from these devices as touch events. Only
+ // available with XInput 2 (i.e. X server 1.8 or above). The id's of the
+ // devices can be retrieved from 'xinput list'.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event__switches.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event__switches.h
new file mode 100644
index 0000000000..b978181022
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_event__switches.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/events/event_switches.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/events/event_switches.h
+@@ -13,7 +13,7 @@ namespace switches {
+ EVENTS_BASE_EXPORT extern const char kCompensateForUnstablePinchZoom[];
+ EVENTS_BASE_EXPORT extern const char kTouchSlopDistance[];
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ EVENTS_BASE_EXPORT extern const char kTouchDevices[];
+ EVENTS_BASE_EXPORT extern const char kPenDevices[];
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.cc
new file mode 100644
index 0000000000..32af0bc01e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/events/keycodes/dom/keycode_converter.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/events/keycodes/dom/keycode_converter.cc
+@@ -18,7 +18,7 @@
+ #include "ui/events/keycodes/dom/dom_code.h"
+ #include "ui/events/keycodes/dom/dom_key.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD)
+ #include <linux/input.h>
+ #endif
+ 
+@@ -31,7 +31,7 @@ namespace {
+ #if BUILDFLAG(IS_WIN)
+ #define DOM_CODE(usb, evdev, xkb, win, mac, code, id) \
+   { usb, win, code }
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #define DOM_CODE(usb, evdev, xkb, win, mac, code, id) \
+   { usb, xkb, code }
+ #elif BUILDFLAG(IS_APPLE)
+@@ -70,7 +70,7 @@ struct DomKeyMapEntry {
+ #undef DOM_KEY_UNI
+ #undef DOM_KEY_MAP_DECLARATION_END
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD)
+ 
+ // The offset between XKB Keycode and evdev code.
+ constexpr int kXkbKeycodeOffset = 8;
+@@ -191,7 +191,7 @@ int KeycodeConverter::DomCodeToNativeKey
+   return UsbKeycodeToNativeKeycode(static_cast<uint32_t>(code));
+ }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD)
+ // static
+ DomCode KeycodeConverter::XkbKeycodeToDomCode(uint32_t xkb_keycode) {
+   // Currently XKB keycode is the native keycode.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.h
new file mode 100644
index 0000000000..06fb03a22d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_events_keycodes_dom_keycode__converter.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/events/keycodes/dom/keycode_converter.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/events/keycodes/dom/keycode_converter.h
+@@ -64,7 +64,7 @@ class KeycodeConverter {
+   // Convert a DomCode into a native keycode.
+   static int DomCodeToNativeKeycode(DomCode code);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD)
+   // Convert a XKB keycode into a DomCode.
+   static DomCode XkbKeycodeToDomCode(uint32_t xkb_keycode);
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn
new file mode 100644
index 0000000000..92d51a6ba5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/BUILD.gn
+@@ -666,7 +666,7 @@ source_set("memory_buffer_sources") {
+     deps += [ "//build/config/linux/libdrm" ]
+   }
+ 
+-  if (is_linux || is_chromeos || is_android) {
++  if ((is_linux || is_chromeos || is_android) && !is_bsd) {
+     deps += [ "//third_party/libsync" ]
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc
new file mode 100644
index 0000000000..24861388d0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_canvas__skia.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/canvas_skia.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/canvas_skia.cc
+@@ -213,7 +213,7 @@ void Canvas::DrawStringRectWithFlags(con
+     Range range = StripAcceleratorChars(flags, &adjusted_text);
+     bool elide_text = ((flags & NO_ELLIPSIS) == 0);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     // On Linux, eliding really means fading the end of the string. But only
+     // for LTR text. RTL text is still elided (on the left) with "...".
+     if (elide_text) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__fallback__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__fallback__linux.cc
new file mode 100644
index 0000000000..2e658e887b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__fallback__linux.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/font_fallback_linux.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/font_fallback_linux.cc
+@@ -32,6 +32,8 @@
+ #include "ui/gfx/linux/fontconfig_util.h"
+ #include "ui/gfx/platform_font.h"
+ 
++#include <unistd.h>
++
+ namespace gfx {
+ 
+ namespace {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h
new file mode 100644
index 0000000000..629ea7068e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/font_render_params.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/font_render_params.h
+@@ -115,7 +115,7 @@ GFX_EXPORT FontRenderParams GetFontRende
+     const FontRenderParamsQuery& query,
+     std::string* family_out);
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+ // Clears GetFontRenderParams()'s cache. Intended to be called by tests that are
+ // changing Fontconfig's configuration.
+ GFX_EXPORT void ClearFontRenderParamsCacheForTest();
+@@ -125,7 +125,7 @@ GFX_EXPORT void ClearFontRenderParamsCac
+ GFX_EXPORT float GetFontRenderParamsDeviceScaleFactor();
+ 
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+-    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
++    BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+ // Sets the device scale factor for FontRenderParams to decide
+ // if it should enable subpixel positioning.
+ GFX_EXPORT void SetFontRenderParamsDeviceScaleFactor(
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__render__params__linux.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__render__params__linux.cc
new file mode 100644
index 0000000000..83d80464d9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__render__params__linux.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/font_render_params_linux.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/font_render_params_linux.cc
+@@ -25,7 +25,7 @@
+ #include "ui/gfx/linux/fontconfig_util.h"
+ #include "ui/gfx/switches.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -212,7 +212,7 @@ FontRenderParams GetFontRenderParams(con
+ 
+   // Start with the delegate's settings, but let Fontconfig have the final say.
+   FontRenderParams params;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (const auto* linux_ui = ui::LinuxUi::instance())
+     params = linux_ui->GetDefaultFontRenderParams();
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__util.cc
new file mode 100644
index 0000000000..88effeec28
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_font__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/font_util.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/font_util.cc
+@@ -6,7 +6,7 @@
+ 
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <fontconfig/fontconfig.h>
+ #include "ui/gfx/linux/fontconfig_util.h"
+ #endif
+@@ -24,7 +24,7 @@ void InitializeFonts() {
+   // background (resources have not yet been granted to cast) since it prevents
+   // the long delay the user would have seen on first rendering.
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Ensures the config is created on this thread.
+   FcConfig* config = GetGlobalFontConfig();
+   DCHECK(config);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.cc
new file mode 100644
index 0000000000..96ca6bb608
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.cc
+@@ -63,7 +63,7 @@ GpuMemoryBufferHandle GpuMemoryBufferHan
+   handle.region = region.Duplicate();
+   handle.offset = offset;
+   handle.stride = stride;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   handle.native_pixmap_handle = CloneHandleForIPC(native_pixmap_handle);
+ #elif BUILDFLAG(IS_APPLE)
+   handle.io_surface = io_surface;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h
new file mode 100644
index 0000000000..d12af3ca12
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.h
+@@ -15,7 +15,7 @@
+ #include "ui/gfx/geometry/rect.h"
+ #include "ui/gfx/gfx_export.h"
+ 
+-#if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "ui/gfx/native_pixmap_handle.h"
+ #elif BUILDFLAG(IS_APPLE)
+ #include "ui/gfx/mac/io_surface.h"
+@@ -76,7 +76,7 @@ struct GFX_EXPORT GpuMemoryBufferHandle 
+   base::UnsafeSharedMemoryRegion region;
+   uint32_t offset = 0;
+   uint32_t stride = 0;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   NativePixmapHandle native_pixmap_handle;
+ #elif BUILDFLAG(IS_APPLE)
+   ScopedIOSurface io_surface;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h
new file mode 100644
index 0000000000..2aee7611d0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_linux_dmabuf__uapi.h
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/linux/dmabuf_uapi.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/linux/dmabuf_uapi.h
+@@ -5,12 +5,11 @@
+ #ifndef UI_GFX_LINUX_DMABUF_UAPI_H_
+ #define UI_GFX_LINUX_DMABUF_UAPI_H_
+ 
+-#include <linux/version.h>
++#include <sys/types.h>
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+-#include <linux/dma-buf.h>
+-#else
+-#include <linux/types.h>
++typedef int32_t  __s32;
++typedef uint32_t __u32;
++typedef uint64_t __u64;
+ 
+ struct dma_buf_sync {
+   __u64 flags;
+@@ -43,6 +42,5 @@ constexpr unsigned long DMA_BUF_IOCTL_EX
+     _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file);
+ constexpr unsigned long DMA_BUF_IOCTL_IMPORT_SYNC_FILE =
+     _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file);
+-#endif
+ 
+ #endif  // UI_GFX_LINUX_DMABUF_UAPI_H_
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_linux_gbm__wrapper.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_linux_gbm__wrapper.cc
new file mode 100644
index 0000000000..194c6ff86c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_linux_gbm__wrapper.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/linux/gbm_wrapper.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/linux/gbm_wrapper.cc
+@@ -317,7 +317,7 @@ class Device final : public ui::GbmDevic
+     // of 1x1 BOs which are destroyed before creating the final BO creation used
+     // to instantiate the returned GbmBuffer.
+     gfx::Size size =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+         gfx::Size(1, 1);
+ #else
+         requested_size;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_buffer__types__mojom__traits.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_buffer__types__mojom__traits.cc
new file mode 100644
index 0000000000..3382d95df3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_buffer__types__mojom__traits.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/mojom/buffer_types_mojom_traits.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/mojom/buffer_types_mojom_traits.cc
+@@ -33,7 +33,7 @@ gfx::mojom::GpuMemoryBufferPlatformHandl
+       return gfx::mojom::GpuMemoryBufferPlatformHandle::NewSharedMemoryHandle(
+           std::move(handle.region));
+     case gfx::NATIVE_PIXMAP:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+       return gfx::mojom::GpuMemoryBufferPlatformHandle::NewNativePixmapHandle(
+           std::move(handle.native_pixmap_handle));
+ #else
+@@ -115,7 +115,7 @@ bool StructTraits<gfx::mojom::GpuMemoryB
+       out->type = gfx::SHARED_MEMORY_BUFFER;
+       out->region = std::move(platform_handle->get_shared_memory_handle());
+       return true;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+     case gfx::mojom::GpuMemoryBufferPlatformHandleDataView::Tag::
+         kNativePixmapHandle:
+       out->type = gfx::NATIVE_PIXMAP;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.cc
new file mode 100644
index 0000000000..36280c0268
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/mojom/native_handle_types_mojom_traits.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/mojom/native_handle_types_mojom_traits.cc
+@@ -8,11 +8,11 @@
+ 
+ namespace mojo {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ mojo::PlatformHandle StructTraits<
+     gfx::mojom::NativePixmapPlaneDataView,
+     gfx::NativePixmapPlane>::buffer_handle(gfx::NativePixmapPlane& plane) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return mojo::PlatformHandle(std::move(plane.fd));
+ #elif BUILDFLAG(IS_FUCHSIA)
+   return mojo::PlatformHandle(std::move(plane.vmo));
+@@ -28,7 +28,7 @@ bool StructTraits<
+   out->size = data.size();
+ 
+   mojo::PlatformHandle handle = data.TakeBufferHandle();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   if (!handle.is_fd())
+     return false;
+   out->fd = handle.TakeFD();
+@@ -54,7 +54,7 @@ bool StructTraits<
+     gfx::mojom::NativePixmapHandleDataView,
+     gfx::NativePixmapHandle>::Read(gfx::mojom::NativePixmapHandleDataView data,
+                                    gfx::NativePixmapHandle* out) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   out->modifier = data.modifier();
+   out->supports_zero_copy_webgpu_import =
+       data.supports_zero_copy_webgpu_import();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.h
new file mode 100644
index 0000000000..e125a64347
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_mojom_native__handle__types__mojom__traits.h
@@ -0,0 +1,42 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/mojom/native_handle_types_mojom_traits.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/mojom/native_handle_types_mojom_traits.h
+@@ -15,7 +15,7 @@
+ #include "third_party/abseil-cpp/absl/types/optional.h"
+ #include "ui/gfx/mojom/native_handle_types.mojom-shared.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ #include "ui/gfx/native_pixmap_handle.h"
+ #endif
+ 
+@@ -25,7 +25,7 @@
+ 
+ namespace mojo {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ template <>
+ struct COMPONENT_EXPORT(GFX_NATIVE_HANDLE_TYPES_SHARED_MOJOM_TRAITS)
+     StructTraits<gfx::mojom::NativePixmapPlaneDataView,
+@@ -53,13 +53,13 @@ struct COMPONENT_EXPORT(GFX_NATIVE_HANDL
+     return pixmap_handle.planes;
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static uint64_t modifier(const gfx::NativePixmapHandle& pixmap_handle) {
+     return pixmap_handle.modifier;
+   }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   static bool supports_zero_copy_webgpu_import(
+       const gfx::NativePixmapHandle& pixmap_handle) {
+     return pixmap_handle.supports_zero_copy_webgpu_import;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc
new file mode 100644
index 0000000000..6dfc3c58c9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc
@@ -0,0 +1,68 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc
+@@ -11,7 +11,7 @@
+ #include "ui/gfx/buffer_format_util.h"
+ #include "ui/gfx/geometry/size.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #if __has_include(<drm_fourcc.h>)
+ #include <drm_fourcc.h>
+ #else
+@@ -27,9 +27,13 @@
+ #include "base/fuchsia/fuchsia_logging.h"
+ #endif
+ 
++#if BUILDFLAG(IS_BSD)
++#include <unistd.h>
++#endif
++
+ namespace gfx {
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ static_assert(NativePixmapHandle::kNoModifier == DRM_FORMAT_MOD_INVALID,
+               "gfx::NativePixmapHandle::kNoModifier should be an alias for"
+               "DRM_FORMAT_MOD_INVALID");
+@@ -40,7 +44,7 @@ NativePixmapPlane::NativePixmapPlane() :
+ NativePixmapPlane::NativePixmapPlane(int stride,
+                                      int offset,
+                                      uint64_t size
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                                      ,
+                                      base::ScopedFD fd
+ #elif BUILDFLAG(IS_FUCHSIA)
+@@ -51,7 +55,7 @@ NativePixmapPlane::NativePixmapPlane(int
+     : stride(stride),
+       offset(offset),
+       size(size)
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       ,
+       fd(std::move(fd))
+ #elif BUILDFLAG(IS_FUCHSIA)
+@@ -79,7 +83,7 @@ NativePixmapHandle& NativePixmapHandle::
+ NativePixmapHandle CloneHandleForIPC(const NativePixmapHandle& handle) {
+   NativePixmapHandle clone;
+   for (auto& plane : handle.planes) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     DCHECK(plane.fd.is_valid());
+     // Combining the HANDLE_EINTR and ScopedFD's constructor causes the compiler
+     // to emit some very strange assembly that tends to cause FD ownership
+@@ -117,7 +121,7 @@ NativePixmapHandle CloneHandleForIPC(con
+ #endif
+   }
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   clone.modifier = handle.modifier;
+   clone.supports_zero_copy_webgpu_import =
+       handle.supports_zero_copy_webgpu_import;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h
new file mode 100644
index 0000000000..7a7531f34f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/native_pixmap_handle.h
+@@ -14,7 +14,7 @@
+ #include "ui/gfx/buffer_types.h"
+ #include "ui/gfx/gfx_export.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "base/files/scoped_file.h"
+ #endif
+ 
+@@ -34,7 +34,7 @@ struct GFX_EXPORT NativePixmapPlane {
+   NativePixmapPlane(int stride,
+                     int offset,
+                     uint64_t size
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+                     ,
+                     base::ScopedFD fd
+ #elif BUILDFLAG(IS_FUCHSIA)
+@@ -55,7 +55,7 @@ struct GFX_EXPORT NativePixmapPlane {
+   // This is necessary to map the buffers.
+   uint64_t size;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // File descriptor for the underlying memory object (usually dmabuf).
+   base::ScopedFD fd;
+ #elif BUILDFLAG(IS_FUCHSIA)
+@@ -78,7 +78,7 @@ struct GFX_EXPORT NativePixmapHandle {
+ 
+   std::vector<NativePixmapPlane> planes;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The modifier is retrieved from GBM library and passed to EGL driver.
+   // Generally it's platform specific, and we don't need to modify it in
+   // Chromium code. Also one per plane per entry.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h
new file mode 100644
index 0000000000..4d94c4e863
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_native__widget__types.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/native_widget_types.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/native_widget_types.h
+@@ -104,7 +104,7 @@ class SkBitmap;
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ extern "C" {
+ struct _AtkObject;
+ using AtkObject = struct _AtkObject;
+@@ -220,7 +220,7 @@ using NativeViewAccessible = struct objc
+ #endif
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+ // Linux doesn't have a native font type.
+ using NativeViewAccessible = AtkObject*;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_platform__font__skia.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_platform__font__skia.cc
new file mode 100644
index 0000000000..b3eabf0b3e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_platform__font__skia.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/platform_font_skia.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/platform_font_skia.cc
+@@ -30,7 +30,7 @@
+ #include "ui/gfx/system_fonts_win.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -168,7 +168,7 @@ void PlatformFontSkia::EnsuresDefaultFon
+   weight = system_font.GetWeight();
+ #endif  // BUILDFLAG(IS_WIN)
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // On Linux, LinuxUi is used to query the native toolkit (e.g.
+   // GTK) for the default UI font.
+   if (const auto* linux_ui = ui::LinuxUi::instance()) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_render__text__api__fuzzer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_render__text__api__fuzzer.cc
new file mode 100644
index 0000000000..641def6cea
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_render__text__api__fuzzer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/render_text_api_fuzzer.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/render_text_api_fuzzer.cc
+@@ -20,7 +20,7 @@
+ #include "ui/gfx/font_util.h"
+ #include "ui/gfx/render_text.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h"
+ #endif
+ 
+@@ -47,7 +47,7 @@ struct Environment {
+ 
+     CHECK(base::i18n::InitializeICU());
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     test_fonts::SetUpFontconfig();
+ #endif
+     gfx::InitializeFonts();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_render__text__fuzzer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_render__text__fuzzer.cc
new file mode 100644
index 0000000000..b22072cf3a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_render__text__fuzzer.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/render_text_fuzzer.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/render_text_fuzzer.cc
+@@ -14,7 +14,7 @@
+ #include "ui/gfx/font_util.h"
+ #include "ui/gfx/render_text.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h"
+ #endif
+ 
+@@ -37,7 +37,7 @@ struct Environment {
+ 
+     CHECK(base::i18n::InitializeICU());
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     test_fonts::SetUpFontconfig();
+ #endif
+     gfx::InitializeFonts();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_switches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_switches.cc
new file mode 100644
index 0000000000..8342f445f0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_switches.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/switches.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/switches.cc
+@@ -32,7 +32,7 @@ const char kForcePrefersNoReducedMotion[
+ // Run in headless mode, i.e., without a UI or display server dependencies.
+ const char kHeadless[] = "headless";
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // Which X11 display to connect to. Emulates the GTK+ "--display=" command line
+ // argument. In use only with Ozone/X11.
+ const char kX11Display[] = "display";
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_switches.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_switches.h
new file mode 100644
index 0000000000..11d16c189a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_switches.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/switches.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/switches.h
+@@ -18,7 +18,7 @@ GFX_SWITCHES_EXPORT extern const char kE
+ GFX_SWITCHES_EXPORT extern const char kForcePrefersReducedMotion[];
+ GFX_SWITCHES_EXPORT extern const char kHeadless[];
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ GFX_SWITCHES_EXPORT extern const char kX11Display[];
+ GFX_SWITCHES_EXPORT extern const char kNoXshm[];
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_BUILD.gn
new file mode 100644
index 0000000000..3ef12b78f1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/3rdparty/chromium/ui/gfx/x/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/x/BUILD.gn
+@@ -7,8 +7,6 @@ import("//build/config/ozone.gni")
+ import("//build/config/ui.gni")
+ import("//tools/generate_library_loader/generate_library_loader.gni")
+ 
+-assert(ozone_platform_x11)
+-
+ declare_args() {
+   regenerate_x11_protos = false
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_dri3.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_dri3.cc
new file mode 100644
index 0000000000..462506d465
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_dri3.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/x/generated_protos/dri3.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/x/generated_protos/dri3.cc
+@@ -27,6 +27,8 @@
+ #include <xcb/xcb.h>
+ #include <xcb/xcbext.h>
+ 
++#include <unistd.h>
++
+ #include "base/logging.h"
+ #include "base/posix/eintr_wrapper.h"
+ #include "ui/gfx/x/connection.h"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_shm.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_shm.cc
new file mode 100644
index 0000000000..8a269523e8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_generated__protos_shm.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/x/generated_protos/shm.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/x/generated_protos/shm.cc
+@@ -27,6 +27,8 @@
+ #include <xcb/xcb.h>
+ #include <xcb/xcbext.h>
+ 
++#include <unistd.h>
++
+ #include "base/logging.h"
+ #include "base/posix/eintr_wrapper.h"
+ #include "ui/gfx/x/connection.h"
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc
new file mode 100644
index 0000000000..b72c90698c
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gfx_x_xlib__support.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gfx/x/xlib_support.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gfx/x/xlib_support.cc
+@@ -39,10 +39,18 @@ void InitXlib() {
+     return;
+   }
+ 
++#if BUILDFLAG(IS_BSD)
++  CHECK(xlib_loader->Load("libX11.so"));
++#else
+   CHECK(xlib_loader->Load("libX11.so.6"));
++#endif
+ 
+   auto* xlib_xcb_loader = GetXlibXcbLoader();
++#if BUILDFLAG(IS_BSD)
++  CHECK(xlib_xcb_loader->Load("libX11-xcb.so"));
++#else
+   CHECK(xlib_xcb_loader->Load("libX11-xcb.so.1"));
++#endif
+ 
+   CHECK(xlib_loader->XInitThreads());
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_BUILD.gn
new file mode 100644
index 0000000000..6530de61d0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_BUILD.gn
@@ -0,0 +1,32 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gl/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gl/BUILD.gn
+@@ -186,7 +186,6 @@ jumbo_component("gl") {
+   ]
+   public_deps = [
+     "//base",
+-    "//third_party/mesa_headers",
+     "//ui/events/platform",
+     "//ui/gfx",
+     "//ui/gfx/geometry",
+@@ -428,7 +427,6 @@ jumbo_component("gl") {
+     data_deps += [
+       "//third_party/angle:libEGL",
+       "//third_party/angle:libGLESv2",
+-      "//third_party/mesa_headers",
+     ]
+     if (enable_swiftshader) {
+       data_deps += [
+@@ -646,7 +644,6 @@ test("gl_unittests") {
+ 
+   data_deps = [
+     "//testing/buildbot/filters:gl_unittests_filters",
+-    "//third_party/mesa_headers",
+   ]
+ 
+   if (is_win) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__context.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__context.cc
new file mode 100644
index 0000000000..a480e5e14f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__context.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gl/gl_context.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gl/gl_context.cc
+@@ -517,7 +517,7 @@ bool GLContext::MakeVirtuallyCurrent(
+   DCHECK(virtual_context->IsCurrent(surface));
+ 
+   if (switched_real_contexts || virtual_context != current_virtual_context_) {
+-#if DCHECK_IS_ON()
++#if DCHECK_IS_ON() && !BUILDFLAG(IS_BSD)
+     GLenum error = glGetError();
+     // Accepting a context loss error here enables using debug mode to work on
+     // context loss handling in virtual context mode.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc
new file mode 100644
index 0000000000..302f6b6eea
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gl/gl_fence.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gl/gl_fence.cc
+@@ -20,7 +20,7 @@
+ #endif
+ 
+ #if defined(USE_EGL)
+-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #define USE_GL_FENCE_ANDROID_NATIVE_FENCE_SYNC
+ #include "ui/gl/gl_fence_android_native_fence_sync.h"
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc
new file mode 100644
index 0000000000..bcf254200a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gl/gl_implementation.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gl/gl_implementation.cc
+@@ -286,7 +286,7 @@ GetRequestedGLImplementationFromCommandL
+   *fallback_to_software_gl = false;
+   bool overrideUseSoftwareGL =
+       command_line->HasSwitch(switches::kOverrideUseSoftwareGLForTests);
+-#if BUILDFLAG(IS_LINUX) || \
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \
+     (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE))
+   if (std::getenv("RUNNING_UNDER_RR")) {
+     // https://rr-project.org/ is a Linux-only record-and-replay debugger that
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__switches.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__switches.cc
new file mode 100644
index 0000000000..fe7efd3120
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_gl__switches.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gl/gl_switches.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gl/gl_switches.cc
+@@ -12,7 +12,7 @@
+ #include "base/android/build_info.h"
+ #endif
+ 
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(ENABLE_VULKAN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_VULKAN)
+ #include <vulkan/vulkan_core.h>
+ #include "third_party/angle/src/gpu_info_util/SystemInfo.h"  // nogncheck
+ #endif
+@@ -301,7 +301,7 @@ bool IsDefaultANGLEVulkan() {
+       base::android::SDK_VERSION_Q)
+     return false;
+ #endif  // BUILDFLAG(IS_ANDROID)
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(ENABLE_VULKAN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(ENABLE_VULKAN)
+   angle::SystemInfo system_info;
+   if (!angle::GetSystemInfoVulkan(&system_info))
+     return false;
+@@ -313,7 +313,7 @@ bool IsDefaultANGLEVulkan() {
+ 
+   const auto& active_gpu = system_info.gpus[system_info.activeGPUIndex];
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Vulkan 1.1 is required.
+   if (active_gpu.driverApiVersion < VK_VERSION_1_1)
+     return false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.cc
new file mode 100644
index 0000000000..5428c88046
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.cc
+@@ -11,7 +11,7 @@
+ #include "base/trace_event/trace_event.h"
+ #include "build/build_config.h"
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // These constants define a reasonable range for a calculated refresh interval.
+ // Calculating refreshes out of this range will be considered a fatal error.
+ const int64_t kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400;
+@@ -26,7 +26,7 @@ const double kRelativeIntervalDifference
+ namespace gl {
+ 
+ SyncControlVSyncProvider::SyncControlVSyncProvider() : gfx::VSyncProvider() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // On platforms where we can't get an accurate reading on the refresh
+   // rate we fall back to the assumption that we're displaying 60 frames
+   // per second.
+@@ -48,7 +48,7 @@ bool SyncControlVSyncProvider::GetVSyncP
+     base::TimeTicks* timebase_out,
+     base::TimeDelta* interval_out) {
+   TRACE_EVENT0("gpu", "SyncControlVSyncProvider::GetVSyncParameters");
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // The actual clock used for the system time returned by glXGetSyncValuesOML
+   // is unspecified. In practice, the clock used is likely to be either
+   // CLOCK_REALTIME or CLOCK_MONOTONIC, so we compare the returned time to the
+@@ -159,7 +159,7 @@ bool SyncControlVSyncProvider::GetVSyncP
+ }
+ 
+ bool SyncControlVSyncProvider::SupportGetVSyncParametersIfAvailable() const {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.h
new file mode 100644
index 0000000000..d742d4e1d2
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.h
+@@ -31,7 +31,7 @@ class SyncControlVSyncProvider : public 
+   bool SupportGetVSyncParametersIfAvailable() const override;
+ 
+   static constexpr bool IsSupported() {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+     return true;
+ #else
+     return false;
+@@ -46,7 +46,7 @@ class SyncControlVSyncProvider : public 
+   virtual bool GetMscRate(int32_t* numerator, int32_t* denominator) = 0;
+ 
+  private:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   base::TimeTicks last_timebase_;
+   uint64_t last_media_stream_counter_ = 0;
+   base::TimeDelta last_good_interval_;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc
new file mode 100644
index 0000000000..f307bf8be9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gtk_gtk__compat.cc
@@ -0,0 +1,56 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gtk/gtk_compat.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/gtk/gtk_compat.cc
+@@ -62,27 +62,47 @@ auto DlCast(void* symbol) {
+ }
+ 
+ void* GetLibGio() {
++#if BUILDFLAG(IS_BSD)
++  static void* libgio = DlOpen("libgio-2.0.so");
++#else
+   static void* libgio = DlOpen("libgio-2.0.so.0");
++#endif
+   return libgio;
+ }
+ 
+ void* GetLibGdkPixbuf() {
++#if BUILDFLAG(IS_BSD)
++  static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so");
++#else
+   static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0");
++#endif
+   return libgdk_pixbuf;
+ }
+ 
+ void* GetLibGdk3() {
++#if BUILDFLAG(IS_BSD)
++  static void* libgdk3 = DlOpen("libgdk-3.so");
++#else
+   static void* libgdk3 = DlOpen("libgdk-3.so.0");
++#endif
+   return libgdk3;
+ }
+ 
+ void* GetLibGtk3(bool check = true) {
++#if BUILDFLAG(IS_BSD)
++  static void* libgtk3 = DlOpen("libgtk-3.so", check);
++#else
+   static void* libgtk3 = DlOpen("libgtk-3.so.0", check);
++#endif
+   return libgtk3;
+ }
+ 
+ void* GetLibGtk4(bool check = true) {
++#if BUILDFLAG(IS_BSD)
++  static void* libgtk4 = DlOpen("libgtk-4.so", check);
++#else
+   static void* libgtk4 = DlOpen("libgtk-4.so.1", check);
++#endif
+   return libgtk4;
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc
new file mode 100644
index 0000000000..57b44f3891
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_gtk_printing_print__dialog__gtk.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/gtk/printing/print_dialog_gtk.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/gtk/printing/print_dialog_gtk.cc
+@@ -433,7 +433,7 @@ void PrintDialogGtk::ShowDialog(
+   GtkPrintCapabilities cap = static_cast<GtkPrintCapabilities>(
+       GTK_PRINT_CAPABILITY_GENERATE_PDF | GTK_PRINT_CAPABILITY_PAGE_SET |
+       GTK_PRINT_CAPABILITY_COPIES | GTK_PRINT_CAPABILITY_COLLATE |
+-      GTK_PRINT_CAPABILITY_REVERSE);
++      GTK_PRINT_CAPABILITY_REVERSE | GTK_PRINT_CAPABILITY_GENERATE_PS);
+   gtk_print_unix_dialog_set_manual_capabilities(GTK_PRINT_UNIX_DIALOG(dialog_),
+                                                 cap);
+   gtk_print_unix_dialog_set_embed_page_setup(GTK_PRINT_UNIX_DIALOG(dialog_),
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_message__center_views_message__popup__view.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_message__center_views_message__popup__view.cc
new file mode 100644
index 0000000000..9ba1882075
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_message__center_views_message__popup__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/message_center/views/message_popup_view.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/message_center/views/message_popup_view.cc
+@@ -135,7 +135,7 @@ void MessagePopupView::Show() {
+   params.z_order = ui::ZOrderLevel::kFloatingWindow;
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   // Make the widget explicitly activatable as TYPE_POPUP is not activatable by
+   // default but we need focus for the inline reply textarea.
+   params.activatable = views::Widget::InitParams::Activatable::kYes;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h
new file mode 100644
index 0000000000..a5c3af3649
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/native_theme/native_theme.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/native_theme/native_theme.h
+@@ -62,7 +62,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
+     kCheckbox,
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+     kFrameTopArea,
+ #endif
+     kInnerSpinButton,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc
new file mode 100644
index 0000000000..c36dfc6705
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/native_theme/native_theme_base.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/native_theme/native_theme_base.cc
+@@ -235,7 +235,7 @@ void NativeThemeBase::Paint(cc::PaintCan
+       break;
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+     case kFrameTopArea:
+       PaintFrameTopArea(canvas, state, rect,
+                         absl::get<FrameTopAreaExtraParams>(extra),
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme__features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme__features.cc
new file mode 100644
index 0000000000..dd36eba602
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_native__theme_native__theme__features.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/native_theme/native_theme_features.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/native_theme/native_theme_features.cc
+@@ -65,7 +65,7 @@ bool IsOverlayScrollbarEnabled() {
+ 
+ bool IsFluentScrollbarEnabled() {
+ // Fluent scrollbars are only used for some OSes due to UI design guidelines.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(features::kFluentScrollbar) ||
+          IsFluentOverlayScrollbarEnabled();
+ #else
+@@ -74,7 +74,7 @@ bool IsFluentScrollbarEnabled() {
+ }
+ bool IsFluentOverlayScrollbarEnabled() {
+ // Fluent scrollbars are only used for some OSes due to UI design guidelines.
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return base::FeatureList::IsEnabled(features::kFluentOverlayScrollbar);
+ #else
+   return false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_common_egl__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_common_egl__util.cc
new file mode 100644
index 0000000000..6d19cd2898
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_common_egl__util.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/common/egl_util.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/common/egl_util.cc
+@@ -26,9 +26,9 @@ const base::FilePath::CharType kDefaultG
+     FILE_PATH_LITERAL("libGLESv2.so");
+ #else  // BUILDFLAG(IS_FUCHSIA)
+ const base::FilePath::CharType kDefaultEglSoname[] =
+-    FILE_PATH_LITERAL("libEGL.so.1");
++    FILE_PATH_LITERAL("libEGL.so");
+ const base::FilePath::CharType kDefaultGlesSoname[] =
+-    FILE_PATH_LITERAL("libGLESv2.so.2");
++    FILE_PATH_LITERAL("libGLESv2.so");
+ #endif
+ const base::FilePath::CharType kAngleEglSoname[] =
+     FILE_PATH_LITERAL("libEGL.so");
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_common_features.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_common_features.cc
new file mode 100644
index 0000000000..452a3c3fa3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_common_features.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/common/features.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/common/features.cc
+@@ -30,7 +30,7 @@ BASE_FEATURE(kWaylandSurfaceSubmissionIn
+ // enabled.
+ BASE_FEATURE(kWaylandFractionalScaleV1,
+              "WaylandFractionalScaleV1",
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+              base::FEATURE_ENABLED_BY_DEFAULT
+ #else
+              base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_headless__surface__factory.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_headless__surface__factory.cc
new file mode 100644
index 0000000000..db0d8dce52
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_headless__surface__factory.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/headless/headless_surface_factory.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/headless/headless_surface_factory.cc
+@@ -34,7 +34,7 @@
+ #include "ui/ozone/platform/headless/headless_window_manager.h"
+ #include "ui/ozone/public/surface_ozone_canvas.h"
+ 
+-#if BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA))
++#if BUILDFLAG(ENABLE_VULKAN) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD))
+ #include "ui/ozone/platform/headless/vulkan_implementation_headless.h"
+ #endif
+ 
+@@ -280,7 +280,7 @@ std::unique_ptr<gpu::VulkanImplementatio
+ HeadlessSurfaceFactory::CreateVulkanImplementation(
+     bool use_swiftshader,
+     bool allow_protected_memory) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
+   return std::make_unique<VulkanImplementationHeadless>(use_swiftshader);
+ #else
+   return nullptr;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_ozone__platform__headless.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_ozone__platform__headless.cc
new file mode 100644
index 0000000000..260c3ee8bd
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_ozone__platform__headless.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/headless/ozone_platform_headless.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/headless/ozone_platform_headless.cc
+@@ -103,7 +103,7 @@ class OzonePlatformHeadless : public Ozo
+   }
+ 
+ // Desktop Linux, not CastOS.
+-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CASTOS)
+   const PlatformProperties& GetPlatformProperties() override {
+     static base::NoDestructor<OzonePlatform::PlatformProperties> properties;
+     static bool initialized = false;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc
new file mode 100644
index 0000000000..d01adad093
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_headless_vulkan__implementation__headless.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/headless/vulkan_implementation_headless.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/headless/vulkan_implementation_headless.cc
+@@ -118,7 +118,7 @@ VulkanImplementationHeadless::ExportVkFe
+ 
+ VkExternalSemaphoreHandleTypeFlagBits
+ VulkanImplementationHeadless::GetExternalSemaphoreHandleType() {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT;
+ #else
+   return VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT;
+@@ -128,7 +128,7 @@ VulkanImplementationHeadless::GetExterna
+ bool VulkanImplementationHeadless::CanImportGpuMemoryBuffer(
+     gpu::VulkanDeviceQueue* device_queue,
+     gfx::GpuMemoryBufferType memory_buffer_type) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   const auto& enabled_extensions = device_queue->enabled_extensions();
+   return gfx::HasExtension(enabled_extensions,
+                            VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME) &&
+@@ -151,7 +151,7 @@ VulkanImplementationHeadless::CreateImag
+       VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT |
+       VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
+   auto tiling = VK_IMAGE_TILING_OPTIMAL;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (gmb_handle.native_pixmap_handle.modifier !=
+       gfx::NativePixmapHandle::kNoModifier) {
+     tiling = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_common_wayland__util.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_common_wayland__util.cc
new file mode 100644
index 0000000000..577fa1180a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_common_wayland__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/common/wayland_util.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/common/wayland_util.cc
+@@ -335,7 +335,7 @@ void TransformToWlArray(
+ }
+ 
+ base::TimeTicks EventMillisecondsToTimeTicks(uint32_t milliseconds) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // TODO(crbug.com/1499638): `milliseconds` comes from Weston that
+   // uses timestamp from libinput, which is different from TimeTicks.
+   // Use EventTimeForNow(), for now.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.cc
new file mode 100644
index 0000000000..98d59847e5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/emulate/wayland_input_emulate.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/emulate/wayland_input_emulate.cc
+@@ -230,7 +230,7 @@ void WaylandInputEmulate::EmulateTouch(i
+   wayland_proxy->FlushForTesting();
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void WaylandInputEmulate::ForceUseScreenCoordinatesOnce() {
+   force_use_screen_coordinates_once_ = true;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.h
new file mode 100644
index 0000000000..93c4061089
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_emulate_wayland__input__emulate.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/emulate/wayland_input_emulate.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/emulate/wayland_input_emulate.h
+@@ -61,7 +61,7 @@ class WaylandInputEmulate : public wl::W
+                     int touch_id,
+                     uint32_t request_id);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void ForceUseScreenCoordinatesOnce();
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc
new file mode 100644
index 0000000000..ba189b3570
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_gpu_vulkan__implementation__wayland.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/gpu/vulkan_implementation_wayland.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/gpu/vulkan_implementation_wayland.cc
+@@ -38,7 +38,11 @@ bool VulkanImplementationWayland::Initia
+ 
+     path = path.Append("libvk_swiftshader.so");
+   } else {
++#if BUILDFLAG(IS_BSD)
++    path = base::FilePath("libvulkan.so");
++#else
+     path = base::FilePath("libvulkan.so.1");
++#endif
+   }
+ 
+   return vulkan_instance_.Initialize(path, required_extensions, {});
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc
new file mode 100644
index 0000000000..68bb2d30f1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
+@@ -629,7 +629,7 @@ void WaylandToplevelWindow::HandleToplev
+   const bool did_active_change = is_active_ != window_states.is_activated;
+   is_active_ = window_states.is_activated;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // The tiled state affects the window geometry, so apply it here.
+   if (window_states.tiled_edges != tiled_state_) {
+     // This configure changes the decoration insets.  We should adjust the
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h
new file mode 100644
index 0000000000..95d642ec70
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__toplevel__window.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_toplevel_window.h
+@@ -262,7 +262,7 @@ class WaylandToplevelWindow : public Way
+   // The display ID to switch to in case the state is `kFullscreen`.
+   int64_t fullscreen_display_id_ = display::kInvalidDisplayId;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Contains the current state of the tiled edges.
+   WindowTiledEdges tiled_state_;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.cc
new file mode 100644
index 0000000000..5809e54cc9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.cc
+@@ -235,7 +235,7 @@ void WaylandWindow::OnPointerFocusChange
+   // Whenever the window gets the pointer focus back, the cursor shape must be
+   // updated. Otherwise, it is invalidated upon wl_pointer::leave and is not
+   // restored by the Wayland compositor.
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (focused && async_cursor_) {
+     async_cursor_->AddCursorLoadedCallback(
+         base::BindOnce(&WaylandWindow::OnCursorLoaded,
+@@ -496,7 +496,7 @@ bool WaylandWindow::ShouldUseNativeFrame
+ void WaylandWindow::SetCursor(scoped_refptr<PlatformCursor> platform_cursor) {
+   DCHECK(platform_cursor);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto async_cursor = WaylandAsyncCursor::FromPlatformCursor(platform_cursor);
+ 
+   if (async_cursor_ == async_cursor) {
+@@ -676,7 +676,7 @@ std::string WaylandWindow::WindowStates:
+   } else {
+     base::TrimString(states, " ", &states);
+   }
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   states += "; tiled_edges: ";
+   std::string tiled = "";
+   if (tiled_edges.left) {
+@@ -1147,12 +1147,12 @@ void WaylandWindow::UpdateCursorShape(sc
+         cursor->bitmaps(), hotspot_in_dips,
+         std::ceil(cursor->cursor_image_scale_factor()));
+   }
+-#if !BUILDFLAG(IS_LINUX)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD)
+   cursor_ = cursor;
+ #endif
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void WaylandWindow::OnCursorLoaded(scoped_refptr<WaylandAsyncCursor> cursor,
+                                    scoped_refptr<BitmapCursor> bitmap_cursor) {
+   if (HasPointerFocus() && async_cursor_ == cursor && bitmap_cursor) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h
new file mode 100644
index 0000000000..1adce208f8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_wayland__window.h
@@ -0,0 +1,44 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/wayland_window.h
+@@ -39,7 +39,7 @@
+ #include "ui/platform_window/platform_window_init_properties.h"
+ #include "ui/platform_window/wm/wm_drag_handler.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/ozone/platform/wayland/host/wayland_async_cursor.h"
+ #endif
+ 
+@@ -246,7 +246,7 @@ class WaylandWindow : public PlatformWin
+     bool is_snapped_primary = false;
+     bool is_snapped_secondary = false;
+     bool is_floated = false;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     WindowTiledEdges tiled_edges;
+ #endif
+ 
+@@ -500,7 +500,7 @@ class WaylandWindow : public PlatformWin
+ 
+   void UpdateCursorShape(scoped_refptr<BitmapCursor> cursor);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void OnCursorLoaded(scoped_refptr<WaylandAsyncCursor> cursor,
+                       scoped_refptr<BitmapCursor> bitmap_cursor);
+ #endif
+@@ -559,7 +559,7 @@ class WaylandWindow : public PlatformWin
+ 
+   wl::Object<zaura_surface> aura_surface_;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // The current asynchronously loaded cursor (Linux specific).
+   scoped_refptr<WaylandAsyncCursor> async_cursor_;
+ #else
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc
new file mode 100644
index 0000000000..83e53ba8c7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc
+@@ -322,7 +322,7 @@ void XDGToplevelWrapperImpl::OnToplevelC
+   window_states.is_activated =
+       CheckIfWlArrayHasValue(states, XDG_TOPLEVEL_STATE_ACTIVATED);
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (xdg_toplevel_get_version(toplevel) >=
+       XDG_TOPLEVEL_STATE_TILED_LEFT_SINCE_VERSION) {
+     // All four tiled states have the same since version, so it is enough to
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc
new file mode 100644
index 0000000000..afa41a923f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc
+@@ -256,6 +256,10 @@ void ZWPTextInputWrapperV1::SetSurroundi
+   // so if it exceeds 16 bits, it may be broken.
+   static constexpr size_t kSizeLimit = 60000;
+   if (HasAdvancedSurroundingTextSupport() && text.length() > kSizeLimit) {
++#if defined(__FreeBSD_version) && __FreeBSD_version < 1300048
++    PLOG(ERROR) << "memfd is not supported";
++    return;
++#else
+     base::ScopedFD memfd(memfd_create("surrounding_text", MFD_CLOEXEC));
+     if (!memfd.get()) {
+       PLOG(ERROR) << "Failed to create memfd";
+@@ -268,6 +272,7 @@ void ZWPTextInputWrapperV1::SetSurroundi
+     zcr_extended_text_input_v1_set_large_surrounding_text(
+         extended_obj_.get(), memfd.get(), text.length(),
+         selection_range.start(), selection_range.end());
++#endif
+   } else {
+     zwp_text_input_v1_set_surrounding_text(obj_.get(), text.c_str(),
+                                            selection_range.start(),
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc
new file mode 100644
index 0000000000..1bb861bd92
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_wayland_ozone__platform__wayland.cc
@@ -0,0 +1,51 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/wayland/ozone_platform_wayland.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/wayland/ozone_platform_wayland.cc
+@@ -66,13 +66,13 @@
+ #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/ozone/platform/wayland/host/wayland_cursor_factory.h"
+ #else
+ #include "ui/ozone/common/bitmap_cursor_factory.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/ozone/platform/wayland/host/linux_ui_delegate_wayland.h"
+ #endif
+ 
+@@ -267,7 +267,7 @@ class OzonePlatformWayland : public Ozon
+ 
+     buffer_manager_connector_ = std::make_unique<WaylandBufferManagerConnector>(
+         connection_->buffer_manager_host());
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     cursor_factory_ = std::make_unique<WaylandCursorFactory>(connection_.get());
+ #else
+     cursor_factory_ = std::make_unique<BitmapCursorFactory>();
+@@ -277,7 +277,7 @@ class OzonePlatformWayland : public Ozon
+ 
+     supported_buffer_formats_ =
+         connection_->buffer_manager_host()->GetSupportedBufferFormats();
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     linux_ui_delegate_ =
+         std::make_unique<LinuxUiDelegateWayland>(connection_.get());
+ #endif
+@@ -514,7 +514,7 @@ class OzonePlatformWayland : public Ozon
+   DrmRenderNodePathFinder path_finder_;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   std::unique_ptr<LinuxUiDelegateWayland> linux_ui_delegate_;
+ #endif
+ };
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_vulkan__implementation__x11.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_vulkan__implementation__x11.cc
new file mode 100644
index 0000000000..c6f7bb92b9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_vulkan__implementation__x11.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/x11/vulkan_implementation_x11.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/x11/vulkan_implementation_x11.cc
+@@ -59,7 +59,11 @@ bool VulkanImplementationX11::Initialize
+ 
+     path = path.Append("libvk_swiftshader.so");
+   } else {
++#if BUILDFLAG(IS_BSD) 
++    path = base::FilePath("libvulkan.so");
++#else
+     path = base::FilePath("libvulkan.so.1");
++#endif
+   }
+ 
+   return vulkan_instance_.Initialize(path, required_extensions, {});
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.cc
new file mode 100644
index 0000000000..cd70d09d30
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/x11/x11_screen_ozone.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/x11/x11_screen_ozone.cc
+@@ -22,7 +22,7 @@
+ #include "ui/ozone/platform/x11/x11_window.h"
+ #include "ui/ozone/platform/x11/x11_window_manager.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -77,7 +77,7 @@ X11ScreenOzone::X11ScreenOzone()
+       window_manager_(X11WindowManager::GetInstance()),
+       x11_display_manager_(std::make_unique<XDisplayManager>(this)) {
+   DCHECK(window_manager_);
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (auto* linux_ui = ui::LinuxUi::instance()) {
+     display_scale_factor_observer_.Observe(linux_ui);
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.h
new file mode 100644
index 0000000000..092d181742
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__screen__ozone.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/x11/x11_screen_ozone.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/x11/x11_screen_ozone.h
+@@ -102,7 +102,7 @@ class X11ScreenOzone : public PlatformSc
+   // Indicates that |this| is initialized.
+   bool initialized_ = false;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   base::ScopedObservation<ui::LinuxUi, DeviceScaleFactorObserver>
+       display_scale_factor_observer_{this};
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__window.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__window.cc
new file mode 100644
index 0000000000..20496a4e51
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_platform_x11_x11__window.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/platform/x11/x11_window.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/platform/x11/x11_window.cc
+@@ -1499,7 +1499,7 @@ void X11Window::OnXWindowStateChanged() 
+   WindowTiledEdges tiled_state = GetTiledState();
+   if (tiled_state != tiled_state_) {
+     tiled_state_ = tiled_state;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     platform_window_delegate_->OnWindowTiledStateChanged(tiled_state);
+ #endif
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_test_mock__platform__window__delegate.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_test_mock__platform__window__delegate.h
new file mode 100644
index 0000000000..e3fcf33272
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_ozone_test_mock__platform__window__delegate.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/ozone/test/mock_platform_window_delegate.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/ozone/test/mock_platform_window_delegate.h
+@@ -35,7 +35,7 @@ class MockPlatformWindowDelegate : publi
+   MOCK_METHOD2(OnWindowStateChanged,
+                void(PlatformWindowState old_state,
+                     PlatformWindowState new_state));
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   MOCK_METHOD1(OnWindowTiledStateChanged,
+                void(WindowTiledEdges new_tiled_edges));
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc
new file mode 100644
index 0000000000..6e4770f6b3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/platform_window/platform_window_delegate.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/platform_window/platform_window_delegate.cc
+@@ -42,7 +42,7 @@ PlatformWindowDelegate::PlatformWindowDe
+ 
+ PlatformWindowDelegate::~PlatformWindowDelegate() = default;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void PlatformWindowDelegate::OnWindowTiledStateChanged(
+     WindowTiledEdges new_tiled_edges) {}
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h
new file mode 100644
index 0000000000..3e294cfb8b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__delegate.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/platform_window/platform_window_delegate.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/platform_window/platform_window_delegate.h
+@@ -191,7 +191,7 @@ class COMPONENT_EXPORT(PLATFORM_WINDOW) 
+   virtual void OnWindowStateChanged(PlatformWindowState old_state,
+                                     PlatformWindowState new_state) = 0;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Notifies the delegate that the tiled state of the window edges has changed.
+   virtual void OnWindowTiledStateChanged(WindowTiledEdges new_tiled_edges);
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__init__properties.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__init__properties.h
new file mode 100644
index 0000000000..93953cbc4b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_platform__window_platform__window__init__properties.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/platform_window/platform_window_init_properties.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/platform_window/platform_window_init_properties.h
+@@ -56,7 +56,7 @@ class WorkspaceExtensionDelegate;
+ class ScenicWindowDelegate;
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ class X11ExtensionDelegate;
+ #endif
+ 
+@@ -118,7 +118,7 @@ struct COMPONENT_EXPORT(PLATFORM_WINDOW)
+ 
+   PlatformWindowShadowType shadow_type = PlatformWindowShadowType::kDefault;
+ 
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool prefer_dark_theme = false;
+   raw_ptr<gfx::ImageSkia> icon = nullptr;
+   absl::optional<SkColor> background_color;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_qt_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_qt_BUILD.gn
new file mode 100644
index 0000000000..c2c4b77163
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_qt_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/qt/BUILD.gn.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/qt/BUILD.gn
+@@ -20,7 +20,7 @@ config("qt_internal_config") {
+ 
+   # It's OK to depend on the system libstdc++ since it's a dependency of QT, so
+   # it will get loaded into the process anyway.
+-  libs = [ "stdc++" ]
++  # libs = [ "stdc++" ]
+ 
+   configs = [
+     "//build/config/linux:runtime_library",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_qt_qt.gni b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_qt_qt.gni
new file mode 100644
index 0000000000..a1a514a155
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_qt_qt.gni
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/qt/qt.gni.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/qt/qt.gni
+@@ -14,7 +14,7 @@ declare_args() {
+ 
+ declare_args() {
+   if (!use_sysroot && use_qt) {
+-    moc_qt5_path = ""
++    moc_qt5_path = "@QTDIR@/bin"
+   }
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__bn.xtb b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__bn.xtb
new file mode 100644
index 0000000000..ed07d9f693
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__bn.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/strings/translations/app_locale_settings_bn.xtb.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/strings/translations/app_locale_settings_bn.xtb
+@@ -10,7 +10,7 @@
+   <translation id="IDS_WEB_FONT_FAMILY">Vrinda</translation>
+   <translation id="IDS_WEB_FONT_FAMILY_XP">Vrinda</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Lohit Bengali</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ja.xtb b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ja.xtb
new file mode 100644
index 0000000000..3f84c42d15
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ja.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/strings/translations/app_locale_settings_ja.xtb.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/strings/translations/app_locale_settings_ja.xtb
+@@ -12,7 +12,7 @@
+ <if expr="is_ios">
+   <translation id="IDS_WEB_FONT_FAMILY">Helvetica,Hiragino Kaku Gothic ProN,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">VL PGothic,Sazanami Gothic,Kochi Gothic,sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ko.xtb b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ko.xtb
new file mode 100644
index 0000000000..cc4e29ec74
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ko.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/strings/translations/app_locale_settings_ko.xtb.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/strings/translations/app_locale_settings_ko.xtb
+@@ -12,7 +12,7 @@
+ <if expr="is_ios">
+   <translation id="IDS_WEB_FONT_FAMILY">Helvetica,Apple SD Gothic Neo,AppleGothic,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Noto Sans CJK KR,NanumGothic,UnDotum,Baekmuk Gulim,sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ml.xtb b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ml.xtb
new file mode 100644
index 0000000000..781e8e8ccb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__ml.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/strings/translations/app_locale_settings_ml.xtb.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/strings/translations/app_locale_settings_ml.xtb
+@@ -9,7 +9,7 @@
+   <translation id="IDS_WEB_FONT_FAMILY">'Segoe UI',Arial,AnjaliOldLipi,Rachana,Kartika</translation>
+   <translation id="IDS_WEB_FONT_FAMILY_XP">Arial,AnjaliOldLipi,Rachana,Kartika</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Arial,AnjaliOldLipi,Rachana,Kartika,sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__th.xtb b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__th.xtb
new file mode 100644
index 0000000000..55aff5a52f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__th.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/strings/translations/app_locale_settings_th.xtb.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/strings/translations/app_locale_settings_th.xtb
+@@ -6,7 +6,7 @@
+   <translation id="IDS_WEB_FONT_FAMILY">Tahoma,sans-serif</translation>
+   <translation id="IDS_WEB_FONT_FAMILY_XP">Tahoma,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Norasi,Waree,Garuda,Loma,sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-CN.xtb b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-CN.xtb
new file mode 100644
index 0000000000..21e85e67e0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-CN.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/strings/translations/app_locale_settings_zh-CN.xtb.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/strings/translations/app_locale_settings_zh-CN.xtb
+@@ -12,7 +12,7 @@
+ <if expr="is_ios">
+   <translation id="IDS_WEB_FONT_FAMILY">Helvetica,PingFang SC,STHeiti,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Noto Sans CJK SC, WenQuanYi Zen Hei, sans-serif</translation>
+ </if>
+ <if expr="is_chromeos">
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-TW.xtb b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-TW.xtb
new file mode 100644
index 0000000000..e64353b959
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_strings_translations_app__locale__settings__zh-TW.xtb
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/strings/translations/app_locale_settings_zh-TW.xtb.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/strings/translations/app_locale_settings_zh-TW.xtb
+@@ -12,7 +12,7 @@
+ <if expr="is_ios">
+   <translation id="IDS_WEB_FONT_FAMILY">Helvetica,PingFang TC,Heiti TC,sans-serif</translation>
+ </if>
+-<if expr="is_linux">
++<if expr="is_posix">
+   <translation id="IDS_WEB_FONT_FAMILY">Noto Sans CJK TC, WenQuanYi Zen Hei, sans-serif</translation>
+   </if>
+ <if expr="is_chromeos">
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.cc
new file mode 100644
index 0000000000..639efb36a3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/controls/prefix_selector.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/controls/prefix_selector.cc
+@@ -178,7 +178,7 @@ bool PrefixSelector::ShouldDoLearning() 
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool PrefixSelector::SetCompositionFromExistingText(
+     const gfx::Range& range,
+     const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.h
new file mode 100644
index 0000000000..f0b3c741eb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_prefix__selector.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/controls/prefix_selector.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/controls/prefix_selector.h
+@@ -85,7 +85,7 @@ class VIEWS_EXPORT PrefixSelector : publ
+   ukm::SourceId GetClientSourceForMetrics() const override;
+   bool ShouldDoLearning() override;
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc
new file mode 100644
index 0000000000..3ddc6d647d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc
@@ -0,0 +1,70 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/controls/textfield/textfield.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/views/controls/textfield/textfield.cc
+@@ -84,7 +84,7 @@
+ #include "base/win/win_util.h"
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/text_input_flags.h"
+ #include "ui/linux/linux_ui.h"
+@@ -183,7 +183,7 @@ bool IsControlKeyModifier(int flags) {
+ // Control-modified key combination, but we cannot extend it to other platforms
+ // as Control has different meanings and behaviors.
+ // https://crrev.com/2580483002/#msg46
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   return flags & ui::EF_CONTROL_DOWN;
+ #else
+   return false;
+@@ -744,7 +744,7 @@ bool Textfield::OnKeyPressed(const ui::K
+   if (!textfield)
+     return handled;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   auto* linux_ui = ui::LinuxUi::instance();
+   std::vector<ui::TextEditCommandAuraLinux> commands;
+   if (!handled && linux_ui &&
+@@ -927,7 +927,7 @@ void Textfield::AboutToRequestFocusFromT
+ }
+ 
+ bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   // Skip any accelerator handling that conflicts with custom keybindings.
+   auto* linux_ui = ui::LinuxUi::instance();
+   std::vector<ui::TextEditCommandAuraLinux> commands;
+@@ -1969,7 +1969,7 @@ bool Textfield::ShouldDoLearning() {
+   return false;
+ }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // TODO(https://crbug.com/952355): Implement this method to support Korean IME
+ // reconversion feature on native text fields (e.g. find bar).
+ bool Textfield::SetCompositionFromExistingText(
+@@ -2465,14 +2465,14 @@ ui::TextEditCommand Textfield::GetComman
+ #endif
+         return ui::TextEditCommand::DELETE_BACKWARD;
+       }
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // Only erase by line break on Linux and ChromeOS.
+       if (shift)
+         return ui::TextEditCommand::DELETE_TO_BEGINNING_OF_LINE;
+ #endif
+       return ui::TextEditCommand::DELETE_WORD_BACKWARD;
+     case ui::VKEY_DELETE:
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+       // Only erase by line break on Linux and ChromeOS.
+       if (shift && control)
+         return ui::TextEditCommand::DELETE_TO_END_OF_LINE;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h
new file mode 100644
index 0000000000..5114d4857e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/controls/textfield/textfield.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/views/controls/textfield/textfield.h
+@@ -46,7 +46,7 @@
+ #include "ui/views/view.h"
+ #include "ui/views/word_lookup_client.h"
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include <vector>
+ #endif
+ 
+@@ -454,7 +454,7 @@ class VIEWS_EXPORT Textfield : public Vi
+   // Set whether the text should be used to improve typing suggestions.
+   void SetShouldDoLearning(bool value) { should_do_learning_ = value; }
+ 
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   bool SetCompositionFromExistingText(
+       const gfx::Range& range,
+       const std::vector<ui::ImeTextSpan>& ui_ime_text_spans) override;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc
new file mode 100644
index 0000000000..15c667c2a0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_corewm_tooltip__aura.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/corewm/tooltip_aura.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/views/corewm/tooltip_aura.cc
+@@ -38,7 +38,7 @@ namespace {
+ bool CanUseTranslucentTooltipWidget() {
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_WIN)
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
+   return false;
+ #else
+   return true;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_examples_widget__example.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_examples_widget__example.cc
new file mode 100644
index 0000000000..6cc4809b96
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_examples_widget__example.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/examples/widget_example.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/examples/widget_example.cc
+@@ -50,7 +50,7 @@ void WidgetExample::CreateExampleView(Vi
+   modal_button->SetCallback(
+       base::BindRepeating(&WidgetExample::CreateDialogWidget,
+                           base::Unretained(this), modal_button, true));
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+   // Windows does not support TYPE_CONTROL top-level widgets.
+   LabelButton* control_button = BuildButton(
+       container, GetStringUTF16(IDS_WIDGET_CHILD_WIDGET_BUTTON_LABEL));
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc
new file mode 100644
index 0000000000..b43d0d25c8
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_focus_focus__manager.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/focus/focus_manager.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/views/focus/focus_manager.cc
+@@ -577,7 +577,7 @@ bool FocusManager::RedirectAcceleratorTo
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   // Processing an accelerator can delete things. Because we
+   // need these objects afterwards on Linux, save widget_ as weak pointer and
+   // save the close_on_deactivate property value of widget_delegate in a
+@@ -594,7 +594,7 @@ bool FocusManager::RedirectAcceleratorTo
+ 
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   // Need to manually close the bubble widget on Linux. On Linux when the
+   // bubble is shown, the main widget remains active. Because of that when
+   // focus is set to the main widget to process accelerator, the main widget
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_style_platform__style.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_style_platform__style.cc
new file mode 100644
index 0000000000..85ae8882a9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_style_platform__style.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/style/platform_style.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/views/style/platform_style.cc
+@@ -17,7 +17,7 @@
+ #include "ui/views/controls/focusable_border.h"
+ #include "ui/views/controls/scrollbar/scroll_bar_views.h"
+ 
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
+ #endif
+ 
+@@ -50,7 +50,7 @@ const View::FocusBehavior PlatformStyle:
+ // Linux clips bubble windows that extend outside their parent window
+ // bounds.
+ const bool PlatformStyle::kAdjustBubbleIfOffscreen =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     false;
+ #else
+     true;
+@@ -58,7 +58,7 @@ const bool PlatformStyle::kAdjustBubbleI
+ 
+ // static
+ std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
+-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   return std::make_unique<OverlayScrollBar>(is_horizontal);
+ #else
+   return std::make_unique<ScrollBarViews>(is_horizontal);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_test_ui__controls__factory__desktop__aura__ozone.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_test_ui__controls__factory__desktop__aura__ozone.cc
new file mode 100644
index 0000000000..25551ff12a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_test_ui__controls__factory__desktop__aura__ozone.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/test/ui_controls_factory_desktop_aura_ozone.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/test/ui_controls_factory_desktop_aura_ozone.cc
+@@ -296,7 +296,7 @@ void UpdateDisplaySync(const std::string
+ }
+ #endif
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ // static
+ void ForceUseScreenCoordinatesOnce() {
+   g_ozone_ui_controls_test_helper->ForceUseScreenCoordinatesOnce();
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_views__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_views__delegate.cc
new file mode 100644
index 0000000000..509521529e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_views__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/views_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/views_delegate.cc
+@@ -97,7 +97,7 @@ bool ViewsDelegate::IsWindowInMetro(gfx:
+   return false;
+ }
+ #elif BUILDFLAG(ENABLE_DESKTOP_AURA) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+ gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const {
+   return nullptr;
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_views__delegate.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_views__delegate.h
new file mode 100644
index 0000000000..c77aae9f5d
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_views__delegate.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/views_delegate.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/views_delegate.h
+@@ -147,7 +147,7 @@ class VIEWS_EXPORT ViewsDelegate {
+   // environment.
+   virtual bool IsWindowInMetro(gfx::NativeWindow window) const;
+ #elif BUILDFLAG(ENABLE_DESKTOP_AURA) && \
+-    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++    (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+   virtual gfx::ImageSkia* GetDefaultWindowIcon() const;
+ #endif
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc
new file mode 100644
index 0000000000..d95b6585c0
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc
+@@ -195,7 +195,7 @@ DragOperation DesktopDragDropClientOzone
+   return drag_operation_;
+ }
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ void DesktopDragDropClientOzone::UpdateDragImage(const gfx::ImageSkia& image,
+                                                  const gfx::Vector2d& offset) {
+   DCHECK(drag_handler_);
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h
new file mode 100644
index 0000000000..61b8bb808a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h
+@@ -67,7 +67,7 @@ class VIEWS_EXPORT DesktopDragDropClient
+     // The offset of |drag_widget_| relative to the mouse position.
+     gfx::Vector2d offset;
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // The last received drag location.  The drag widget is moved asynchronously
+     // so its position is updated when the UI thread has time for that.  When
+     // the first change to the location happens, a call to UpdateDragWidget()
+@@ -88,7 +88,7 @@ class VIEWS_EXPORT DesktopDragDropClient
+       const gfx::Point& root_location,
+       int allowed_operations,
+       ui::mojom::DragEventSource source) override;
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   void UpdateDragImage(const gfx::ImageSkia& image,
+                        const gfx::Vector2d& offset) override;
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc
new file mode 100644
index 0000000000..15e2e3b00a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+@@ -49,7 +49,7 @@
+ #include "ui/wm/core/window_util.h"
+ #include "ui/wm/public/window_move_client.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone_linux.h"
+ #endif
+ 
+@@ -359,7 +359,7 @@ std::unique_ptr<aura::client::DragDropCl
+ DesktopWindowTreeHostPlatform::CreateDragDropClient() {
+   ui::WmDragHandler* drag_handler = ui::GetWmDragHandler(*(platform_window()));
+   std::unique_ptr<DesktopDragDropClientOzone> drag_drop_client =
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+       std::make_unique<DesktopDragDropClientOzoneLinux>(window(), drag_handler);
+ #else
+       std::make_unique<DesktopDragDropClientOzone>(window(), drag_handler);
+@@ -1176,7 +1176,7 @@ bool DesktopWindowTreeHostPlatform::Rota
+ // DesktopWindowTreeHost:
+ 
+ // Linux subclasses this host and adds some Linux specific bits.
+-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)
++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)
+ // static
+ DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
+     internal::NativeWidgetDelegate* native_widget_delegate,
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc
new file mode 100644
index 0000000000..238a16c8b1
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform_impl_interactive_uitest.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform_impl_interactive_uitest.cc
+@@ -23,7 +23,7 @@
+ #include "ui/views/widget/widget_delegate.h"
+ #include "ui/views/window/native_frame_view.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"
+ #include "ui/views/widget/desktop_aura/window_event_filter_linux.h"
+ using DesktopWindowTreeHostPlatformImpl = views::DesktopWindowTreeHostLinux;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_root__view.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_root__view.cc
new file mode 100644
index 0000000000..0a34ce8ac9
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_root__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/widget/root_view.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/views/widget/root_view.cc
+@@ -97,7 +97,7 @@ class AnnounceTextView : public View {
+ #if BUILDFLAG(IS_CHROMEOS)
+     // On ChromeOS, kAlert role can invoke an unnecessary event on reparenting.
+     node_data->role = ax::mojom::Role::kStaticText;
+-#elif BUILDFLAG(IS_LINUX)
++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+     // TODO(crbug.com/1024898): Use live regions (do not use alerts).
+     // May require setting kLiveStatus, kContainerLiveStatus to "polite".
+     node_data->role = ax::mojom::Role::kAlert;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_widget.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_widget.cc
new file mode 100644
index 0000000000..6990683ea5
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_widget_widget.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/widget/widget.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/widget/widget.cc
+@@ -59,7 +59,7 @@
+ #include "ui/views/window/custom_frame_view.h"
+ #include "ui/views/window/dialog_delegate.h"
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "ui/linux/linux_ui.h"
+ #endif
+ 
+@@ -2194,7 +2194,7 @@ const ui::NativeTheme* Widget::GetNative
+   if (parent_)
+     return parent_->GetNativeTheme();
+ 
+-#if BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+   if (auto* linux_ui_theme = ui::LinuxUiTheme::GetForWindow(GetNativeWindow()))
+     return linux_ui_theme->GetNativeTheme();
+ #endif
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_custom__frame__view.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_custom__frame__view.cc
new file mode 100644
index 0000000000..5579b2cf48
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_custom__frame__view.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/window/custom_frame_view.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/ui/views/window/custom_frame_view.cc
+@@ -266,7 +266,7 @@ int CustomFrameView::CaptionButtonY() co
+   // drawn flush with the screen edge, they still obey Fitts' Law.
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
+   return FrameBorderThickness();
+ #else
+   return frame_->IsMaximized() ? FrameBorderThickness() : kFrameShadowThickness;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc
new file mode 100644
index 0000000000..0675009c80
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_dialog__delegate.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/window/dialog_delegate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/window/dialog_delegate.cc
+@@ -105,7 +105,7 @@ Widget* DialogDelegate::CreateDialogWidg
+ 
+ // static
+ bool DialogDelegate::CanSupportCustomFrame(gfx::NativeView parent) {
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+     BUILDFLAG(ENABLE_DESKTOP_AURA)
+   // The new style doesn't support unparented dialogs on Linux desktop.
+   return parent != nullptr;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc
new file mode 100644
index 0000000000..352b7eadbb
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_ui_views_window_frame__background.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/ui/views/window/frame_background.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/ui/views/window/frame_background.cc
+@@ -110,7 +110,7 @@ void FrameBackground::PaintMaximized(gfx
+                                      int width) const {
+ // Fill the top with the frame color first so we have a constant background
+ // for areas not covered by the theme image.
+-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \
+     BUILDFLAG(ENABLE_DESKTOP_AURA)
+   ui::NativeTheme::FrameTopAreaExtraParams frame_top_area;
+   frame_top_area.use_custom_frame = use_custom_frame_;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_BUILD.gn b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_BUILD.gn
new file mode 100644
index 0000000000..d8d3e62763
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_BUILD.gn
@@ -0,0 +1,129 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/BUILD.gn.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/v8/BUILD.gn
+@@ -1448,6 +1448,15 @@ config("toolchain") {
+   } else if (target_os == "chromeos") {
+     defines += [ "V8_HAVE_TARGET_OS" ]
+     defines += [ "V8_TARGET_OS_CHROMEOS" ]
++  } else if (target_os == "openbsd") {
++    defines += [ "V8_HAVE_TARGET_OS" ]
++    defines += [ "V8_TARGET_OS_OPENBSD" ]
++  } else if (target_os == "freebsd") {
++    defines += [ "V8_HAVE_TARGET_OS" ]
++    defines += [ "V8_TARGET_OS_FREEBSD" ]
++  } else if (target_os == "netbsd") {
++    defines += [ "V8_HAVE_TARGET_OS" ]
++    defines += [ "V8_TARGET_OS_NETBSD" ]
+   }
+ 
+   # TODO(infra): Support v8_enable_prof on Windows.
+@@ -2339,6 +2348,23 @@ action("generate_bytecode_builtins_list"
+   ]
+ }
+ 
++action("run_paxctl_mksnapshot") {
++    deps = [ ":mksnapshot($v8_snapshot_toolchain)" ]
++
++    script = "tools/run-paxctl.py"
++    stamp = "$target_gen_dir/paxctl_stamp"
++    outputs = [ stamp ]
++
++    sources = []
++    data = []
++
++    args = [
++      rebase_path(stamp, root_build_dir), "/usr/sbin/paxctl", "+m", "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)",
++                                        "root_out_dir") + "/mksnapshot",
++                         root_build_dir),
++    ]
++}
++
+ # Template to generate different V8 snapshots based on different runtime flags.
+ # Can be invoked with run_mksnapshot(<name>). The target will resolve to
+ # run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
+@@ -2357,7 +2383,11 @@ template("run_mksnapshot") {
+     suffix = "_$name"
+   }
+   action("run_mksnapshot_" + name) {
+-    deps = [ ":mksnapshot($v8_snapshot_toolchain)" ]
++    if (target_os == "netbsd") {
++      deps = [ ":mksnapshot($v8_snapshot_toolchain)", ":run_paxctl_mksnapshot" ]
++    } else {
++      deps = [ ":mksnapshot($v8_snapshot_toolchain)" ]
++    }
+ 
+     script = "tools/run.py"
+ 
+@@ -2414,6 +2444,12 @@ template("run_mksnapshot") {
+       if (!v8_enable_builtins_profiling && v8_enable_builtins_reordering) {
+         args += [ "--reorder-builtins" ]
+       }
++
++      if (v8_current_cpu == "x86") {
++        args -= [
++          "--abort-on-bad-builtin-profile-data",
++        ]
++      }
+     }
+ 
+     # This is needed to distinguish between generating code for the simulator
+@@ -4417,7 +4453,7 @@ v8_header_set("v8_internal_headers") {
+       # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
+       # based on Darwin and thus POSIX-compliant to a similar degree.
+       if (is_linux || is_chromeos || is_mac || is_ios ||
+-          target_os == "freebsd") {
++          target_os == "freebsd" || target_os == "netbsd") {
+         sources += [ "src/trap-handler/handler-inside-posix.h" ]
+       } else if (is_win) {
+         sources += [ "src/trap-handler/handler-inside-win.h" ]
+@@ -5811,7 +5847,7 @@ v8_source_set("v8_base_without_compiler"
+       # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
+       # based on Darwin and thus POSIX-compliant to a similar degree.
+       if (is_linux || is_chromeos || is_mac || is_ios ||
+-          target_os == "freebsd") {
++          target_os == "freebsd" || target_os == "netbsd") {
+         sources += [
+           "src/trap-handler/handler-inside-posix.cc",
+           "src/trap-handler/handler-outside-posix.cc",
+@@ -6423,7 +6459,7 @@ v8_component("v8_libbase") {
+     }
+   }
+ 
+-  if (is_linux || is_chromeos) {
++  if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "src/base/debug/stack_trace_posix.cc",
+       "src/base/platform/platform-linux.cc",
+@@ -6434,6 +6470,27 @@ v8_component("v8_libbase") {
+       "dl",
+       "rt",
+     ]
++  } else if (is_openbsd) {
++    sources += [
++      "src/base/debug/stack_trace_posix.cc",
++      "src/base/platform/platform-openbsd.cc",
++    ]
++    libs = [ "execinfo" ]
++  } else if (is_netbsd) {
++    sources += [
++      "src/base/debug/stack_trace_posix.cc",
++      "src/base/platform/platform-openbsd.cc",
++    ]
++    libs = [
++      "rt",
++      "execinfo",
++    ]
++  } else if (is_freebsd) {
++    sources += [
++      "src/base/debug/stack_trace_posix.cc",
++      "src/base/platform/platform-freebsd.cc",
++    ]
++    libs = [ "execinfo" ]
+   } else if (current_os == "aix") {
+     sources += [
+       "src/base/debug/stack_trace_posix.cc",
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_include_v8-internal.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_include_v8-internal.h
new file mode 100644
index 0000000000..ae6b3e1bb4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_include_v8-internal.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/include/v8-internal.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/include/v8-internal.h
+@@ -229,7 +229,7 @@ using SandboxedPointer_t = Address;
+ #ifdef V8_ENABLE_SANDBOX
+ 
+ // Size of the sandbox, excluding the guard regions surrounding it.
+-#if defined(V8_TARGET_OS_ANDROID)
++#if (defined(V8_TARGET_OS_ANDROID) || defined(V8_TARGET_OS_OPENBSD))
+ // On Android, most 64-bit devices seem to be configured with only 39 bits of
+ // virtual address space for userspace. As such, limit the sandbox to 128GB (a
+ // quarter of the total available address space).
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_include_v8config.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_include_v8config.h
new file mode 100644
index 0000000000..6ae59fdae4
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_include_v8config.h
@@ -0,0 +1,61 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/include/v8config.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/include/v8config.h
+@@ -201,6 +201,9 @@ path. Add it with -I<path> to the comman
+   && !defined(V8_TARGET_OS_FUCHSIA) \
+   && !defined(V8_TARGET_OS_IOS) \
+   && !defined(V8_TARGET_OS_LINUX) \
++  && !defined(V8_TARGET_OS_OPENBSD) \
++  && !defined(V8_TARGET_OS_FREEBSD) \
++  && !defined(V8_TARGET_OS_NETBSD) \
+   && !defined(V8_TARGET_OS_MACOS) \
+   && !defined(V8_TARGET_OS_WIN) \
+   && !defined(V8_TARGET_OS_CHROMEOS)
+@@ -213,6 +216,9 @@ path. Add it with -I<path> to the comman
+   || defined(V8_TARGET_OS_FUCHSIA) \
+   || defined(V8_TARGET_OS_IOS) \
+   || defined(V8_TARGET_OS_LINUX) \
++  || defined(V8_TARGET_OS_OPENBSD) \
++  || defined(V8_TARGET_OS_FREEBSD) \
++  || defined(V8_TARGET_OS_NETBSD) \
+   || defined(V8_TARGET_OS_MACOS) \
+   || defined(V8_TARGET_OS_WIN) \
+   || defined(V8_TARGET_OS_CHROMEOS)
+@@ -236,6 +242,22 @@ path. Add it with -I<path> to the comman
+ # define V8_TARGET_OS_LINUX
+ #endif
+ 
++#ifdef V8_OS_OPENBSD
++# define V8_TARGET_OS_OPENBSD
++# define V8_TARGET_OS_BSD
++#endif
++
++#ifdef V8_OS_FREEBSD
++# define V8_TARGET_OS_OPENBSD
++# define V8_TARGET_OS_BSD
++#endif
++
++#ifdef V8_OS_NETBSD
++# define V8_TARGET_OS_OPENBSD
++# define V8_TARGET_OS_NETBSD
++# define V8_TARGET_OS_BSD
++#endif
++
+ #ifdef V8_OS_MACOS
+ # define V8_TARGET_OS_MACOS
+ #endif
+@@ -381,7 +403,8 @@ path. Add it with -I<path> to the comman
+ // preserve_most in clang >= 17 (see https://reviews.llvm.org/D143425).
+ #if (defined(_M_X64) || defined(__x86_64__)            /* x64 (everywhere) */  \
+      || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */    \
+-         && !defined(_WIN32)))                         /* not on windows */    \
++         && !defined(_WIN32)                           /* not on windows */    \
++         && !defined(__OpenBSD__)))                    /* not on OpenBSD */    \
+      && !defined(COMPONENT_BUILD)                      /* no component build */\
+      && __clang_major__ >= 17                          /* clang >= 17 */
+ # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most))
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_api_api.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_api_api.cc
new file mode 100644
index 0000000000..5d8d9db197
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_api_api.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/api/api.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/api/api.cc
+@@ -151,7 +151,7 @@
+ #include "src/wasm/wasm-serialization.h"
+ #endif  // V8_ENABLE_WEBASSEMBLY
+ 
+-#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD
++#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_NETBSD
+ #include <signal.h>
+ #include <unistd.h>
+ 
+@@ -6559,7 +6559,7 @@ bool v8::V8::Initialize(const int build_
+   return true;
+ }
+ 
+-#if V8_OS_LINUX || V8_OS_DARWIN
++#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD|| V8_OS_NETBSD
+ bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info,
+                                    void* context) {
+ #if V8_ENABLE_WEBASSEMBLY && V8_TRAP_HANDLER_SUPPORTED
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_atomicops.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_atomicops.h
new file mode 100644
index 0000000000..e01c2e119a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_atomicops.h
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/atomicops.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/atomicops.h
+@@ -57,10 +57,10 @@ using Atomic64 = SbAtomic64;
+ using Atomic8 = char;
+ using Atomic16 = int16_t;
+ using Atomic32 = int32_t;
+-#if defined(V8_HOST_ARCH_64_BIT)
++#if defined(V8_HOST_ARCH_64_BIT) || defined(V8_OS_OPENBSD)
+ // We need to be able to go between Atomic64 and AtomicWord implicitly.  This
+ // means Atomic64 and AtomicWord should be the same type on 64-bit.
+-#if defined(__ILP32__)
++#if defined(__ILP32__) && !defined(V8_OS_OPENBSD)
+ using Atomic64 = int64_t;
+ #else
+ using Atomic64 = intptr_t;
+@@ -266,7 +266,7 @@ inline Atomic32 SeqCst_Load(volatile con
+                                    std::memory_order_seq_cst);
+ }
+ 
+-#if defined(V8_HOST_ARCH_64_BIT)
++#if defined(V8_HOST_ARCH_64_BIT) || defined(V8_OS_OPENBSD)
+ 
+ inline Atomic64 Relaxed_CompareAndSwap(volatile Atomic64* ptr,
+                                        Atomic64 old_value, Atomic64 new_value) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_memory.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_memory.h
new file mode 100644
index 0000000000..d46ab885aa
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_memory.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/platform/memory.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/platform/memory.h
+@@ -23,7 +23,7 @@
+ #include <malloc.h>
+ #endif  // !V8_OS_DARWIN
+ 
+-#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS) || V8_OS_WIN
++#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS && !V8_OS_BSD) || V8_OS_WIN
+ #define V8_HAS_MALLOC_USABLE_SIZE 1
+ #endif  // (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS) || V8_OS_WIN
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc
new file mode 100644
index 0000000000..34bb3925f7
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc
@@ -0,0 +1,38 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc
+@@ -43,14 +43,10 @@ TimezoneCache* OS::CreateTimezoneCache()
+   return new PosixDefaultTimezoneCache();
+ }
+ 
+-static unsigned StringToLong(char* buffer) {
+-  return static_cast<unsigned>(strtol(buffer, nullptr, 16));
+-}
+-
+ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
+   std::vector<SharedLibraryAddress> result;
+   int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, getpid()};
+-  size_t miblen = sizeof(mib) / sizeof(mib[0]);
++  unsigned int miblen = sizeof(mib) / sizeof(mib[0]);
+   size_t buffer_size;
+   if (sysctl(mib, miblen, nullptr, &buffer_size, nullptr, 0) == 0) {
+     // Overallocate the buffer by 1/3 to account for concurrent
+@@ -82,8 +78,13 @@ std::vector<OS::SharedLibraryAddress> OS
+             lib_name = std::string(path);
+           }
+           result.push_back(SharedLibraryAddress(
++#if defined(__i386__) || defined(OS_FREEBSD)
++              lib_name, static_cast<uintptr_t>(map->kve_start),
++              static_cast<uintptr_t>(map->kve_end)));
++#else
+               lib_name, reinterpret_cast<uintptr_t>(map->kve_start),
+               reinterpret_cast<uintptr_t>(map->kve_end)));
++#endif
+         }
+ 
+         start += ssize;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc
new file mode 100644
index 0000000000..cd3d53a3f3
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-openbsd.cc
@@ -0,0 +1,53 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/platform/platform-openbsd.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/platform/platform-openbsd.cc
+@@ -6,6 +6,9 @@
+ // POSIX-compatible parts, the implementation is in platform-posix.cc.
+ 
+ #include <pthread.h>
++#if !defined(__NetBSD__)
++#include <pthread_np.h>
++#endif
+ #include <semaphore.h>
+ #include <signal.h>
+ #include <stdlib.h>
+@@ -122,6 +125,34 @@ void OS::SignalCodeMovingGC() {
+ 
+ void OS::AdjustSchedulingParams() {}
+ 
++// static
++Stack::StackSlot Stack::ObtainCurrentThreadStackStart() {
++#if defined(__NetBSD__)
++  pthread_attr_t attr;
++  int error;
++  pthread_attr_init(&attr);
++  error = pthread_attr_get_np(pthread_self(), &attr);
++  if (!error) {
++    void* base;
++    size_t size;
++    error = pthread_attr_getstack(&attr, &base, &size);
++    CHECK(!error);
++    pthread_attr_destroy(&attr);
++    return reinterpret_cast<uint8_t*>(base) + size;
++  }
++  pthread_attr_destroy(&attr);
++  return nullptr;
++#else
++  stack_t ss;
++  void *base;
++  if (pthread_stackseg_np(pthread_self(), &ss) != 0)
++    return nullptr;
++
++  base = (void*)((size_t) ss.ss_sp - ss.ss_size);
++  return reinterpret_cast<uint8_t*>(base) + ss.ss_size;
++#endif
++}
++
+ std::vector<OS::MemoryRange> OS::GetFreeMemoryRangesWithin(
+     OS::Address boundary_start, OS::Address boundary_end, size_t minimum_size,
+     size_t alignment) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc
new file mode 100644
index 0000000000..d6d0dca62e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc
@@ -0,0 +1,101 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
+@@ -27,6 +27,9 @@
+     defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <sys/sysctl.h>  // for sysctl
+ #endif
++#if defined(__NetBSD__)
++#include <lwp.h>
++#endif
+ 
+ #if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT)
+ #define LOG_TAG "v8"
+@@ -72,9 +75,11 @@
+ #include <sys/syscall.h>
+ #endif
+ 
+-#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_OPENBSD || V8_OS_SOLARIS
++#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_BSD || V8_OS_SOLARIS
++#ifndef MAP_ANONYMOUS
+ #define MAP_ANONYMOUS MAP_ANON
+ #endif
++#endif
+ 
+ #if defined(V8_OS_SOLARIS)
+ #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)
+@@ -303,6 +308,13 @@ void OS::SetRandomMmapSeed(int64_t seed)
+   }
+ }
+ 
++#if V8_OS_OPENBSD
++// Allow OpenBSD's mmap to select a random address on OpenBSD
++// static
++void* OS::GetRandomMmapAddr() {
++  return nullptr;
++}
++#else
+ // static
+ void* OS::GetRandomMmapAddr() {
+   uintptr_t raw_addr;
+@@ -399,6 +411,7 @@ void* OS::GetRandomMmapAddr() {
+ #endif
+   return reinterpret_cast<void*>(raw_addr);
+ }
++#endif
+ 
+ // TODO(bbudge) Move Cygwin and Fuchsia stuff into platform-specific files.
+ #if !V8_OS_CYGWIN && !V8_OS_FUCHSIA
+@@ -672,7 +685,7 @@ void OS::DestroySharedMemoryHandle(Platf
+ 
+ // static
+ bool OS::HasLazyCommits() {
+-#if V8_OS_AIX || V8_OS_LINUX || V8_OS_DARWIN
++#if V8_OS_AIX || V8_OS_LINUX || V8_OS_DARWIN || V8_OS_BSD
+   return true;
+ #else
+   // TODO(bbudge) Return true for all POSIX platforms.
+@@ -822,6 +835,8 @@ int OS::GetCurrentThreadId() {
+   return static_cast<int>(thread_self());
+ #elif V8_OS_FUCHSIA
+   return static_cast<int>(zx_thread_self());
++#elif V8_OS_NETBSD
++  return static_cast<int>(_lwp_self());
+ #elif V8_OS_SOLARIS
+   return static_cast<int>(pthread_self());
+ #else
+@@ -1113,7 +1128,11 @@ Thread::Thread(const Options& options)
+       stack_size_(options.stack_size()),
+       priority_(options.priority()),
+       start_semaphore_(nullptr) {
++#if !defined(V8_OS_NETBSD)
+   const int min_stack_size = static_cast<int>(PTHREAD_STACK_MIN);
++#else
++  const int min_stack_size = static_cast<int>(sysconf(_SC_THREAD_STACK_MIN));
++#endif
+   if (stack_size_ > 0) stack_size_ = std::max(stack_size_, min_stack_size);
+   set_name(options.name());
+ }
+@@ -1128,7 +1147,7 @@ static void SetThreadName(const char* na
+   pthread_set_name_np(pthread_self(), name);
+ #elif V8_OS_NETBSD
+   static_assert(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP);
+-  pthread_setname_np(pthread_self(), "%s", name);
++  pthread_setname_np(pthread_self(), "%s", (void *)name);
+ #elif V8_OS_DARWIN
+   // pthread_setname_np is only available in 10.6 or later, so test
+   // for it at runtime.
+@@ -1303,7 +1322,7 @@ void Thread::SetThreadLocal(LocalStorage
+ // keep this version in POSIX as most Linux-compatible derivatives will
+ // support it. MacOS and FreeBSD are different here.
+ #if !defined(V8_OS_FREEBSD) && !defined(V8_OS_DARWIN) && !defined(_AIX) && \
+-    !defined(V8_OS_SOLARIS)
++    !defined(V8_OS_SOLARIS) && !defined(V8_OS_OPENBSD) && !defined(V8_OS_NETBSD)
+ 
+ namespace {
+ #if DEBUG
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_small-vector.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_small-vector.h
new file mode 100644
index 0000000000..0a25e0e1bf
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_small-vector.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/small-vector.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/small-vector.h
+@@ -22,7 +22,7 @@ template <typename T, size_t kSize, type
+ class SmallVector {
+   // Currently only support trivially copyable and trivially destructible data
+   // types, as it uses memcpy to copy elements and never calls destructors.
+-  ASSERT_TRIVIALLY_COPYABLE(T);
++  // XXX FREEBSD ASSERT_TRIVIALLY_COPYABLE(T);
+   static_assert(std::is_trivially_destructible<T>::value);
+ 
+  public:
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_strings.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_strings.h
new file mode 100644
index 0000000000..ee7e81ebae
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_strings.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/strings.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/strings.h
+@@ -8,6 +8,9 @@
+ #include "src/base/base-export.h"
+ #include "src/base/macros.h"
+ #include "src/base/vector.h"
++#if defined(__NetBSD__)
++#include <stdarg.h>
++#endif
+ 
+ namespace v8 {
+ namespace base {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_sys-info.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_sys-info.cc
new file mode 100644
index 0000000000..2d43274271
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_sys-info.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/sys-info.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/sys-info.cc
+@@ -35,8 +35,12 @@ namespace base {
+ 
+ // static
+ int SysInfo::NumberOfProcessors() {
++#if V8_OS_OPENBSD || V8_OS_NETBSD
+ #if V8_OS_OPENBSD
++  int mib[2] = {CTL_HW, HW_NCPUONLINE};
++#else
+   int mib[2] = {CTL_HW, HW_NCPU};
++#endif
+   int ncpu = 0;
+   size_t len = sizeof(ncpu);
+   if (sysctl(mib, arraysize(mib), &ncpu, &len, nullptr, 0) != 0) {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_utils_random-number-generator.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_utils_random-number-generator.cc
new file mode 100644
index 0000000000..63ff55386b
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_base_utils_random-number-generator.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/base/utils/random-number-generator.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/base/utils/random-number-generator.cc
+@@ -56,7 +56,7 @@ RandomNumberGenerator::RandomNumberGener
+   DCHECK_EQ(0, result);
+   USE(result);
+   SetSeed((static_cast<int64_t>(first_half) << 32) + second_half);
+-#elif V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD
++#elif V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_NETBSD
+   // Despite its prefix suggests it is not RC4 algorithm anymore.
+   // It always succeeds while having decent performance and
+   // no file descriptor involved.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc
new file mode 100644
index 0000000000..a91ca1490f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/diagnostics/perf-jit.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/diagnostics/perf-jit.cc
+@@ -31,7 +31,7 @@
+ #include "src/flags/flags.h"
+ 
+ // Only compile the {LinuxPerfJitLogger} on Linux.
+-#if V8_OS_LINUX
++#if defined(V8_OS_LINUX) || defined(V8_OS_BSD)
+ 
+ #include <fcntl.h>
+ #include <sys/mman.h>
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.h
new file mode 100644
index 0000000000..66bf496c5a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_diagnostics_perf-jit.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h
+@@ -31,7 +31,7 @@
+ #include "include/v8config.h"
+ 
+ // {LinuxPerfJitLogger} is only implemented on Linux.
+-#if V8_OS_LINUX
++#if defined(V8_OS_LINUX) || defined(V8_OS_BSD)
+ 
+ #include "src/logging/log.h"
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_execution_isolate.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_execution_isolate.cc
new file mode 100644
index 0000000000..72419ca922
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_execution_isolate.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/execution/isolate.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/execution/isolate.cc
+@@ -168,6 +168,10 @@
+ #include "src/execution/simulator-base.h"
+ #endif
+ 
++#if defined(V8_OS_OPENBSD)
++#include <sys/mman.h>
++#endif
++
+ extern "C" const uint8_t v8_Default_embedded_blob_code_[];
+ extern "C" uint32_t v8_Default_embedded_blob_code_size_;
+ extern "C" const uint8_t v8_Default_embedded_blob_data_[];
+@@ -4996,6 +5000,13 @@ void Isolate::InitializeDefaultEmbeddedB
+   const uint8_t* data = DefaultEmbeddedBlobData();
+   uint32_t data_size = DefaultEmbeddedBlobDataSize();
+ 
++#if defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32)
++  if (code_size > 0) {
++    mprotect(reinterpret_cast<void *>(const_cast<uint8_t *>(code)),
++            code_size, PROT_READ | PROT_EXEC);
++  }
++#endif
++
+   if (StickyEmbeddedBlobCode() != nullptr) {
+     base::MutexGuard guard(current_embedded_blob_refcount_mutex_.Pointer());
+     // Check again now that we hold the lock.
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_flags_flags.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_flags_flags.cc
new file mode 100644
index 0000000000..050c2dca19
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_flags_flags.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/flags/flags.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/v8/src/flags/flags.cc
+@@ -13,6 +13,10 @@
+ #include <set>
+ #include <sstream>
+ 
++#if V8_OS_OPENBSD
++#include <sys/mman.h>
++#endif
++
+ #include "src/base/functional.h"
+ #include "src/base/logging.h"
+ #include "src/base/platform/platform.h"
+@@ -912,6 +916,10 @@ void FlagList::FreezeFlags() {
+   // Note that for string flags we only protect the pointer itself, but not the
+   // string storage. TODO(12887): Fix this.
+   base::OS::SetDataReadOnly(&v8_flags, sizeof(v8_flags));
++#if V8_OS_OPENBSD
++  if (mimmutable(&v8_flags, sizeof(v8_flags)) == -1)
++    FATAL("unable to set immutability of v8_flags");
++#endif
+ }
+ 
+ // static
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_sandbox_sandbox.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_sandbox_sandbox.cc
new file mode 100644
index 0000000000..e1b9951b6e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_sandbox_sandbox.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/sandbox/sandbox.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/sandbox/sandbox.cc
+@@ -48,7 +48,7 @@ static Address DetermineAddressSpaceLimi
+   }
+ #endif  // V8_TARGET_ARCH_X64
+ 
+-#if defined(V8_TARGET_ARCH_ARM64) && defined(V8_TARGET_OS_ANDROID)
++#if defined(V8_TARGET_ARCH_ARM64) && (defined(V8_TARGET_OS_ANDROID) || defined(V8_TARGET_OS_OPENBSD))
+   // On Arm64 Android assume a 40-bit virtual address space (39 bits for
+   // userspace and kernel each) as that appears to be the most common
+   // configuration and there seems to be no easy way to retrieve the actual
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc
new file mode 100644
index 0000000000..da81b88822
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc
+@@ -143,6 +143,8 @@ EmbeddedTargetOs ToEmbeddedTargetOs(cons
+     return EmbeddedTargetOs::kWin;
+   } else if (string == "starboard") {
+     return EmbeddedTargetOs::kStarboard;
++  } else if (string == "openbsd") {
++    return EmbeddedTargetOs::kOpenBSD;
+   } else {
+     return EmbeddedTargetOs::kGeneric;
+   }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.h
new file mode 100644
index 0000000000..49f0f5b13e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-base.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-base.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-base.h
+@@ -31,6 +31,7 @@ enum class EmbeddedTargetOs {
+   kMac,
+   kWin,
+   kStarboard,
++  kOpenBSD,
+   kGeneric,  // Everything not covered above falls in here.
+ };
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc
new file mode 100644
index 0000000000..b402feb021
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_snapshot_embedded_platform-embedded-file-writer-generic.cc
@@ -0,0 +1,48 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc
+@@ -9,6 +9,10 @@
+ 
+ #include "src/objects/instruction-stream.h"
+ 
++#if V8_OS_OPENBSD
++#include <sys/param.h>
++#endif
++
+ namespace v8 {
+ namespace internal {
+ 
+@@ -35,6 +39,10 @@ const char* DirectiveAsString(DataDirect
+ void PlatformEmbeddedFileWriterGeneric::SectionText() {
+   if (target_os_ == EmbeddedTargetOs::kChromeOS) {
+     fprintf(fp_, ".section .text.hot.embedded\n");
++#if !defined(V8_TARGET_ARCH_IA32)
++  } else if (target_os_ == EmbeddedTargetOs::kOpenBSD) {
++    fprintf(fp_, ".section .openbsd.mutable,\"a\"\n");
++#endif
+   } else {
+     fprintf(fp_, ".section .text\n");
+   }
+@@ -66,6 +74,8 @@ void PlatformEmbeddedFileWriterGeneric::
+   // On these architectures and platforms, we remap the builtins, so need these
+   // to be aligned on a page boundary.
+   fprintf(fp_, ".balign 4096\n");
++#elif defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32)
++  fprintf(fp_, ".balign %d\n", PAGE_SIZE);
+ #elif V8_TARGET_ARCH_X64
+   // On x64 use 64-bytes code alignment to allow 64-bytes loop header alignment.
+   static_assert(64 >= kCodeAlignment);
+@@ -86,6 +96,8 @@ void PlatformEmbeddedFileWriterGeneric::
+     (V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64)
+   // Since the builtins are remapped, need to pad until the next page boundary.
+   fprintf(fp_, ".balign 4096\n");
++#elif defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32)
++  fprintf(fp_, ".balign %d\n", PAGE_SIZE);
+ #endif
+ }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc
new file mode 100644
index 0000000000..6c2226c22a
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.cc
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.cc.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.cc
+@@ -27,7 +27,7 @@
+ 
+ #include <signal.h>
+ 
+-#if defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD)
++#if defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD) || defined(V8_OS_NETBSD)
+ #include <ucontext.h>
+ #elif V8_OS_DARWIN
+ #include <sys/ucontext.h>
+@@ -61,6 +61,10 @@ namespace trap_handler {
+ #define CONTEXT_REG(reg, REG) &uc->uc_mcontext->__ss.__##reg
+ #elif V8_OS_FREEBSD
+ #define CONTEXT_REG(reg, REG) &uc->uc_mcontext.mc_##reg
++#elif V8_OS_OPENBSD
++#define CONTEXT_REG(reg, REG) &uc->sc_##reg
++#elif V8_OS_NETBSD
++#define CONTEXT_REG(reg, REG) &uc->uc_mcontext.__gregs[_REG_##REG]
+ #else
+ #error "Unsupported platform."
+ #endif
+@@ -80,8 +84,12 @@ bool IsKernelGeneratedSignal(siginfo_t* 
+   // si_code at its default of 0 for signals that don’t originate in hardware.
+   // The other conditions are only relevant for Linux.
+   return info->si_code > 0 && info->si_code != SI_USER &&
+-         info->si_code != SI_QUEUE && info->si_code != SI_TIMER &&
+-         info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ;
++         info->si_code != SI_QUEUE && info->si_code != SI_TIMER
++#ifdef V8_OS_OPENBSD
++         ;
++#else
++         && info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ;
++#endif
+ }
+ 
+ class UnmaskOobSignalScope {
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.h
new file mode 100644
index 0000000000..64fbd9a6ca
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_handler-inside-posix.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/trap-handler/handler-inside-posix.h
+@@ -13,7 +13,7 @@ namespace v8 {
+ namespace internal {
+ namespace trap_handler {
+ 
+-#if V8_OS_LINUX || V8_OS_FREEBSD
++#if V8_OS_LINUX || V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_NETBSD
+ constexpr int kOobSignal = SIGSEGV;
+ #elif V8_OS_DARWIN
+ constexpr int kOobSignal = SIGBUS;
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h
new file mode 100644
index 0000000000..719acea097
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_trap-handler_trap-handler.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/trap-handler/trap-handler.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/trap-handler/trap-handler.h
+@@ -20,7 +20,7 @@ namespace trap_handler {
+ // X64 on Linux, Windows, MacOS, FreeBSD.
+ #if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 &&                        \
+     ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \
+-     V8_OS_FREEBSD)
++     V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_NETBSD)
+ #define V8_TRAP_HANDLER_SUPPORTED true
+ // Arm64 (non-simulator) on Mac and Linux.
+ #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h
new file mode 100644
index 0000000000..3c39fb996e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h
@@ -0,0 +1,134 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h.orig	2024-12-17 17:58:49.000000000 +0000
++++ src/3rdparty/chromium/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h
+@@ -579,7 +579,7 @@ void LiftoffAssembler::StoreTaggedPointe
+ }
+ 
+ void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
+-                            Register offset_reg, uint32_t offset_imm,
++                            Register offset_reg, uintptr_t offset_imm,
+                             LoadType type, uint32_t* protected_load_pc,
+                             bool /* is_load_mem */, bool /* i64_offset */,
+                             bool needs_shift) {
+@@ -659,7 +659,7 @@ void LiftoffAssembler::Load(LiftoffRegis
+ }
+ 
+ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
+-                             uint32_t offset_imm, LiftoffRegister src,
++                             uintptr_t offset_imm, LiftoffRegister src,
+                              StoreType type, LiftoffRegList pinned,
+                              uint32_t* protected_store_pc,
+                              bool /* is_store_mem */, bool /* i64_offset */) {
+@@ -738,7 +738,7 @@ void LiftoffAssembler::Store(Register ds
+ }
+ 
+ void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, Register src_addr,
+-                                  Register offset_reg, uint32_t offset_imm,
++                                  Register offset_reg, uintptr_t offset_imm,
+                                   LoadType type, LiftoffRegList /* pinned */,
+                                   bool /* i64_offset */) {
+   if (type.value() != LoadType::kI64Load) {
+@@ -756,7 +756,7 @@ void LiftoffAssembler::AtomicLoad(Liftof
+ }
+ 
+ void LiftoffAssembler::AtomicStore(Register dst_addr, Register offset_reg,
+-                                   uint32_t offset_imm, LiftoffRegister src,
++                                   uintptr_t offset_imm, LiftoffRegister src,
+                                    StoreType type, LiftoffRegList pinned,
+                                    bool /* i64_offset */) {
+   DCHECK_LE(offset_imm, std::numeric_limits<int32_t>::max());
+@@ -826,7 +826,7 @@ enum Binop { kAdd, kSub, kAnd, kOr, kXor
+ 
+ inline void AtomicAddOrSubOrExchange32(LiftoffAssembler* lasm, Binop binop,
+                                        Register dst_addr, Register offset_reg,
+-                                       uint32_t offset_imm,
++                                       uintptr_t offset_imm,
+                                        LiftoffRegister value,
+                                        LiftoffRegister result, StoreType type) {
+   DCHECK_EQ(value, result);
+@@ -894,7 +894,7 @@ inline void AtomicAddOrSubOrExchange32(L
+ }
+ 
+ inline void AtomicBinop32(LiftoffAssembler* lasm, Binop op, Register dst_addr,
+-                          Register offset_reg, uint32_t offset_imm,
++                          Register offset_reg, uintptr_t offset_imm,
+                           LiftoffRegister value, LiftoffRegister result,
+                           StoreType type) {
+   DCHECK_EQ(value, result);
+@@ -1009,7 +1009,7 @@ inline void AtomicBinop32(LiftoffAssembl
+ }
+ 
+ inline void AtomicBinop64(LiftoffAssembler* lasm, Binop op, Register dst_addr,
+-                          Register offset_reg, uint32_t offset_imm,
++                          Register offset_reg, uintptr_t offset_imm,
+                           LiftoffRegister value, LiftoffRegister result) {
+   // We need {ebx} here, which is the root register. As the root register it
+   // needs special treatment. As we use {ebx} directly in the code below, we
+@@ -1105,7 +1105,7 @@ inline void AtomicBinop64(LiftoffAssembl
+ }  // namespace liftoff
+ 
+ void LiftoffAssembler::AtomicAdd(Register dst_addr, Register offset_reg,
+-                                 uint32_t offset_imm, LiftoffRegister value,
++                                 uintptr_t offset_imm, LiftoffRegister value,
+                                  LiftoffRegister result, StoreType type,
+                                  bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1119,7 +1119,7 @@ void LiftoffAssembler::AtomicAdd(Registe
+ }
+ 
+ void LiftoffAssembler::AtomicSub(Register dst_addr, Register offset_reg,
+-                                 uint32_t offset_imm, LiftoffRegister value,
++                                 uintptr_t offset_imm, LiftoffRegister value,
+                                  LiftoffRegister result, StoreType type,
+                                  bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1132,7 +1132,7 @@ void LiftoffAssembler::AtomicSub(Registe
+ }
+ 
+ void LiftoffAssembler::AtomicAnd(Register dst_addr, Register offset_reg,
+-                                 uint32_t offset_imm, LiftoffRegister value,
++                                 uintptr_t offset_imm, LiftoffRegister value,
+                                  LiftoffRegister result, StoreType type,
+                                  bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1146,7 +1146,7 @@ void LiftoffAssembler::AtomicAnd(Registe
+ }
+ 
+ void LiftoffAssembler::AtomicOr(Register dst_addr, Register offset_reg,
+-                                uint32_t offset_imm, LiftoffRegister value,
++                                uintptr_t offset_imm, LiftoffRegister value,
+                                 LiftoffRegister result, StoreType type,
+                                 bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1160,7 +1160,7 @@ void LiftoffAssembler::AtomicOr(Register
+ }
+ 
+ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
+-                                 uint32_t offset_imm, LiftoffRegister value,
++                                 uintptr_t offset_imm, LiftoffRegister value,
+                                  LiftoffRegister result, StoreType type,
+                                  bool /* i64_offset */) {
+   if (type.value() == StoreType::kI64Store) {
+@@ -1174,7 +1174,7 @@ void LiftoffAssembler::AtomicXor(Registe
+ }
+ 
+ void LiftoffAssembler::AtomicExchange(Register dst_addr, Register offset_reg,
+-                                      uint32_t offset_imm,
++                                      uintptr_t offset_imm,
+                                       LiftoffRegister value,
+                                       LiftoffRegister result, StoreType type,
+                                       bool /* i64_offset */) {
+@@ -1189,7 +1189,7 @@ void LiftoffAssembler::AtomicExchange(Re
+ }
+ 
+ void LiftoffAssembler::AtomicCompareExchange(
+-    Register dst_addr, Register offset_reg, uint32_t offset_imm,
++    Register dst_addr, Register offset_reg, uintptr_t offset_imm,
+     LiftoffRegister expected, LiftoffRegister new_value, LiftoffRegister result,
+     StoreType type, bool /* i64_offset */) {
+   // We expect that the offset has already been added to {dst_addr}, and no
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_tools_run-paxctl.py b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_tools_run-paxctl.py
new file mode 100644
index 0000000000..4e4a596e49
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_chromium_v8_tools_run-paxctl.py
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Part of patchset to build chromium on NetBSD
+* Based on OpenBSD's chromium patches, and
+  pkgsrc's qt5-qtwebengine patches
+
+--- src/3rdparty/chromium/v8/tools/run-paxctl.py.orig	2024-12-21 10:25:11.280390780 +0000
++++ src/3rdparty/chromium/v8/tools/run-paxctl.py
+@@ -0,0 +1,16 @@
++#!@PYTHONBIN@
++# Copyright 2014 the V8 project authors. All rights reserved.
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
++
++"""This program wraps an arbitrary command since gn currently can only execute
++scripts."""
++
++import subprocess
++import sys
++import os
++
++with open(sys.argv[1], 'w'):
++  os.utime(sys.argv[1], None)
++
++sys.exit(subprocess.call(sys.argv[2:]))
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_c__tool.c b/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_c__tool.c
new file mode 100644
index 0000000000..321da7099e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_c__tool.c
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- src/3rdparty/gn/src/gn/c_tool.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/gn/src/gn/c_tool.cc
+@@ -28,6 +28,7 @@ CTool::CTool(const char* n)
+   set_weak_framework_switch("-weak_framework ");
+   set_framework_dir_switch("-F");
+   set_lib_dir_switch("-L");
++  set_lib_dir_Rswitch("-Wl,-R");
+   set_lib_switch("-l");
+   set_linker_arg("");
+ }
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_ninja__binary__target__writer.cc b/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_ninja__binary__target__writer.cc
new file mode 100644
index 0000000000..2ae432b220
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_ninja__binary__target__writer.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+support writing out -L/foo -Wl,-R/foo
+
+--- src/3rdparty/gn/src/gn/ninja_binary_target_writer.cc.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/gn/src/gn/ninja_binary_target_writer.cc
+@@ -336,6 +336,9 @@ void NinjaBinaryTargetWriter::WriteLibra
+       out << " " << tool->lib_dir_switch();
+       lib_path_output.WriteDir(out, all_lib_dirs[i],
+                                PathOutput::DIR_NO_LAST_SLASH);
++      out << " " << tool->lib_dir_Rswitch();
++      lib_path_output.WriteDir(out, all_lib_dirs[i],
++                               PathOutput::DIR_NO_LAST_SLASH);
+     }
+   }
+ 
diff --git a/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_tool.h b/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_tool.h
new file mode 100644
index 0000000000..c15e7a72cc
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_3rdparty_gn_src_gn_tool.h
@@ -0,0 +1,27 @@
+$NetBSD$
+
+add support for -Wl,-R
+
+--- src/3rdparty/gn/src/gn/tool.h.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/3rdparty/gn/src/gn/tool.h
+@@ -157,6 +157,12 @@ class Tool {
+     lib_dir_switch_ = std::move(s);
+   }
+ 
++  const std::string& lib_dir_Rswitch() const { return lib_dir_Rswitch_; }
++  void set_lib_dir_Rswitch(std::string s) {
++    DCHECK(!complete_);
++    lib_dir_Rswitch_ = std::move(s);
++  }
++
+   const std::string& swiftmodule_switch() const { return swiftmodule_switch_; }
+   void set_swiftmodule_switch(std::string s) {
+     DCHECK(!complete_);
+@@ -284,6 +290,7 @@ class Tool {
+   std::string framework_dir_switch_;
+   std::string lib_switch_;
+   std::string lib_dir_switch_;
++  std::string lib_dir_Rswitch_;
+   std::string swiftmodule_switch_;
+   std::string linker_arg_;
+   SubstitutionList outputs_;
diff --git a/qt6-qtwebengine/patches/patch-src_core_CMakeLists.txt b/qt6-qtwebengine/patches/patch-src_core_CMakeLists.txt
new file mode 100644
index 0000000000..952dd8d29f
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_core_CMakeLists.txt
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- src/core/CMakeLists.txt.orig	2025-01-24 10:49:20.000000000 +0000
++++ src/core/CMakeLists.txt
+@@ -21,7 +21,7 @@ add_subdirectory(tools/qwebengine_conver
+ #   TOOLCHAIN SETUP
+ ##
+ 
+-if(LINUX)
++if(UNIX)
+     setup_toolchains()
+ endif()
+ 
+@@ -200,7 +200,7 @@ foreach(arch ${archs})
+                 accessibility_activation_observer.cpp accessibility_activation_observer.h
+         )
+ 
+-        extend_gn_target(${buildGn} CONDITION LINUX OR WIN32
++        extend_gn_target(${buildGn} CONDITION UNIX OR WIN32
+             SOURCES
+                 compositor/content_gpu_client_qt.cpp compositor/content_gpu_client_qt.h
+                 ozone/gl_context_qt.cpp ozone/gl_context_qt.h
+@@ -213,7 +213,7 @@ foreach(arch ${archs})
+                 ozone/gl_surface_wgl_qt.cpp ozone/gl_surface_wgl_qt.h
+         )
+ 
+-        extend_gn_target(${buildGn} CONDITION LINUX
++        extend_gn_target(${buildGn} CONDITION UNIX
+             SOURCES
+                 ozone/gl_ozone_angle_qt.cpp ozone/gl_ozone_angle_qt.h
+                 ozone/gl_ozone_egl_qt.cpp ozone/gl_ozone_egl_qt.h
+@@ -436,7 +436,7 @@ foreach(arch ${archs})
+             CONDITION QT_FEATURE_webenginedriver
+         )
+ 
+-        if(LINUX)
++        if(UNIX)
+             list(APPEND gnArgArg
+                 angle_enable_gl=true
+                 use_gtk=false # GTK toolkit bindings
diff --git a/qt6-qtwebengine/patches/patch-src_core_api_configure.cmake b/qt6-qtwebengine/patches/patch-src_core_api_configure.cmake
new file mode 100644
index 0000000000..a361f16248
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_core_api_configure.cmake
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- src/core/api/configure.cmake.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/core/api/configure.cmake
+@@ -11,6 +11,7 @@ if(NOT QT_CONFIGURE_RUNNING)
+         pkg_check_modules(ALSA alsa IMPORTED_TARGET)
+         pkg_check_modules(PULSEAUDIO libpulse>=0.9.10 libpulse-mainloop-glib)
+         pkg_check_modules(XDAMAGE xdamage)
++        pkg_check_modules(SNDIO sndio)
+         pkg_check_modules(POPPLER_CPP poppler-cpp IMPORTED_TARGET)
+         pkg_check_modules(GBM gbm)
+         pkg_check_modules(LIBVA libva>=1.14)
+@@ -87,6 +88,11 @@ qt_feature("webengine-printing-and-pdf" 
+     AUTODETECT NOT QT_FEATURE_webengine_embedded_build
+     CONDITION TARGET Qt::PrintSupport AND QT_FEATURE_printer
+ )
++qt_feature("webengine-system-sndio" PRIVATE
++    LABEL "Use sndio"
++    AUTODETECT UNIX
++    CONDITION SNDIO_FOUND
++)
+ qt_feature("webengine-pepper-plugins" PRIVATE
+     LABEL "Pepper Plugins"
+     PURPOSE "Enables use of Pepper plugins."
+@@ -219,7 +225,10 @@ qt_configure_add_summary_entry(
+ )
+ qt_configure_add_summary_entry(
+     ARGS "webengine-system-pulseaudio"
+-    CONDITION LINUX
++    CONDITION UNIX
++)
++qt_configure_add_summary_entry(
++    ARGS "webengine-system-sndio"
+ )
+ qt_configure_add_summary_entry(ARGS "webengine-v8-context-snapshot")
+ qt_configure_add_summary_entry(ARGS "webenginedriver")
diff --git a/qt6-qtwebengine/patches/patch-src_core_api_qt__cmdline.cmake b/qt6-qtwebengine/patches/patch-src_core_api_qt__cmdline.cmake
new file mode 100644
index 0000000000..8a8294dd42
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_core_api_qt__cmdline.cmake
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/core/api/qt_cmdline.cmake.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/core/api/qt_cmdline.cmake
+@@ -28,7 +28,7 @@ function(qt_commandline_jumbo arg val ne
+ endfunction()
+ 
+ set(systemLibs alsa ffmpeg freetype harfbuzz icu lcms2 libevent libjpeg
+-    libpng libvpx libxml libwebp minizip opus pulseaudio re2 snappy zlib)
++    libpng libvpx libxml libwebp minizip opus pulseaudio re2 snappy sndio zlib)
+ foreach(slib ${systemLibs})
+     qt_commandline_option(webengine-${slib} TYPE enum NAME webengine-system-${slib} VALUES yes no system)
+ endforeach()
diff --git a/qt6-qtwebengine/patches/patch-src_pdf_CMakeLists.txt b/qt6-qtwebengine/patches/patch-src_pdf_CMakeLists.txt
new file mode 100644
index 0000000000..bfa8b18eb6
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_pdf_CMakeLists.txt
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/pdf/CMakeLists.txt.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/pdf/CMakeLists.txt
+@@ -70,7 +70,7 @@ add_dependencies(prepare_docs_Pdf genera
+ #   TOOLCHAIN SETUP
+ ##
+ 
+-if(LINUX OR MINGW OR ANDROID)
++if(UNIX OR MINGW OR ANDROID)
+     setup_toolchains()
+ endif()
+ 
+@@ -138,7 +138,7 @@ foreach(arch ${archs})
+           v8_enable_webassembly=false
+         )
+ 
+-        if(LINUX OR ANDROID)
++        if(UNIX OR ANDROID)
+             list(APPEND gnArgArg
+                 is_cfi=false
+                 ozone_auto_platforms=false
diff --git a/qt6-qtwebengine/patches/patch-src_pdf_configure_BUILD.root.gn.in b/qt6-qtwebengine/patches/patch-src_pdf_configure_BUILD.root.gn.in
new file mode 100644
index 0000000000..e78e56f00e
--- /dev/null
+++ b/qt6-qtwebengine/patches/patch-src_pdf_configure_BUILD.root.gn.in
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- src/pdf/configure/BUILD.root.gn.in.orig	2024-11-21 04:36:37.000000000 +0000
++++ src/pdf/configure/BUILD.root.gn.in
+@@ -14,14 +14,14 @@ config("qt_harfbuzz_config") {
+     ]
+     include_dirs = [ @GN_HARFBUZZ_INCLUDES@ ]
+ }
+-config("qt_freetype_config") {
+-     visibility = [
+-       "//build/config/freetype:freetype",
+-       "//third_party:freetype_harfbuzz",
+-       "//third_party/harfbuzz-ng:harfbuzz_source",
+-     ]
+-     include_dirs = [ @GN_FREETYPE_INCLUDES@ ]
+-}
++#config("qt_freetype_config") {
++#     visibility = [
++#       "//build/config/freetype:freetype",
++#       "//third_party:freetype_harfbuzz",
++#       "//third_party/harfbuzz-ng:harfbuzz_source",
++#     ]
++#     include_dirs = [ @GN_FREETYPE_INCLUDES@ ]
++#}
+ 
+ config("QtPdf_config") {
+   cflags = [


Home | Main Index | Thread Index | Old Index