From 24b8decce2da87e0889bcfd76a4c5044563f1f96 Mon Sep 17 00:00:00 2001 From: cpm Date: Wed, 30 Aug 2017 15:24:15 +0000 Subject: MFH: r448637 www/chromium: update to 60.0.3112.101 - Update LICENSE - Drop USE_GNOME=gtk20 dependency because chromium uses gtk3 - Use freetype2 bundled to avoid more issues related to the freetype library - Fix typo in the comment of pre-configure section - Update comment in SNDIO section Changelog: https://chromium.googlesource.com/chromium/src/+log/59.0.3071.115..60.0.3112.101?pretty=fuller&n=10000 Security: https://vuxml.freebsd.org/freebsd/7d138476-7710-11e7-88a1-e8e0b747a45a.html Approved by: ports-secteam (delphij) --- www/chromium/Makefile | 31 ++-- www/chromium/distinfo | 12 +- www/chromium/files/audio_manager_openbsd.cc | 42 ++---- www/chromium/files/audio_manager_openbsd.h | 9 +- www/chromium/files/patch-BUILD.gn | 85 +++++------ www/chromium/files/patch-base_BUILD.gn | 36 +++-- www/chromium/files/patch-base_debug_stack__trace.h | 10 ++ .../files/patch-base_debug_stack__trace__posix.cc | 20 ++- .../patch-base_files_file__path__watcher__kqueue.h | 2 +- www/chromium/files/patch-base_files_file__util.h | 10 +- .../patch-base_files_memory_mapped_file_posix.cc | 11 ++ .../files/patch-base_native__library__posix.cc | 18 +-- ...patch-base_posix_unix__domain__socket__linux.cc | 76 +++++----- .../files/patch-base_process_internal__linux.cc | 16 +++ www/chromium/files/patch-base_process_memory.h | 10 +- .../files/patch-base_process_process__metrics.h | 54 ++++--- .../files/patch-base_process_process__posix.cc | 24 ++-- www/chromium/files/patch-base_sys__info__posix.cc | 14 +- ...tch-base_task_scheduler_delayed_task_manager.cc | 12 ++ .../patch-base_test_test__file__util__linux.cc | 13 ++ .../patch-base_third__party_libevent_BUILD.gn | 12 +- ...patch-base_threading_platform__thread__linux.cc | 21 +-- ...patch-base_trace__event_malloc_dump_provider.cc | 21 +++ .../files/patch-base_trace__event_trace__log.cc | 18 +-- .../files/patch-build__overrides_pdfium.gni | 11 -- www/chromium/files/patch-build_config_BUILD.gn | 18 +-- .../files/patch-build_config_BUILDCONFIG.gn | 27 ++-- .../files/patch-build_config_allocator.gni | 19 ++- .../files/patch-build_config_compiler_BUILD.gn | 91 ++++-------- .../files/patch-build_config_freetype_BUILD.gn | 11 -- .../files/patch-chrome_app_chrome__main.cc | 20 +-- .../patch-chrome_app_mash_embedded_services.cc | 27 ++++ .../files/patch-chrome_app_mash_mash__runner.cc | 11 -- ...chrome_browser_devtools_devtools_eye_dropper.cc | 11 ++ ...settings_appearance__page_appearance__page.html | 24 ++-- .../patch-chrome_browser_resources_vulcanize.gni | 11 -- .../patch-chrome_browser_ui_libgtkui_gtk_ui.cc | 60 -------- ...chrome_browser_ui_views_frame_browser__frame.cc | 13 +- ...rome_browser_ui_views_profiles_avatar_button.cc | 20 +++ www/chromium/files/patch-chrome_chrome__paks.gni | 11 -- .../files/patch-chrome_common_chrome__switches.cc | 13 +- .../files/patch-chrome_common_chrome__switches.h | 13 +- ...hromecast_browser_cast__browser__main__parts.cc | 24 ++-- .../files/patch-components_autofill_strings.grdp | 11 ++ .../patch-components_new_or_sad_tab_strings.grdp | 38 +++++ ...mon_process__metrics__memory__dump__provider.cc | 48 +++++-- ...wser_child__process__launcher__helper__linux.cc | 22 +-- ...tent_browser_devtools_protocol_color__picker.cc | 11 -- ...tent_browser_gpu_gpu__feature__checker__impl.cc | 11 ++ ...ent_browser_memory_memory__coordinator__impl.cc | 27 ++-- ...t_browser_memory_swap_metrics_observer_linux.cc | 15 ++ ...content_browser_ppapi__plugin__process__host.cc | 45 +----- ...dia_in_process_video_capture_device_launcher.cc | 20 +++ ...r_renderer__host_render__process__host__impl.cc | 57 +------- ...er_renderer__host_render__process__host__impl.h | 15 ++ ...content_browser_utility__process__host__impl.cc | 53 +------ www/chromium/files/patch-device_battery_BUILD.gn | 11 -- .../files/patch-device_usb_usb__device__impl.cc | 8 +- www/chromium/files/patch-gpu_ipc_client_BUILD.gn | 15 +- .../patch-gpu_ipc_client_gpu_memory_buffer_impl.cc | 20 +++ ...tch-gpu_ipc_common_gpu_memory_buffer_support.cc | 29 ++++ www/chromium/files/patch-gpu_ipc_service_BUILD.gn | 19 ++- ...h-gpu_ipc_service_gpu__memory_buffer_factory.cc | 20 +++ ...adless_lib_headless__content__main__delegate.cc | 35 +---- .../files/patch-ipc_ipc__channel_common.cc | 11 ++ www/chromium/files/patch-ipc_ipc__channel_mojo.cc | 11 ++ .../patch-mash_package_mash__packaged__service.cc | 20 --- .../files/patch-media_ffmpeg_ffmpeg__common.h | 25 ---- .../files/patch-media_filters_ffmpeg__demuxer.cc | 18 --- .../files/patch-net_dns_address__sorter__posix.cc | 8 +- ...atch-net_proxy_proxy__config__service__linux.cc | 158 ++++----------------- .../files/patch-net_proxy_proxy__service.cc | 8 +- ..._url__request_url__request__context__builder.cc | 21 ++- .../files/patch-pdf_pdfium_pdfium__engine.cc | 20 +-- ...ed__impl_private_net__address__private__impl.cc | 11 +- .../files/patch-remoting_base_chromoting_event.cc | 11 ++ .../patch-remoting_client_display_sys_opengl.h | 11 ++ www/chromium/files/patch-remoting_host_BUILD.gn | 47 ------ .../files/patch-remoting_host_host__details.cc | 16 +-- ..._host_it2me_it2me_native_messaging_host_main.cc | 20 +++ ...atch-remoting_host_me2me_desktop_environment.cc | 11 ++ .../patch-remoting_host_remoting_me2me_host.cc | 83 +++++++++++ ..._host_setup_me2me_native_messaging_host_main.cc | 20 +++ .../patch-remoting_webapp_base_js_platform.js | 17 +++ www/chromium/files/patch-sandbox_BUILD.gn | 11 ++ www/chromium/files/patch-sandbox_linux_BUILD.gn | 36 +++++ .../files/patch-services_device_battery_BUILD.gn | 11 ++ ...me__zone__monitor_time__zone__monitor__linux.cc | 22 --- ...services_service__manager_standalone_context.cc | 11 -- www/chromium/files/patch-skia_BUILD.gn | 29 ++-- .../files/patch-testing_gtest_src_gtest.cc | 22 --- ...party_WebKit_Source_platform_wtf_Assertions.cpp | 13 +- .../files/patch-third__party_angle_gni_angle.gni | 11 -- ...tch-third__party_angle_src_libANGLE_Display.cpp | 20 +++ ...e_src_libANGLE_renderer_gl_renderergl_utils.cpp | 11 ++ .../files/patch-third__party_harfbuzz-ng_BUILD.gn | 20 --- .../files/patch-third__party_libxml_BUILD.gn | 11 -- www/chromium/files/patch-third__party_node_node.py | 2 +- ...y_skia_src_ports_SkFontHost_FreeType_common.cpp | 140 ------------------ ...-third__party_skia_src_ports_SkOSFile_stdio.cpp | 11 ++ ...lidation-layers_src_loader_vk_loader_platform.h | 11 ++ .../files/patch-third__party_widevine_cdm_BUILD.gn | 16 +-- .../files/patch-tools_gn_bootstrap_bootstrap.py | 80 ++++++++--- www/chromium/files/patch-ui_base_BUILD.gn | 30 ++-- .../files/patch-ui_gfx_font__render__params.h | 11 +- .../files/patch-ui_gfx_gpu_memory_buffer.cc | 11 ++ .../files/patch-ui_gfx_gpu_memory_buffer.h | 20 +++ .../patch-ui_gfx_ipc_gfx_param_traits_macros.h | 29 ++++ ...tch-ui_gfx_linux_client_native_pixmap_dmabuf.cc | 25 ++++ ...patch-ui_gfx_mojo_buffer_types_struct_traits.cc | 47 ++++++ .../patch-ui_gfx_mojo_buffer_types_struct_traits.h | 11 ++ .../files/patch-ui_gfx_native_pixmap_handle.cc | 20 +++ .../files/patch-ui_gfx_native_pixmap_handle.h | 28 ++++ www/chromium/files/patch-ui_gl_BUILD.gn | 16 ++- .../patch-ui_views_controls_textfield_textfield.cc | 34 ++--- www/chromium/pkg-plist | 10 +- 116 files changed, 1480 insertions(+), 1389 deletions(-) create mode 100644 www/chromium/files/patch-base_debug_stack__trace.h create mode 100644 www/chromium/files/patch-base_files_memory_mapped_file_posix.cc create mode 100644 www/chromium/files/patch-base_process_internal__linux.cc create mode 100644 www/chromium/files/patch-base_task_scheduler_delayed_task_manager.cc create mode 100644 www/chromium/files/patch-base_test_test__file__util__linux.cc create mode 100644 www/chromium/files/patch-base_trace__event_malloc_dump_provider.cc delete mode 100644 www/chromium/files/patch-build__overrides_pdfium.gni delete mode 100644 www/chromium/files/patch-build_config_freetype_BUILD.gn create mode 100644 www/chromium/files/patch-chrome_app_mash_embedded_services.cc delete mode 100644 www/chromium/files/patch-chrome_app_mash_mash__runner.cc create mode 100644 www/chromium/files/patch-chrome_browser_devtools_devtools_eye_dropper.cc delete mode 100644 www/chromium/files/patch-chrome_browser_resources_vulcanize.gni delete mode 100644 www/chromium/files/patch-chrome_browser_ui_libgtkui_gtk_ui.cc create mode 100644 www/chromium/files/patch-chrome_browser_ui_views_profiles_avatar_button.cc delete mode 100644 www/chromium/files/patch-chrome_chrome__paks.gni create mode 100644 www/chromium/files/patch-components_autofill_strings.grdp create mode 100644 www/chromium/files/patch-components_new_or_sad_tab_strings.grdp delete mode 100644 www/chromium/files/patch-content_browser_devtools_protocol_color__picker.cc create mode 100644 www/chromium/files/patch-content_browser_gpu_gpu__feature__checker__impl.cc create mode 100644 www/chromium/files/patch-content_browser_memory_swap_metrics_observer_linux.cc create mode 100644 www/chromium/files/patch-content_browser_renderer__host_media_in_process_video_capture_device_launcher.cc create mode 100644 www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h delete mode 100644 www/chromium/files/patch-device_battery_BUILD.gn create mode 100644 www/chromium/files/patch-gpu_ipc_client_gpu_memory_buffer_impl.cc create mode 100644 www/chromium/files/patch-gpu_ipc_common_gpu_memory_buffer_support.cc create mode 100644 www/chromium/files/patch-gpu_ipc_service_gpu__memory_buffer_factory.cc create mode 100644 www/chromium/files/patch-ipc_ipc__channel_common.cc create mode 100644 www/chromium/files/patch-ipc_ipc__channel_mojo.cc delete mode 100644 www/chromium/files/patch-mash_package_mash__packaged__service.cc delete mode 100644 www/chromium/files/patch-media_ffmpeg_ffmpeg__common.h delete mode 100644 www/chromium/files/patch-media_filters_ffmpeg__demuxer.cc create mode 100644 www/chromium/files/patch-remoting_base_chromoting_event.cc create mode 100644 www/chromium/files/patch-remoting_client_display_sys_opengl.h delete mode 100644 www/chromium/files/patch-remoting_host_BUILD.gn create mode 100644 www/chromium/files/patch-remoting_host_it2me_it2me_native_messaging_host_main.cc create mode 100644 www/chromium/files/patch-remoting_host_me2me_desktop_environment.cc create mode 100644 www/chromium/files/patch-remoting_host_remoting_me2me_host.cc create mode 100644 www/chromium/files/patch-remoting_host_setup_me2me_native_messaging_host_main.cc create mode 100644 www/chromium/files/patch-remoting_webapp_base_js_platform.js create mode 100644 www/chromium/files/patch-sandbox_BUILD.gn create mode 100644 www/chromium/files/patch-sandbox_linux_BUILD.gn create mode 100644 www/chromium/files/patch-services_device_battery_BUILD.gn delete mode 100644 www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc delete mode 100644 www/chromium/files/patch-services_service__manager_standalone_context.cc delete mode 100644 www/chromium/files/patch-testing_gtest_src_gtest.cc delete mode 100644 www/chromium/files/patch-third__party_angle_gni_angle.gni create mode 100644 www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp create mode 100644 www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_gl_renderergl_utils.cpp delete mode 100644 www/chromium/files/patch-third__party_harfbuzz-ng_BUILD.gn delete mode 100644 www/chromium/files/patch-third__party_libxml_BUILD.gn delete mode 100644 www/chromium/files/patch-third__party_skia_src_ports_SkFontHost_FreeType_common.cpp create mode 100644 www/chromium/files/patch-third__party_skia_src_ports_SkOSFile_stdio.cpp create mode 100644 www/chromium/files/patch-third__party_vulkan-validation-layers_src_loader_vk_loader_platform.h create mode 100644 www/chromium/files/patch-ui_gfx_gpu_memory_buffer.cc create mode 100644 www/chromium/files/patch-ui_gfx_gpu_memory_buffer.h create mode 100644 www/chromium/files/patch-ui_gfx_ipc_gfx_param_traits_macros.h create mode 100644 www/chromium/files/patch-ui_gfx_linux_client_native_pixmap_dmabuf.cc create mode 100644 www/chromium/files/patch-ui_gfx_mojo_buffer_types_struct_traits.cc create mode 100644 www/chromium/files/patch-ui_gfx_mojo_buffer_types_struct_traits.h create mode 100644 www/chromium/files/patch-ui_gfx_native_pixmap_handle.cc create mode 100644 www/chromium/files/patch-ui_gfx_native_pixmap_handle.h diff --git a/www/chromium/Makefile b/www/chromium/Makefile index e23f83bc..2a22705 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -2,18 +2,15 @@ # $FreeBSD$ PORTNAME= chromium -PORTVERSION= 59.0.3071.115 -PORTREVISION= 2 +PORTVERSION= 60.0.3112.101 CATEGORIES= www -MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/:source1 \ - LOCAL/cpm:source2 -DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:source1 \ - ${PORTNAME}-freetype2${EXTRACT_SUFX}:source2 +MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= chromium@FreeBSD.org COMMENT= Google web browser based on WebKit -LICENSE= BSD3CLAUSE LGPL21 MPL +LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi BUILD_DEPENDS= gperf:devel/gperf \ @@ -48,7 +45,6 @@ LIB_DEPENDS= libspeechd.so:accessibility/speech-dispatcher \ libwebp.so:graphics/webp \ libavcodec.so:multimedia/ffmpeg \ libcups.so:print/cups \ - libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ @@ -71,7 +67,7 @@ USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= scrnsaverproto x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xproto xrandr xrender xscrnsaver xtst -USE_GNOME= atk dconf glib20 gtk20 gtk30 libxml2 libxslt +USE_GNOME= atk dconf glib20 gtk30 libxml2 libxslt MAKE_ARGS= -C out/${BUILDTYPE} SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper ALL_TARGET= chrome @@ -88,7 +84,6 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ - enable_media_router=true \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ @@ -98,9 +93,9 @@ GN_ARGS+= clang_use_chrome_plugins=false \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ + use_allocator_shim=false \ use_aura=true \ use_cups=true \ - use_experimental_allocator_shim=false \ use_gtk3=true \ use_lld=true \ use_sysroot=false \ @@ -169,8 +164,7 @@ PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not -# support falling back to ALSA. In theory it supports falling back to -# PulseAudio, but this is untested. +# support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true @@ -178,7 +172,7 @@ SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .include "Makefile.tests" TEST_ALL_TARGET= ${TEST_TARGETS} -TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}:source1 +TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} .include @@ -198,9 +192,6 @@ pre-everything:: @${ECHO_MSG} "and ${WANTSPACE}." @${ECHO_MSG} -post-extract: - @${MV} ${WRKDIR}/freetype2 ${WRKSRC}/third_party/freetype/src - post-patch-SNDIO-on: @${MKDIR} ${WRKSRC}/media/audio/sndio ${WRKSRC}/media/audio/openbsd @${CP} ${FILESDIR}/sndio_output.* ${WRKSRC}/media/audio/sndio @@ -209,7 +200,7 @@ post-patch-SNDIO-on: pre-configure: # We used to remove bundled libraries to be sure that chromium uses - # system libraries and not shippen ones. + # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${PYTHON_CMD} \ @@ -225,8 +216,8 @@ do-configure: gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency - @${MKDIR} ${WRKSRC}/third_party/node/linux/node-linux-x64/bin - ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/linux/node-linux-x64/bin/node + @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin + ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin/node do-test-TEST-on: .for t in ${TEST_TARGETS} diff --git a/www/chromium/distinfo b/www/chromium/distinfo index 9bfa013..56609b9 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,7 +1,5 @@ -TIMESTAMP = 1498576960 -SHA256 (chromium-59.0.3071.115.tar.xz) = 37cbc9955ae3b25cd4e9851a82ea97a0035021cc90658902938ad1c20f263170 -SIZE (chromium-59.0.3071.115.tar.xz) = 530808448 -SHA256 (chromium-freetype2.tar.xz) = 5bcb3d3da82905b2077ae0dcca52b99a25344c7e8dbdcd52691d69ab269356e3 -SIZE (chromium-freetype2.tar.xz) = 22847212 -SHA256 (chromium-59.0.3071.115-testdata.tar.xz) = a66e7b4a8f6002fe64b2b5609deb6eff2a0da442cb68e22ce404023021f20852 -SIZE (chromium-59.0.3071.115-testdata.tar.xz) = 124229320 +TIMESTAMP = 1502990445 +SHA256 (chromium-60.0.3112.101.tar.xz) = 0bfb6318af1c3cf82e8ac872e3da34cd3c013aadaab446d5097228101cec065e +SIZE (chromium-60.0.3112.101.tar.xz) = 537528240 +SHA256 (chromium-60.0.3112.101-testdata.tar.xz) = c22a3aa43af83b6ab3e97bbf9e44b4b00c6d7a9b50d3a528cfd8726b845f1f7e +SIZE (chromium-60.0.3112.101-testdata.tar.xz) = 124655656 diff --git a/www/chromium/files/audio_manager_openbsd.cc b/www/chromium/files/audio_manager_openbsd.cc index dd4a30f..08f1c32 100644 --- a/www/chromium/files/audio_manager_openbsd.cc +++ b/www/chromium/files/audio_manager_openbsd.cc @@ -3,14 +3,12 @@ // found in the LICENSE file. #include "base/metrics/histogram_macros.h" +#include "base/memory/ptr_util.h" #include "media/audio/openbsd/audio_manager_openbsd.h" #include "media/audio/audio_device_description.h" #include "media/audio/audio_output_dispatcher.h" -#if defined(USE_PULSEAUDIO) -#include "media/audio/pulse/audio_manager_pulse.h" -#endif #if defined(USE_SNDIO) #include "media/audio/sndio/sndio_input.h" #include "media/audio/sndio/sndio_output.h" @@ -82,12 +80,9 @@ AudioParameters AudioManagerOpenBSD::GetInputStreamParameters( kDefaultSampleRate, 16, buffer_size); } -AudioManagerOpenBSD::AudioManagerOpenBSD( - scoped_refptr task_runner, - scoped_refptr worker_task_runner, - AudioLogFactory* audio_log_factory) - : AudioManagerBase(std::move(task_runner), - std::move(worker_task_runner), +AudioManagerOpenBSD::AudioManagerOpenBSD(std::unique_ptr audio_thread, + AudioLogFactory* audio_log_factory) + : AudioManagerBase(std::move(audio_thread), audio_log_factory) { DLOG(WARNING) << "AudioManagerOpenBSD"; SetMaxOutputStreamsAllowed(kMaxOutputStreams); @@ -170,34 +165,17 @@ AudioOutputStream* AudioManagerOpenBSD::MakeOutputStream( } #endif -ScopedAudioManagerPtr CreateAudioManager( - scoped_refptr task_runner, - scoped_refptr worker_task_runner, +std::unique_ptr CreateAudioManager( + std::unique_ptr audio_thread, AudioLogFactory* audio_log_factory) { DLOG(WARNING) << "CreateAudioManager"; -#if defined(USE_PULSEAUDIO) - // Do not move task runners when creating AudioManagerPulse. - // If the creation fails, we need to use the task runners to create other - // AudioManager implementations. - std::unique_ptr manager( - new AudioManagerPulse(task_runner, worker_task_runner, - audio_log_factory)); - if (manager->Init()) { - UMA_HISTOGRAM_ENUMERATION("Media.OpenBSDAudioIO", kPulse, kAudioIOMax + 1); - return std::move(manager); - } - DVLOG(1) << "PulseAudio is not available on the OS"; -#endif - #if defined(USE_SNDIO) UMA_HISTOGRAM_ENUMERATION("Media.OpenBSDAudioIO", kSndio, kAudioIOMax + 1); - return ScopedAudioManagerPtr( - new AudioManagerOpenBSD(std::move(task_runner), - std::move(worker_task_runner),audio_log_factory)); + return base::MakeUnique(std::move(audio_thread), + audio_log_factory); #else - return ScopedAudioManagerPtr( - new FakeAudioManager(std::move(task_runner), - std::move(worker_task_runner), audio_log_factory)); + return base::MakeUnique(std::move(audio_thread), + audio_log_factory); #endif } diff --git a/www/chromium/files/audio_manager_openbsd.h b/www/chromium/files/audio_manager_openbsd.h index 2972e36..cb2bcf0 100644 --- a/www/chromium/files/audio_manager_openbsd.h +++ b/www/chromium/files/audio_manager_openbsd.h @@ -17,10 +17,9 @@ namespace media { class MEDIA_EXPORT AudioManagerOpenBSD : public AudioManagerBase { public: - AudioManagerOpenBSD( - scoped_refptr task_runner, - scoped_refptr worker_task_runner, - AudioLogFactory* audio_log_factory); + AudioManagerOpenBSD(std::unique_ptr audio_thread, + AudioLogFactory* audio_log_factory); + ~AudioManagerOpenBSD() override; // Implementation of AudioManager. bool HasAudioOutputDevices() override; @@ -50,8 +49,6 @@ class MEDIA_EXPORT AudioManagerOpenBSD : public AudioManagerBase { const LogCallback& log_callback) override; protected: - ~AudioManagerOpenBSD() override; - AudioParameters GetPreferredOutputStreamParameters( const std::string& output_device_id, const AudioParameters& input_params) override; diff --git a/www/chromium/files/patch-BUILD.gn b/www/chromium/files/patch-BUILD.gn index 131ea9d..96f64de 100644 --- a/www/chromium/files/patch-BUILD.gn +++ b/www/chromium/files/patch-BUILD.gn @@ -1,33 +1,24 @@ ---- BUILD.gn.orig 2017-06-05 19:03:00 UTC -+++ BUILD.gn -@@ -95,7 +95,7 @@ group("gn_all") { +--- BUILD.gn.orig 2017-07-25 21:04:48.000000000 +0200 ++++ BUILD.gn 2017-07-29 00:52:25.378843000 +0200 +@@ -92,7 +92,7 @@ ] } -- if (!is_ios && !is_android && !is_chromecast) { -+ if (!is_ios && !is_android && !is_bsd && !is_chromecast) { +- if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) { ++ if (!is_ios && !is_android && !is_bsd && !is_chromecast && !is_fuchsia) { deps += [ "//chrome", "//chrome/test:browser_tests", -@@ -153,7 +153,7 @@ group("gn_all") { +@@ -151,7 +151,7 @@ ] } -- if (!is_ios) { -+ if (!is_ios && !is_bsd) { - # TODO(GYP): Figure out which of these should actually build on iOS, - # and whether there should be other targets that are iOS-only and missing. +- if (!is_ios && !is_fuchsia) { ++ if (!is_ios && !is_bsd && !is_fuchsia) { deps += [ -@@ -199,7 +199,7 @@ group("gn_all") { - "//ui/touch_selection:ui_touch_selection_unittests", - "//url/ipc:url_ipc_unittests", - ] -- } else { -+ } else if (!is_bsd) { - deps += [ "//ios:all" ] - } - -@@ -359,7 +359,7 @@ group("gn_all") { + "//cc:cc_unittests", + "//chrome/test:telemetry_perf_unittests", +@@ -363,7 +363,7 @@ ] } @@ -36,7 +27,7 @@ # The following are definitely linux-only. deps += [ "//chrome:manpage", -@@ -382,9 +382,16 @@ group("gn_all") { +@@ -386,9 +386,16 @@ # TODO(dpranke): add the linux_dump_symbols flag? deps += [ "//chrome:linux_symbols" ] } @@ -54,7 +45,7 @@ deps += [ "//base:base_i18n_perftests", "//base:base_perftests", -@@ -455,7 +462,7 @@ group("gn_all") { +@@ -459,7 +466,7 @@ if (enable_nacl) { deps += [ "//components/nacl/loader:nacl_loader_unittests" ] @@ -63,16 +54,16 @@ # TODO(dpranke): Figure out what platforms should actually have this. deps += [ "//components/nacl/loader:nacl_helper" ] -@@ -557,7 +564,7 @@ group("gn_all") { +@@ -557,7 +564,7 @@ deps += [ "//chrome/installer/mini_installer:next_version_mini_installer" ] } -- } else if (!is_android && !is_ios) { -+ } else if (!is_android && !is_ios && !is_bsd) { +- } else if (!is_android && !is_ios && !is_fuchsia) { ++ } else if (!is_android && !is_ios && !is_bsd && !is_fuchsia) { deps += [ "//breakpad:symupload($host_toolchain)" ] } -@@ -595,7 +602,7 @@ group("gn_all") { +@@ -588,7 +595,7 @@ deps += [ "//components/proximity_auth:proximity_auth_unittests" ] } @@ -81,7 +72,7 @@ deps += [ "//mash:all", "//media/mojo/services:media_service_unittests", -@@ -620,7 +627,7 @@ group("gn_all") { +@@ -606,7 +613,7 @@ } } @@ -90,7 +81,7 @@ # TODO(GYP): Figure out if any of these should be in gn_all # and figure out how cross-platform they are deps += [ -@@ -659,7 +666,7 @@ group("gn_all") { +@@ -644,7 +651,7 @@ } if (target_cpu == "x86" || target_cpu == "x64") { @@ -99,7 +90,7 @@ deps += [ "//chrome/test:load_library_perf_tests" ] } deps += [ -@@ -667,7 +674,7 @@ group("gn_all") { +@@ -652,13 +659,13 @@ "//third_party/libjpeg_turbo:simd_asm", ] } @@ -108,8 +99,6 @@ deps += [ "//v8:v8_shell" ] } } -@@ -677,7 +684,7 @@ group("gn_all") { - } if ((is_linux && !is_chromeos && !is_chromecast) || (is_win && use_drfuzz) || - (use_libfuzzer && is_mac)) { @@ -117,25 +106,25 @@ deps += [ "//testing/libfuzzer/fuzzers", "//testing/libfuzzer/tests:libfuzzer_tests", -@@ -828,7 +835,7 @@ if (is_chromeos) { +@@ -677,7 +684,7 @@ + deps += [ "//native_client_sdk/src:nacl_core_sdk" ] + } - group("gn_mojo_targets") { - testonly = true -- if (is_linux && !is_chromeos) { -+ if ((is_linux || is_bsd) && !is_chromeos) { - # TODO(GYP): Figure out if any of these should be in gn_all - # and figure out how cross-platform they are - deps = [ -@@ -854,7 +861,7 @@ group("gn_visibility") { +- if (is_linux && use_ozone) { ++ if ((is_linux || is_bsd ) && use_ozone) { + deps += [ + "//headless", + "//headless:headless_tests", +@@ -811,7 +818,7 @@ } } --if (!is_ios) { -+if (!is_ios || !is_bsd) { +-if (!is_ios && !is_fuchsia) { ++if (!is_ios && !is_bsd && !is_fuchsia) { # This group includes all of the targets needed to build and test Blink, # including running the layout tests (see below). group("blink_tests") { -@@ -921,7 +928,7 @@ if (!is_ios) { +@@ -879,7 +886,7 @@ data_deps += [ "//content/shell:content_shell_crash_service" ] } @@ -144,7 +133,7 @@ data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -929,7 +936,7 @@ if (!is_ios) { +@@ -887,7 +894,7 @@ data_deps += [ "//breakpad:dump_syms($host_toolchain)" ] } @@ -153,16 +142,16 @@ data_deps += [ "//breakpad:dump_syms($host_toolchain)" ] } -@@ -979,7 +986,7 @@ group("chromium_swarm_tests") { +@@ -941,7 +948,7 @@ group("chromium_builder_perf") { testonly = true -- if (!is_ios && !is_android && !is_chromecast) { -+ if (!is_ios && !is_android && !is_chromecast && !is_bsd) { +- if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) { ++ if (!is_ios && !is_android && !is_bsd && !is_chromecast && !is_fuchsia) { data_deps = [ "//cc:cc_perftests", "//chrome/test:load_library_perf_tests", -@@ -1009,7 +1016,7 @@ group("chromium_builder_perf") { +@@ -975,7 +982,7 @@ "//chrome/installer/mini_installer:mini_installer", "//chrome/test:angle_perftests", ] diff --git a/www/chromium/files/patch-base_BUILD.gn b/www/chromium/files/patch-base_BUILD.gn index fe7b884..caa33b9 100644 --- a/www/chromium/files/patch-base_BUILD.gn +++ b/www/chromium/files/patch-base_BUILD.gn @@ -1,6 +1,6 @@ ---- base/BUILD.gn.orig 2017-06-05 21:03:00.000000000 +0200 -+++ base/BUILD.gn 2017-06-13 19:23:34.211227000 +0200 -@@ -1098,7 +1098,7 @@ +--- base/BUILD.gn.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/BUILD.gn 2017-08-02 22:12:25.442369000 +0200 +@@ -1106,7 +1106,7 @@ "base_paths_win.h", ] @@ -9,17 +9,25 @@ sources += [ "base_paths_posix.cc" ] } } -@@ -1157,6 +1157,9 @@ +@@ -1142,7 +1142,7 @@ + # Needed for if using newer C++ library than sysroot, except if + # building inside the cros_sdk environment - use host_toolchain as a + # more robust check for this. +- if (!use_sysroot && (is_android || (is_linux && !is_chromecast)) && ++ if (!use_sysroot && (is_android || (is_linux && !is_chromecast) && !is_clang) && + host_toolchain != "//build/toolchain/cros:host") { + libs = [ "atomic" ] + } +@@ -1168,7 +1168,7 @@ + "allocator/allocator_shim_override_glibc_weak_symbols.h", + ] deps += [ "//base/allocator:tcmalloc" ] - } else if (is_linux && use_allocator == "none") { +- } else if (is_linux && use_allocator == "none") { ++ } else if (is_linux && !is_bsd && use_allocator == "none") { sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] -+ } else if (is_bsd && use_allocator == "none") { -+ # TODO move the code to "allocator_shim_default_dispatch_to_glibc.cc" -+ sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] } else if (is_android && use_allocator == "none") { sources += [ - "allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", -@@ -1172,6 +1175,33 @@ +@@ -1185,6 +1185,31 @@ } } @@ -32,8 +40,6 @@ + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc", + "sys_info_linux.cc", -+ "trace_event/malloc_dump_provider.cc", -+ "trace_event/malloc_dump_provider.h", + ] + sources += [ + "files/file_path_watcher_stub.cc", @@ -53,7 +59,7 @@ # Allow more direct string conversions on platforms with native utf8 # strings if (is_mac || is_ios || is_chromeos || is_chromecast) { -@@ -1469,7 +1499,7 @@ +@@ -1520,7 +1545,7 @@ } # Linux. @@ -62,7 +68,7 @@ if (is_asan || is_lsan || is_msan || is_tsan) { # For llvm-sanitizer. data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ] -@@ -1494,7 +1524,7 @@ +@@ -1545,7 +1570,7 @@ "//base/third_party/xdg_user_dirs", ] } else { @@ -71,7 +77,7 @@ sources -= [ "nix/mime_util_xdg.cc", "nix/mime_util_xdg.h", -@@ -2325,6 +2355,12 @@ +@@ -2392,6 +2417,12 @@ "trace_event/trace_event_android_unittest.cc", ] set_sources_assignment_filter(sources_assignment_filter) diff --git a/www/chromium/files/patch-base_debug_stack__trace.h b/www/chromium/files/patch-base_debug_stack__trace.h new file mode 100644 index 0000000..c7cc716 --- /dev/null +++ b/www/chromium/files/patch-base_debug_stack__trace.h @@ -0,0 +1,10 @@ +--- base/debug/stack_trace.h.orig 2017-08-02 19:09:58.400190000 +0200 ++++ base/debug/stack_trace.h 2017-08-02 19:10:33.950334000 +0200 +@@ -16,6 +16,7 @@ + #include "build/build_config.h" + + #if defined(OS_POSIX) ++#include + #include + #endif + diff --git a/www/chromium/files/patch-base_debug_stack__trace__posix.cc b/www/chromium/files/patch-base_debug_stack__trace__posix.cc index 6b2420b..c7f4c82 100644 --- a/www/chromium/files/patch-base_debug_stack__trace__posix.cc +++ b/www/chromium/files/patch-base_debug_stack__trace__posix.cc @@ -1,5 +1,5 @@ ---- base/debug/stack_trace_posix.cc.orig 2017-04-19 19:06:28 UTC -+++ base/debug/stack_trace_posix.cc +--- base/debug/stack_trace_posix.cc.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/debug/stack_trace_posix.cc 2017-08-02 18:45:42.071358000 +0200 @@ -34,7 +34,7 @@ #include #endif @@ -9,18 +9,19 @@ #include "base/debug/proc_maps_linux.h" #endif -@@ -575,6 +575,10 @@ class SandboxSymbolizeHelper { +@@ -574,6 +574,11 @@ // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { -+#if defined(OS_FREEBSD) ++#if defined(OS_BSD) + // TODO (rene) avoid link error, implement something? ++ NOTIMPLEMENTED(); + return false; +#else // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -590,6 +594,7 @@ class SandboxSymbolizeHelper { +@@ -589,6 +594,7 @@ is_initialized_ = true; return true; @@ -28,3 +29,12 @@ } // Opens all object files and caches their file descriptors. +@@ -721,7 +727,7 @@ + // NOTE: This code MUST be async-signal safe (it's used by in-process + // stack dumping signal handler). NO malloc or stdio is allowed here. + +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_BSD) + count = std::min(arraysize(trace_), count); + + // Though the backtrace API man page does not list any possible negative diff --git a/www/chromium/files/patch-base_files_file__path__watcher__kqueue.h b/www/chromium/files/patch-base_files_file__path__watcher__kqueue.h index e8e9425..3b88d7a 100644 --- a/www/chromium/files/patch-base_files_file__path__watcher__kqueue.h +++ b/www/chromium/files/patch-base_files_file__path__watcher__kqueue.h @@ -1,4 +1,4 @@ ---- base/files/file_path_watcher_kqueue.h.orig 2017-04-19 19:06:28 UTC +--- base/files/file_path_watcher_kqueue.h.orig 2017-06-05 19:03:00 UTC +++ base/files/file_path_watcher_kqueue.h @@ -5,6 +5,10 @@ #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ diff --git a/www/chromium/files/patch-base_files_file__util.h b/www/chromium/files/patch-base_files_file__util.h index 4c643cc..1027e7b 100644 --- a/www/chromium/files/patch-base_files_file__util.h +++ b/www/chromium/files/patch-base_files_file__util.h @@ -1,11 +1,11 @@ ---- base/files/file_util.h.orig 2017-06-05 19:03:00 UTC -+++ base/files/file_util.h -@@ -406,7 +406,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas +--- base/files/file_util.h.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/files/file_util.h 2017-07-29 00:57:11.269678000 +0200 +@@ -406,7 +406,7 @@ // the directory |path|, in the number of FilePath::CharType, or -1 on failure. BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) // Broad categories of file systems as returned by statfs() on Linux. enum FileSystemType { FILE_SYSTEM_UNKNOWN, // statfs failed. diff --git a/www/chromium/files/patch-base_files_memory_mapped_file_posix.cc b/www/chromium/files/patch-base_files_memory_mapped_file_posix.cc new file mode 100644 index 0000000..996e487 --- /dev/null +++ b/www/chromium/files/patch-base_files_memory_mapped_file_posix.cc @@ -0,0 +1,11 @@ +--- base/files/memory_mapped_file_posix.cc.orig 2017-08-02 18:42:44.932652000 +0200 ++++ base/files/memory_mapped_file_posix.cc 2017-08-02 18:42:59.362655000 +0200 +@@ -114,7 +114,7 @@ + + #if defined(OS_ANDROID) && __ANDROID_API__ < 21 + do_manual_extension = true; +-#elif !defined(OS_MACOSX) ++#elif !defined(OS_MACOSX) && !defined(OS_BSD) + if (posix_fallocate(file_.GetPlatformFile(), region.offset, + region.size) != 0) { + DPLOG(ERROR) << "posix_fallocate " << file_.GetPlatformFile(); diff --git a/www/chromium/files/patch-base_native__library__posix.cc b/www/chromium/files/patch-base_native__library__posix.cc index 1a6aca9..a853d1d 100644 --- a/www/chromium/files/patch-base_native__library__posix.cc +++ b/www/chromium/files/patch-base_native__library__posix.cc @@ -1,11 +1,11 @@ ---- base/native_library_posix.cc.orig 2017-06-05 19:03:00 UTC -+++ base/native_library_posix.cc -@@ -35,7 +35,7 @@ NativeLibrary LoadNativeLibraryWithOptions(const FileP +--- base/native_library_posix.cc.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/native_library_posix.cc 2017-08-02 21:02:05.991380000 +0200 +@@ -30,7 +30,7 @@ + // http://crbug.com/17943, http://crbug.com/17557, http://crbug.com/36892, + // and http://crbug.com/40794. + int flags = RTLD_LAZY; +-#if defined(OS_ANDROID) || !defined(RTLD_DEEPBIND) ++#if defined(OS_ANDROID) || !defined(RTLD_DEEPBIND) || defined(OS_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. - CHECK(!options.prefer_own_symbols); --#else -+#elif !defined(OS_BSD) - if (options.prefer_own_symbols) - flags |= RTLD_DEEPBIND; - #endif diff --git a/www/chromium/files/patch-base_posix_unix__domain__socket__linux.cc b/www/chromium/files/patch-base_posix_unix__domain__socket__linux.cc index cd56938..7e2921c 100644 --- a/www/chromium/files/patch-base_posix_unix__domain__socket__linux.cc +++ b/www/chromium/files/patch-base_posix_unix__domain__socket__linux.cc @@ -1,45 +1,49 @@ ---- base/posix/unix_domain_socket_linux.cc.orig 2017-06-05 19:03:00 UTC -+++ base/posix/unix_domain_socket_linux.cc -@@ -23,6 +23,15 @@ +--- base/posix/unix_domain_socket_linux.cc.orig 2017-08-03 00:05:03.000000000 +0200 ++++ base/posix/unix_domain_socket_linux.cc 2017-08-10 00:44:31.627900000 +0200 +@@ -5,7 +5,10 @@ + #include "base/posix/unix_domain_socket_linux.h" - namespace base { + #include ++#include ++#include + #include ++#include + #include -+#if defined(OS_BSD) -+// Port over Linux ucred structure -+struct ucred { -+ pid_t pid; // process ID of the sending process -+ uid_t uid; // user ID of the sending process -+ gid_t gid; // group ID of the sending process -+}; -+#endif -+ - const size_t UnixDomainSocket::kMaxFileDescriptors = 16; + #include +@@ -25,6 +28,14 @@ - #if !defined(OS_NACL_NONSFI) -@@ -37,8 +46,14 @@ bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { + const size_t UnixDomainSocket::kMaxFileDescriptors = 16; - // static - bool UnixDomainSocket::EnableReceiveProcessId(int fd) { -+#if defined(OS_BSD) -+ // XXX(rene) do this? : -+ // taken from dbus, Academic Free License 2.1 / GPL 2+ -+ return 0; // fake OK -+#else - const int enable = 1; - return setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable)) == 0; ++#ifndef SCM_CREDENTIALS ++# define SCM_CREDENTIALS 0X9001 +#endif - } - #endif // !defined(OS_NACL_NONSFI) - -@@ -144,7 +159,11 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, - // The PNaCl toolchain for Non-SFI binary build does not support ++ ++#ifndef SO_PASSCRED ++# define SO_PASSCRED 0x9002 ++#endif ++ + #if !defined(OS_NACL_NONSFI) + bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { + int raw_socks[2]; +@@ -114,7 +125,7 @@ + CMSG_SPACE(sizeof(int) * kMaxFileDescriptors) + #if !defined(OS_NACL_NONSFI) + // The PNaCl toolchain for Non-SFI binary build does not support ucred. +- + CMSG_SPACE(sizeof(struct ucred)) ++ + CMSG_SPACE(sizeof(struct sockcred)) + #endif + ; + char control_buffer[kControlBufferSize]; +@@ -145,9 +156,9 @@ // SCM_CREDENTIALS. if (cmsg->cmsg_level == SOL_SOCKET && -+#if defined(OS_BSD) -+ 1) { // XXX(rene) carpet getting full ... -+#else cmsg->cmsg_type == SCM_CREDENTIALS) { -+#endif - DCHECK_EQ(payload_len, sizeof(struct ucred)); +- DCHECK_EQ(payload_len, sizeof(struct ucred)); ++ DCHECK_EQ(payload_len, sizeof(struct sockcred)); DCHECK_EQ(pid, -1); - pid = reinterpret_cast(CMSG_DATA(cmsg))->pid; +- pid = reinterpret_cast(CMSG_DATA(cmsg))->pid; ++ pid = getpid(); + } + #endif + } diff --git a/www/chromium/files/patch-base_process_internal__linux.cc b/www/chromium/files/patch-base_process_internal__linux.cc new file mode 100644 index 0000000..4ce388e --- /dev/null +++ b/www/chromium/files/patch-base_process_internal__linux.cc @@ -0,0 +1,16 @@ +--- base/process/internal_linux.cc.orig 2017-08-10 00:00:17.842158000 +0200 ++++ base/process/internal_linux.cc 2017-08-10 00:02:37.838081000 +0200 +@@ -60,10 +60,13 @@ + // Synchronously reading files in /proc is safe. + ThreadRestrictions::ScopedAllowIO allow_io; + ++#if !defined(OS_BSD) + if (!ReadFileToString(file, buffer)) { + DLOG(WARNING) << "Failed to read " << file.MaybeAsASCII(); + return false; + } ++#endif ++ + return !buffer->empty(); + } + diff --git a/www/chromium/files/patch-base_process_memory.h b/www/chromium/files/patch-base_process_memory.h index 555b834..0afe651 100644 --- a/www/chromium/files/patch-base_process_memory.h +++ b/www/chromium/files/patch-base_process_memory.h @@ -1,11 +1,11 @@ ---- base/process/memory.h.orig 2017-06-05 19:03:00 UTC -+++ base/process/memory.h -@@ -32,7 +32,7 @@ BASE_EXPORT void EnableTerminationOnOutOfMemory(); +--- base/process/memory.h.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/process/memory.h 2017-07-29 01:01:15.601297000 +0200 +@@ -32,7 +32,7 @@ // Crash reporting classifies such crashes as OOM. BASE_EXPORT void TerminateBecauseOutOfMemory(size_t size); --#if defined(OS_LINUX) || defined(OS_ANDROID) -+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID) +-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) BASE_EXPORT extern size_t g_oom_size; // The maximum allowed value for the OOM score. diff --git a/www/chromium/files/patch-base_process_process__metrics.h b/www/chromium/files/patch-base_process_process__metrics.h index 1503c97..2441552 100644 --- a/www/chromium/files/patch-base_process_process__metrics.h +++ b/www/chromium/files/patch-base_process_process__metrics.h @@ -1,5 +1,5 @@ ---- base/process/process_metrics.h.orig 2017-06-05 19:03:00 UTC -+++ base/process/process_metrics.h +--- base/process/process_metrics.h.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/process/process_metrics.h 2017-08-01 22:08:56.153263000 +0200 @@ -22,6 +22,12 @@ #include "base/values.h" #include "build/build_config.h" @@ -13,48 +13,46 @@ #if defined(OS_MACOSX) #include #include "base/process/port_provider_mac.h" -@@ -205,7 +211,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -215,7 +221,7 @@ // otherwise. bool GetIOCounters(IoCounters* io_counters) const; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) // Returns the number of file descriptors currently open by the process, or // -1 on error. int GetOpenFdCount() const; -@@ -213,7 +219,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -223,12 +229,12 @@ // Returns the soft limit of file descriptors that can be opened by the // process, or -1 on error. int GetOpenFdSoftLimit() const; --#endif // defined(OS_LINUX) -+#endif // defined(OS_LINUX) || defined(OS_BSD) +-#endif // defined(OS_LINUX) || defined(OS_AIX) ++#endif // defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) + +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + // Bytes of swap as reported by /proc/[pid]/status. + uint64_t GetVmSwapBytes() const; +-#endif // defined(OS_LINUX) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) private: #if !defined(OS_MACOSX) || defined(OS_IOS) -@@ -289,7 +295,7 @@ BASE_EXPORT void SetFdLimit(unsigned int max_descripto +@@ -304,7 +310,7 @@ #endif // defined(OS_POSIX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ -- defined(OS_ANDROID) -+ defined(OS_ANDROID) || defined(OS_BSD) +- defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) ++ defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) || defined(OS_BSD) // Data about system-wide memory consumption. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // -@@ -383,13 +389,17 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK - // CPU-related ticks. Returns -1 on parse error. - // Exposed for testing. - BASE_EXPORT int ParseProcStatCPU(const std::string& input); -+#endif - -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) - // Get the number of threads of |process| as available in /proc//stat. - // This should be used with care as no synchronization with running threads is - // done. This is mostly useful to guarantee being single-threaded. - // Returns 0 on failure. - BASE_EXPORT int GetNumberOfThreads(ProcessHandle process); -+#endif - -+#if defined(OS_LINUX) || defined(OS_ANDROID) - // /proc/self/exe refers to the current executable. - BASE_EXPORT extern const char kProcSelfExe[]; +@@ -352,7 +358,7 @@ + #endif + #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || \ +- defined(OS_FUCHSIA) ++ defined(OS_FUCHSIA) || defined(OS_BSD) + int buffers = 0; + int cached = 0; + int active_anon = 0; diff --git a/www/chromium/files/patch-base_process_process__posix.cc b/www/chromium/files/patch-base_process_process__posix.cc index 7ea5ddd..bf09d25 100644 --- a/www/chromium/files/patch-base_process_process__posix.cc +++ b/www/chromium/files/patch-base_process_process__posix.cc @@ -1,6 +1,6 @@ ---- base/process/process_posix.cc.orig 2017-06-15 21:03:00.000000000 +0200 -+++ base/process/process_posix.cc 2017-06-19 15:25:27.760111000 +0200 -@@ -21,8 +21,18 @@ +--- base/process/process_posix.cc.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/process/process_posix.cc 2017-08-02 19:38:18.657740000 +0200 +@@ -22,8 +22,18 @@ #include #endif @@ -19,9 +19,9 @@ #if !defined(OS_NACL_NONSFI) bool WaitpidWithTimeout(base::ProcessHandle handle, -@@ -184,13 +194,13 @@ - base::ProcessHandle parent_pid = base::GetParentProcessId(handle); +@@ -186,13 +196,13 @@ base::ProcessHandle our_pid = base::GetCurrentProcessHandle(); + if (parent_pid != our_pid) { -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) @@ -36,26 +36,26 @@ } int status; -@@ -256,12 +266,16 @@ +@@ -258,12 +268,16 @@ return Process(handle); } --#if !defined(OS_LINUX) && !defined(OS_MACOSX) -+#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD) +-#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_AIX) ++#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_AIX) && !defined(OS_BSD) // static bool Process::CanBackgroundProcesses() { return false; } --#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) +-#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_AIX) +#elif defined(OS_FREEBSD) +bool Process::CanBackgroundProcesses() { + return true; +} -+#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD) ++#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_AIX) && !defined(OS_BSD) // static void Process::TerminateCurrentProcessImmediately(int exit_code) { -@@ -369,15 +383,31 @@ +@@ -371,15 +385,31 @@ bool Process::IsProcessBackgrounded() const { // See SetProcessBackgrounded(). DCHECK(IsValid()); @@ -85,5 +85,5 @@ + return result == 0; +#endif // !defined(OS_FREEBSD) } - #endif // !defined(OS_LINUX) && !defined(OS_MACOSX) + #endif // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_AIX) diff --git a/www/chromium/files/patch-base_sys__info__posix.cc b/www/chromium/files/patch-base_sys__info__posix.cc index 6e94c5b..cf5c6cd 100644 --- a/www/chromium/files/patch-base_sys__info__posix.cc +++ b/www/chromium/files/patch-base_sys__info__posix.cc @@ -1,20 +1,20 @@ ---- base/sys_info_posix.cc.orig 2017-06-05 19:03:00 UTC -+++ base/sys_info_posix.cc +--- base/sys_info_posix.cc.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/sys_info_posix.cc 2017-08-02 21:19:06.172695000 +0200 @@ -35,7 +35,7 @@ namespace { --#if !defined(OS_OPENBSD) -+#if !defined(OS_BSD) +-#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) ++#if !defined(OS_BSD) && !defined(OS_FUCHSIA) int NumberOfProcessors() { // sysconf returns the number of "logical" (not "physical") processors on both // Mac and Linux. So we get the number of max available "logical" processors. -@@ -128,7 +128,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, +@@ -128,7 +128,7 @@ namespace base { --#if !defined(OS_OPENBSD) -+#if !defined(OS_BSD) +-#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) ++#if !defined(OS_BSD) && !defined(OS_FUCHSIA) int SysInfo::NumberOfProcessors() { return g_lazy_number_of_processors.Get().value(); } diff --git a/www/chromium/files/patch-base_task_scheduler_delayed_task_manager.cc b/www/chromium/files/patch-base_task_scheduler_delayed_task_manager.cc new file mode 100644 index 0000000..e194005 --- /dev/null +++ b/www/chromium/files/patch-base_task_scheduler_delayed_task_manager.cc @@ -0,0 +1,12 @@ +--- base/task_scheduler/delayed_task_manager.cc.orig 2017-08-10 23:52:26.912451000 +0200 ++++ base/task_scheduler/delayed_task_manager.cc 2017-08-11 00:22:09.125479000 +0200 +@@ -70,9 +70,6 @@ + if (started_.IsSet()) { + AddDelayedTaskNow(std::move(task), delay, + std::move(post_task_now_callback)); +- } else { +- tasks_added_before_start_.push_back( +- {std::move(task), std::move(post_task_now_callback)}); + } + } + } diff --git a/www/chromium/files/patch-base_test_test__file__util__linux.cc b/www/chromium/files/patch-base_test_test__file__util__linux.cc new file mode 100644 index 0000000..1612521 --- /dev/null +++ b/www/chromium/files/patch-base_test_test__file__util__linux.cc @@ -0,0 +1,13 @@ +--- base/test/test_file_util_linux.cc.orig 2017-08-10 16:14:03.505570000 +0200 ++++ base/test/test_file_util_linux.cc 2017-08-10 16:14:43.299690000 +0200 +@@ -20,8 +20,10 @@ + return false; + if (fdatasync(fd.get()) != 0) + return false; ++#if !defined(OS_BSD) + if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0) + return false; ++#endif + return true; + } + diff --git a/www/chromium/files/patch-base_third__party_libevent_BUILD.gn b/www/chromium/files/patch-base_third__party_libevent_BUILD.gn index 5128622..9e48a48 100644 --- a/www/chromium/files/patch-base_third__party_libevent_BUILD.gn +++ b/www/chromium/files/patch-base_third__party_libevent_BUILD.gn @@ -1,11 +1,15 @@ ---- base/third_party/libevent/BUILD.gn.orig 2017-04-19 19:06:28 UTC -+++ base/third_party/libevent/BUILD.gn -@@ -50,6 +50,9 @@ static_library("libevent") { +--- base/third_party/libevent/BUILD.gn.orig 2017-08-03 00:05:03.000000000 +0200 ++++ base/third_party/libevent/BUILD.gn 2017-08-03 14:47:35.196280000 +0200 +@@ -50,6 +50,13 @@ "linux/event-config.h", ] include_dirs = [ "linux" ] + } else if (is_bsd) { -+ sources += [ "kqueue.c" ] ++ sources += [ ++ "kqueue.c", ++ "freebsd/config.h", ++ "freebsd/event-config.h", ++ ] + include_dirs = [ "freebsd" ] } else if (is_android) { sources += [ diff --git a/www/chromium/files/patch-base_threading_platform__thread__linux.cc b/www/chromium/files/patch-base_threading_platform__thread__linux.cc index cd6f6ee..b419dd7 100644 --- a/www/chromium/files/patch-base_threading_platform__thread__linux.cc +++ b/www/chromium/files/patch-base_threading_platform__thread__linux.cc @@ -1,8 +1,8 @@ ---- base/threading/platform_thread_linux.cc.orig 2017-06-05 19:03:01 UTC -+++ base/threading/platform_thread_linux.cc +--- base/threading/platform_thread_linux.cc.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/threading/platform_thread_linux.cc 2017-08-01 22:36:09.953380000 +0200 @@ -19,7 +19,9 @@ - #if !defined(OS_NACL) + #if !defined(OS_NACL) && !defined(OS_AIX) #include +#if !defined(OS_BSD) #include @@ -10,21 +10,12 @@ #include #include #include -@@ -130,7 +132,7 @@ void PlatformThread::SetName(const std::string& name) +@@ -130,7 +132,7 @@ ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name); tracked_objects::ThreadData::InitializeThreadContext(name); --#if !defined(OS_NACL) -+#if !defined(OS_NACL) && !defined(OS_BSD) +-#if !defined(OS_NACL) && !defined(OS_AIX) ++#if !defined(OS_NACL) && !defined(OS_AIX) && !defined(OS_BSD) // On linux we can get the thread names to show up in the debugger by setting // the process name for the LWP. We don't want to do this for the main // thread because that would rename the process, causing tools like killall -@@ -150,7 +152,7 @@ void PlatformThread::SetName(const std::string& name) - #endif // !defined(OS_NACL) - } - --#if !defined(OS_NACL) -+#if !defined(OS_NACL) && !defined(OS_BSD) - // static - void PlatformThread::SetThreadPriority(PlatformThreadId thread_id, - ThreadPriority priority) { diff --git a/www/chromium/files/patch-base_trace__event_malloc_dump_provider.cc b/www/chromium/files/patch-base_trace__event_malloc_dump_provider.cc new file mode 100644 index 0000000..54463b0 --- /dev/null +++ b/www/chromium/files/patch-base_trace__event_malloc_dump_provider.cc @@ -0,0 +1,21 @@ +--- base/trace_event/malloc_dump_provider.cc.orig 2017-08-02 18:33:27.773657000 +0200 ++++ base/trace_event/malloc_dump_provider.cc 2017-08-02 18:34:48.019053000 +0200 +@@ -21,6 +21,8 @@ + + #if defined(OS_MACOSX) + #include ++#elif defined(OS_BSD) ++#include "stdlib.h" + #else + #include + #endif +@@ -243,6 +245,9 @@ + allocated_objects_count = main_heap_info.block_count; + #elif defined(OS_FUCHSIA) + // TODO(fuchsia): Port, see https://crbug.com/706592. ++#elif defined(OS_BSD) ++ total_virtual_size = 0; ++ allocated_objects_size = 0; + #else + struct mallinfo info = mallinfo(); + DCHECK_GE(info.arena + info.hblkhd, info.uordblks); diff --git a/www/chromium/files/patch-base_trace__event_trace__log.cc b/www/chromium/files/patch-base_trace__event_trace__log.cc index deaabaf..8acf830 100644 --- a/www/chromium/files/patch-base_trace__event_trace__log.cc +++ b/www/chromium/files/patch-base_trace__event_trace__log.cc @@ -1,20 +1,20 @@ ---- base/trace_event/trace_log.cc.orig 2017-06-05 19:03:01 UTC -+++ base/trace_event/trace_log.cc -@@ -1504,7 +1504,7 @@ void TraceLog::AddMetadataEventsWhileLocked() { - process_name_); +--- base/trace_event/trace_log.cc.orig 2017-07-25 21:04:48.000000000 +0200 ++++ base/trace_event/trace_log.cc 2017-08-01 22:41:16.236310000 +0200 +@@ -1501,7 +1501,7 @@ } --#if !defined(OS_NACL) && !defined(OS_IOS) -+#if !defined(OS_NACL) && !defined(OS_IOS) && !defined(OS_BSD) + // See https://crbug.com/726484 for Fuchsia. +-#if !defined(OS_NACL) && !defined(OS_IOS) && !defined(OS_FUCHSIA) ++#if !defined(OS_NACL) && !defined(OS_IOS) && !defined(OS_FUCHSIA) && !defined(OS_BSD) Time process_creation_time = CurrentProcessInfo::CreationTime(); if (!process_creation_time.is_null()) { TimeDelta process_uptime = Time::Now() - process_creation_time; -@@ -1512,7 +1512,7 @@ void TraceLog::AddMetadataEventsWhileLocked() { +@@ -1509,7 +1509,7 @@ current_thread_id, "process_uptime_seconds", "uptime", process_uptime.InSeconds()); } --#endif // !defined(OS_NACL) && !defined(OS_IOS) -+#endif // !defined(OS_NACL) && !defined(OS_IOS) && !defined(OS_BSD) +-#endif // !defined(OS_NACL) && !defined(OS_IOS) && !defined(OS_FUCHSIA) ++#endif // !defined(OS_NACL) && !defined(OS_IOS) && !defined(OS_FUCHSIA) && !defined(OS_BSD) if (!process_labels_.empty()) { std::vector labels; diff --git a/www/chromium/files/patch-build__overrides_pdfium.gni b/www/chromium/files/patch-build__overrides_pdfium.gni deleted file mode 100644 index 639d860..0000000 --- a/www/chromium/files/patch-build__overrides_pdfium.gni +++ /dev/null @@ -1,11 +0,0 @@ ---- build_overrides/pdfium.gni.orig 2017-06-05 19:03:01 UTC -+++ build_overrides/pdfium.gni -@@ -10,7 +10,7 @@ pdf_enable_xfa_override = false - - # Build PDFium either using the bundled FreeType, or using a third-party - # FreeType, configured by the embedder in //build/config/freetype. --pdf_bundle_freetype_override = !is_linux && !is_win -+pdf_bundle_freetype_override = false - - # Disable use of Skia backend. - pdf_use_skia_override = false diff --git a/www/chromium/files/patch-build_config_BUILD.gn b/www/chromium/files/patch-build_config_BUILD.gn index 2459ef3..5cc8f2b 100644 --- a/www/chromium/files/patch-build_config_BUILD.gn +++ b/www/chromium/files/patch-build_config_BUILD.gn @@ -1,6 +1,6 @@ ---- build/config/BUILD.gn.orig 2017-06-05 19:03:01 UTC -+++ build/config/BUILD.gn -@@ -169,7 +169,7 @@ config("debug") { +--- build/config/BUILD.gn.orig 2017-07-25 21:04:48.000000000 +0200 ++++ build/config/BUILD.gn 2017-08-02 23:31:08.597825000 +0200 +@@ -166,7 +166,7 @@ # builds, and we have to tell it to turn it off. defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] } @@ -9,7 +9,7 @@ # Enable libstdc++ debugging facilities to help catch problems early, see # http://crbug.com/65151 . # TODO(phajdan.jr): Should we enable this for all of POSIX? -@@ -258,7 +258,7 @@ config("default_libs") { +@@ -255,7 +255,7 @@ "CoreText.framework", "Foundation.framework", ] @@ -18,12 +18,12 @@ libs = [ "dl", "rt", -@@ -292,7 +292,7 @@ config("executable_config") { +@@ -302,7 +302,7 @@ + "//build/config/ios:ios_dynamic_flags", + "//build/config/ios:ios_executable_flags", ] - } else if (is_ios) { - configs += [ "//build/config/ios:ios_dynamic_flags" ] -- } else if (is_linux || is_android) { -+ } else if (is_linux || is_android || is_bsd) { +- } else if (is_linux || is_android || current_os == "aix") { ++ } else if (is_linux || is_bsd || is_android || current_os == "aix") { configs += [ "//build/config/gcc:executable_ldconfig" ] if (is_android) { configs += [ "//build/config/android:executable_config" ] diff --git a/www/chromium/files/patch-build_config_BUILDCONFIG.gn b/www/chromium/files/patch-build_config_BUILDCONFIG.gn index 098fd9c..99df07d 100644 --- a/www/chromium/files/patch-build_config_BUILDCONFIG.gn +++ b/www/chromium/files/patch-build_config_BUILDCONFIG.gn @@ -1,6 +1,6 @@ ---- build/config/BUILDCONFIG.gn.orig 2017-06-05 19:03:01 UTC -+++ build/config/BUILDCONFIG.gn -@@ -131,12 +131,13 @@ declare_args() { +--- build/config/BUILDCONFIG.gn.orig 2017-08-03 00:05:04.000000000 +0200 ++++ build/config/BUILDCONFIG.gn 2017-08-09 23:42:27.032065000 +0200 +@@ -131,13 +131,13 @@ is_official_build = false # Whether we're a traditional desktop unix. @@ -9,14 +9,14 @@ # Set to true when compiling with the Clang compiler. Typically this is used # to configure warnings. - is_clang = current_os == "mac" || current_os == "ios" || -- current_os == "linux" || current_os == "chromeos" -+ current_os == "linux" || current_os == "chromeos" || -+ current_os == "bsd" + is_clang = + current_os == "mac" || current_os == "ios" || current_os == "chromeos" || +- current_os == "fuchsia" || ++ current_os == "fuchsia" || current_os == "bsd" || + (current_os == "linux" && current_cpu != "s390x" && + current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc") - # Allows the path to a custom target toolchain to be injected as a single - # argument, and set as the default toolchain. -@@ -185,8 +186,8 @@ if (host_toolchain == "") { +@@ -189,8 +189,8 @@ # TODO(dpranke): Add some sort of assert here that verifies that # no toolchain omitted host_toolchain from its toolchain_args(). @@ -27,7 +27,7 @@ # TODO(dpranke) - is_clang normally applies only to the target # build, and there is no way to indicate that you want to override # it for both the target build *and* the host build. Do we need to -@@ -222,7 +223,7 @@ if (target_os == "android") { +@@ -228,7 +228,7 @@ } else { _default_toolchain = "//build/toolchain/android:android_$target_cpu" } @@ -36,13 +36,14 @@ # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" -@@ -342,8 +343,17 @@ if (current_os == "win" || current_os == "winrt_81" || +@@ -378,8 +378,18 @@ is_nacl = false is_posix = true is_win = false +} else if (current_os == "bsd") { + is_android = false + is_chromeos = false ++ is_fuchsia = false + is_ios = false + is_linux = false + is_bsd = true @@ -55,7 +56,7 @@ # ============================================================================= # SOURCES FILTERS # ============================================================================= -@@ -412,7 +422,7 @@ if (!is_ios) { +@@ -449,7 +459,7 @@ if (!is_mac && !is_ios) { sources_assignment_filter += [ "*.mm" ] } diff --git a/www/chromium/files/patch-build_config_allocator.gni b/www/chromium/files/patch-build_config_allocator.gni index d85afb9..ef4e8f3 100644 --- a/www/chromium/files/patch-build_config_allocator.gni +++ b/www/chromium/files/patch-build_config_allocator.gni @@ -1,11 +1,20 @@ ---- build/config/allocator.gni.orig 2017-06-05 19:03:01 UTC -+++ build/config/allocator.gni -@@ -18,7 +18,7 @@ if (is_android || current_cpu == "mipsel" || is_mac || +--- build/config/allocator.gni.orig 2017-07-25 21:04:48.000000000 +0200 ++++ build/config/allocator.gni 2017-08-01 23:13:58.535952000 +0200 +@@ -7,7 +7,7 @@ + # Temporarily disable tcmalloc on arm64 linux to get rid of compilation errors. + if (is_android || current_cpu == "mipsel" || is_mac || is_ios || is_asan || + is_lsan || is_tsan || is_msan || is_win || is_syzyasan || is_fuchsia || +- (is_linux && target_cpu == "arm64")) { ++ (is_linux && target_cpu == "arm64") || is_bsd) { + _default_allocator = "none" + } else { + _default_allocator = "tcmalloc" +@@ -18,7 +18,7 @@ # against the debug CRT with "is_nacl=false". if ((is_linux || is_android || is_mac || (is_win && !is_component_build && !is_debug)) && !is_asan && !is_lsan && - !is_tsan && !is_msan) { + !is_tsan && !is_msan && !is_bsd) { - _default_use_experimental_allocator_shim = true + _default_use_allocator_shim = true } else { - _default_use_experimental_allocator_shim = false + _default_use_allocator_shim = false diff --git a/www/chromium/files/patch-build_config_compiler_BUILD.gn b/www/chromium/files/patch-build_config_compiler_BUILD.gn index 63941e8..b83d834 100644 --- a/www/chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,6 +1,6 @@ ---- build/config/compiler/BUILD.gn.orig 2017-06-05 21:03:01.000000000 +0200 -+++ build/config/compiler/BUILD.gn 2017-06-13 16:28:04.062660000 +0200 -@@ -37,7 +37,7 @@ +--- build/config/compiler/BUILD.gn.orig 2017-08-03 00:05:04.000000000 +0200 ++++ build/config/compiler/BUILD.gn 2017-08-10 00:34:22.540754000 +0200 +@@ -45,7 +45,7 @@ # only two architectures that are currently checked in). Turn this off when # you are using a custom toolchain and need to control -B in cflags. linux_use_bundled_binutils = @@ -9,7 +9,7 @@ (current_cpu == "x64" || current_cpu == "x86") binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", root_build_dir) -@@ -156,7 +156,7 @@ +@@ -166,7 +166,7 @@ configs += [ "//build/config/win:compiler" ] } else if (is_android) { configs += [ "//build/config/android:compiler" ] @@ -18,52 +18,26 @@ configs += [ "//build/config/linux:compiler" ] } else if (is_nacl) { configs += [ "//build/config/nacl:compiler" ] -@@ -207,7 +207,7 @@ - +@@ -219,7 +219,7 @@ # Linker warnings. if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && -- !(is_android && use_order_profiling) && !is_mac && !is_ios) { -+ !(is_android && use_order_profiling) && !is_mac && !is_ios && !is_bsd) { + !(is_android && use_order_profiling) && !is_mac && !is_ios && +- current_os != "aix") { ++ current_os != "aix" && !is_bsd) { # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 # crbug.com/485542 -@@ -304,7 +304,7 @@ +@@ -316,7 +316,7 @@ # Linux/Android common flags setup. # --------------------------------- -- if (is_linux || is_android) { -+ if (is_linux || is_bsd || is_android) { +- if (is_linux || is_android || is_fuchsia) { ++ if (is_linux || is_android || is_bsd || is_fuchsia) { if (use_pic) { cflags += [ "-fPIC" ] ldflags += [ "-fPIC" ] -@@ -319,7 +319,7 @@ - "-Wl,-z,relro", - ] - if (!using_sanitizer) { -- if (!use_cfi_diag) { -+ if (!use_cfi_diag && !is_bsd) { - ldflags += [ "-Wl,-z,defs" ] - } - -@@ -429,14 +429,14 @@ - # clang-cl (used if is_win) doesn't expose this flag. - # Currently disabled for nacl since its toolchain lacks this flag (too old). - # TODO(zforman): Once nacl's toolchain is updated, remove check. -- if (is_clang && is_linux && strip_absolute_paths_from_debug_symbols) { -+ if (is_clang && (is_linux || is_bsd) && strip_absolute_paths_from_debug_symbols) { - absolute_path = rebase_path("//.") - cflags += [ "-fdebug-prefix-map=$absolute_path=." ] - } - - # C++11 compiler flags setup. - # --------------------------- -- if (is_linux || is_android || (is_nacl && is_clang)) { -+ if (is_linux || is_bsd || is_android || (is_nacl && is_clang)) { - # gnu++11 instead of c++11 is needed because some code uses typeof() (a - # GNU extension). - # TODO(thakis): Eventually switch this to c++11 instead, @@ -493,7 +493,7 @@ - ] + ldflags += [ "-flto" ] # Apply a lower LTO optimization level as the default is too slow. - if (is_linux) { @@ -71,16 +45,16 @@ if (use_lld) { ldflags += [ "-Wl,--lto-O1" ] } else { -@@ -513,7 +513,7 @@ - # targeting ARM, without this flag, LTO produces a .text section that is - # larger than the maximum call displacement, preventing the linker from - # relocating calls (http://llvm.org/PR22999). +@@ -516,7 +516,7 @@ + # Also, when targeting ARM, without this flag, LTO produces a .text section + # that is larger than the maximum call displacement, preventing the linker + # from relocating calls (http://llvm.org/PR22999). - if (is_linux) { + if (is_linux || is_bsd) { - ldflags += [ "-Wl,-plugin-opt,-function-sections" ] - } - } -@@ -781,7 +781,7 @@ + if (use_lld) { + ldflags += [ + "-Wl,-mllvm,-function-sections", +@@ -794,7 +794,7 @@ # configs -= [ "//build/config/compiler:clang_stackrealign" ] # See https://crbug.com/556393 for details of where it must be avoided. config("clang_stackrealign") { @@ -89,7 +63,7 @@ cflags = [ # Align the stack on 16-byte boundaries, http://crbug.com/418554. "-mstack-alignment=16", -@@ -835,7 +835,7 @@ +@@ -848,7 +848,7 @@ # smaller. if (is_win) { configs += [ "//build/config/win:runtime_library" ] @@ -98,7 +72,7 @@ configs += [ "//build/config/linux:runtime_library" ] } else if (is_ios) { configs += [ "//build/config/ios:runtime_library" ] -@@ -1097,7 +1097,7 @@ +@@ -1111,7 +1111,7 @@ "-Wno-address-of-packed-member", # TODO(hans): https://crbug.com/681136 @@ -107,25 +81,16 @@ # TODO(thakis ): https://crbug.com/683349 "-Wno-user-defined-warnings", -@@ -1137,7 +1137,7 @@ +@@ -1162,7 +1162,7 @@ ] if (!is_debug && !using_sanitizer && -- (!is_linux || !is_clang || is_official_build)) { -+ (!is_linux || !is_bsd || !is_clang || is_official_build)) { +- (!is_linux || !is_clang || is_official_build) && ++ (!is_linux || !is_bsd || !is_clang || is_official_build) && + current_cpu != "s390x" && current_cpu != "s390" && + current_cpu != "ppc64" && current_cpu != "ppc64") { # _FORTIFY_SOURCE isn't really supported by Clang now, see - # http://llvm.org/bugs/show_bug.cgi?id=16821. - # It seems to work fine with Ubuntu 12 headers though, so use it in -@@ -1196,7 +1196,7 @@ - ] - } - -- if (is_linux || is_android) { -+ if (is_linux || is_bsd || is_android) { - cflags_cc += [ - # Don't warn about hash_map in third-party code. - "-Wno-deprecated", -@@ -1644,7 +1644,7 @@ +@@ -1669,7 +1669,7 @@ "-g2", ] } else { diff --git a/www/chromium/files/patch-build_config_freetype_BUILD.gn b/www/chromium/files/patch-build_config_freetype_BUILD.gn deleted file mode 100644 index 53452ca..0000000 --- a/www/chromium/files/patch-build_config_freetype_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- build/config/freetype/BUILD.gn.orig 2017-06-05 19:03:01 UTC -+++ build/config/freetype/BUILD.gn -@@ -9,7 +9,7 @@ group("freetype") { - public_deps = [ - "//third_party/freetype", - ] -- } else if (is_linux) { -+ } else if (is_linux || is_bsd) { - public_configs = [ "//build/linux:freetype_from_pkgconfig" ] - } - } diff --git a/www/chromium/files/patch-chrome_app_chrome__main.cc b/www/chromium/files/patch-chrome_app_chrome__main.cc index 50542f5..450c2c6 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main.cc @@ -1,19 +1,11 @@ ---- chrome/app/chrome_main.cc.orig 2017-06-05 19:03:01 UTC -+++ chrome/app/chrome_main.cc -@@ -97,14 +97,14 @@ int ChromeMain(int argc, const char** argv) { +--- chrome/app/chrome_main.cc.orig 2017-07-25 21:04:49.000000000 +0200 ++++ chrome/app/chrome_main.cc 2017-08-01 23:35:54.553290000 +0200 +@@ -92,7 +92,7 @@ + const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess()); ALLOW_UNUSED_LOCAL(command_line); - #endif --#if defined(OS_LINUX) || defined(OS_MACOSX) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) +-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) if (command_line->HasSwitch(switches::kHeadless)) { #if defined(OS_MACOSX) SetUpBundleOverrides(); - #endif - return headless::HeadlessShellMain(argc, argv); - } --#endif // defined(OS_LINUX) || defined(OS_MACOSX) -+#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) - - #if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) - version_info::Channel channel = chrome::GetChannel(); diff --git a/www/chromium/files/patch-chrome_app_mash_embedded_services.cc b/www/chromium/files/patch-chrome_app_mash_embedded_services.cc new file mode 100644 index 0000000..e184179 --- /dev/null +++ b/www/chromium/files/patch-chrome_app_mash_embedded_services.cc @@ -0,0 +1,27 @@ +--- chrome/app/mash/embedded_services.cc.orig 2017-08-01 23:40:39.943252000 +0200 ++++ chrome/app/mash/embedded_services.cc 2017-08-01 23:42:02.268143000 +0200 +@@ -24,9 +24,9 @@ + #include "ash/touch_hud/mus/touch_hud_application.h" // nogncheck + #endif // defined(OS_CHROMEOS) + +-#if defined(OS_LINUX) && !defined(OS_ANDROID) ++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_ANDROID) + #include "components/font_service/font_service_app.h" +-#endif // defined(OS_LINUX) && !defined(OS_ANDROID) ++#endif // (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_ANDROID) + + std::unique_ptr CreateEmbeddedMashService( + const std::string& service_name) { +@@ -53,10 +53,10 @@ + return base::MakeUnique(); + if (service_name == "test_ime_driver") + return base::MakeUnique(); +-#if defined(OS_LINUX) && !defined(OS_ANDROID) ++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_ANDROID) + if (service_name == "font_service") + return base::MakeUnique(); +-#endif // defined(OS_LINUX) && !defined(OS_ANDROID) ++#endif // (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_ANDROID) + + return nullptr; + } diff --git a/www/chromium/files/patch-chrome_app_mash_mash__runner.cc b/www/chromium/files/patch-chrome_app_mash_mash__runner.cc deleted file mode 100644 index f548004..0000000 --- a/www/chromium/files/patch-chrome_app_mash_mash__runner.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/app/mash/mash_runner.cc.orig 2017-06-05 19:03:01 UTC -+++ chrome/app/mash/mash_runner.cc -@@ -302,7 +302,7 @@ int MashMain() { - // TODO(sky): wire this up correctly. - service_manager::InitializeLogging(); - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - base::AtExitManager exit_manager; - #endif - diff --git a/www/chromium/files/patch-chrome_browser_devtools_devtools_eye_dropper.cc b/www/chromium/files/patch-chrome_browser_devtools_devtools_eye_dropper.cc new file mode 100644 index 0000000..528f450 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_devtools_devtools_eye_dropper.cc @@ -0,0 +1,11 @@ +--- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2017-08-01 23:43:54.195876000 +0200 ++++ chrome/browser/devtools/devtools_eye_dropper.cc 2017-08-01 23:44:16.153565000 +0200 +@@ -149,7 +149,7 @@ + // magnified projection only with centered hotspot. + // Mac Retina requires cursor to be > 120px in order to render smoothly. + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + const float kCursorSize = 63; + const float kDiameter = 63; + const float kHotspotOffset = 32; diff --git a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html index 11fe4b5..cb12426 100644 --- a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html +++ b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html @@ -1,24 +1,24 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2017-06-05 19:03:02 UTC -+++ chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -72,7 +72,7 @@ - aria-label="$i18n{themes}" +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2017-07-25 21:04:51.000000000 +0200 ++++ chrome/browser/resources/settings/appearance_page/appearance_page.html 2017-08-01 23:52:53.177262000 +0200 +@@ -73,7 +73,7 @@ + actionable aria-label="$i18n{themes}" aria-describedby="themesSecondary"> - + - + - + -