Index: www/qt5-webengine/Makefile =================================================================== --- www/qt5-webengine/Makefile +++ www/qt5-webengine/Makefile @@ -20,7 +20,6 @@ PORTNAME= webengine DISTVERSION= ${QT5_VERSION} -PORTREVISION= 13 CATEGORIES= www PKGNAMEPREFIX= qt5- @@ -30,7 +29,7 @@ BUILD_DEPENDS= bison:devel/bison \ ninja:devel/ninja \ yasm:devel/yasm \ - ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat + ${LOCALBASE}/include/linux/input.h:devel/evdev-proto LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ libdbus-1.so:devel/dbus \ libevent.so:devel/libevent \ @@ -48,7 +47,7 @@ libwebp.so:graphics/webp DISTINFO_FILE= ${.CURDIR}/distinfo -QT5_VERSION= 5.9.5 +QT5_VERSION= 5.12.0 OPTIONS_SINGLE= AUDIO OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO SNDIO @@ -56,10 +55,7 @@ AUDIO_DESC= Audio backend -# Need the alsa plugins to get sound at runtime, otherwise messages -# that the pcm_oss plugin can't be opened. ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib -ALSA_RUN_DEPENDS= alsa-plugins>=0:audio/alsa-plugins ALSA_VARS= QMAKE_CONFIGURE_ARGS+=-alsa ALSA_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-alsa PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio @@ -72,8 +68,9 @@ # We pass `norecursive' to USES=qmake because src/plugins/plugins.pro checks # whether webenginewidgets is available, which fails when qmake processes all # .pro files at once. -USES= gperf jpeg python:2.7,build pkgconfig \ +USES= gnome gperf jpeg python:2.7,build pkgconfig \ qmake:norecursive,outsource qt-dist:5,webengine shebangfix +USE_GL= gl USE_GNOME= glib20 libxml2 libxslt USE_QT= core declarative designer gui location network webchannel \ widgets buildtools_build qmake_build printsupport @@ -82,9 +79,9 @@ USE_LDCONFIG= ${QT_LIBDIR} +WITH_DEBUG= yes +QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg -no-webrtc -QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg - # We could just set it to an empty string as well. "all" does not account for # dependencies correctly in the generated Makefiles, use the right target here. ALL_TARGET= first @@ -106,13 +103,17 @@ NINJA_PATH="${LOCALBASE}/bin/ninja" \ PATH=${CONFIGURE_WRKSRC}/bin:${LOCALBASE}/bin:${PATH} MAKE_ENV+= CC="${CC}" CXX="${CXX}" \ - C_INCLUDE_PATH=${LOCALBASE}/include \ + C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include \ ${CONFIGURE_ENV} post-extract: # Install FreeBSD's freebsd.pri file. ${CP} ${FILESDIR}/freebsd.pri ${WRKSRC}/src/core/config/freebsd.pri + #@${CP} ${FILESDIR}/network_interfaces_freebsd.cc \ + ${WRKSRC}/src/3rdparty/chromium/net/base + #@${CP} ${FILESDIR}/network_interfaces_freebsd.h \ + ${WRKSRC}/src/3rdparty/chromium/net/base post-extract-SNDIO-on: @cd ${WRKSRC}/src/3rdparty/chromium/media/audio && ${MKDIR} sndio openbsd Index: www/qt5-webengine/distinfo =================================================================== --- www/qt5-webengine/distinfo +++ www/qt5-webengine/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1526203565 -SHA256 (KDE/Qt/5.9.5/qtwebengine-opensource-src-5.9.5.tar.xz) = 70d26db4e7944291c5f843b875916fb95ceec0f0a8fea3daea8004990199fc07 -SIZE (KDE/Qt/5.9.5/qtwebengine-opensource-src-5.9.5.tar.xz) = 216767300 +TIMESTAMP = 1544686811 +SHA256 (KDE/Qt/5.12.0/qtwebengine-everywhere-src-5.12.0.tar.xz) = bd581e390a30e0f74d41b0e3334b3cf612dd4af23de36a3bf5931d5b4453687c +SIZE (KDE/Qt/5.12.0/qtwebengine-everywhere-src-5.12.0.tar.xz) = 252044400 Index: www/qt5-webengine/files/audio_manager_openbsd.h =================================================================== --- www/qt5-webengine/files/audio_manager_openbsd.h +++ www/qt5-webengine/files/audio_manager_openbsd.h @@ -17,19 +17,18 @@ 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; bool HasAudioInputDevices() override; - void ShowAudioInputSettings() 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( @@ -49,8 +48,6 @@ const LogCallback& log_callback) override; protected: - ~AudioManagerOpenBSD() override; - AudioParameters GetPreferredOutputStreamParameters( const std::string& output_device_id, const AudioParameters& input_params) override; Index: www/qt5-webengine/files/audio_manager_openbsd.cc =================================================================== --- www/qt5-webengine/files/audio_manager_openbsd.cc +++ www/qt5-webengine/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" @@ -48,10 +46,6 @@ return true; } -void AudioManagerOpenBSD::ShowAudioInputSettings() { - NOTIMPLEMENTED(); -} - void AudioManagerOpenBSD::GetAudioInputDeviceNames( AudioDeviceNames* device_names) { DCHECK(device_names->empty()); @@ -63,6 +57,12 @@ AddDefaultDevice(device_names); } +#if defined(USE_SNDIO) +const char* AudioManagerOpenBSD::GetName() { + return "SNDIO"; +} +#endif + AudioParameters AudioManagerOpenBSD::GetInputStreamParameters( const std::string& device_id) { static const int kDefaultInputBufferSize = 1024; @@ -73,15 +73,12 @@ return AudioParameters( AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, - kDefaultSampleRate, 16, buffer_size); + kDefaultSampleRate, 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); @@ -133,10 +130,8 @@ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO; int sample_rate = kDefaultSampleRate; int buffer_size = kDefaultOutputBufferSize; - int bits_per_sample = 16; if (input_params.IsValid()) { sample_rate = input_params.sample_rate(); - bits_per_sample = input_params.bits_per_sample(); channel_layout = input_params.channel_layout(); buffer_size = std::min(buffer_size, input_params.frames_per_buffer()); } @@ -147,7 +142,7 @@ return AudioParameters( AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, bits_per_sample, buffer_size); + sample_rate, buffer_size); } AudioInputStream* AudioManagerOpenBSD::MakeInputStream( @@ -164,34 +159,17 @@ } #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 std::make_unique(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 std::make_unique(std::move(audio_thread), + audio_log_factory); #endif } Index: www/qt5-webengine/files/freebsd.pri =================================================================== --- www/qt5-webengine/files/freebsd.pri +++ www/qt5-webengine/files/freebsd.pri @@ -1,11 +1,12 @@ -include(desktop_linux.pri) +include(linux.pri) gn_args += disable_nacl=true \ enable_basic_printing=true \ enable_print_preview=true \ enable_webrtc=false \ enable_hidpi=true \ - use_dbus=true + use_dbus=true \ + use_udev=false # Once the port works better, we can think about readding the diverse `use_system_` # for bundled libraries. Index: www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 =================================================================== --- www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 +++ /dev/null @@ -1,86 +0,0 @@ -Fix build with ffmpeg-4.x - -Obtained from: -https://git.archlinux.org/svntogit/packages.git/tree/trunk/qtwebengine-ffmpeg4.patch?h=packages/qt5-webengine&id=421103a8798335f7788498e56b5eef3f33ecba26 - ---- src/3rdparty/chromium/media/base/decoder_buffer.h.orig 2018-01-15 11:39:43 UTC -+++ src/3rdparty/chromium/media/base/decoder_buffer.h -@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer - : public base::RefCountedThreadSafe { - public: - enum { -- kPaddingSize = 32, -+ kPaddingSize = 64, - #if defined(ARCH_CPU_ARM_FAMILY) - kAlignmentSize = 16 - #else ---- src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.orig 2018-01-15 11:39:43 UTC -+++ src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc -@@ -30,10 +30,10 @@ EncryptionScheme GetEncryptionScheme(const AVStream* s - - } // namespace - --// Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are -+// Why AV_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are - // padded. Check here to ensure FFmpeg only receives data padded to its - // specifications. --static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE, -+static_assert(DecoderBuffer::kPaddingSize >= AV_INPUT_BUFFER_PADDING_SIZE, - "DecoderBuffer padding size does not fit ffmpeg requirement"); - - // Alignment requirement by FFmpeg for input and output buffers. This need to -@@ -429,11 +429,11 @@ void AudioDecoderConfigToAVCodecContext(const AudioDec - } else { - codec_context->extradata_size = config.extra_data().size(); - codec_context->extradata = reinterpret_cast( -- av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE)); -+ av_malloc(config.extra_data().size() + AV_INPUT_BUFFER_PADDING_SIZE)); - memcpy(codec_context->extradata, &config.extra_data()[0], - config.extra_data().size()); - memset(codec_context->extradata + config.extra_data().size(), '\0', -- FF_INPUT_BUFFER_PADDING_SIZE); -+ AV_INPUT_BUFFER_PADDING_SIZE); - } - } - -@@ -561,11 +561,11 @@ void VideoDecoderConfigToAVCodecContext( - } else { - codec_context->extradata_size = config.extra_data().size(); - codec_context->extradata = reinterpret_cast( -- av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE)); -+ av_malloc(config.extra_data().size() + AV_INPUT_BUFFER_PADDING_SIZE)); - memcpy(codec_context->extradata, &config.extra_data()[0], - config.extra_data().size()); - memset(codec_context->extradata + config.extra_data().size(), '\0', -- FF_INPUT_BUFFER_PADDING_SIZE); -+ AV_INPUT_BUFFER_PADDING_SIZE); - } - } - ---- src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc.orig 2018-01-15 11:39:43 UTC -+++ src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -@@ -53,7 +53,7 @@ static void ReleaseAudioBufferImpl(void* opaque, uint8 - // AVCodecContext.opaque to get the object reference in order to call - // GetAudioBuffer() to do the actual allocation. - static int GetAudioBuffer(struct AVCodecContext* s, AVFrame* frame, int flags) { -- DCHECK(s->codec->capabilities & CODEC_CAP_DR1); -+ DCHECK(s->codec->capabilities & AV_CODEC_CAP_DR1); - DCHECK_EQ(s->codec_type, AVMEDIA_TYPE_AUDIO); - - // Since this routine is called by FFmpeg when a buffer is required for audio ---- src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc.orig 2018-01-15 11:39:43 UTC -+++ src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc -@@ -415,12 +415,11 @@ bool FFmpegVideoDecoder::ConfigureDecoder(bool low_del - codec_context_->thread_type = - FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME); - codec_context_->opaque = this; -- codec_context_->flags |= CODEC_FLAG_EMU_EDGE; - codec_context_->get_buffer2 = GetVideoBufferImpl; - codec_context_->refcounted_frames = 1; - - if (decode_nalus_) -- codec_context_->flags2 |= CODEC_FLAG2_CHUNKS; -+ codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; - - AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); - if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { Index: www/qt5-webengine/files/patch-clang =================================================================== --- www/qt5-webengine/files/patch-clang +++ www/qt5-webengine/files/patch-clang @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/base/strings/safe_sprintf_unittest.cc.orig 2016-10-06 04:02:08.000000000 +0300 -+++ src/3rdparty/chromium/base/strings/safe_sprintf_unittest.cc 2016-10-25 21:42:28.951114000 +0300 -@@ -728,6 +728,7 @@ +--- src/3rdparty/chromium/base/strings/safe_sprintf_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/strings/safe_sprintf_unittest.cc +@@ -730,6 +730,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { } - + TEST(SafeSPrintfTest, EmitNULL) { +/* Avoid compiler error: http://pastebin.com/1edWUE84 char buf[40]; #if defined(__GNUC__) #pragma GCC diagnostic push -@@ -739,6 +740,7 @@ +@@ -741,6 +742,7 @@ TEST(SafeSPrintfTest, EmitNULL) { EXPECT_EQ("0x0", std::string(buf)); EXPECT_EQ(6, SafeSPrintf(buf, "%s", NULL)); EXPECT_EQ("", std::string(buf)); @@ -16,9 +16,9 @@ #if defined(__GCC__) #pragma GCC diagnostic pop #endif ---- src/3rdparty/chromium/base/threading/thread_local_storage_unittest.cc 2015-04-15 00:18:48.000000000 +0200 -+++ src/3rdparty/chromium/base/threading/thread_local_storage_unittest.cc 2015-04-18 21:45:40.000000000 +0200 -@@ -60,7 +60,7 @@ +--- src/3rdparty/chromium/base/threading/thread_local_storage_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/threading/thread_local_storage_unittest.cc +@@ -86,7 +86,7 @@ class ThreadLocalStorageRunner : public DelegateSimple void ThreadLocalStorageCleanup(void *value) { int *ptr = reinterpret_cast(value); // Destructors should never be called with a NULL. @@ -27,74 +27,29 @@ if (*ptr == kFinalTlsValue) return; // We've been called enough times. ASSERT_LT(kFinalTlsValue, *ptr); ---- src/3rdparty/chromium/base/tracked_objects.cc 2015-04-15 00:31:20.000000000 +0200 -+++ src/3rdparty/chromium/base/tracked_objects.cc 2015-04-18 21:57:33.000000000 +0200 -@@ -425,7 +425,7 @@ - } - // We must NOT do any allocations during this callback. - // Using the simple linked lists avoids all allocations. -- DCHECK_EQ(this->next_retired_worker_, reinterpret_cast(NULL)); -+ DCHECK_EQ(this->next_retired_worker_, static_cast(NULL)); - this->next_retired_worker_ = first_retired_worker_; - first_retired_worker_ = this; - } ---- src/3rdparty/chromium/base/tracked_objects_unittest.cc.orig 2015-08-22 15:01:51.000000000 -0400 -+++ src/3rdparty/chromium/base/tracked_objects_unittest.cc 2015-09-03 09:20:53.370191000 -0400 -@@ -58,9 +58,9 @@ - Births* birth = ThreadData::TallyABirthIfActive(location); - - if (ThreadData::status() == ThreadData::DEACTIVATED) -- EXPECT_EQ(reinterpret_cast(NULL), birth); -+ EXPECT_EQ(static_cast(NULL), birth); - else -- EXPECT_NE(reinterpret_cast(NULL), birth); -+ EXPECT_NE(static_cast(NULL), birth); - } - - // Helper function to verify the most common test expectations. ---- src/3rdparty/chromium/media/audio/audio_output_proxy_unittest.cc 2015-04-15 00:18:55.000000000 +0200 -+++ src/3rdparty/chromium/media/audio/audio_output_proxy_unittest.cc 2015-04-18 22:02:38.000000000 +0200 -@@ -387,7 +387,7 @@ +--- src/3rdparty/chromium/media/audio/audio_output_proxy_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/media/audio/audio_output_proxy_unittest.cc +@@ -410,7 +410,7 @@ class AudioOutputProxyTest : public testing::Test { // |stream| is closed at this point. Start() should reopen it again. - EXPECT_CALL(manager(), MakeAudioOutputStream(_, _)) + EXPECT_CALL(manager(), MakeAudioOutputStream(_, _, _)) .Times(2) - .WillRepeatedly(Return(reinterpret_cast(NULL))); + .WillRepeatedly(Return(static_cast(NULL))); - - EXPECT_CALL(callback_, OnError(_)) - .Times(2); ---- src/3rdparty/chromium/third_party/hunspell/src/hunspell/affentry.hxx.orig 2015-07-21 18:46:37.322427000 -0400 -+++ src/3rdparty/chromium/third_party/hunspell/src/hunspell/affentry.hxx 2015-07-21 18:48:02.034251000 -0400 -@@ -27,7 +27,7 @@ - struct hentry * checkword(const char * word, int len, char in_compound, - const FLAG needflag = FLAG_NULL); - -- struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL); -+ struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = 0); - - char * check_morph(const char * word, int len, char in_compound, - const FLAG needflag = FLAG_NULL); -@@ -90,7 +90,7 @@ - // const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, char in_compound=IN_CPD_NOT); - const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, const FLAG badflag = 0); - -- struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL); -+ struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = 0); - - char * check_twosfx_morph(const char * word, int len, int optflags, - PfxEntry* ppfx, const FLAG needflag = FLAG_NULL); ---- src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc 2015-04-15 00:31:48.000000000 +0200 -+++ src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc 2015-04-18 22:05:41.000000000 +0200 -@@ -439,7 +439,7 @@ + + EXPECT_CALL(callback_, OnError()).Times(2); + +--- src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc +@@ -439,7 +439,7 @@ CMapTable::CMapFormat0::Builder::Builder( } - + CMapTable::CMapFormat0::Builder::Builder(const CMapId& cmap_id) - : CMap::Builder(reinterpret_cast(NULL), + : CMap::Builder(static_cast(NULL), CMapFormat::kFormat0, cmap_id) { } -@@ -563,7 +563,7 @@ +@@ -563,7 +563,7 @@ CMapTable::CMapFormat2::Builder::Builder(WritableFontD : CMapTable::CMap::Builder(data ? down_cast( data->Slice(offset, data->ReadUShort( offset + Offset::kFormat0Length))) @@ -103,7 +58,7 @@ CMapFormat::kFormat2, cmap_id) { // TODO(arthurhsu): FIXIT: heavy lifting and leak, need fix. } -@@ -574,7 +574,7 @@ +@@ -574,7 +574,7 @@ CMapTable::CMapFormat2::Builder::Builder(ReadableFontD : CMapTable::CMap::Builder(data ? down_cast( data->Slice(offset, data->ReadUShort( offset + Offset::kFormat0Length))) @@ -112,32 +67,21 @@ CMapFormat::kFormat2, cmap_id) { // TODO(arthurhsu): FIXIT: heavy lifting and leak, need fix. } -@@ -958,7 +958,7 @@ +@@ -958,7 +958,7 @@ CMapTable::CMapFormat4::Builder::Builder(WritableFontD CMapTable::CMapFormat4::Builder::Builder(SegmentList* segments, - IntegerList* glyph_id_array, + std::vector* glyph_id_array, const CMapId& cmap_id) - : CMap::Builder(reinterpret_cast(NULL), + : CMap::Builder(static_cast(NULL), CMapFormat::kFormat4, cmap_id), segments_(segments->begin(), segments->end()), glyph_id_array_(glyph_id_array->begin(), glyph_id_array->end()) { -@@ -966,7 +966,7 @@ +@@ -966,7 +966,7 @@ CMapTable::CMapFormat4::Builder::Builder(SegmentList* } - + CMapTable::CMapFormat4::Builder::Builder(const CMapId& cmap_id) - : CMap::Builder(reinterpret_cast(NULL), + : CMap::Builder(static_cast(NULL), CMapFormat::kFormat4, cmap_id) { } - ---- src/3rdparty/chromium/third_party/webrtc/base/taskrunner.cc 2015-04-15 00:32:17.000000000 +0200 -+++ src/3rdparty/chromium/third_party/webrtc/base/taskrunner.cc 2015-04-18 22:10:53.000000000 +0200 -@@ -102,7 +102,7 @@ - std::vector::iterator it; - it = std::remove(tasks_.begin(), - tasks_.end(), -- reinterpret_cast(NULL)); -+ static_cast(NULL)); - - tasks_.erase(it, tasks_.end()); - + Index: www/qt5-webengine/files/patch-config.tests-enable-on-FreeBSD =================================================================== --- www/qt5-webengine/files/patch-config.tests-enable-on-FreeBSD +++ /dev/null @@ -1,15 +0,0 @@ ---- config.tests/khr/khr.pro.orig 2017-04-19 08:32:39 UTC -+++ config.tests/khr/khr.pro -@@ -3,4 +3,4 @@ - - CONFIG-=qt - --linux:SOURCES += khr.cpp -+SOURCES += khr.cpp ---- config.tests/snappy/snappy.pro.orig 2017-04-11 14:08:45 UTC -+++ config.tests/snappy/snappy.pro -@@ -1,3 +1,3 @@ --linux:SOURCES += snappy.cpp -+SOURCES += snappy.cpp - LIBS += -lsnappy - CONFIG -= qt Index: www/qt5-webengine/files/patch-config.tests_khr_khr.pro =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-config.tests_khr_khr.pro @@ -0,0 +1,8 @@ +--- config.tests/khr/khr.pro.orig 2018-11-27 04:10:38 UTC ++++ config.tests/khr/khr.pro +@@ -3,4 +3,4 @@ + + CONFIG-=qt + +-linux:SOURCES += khr.cpp ++unix:SOURCES += khr.cpp Index: www/qt5-webengine/files/patch-config.tests_snappy_snappy.pro =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-config.tests_snappy_snappy.pro @@ -0,0 +1,7 @@ +--- config.tests/snappy/snappy.pro.orig 2018-11-27 04:10:38 UTC ++++ config.tests/snappy/snappy.pro +@@ -1,3 +1,3 @@ +-linux:SOURCES += snappy.cpp ++unix:SOURCES += snappy.cpp + LIBS += -lsnappy + CONFIG -= qt Index: www/qt5-webengine/files/patch-configure.json =================================================================== --- www/qt5-webengine/files/patch-configure.json +++ /dev/null @@ -1,33 +0,0 @@ ---- configure.json.orig 2018-04-10 14:50:39 UTC -+++ configure.json -@@ -16,6 +16,7 @@ - "printing-and-pdf": "boolean", - "proprietary-codecs": "boolean", - "pulseaudio": "boolean", -+ "sndio": "boolean", - "spellchecker": "boolean", - "webrtc": "boolean" - } -@@ -113,6 +114,10 @@ - "condition": "libs.pulseaudio", - "output": [ "privateFeature" ] - }, -+ "sndio": { -+ "label": "sndio", -+ "output": [ "privateFeature" ] -+ }, - "pepper-plugins": { - "label": "Pepper Plugins", - "purpose": "Enables use of Pepper Flash and Widevine plugins.", -@@ -218,6 +223,11 @@ - { - "type": "feature", - "args": "pulseaudio", -+ "condition": "config.unix" -+ }, -+ { -+ "type": "feature", -+ "args": "sndio", - "condition": "config.unix" - }, - { Index: www/qt5-webengine/files/patch-configure.pri =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-configure.pri @@ -0,0 +1,14 @@ +--- configure.pri.orig 2018-11-27 04:10:38 UTC ++++ configure.pri +@@ -85,9 +85,9 @@ defineTest(qtConfTest_detectFlex) { + } + + defineTest(qtConfTest_detectGlibc) { +- ldd = $$qtConfFindInPath("ldd") ++ ldd = $$qtConfFindInPath("ld.bfd") + !isEmpty(ldd) { +- qtLog("Found ldd from path: $$ldd") ++ qtLog("Found ld.bfd from path: $$ldd") + qtRunLoggedCommand("$$ldd --version", version)|return(true) + version ~= 's/^.*[^0-9]\([0-9]*\.[0-9]*\).*$/\1/' + version = $$first(version) Index: www/qt5-webengine/files/patch-mkspecs_features_configure.prf =================================================================== --- www/qt5-webengine/files/patch-mkspecs_features_configure.prf +++ www/qt5-webengine/files/patch-mkspecs_features_configure.prf @@ -1,20 +1,34 @@ ---- mkspecs/features/configure.prf.orig 2017-04-19 08:37:44 UTC +--- mkspecs/features/configure.prf.orig 2018-11-27 04:10:38 UTC +++ mkspecs/features/configure.prf -@@ -4,7 +4,7 @@ load(functions) +@@ -22,7 +22,7 @@ defineTest(runConfigure) { + return(false) + } - defineTest(runConfigure) { - webengine_successfully_configured: return(true) - linux:contains(QT_CONFIG,no-pkg-config) { + unix:contains(QT_CONFIG,no-pkg-config) { skipBuild("pkg-config is required") return(false) } -@@ -53,7 +53,7 @@ defineTest(runConfigure) { - qtConfig(embedded): WEBENGINE_CONFIG += reduce_binary_size +@@ -64,17 +64,17 @@ defineTest(runConfigure) { + return(false); } - linux { + unix { + + !qtConfig(webengine-host-pkg-config) { + skipBuild("Host pkg-config is required") + return(false) + } + +- !qtConfig(webengine-system-glibc) { +- skipBuild("A suitable version of libc could not be found. See: https://sourceware.org/bugzilla/show_bug.cgi?id=14898") +- return(false) +- } ++ #!qtConfig(webengine-system-glibc) { ++ # skipBuild("A suitable version of libc could not be found. See: https://sourceware.org/bugzilla/show_bug.cgi?id=14898") ++ # return(false) ++ #} + QT_FOR_CONFIG += gui-private - !config_khr:skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)") Index: www/qt5-webengine/files/patch-mkspecs_features_functions.prf =================================================================== --- www/qt5-webengine/files/patch-mkspecs_features_functions.prf +++ www/qt5-webengine/files/patch-mkspecs_features_functions.prf @@ -1,26 +1,14 @@ -Include the freebsd.pri file provided by the port, to pass FreeBSD specific -settings to gn. - ---- mkspecs/features/functions.prf.orig +--- mkspecs/features/functions.prf.orig 2018-11-27 04:10:38 UTC +++ mkspecs/features/functions.prf -@@ -15,7 +15,7 @@ - - defineTest(isPlatformSupported) { - QT_FOR_CONFIG += gui-private -- linux { -+ unix { - if(!gcc:!clang)|intel_icc { - skipBuild("Qt WebEngine on Linux requires clang or GCC.") - return(false) -@@ -367,6 +367,7 @@ - } +@@ -80,6 +80,7 @@ defineReplace(gnArgs) { + linux: include($$QTWEBENGINE_ROOT/src/core/config/linux.pri) macos: include($$QTWEBENGINE_ROOT/src/core/config/mac_osx.pri) win32: include($$QTWEBENGINE_ROOT/src/core/config/windows.pri) + freebsd: include($$QTWEBENGINE_ROOT/src/core/config/freebsd.pri) isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.) return($$gn_args) } -@@ -386,6 +387,7 @@ +@@ -99,6 +100,7 @@ defineReplace(gnOS) { macos: return(mac) win32: return(win) linux: return(linux) Index: www/qt5-webengine/files/patch-mkspecs_features_platform.prf =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-mkspecs_features_platform.prf @@ -0,0 +1,11 @@ +--- mkspecs/features/platform.prf.orig 2018-11-27 04:10:38 UTC ++++ mkspecs/features/platform.prf +@@ -11,7 +11,7 @@ defineTest(isQtMinimum) { + + defineTest(isPlatformSupported) { + QT_FOR_CONFIG += gui-private +- linux { ++ unix { + if(!gcc:!clang)|intel_icc { + skipBuild("Qt WebEngine on Linux requires clang or GCC.") + return(false) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_BUILD.gn @@ -1,61 +1,32 @@ ---- src/3rdparty/chromium/BUILD.gn.orig 2017-06-20 05:10:02.000000000 -0400 -+++ src/3rdparty/chromium/BUILD.gn 2017-12-15 16:23:27.924636000 -0500 -@@ -218,7 +218,7 @@ - ] +--- src/3rdparty/chromium/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/BUILD.gn +@@ -356,7 +356,7 @@ group("gn_all") { + [ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ] } -- if (!is_ios && !is_android && !is_chromecast) { -+ if (!is_ios && !is_android && !is_bsd && !is_chromecast) { +- if (is_linux || is_android) { ++ if ((is_linux && !is_bsd) || is_android) { deps += [ - "//chrome", - "//chrome/test:browser_tests", -@@ -286,7 +286,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. - deps += [ -@@ -336,7 +336,7 @@ - "//third_party/catapult/telemetry:bitmaptools($host_toolchain)", - ] - } -- } else { -+ } else if (!is_bsd) { - deps += [ "//ios:all" ] - } - -@@ -504,18 +504,23 @@ + "//third_party/breakpad:breakpad_unittests", + "//third_party/breakpad:core-2-minidump", +@@ -391,15 +391,13 @@ group("gn_all") { ] } - if (is_linux) { -- # The following are definitely linux-only. + if (is_linux || is_bsd) { -+ # The following are definitely? linux-only. + # The following are definitely linux-only. deps += [ - "//chrome:manpage", "//chrome:xdg_mime", "//net:disk_cache_memory_test", "//net:quic_client", "//net:quic_server", - "//sandbox/linux:chrome_sandbox", - "//sandbox/linux:sandbox_linux_unittests", + "//testing:empty_main", ] -+ if (is_linux) { -+ deps += [ -+ "//sandbox/linux:chrome_sandbox", -+ "//sandbox/linux:sandbox_linux_unittests", -+ ] -+ } -+ - if (use_dbus) { - deps += [ - "//dbus:dbus_test_server", -@@ -533,7 +538,7 @@ +@@ -416,7 +414,7 @@ group("gn_all") { } } @@ -63,8 +34,19 @@ + if (is_ios || is_win || is_bsd || (is_linux && !is_chromeos)) { deps += [ "//base:base_i18n_perftests", - "//base:base_perftests", -@@ -612,7 +617,7 @@ + "//google_apis:google_apis_unittests", +@@ -456,10 +454,6 @@ group("gn_all") { + "//chrome/test/chromedriver:chromedriver", + "//chrome/test/chromedriver:chromedriver_tests", + "//components/sync:run_sync_testserver", +- "//courgette:courgette", +- "//courgette:courgette_fuzz", +- "//courgette:courgette_minimal_tool", +- "//courgette:courgette_unittests", + "//media/cast:generate_barcode_video", + "//media/cast:generate_timecode_audio", + "//net:crash_cache", +@@ -489,7 +483,7 @@ group("gn_all") { if (enable_nacl) { deps += [ "//components/nacl/loader:nacl_loader_unittests" ] @@ -73,44 +55,53 @@ # TODO(dpranke): Figure out what platforms should actually have this. deps += [ "//components/nacl/loader:nacl_helper" ] -@@ -722,7 +727,7 @@ - deps += - [ "//chrome/installer/mini_installer:next_version_mini_installer" ] +@@ -515,10 +509,6 @@ group("gn_all") { + "//mojo:mojo_perftests", + "//services/service_manager/public/cpp", + "//testing/gmock:gmock_main", +- "//third_party/breakpad:dump_syms($host_toolchain)", +- "//third_party/breakpad:microdump_stackwalk($host_toolchain)", +- "//third_party/breakpad:minidump_dump($host_toolchain)", +- "//third_party/breakpad:minidump_stackwalk($host_toolchain)", + ] + + if (!is_android) { +@@ -595,7 +585,7 @@ group("gn_all") { + host_os == "win" && !use_qt) { + deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] } -- } else if (!is_android && !is_ios) { -+ } else if (!is_android && !is_ios && !is_bsd) { - deps += [ "//breakpad:symupload($host_toolchain)" ] +- } else if (!is_android && !is_ios && !is_fuchsia) { ++ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { + deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] } -@@ -787,7 +792,7 @@ - } +@@ -648,7 +638,7 @@ group("gn_all") { + deps += [ "//third_party/perfetto:all" ] } - if (is_linux && !is_chromeos && !is_chromecast) { -+ if ((is_linux || is_bsd) && !is_chromeos && !is_chromecast) { ++ if (is_bsd || (is_linux && !is_chromeos && !is_chromecast)) { # TODO(GYP): Figure out if any of these should be in gn_all # and figure out how cross-platform they are deps += [ -@@ -840,7 +845,7 @@ - ] +@@ -685,7 +675,7 @@ group("gn_all") { + } if (target_cpu == "x86" || target_cpu == "x64") { - if (!is_android) { + if (!is_android && !is_bsd) { deps += [ "//chrome/test:load_library_perf_tests" ] - if (use_qt) { - deps -= [ "//chrome/test:load_library_perf_tests" ] -@@ -851,7 +856,7 @@ - "//third_party/libjpeg_turbo:simd_asm", - ] + } + if (enable_nacl) { +@@ -693,13 +683,13 @@ group("gn_all") { + } + deps += [ "//third_party/libjpeg_turbo:simd_asm" ] } - if (is_linux && current_toolchain == host_toolchain) { + if ((is_linux || is_bsd) && current_toolchain == host_toolchain) { deps += [ "//v8:v8_shell" ] } } -@@ -861,7 +866,7 @@ - } if ((is_linux && !is_chromeos && !is_chromecast) || (is_win && use_drfuzz) || - (use_libfuzzer && is_mac)) { @@ -118,57 +109,57 @@ deps += [ "//testing/libfuzzer/fuzzers", "//testing/libfuzzer/tests:libfuzzer_tests", -@@ -904,7 +909,7 @@ +@@ -821,7 +811,6 @@ if (is_chromeos) { + "//ppapi/examples/video_decode", + "//sandbox/linux:chrome_sandbox", + "//sandbox/linux:sandbox_linux_unittests", +- "//third_party/breakpad:minidump_stackwalk($host_toolchain)", - group("gn_mojo_targets") { - testonly = true -- if (is_linux && !is_chromeos) { -+ if (is_bsd || (is_linux && !is_chromeos)) { - # TODO(GYP): Figure out if any of these should be in gn_all - # and figure out how cross-platform they are - deps = [ -@@ -930,7 +935,7 @@ + # Blocked on https://github.com/catapult-project/catapult/issues/2297 + #"//third_party/catapult/telemetry:bitmaptools", +@@ -870,7 +859,7 @@ group("gn_visibility") { } } --if (!is_ios) { -+if (!is_ios || !is_bsd) { +-if (!is_ios && !use_qt) { ++if (!is_ios && !use_qt && !is_bsd) { # This group includes all of the targets needed to build and test Blink, # including running the layout tests (see below). group("blink_tests") { -@@ -976,7 +981,7 @@ - data_deps += [ "//content/shell:content_shell_crash_service" ] +@@ -944,7 +933,7 @@ if (!is_ios && !use_qt) { + ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { - data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ] + data_deps += + [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } - -@@ -984,7 +989,7 @@ - data_deps += [ "//breakpad:dump_syms($host_toolchain)" ] +@@ -953,7 +942,7 @@ if (!is_ios && !use_qt) { + data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux) { + if (is_linux && !is_bsd) { - data_deps += [ "//breakpad:dump_syms($host_toolchain)" ] + data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1006,7 +1011,7 @@ +@@ -1045,7 +1034,7 @@ if (!is_ios && !use_qt) { 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_chromecast && !is_fuchsia && !is_bsd) { data_deps = [ "//cc:cc_perftests", "//chrome/test:load_library_perf_tests", -@@ -1043,7 +1048,7 @@ - "//chrome/installer/mini_installer:mini_installer", - "//chrome/test:angle_perftests", - ] +@@ -1078,9 +1067,6 @@ group("chromium_builder_perf") { + + if (is_win) { + data_deps += [ "//chrome/installer/mini_installer:mini_installer" ] - } else { -+ } else if (!is_bsd) { - data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ] +- data_deps += +- [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } - } + if (is_win || is_android) { + data_deps += [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_BUILD.gn @@ -1,83 +1,102 @@ ---- src/3rdparty/chromium/base/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/BUILD.gn -@@ -1076,6 +1076,35 @@ component("base") { - public_deps += [ "//base/allocator:unified_allocator_shim" ] +@@ -1210,6 +1210,10 @@ jumbo_component("base") { + "debug/elf_reader_linux.h", + ] + } ++ ++ if (is_bsd) { ++ sources += [ "base_paths_posix.cc", ] ++ } } + all_dependent_configs = [] +@@ -1248,7 +1252,7 @@ jumbo_component("base") { + # Needed for if using newer C++ library than sysroot, except if + # building inside the cros_sdk environment - use host_toolchain as a + # more robust check for this. +- if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt)) && ++ if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt) && !is_clang) && + host_toolchain != "//build/toolchain/cros:host") { + libs += [ "atomic" ] + } +@@ -1276,6 +1280,9 @@ jumbo_component("base") { + deps += [ "//base/allocator:tcmalloc" ] + } else if (is_linux && 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_libc.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", +@@ -1688,7 +1695,7 @@ jumbo_component("base") { + "//base/third_party/xdg_user_dirs", + ] + } else { +- # Non-Linux. ++ # Non-Linux/BSD. + sources -= [ + "nix/mime_util_xdg.cc", + "nix/mime_util_xdg.h", +@@ -1704,6 +1711,47 @@ jumbo_component("base") { + } + } + + if (is_bsd) { + sources -= [ -+ "files/file_util_linux.cc", + "files/file_path_watcher_linux.cc", ++ "files/file_util_linux.cc", ++ "process/memory_linux.cc", + "process/process_linux.cc", ++ "process/process_handle_linux.cc", + "process/process_iterator_linux.cc", + "process/process_metrics_linux.cc", -+ "process/process_handle_linux.cc", -+ "sys_info_linux.cc", -+ "trace_event/malloc_dump_provider.cc", -+ "trace_event/malloc_dump_provider.h", -+ "debug/proc_maps_linux.cc", -+ "debug/proc_maps_linux.h", ++ "sys_info_linux.cc" + ] + sources += [ ++ "files/file_path_watcher_kqueue.cc", ++ "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_stub.cc", ++ "process/memory_stubs.cc", + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "sys_info_freebsd.cc", ++ #YYY ++ "nix/mime_util_xdg.cc", ++ "nix/mime_util_xdg.h", ++ "nix/xdg_util.cc", ++ "nix/xdg_util.h", ++ # Required for debug build? ++ "linux_util.cc", ++ "linux_util.h", ++ #"threading/platform_thread_linux.cc", + ] ++ #YYY ++ deps += [ ++ "//base/third_party/xdg_mime", ++ "//base/third_party/xdg_user_dirs", ++ ] + libs = [ + "execinfo", # logging.cc + "kvm" # process_metrics_freebsd + ] + } + -+ -+ - # Allow more direct string conversions on platforms with native utf8 - # strings - if (is_mac || is_ios || is_chromeos || is_chromecast) { -@@ -1347,7 +1376,7 @@ component("base") { - } - - # Linux. -- if (is_linux) { -+ if (is_linux || is_bsd) { - if (is_asan || is_lsan || is_msan || is_tsan) { - # For llvm-sanitizer. - data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ] -@@ -1372,7 +1401,7 @@ component("base") { - "//base/third_party/xdg_user_dirs", - ] - } else { -- # Non-Linux. -+ # Non-Linux/BSD. - sources -= [ - "nix/mime_util_xdg.cc", - "nix/mime_util_xdg.h", -@@ -1388,6 +1417,13 @@ component("base") { - } - } - -+ if (is_bsd) { -+ sources -= [ -+ "threading/platform_thread_linux.cc", -+ ] -+ sources += [ "threading/platform_thread_freebsd.cc" ] -+ } -+ # iOS if (is_ios) { set_sources_assignment_filter([]) -@@ -2154,6 +2190,12 @@ test("base_unittests") { +@@ -2693,6 +2741,12 @@ test("base_unittests") { + ] set_sources_assignment_filter(sources_assignment_filter) } - -+ if (is_bsd) { -+ sources -= [ -+ "debug/proc_maps_linux_unittest.cc", -+ ] -+ } + ++ if (is_bsd) { ++ sources -= [ ++ "debug/proc_maps_linux_unittest.cc", ++ ] ++ } + if (is_win) { deps += [ "//base:scoped_handle_test_dll" ] - if (current_cpu == "x64") { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base__trace_event__process_memory_dump.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base__trace_event__process_memory_dump.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base__trace_event__process_memory_dump.h @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/base/trace_event/process_memory_dump.h.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/base/trace_event/process_memory_dump.h -@@ -24,7 +24,7 @@ - - // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the - // resident memory. --#if (defined(OS_POSIX) && !defined(OS_NACL)) || defined(OS_WIN) -+#if (defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_BSD)) || defined(OS_WIN) - #define COUNT_RESIDENT_BYTES_SUPPORTED - #endif - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_BUILD.gn +++ /dev/null @@ -1,12 +0,0 @@ ---- src/3rdparty/chromium/base/allocator/BUILD.gn.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/base/allocator/BUILD.gn -@@ -338,6 +338,9 @@ if (use_experimental_allocator_shim) { - ] - } else if (is_linux && use_allocator == "none") { - sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] -+ } else if (is_bsd && use_allocator == "none") { -+ # TODO move the code to allocator_shim_default_dispatch_to_libc.cc" -+ sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] - } else if (is_android && use_allocator == "none") { - sources += [ - "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/allocator/allocator_shim.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/allocator/allocator_shim.cc +@@ -69,7 +69,7 @@ inline const allocator::AllocatorDispatch* GetChainHea + // Unfortunately due to that bug NoBarrier_Load() is mistakenly fully + // barriered on Linux+Clang, and that causes visible perf regressons. + return reinterpret_cast( +-#if defined(OS_LINUX) && defined(__clang__) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(__clang__) + *static_cast(&g_chain_head) + #else + subtle::NoBarrier_Load(&g_chain_head) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc @@ -1,10 +1,9 @@ ---- src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc -@@ -3,19 +3,28 @@ - // found in the LICENSE file. +@@ -4,18 +4,28 @@ #include "base/allocator/allocator_shim.h" -- + -#include +#include +#include @@ -37,32 +36,41 @@ } // extern "C" namespace { -@@ -23,23 +32,23 @@ namespace { +@@ -23,32 +33,32 @@ namespace { using base::allocator::AllocatorDispatch; - void* GlibcMalloc(const AllocatorDispatch*, size_t size) { + void* GlibcMalloc(const AllocatorDispatch*, size_t size, void* context) { - return __libc_malloc(size); + return __malloc(size); } - void* GlibcCalloc(const AllocatorDispatch*, size_t n, size_t size) { + void* GlibcCalloc(const AllocatorDispatch*, + size_t n, + size_t size, + void* context) { - return __libc_calloc(n, size); + return __calloc(n, size); } - void* GlibcRealloc(const AllocatorDispatch*, void* address, size_t size) { + void* GlibcRealloc(const AllocatorDispatch*, + void* address, + size_t size, + void* context) { - return __libc_realloc(address, size); + return __realloc(address, size); } - void* GlibcMemalign(const AllocatorDispatch*, size_t alignment, size_t size) { + void* GlibcMemalign(const AllocatorDispatch*, + size_t alignment, + size_t size, + void* context) { - return __libc_memalign(alignment, size); + return __memalign(alignment, size); } - void GlibcFree(const AllocatorDispatch*, void* address) { + void GlibcFree(const AllocatorDispatch*, void* address, void* context) { - __libc_free(address); + __free(address); } - size_t GlibcGetSizeEstimate(const AllocatorDispatch*, void* address) { + size_t GlibcGetSizeEstimate(const AllocatorDispatch*, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__unittest.cc @@ -1,61 +1,45 @@ ---- src/3rdparty/chromium/base/allocator/allocator_shim_unittest.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/allocator/allocator_shim_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/allocator/allocator_shim_unittest.cc -@@ -4,7 +4,6 @@ +@@ -29,7 +29,7 @@ + #include "base/allocator/allocator_interception_mac.h" + #include "base/mac/mac_util.h" + #include "third_party/apple_apsl/malloc.h" +-#else ++#elif !defined(OS_BSD) + #include + #endif - #include "base/allocator/allocator_shim.h" +@@ -294,7 +294,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { + ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u); + #endif // !OS_WIN --#include - #include - #include - -@@ -193,11 +192,13 @@ TEST_F(AllocatorShimTest, InterceptLibcS - ASSERT_GE(zero_allocs_intercepted_by_size[2 * 23], 1u); - - #if !defined(OS_WIN) -+#if !defined(OS_BSD) +-#if !defined(OS_WIN) && !defined(OS_MACOSX) ++#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) void* memalign_ptr = memalign(128, 53); ASSERT_NE(nullptr, memalign_ptr); ASSERT_EQ(0u, reinterpret_cast(memalign_ptr) % 128); - ASSERT_GE(aligned_allocs_intercepted_by_alignment[128], 1u); - ASSERT_GE(aligned_allocs_intercepted_by_size[53], 1u); -+#endif - - void* posix_memalign_ptr = nullptr; - int res = posix_memalign(&posix_memalign_ptr, 256, 59); -@@ -214,12 +215,14 @@ TEST_F(AllocatorShimTest, InterceptLibcS +@@ -307,7 +307,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u); - ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u); - -+#if !defined(OS_BSD) - void* pvalloc_ptr = pvalloc(67); - ASSERT_NE(nullptr, pvalloc_ptr); - ASSERT_EQ(0u, reinterpret_cast(pvalloc_ptr) % kPageSize); - ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u); // pvalloc rounds the size up to the next page. ASSERT_GE(aligned_allocs_intercepted_by_size[kPageSize], 1u); -+#endif - #endif // OS_WIN +-#endif // !OS_WIN && !OS_MACOSX ++#endif // !OS_WIN && !OS_MACOSX && !defined(OS_BSD) - char* realloc_ptr = static_cast(realloc(nullptr, 71)); -@@ -240,8 +243,10 @@ TEST_F(AllocatorShimTest, InterceptLibcS + char* realloc_ptr = static_cast(malloc(10)); + strcpy(realloc_ptr, "foobar"); +@@ -323,13 +323,13 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { + free(zero_alloc_ptr); ASSERT_GE(frees_intercepted_by_addr[Hash(zero_alloc_ptr)], 1u); - #if !defined(OS_WIN) -+#if !defined(OS_BSD) +-#if !defined(OS_WIN) && !defined(OS_MACOSX) ++#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) free(memalign_ptr); ASSERT_GE(frees_intercepted_by_addr[Hash(memalign_ptr)], 1u); -+#endif - free(posix_memalign_ptr); - ASSERT_GE(frees_intercepted_by_addr[Hash(posix_memalign_ptr)], 1u); -@@ -249,8 +254,10 @@ TEST_F(AllocatorShimTest, InterceptLibcS - free(valloc_ptr); - ASSERT_GE(frees_intercepted_by_addr[Hash(valloc_ptr)], 1u); - -+#if !defined(OS_BSD) free(pvalloc_ptr); ASSERT_GE(frees_intercepted_by_addr[Hash(pvalloc_ptr)], 1u); -+#endif - #endif // OS_WIN +-#endif // !OS_WIN && !OS_MACOSX ++#endif // !OS_WIN && !OS_MACOSX && !defined(OS_BSD) - free(realloc_ptr); + #if !defined(OS_WIN) + free(posix_memalign_ptr); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__unittest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_partition__allocator_partition__alloc__unittest.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_unittest.cc +@@ -1305,7 +1305,7 @@ TEST_F(PartitionAllocTest, LostFreePagesBug) { + #if !defined(OS_WIN) && \ + (!defined(ARCH_CPU_64_BITS) || \ + (defined(OS_POSIX) && \ +- !(defined(OS_FUCHSIA) || defined(OS_MACOSX) || defined(OS_ANDROID)))) ++ !(defined(OS_FUCHSIA) || defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_BSD)))) + + // The following four tests wrap a called function in an expect death statement + // to perform their test, because they are non-hermetic. Specifically they are Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__paths.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__paths.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/base_paths.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/base_paths.h +@@ -18,7 +18,7 @@ + #include "base/base_paths_android.h" + #endif + +-#if defined(OS_POSIX) || defined(OS_FUCHSIA) ++#if defined(OS_POSIX) || defined(OS_FUCHSIA) || defined(OS_BSD) + #include "base/base_paths_posix.h" + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__paths__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_base__paths__posix.cc @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/base/base_paths_posix.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/base_paths_posix.cc +@@ -102,6 +102,7 @@ bool PathProviderPosix(int key, FilePath* result) { + << "Try running from your chromium/src directory."; + return false; + } ++#if !defined(OS_BSD) + case DIR_USER_DESKTOP: + *result = nix::GetXDGUserDirectory("DESKTOP", "Desktop"); + return true; +@@ -112,6 +113,7 @@ bool PathProviderPosix(int key, FilePath* result) { + *result = cache_dir; + return true; + } ++#endif + } + return false; + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_debugger__posix.cc @@ -0,0 +1,57 @@ +--- src/3rdparty/chromium/base/debug/debugger_posix.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/debug/debugger_posix.cc +@@ -84,7 +84,7 @@ bool BeingDebugged() { + KERN_PROC, + KERN_PROC_PID, + getpid() +-#if defined(OS_OPENBSD) ++#if defined(OS_BSD) + , sizeof(struct kinfo_proc), + 0 + #endif +@@ -92,33 +92,37 @@ bool BeingDebugged() { + + // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and + // binary interfaces may change. +- struct kinfo_proc info; +- size_t info_size = sizeof(info); ++ struct kinfo_proc *info; ++ size_t info_size; + +-#if defined(OS_OPENBSD) + if (sysctl(mib, arraysize(mib), NULL, &info_size, NULL, 0) < 0) + return -1; + ++ info = (struct kinfo_proc *)malloc(info_size); ++ + mib[5] = (info_size / sizeof(struct kinfo_proc)); +-#endif + +- int sysctl_result = sysctl(mib, arraysize(mib), &info, &info_size, NULL, 0); ++ int sysctl_result = sysctl(mib, arraysize(mib), info, &info_size, NULL, 0); + 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 defined(OS_FREEBSD) +- being_debugged = (info.ki_flag & P_TRACED) != 0; ++ being_debugged = (info->ki_flag & P_TRACED) != 0; + #elif defined(OS_BSD) +- being_debugged = (info.p_flag & P_TRACED) != 0; ++ being_debugged = (info->p_flag & P_TRACED) != 0; + #else +- being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; ++ being_debugged = (info->kp_proc.p_flag & P_TRACED) != 0; + #endif ++ ++out: ++ free(info); + return being_debugged; + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader__linux.cc @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/base/debug/elf_reader_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/debug/elf_reader_linux.cc +@@ -41,8 +41,10 @@ Optional ElfSegmentBuildIDNoteAsString(co + const void* section_end = segment.data() + segment.size_bytes(); + const Nhdr* note_header = reinterpret_cast(segment.data()); + while (note_header < section_end) { ++#if !defined(OS_BSD) + if (note_header->n_type == NT_GNU_BUILD_ID) + break; ++#endif + note_header = reinterpret_cast( + reinterpret_cast(note_header) + sizeof(Nhdr) + + bits::Align(note_header->n_namesz, 4) + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace.h @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/base/debug/stack_trace.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/debug/stack_trace.h +@@ -16,6 +16,7 @@ + #include "build/build_config.h" + + #if defined(OS_POSIX) ++#include + #include + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc @@ -1,17 +1,36 @@ ---- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/debug/stack_trace_posix.cc -@@ -571,6 +571,10 @@ class SandboxSymbolizeHelper { +@@ -35,7 +35,7 @@ + #include + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "base/debug/proc_maps_linux.h" + #endif + +@@ -86,7 +86,7 @@ void DemangleSymbols(std::string* text) { + // Note: code in this function is NOT async-signal safe (std::string uses + // malloc internally). + +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if !defined(__UCLIBC__) && !defined(_AIX) && !defined(OS_BSD) + std::string::size_type search_from = 0; + while (search_from < text->size()) { + // Look for the start of a mangled symbol, from search_from. +@@ -647,6 +647,11 @@ class SandboxSymbolizeHelper { // 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)) { -@@ -586,6 +590,7 @@ class SandboxSymbolizeHelper { +@@ -664,6 +669,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_thread__heap__usage__tracker.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_thread__heap__usage__tracker.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_thread__heap__usage__tracker.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/debug/thread_heap_usage_tracker.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/debug/thread_heap_usage_tracker.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/debug/thread_heap_usage_tracker.cc -@@ -14,11 +14,13 @@ +@@ -17,10 +17,12 @@ #include "base/threading/thread_local_storage.h" #include "build/build_config.h" @@ -9,8 +9,7 @@ #include #else #include - #endif +#endif + #endif namespace base { - namespace debug { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__unittest.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/files/file_path_unittest.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/files/file_path_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/files/file_path_unittest.cc -@@ -1133,7 +1133,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_ +@@ -1136,7 +1136,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe) "\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" }, }; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher__stub.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher__stub.cc @@ -0,0 +1,46 @@ +--- src/3rdparty/chromium/base/files/file_path_watcher_stub.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/files/file_path_watcher_stub.cc +@@ -5,10 +5,14 @@ + // This file exists for Unix systems which don't have the inotify headers, and + // thus cannot build file_watcher_inotify.cc + ++#include ++ + #include "base/files/file_path_watcher.h" ++#include "base/files/file_path_watcher_kqueue.h" + + #include "base/macros.h" + #include "base/memory/ptr_util.h" ++#include "build/build_config.h" + + namespace base { + +@@ -22,12 +26,26 @@ class FilePathWatcherImpl : public FilePathWatcher::Pl + bool Watch(const FilePath& path, + bool recursive, + const FilePathWatcher::Callback& callback) override { +- return false; ++ DCHECK(!impl_.get()); ++ if (recursive) { ++ if (!FilePathWatcher::RecursiveWatchAvailable()) ++ return false; ++ } else { ++ impl_ = std::make_unique(); ++ } ++ DCHECK(impl_.get()); ++ return impl_->Watch(path, recursive, callback); + } + +- void Cancel() override {} ++ void Cancel() override { ++ if (impl_.get()) ++ impl_->Cancel(); ++ set_cancelled(); ++ } + + private: ++ std::unique_ptr impl_; ++ + DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl); + }; + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__watcher__unittest.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/files/file_path_watcher_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/files/file_path_watcher_unittest.cc +@@ -438,7 +438,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { + VLOG(1) << "Waiting for file1 creation"; + ASSERT_TRUE(WaitForEvents()); + +-#if !defined(OS_MACOSX) ++#if !defined(OS_MACOSX) && !defined(OS_BSD) + // Mac implementation does not detect files modified in a directory. + ASSERT_TRUE(WriteFile(file1, "content v2")); + VLOG(1) << "Waiting for file1 modification"; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__util.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/files/file_util.h.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/files/file_util.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/files/file_util.h -@@ -404,7 +404,7 @@ BASE_EXPORT bool VerifyPathControlledByA +@@ -445,7 +445,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas // 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_BSD) || defined(OS_AIX) // Broad categories of file systems as returned by statfs() on Linux. enum FileSystemType { FILE_SYSTEM_UNKNOWN, // statfs failed. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_i18n_icu__util.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/base/i18n/icu_util.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/i18n/icu_util.cc +@@ -20,7 +20,7 @@ + #include "build/build_config.h" + #include "third_party/icu/source/common/unicode/putil.h" + #include "third_party/icu/source/common/unicode/udata.h" +-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_ANDROID) ++#if ((defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)) || defined(OS_ANDROID) + #include "third_party/icu/source/i18n/unicode/timezone.h" + #endif + +@@ -320,7 +320,7 @@ bool InitializeICU() { + // TODO(jungshik): Some callers do not care about tz at all. If necessary, + // add a boolean argument to this function to init'd the default tz only + // when requested. +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) + if (result) + std::unique_ptr zone(icu::TimeZone::createDefault()); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_linux__util.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/linux_util.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/linux_util.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/linux_util.cc -@@ -110,12 +110,14 @@ char g_linux_distro[kDistroSize] = +@@ -111,12 +111,14 @@ char g_linux_distro[kDistroSize] = "CrOS"; #elif defined(OS_ANDROID) "Android"; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_logging__unittest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_logging__unittest.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/logging_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/logging_unittest.cc +@@ -420,7 +420,7 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo + // 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 defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + crash_addr = reinterpret_cast(info->si_addr); + #else // OS_POSIX && !OS_MACOSX + ucontext_t* context = reinterpret_cast(context_ptr); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_native__library__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_native__library__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_native__library__posix.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/native_library_posix.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/native_library_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/native_library_posix.cc -@@ -35,7 +35,7 @@ NativeLibrary LoadNativeLibraryWithOptio +@@ -29,7 +29,7 @@ NativeLibrary LoadNativeLibraryWithOptions(const FileP + // 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 Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_native__library__unittest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_native__library__unittest.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/native_library_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/native_library_unittest.cc +@@ -120,7 +120,7 @@ TEST(NativeLibraryTest, LoadLibrary) { + // Android dlopen() requires further investigation, as it might vary across + // versions with respect to symbol resolution scope. + // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255 +-#if !defined(OS_ANDROID) && !defined(THREAD_SANITIZER) && \ ++#if !defined(OS_ANDROID) && && !defined(OS_BSD) && !defined(THREAD_SANITIZER) && \ + !defined(MEMORY_SANITIZER) + + // Verifies that the |prefer_own_symbols| option satisfies its guarantee that Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket.cc @@ -0,0 +1,55 @@ +--- src/3rdparty/chromium/base/posix/unix_domain_socket.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/posix/unix_domain_socket.cc +@@ -5,7 +5,10 @@ + #include "base/posix/unix_domain_socket.h" + + #include ++#include + #include ++#include ++#include + #if !defined(OS_NACL_NONSFI) + #include + #endif +@@ -28,6 +31,14 @@ namespace base { + + const size_t UnixDomainSocket::kMaxFileDescriptors = 16; + ++#ifndef SCM_CREDENTIALS ++# define SCM_CREDENTIALS 0x9001 ++#endif ++ ++#ifndef SO_PASSCRED ++# define SO_PASSCRED 0x9002 ++#endif ++ + #if !defined(OS_NACL_NONSFI) + bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { + int raw_socks[2]; +@@ -150,7 +161,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + #if !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) + // The PNaCl toolchain for Non-SFI binary build and macOS do not support + // ucred. macOS supports xucred, but this structure is insufficient. +- + CMSG_SPACE(sizeof(struct ucred)) ++ + CMSG_SPACE(sizeof(struct cmsgcred)) + #endif // OS_NACL_NONSFI or OS_MACOSX + ; + char control_buffer[kControlBufferSize]; +@@ -175,14 +186,14 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + wire_fds = reinterpret_cast(CMSG_DATA(cmsg)); + wire_fds_len = payload_len / sizeof(int); + } +-#if !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) ++#if !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) && !defined(OS_BSD) + // The PNaCl toolchain for Non-SFI binary build and macOS do not support + // SCM_CREDENTIALS. + if (cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SCM_CREDENTIALS) { +- DCHECK_EQ(payload_len, sizeof(struct ucred)); ++ DCHECK_EQ(payload_len, sizeof(struct cmsgcred)); + DCHECK_EQ(pid, -1); +- pid = reinterpret_cast(CMSG_DATA(cmsg))->pid; ++ pid = getpid(); + } + #endif // !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX) + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__linux.cc +++ /dev/null @@ -1,45 +0,0 @@ ---- src/3rdparty/chromium/base/posix/unix_domain_socket_linux.cc.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/base/posix/unix_domain_socket_linux.cc -@@ -23,6 +23,15 @@ - - namespace base { - -+#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; - - #if !defined(OS_NACL_NONSFI) -@@ -40,8 +49,14 @@ static bool CreateSocketPair(ScopedFD* o - - // 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; -+#endif - } - #endif // !defined(OS_NACL_NONSFI) - -@@ -147,7 +162,11 @@ ssize_t UnixDomainSocket::RecvMsgWithFla - // The PNaCl toolchain for Non-SFI binary build does not support - // 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(pid, -1); - pid = reinterpret_cast(CMSG_DATA(cmsg))->pid; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__linux__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__linux__unittest.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/base/posix/unix_domain_socket_linux_unittest.cc.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/base/posix/unix_domain_socket_linux_unittest.cc -@@ -2,10 +2,15 @@ - // 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 - #include - #include - #include -+#if defined(OS_BSD) -+#include -+#endif - #include - - #include "base/bind.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_posix_unix__domain__socket__unittest.cc @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/base/posix/unix_domain_socket_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/posix/unix_domain_socket_unittest.cc +@@ -8,6 +8,9 @@ + #include + #include + #include ++#if defined(OS_BSD) ++#include ++#endif + #include + + #include "base/bind.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_internal__linux.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/base/process/internal_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/process/internal_linux.cc +@@ -60,10 +60,13 @@ bool ReadProcFile(const FilePath& file, std::string* b + // 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(); + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/process/kill.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/process/kill.h +@@ -111,7 +111,7 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro + BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus( + ProcessHandle handle, int* exit_code); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // Spawns a thread to wait asynchronously for the child |process| to exit + // and then reaps it. + BASE_EXPORT void EnsureProcessGetsReaped(Process process); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_kill__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/process/kill_posix.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/process/kill_posix.cc +@@ -167,7 +167,7 @@ void EnsureProcessTerminated(Process process) { + 0, new BackgroundReaper(std::move(process), TimeDelta::FromSeconds(2))); + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void EnsureProcessGetsReaped(Process process) { + DCHECK(!process.is_current()); + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.h @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/base/process/launch.h.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/launch.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/launch.h -@@ -138,7 +138,7 @@ struct BASE_EXPORT LaunchOptions { - // will be the same as its pid. - bool new_process_group = false; +@@ -171,7 +171,7 @@ struct BASE_EXPORT LaunchOptions { + FileHandleMappingVector fds_to_remap; + #endif // defined(OS_WIN) -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_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 -@@ -151,7 +151,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -184,7 +184,7 @@ struct BASE_EXPORT LaunchOptions { // Sets parent process death signal to SIGKILL. bool kill_on_parent_death = false; -#endif // defined(OS_LINUX) +#endif // defined(OS_LINUX) || defined(OS_BSD) - #if defined(OS_POSIX) - // If not empty, launch the specified executable instead of + #if defined(OS_FUCHSIA) + // If valid, launches the application in that job object. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/process/launch.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/launch.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/launch.cc -@@ -15,7 +15,7 @@ LaunchOptions::~LaunchOptions() = defaul +@@ -15,7 +15,7 @@ LaunchOptions::~LaunchOptions() = default; LaunchOptions LaunchOptionsForTest() { LaunchOptions options; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_launch__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/process/launch_posix.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/launch_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/launch_posix.cc -@@ -64,6 +64,7 @@ +@@ -65,6 +65,7 @@ #include "base/feature_list.h" #else extern char** environ; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/process/memory.h.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/memory.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/memory.h -@@ -32,7 +32,7 @@ BASE_EXPORT void EnableTerminationOnOutO +@@ -32,7 +32,7 @@ BASE_EXPORT void EnableTerminationOnOutOfMemory(); // 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_BSD) || defined(OS_ANDROID) || defined(OS_AIX) BASE_EXPORT extern size_t g_oom_size; // The maximum allowed value for the OOM score. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/base/process/memory.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/process/memory.cc +@@ -10,7 +10,7 @@ + namespace base { + + // Defined in memory_win.cc for Windows. +-#if !defined(OS_WIN) ++#if !defined(OS_WIN) && !defined(OS_BSD) + + namespace { + +@@ -31,7 +31,7 @@ void TerminateBecauseOutOfMemory(size_t size) { + #endif + + // Defined in memory_mac.mm for Mac. +-#if !defined(OS_MACOSX) ++#if !defined(OS_MACOSX) && !defined(OS_BSD) + + bool UncheckedCalloc(size_t num_items, size_t size, void** result) { + const size_t alloc_size = num_items * size; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__stubs.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__stubs.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__stubs.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/process/memory_stubs.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/memory_stubs.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/memory_stubs.cc -@@ -31,6 +31,8 @@ void TerminateBecauseOutOfMemory(size_t +@@ -31,6 +31,8 @@ void TerminateBecauseOutOfMemory(size_t size) { // their respective stdlib function since those functions will return null on a // failure to allocate. @@ -9,7 +9,7 @@ bool UncheckedMalloc(size_t size, void** result) { *result = malloc(size); return *result != nullptr; -@@ -40,5 +42,6 @@ bool UncheckedCalloc(size_t num_items, s +@@ -40,5 +42,6 @@ bool UncheckedCalloc(size_t num_items, size_t size, vo *result = calloc(num_items, size); return *result != nullptr; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_memory__unittest.cc @@ -1,21 +1,17 @@ ---- src/3rdparty/chromium/base/process/memory_unittest.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/memory_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/memory_unittest.cc -@@ -82,10 +82,10 @@ TEST(MemoryTest, AllocatorShimWorking) { - ASSERT_TRUE(base::allocator::IsAllocatorInitialized()); - } - --// OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan -+// BSD does not support these tests. Don't test these on ASan/TSan/MSan +@@ -104,7 +104,7 @@ TEST(MemoryTest, AllocatorShimWorking) { + // OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan // configurations: only test the real allocator. // Windows only supports these tests with the allocator shim in place. --#if !defined(OS_OPENBSD) && \ -+#if !defined(OS_BSD) && \ - BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && \ +-#if !defined(OS_OPENBSD) && BUILDFLAG(USE_ALLOCATOR_SHIM) && \ ++#if !defined(OS_BSD) && BUILDFLAG(USE_ALLOCATOR_SHIM) && \ !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) -@@ -439,5 +439,5 @@ TEST_F(OutOfMemoryHandledTest, Unchecked + namespace { +@@ -529,5 +529,5 @@ TEST_F(OutOfMemoryHandledTest, UncheckedCalloc) { EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_)); - EXPECT_TRUE(value_ == NULL); + EXPECT_TRUE(value_ == nullptr); } -#endif // !defined(OS_OPENBSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && +#endif // !defined(OS_BSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/process/process_handle.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/process/process_handle.h +@@ -64,7 +64,7 @@ BASE_EXPORT ProcessId GetCurrentProcId(); + // a process's PID. + BASE_EXPORT uint32_t GetUniqueIdForProcess(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_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. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/process/process_handle.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/process/process_handle.cc +@@ -39,7 +39,7 @@ uint32_t GetUniqueIdForProcess() { + return g_unique_id; + } + +-#if defined(OS_LINUX) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) + + void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) { + g_unique_id = MangleProcessId(pid_outside_of_namespace); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__handle__freebsd.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/process/process_handle_freebsd.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/process_handle_freebsd.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/process_handle_freebsd.cc -@@ -16,7 +16,7 @@ namespace base { +@@ -16,10 +16,13 @@ namespace base { ProcessId GetParentProcessId(ProcessHandle process) { struct kinfo_proc info; @@ -9,3 +9,9 @@ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process }; if (sysctl(mib, arraysize(mib), &info, &length, NULL, 0) < 0) ++ return -1; ++ ++ if (length < sizeof(struct kinfo_proc)) + return -1; + + return info.ki_ppid; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__info__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__info__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__info__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_info_linux.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/process_info_linux.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/process_info_linux.cc @@ -11,10 +11,28 @@ #include "base/process/process_handle.h" @@ -19,19 +19,19 @@ + struct kinfo_proc proc; + size_t len = sizeof(struct kinfo_proc); + if (sysctl(mib, arraysize(mib), &proc, &len, NULL, 0) < 0) -+ return Time(); ++ return Time(); +#if defined(__DragonFly__) + return Time::FromTimeVal(proc.kp_start); +#else + return Time::FromTimeVal(proc.ki_start); +#endif +#else - ProcessHandle pid = GetCurrentProcessHandle(); int64_t start_ticks = - internal::ReadProcStatsAndGetFieldAsInt64(pid, internal::VM_STARTTIME); -@@ -23,6 +41,7 @@ const Time CurrentProcessInfo::CreationT - Time boot_time = internal::GetBootTime(); - DCHECK(!boot_time.is_null()); + internal::ReadProcSelfStatsAndGetFieldAsInt64(internal::VM_STARTTIME); + if (!start_ticks) +@@ -24,6 +42,7 @@ const Time CurrentProcessInfo::CreationTime() { + if (boot_time.is_null()) + return Time(); return Time(boot_time + start_offset); +#endif } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__iterator__freebsd.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/base/process/process_iterator_freebsd.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/process_iterator_freebsd.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/process_iterator_freebsd.cc @@ -10,6 +10,10 @@ #include @@ -11,7 +11,7 @@ #include "base/logging.h" #include "base/macros.h" #include "base/strings/string_split.h" -@@ -72,19 +76,13 @@ bool ProcessIterator::CheckForNextProces +@@ -72,19 +76,13 @@ bool ProcessIterator::CheckForNextProcess() { for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) { size_t length; struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_]; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.h @@ -1,33 +1,112 @@ ---- src/3rdparty/chromium/base/process/process_metrics.h.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/process_metrics.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/process_metrics.h -@@ -22,6 +22,12 @@ - #include "base/values.h" - #include "build/build_config.h" +@@ -41,7 +41,7 @@ namespace base { + // Full declaration is in process_metrics_iocounters.h. + struct IoCounters; -+#if defined(OS_BSD) -+#include -+#include -+#include -+#endif -+ +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + // Minor and major page fault counts since the process creation. + // Both counts are process-wide, and exclude child processes. + // +@@ -51,7 +51,7 @@ struct PageFaultCounts { + int64_t minor; + int64_t major; + }; +-#endif // defined(OS_LINUX) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + + // Convert a POSIX timeval to microseconds. + BASE_EXPORT int64_t TimeValToMicroseconds(const struct timeval& tv); +@@ -177,7 +177,7 @@ class BASE_EXPORT ProcessMetrics { + // otherwise. + bool GetIOCounters(IoCounters* io_counters) const; + +-#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_ANDROID) || defined(OS_BSD) + // Returns the number of file descriptors currently open by the process, or + // -1 on error. + int GetOpenFdCount() const; +@@ -185,16 +185,16 @@ class BASE_EXPORT ProcessMetrics { + // Returns the soft limit of file descriptors that can be opened by the + // process, or -1 on error. + int GetOpenFdSoftLimit() const; +-#endif // defined(OS_LINUX) || defined(OS_AIX) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_AIX) || defined(OS_ANDROID) || defined(OS_BSD) + +-#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; + + // Minor and major page fault count as reported by /proc/[pid]/stat. + // Returns true for success. + bool GetPageFaultCounts(PageFaultCounts* counts) const; +-#endif // defined(OS_LINUX) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + + // Returns total memory usage of malloc. + size_t GetMallocUsage(); +@@ -206,7 +206,7 @@ class BASE_EXPORT ProcessMetrics { + ProcessMetrics(ProcessHandle process, PortProvider* port_provider); + #endif // !defined(OS_MACOSX) || defined(OS_IOS) + +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) + int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); + #endif #if defined(OS_MACOSX) - #include - #include "base/process/port_provider_mac.h" -@@ -326,13 +332,17 @@ BASE_EXPORT bool GetSystemMemoryInfo(Sys - // CPU-related ticks. Returns -1 on parse error. - // Exposed for testing. - BASE_EXPORT int ParseProcStatCPU(const std::string& input); -+#endif +@@ -229,7 +229,7 @@ class BASE_EXPORT ProcessMetrics { + TimeDelta last_cumulative_cpu_; + #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_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) + // Same thing for idle wakeups. + TimeTicks last_idle_wakeups_time_; + uint64_t last_absolute_idle_wakeups_; +@@ -275,7 +275,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de + #endif // defined(OS_POSIX) -+#if defined(OS_LINUX) || defined(OS_ANDROID) - // /proc/self/exe refers to the current executable. - BASE_EXPORT extern const char kProcSelfExe[]; + #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +- defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) ++ defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) || defined(OS_BSD) + // Data about system-wide memory consumption. Values are in KB. Available on + // Windows, Mac, Linux, Android and Chrome OS. + // +@@ -308,7 +308,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { + int avail_phys = 0; + #endif +-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_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 +@@ -323,7 +323,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { + #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; +@@ -333,7 +333,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { + int dirty = 0; + int reclaimable = 0; + #endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || +- // defined(OS_FUCHSIA) ++ // defined(OS_FUCHSIA) || defined(OS_BSD) + + #if defined(OS_CHROMEOS) + int shmem = 0; +@@ -361,7 +361,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK + #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || + // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) + +-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) + // Parse the data found in /proc//stat and return the sum of the + // CPU-related ticks. Returns -1 on parse error. + // Exposed for testing. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/process/process_metrics.cc +@@ -10,7 +10,7 @@ + #include "base/values.h" + #include "build/build_config.h" + +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) + namespace { + int CalculateEventsPerSecond(uint64_t event_count, + uint64_t* last_event_count, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__freebsd.cc @@ -1,19 +1,27 @@ ---- src/3rdparty/chromium/base/process/process_metrics_freebsd.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/process_metrics_freebsd.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/process_metrics_freebsd.cc -@@ -13,6 +13,9 @@ - #include "base/memory/ptr_util.h" - #include "base/sys_info.h" +@@ -14,11 +14,14 @@ + #include "base/process/process_metrics_iocounters.h" + #include "base/stl_util.h" +#include /* getpagesize() */ +#include /* O_RDONLY */ ++#include + namespace base { ProcessMetrics::ProcessMetrics(ProcessHandle process) -@@ -122,4 +125,23 @@ size_t GetSystemCommitCharge() { +- : process_(process), +- last_cpu_(0) {} ++ : process_(process) {} + + // static + std::unique_ptr ProcessMetrics::CreateProcessMetrics( +@@ -68,5 +71,64 @@ size_t GetSystemCommitCharge() { + return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); } - ++ +int GetNumberOfThreads(ProcessHandle process) { + // Taken from FreeBSD top (usr.bin/top/machine.c) + @@ -33,4 +41,44 @@ + 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; ++} ++ ++uint64_t ProcessMetrics::GetVmSwapBytes() const { ++ NOTIMPLEMENTED(); ++ return 0; ++ } + } // namespace base Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/process/process_metrics_posix.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/process/process_metrics_posix.cc +@@ -19,6 +19,8 @@ + + #if defined(OS_MACOSX) + #include ++#elif defined(OS_BSD) ++#include + #else + #include + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__posix.cc @@ -1,16 +1,18 @@ ---- src/3rdparty/chromium/base/process/process_posix.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/process/process_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/process/process_posix.cc -@@ -21,8 +21,18 @@ +@@ -18,12 +18,19 @@ + #include "base/threading/thread_restrictions.h" + #include "build/build_config.h" + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) #include #endif - +#if defined(OS_BSD) -+#include +#include -+#include +#include +#endif -+ + namespace { +const int kBackgroundPriority = 5; @@ -19,10 +21,10 @@ #if !defined(OS_NACL_NONSFI) bool WaitpidWithTimeout(base::ProcessHandle handle, -@@ -184,13 +194,13 @@ bool WaitForExitWithTimeoutImpl(base::Pr - base::ProcessHandle parent_pid = base::GetParentProcessId(handle); - base::ProcessHandle our_pid = base::GetCurrentProcessHandle(); - if (parent_pid != our_pid) { +@@ -191,13 +198,13 @@ bool WaitForExitWithTimeoutImpl(base::ProcessHandle ha + const bool exited = (parent_pid < 0); + + if (!exited && parent_pid != our_pid) { -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) // On Mac we can wait on non child processes. @@ -36,55 +38,51 @@ } int status; -@@ -257,12 +267,16 @@ Process Process::DeprecatedGetProcessFro +@@ -262,12 +269,10 @@ Process Process::DeprecatedGetProcessFromHandle(Proces 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) // static bool Process::CanBackgroundProcesses() { - return false; - } --#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) -+#elif defined(OS_FREEBSD) -+bool Process::CanBackgroundProcesses() { +- return false; + return true; -+} -+#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD) + } +-#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_AIX) - bool Process::IsValid() const { - return process_ != kNullProcessHandle; -@@ -365,15 +379,32 @@ bool Process::WaitForExitWithTimeout(Tim + // static + void Process::TerminateCurrentProcessImmediately(int exit_code) { +@@ -351,21 +356,24 @@ bool Process::WaitForExitWithTimeout(TimeDelta timeout + + void Process::Exited(int exit_code) const {} + +-#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_AIX) bool Process::IsProcessBackgrounded() const { // See SetProcessBackgrounded(). DCHECK(IsValid()); -+#if defined(OS_FREEBSD) -+ return true; -+#else - return false; -+#endif +- return false; ++ return GetPriority() == kBackgroundPriority; } - bool Process::SetProcessBackgrounded(bool value) { -+#if !defined(OS_FREEBSD) - // Not implemented for POSIX systems other than Linux and Mac. With POSIX, if - // we were to lower the process priority we wouldn't be able to raise it back - // to its initial priority. - NOTIMPLEMENTED(); - return false; -+#else +-bool Process::SetProcessBackgrounded(bool value) { +- // Not implemented for POSIX systems other than Linux and Mac. With POSIX, if +- // we were to lower the process priority we wouldn't be able to raise it back +- // to its initial priority. +- NOTIMPLEMENTED(); +- return false; ++bool Process::SetProcessBackgrounded(bool background) { + DCHECK(IsValid()); + + if (!CanBackgroundProcesses()) + return false; + -+ int priority = value ? kBackgroundPriority : kForegroundPriority; ++ int priority = background ? kBackgroundPriority : kForegroundPriority; + int result = setpriority(PRIO_PROCESS, process_, priority); + + DPCHECK(result == 0); + return result == 0; -+#endif // !defined(OS_FREEBSD) } - #endif // !defined(OS_LINUX) && !defined(OS_MACOSX) +-#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_AIX) + int Process::GetPriority() const { + DCHECK(IsValid()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_profiler_stack__sampling__profiler__unittest.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/profiler/stack_sampling_profiler_unittest.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/profiler/stack_sampling_profiler_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/profiler/stack_sampling_profiler_unittest.cc -@@ -31,7 +31,7 @@ +@@ -39,7 +39,7 @@ #include #include #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_security__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_security__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_security__unittest.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/security_unittest.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/security_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/security_unittest.cc -@@ -74,7 +74,7 @@ bool IsTcMallocBypassed() { +@@ -59,7 +59,7 @@ NOINLINE Type HideValueFromCompiler(volatile Type valu // FAILS_ is too clunky. void OverflowTestsSoftExpectTrue(bool overflow_detected) { if (!overflow_detected) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/sys_info.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/sys_info.h +@@ -171,7 +171,7 @@ class BASE_EXPORT SysInfo { + static int64_t AmountOfAvailablePhysicalMemoryImpl(); + static bool IsLowEndDeviceImpl(); + +-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) + static int64_t AmountOfAvailablePhysicalMemory( + const SystemMemoryInfoKB& meminfo); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__freebsd.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__freebsd.cc @@ -1,30 +1,9 @@ ---- src/3rdparty/chromium/base/sys_info_freebsd.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/sys_info_freebsd.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/sys_info_freebsd.cc -@@ -12,12 +12,34 @@ - +@@ -13,26 +13,58 @@ namespace base { -+int64_t SysInfo::AmountOfAvailablePhysicalMemory() { -+ int page_size, r = 0; -+ unsigned pgfree, pginact, pgcache; -+ size_t size = sizeof(page_size); -+ size_t szpg = sizeof(pgfree); -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); -+ if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); -+ if (r == -1) { -+ NOTREACHED(); -+ return 0; -+ } -+ return static_cast((pgfree + pginact + pgcache) * page_size); -+} -+ - int64_t SysInfo::AmountOfPhysicalMemory() { + int64_t SysInfo::AmountOfPhysicalMemoryImpl() { - int pages, page_size; + int pages, page_size, r = 0; size_t size = sizeof(pages); @@ -39,14 +18,36 @@ NOTREACHED(); return 0; } -@@ -25,14 +47,24 @@ int64_t SysInfo::AmountOfPhysicalMemory( + return static_cast(pages) * page_size; } - // static +-// static -uint64_t SysInfo::MaxSharedMemorySize() { - size_t limit; - size_t size = sizeof(limit); - if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) { ++int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { ++ int page_size, r = 0; ++ unsigned pgfree, pginact, pgcache; ++ size_t size = sizeof(page_size); ++ size_t szpg = sizeof(pgfree); ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); ++ if(r == 0) ++ r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); ++ if(r == -1) { + NOTREACHED(); + return 0; + } +- return static_cast(limit); ++ return static_cast((pgfree + pginact + pgcache) * page_size); ++} ++ ++// static +std::string SysInfo::CPUModelName() { + int mib[] = { CTL_HW, HW_MODEL }; + char name[256]; @@ -61,11 +62,9 @@ + int ncpu; + size_t size = sizeof(ncpu); + if (sysctl(mib, arraysize(mib), &ncpu, &size, NULL, 0) == -1) { - NOTREACHED(); -- return 0; ++ NOTREACHED(); + return 1; - } -- return static_cast(limit); ++ } + return ncpu; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_sys__info__posix.cc @@ -1,20 +1,38 @@ ---- src/3rdparty/chromium/base/sys_info_posix.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/sys_info_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/sys_info_posix.cc -@@ -35,7 +35,7 @@ +@@ -38,7 +38,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::FilePa +@@ -65,7 +65,7 @@ int NumberOfProcessors() { + base::LazyInstance< + base::internal::LazySysInfoValue >::Leaky + g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER; +-#endif // !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) ++#endif // !defined(OS_BSD) && !defined(OS_FUCHSIA) + #if !defined(OS_FUCHSIA) + int64_t AmountOfVirtualMemory() { +@@ -133,7 +133,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, + namespace base { --#if !defined(OS_OPENBSD) -+#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(); } +@@ -226,6 +226,8 @@ std::string SysInfo::OperatingSystemArchitecture() { + arch = "x86"; + } else if (arch == "amd64") { + arch = "x86_64"; ++ } else if (arch == "arm64") { ++ arch = "aarch64"; + } else if (std::string(info.sysname) == "AIX") { + arch = "ppc64"; + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_test_BUILD.gn @@ -1,11 +1,20 @@ ---- src/3rdparty/chromium/base/test/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/test/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/test/BUILD.gn -@@ -303,7 +303,7 @@ static_library("run_all_base_unittests") +@@ -202,7 +202,7 @@ static_library("test_support") { + deps += [ "//third_party/fuchsia-sdk:zx" ] + } + +- if (is_linux) { ++ if (is_linux || is_bsd) { + public_deps += [ ":fontconfig_util_linux" ] + data_deps = [ + "//third_party/test_fonts", +@@ -347,7 +347,7 @@ static_library("run_all_base_unittests") { ] } -if (is_linux) { +if (is_linux || is_bsd) { - shared_library("malloc_wrapper") { - testonly = true + source_set("fontconfig_util_linux") { sources = [ + "fontconfig_util_linux.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_third__party_libevent_BUILD.gn @@ -1,12 +1,24 @@ ---- src/3rdparty/chromium/base/third_party/libevent/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/third_party/libevent/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/third_party/libevent/BUILD.gn -@@ -29,6 +29,9 @@ static_library("libevent") { - } else if (is_linux) { - sources += [ "epoll.c" ] +@@ -48,13 +48,20 @@ static_library("bundled_libevent") { + "mac/event-config.h", + ] + include_dirs = [ "mac" ] +- } else if (is_linux) { ++ } else if (is_linux && !is_bsd) { + sources += [ + "epoll.c", + "linux/config.h", + "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 += [ "epoll.c" ] - include_dirs = [ "android" ] + sources += [ + "android/config.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/threading/platform_thread.h.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/threading/platform_thread.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/threading/platform_thread.h -@@ -205,7 +205,7 @@ class BASE_EXPORT PlatformThread { +@@ -217,7 +217,7 @@ class BASE_EXPORT PlatformThread { static ThreadPriority GetCurrentThreadPriority(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__linux.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/threading/platform_thread_linux.cc -@@ -19,7 +19,9 @@ +@@ -18,7 +18,9 @@ - #if !defined(OS_NACL) + #if !defined(OS_NACL) && !defined(OS_AIX) #include +#if !defined(OS_BSD) #include @@ -10,21 +10,21 @@ #include #include #include -@@ -130,7 +132,7 @@ void PlatformThread::SetName(const std:: - ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name); - tracked_objects::ThreadData::InitializeThreadContext(name); +@@ -128,7 +130,7 @@ bool GetCurrentThreadPriorityForPlatform(ThreadPriorit + void PlatformThread::SetName(const std::string& name) { + ThreadIdNameManager::GetInstance()->SetName(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:: - #endif // !defined(OS_NACL) +@@ -145,7 +147,7 @@ void PlatformThread::SetName(const std::string& name) + // We expect EPERM failures in sandboxed processes, just ignore those. + if (err < 0 && errno != EPERM) + DPLOG(ERROR) << "prctl(PR_SET_NAME)"; +-#endif // !defined(OS_NACL) && !defined(OS_AIX) ++#endif // !defined(OS_NACL) && !defined(OS_AIX) && !defined(OS_BSD) } --#if !defined(OS_NACL) -+#if !defined(OS_NACL) && !defined(OS_BSD) - // static - void PlatformThread::SetThreadPriority(PlatformThreadId thread_id, - ThreadPriority priority) { + #if !defined(OS_NACL) && !defined(OS_AIX) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_platform__thread__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/threading/platform_thread_posix.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/threading/platform_thread_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/threading/platform_thread_posix.cc -@@ -56,7 +56,7 @@ void* ThreadFunc(void* params) { +@@ -61,7 +61,7 @@ void* ThreadFunc(void* params) { if (!thread_params->joinable) base::ThreadRestrictions::SetSingletonAllowed(false); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_thread__task__runner__handle.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_threading_thread__task__runner__handle.cc @@ -0,0 +1,26 @@ +--- src/3rdparty/chromium/base/threading/thread_task_runner_handle.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/threading/thread_task_runner_handle.cc +@@ -7,6 +7,7 @@ + #include + + #include "base/bind.h" ++#include "base/callback_helpers.h" + #include "base/lazy_instance.h" + #include "base/logging.h" + #include "base/memory/ptr_util.h" +@@ -37,6 +38,7 @@ bool ThreadTaskRunnerHandle::IsSet() { + return !!thread_task_runner_tls.Pointer()->Get(); + } + ++#if defined(OS_BSD) + // static + ScopedClosureRunner ThreadTaskRunnerHandle::OverrideForTesting( + scoped_refptr overriding_task_runner) { +@@ -86,6 +88,7 @@ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideFo + base::Unretained(ttrh->task_runner_.get()), + std::move(no_running_during_override))); + } ++#endif + + ThreadTaskRunnerHandle::ThreadTaskRunnerHandle( + scoped_refptr task_runner) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_malloc__dump__provider.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc -@@ -21,7 +21,7 @@ +@@ -18,7 +18,7 @@ #if defined(OS_MACOSX) #include #else @@ -9,3 +9,13 @@ #endif #if defined(OS_WIN) #include +@@ -132,6 +132,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump + } + #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); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/trace_event/process_memory_dump.h.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/trace_event/process_memory_dump.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/trace_event/process_memory_dump.h -@@ -24,7 +24,7 @@ +@@ -22,7 +22,7 @@ // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the // resident memory. --#if (defined(OS_POSIX) && !defined(OS_NACL)) || defined(OS_WIN) -+#if (defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_BSD)) || defined(OS_WIN) +-#if !defined(OS_NACL) ++#if !defined(OS_NACL) && !defined(OS_BSD) #define COUNT_RESIDENT_BYTES_SUPPORTED #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/base/trace_event/process_memory_dump.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/base/trace_event/process_memory_dump.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/base/trace_event/process_memory_dump.cc -@@ -83,7 +83,7 @@ size_t ProcessMemoryDump::CountResidentB - const size_t kMaxChunkSize = 8 * 1024 * 1024; - size_t max_vec_size = - GetSystemPageCount(std::min(mapped_size, kMaxChunkSize), page_size); --#if defined(OS_MACOSX) || defined(OS_IOS) -+#if defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_BSD) - std::unique_ptr vec(new char[max_vec_size]); - #elif defined(OS_WIN) +@@ -93,7 +93,7 @@ size_t ProcessMemoryDump::CountResidentBytes(void* sta + #if defined(OS_WIN) std::unique_ptr vec( + new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]); +-#elif defined(OS_MACOSX) ++#elif defined(OS_MACOSX) || defined(OS_BSD) + std::unique_ptr vec(new char[max_vec_size]); + #elif defined(OS_POSIX) || defined(OS_FUCHSIA) + std::unique_ptr vec(new unsigned char[max_vec_size]); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_breakpad_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_breakpad_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_breakpad_BUILD.gn @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/breakpad/BUILD.gn.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/breakpad/BUILD.gn -@@ -468,7 +468,7 @@ if (is_mac) { - } - } - --if (is_linux || is_android) { -+if (is_linux || is_bsd || is_android) { - if (current_toolchain == host_toolchain) { - executable("symupload") { - sources = [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/config/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/BUILD.gn -@@ -224,7 +224,7 @@ config("debug") { +@@ -171,7 +171,7 @@ config("debug") { # builds, and we have to tell it to turn it off. defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] } @@ -9,12 +9,23 @@ # 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? -@@ -338,7 +338,7 @@ config("executable_config") { +@@ -277,6 +277,10 @@ config("default_libs") { + "pthread", + "rt", ] - } 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_bsd) { ++ libs = [ ++ "pthread" ++ ] + } + } + +@@ -331,7 +335,7 @@ config("executable_config") { + "//build/config/ios:ios_dynamic_flags", + "//build/config/ios:ios_executable_flags", + ] +- } else if (is_linux || is_android || current_os == "aix") { ++ } else if (is_linux || is_android || is_bsd || current_os == "aix") { configs += [ "//build/config/gcc:executable_ldconfig" ] if (is_android) { configs += [ "//build/config/android:executable_config" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_BUILDCONFIG.gn @@ -1,22 +1,20 @@ ---- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/BUILDCONFIG.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/BUILDCONFIG.gn -@@ -134,12 +134,13 @@ declare_args() { - is_debug = !is_official_build +@@ -131,10 +131,11 @@ declare_args() { + is_official_build = false # Whether we're a traditional desktop unix. - is_desktop_linux = current_os == "linux" ++ # YYY + is_desktop_linux = current_os == "linux" || current_os == "bsd" - # 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" - - # Allows the path to a custom target toolchain to be injected as a single - # argument, and set as the default toolchain. -@@ -183,8 +184,8 @@ if (host_toolchain == "") { + # Set to true when compiling with the Clang compiler. +- is_clang = current_os != "linux" || ++ is_clang = current_os != "linux" || current_os == "bsd" || + (current_cpu != "s390x" && current_cpu != "s390" && + current_cpu != "ppc64" && current_cpu != "ppc" && + current_cpu != "mips" && current_cpu != "mips64") +@@ -191,8 +192,8 @@ if (host_toolchain == "") { # TODO(dpranke): Add some sort of assert here that verifies that # no toolchain omitted host_toolchain from its toolchain_args(). @@ -27,35 +25,100 @@ # 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 -@@ -220,7 +221,7 @@ if (target_os == "android") { - } else { - _default_toolchain = "//build/toolchain/android:android_$target_cpu" - } +@@ -232,7 +233,7 @@ if (target_os == "android") { + assert(host_os == "linux" || host_os == "mac", + "Android builds are only supported on Linux and Mac hosts.") + _default_toolchain = "//build/toolchain/android:android_clang_$target_cpu" -} else if (target_os == "chromeos" || target_os == "linux") { +} else if (target_os == "chromeos" || target_os == "linux" || target_os == "bsd") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" -@@ -340,8 +341,17 @@ if (current_os == "win" || current_os == +@@ -306,6 +307,7 @@ if (current_os == "win" || current_os == "winuwp") { is_nacl = false + is_posix = false + is_win = true ++ is_bsd = false + } else if (current_os == "mac") { + is_aix = false + is_android = false +@@ -317,6 +319,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false is_posix = true is_win = false ++ is_bsd = false + } else if (current_os == "android") { + is_aix = false + is_android = true +@@ -328,6 +331,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "chromeos") { + is_aix = false + is_android = false +@@ -339,6 +343,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "nacl") { + # current_os == "nacl" will be passed by the nacl toolchain definition. + # It is not set by default or on the command line. We treat is as a +@@ -353,6 +358,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = true + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "fuchsia") { + is_aix = false + is_android = false +@@ -364,6 +370,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = false + is_win = false ++ is_bsd = false + } else if (current_os == "ios") { + is_aix = false + is_android = false +@@ -375,6 +382,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "linux") { + is_aix = false + is_android = false +@@ -386,6 +394,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "aix") { + is_aix = true + is_android = false +@@ -397,6 +406,19 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false +} else if (current_os == "bsd") { ++ is_aix = false + is_android = false + is_chromeos = false ++ is_fuchsia = false + is_ios = false + is_linux = false -+ is_bsd = true + is_mac = false + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = true } -- + # ============================================================================= - # SOURCES FILTERS - # ============================================================================= -@@ -410,7 +420,7 @@ if (!is_ios) { +@@ -459,7 +481,7 @@ if (!is_ios) { if (!is_mac && !is_ios) { sources_assignment_filter += [ "*.mm" ] } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_allocator.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_allocator.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_allocator.gni @@ -1,11 +1,20 @@ ---- src/3rdparty/chromium/build/config/allocator.gni.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/allocator.gni.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/allocator.gni -@@ -44,7 +44,7 @@ assert(use_allocator == "none" || use_al - assert(!is_win || use_allocator == "none", "Tcmalloc doesn't work on Windows.") +@@ -6,7 +6,7 @@ import("//build/config/sanitizers/sanitizers.gni") - assert( -- !use_experimental_allocator_shim || is_linux || is_android || is_win, -+ !use_experimental_allocator_shim || is_linux || is_android || is_win || is_bsd, - "use_experimental_allocator_shim supported only on Linux, Android and Windows targets") - - if (is_win && use_experimental_allocator_shim) { + # Temporarily disable tcmalloc on arm64 linux to get rid of compilation errors. + if (is_android || is_mac || is_ios || is_asan || is_lsan || is_tsan || +- is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64")) { ++ is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64") || is_bsd) { + _default_allocator = "none" + } else { + _default_allocator = "tcmalloc" +@@ -17,7 +17,7 @@ if (is_android || is_mac || is_ios || is_asan || is_ls + # against the debug CRT with "is_nacl=false". + if ((is_linux || is_android || is_mac || + (is_win && !is_shared && !is_debug)) && !is_asan && !is_lsan && +- !is_tsan && !is_msan) { ++ !is_tsan && !is_msan && !is_bsd) { + _default_use_allocator_shim = true + } else { + _default_use_allocator_shim = false Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_clang_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_clang_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_clang_BUILD.gn @@ -1,20 +1,11 @@ ---- src/3rdparty/chromium/build/config/clang/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/clang/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/clang/BUILD.gn -@@ -20,7 +20,7 @@ config("find_bad_constructs") { - rebase_path("${clang_base_path}/lib/libFindBadConstructs.dylib", - root_build_dir), - ] -- } else if (is_linux || is_android) { -+ } else if (is_linux || is_bsd || is_android) { - cflags += [ - "-Xclang", - "-load", -@@ -37,7 +37,7 @@ config("find_bad_constructs") { - "find-bad-constructs", +@@ -50,7 +50,7 @@ config("find_bad_constructs") { + "check-enum-max-value", ] -- if ((is_linux || is_android) && !is_chromecast) { -+ if ((is_linux || is_bsd || is_android) && !is_chromecast) { +- if (is_linux || is_android || is_fuchsia) { ++ if (is_linux || is_bsd || is_android || is_fuchsia) { cflags += [ "-Xclang", "-plugin-arg-find-bad-constructs", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2018-01-15 11:39:43 UTC +--- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/compiler/BUILD.gn -@@ -156,7 +156,7 @@ config("compiler") { +@@ -215,7 +215,7 @@ config("compiler") { configs += [ "//build/config/win:compiler" ] } else if (is_android) { configs += [ "//build/config/android:compiler" ] @@ -9,74 +9,25 @@ configs += [ "//build/config/linux:compiler" ] } else if (is_nacl) { configs += [ "//build/config/nacl:compiler" ] -@@ -290,7 +290,7 @@ config("compiler") { +@@ -381,7 +381,7 @@ config("compiler") { - # Linux/Android common flags setup. + # Linux/Android/Fuchsia common flags setup. # --------------------------------- -- if (is_linux || is_android) { -+ if (is_linux || is_bsd || is_android) { - cflags += [ - "-fPIC", - "-pipe", # Use pipes for communicating between sub-processes. Faster. -@@ -414,14 +414,14 @@ config("compiler") { - # 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) { -+ if (is_clang && (is_linux || is_bsd)) { - absolute_path = rebase_path("//.") - cflags += [ "-fdebug-prefix-map=$absolute_path=." ] - } +- if (is_linux || is_android || is_fuchsia) { ++ if (is_linux || is_bsd || is_android || is_fuchsia) { + if (use_pic) { + cflags += [ "-fPIC" ] + ldflags += [ "-fPIC" ] +@@ -553,7 +553,7 @@ config("compiler") { - # C++11 compiler flags setup. + # C11/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, -@@ -475,7 +475,7 @@ config("compiler") { - ] - - # Apply a lower LTO optimization level as the default is too slow. -- if (is_linux) { -+ if (is_linux || is_bsd) { - if (use_lld) { - ldflags += [ "-Wl,--lto-O1" ] - } else { -@@ -495,7 +495,7 @@ config("compiler") { - # 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" ] - } - } -@@ -541,11 +541,11 @@ 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) { - cflags += [ "--target=arm-linux-gnueabihf" ] - ldflags += [ "--target=arm-linux-gnueabihf" ] - } -- if (!is_nacl) { -+ if (!is_nacl && !is_bsd) { - cflags += [ - "-march=$arm_arch", - "-mfloat-abi=$arm_float_abi", -@@ -555,7 +555,7 @@ config("compiler_cpu_abi") { - cflags += [ "-mtune=$arm_tune" ] - } - } else if (current_cpu == "arm64") { -- if (is_clang && !is_android && !is_nacl) { -+ if (is_clang && !is_android && !is_nacl && !is_bsd) { - cflags += [ "--target=aarch64-linux-gnu" ] - ldflags += [ "--target=aarch64-linux-gnu" ] - } -@@ -758,7 +758,7 @@ config("compiler_codegen") { +- if (is_linux || is_android || (is_nacl && is_clang) || current_os == "aix") { ++ if (is_linux || is_bsd || is_android || (is_nacl && is_clang) || current_os == "aix") { + if (target_os == "android") { + cxx11_override = use_cxx11_on_android + } else { +@@ -1098,7 +1098,7 @@ config("compiler_codegen") { # configs -= [ "//build/config/compiler:clang_stackrealign" ] # See https://crbug.com/556393 for details of where it must be avoided. config("clang_stackrealign") { @@ -85,7 +36,7 @@ cflags = [ # Align the stack on 16-byte boundaries, http://crbug.com/418554. "-mstack-alignment=16", -@@ -804,7 +804,7 @@ config("runtime_library") { +@@ -1184,7 +1184,7 @@ config("runtime_library") { # smaller. if (is_win) { configs += [ "//build/config/win:runtime_library" ] @@ -94,30 +45,3 @@ configs += [ "//build/config/linux:runtime_library" ] } else if (is_ios) { configs += [ "//build/config/ios:runtime_library" ] -@@ -1054,7 +1054,7 @@ config("default_warnings") { - "-Wno-nonportable-include-path", - - # TODO(hans): https://crbug.com/637306 -- "-Wno-address-of-packed-member", -+ # "-Wno-address-of-packed-member", - ] - } - } -@@ -1086,7 +1086,7 @@ config("chromium_code") { - ] - - if (!is_debug && !using_sanitizer && -- (!is_linux || !is_clang || is_official_build)) { -+ (!is_linux || !is_bsd || !is_clang || is_official_build)) { - # _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 -@@ -1144,7 +1144,7 @@ config("no_chromium_code") { - ] - } - -- 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", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_compiler.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/build/config/compiler/compiler.gni.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/build/config/compiler/compiler.gni +@@ -173,7 +173,7 @@ declare_args() { + + declare_args() { + # Whether to use the gold linker from binutils instead of lld or bfd. +- use_gold = !use_lld && !(is_chromecast && is_linux && ++ use_gold = !is_bsd && !use_lld && !(is_chromecast && is_linux && + (current_cpu == "arm" || current_cpu == "mipsel")) && + ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || + current_cpu == "arm" || current_cpu == "mipsel" || Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_crypto.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_crypto.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_crypto.gni @@ -1,9 +1,8 @@ ---- src/3rdparty/chromium/build/config/crypto.gni.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/crypto.gni.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/crypto.gni -@@ -21,5 +21,5 @@ declare_args() { +@@ -12,4 +12,4 @@ + # to set up feature flags. - # True if NSS is used for certificate handling. It is possible to use OpenSSL - # for the crypto library, but NSS for the platform certificate library. -- use_nss_certs = is_linux -+ use_nss_certs = is_linux || is_bsd - } + # True if NSS is used for certificate handling. +-use_nss_certs = is_linux ++use_nss_certs = is_linux || is_bsd Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_features.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_features.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_features.gni @@ -1,19 +1,14 @@ ---- src/3rdparty/chromium/build/config/features.gni.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/features.gni.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/features.gni -@@ -67,13 +67,13 @@ declare_args() { +@@ -48,9 +48,9 @@ declare_args() { # libudev usage. This currently only affects the content layer. use_udev = is_linux && !is_chromecast - use_dbus = is_linux && !is_chromecast + use_dbus = (is_linux || is_bsd) && !is_chromecast - # Option controlling the use of GConf (the classic GNOME configuration - # system). -- use_gconf = is_linux && !is_chromeos && !is_chromecast -+ use_gconf = (is_linux || is_bsd) && !is_chromeos && !is_chromecast - - use_gio = is_linux && !is_chromeos && !is_chromecast + use_gio = (is_linux || is_bsd) && !is_chromeos && !is_chromecast - # Whether or not to use external popup menu. - use_external_popup_menu = is_android || is_mac + use_qt = false + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_linux_gtk2_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_linux_gtk2_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_linux_gtk2_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/build/config/linux/gtk2/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/linux/gtk2/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/linux/gtk2/BUILD.gn @@ -4,7 +4,7 @@ @@ -7,5 +7,5 @@ -assert(is_linux, "This file should only be referenced on Linux") +assert(is_linux || is_bsd, "This file should only be referenced on Linux") - # Depend on //build/config/linux/gtk2 to use GTKv2. - # + # Depend on //build/config/linux/gtk2 to use GTKv2. Depend on + # //build/config/linux/gtk to get GTK 2 or 3 depending on the build flags. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_linux_gtk3_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_linux_gtk3_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_linux_gtk3_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/build/config/linux/gtk3/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/linux/gtk3/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/linux/gtk3/BUILD.gn @@ -4,7 +4,7 @@ @@ -6,6 +6,6 @@ -assert(is_linux, "This file should only be referenced on Linux") +assert(is_linux || is_bsd, "This file should only be referenced on Linux") + assert(use_gtk, "This file should only be referenced when using GTK") - # Depend on //build/config/linux/gtk3 to use GTKv3. - # + # Depend on //build/config/linux/gtk3 to use GTKv3. Depend on Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_sanitizers_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_sanitizers_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_sanitizers_BUILD.gn @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/build/config/sanitizers/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/sanitizers/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/sanitizers/BUILD.gn -@@ -405,7 +405,7 @@ config("lsan_flags") { +@@ -408,7 +408,7 @@ config("lsan_flags") { config("msan_flags") { if (is_msan) { - assert(is_linux, "msan only supported on linux x86_64") + assert(is_linux || is_bsd, "msan only supported on linux x86_64") - msan_blacklist_path = - rebase_path("//tools/msan/blacklist.txt", root_build_dir) - cflags = [ -@@ -418,7 +418,7 @@ config("msan_flags") { + if (!defined(msan_blacklist_path)) { + msan_blacklist_path = + rebase_path("//tools/msan/blacklist.txt", root_build_dir) +@@ -423,7 +423,7 @@ config("msan_flags") { config("tsan_flags") { if (is_tsan) { - assert(is_linux, "tsan only supported on linux x86_64") + assert(is_linux || is_bsd, "tsan only supported on linux x86_64") - tsan_blacklist_path = - rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir) - cflags = [ + if (!defined(tsan_blacklist_path)) { + tsan_blacklist_path = + rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_sanitizers_sanitizers.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_sanitizers_sanitizers.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_sanitizers_sanitizers.gni @@ -1,14 +1,13 @@ ---- src/3rdparty/chromium/build/config/sanitizers/sanitizers.gni.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/config/sanitizers/sanitizers.gni.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/sanitizers/sanitizers.gni -@@ -54,8 +54,9 @@ declare_args() { +@@ -51,8 +51,8 @@ declare_args() { # See http://clang.llvm.org/docs/ControlFlowIntegrity.html # # TODO(pcc): Remove this flag if/when CFI is enabled in all official builds. - is_cfi = target_os == "linux" && !is_chromeos && target_cpu == "x64" && -- is_chrome_branded && is_official_build && allow_posix_link_time_opt +- is_official_build + is_cfi = (target_os == "linux" || target_os == "bsd") && !is_chromeos && -+ target_cpu == "x64" && is_chrome_branded && is_official_build && -+ allow_posix_link_time_opt ++ target_cpu == "x64" && is_official_build # Enable checks for bad casts: derived cast and unrelated cast. # TODO(krasin): remove this, when we're ready to add these checks by default. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_ui.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_ui.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_ui.gni @@ -1,29 +1,21 @@ ---- src/3rdparty/chromium/build/config/ui.gni +--- src/3rdparty/chromium/build/config/ui.gni.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/ui.gni -@@ -32,7 +32,7 @@ declare_args() { +@@ -28,15 +28,15 @@ declare_args() { # Indicates if Aura is enabled. Aura is a low-level windowing library, sort # of a replacement for GDI or GTK. -- use_aura = is_win || is_linux -+ use_aura = is_win || is_linux || is_bsd +- use_aura = is_win || is_linux || is_fuchsia ++ use_aura = is_win || is_linux || is_bsd || is_fuchsia + } - # True means the UI is built using the "views" framework. - toolkit_views = -@@ -48,7 +48,7 @@ declare_args() { - use_xkbcommon = false - + declare_args() { # Whether we should use glib, a low level C utility library. -- use_glib = is_linux -+ use_glib = is_linux || is_bsd +- use_glib = is_linux && !use_ozone ++ use_glib = (is_linux || is_bsd) && !use_ozone - # Indicates if Wayland display server support is enabled. - enable_wayland_server = is_chromeos -@@ -68,7 +68,7 @@ declare_args() { - ui_compositor_image_transport = use_aura && is_linux && !use_qt + # Indicates if the UI toolkit depends on X11. +- use_x11 = is_linux && !use_ozone ++ use_x11 = (is_linux || is_bsd) && !use_ozone + } - # Indicates if the UI toolkit depends on X11. --use_x11 = is_linux && !use_ozone -+use_x11 = (is_linux || is_bsd) && !use_ozone - - # Indicates if the UI toolkit depends on GTK. - use_gtk = use_x11 && !use_qt + declare_args() { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_gn__run__binary.py =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_gn__run__binary.py @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/build/gn_run_binary.py.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/build/gn_run_binary.py +@@ -19,7 +19,7 @@ path = './' + sys.argv[1] + # 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"}) + if ret != 0: + if ret <= -100: + # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_unbundle_libwebp.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_unbundle_libwebp.gn @@ -0,0 +1,25 @@ +--- src/3rdparty/chromium/build/linux/unbundle/libwebp.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/build/linux/unbundle/libwebp.gn +@@ -14,14 +14,15 @@ pkg_config("system_libwebp") { + } + + shim_headers("libwebp_shim") { +- root_path = "src" ++ root_path = "src/webp" ++ prefix = "webp/" + headers = [ +- "webp/decode.h", +- "webp/demux.h", +- "webp/encode.h", +- "webp/mux.h", +- "webp/mux_types.h", +- "webp/types.h", ++ "decode.h", ++ "demux.h", ++ "encode.h", ++ "mux.h", ++ "mux_types.h", ++ "types.h", + ] + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_gcc__toolchain.gni @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni -@@ -11,6 +11,11 @@ import("//build/toolchain/cc_wrapper.gni +@@ -11,6 +11,13 @@ import("//build/toolchain/clang_static_analyzer.gni") import("//build/toolchain/goma.gni") import("//build/toolchain/toolchain.gni") @@ -9,10 +9,12 @@ + extra_ldflags = "" +} + - # This template defines a toolchain for something that works like gcc - # (including clang). - # -@@ -482,14 +487,23 @@ template("clang_toolchain") { ++ ++ + if (is_nacl) { + # To keep NaCl variables out of builds that don't include NaCl, all + # variables defined in nacl/config.gni referenced here should be protected by +@@ -604,13 +611,23 @@ template("clang_toolchain") { } gcc_toolchain(target_name) { @@ -20,6 +22,9 @@ - cc = "$prefix/clang" - cxx = "$prefix/clang++" - ld = cxx +- readelf = "${toolprefix}readelf" +- ar = "${prefix}/llvm-ar" +- nm = "${toolprefix}nm" + if (is_bsd) { + cc = "${toolprefix}clang" + cxx = "${toolprefix}clang++" @@ -32,14 +37,11 @@ + cc = "$prefix/clang" + cxx = "$prefix/clang++" + ld = cxx - -- readelf = "${toolprefix}readelf" -- ar = "${toolprefix}ar" -- nm = "${toolprefix}nm" ++ + readelf = "${toolprefix}readelf" -+ ar = "${toolprefix}ar" ++ ar = "${prefix}/llvm-ar" + nm = "${toolprefix}nm" + } - forward_variables_from(invoker, [ "strip" ]) - + forward_variables_from(invoker, + [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/toolchain/get_concurrent_links.py.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/build/toolchain/get_concurrent_links.py.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/toolchain/get_concurrent_links.py -@@ -45,6 +45,14 @@ def _GetTotalMemoryInBytes(): +@@ -46,6 +46,14 @@ def _GetTotalMemoryInBytes(): return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize'])) except Exception: return 0 Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_linux_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_linux_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_linux_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/build/toolchain/linux/BUILD.gn.orig 2017-12-15 16:50:54.650099000 -0500 -+++ src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-12-15 16:50:13.910751000 -0500 -@@ -6,7 +6,9 @@ +--- src/3rdparty/chromium/build/toolchain/linux/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +@@ -6,7 +6,9 @@ import("//build/config/sysroot.gni") import("//build/toolchain/gcc_toolchain.gni") clang_toolchain("clang_arm") { @@ -11,14 +11,11 @@ toolchain_args = { current_cpu = "arm" current_os = "linux" -@@ -14,7 +16,9 @@ +@@ -14,7 +16,6 @@ clang_toolchain("clang_arm") { } clang_toolchain("clang_arm64") { - toolprefix = "aarch64-linux-gnu-" -+ if (!is_bsd) { -+ toolprefix = "aarch64-linux-gnu-" -+ } toolchain_args = { current_cpu = "arm64" current_os = "linux" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_BUILD.gn @@ -0,0 +1,22 @@ +--- src/3rdparty/chromium/cc/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/cc/BUILD.gn +@@ -550,7 +550,7 @@ cc_static_library("test_support") { + "//ui/gl:test_support", + "//ui/latency", + ] +- if (!is_android) { ++ if (!is_android && !is_bsd) { + data_deps = [ + "//third_party/mesa:osmesa", + ] +@@ -750,10 +750,6 @@ cc_test("cc_unittests") { + "//ui/gfx/geometry", + "//ui/gl", + "//ui/gl:test_support", +- ] +- +- data_deps = [ +- "//third_party/mesa:osmesa", + ] + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_layers_scrollbar__layer__impl__base.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_layers_scrollbar__layer__impl__base.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_layers_scrollbar__layer__impl__base.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/cc/layers/scrollbar_layer_impl_base.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/cc/layers/scrollbar_layer_impl_base.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/cc/layers/scrollbar_layer_impl_base.cc -@@ -174,8 +174,8 @@ gfx::Rect ScrollbarLayerImplBase::Comput +@@ -210,8 +210,8 @@ gfx::Rect ScrollbarLayerImplBase::ComputeThumbQuadRect int thumb_offset = TrackStart(); if (maximum > 0) { float ratio = clamped_current_pos / maximum; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_trees_property__tree.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_trees_property__tree.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_cc_trees_property__tree.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/cc/trees/property_tree.cc.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/cc/trees/property_tree.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/cc/trees/property_tree.cc -@@ -1113,13 +1113,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollO +@@ -1295,13 +1295,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollOffset(int scro - gfx::Size clip_layer_bounds = scroll_clip_layer_bounds(scroll_node->id); + gfx::Size clip_layer_bounds = container_bounds(scroll_node->id); - gfx::ScrollOffset max_offset( + gfx::ScrollOffset _max_offset( @@ -17,4 +17,4 @@ + return _max_offset; } - void ScrollTree::OnScrollOffsetAnimated(int layer_id, + void ScrollTree::OnScrollOffsetAnimated(ElementId id, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_BUILD.gn @@ -1,29 +1,47 @@ ---- src/3rdparty/chromium/chrome/BUILD.gn.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/chrome/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/BUILD.gn -@@ -132,7 +132,7 @@ if (!is_android && !is_mac) { - data = [ - "$root_out_dir/resources.pak", - ] -- if (is_linux || is_win) { -+ if (is_linux || is_bsd || is_win) { - data += [ - "$root_out_dir/chrome_100_percent.pak", - "$root_out_dir/locales/en-US.pak", -@@ -212,7 +212,7 @@ if (!is_android && !is_mac) { - sources += [ "app/chrome_exe_main_aura.cc" ] +@@ -29,7 +29,7 @@ import("//v8/gni/v8.gni") + + if (is_android) { + import("//build/config/android/rules.gni") +-} else if (is_linux) { ++} else if (is_linux || is_bsd) { + import("//build/linux/extract_symbols.gni") + } else if (is_mac) { + import("//build/compiled_action.gni") +@@ -115,7 +115,7 @@ if (!is_android && !is_mac) { + if (is_win) { + public_deps += [ ":reorder_imports" ] } +- if (use_aura && (is_win || is_linux)) { ++ if (use_aura && (is_win || is_linux || is_bsd)) { + data_deps += [ "//chrome/app:service_manifests" ] + } + if (is_chromeos) { +@@ -157,7 +157,7 @@ if (!is_android && !is_mac) { + deps += [ "//printing/buildflags" ] -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources += [ - "app/chrome_dll_resource.h", - "app/chrome_main.cc", -@@ -1539,7 +1539,7 @@ if (enable_resource_whitelist_generation + data += [ "$root_out_dir/resources.pak" ] +- if (is_linux || is_win) { ++ if (is_linux || is_win || is_bsd) { + data += [ + "$root_out_dir/chrome_100_percent.pak", + "$root_out_dir/locales/en-US.pak", +@@ -240,7 +240,7 @@ if (!is_android && !is_mac) { + } + } + +- if (is_linux) { ++ if (is_linux || is_bsd) { + sources += [ + "app/chrome_dll_resource.h", + "app/chrome_main.cc", +@@ -1825,7 +1825,7 @@ if (enable_resource_whitelist_generation) { } } -if (is_linux) { +if (is_linux || is_bsd) { - action("manpage") { - if (is_chrome_branded) { - name = "Google Chrome" + if (is_official_build) { + extract_symbols("linux") { + binary = "$root_out_dir/chrome" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_chromium__strings.grd @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/app/chromium_strings.grd.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/chrome/app/chromium_strings.grd.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/app/chromium_strings.grd -@@ -939,7 +939,7 @@ Signing in anyway will merge Chromium in +@@ -814,7 +814,7 @@ Signing in anyway will merge Chromium information like @@ -8,4 +8,13 @@ + The profile appears to be in use by another Chromium process ($112345) on another computer ($2example.com). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium. + +@@ -1056,7 +1056,7 @@ Please check your email at $2 + + + +- ++ + + Restart Chromium to enable $1Flash Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_generated__resources.grd @@ -1,38 +1,29 @@ ---- src/3rdparty/chromium/chrome/app/generated_resources.grd.orig 2017-01-26 00:49:07 UTC +--- src/3rdparty/chromium/chrome/app/generated_resources.grd.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/app/generated_resources.grd -@@ -6939,7 +6939,7 @@ Keep your key file in a safe place. You - - Right-to-left - -- -+ - - Enable Input IME API +@@ -5208,7 +5208,7 @@ the Bookmarks menu."> -@@ -10334,7 +10334,7 @@ I don't think this site should be blocke - - Appearance + + +- ++ + + + Hold |$1Ctrl|+|$2Shift|+|$3Q| to exit +@@ -6064,7 +6064,7 @@ the Bookmarks menu."> + Google Pay -- -+ - - Themes - -@@ -10342,7 +10342,7 @@ I don't think this site should be blocke - - Reset to default theme - + - -+ - - Use GTK+ theme ++ + + Use system title bar and borders -@@ -11663,7 +11663,7 @@ Tell us what happened exactly before you +@@ -6895,7 +6895,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - -+ - - Use system title bar and borders ++ + + Minimize Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_google__chrome__strings.grd =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_google__chrome__strings.grd @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/app/google_chrome_strings.grd.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/app/google_chrome_strings.grd +@@ -825,7 +825,7 @@ Signing in anyway will merge Chrome information like b + + + +- ++ + + The profile appears to be in use by another Google Chrome process ($112345) on another computer ($2example.com). Chrome has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome. + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_resources_locale__settings.grd =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_resources_locale__settings.grd +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chrome/app/resources/locale_settings.grd.orig 2017-01-26 00:49:08 UTC -+++ src/3rdparty/chromium/chrome/app/resources/locale_settings.grd -@@ -151,7 +151,7 @@ - 55 - - -- -+ - - - 300 Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_settings__strings.grdp =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_settings__strings.grdp @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/app/settings_strings.grdp.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/app/settings_strings.grdp +@@ -508,7 +508,7 @@ + Themes + + +- ++ + + GTK+ + +@@ -522,7 +522,7 @@ + Use Classic + + +- ++ + + Reset to default + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_theme_chrome__unscaled__resources.grd =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_app_theme_chrome__unscaled__resources.grd @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/app/theme/chrome_unscaled_resources.grd.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/app/theme/chrome_unscaled_resources.grd +@@ -88,7 +88,7 @@ + + + +- ++ + + + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_BUILD.gn @@ -1,20 +1,49 @@ ---- src/3rdparty/chromium/chrome/browser/BUILD.gn.orig 2017-01-26 00:49:08 UTC +--- src/3rdparty/chromium/chrome/browser/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/BUILD.gn -@@ -2142,7 +2142,7 @@ split_static_library("browser") { - deps += [ "//device/udev_linux" ] +@@ -3138,7 +3138,7 @@ jumbo_split_static_library("browser") { + ] } -- if (is_linux && !is_chromeos) { -+ if ((is_linux || is_bsd) && !is_chromeos) { - deps += [ "//third_party/speech-dispatcher" ] - } - -@@ -3507,7 +3507,7 @@ split_static_library("browser") { - } - } - - if (is_linux) { + if (is_linux || is_bsd) { if (use_aura) { - deps += [ "//build/linux:fontconfig" ] + deps += [ "//third_party/fontconfig" ] if (use_dbus) { +@@ -3149,7 +3149,10 @@ jumbo_split_static_library("browser") { + configs += [ "//build/config/linux:x11" ] + deps += [ "//ui/gfx/x" ] + } +- deps += [ "//services/service_manager/zygote" ] ++ ++ if (is_linux) { ++ deps += [ "//services/service_manager/zygote" ] ++ } + } + + if (is_desktop_linux) { +@@ -3230,7 +3233,7 @@ jumbo_split_static_library("browser") { + sources += [ "hang_monitor/hang_crash_dump.cc" ] + } + +- if (is_win || is_linux) { ++ if (is_win || is_linux || is_bsd) { + sources += [ + "renderer_context_menu/spelling_options_submenu_observer.cc", + "renderer_context_menu/spelling_options_submenu_observer.h", +@@ -3313,14 +3316,14 @@ jumbo_split_static_library("browser") { + ] + } + +- if (is_win || is_mac || (is_linux && !is_chromeos)) { ++ if (is_win || is_mac || ((is_linux || is_bsd) && !is_chromeos)) { + sources += [ + "password_manager/password_store_signin_notifier_impl.cc", + "password_manager/password_store_signin_notifier_impl.h", + ] + } + +- if (is_win || is_mac || is_linux) { ++ if (is_win || is_mac || is_linux || is_bsd) { + sources += [ + "payments/chrome_payment_request_delegate.cc", + "payments/chrome_payment_request_delegate.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_devtools_devtools__eye__dropper.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_devtools_devtools__eye__dropper.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/devtools/devtools_eye_dropper.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/browser/devtools/devtools_eye_dropper.cc +@@ -211,7 +211,7 @@ void DevToolsEyeDropper::UpdateCursor() { + // 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; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_BUILD.gn @@ -1,24 +1,20 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/BUILD.gn.orig 2017-01-26 00:49:08 UTC +--- src/3rdparty/chromium/chrome/browser/extensions/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/extensions/BUILD.gn -@@ -1024,7 +1024,7 @@ static_library("extensions") { - sources -= [ "global_shortcut_listener_ozone.cc" ] +@@ -1051,7 +1051,7 @@ jumbo_static_library("extensions") { + ] } - if (is_linux) { + if (is_linux || is_bsd) { - deps += [ "//build/linux:fontconfig" ] + deps += [ "//third_party/fontconfig" ] if (use_dbus) { -@@ -1115,6 +1115,12 @@ static_library("extensions") { - defines += [ "ENABLE_HOTWORDING" ] +@@ -1114,7 +1114,7 @@ jumbo_static_library("extensions") { + ] } -+ if (is_bsd) { -+ sources -= [ -+ "api/image_writer_private/removable_storage_provider_linux.cc", -+ ] -+ } -+ - if (enable_service_discovery) { +- if (is_win || (is_linux && !is_chromeos)) { ++ if (is_win || ((is_linux || is_bsd) && !is_chromeos)) { sources += [ - "api/gcd_private/gcd_private_api.cc", + "api/input_ime/input_ime_api.cc", + "api/input_ime/input_ime_api.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc @@ -1,12 +1,11 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc.orig 2017-01-26 00:49:08 UTC +--- src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc -@@ -166,10 +166,12 @@ ImageWriterPrivateListRemovableStorageDe +@@ -137,9 +137,11 @@ ImageWriterPrivateListRemovableStorageDevicesFunction: } bool ImageWriterPrivateListRemovableStorageDevicesFunction::RunAsync() { +#if !defined(OS_FREEBSD) - RemovableStorageProvider::GetAllDevices( - base::Bind( + RemovableStorageProvider::GetAllDevices(base::BindOnce( &ImageWriterPrivateListRemovableStorageDevicesFunction::OnDeviceListReady, this)); +#endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2018-12-29 18:13:15 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc +@@ -20,6 +20,7 @@ static base::LazyInstancePostTask( + FROM_HERE, +@@ -33,6 +34,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis + base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, + base::BindOnce(&RemovableStorageProvider::PopulateDeviceList), + std::move(callback)); ++#else ++ NOTIMPLEMENTED(); ++#endif + } + + // static Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_input__ime_input__ime__api.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_input__ime_input__ime__api.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_input__ime_input__ime__api.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/api/input_ime/input_ime_api.h.orig 2017-01-26 00:49:08 UTC +--- src/3rdparty/chromium/chrome/browser/extensions/api/input_ime/input_ime_api.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/extensions/api/input_ime/input_ime_api.h -@@ -28,7 +28,7 @@ +@@ -31,7 +31,7 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_messaging_message__service.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_messaging_message__service.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_messaging_message__service.cc @@ -1,35 +0,0 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/api/messaging/message_service.cc.orig 2017-01-26 00:49:08 UTC -+++ src/3rdparty/chromium/chrome/browser/extensions/api/messaging/message_service.cc -@@ -119,7 +119,7 @@ MessageService::PolicyPermission Message - - const char kReceivingEndDoesntExistError[] = - "Could not establish connection. Receiving end does not exist."; --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - const char kMissingPermissionError[] = - "Access to native messaging requires nativeMessaging permission."; - const char kProhibitedByPoliciesError[] = -@@ -414,7 +414,7 @@ void MessageService::OpenChannelToNative - if (!source) - return; - --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - content::WebContents* web_contents = - content::WebContents::FromRenderFrameHost(source); - ExtensionWebContentsObserver* extension_web_contents_observer = -@@ -477,12 +477,12 @@ void MessageService::OpenChannelToNative - channel->opener->IncrementLazyKeepaliveCount(); - - AddChannel(std::move(channel), receiver_port_id); --#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) -+#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)) - const char kNativeMessagingNotSupportedError[] = - "Native Messaging is not supported on this platform."; - DispatchOnDisconnect( - source, receiver_port_id, kNativeMessagingNotSupportedError); --#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) -+#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)) - } - - void MessageService::OpenChannelToTab(int source_process_id, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_music__manager__private_device__id__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_music__manager__private_device__id__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_music__manager__private_device__id__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc.orig 2017-01-26 00:49:08 UTC +--- src/3rdparty/chromium/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc @@ -4,6 +4,10 @@ @@ -11,7 +11,7 @@ #include #include #include -@@ -105,11 +109,33 @@ class MacAddressProcessor { +@@ -106,11 +110,33 @@ class MacAddressProcessor { const char* const prefixes[], size_t prefixes_count) { const int MAC_LENGTH = 6; @@ -35,7 +35,7 @@ + !strncmp(ifinfo->ifa_name, ifaddr->ifa_name, + sizeof(ifinfo->ifa_name) - 1)) { + result = 0; -+ break; ++ break; + } + } + @@ -46,7 +46,7 @@ int sd = socket(AF_INET, SOCK_DGRAM, 0); int result = ioctl(sd, SIOCGIFHWADDR, &ifinfo); close(sd); -@@ -119,11 +145,17 @@ class MacAddressProcessor { +@@ -120,11 +146,17 @@ class MacAddressProcessor { const char* mac_address = static_cast(ifinfo.ifr_hwaddr.sa_data); @@ -55,7 +55,7 @@ return true; +#if defined(OS_FREEBSD) -+ if (!IsValidPrefix(ifinfo->ifa_name, prefixes, prefixes_count)) ++ if (!IsValidPrefix(ifinfo.ifa_name, prefixes, prefixes_count)) + return true; +#else if (!IsValidPrefix(ifinfo.ifr_name, prefixes, prefixes_count)) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_omnibox_omnibox__api.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_omnibox_omnibox__api.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc.orig 2017-01-26 00:49:08 UTC -+++ src/3rdparty/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc -@@ -45,7 +45,7 @@ const char kBackgroundTabDisposition[] = - // Pref key for omnibox.setDefaultSuggestion. - const char kOmniboxDefaultSuggestion[] = "omnibox_default_suggestion"; - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - static const int kOmniboxIconPaddingLeft = 2; - static const int kOmniboxIconPaddingRight = 2; - #elif defined(OS_MACOSX) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc +@@ -271,6 +271,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor + info->os = extensions::api::runtime::PLATFORM_OS_CROS; + } else if (strcmp(os, "linux") == 0) { + info->os = extensions::api::runtime::PLATFORM_OS_LINUX; ++ } else if (strcmp(os, "freebsd") == 0) { ++ info->os = extensions::api::runtime::PLATFORM_OS_FREEBSD; + } else if (strcmp(os, "openbsd") == 0) { + info->os = extensions::api::runtime::PLATFORM_OS_OPENBSD; + } else { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/browser/extensions/api/settings_private/prefs_util.cc +@@ -127,7 +127,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist + settings_api::PrefType::PREF_TYPE_BOOLEAN; + (*s_whitelist)[bookmarks::prefs::kShowBookmarkBar] = + settings_api::PrefType::PREF_TYPE_BOOLEAN; +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) + (*s_whitelist)[::prefs::kUseCustomChromeFrame] = + settings_api::PrefType::PREF_TYPE_BOOLEAN; + #endif +@@ -137,7 +137,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist + // Appearance settings. + (*s_whitelist)[::prefs::kCurrentThemeID] = + settings_api::PrefType::PREF_TYPE_STRING; +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) + (*s_whitelist)[::prefs::kUsesSystemTheme] = + settings_api::PrefType::PREF_TYPE_BOOLEAN; + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_safe__browsing_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_safe__browsing_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_safe__browsing_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/chrome/browser/resources/safe_browsing/BUILD.gn.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/browser/resources/safe_browsing/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/resources/safe_browsing/BUILD.gn @@ -29,6 +29,8 @@ action("make_file_types_protobuf") { target_arch = "mac" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_safe__browsing_gen__file__type__proto.py =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_safe__browsing_gen__file__type__proto.py +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_resources_safe__browsing_gen__file__type__proto.py @@ -1,19 +1,19 @@ ---- src/3rdparty/chromium/chrome/browser/resources/safe_browsing/gen_file_type_proto.py.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/browser/resources/safe_browsing/gen_file_type_proto.py.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/resources/safe_browsing/gen_file_type_proto.py -@@ -50,6 +50,7 @@ def PlatformTypes(): - "android": config_pb2.DownloadFileType.PLATFORM_ANDROID, - "chromeos": config_pb2.DownloadFileType.PLATFORM_CHROME_OS, - "linux": config_pb2.DownloadFileType.PLATFORM_LINUX, -+ "bsd": config_pb2.DownloadFileType.PLATFORM_LINUX, - "mac": config_pb2.DownloadFileType.PLATFORM_MAC, - "win": config_pb2.DownloadFileType.PLATFORM_WINDOWS, +@@ -31,6 +31,7 @@ def PlatformTypes(): + "android": download_file_types_pb2.DownloadFileType.PLATFORM_ANDROID, + "chromeos": download_file_types_pb2.DownloadFileType.PLATFORM_CHROME_OS, + "linux": download_file_types_pb2.DownloadFileType.PLATFORM_LINUX, ++ "bsd": download_file_types_pb2.DownloadFileType.PLATFORM_LINUX, + "mac": download_file_types_pb2.DownloadFileType.PLATFORM_MAC, + "win": download_file_types_pb2.DownloadFileType.PLATFORM_WINDOWS, } -@@ -201,7 +202,7 @@ def main(): - 'Outfile must have a %d for version and %s for platform.') - parser.add_option('-t', '--type', - help='The platform type. One of android, chromeos, ' + -- 'linux, mac, win') -+ 'linux, bsd, mac, win') - parser.add_option('-i', '--infile', - help='The ASCII DownloadFileType-proto file to read.') - parser.add_option('-d', '--outdir', +@@ -169,7 +170,7 @@ class DownloadFileTypeProtoGenerator(BinaryProtoGenera + 'Outfile must have a %d for version and %s for platform.') + parser.add_option('-t', '--type', + help='The platform type. One of android, chromeos, ' + +- 'linux, mac, win') ++ 'linux, bsd, mac, win') + + def AddExtraCommandLineArgsForVirtualEnvRun(self, opts, command): + if opts.type is not None: Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_BUILD.gn @@ -1,11 +1,47 @@ ---- src/3rdparty/chromium/chrome/browser/ui/BUILD.gn.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/browser/ui/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/ui/BUILD.gn -@@ -3090,7 +3090,7 @@ split_static_library("ui") { - ] +@@ -2359,7 +2359,7 @@ split_static_library("ui") { + ] + } + +- if (is_win || is_linux) { ++ if (is_win || is_linux || is_bsd) { + sources += [ + "input_method/input_method_engine_base.cc", + "input_method/input_method_engine_base.h", +@@ -2377,7 +2377,7 @@ split_static_library("ui") { } } + +- if (is_mac || is_win || (is_linux && !is_chromeos)) { ++ if (is_mac || is_win || ((is_linux || is_bsd) && !is_chromeos)) { + sources += [ + "confirm_quit.cc", + "confirm_quit.h", +@@ -2743,7 +2743,7 @@ split_static_library("ui") { + # to fail on this variant. Since this target is only referenced (but not + # compiled) on this variant, it's okay to add this "incorrect" dependency + # to Cast Linux builds so that `gn check` passes. +- if (toolkit_views || (is_chromecast && is_linux)) { ++ if (toolkit_views || (is_chromecast && (is_linux || is_bsd))) { + public_deps += [ + "//ui/views", + "//ui/views/controls/webview", +@@ -2804,7 +2804,7 @@ split_static_library("ui") { + } + } + - if (is_linux) { # Both desktop Linux and ChromeOS. + if (is_linux || is_bsd) { # Both desktop Linux and ChromeOS. sources += [ "certificate_dialogs.cc", "certificate_dialogs.h", +@@ -3444,7 +3444,7 @@ split_static_library("ui") { + sources += [ "views/chrome_views_delegate_linux.cc" ] + } + +- if (is_linux) { ++ if (is_linux || is_bsd) { + sources += [ + "views/frame/browser_command_handler_linux.cc", + "views/frame/browser_command_handler_linux.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_libgtkui_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_libgtkui_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_libgtkui_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/chrome/browser/ui/libgtkui/BUILD.gn.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/browser/ui/libgtkui/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/browser/ui/libgtkui/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be @@ -8,4 +8,4 @@ +assert(is_linux || is_bsd, "This file should only be referenced on Linux") import("//build/config/features.gni") - import("//build/config/ui.gni") + import("//build/config/linux/gtk/gtk.gni") Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_about__ui.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/about_ui.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/about_ui.cc +@@ -391,7 +391,7 @@ std::string ChromeURLs() { + return html; + } + +-#if defined(OS_LINUX) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) || defined(OS_BSD) + std::string AboutLinuxProxyConfig() { + std::string data; + AppendHeader(&data, 0, +@@ -446,7 +446,7 @@ void AboutUIHTMLSource::StartDataRequest( + .GetRawDataResource(idr) + .as_string(); + } +-#if defined(OS_LINUX) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) || defined(OS_BSD) + } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) { + response = AboutLinuxProxyConfig(); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -0,0 +1,49 @@ +--- src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +@@ -188,11 +188,11 @@ + #include "chrome/browser/ui/webui/welcome_win10_ui.h" + #endif + +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + #include "chrome/browser/ui/webui/discards/discards_ui.h" + #endif + +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + #include "chrome/browser/ui/webui/sandbox_internals_ui.h" + #endif + +@@ -320,7 +320,7 @@ bool IsAboutUI(const GURL& url) { + #if !defined(OS_ANDROID) + || url.host_piece() == chrome::kChromeUITermsHost + #endif +-#if defined(OS_LINUX) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) || defined(OS_BSD) + || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost + #endif + #if defined(OS_CHROMEOS) +@@ -569,7 +569,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + if (url.host_piece() == chrome::kChromeUINaClHost) + return &NewWebUI; + #endif +-#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) ++#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) || defined(OS_BSD) + if (url.host_piece() == chrome::kChromeUITabModalConfirmDialogHost) + return &NewWebUI; + #endif +@@ -630,12 +630,12 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + return &NewWebUI; + } + #endif +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + if (url.host_piece() == chrome::kChromeUISandboxHost) { + return &NewWebUI; + } + #endif +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + if (url.host_piece() == chrome::kChromeUIDiscardsHost) + return &NewWebUI; + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/common/BUILD.gn.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/common/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/common/BUILD.gn -@@ -243,6 +243,13 @@ static_library("common") { +@@ -295,6 +295,13 @@ static_library("common") { public_deps += [ "//ppapi/shared_impl" ] } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/common/chrome_paths.h.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/common/chrome_paths.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/common/chrome_paths.h -@@ -49,7 +49,7 @@ enum { +@@ -51,7 +51,7 @@ enum { // to set policies for chrome. This directory // contains subdirectories. #endif @@ -9,7 +9,7 @@ defined(OS_MACOSX) DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions // on Chrome Mac and Chromium Linux. -@@ -58,7 +58,7 @@ enum { +@@ -60,7 +60,7 @@ enum { // create it. #endif @@ -18,7 +18,7 @@ DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' // definition manifest files that // describe extensions which are to be -@@ -112,7 +112,7 @@ enum { +@@ -111,7 +111,7 @@ enum { DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, // Directory where sanitized // supervised user whitelists are // installed. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/common/chrome_paths.cc.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/common/chrome_paths.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/common/chrome_paths.cc -@@ -197,7 +197,7 @@ bool PathProvider(int key, base::FilePat +@@ -193,7 +193,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: @@ -9,7 +9,7 @@ if (!GetUserDownloadsDirectorySafe(&cur)) return false; break; -@@ -480,10 +480,12 @@ bool PathProvider(int key, base::FilePat +@@ -472,10 +472,12 @@ bool PathProvider(int key, base::FilePath* result) { if (!base::PathExists(cur)) // We don't want to create this return false; break; @@ -23,7 +23,7 @@ #else cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies")); #endif -@@ -534,7 +536,7 @@ bool PathProvider(int key, base::FilePat +@@ -526,7 +528,7 @@ bool PathProvider(int key, base::FilePath* result) { #endif break; @@ -32,7 +32,7 @@ case chrome::DIR_NATIVE_MESSAGING: #if defined(OS_MACOSX) #if defined(GOOGLE_CHROME_BUILD) -@@ -548,6 +550,9 @@ bool PathProvider(int key, base::FilePat +@@ -540,6 +542,9 @@ bool PathProvider(int key, base::FilePath* result) { #if defined(GOOGLE_CHROME_BUILD) cur = base::FilePath(FILE_PATH_LITERAL( "/etc/opt/chrome/native-messaging-hosts")); @@ -42,7 +42,7 @@ #else cur = base::FilePath(FILE_PATH_LITERAL( "/etc/chromium/native-messaging-hosts")); -@@ -560,7 +565,7 @@ bool PathProvider(int key, base::FilePat +@@ -552,7 +557,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts")); break; @@ -50,4 +50,4 @@ +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) #if !defined(OS_ANDROID) case chrome::DIR_GLOBAL_GCM_STORE: - if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__paths__internal.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/common/chrome_paths_internal.h.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/common/chrome_paths_internal.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/common/chrome_paths_internal.h -@@ -39,7 +39,7 @@ void GetUserCacheDirectory(const base::F +@@ -45,7 +45,7 @@ void GetUserCacheDirectory(const base::FilePath& profi // Get the path to the user's documents directory. bool GetUserDocumentsDirectory(base::FilePath* result); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.h @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/chrome/common/chrome_switches.h.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/common/chrome_switches.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/common/chrome_switches.h -@@ -385,7 +385,7 @@ extern const char kAllowNaClSocketAPI[]; - extern const char kEnableWaylandServer[]; +@@ -302,7 +302,7 @@ extern const char kAllowNaClFileHandleAPI[]; + extern const char kAllowNaClSocketAPI[]; #endif -#if defined(OS_WIN) || defined(OS_LINUX) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_chrome__switches.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/chrome/common/chrome_switches.cc.orig 2017-01-26 00:49:09 UTC +--- src/3rdparty/chromium/chrome/common/chrome_switches.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/common/chrome_switches.cc -@@ -1263,7 +1263,7 @@ const char kAllowNaClSocketAPI[] - const char kEnableWaylandServer[] = "enable-wayland-server"; +@@ -987,7 +987,7 @@ const char kAllowNaClFileHandleAPI[] = "allow-n + const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api"; #endif -#if defined(OS_WIN) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) - extern const char kDisableInputImeAPI[] = "disable-input-ime-api"; - extern const char kEnableInputImeAPI[] = "enable-input-ime-api"; + const char kDisableInputImeAPI[] = "disable-input-ime-api"; + const char kEnableInputImeAPI[] = "enable-input-ime-api"; #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_extensions_api_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_extensions_api_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chrome/common/extensions/api/BUILD.gn.orig 2017-12-15 17:02:55.964660000 -0500 -+++ src/3rdparty/chromium/chrome/common/extensions/api/BUILD.gn 2017-12-15 17:03:23.878684000 -0500 -@@ -117,7 +117,7 @@ - "wallpaper.json", - "wallpaper_private.json", - ] --} else if (is_linux || is_win) { -+} else if (is_linux || is_bsd || is_win) { - schema_sources += [ "input_ime.json" ] - } - if (enable_service_discovery) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_features.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_features.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_features.gni @@ -1,11 +1,14 @@ ---- src/3rdparty/chromium/chrome/common/features.gni.orig 2017-01-26 00:49:10 UTC +--- src/3rdparty/chromium/chrome/common/features.gni.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/common/features.gni -@@ -43,7 +43,7 @@ declare_args() { - enable_hotwording = is_chrome_branded && is_chromeos +@@ -46,9 +46,9 @@ declare_args() { + (is_desktop_linux && use_dbus) || is_chromeos enable_one_click_signin = - is_win || is_mac || (is_linux && !is_chromeos && !is_chromecast) + is_win || is_mac || is_bsd || (is_linux && !is_chromeos && !is_chromecast) - # Set to true to bundle all the mash related mojo services into chrome. - # Specify --mash to chrome to have chrome start the mash environment. +- enable_service_discovery = enable_mdns || is_mac ++ enable_service_discovery = enable_mdns || is_mac || is_bsd + + # Enables use of the session service, which is enabled by default. + # Android stores them separately on the Java side. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.cc @@ -0,0 +1,41 @@ +--- src/3rdparty/chromium/chrome/common/webui_url_constants.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/common/webui_url_constants.cc +@@ -239,7 +239,7 @@ const char kChromeUICastHost[] = "cast"; + const char kChromeUICastURL[] = "chrome://cast/"; + #endif + +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + const char kChromeUIDiscardsHost[] = "discards"; + const char kChromeUIDiscardsURL[] = "chrome://discards/"; + #endif +@@ -248,11 +248,11 @@ const char kChromeUIDiscardsURL[] = "chrome://discards + const char kChromeUILinuxProxyConfigHost[] = "linux-proxy-config"; + #endif + +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + const char kChromeUISandboxHost[] = "sandbox"; + #endif + +-#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) ++#if ((defined(OS_BSD) || defined(OS_LINUX)) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) + const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; + #endif + +@@ -404,13 +404,13 @@ const char* const kChromeHostURLs[] = { + kChromeUIInternetDetailDialogHost, + kChromeUIAssistantOptInHost, + #endif +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + kChromeUIDiscardsHost, + #endif + #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) + kChromeUILinuxProxyConfigHost, + #endif +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + kChromeUISandboxHost, + #endif + #if defined(OS_WIN) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.h.orig 2017-01-26 00:49:10 UTC +--- src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.h @@ -14,7 +14,7 @@ #include "ppapi/c/private/pp_private_font_charset.h" @@ -6,15 +6,15 @@ -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_LINUX) || defined(OS_BSD) - #include "base/files/scoped_file.h" + #include "base/files/file.h" #elif defined(OS_WIN) #include "third_party/skia/include/core/SkRefCnt.h" -@@ -50,7 +50,7 @@ class PepperFlashFontFileHost : public p +@@ -50,7 +50,7 @@ class PepperFlashFontFileHost : public ppapi::host::Re uint32_t table); bool GetFontData(uint32_t table, void* buffer, size_t* length); --#if defined(OS_LINUX) || defined(OS_OPENBSD) +-#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - base::ScopedFD fd_; + base::File font_file_; #elif defined(OS_WIN) sk_sp typeface_; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_renderer_pepper_pepper__flash__font__file__host.cc @@ -1,38 +1,29 @@ ---- src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.cc.orig 2017-01-26 00:49:10 UTC +--- src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chrome/renderer/pepper/pepper_flash_font_file_host.cc -@@ -14,7 +14,7 @@ +@@ -15,7 +15,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_structs.h" -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_LINUX) || defined(OS_BSD) - #include "content/public/common/child_process_sandbox_support_linux.h" + #include "components/services/font/public/cpp/font_loader.h" + #include "content/public/common/common_sandbox_support_linux.h" #elif defined(OS_WIN) - #include "third_party/skia/include/ports/SkFontMgr.h" -@@ -27,7 +27,7 @@ PepperFlashFontFileHost::PepperFlashFont +@@ -29,7 +29,7 @@ PepperFlashFontFileHost::PepperFlashFontFileHost( const ppapi::proxy::SerializedFontDescription& description, PP_PrivateFontCharset charset) : ResourceHost(host->GetPpapiHost(), instance, resource) { --#if defined(OS_LINUX) || defined(OS_OPENBSD) +-#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - fd_.reset(content::MatchFontWithFallback( - description.face, - description.weight >= PP_BROWSERFONT_TRUSTED_WEIGHT_BOLD, -@@ -44,7 +44,7 @@ PepperFlashFontFileHost::PepperFlashFont - sk_sp font_mgr(SkFontMgr::RefDefault()); - typeface_ = sk_sp( - font_mgr->matchFamilyStyle(description.face.c_str(), style)); --#endif // defined(OS_LINUX) || defined(OS_OPENBSD) -+#endif // defined(OS_LINUX) || defined(OS_BSD) - } - - PepperFlashFontFileHost::~PepperFlashFontFileHost() {} -@@ -63,7 +63,7 @@ bool PepperFlashFontFileHost::GetFontDat + // The global SkFontConfigInterface is configured and initialized with a + // SkFontconfigInterface compatible font_service::FontLoader in + // RendererBlinkPlatformImpl (called from RenderThreadImpl::Init) at startup +@@ -74,7 +74,7 @@ bool PepperFlashFontFileHost::GetFontData(uint32_t tab void* buffer, size_t* length) { bool result = false; --#if defined(OS_LINUX) || defined(OS_OPENBSD) +-#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - int fd = fd_.get(); - if (fd != -1) - result = content::GetFontTable(fd, table, 0 /* offset */, + if (font_file_.IsValid()) { + result = content::GetFontTable(font_file_.GetPlatformFile(), table, + 0 /* offset */, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_test_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_test_BUILD.gn +++ /dev/null @@ -1,158 +0,0 @@ ---- src/3rdparty/chromium/chrome/test/BUILD.gn.orig 2017-12-15 16:54:01.114272000 -0500 -+++ src/3rdparty/chromium/chrome/test/BUILD.gn 2017-12-15 17:01:33.586269000 -0500 -@@ -186,7 +186,7 @@ - ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - public_deps += [ "//crypto:platform" ] - } - if (is_mac) { -@@ -396,7 +396,7 @@ - "$root_out_dir/test_page.css.mock-http-headers", - "$root_out_dir/ui_test.pak", - ] -- if (is_linux || is_win) { -+ if (is_linux || is_bsd || is_win) { - data += [ - "$root_out_dir/chrome_100_percent.pak", - "$root_out_dir/chrome_200_percent.pak", -@@ -405,7 +405,7 @@ - "$root_out_dir/resources.pak", - ] - } -- if (is_linux) { -+ if (is_linux || is_bsd) { - data += [ "$root_out_dir/libppapi_tests.so" ] - } - -@@ -512,7 +512,7 @@ - "base/interactive_test_utils_views.cc", - ] - } -- if (is_linux) { -+ if (is_linux || is_bsd) { - if (!is_chromeos) { - # Desktop linux. - sources -= [ -@@ -1890,14 +1890,14 @@ - sources += [ "//third_party/liblouis/nacl_wrapper/liblouis_wrapper_browsertest.cc" ] - deps += [ "//chrome/browser/chromeos" ] - data_deps += [ "//third_party/liblouis:liblouis_test_data" ] -- } else if (is_linux || is_win) { -+ } else if (is_linux || is_bsd || is_win) { - sources += [ - "../browser/ui/views/ime/ime_warning_bubble_browsertest.cc", - "../browser/ui/views/ime/ime_window_browsertest.cc", - ] - } - -- if (is_win || is_linux) { -+ if (is_win || is_linux || is_bsd) { - sources += [ "../browser/nacl_host/test/nacl_gdb_browsertest.cc" ] - data_deps += [ "//chrome/browser/nacl_host/test:mock_nacl_gdb" ] - } -@@ -1909,7 +1909,7 @@ - configs += - [ "//build/config/win:default_large_module_incremental_linking" ] - } -- if (is_linux) { -+ if (is_linux || is_bsd) { - data_deps += [ "//components/nacl/loader:nacl_helper" ] - - if (enable_nacl_nonsfi) { -@@ -2016,7 +2016,7 @@ - } - } - -- if (is_linux && !is_component_build) { -+ if ((is_linux || is_bsd) && !is_component_build) { - # Set rpath to find the CDM adapter even in a non-component build. - configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] - } -@@ -2243,7 +2243,7 @@ - if (toolkit_views) { - sources -= [ "../browser/ui/views/select_file_dialog_extension_browsertest.cc" ] - } -- if (is_win || is_linux) { -+ if (is_win || is_linux || is_bsd) { - sources += - [ "../browser/ui/views/ime/input_ime_apitest_nonchromeos.cc" ] - } -@@ -2438,7 +2438,7 @@ - "../browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc", - ] - } -- if (is_mac || is_win || (is_linux && !is_chromeos)) { -+ if (is_mac || is_win || is_bsd || (is_linux && !is_chromeos)) { - sources += [ - # Tests for non mobile and non CrOS (includes Linux, Win, Mac). - "../browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc", -@@ -2626,7 +2626,7 @@ - "$root_out_dir/pyproto/", - ] - -- if (is_linux || is_win) { -+ if (is_linux || is_bsd || is_win) { - data += [ - "$root_out_dir/chrome_100_percent.pak", - "$root_out_dir/chrome_200_percent.pak", -@@ -3991,7 +3991,7 @@ - "//ui/wm", - ] - } -- if (!is_chromeos && is_linux) { -+ if (!is_chromeos && (is_linux || is_bsd)) { - sources += [ - "../browser/password_manager/native_backend_kwallet_x_unittest.cc", - "../browser/shell_integration_linux_unittest.cc", -@@ -4011,7 +4011,7 @@ - if (use_gio) { - deps += [ "//build/linux/libgio" ] - } -- if (!is_chromeos && !use_ozone && is_linux && use_gtk) { -+ if (!is_chromeos && !use_ozone && (is_linux || is_bsd) && use_gtk) { - if (use_gtk3) { - deps += [ "//chrome/browser/ui/libgtkui:libgtk3ui" ] - } else { -@@ -4305,18 +4305,18 @@ - "//components/os_crypt:gnome_keyring_direct", - ] - } -- if (is_linux && !is_chromeos && !use_ozone) { -+ if ((is_linux || is_bsd) && !is_chromeos && !use_ozone) { - sources += - [ "../browser/password_manager/native_backend_libsecret_unittest.cc" ] - deps += [ "//third_party/libsecret" ] - } -- if (is_linux && use_aura) { -+ if ((is_linux || is_bsd) && use_aura) { - deps += [ "//ui/aura:test_support" ] - if (use_dbus) { - deps += [ "//dbus:test_support" ] - } - } -- if (is_linux && is_chrome_branded && current_cpu == "x86") { -+ if ((is_linux || is_bsd) && is_chrome_branded && current_cpu == "x86") { - ldflags = [ "-Wl,--strip-debug" ] - } - if (is_mac) { -@@ -4822,7 +4822,7 @@ - } - } - --if (!is_android) { -+if (!is_android && !is_bsd) { - # TODO(609855): Make this compile on Android and run on the bots. - test("chrome_app_unittests") { - sources = [ -@@ -4848,7 +4848,7 @@ - } - } - --if (!is_android && !is_ios && !is_chromecast) { -+if (!is_android && !is_ios && !is_chromecast && !is_bsd) { - test("performance_browser_tests") { - sources = [ - "../app/chrome_version.rc.version", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_BUILD.gn @@ -1,11 +1,28 @@ ---- src/3rdparty/chromium/chromecast/BUILD.gn.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/chromecast/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chromecast/BUILD.gn -@@ -51,7 +51,7 @@ cast_test_group("cast_tests") { - tests += [ "//gpu:gpu_unittests" ] +@@ -38,7 +38,7 @@ group("all") { + if (!is_android) { + deps += [ ":cast_shell" ] } +- if (is_linux) { ++ if (is_linux || is_bsd) { + deps += [ "//chromecast/tracing" ] + } + if (chromecast_branding != "public") { +@@ -89,14 +89,13 @@ cast_test_group("cast_tests") { + } + } - if (is_linux) { + if (is_linux || is_bsd) { - tests += [ "//chromecast/crash:cast_crash_unittests" ] + tests += [ + "//chromecast/crash:cast_crash_unittests", +- "//sandbox/linux:sandbox_linux_unittests", + ] } +- if (is_linux || is_fuchsia) { ++ if (is_linux || is_bsd || is_fuchsia) { + tests += [ + "//chromecast/media/cma/backend:cast_audio_backend_unittests", + "//chromecast/media/cma/backend:cast_av_sync_backend_unittests", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_browser_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_browser_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_browser_BUILD.gn @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/chromecast/browser/BUILD.gn.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/chromecast/browser/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chromecast/browser/BUILD.gn -@@ -120,7 +120,7 @@ source_set("browser") { - "//ui/gl", - ] +@@ -187,7 +187,7 @@ cast_source_set("browser") { + ] + } - if (is_linux) { + if (is_linux || is_bsd) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_browser_metrics_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_browser_metrics_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_browser_metrics_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chromecast/browser/metrics/BUILD.gn.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/chromecast/browser/metrics/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chromecast/browser/metrics/BUILD.gn -@@ -26,7 +26,7 @@ source_set("metrics") { +@@ -27,7 +27,7 @@ cast_source_set("metrics") { "//content/public/common", ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_crash_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_crash_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chromecast_crash_BUILD.gn @@ -1,6 +1,15 @@ ---- src/3rdparty/chromium/chromecast/crash/BUILD.gn.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/chromecast/crash/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/chromecast/crash/BUILD.gn -@@ -78,7 +78,7 @@ source_set("test_support") { +@@ -7,7 +7,7 @@ import("//testing/test.gni") + + # Crash reporting is not support on Fuchsia yet + # TODO(crbug.com/753619): Enable crash reporting on Fuchsia. +-assert(!is_fuchsia) ++assert(!is_fuchsia || !is_bsd) + + cast_source_set("crash") { + sources = [ +@@ -83,7 +83,7 @@ cast_source_set("test_support") { ] } @@ -9,3 +18,12 @@ test("cast_crash_unittests") { sources = [ "cast_crashdump_uploader_unittest.cc", +@@ -106,7 +106,7 @@ if (is_linux) { + "//components/prefs:test_support", + "//testing/gmock", + "//testing/gtest", +- "//third_party/breakpad:client", ++ #"//third_party/breakpad:client", + ] + } + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_BUILD.gn @@ -1,13 +1,13 @@ ---- src/3rdparty/chromium/components/BUILD.gn.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/BUILD.gn -@@ -168,8 +168,8 @@ test("components_unittests") { - "//components/certificate_reporting:unit_tests", +@@ -196,8 +196,8 @@ test("components_unittests") { "//components/certificate_transparency:unit_tests", "//components/contextual_search:unit_tests", -- "//components/crash/content/app:unit_tests", + "//components/crash/content/app:unit_tests", +- "//components/crash/content/browser:unit_tests", - "//components/crash/core/common:unit_tests", -+ #"//components/crash/content/app:unit_tests", ++ #"//components/crash/content/browser:unit_tests", + #"//components/crash/core/common:unit_tests", "//components/data_reduction_proxy/content/browser:unit_tests", + "//components/data_reduction_proxy/content/renderer:unit_tests", "//components/data_reduction_proxy/core/browser:unit_tests", - "//components/data_reduction_proxy/core/common:unit_tests", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_autofill_content_renderer_password__form__conversion__utils.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_autofill_content_renderer_password__form__conversion__utils.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_autofill_content_renderer_password__form__conversion__utils.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/autofill/content/renderer/password_form_conversion_utils.cc -@@ -28,7 +28,11 @@ - #include "third_party/WebKit/public/web/WebFormControlElement.h" - #include "third_party/WebKit/public/web/WebFrame.h" - #include "third_party/WebKit/public/web/WebInputElement.h" +@@ -37,7 +37,11 @@ + #include "third_party/blink/public/web/web_form_control_element.h" + #include "third_party/blink/public/web/web_input_element.h" + #include "third_party/blink/public/web/web_local_frame.h" +#if defined(OS_BSD) +#include +#else #include "third_party/re2/src/re2/re2.h" +#endif + #include "url/gurl.h" - using blink::WebDocument; using blink::WebFormControlElement; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.h @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.h.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.h -@@ -36,10 +36,11 @@ class WebsiteSettingsRegistry { - PLATFORM_MAC = 1 << 3, +@@ -37,10 +37,11 @@ class WebsiteSettingsRegistry { PLATFORM_ANDROID = 1 << 4, PLATFORM_IOS = 1 << 5, -+ PLATFORM_BSD = 1 << 6, + PLATFORM_FUCHSIA = 1 << 6, ++ PLATFORM_BSD = 1 << 7 - // Settings only applied to win, mac, linux and chromeos. - DESKTOP = -- PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC, -+ PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC | PLATFORM_BSD, + // Settings only applied to win, mac, linux, chromeos, and fuchsia. + DESKTOP = PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | +- PLATFORM_MAC | PLATFORM_FUCHSIA, ++ PLATFORM_MAC | PLATFORM_FUCHSIA | PLATFORM_BSD, // Settings applied to all platforms, including win, mac, linux, chromeos, - // android, ios. + // android, ios, and fuchsia. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_content__settings_core_browser_website__settings__registry.cc @@ -1,12 +1,13 @@ ---- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/content_settings/core/browser/website_settings_registry.cc -@@ -88,6 +88,9 @@ const WebsiteSettingsInfo* WebsiteSettin +@@ -83,8 +83,8 @@ const WebsiteSettingsInfo* WebsiteSettingsRegistry::Re // doesn't allow the settings to be managed in the same way. See // crbug.com/642184. sync_status = WebsiteSettingsInfo::UNSYNCABLE; -+#elif defined(OS_BSD) -+ if (!(platform & PLATFORM_BSD)) -+ return nullptr; - #else - #error "Unsupported platform" - #endif +-#elif defined(OS_IOS) +- if (!(platform & PLATFORM_IOS)) ++#elif defined(OS_IOS) || defined(OS_BSD) ++ if (!(platform & PLATFORM_IOS) || !(platform & PLATFORM_BSD)) + return nullptr; + // Don't sync settings to mobile platforms. The UI is different to desktop and + // doesn't allow the settings to be managed in the same way. See Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_cookie__config_cookie__store__util.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/cookie_config/cookie_store_util.cc.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/cookie_config/cookie_store_util.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/cookie_config/cookie_store_util.cc @@ -11,7 +11,7 @@ @@ -9,7 +9,7 @@ namespace { // Use the operating system's mechanisms to encrypt cookies before writing -@@ -63,10 +63,10 @@ base::LazyInstance::Destructor net::CookieCryptoDelegate* GetCookieCryptoDelegate() { return g_cookie_crypto_delegate.Pointer(); } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/components/crash/content/app/BUILD.gn.orig 2017-01-26 00:49:11 UTC -+++ src/3rdparty/chromium/components/crash/content/app/BUILD.gn -@@ -145,7 +145,7 @@ source_set("app_non_mac_win") { - "//breakpad:breakpad_handler", - "//sandbox", - ] -- } else if (is_posix && !is_ios) { -+ } else if (is_posix && !is_ios && !is_bsd) { - deps += [ "//breakpad:client" ] - } - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_browser_BUILD.gn @@ -1,21 +1,22 @@ ---- src/3rdparty/chromium/components/crash/content/browser/BUILD.gn.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/crash/content/browser/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/crash/content/browser/BUILD.gn -@@ -16,7 +16,7 @@ source_set("browser") { - - deps = [ - "//base", -- "//breakpad:client", -+ #"//breakpad:client", +@@ -26,7 +26,7 @@ source_set("browser") { "//components/crash/content/app", "//content/public/browser", "//content/public/common", -@@ -39,7 +39,7 @@ source_set("browser") { +- "//third_party/breakpad:client", ++ #"//third_party/breakpad:client", + ] + + if (is_linux || is_android) { +@@ -46,8 +46,8 @@ source_set("browser") { # This is not in the GYP build but this target includes breakpad client # headers, so add the dependency here. - if (is_posix && !is_ios) { -- configs += [ "//breakpad:client_config" ] -- public_configs = [ "//breakpad:client_config" ] -+ #configs += [ "//breakpad:client_config" ] -+ #public_configs = [ "//breakpad:client_config" ] + if ((is_posix && !is_ios) || is_fuchsia) { +- configs += [ "//third_party/breakpad:client_config" ] +- public_configs = [ "//third_party/breakpad:client_config" ] ++ #configs += [ "//third_party/breakpad:client_config" ] ++ #public_configs = [ "//third_party/breakpad:client_config" ] } - } + + if (is_android) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_core_common_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/crash/core/common/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/components/crash/core/common/BUILD.gn +@@ -6,7 +6,7 @@ import("//build/buildflag_header.gni") + + 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") { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_BUILD.gn @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/components/download/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/components/download/BUILD.gn +@@ -14,6 +14,10 @@ group("unit_tests") { + "//components/download/internal/common:unit_tests", + "//components/download/quarantine:unit_tests", + ] ++ ++ if (is_bsd) { ++ deps -= [ "//components/download/quarantine:unit_tests" ] ++ } + } + + data_deps = [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_internal_common_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_internal_common_BUILD.gn @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/components/download/internal/common/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/components/download/internal/common/BUILD.gn +@@ -70,6 +70,10 @@ source_set("internal") { + if (is_posix || is_fuchsia) { + sources += [ "base_file_posix.cc" ] + } ++ ++ if (is_bsd) { ++ deps -= [ "//components/download/quarantine" ] ++ } + } + + # tests need to access both public and internal sources. So in the component Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/components/feedback/anonymizer_tool.cc.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/feedback/anonymizer_tool.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/feedback/anonymizer_tool.cc -@@ -10,7 +10,11 @@ - #include "base/strings/string_number_conversions.h" +@@ -11,7 +11,11 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" + #include "content/public/browser/browser_thread.h" +#if defined(OS_BSD) +#include +#else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_flags__ui_flags__state.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/flags_ui/flags_state.cc.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/flags_ui/flags_state.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/flags_ui/flags_state.cc -@@ -544,7 +544,7 @@ int FlagsState::GetCurrentPlatform() { +@@ -653,7 +653,7 @@ int FlagsState::GetCurrentPlatform() { return kOsWin; #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. return kOsCrOS; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_json__schema_json__schema__validator.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_json__schema_json__schema__validator.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_json__schema_json__schema__validator.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/json_schema/json_schema_validator.cc.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/json_schema/json_schema_validator.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/json_schema/json_schema_validator.cc @@ -21,7 +21,11 @@ #include "base/strings/stringprintf.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_keyed__service_core_dependency__graph__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_keyed__service_core_dependency__graph__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_keyed__service_core_dependency__graph__unittest.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/keyed_service/core/dependency_graph_unittest.cc.orig 2017-01-26 00:49:11 UTC +--- src/3rdparty/chromium/components/keyed_service/core/dependency_graph_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/keyed_service/core/dependency_graph_unittest.cc @@ -9,7 +9,11 @@ #include "components/keyed_service/core/dependency_graph.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_BUILD.gn @@ -1,20 +1,19 @@ ---- src/3rdparty/chromium/components/metrics/BUILD.gn.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/metrics/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/metrics/BUILD.gn -@@ -107,6 +107,13 @@ static_library("metrics") { - if (is_win) { - sources -= [ "machine_id_provider_stub.cc" ] +@@ -139,6 +139,12 @@ static_library("metrics") { + libs = [ "wevtapi.lib" ] } -+ + + if (is_bsd) { + sources -= [ + "system_memory_stats_recorder_linux.cc" + ] + } + - } - - if (!is_ios) { -@@ -282,7 +289,7 @@ static_library("test_support") { + if (is_fuchsia) { + sources += [ "drive_metrics_provider_fuchsia.cc" ] + } +@@ -312,7 +318,7 @@ static_library("test_support") { ] } @@ -23,7 +22,7 @@ static_library("serialization") { sources = [ "serialization/metric_sample.cc", -@@ -341,7 +348,7 @@ source_set("unit_tests") { +@@ -384,7 +390,7 @@ source_set("unit_tests") { "//ui/gfx/geometry", ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_drive__metrics__provider__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/metrics/drive_metrics_provider_linux.cc.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/metrics/drive_metrics_provider_linux.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/metrics/drive_metrics_provider_linux.cc @@ -4,7 +4,13 @@ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_system__memory__stats__recorder__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_system__memory__stats__recorder__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_metrics_system__memory__stats__recorder__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/metrics/system_memory_stats_recorder_linux.cc.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/metrics/system_memory_stats_recorder_linux.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/metrics/system_memory_stats_recorder_linux.cc @@ -30,6 +30,7 @@ namespace metrics { UMA_HISTOGRAM_LINEAR(name, sample, 2500, 50) @@ -8,7 +8,7 @@ base::SystemMemoryInfoKB memory; if (!base::GetSystemMemoryInfo(&memory)) return; -@@ -93,6 +94,7 @@ void RecordMemoryStats(RecordMemoryStats +@@ -93,6 +94,7 @@ void RecordMemoryStats(RecordMemoryStatsType type) { break; } } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_neterror_resources_neterror.js @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/components/neterror/resources/neterror.js.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/neterror/resources/neterror.js.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/neterror/resources/neterror.js -@@ -150,7 +150,7 @@ function setUpCachedButton(buttonStrings +@@ -153,7 +153,7 @@ function setUpCachedButton(buttonStrings) { } var primaryControlOnLeft = true; -- -+ +-// ++// primaryControlOnLeft = false; - + // Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt.h @@ -1,20 +1,37 @@ ---- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/os_crypt/os_crypt.h -@@ -13,7 +13,7 @@ +@@ -14,7 +14,7 @@ #include "base/strings/string16.h" #include "build/build_config.h" --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) - #include "components/os_crypt/key_storage_linux.h" - #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) ++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) + class KeyStorageLinux; + #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) -@@ -23,7 +23,7 @@ +@@ -28,7 +28,7 @@ struct Config; // true for Linux, if a password management tool is available. class OSCrypt { public: -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) - // If |store_type| is a known password store, we will attempt to use it. - // In any other case, we default to auto-detecting the store. - // This should not be changed after OSCrypt has been used. + // Set the configuration of OSCrypt. + static void SetConfig(std::unique_ptr config); + +@@ -67,7 +67,7 @@ class OSCrypt { + DISALLOW_IMPLICIT_CONSTRUCTORS(OSCrypt); + }; + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) ++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) + // For unit testing purposes, inject methods to be used. + // |get_key_storage_mock| provides the desired |KeyStorage| implementation. + // If the provider returns |nullptr|, a hardcoded password will be used. +@@ -81,6 +81,6 @@ void UseMockKeyStorageForTesting( + // Clears any caching and most lazy initialisations performed by the production + // code. Should be used after any test which required a password. + void ClearCacheForTesting(); +-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) ++#endif // (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(UNIT_TEST) + + #endif // COMPONENTS_OS_CRYPT_OS_CRYPT_H_ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt__unittest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_os__crypt_os__crypt__unittest.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/os_crypt/os_crypt_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/components/os_crypt/os_crypt_unittest.cc +@@ -18,7 +18,7 @@ + #include "components/os_crypt/os_crypt_mocker.h" + #include "testing/gtest/include/gtest/gtest.h" + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) + #include "components/os_crypt/os_crypt_mocker_linux.h" + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_import_csv__reader.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_import_csv__reader.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_password__manager_core_browser_import_csv__reader.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/password_manager/core/browser/import/csv_reader.cc.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/password_manager/core/browser/import/csv_reader.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/password_manager/core/browser/import/csv_reader.cc @@ -9,7 +9,11 @@ #include "base/logging.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/plugins/renderer/BUILD.gn.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/plugins/renderer/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/plugins/renderer/BUILD.gn -@@ -19,6 +19,7 @@ static_library("renderer") { +@@ -20,6 +20,7 @@ static_library("renderer") { } deps = [ @@ -8,8 +8,8 @@ "//content/public/child", "//content/public/common", "//content/public/renderer", -@@ -27,6 +28,5 @@ static_library("renderer") { - "//third_party/WebKit/public:blink", +@@ -28,6 +29,5 @@ static_library("renderer") { + "//third_party/blink/public:blink", "//third_party/re2", "//ui/base", - "//v8", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_plugin__placeholder.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_plugin__placeholder.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_plugin__placeholder.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/components/plugins/renderer/plugin_placeholder.cc.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/plugins/renderer/plugin_placeholder.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/plugins/renderer/plugin_placeholder.cc @@ -11,7 +11,11 @@ #include "gin/object_template_builder.h" - #include "third_party/WebKit/public/web/WebElement.h" - #include "third_party/WebKit/public/web/WebPluginContainer.h" + #include "third_party/blink/public/web/web_element.h" + #include "third_party/blink/public/web/web_plugin_container.h" +#if defined(OS_BSD) +#include +#else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_policy_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_policy_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_policy_BUILD.gn @@ -1,19 +1,19 @@ ---- src/3rdparty/chromium/components/policy/BUILD.gn.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/policy/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/policy/BUILD.gn -@@ -14,6 +14,7 @@ import("//tools/grit/grit_rule.gni") +@@ -16,6 +16,7 @@ assert(!is_ios, "Policy should not be referenced on iO gen_policy_templates_common = true gen_policy_templates_win = is_win gen_policy_templates_linux = is_linux +gen_policy_templates_bsd = is_bsd gen_policy_templates_android = is_android gen_policy_templates_mac = is_mac - -@@ -126,7 +127,7 @@ if (enable_configuration_policy) { - outputs += policy_templates_android_outputs - defines += [ "gen_policy_templates_android" ] - } -- if (gen_policy_templates_linux) { -+ if (gen_policy_templates_linux || gen_policy_templates_bsd) { - outputs += policy_templates_linux_outputs - defines += [ "gen_policy_templates_linux" ] - } + gen_policy_templates_chromeos = is_chromeos +@@ -205,7 +206,7 @@ action("policy_templates") { + rebase_path(policy_templates_android_policy_path, root_build_dir), + ] + } +- if (gen_policy_templates_linux) { ++ if (gen_policy_templates_linux || gen_policy_templates_bsd) { + outputs += policy_templates_linux_outputs + args += [ + "--json", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_services_font_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_services_font_BUILD.gn @@ -0,0 +1,23 @@ +--- src/3rdparty/chromium/components/services/font/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/components/services/font/BUILD.gn +@@ -31,16 +31,17 @@ source_set("lib") { + "//skia", + ] + +- if (is_linux && enable_plugins) { ++ if ((is_linux || is_bsd) && enable_plugins) { + deps += [ ":ppapi_fontconfig_matching" ] + } + +- if (is_linux) { ++ if ((is_linux || is_bsd)) { + deps += [ "//base/test:fontconfig_util_linux" ] + } + } + +-if (is_linux && enable_plugins) { ++# YYY ++if ((is_linux || is_bsd) && enable_plugins) { + source_set("ppapi_fontconfig_matching") { + sources = [ + "ppapi_fontconfig_matching.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_services_font_font__service__app.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_services_font_font__service__app.cc @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/components/services/font/font_service_app.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/components/services/font/font_service_app.cc +@@ -210,7 +210,8 @@ void FontServiceApp::MatchFontWithFallback( + uint32_t charset, + uint32_t fallbackFamilyType, + MatchFontWithFallbackCallback callback) { +-#if BUILDFLAG(ENABLE_PLUGINS) ++// YYY ++#if BUILDFLAG(ENABLE_PLUGINS) || defined(OS_BSD) + base::File matched_font_file; + int font_file_descriptor = MatchFontFaceWithFallback( + family, is_bold, is_italic, charset, fallbackFamilyType); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_BUILD.gn @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/storage_monitor/BUILD.gn.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/storage_monitor/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/storage_monitor/BUILD.gn @@ -65,6 +65,21 @@ static_library("storage_monitor") { ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/components/storage_monitor/storage_monitor.cc.orig 2017-01-26 00:49:12 UTC +--- src/3rdparty/chromium/components/storage_monitor/storage_monitor.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/storage_monitor/storage_monitor.cc -@@ -85,6 +85,7 @@ std::vector StorageMonitor: +@@ -93,6 +93,7 @@ std::vector StorageMonitor::GetAllAvailab void StorageMonitor::EnsureInitialized(base::Closure callback) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +//#if !defined(OS_BSD) //XXX(rene) why disabled? if (initialized_) { if (!callback.is_null()) callback.Run(); -@@ -100,6 +101,7 @@ void StorageMonitor::EnsureInitialized(b +@@ -108,6 +109,7 @@ void StorageMonitor::EnsureInitialized(base::Closure c initializing_ = true; Init(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_update__client_update__query__params.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/components/update_client/update_query_params.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/components/update_client/update_query_params.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/update_client/update_query_params.cc -@@ -31,6 +31,8 @@ const char kOs[] = - "linux"; +@@ -38,6 +38,8 @@ const char kOs[] = + "fuchsia"; #elif defined(OS_OPENBSD) "openbsd"; +#elif defined(OS_FREEBSD) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_regex__set__matcher.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_regex__set__matcher.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_regex__set__matcher.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/components/url_matcher/regex_set_matcher.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/components/url_matcher/regex_set_matcher.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/url_matcher/regex_set_matcher.cc -@@ -10,8 +10,13 @@ - #include "base/memory/ptr_util.h" +@@ -11,8 +11,13 @@ + #include "base/logging.h" #include "base/strings/string_util.h" #include "components/url_matcher/substring_set_matcher.h" +#if defined(OS_BSD) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_url__matcher__factory.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_url__matcher__factory.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_url__matcher_url__matcher__factory.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/components/url_matcher/url_matcher_factory.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/components/url_matcher/url_matcher_factory.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/url_matcher/url_matcher_factory.cc @@ -16,7 +16,11 @@ #include "base/values.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_variations_proto_study.proto =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_variations_proto_study.proto +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_variations_proto_study.proto @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/components/variations/proto/study.proto.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/components/variations/proto/study.proto.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/variations/proto/study.proto -@@ -186,6 +186,7 @@ message Study { - PLATFORM_CHROMEOS = 3; - PLATFORM_ANDROID = 4; - PLATFORM_IOS = 5; -+ PLATFORM_BSD = 6; +@@ -191,6 +191,7 @@ message Study { + PLATFORM_IOS = 5; + PLATFORM_ANDROID_WEBVIEW = 6; + PLATFORM_FUCHSIA = 7; ++ PLATFORM_BSD = 8; } // Possible form factors Chrome is running on. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_webcrypto_algorithms_test__helpers.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_webcrypto_algorithms_test__helpers.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_webcrypto_algorithms_test__helpers.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/components/webcrypto/algorithms/test_helpers.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/components/webcrypto/algorithms/test_helpers.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/webcrypto/algorithms/test_helpers.cc @@ -25,7 +25,11 @@ #include "components/webcrypto/status.h" - #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" - #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" + #include "third_party/blink/public/platform/web_crypto_algorithm_params.h" + #include "third_party/blink/public/platform/web_crypto_key_algorithm.h" +#if defined(OS_BSD) +#include +#else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/app/BUILD.gn.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/app/BUILD.gn -@@ -68,7 +68,7 @@ template("implement_content_app") { - ] - } - -- if (is_linux && enable_plugins) { -+ if ((is_linux || is_bsd) && enable_plugins) { - content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ] - } - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner.cc +++ /dev/null @@ -1,42 +0,0 @@ ---- src/3rdparty/chromium/content/app/content_main_runner.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/app/content_main_runner.cc -@@ -97,10 +97,10 @@ - #include "base/posix/global_descriptors.h" - #include "content/public/common/content_descriptors.h" - --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - #include "content/public/common/zygote_fork_delegate_linux.h" - #endif --#if !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - #include "content/zygote/zygote_main.h" - #endif - -@@ -290,7 +290,7 @@ struct MainFunction { - int (*function)(const MainFunctionParams&); - }; - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - // On platforms that use the zygote, we have a special subset of - // subprocesses that are launched via the zygote. This function - // fills in some process-launching bits around ZygoteMain(). -@@ -342,7 +342,7 @@ int RunZygote(const MainFunctionParams& - NOTREACHED() << "Unknown zygote process type: " << process_type; - return 1; - } --#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - - static void RegisterMainThreadFactories() { - #if !defined(CHROME_MULTIPLE_DLL_BROWSER) && !defined(CHROME_MULTIPLE_DLL_CHILD) -@@ -409,7 +409,7 @@ int RunNamedProcessTypeMain( - } - } - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - // Zygote startup is special -- see RunZygote comments above - // for why we don't use ZygoteMain directly. - if (process_type == switches::kZygoteProcess) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_app_content__main__runner__impl.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/content/app/content_main_runner_impl.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/app/content_main_runner_impl.cc +@@ -85,10 +85,10 @@ + #include "base/posix/global_descriptors.h" + #include "content/public/common/content_descriptors.h" + +-#if !defined(OS_MACOSX) ++#if !defined(OS_MACOSX) && !defined(OS_BSD) + #include "services/service_manager/zygote/common/zygote_fork_delegate_linux.h" + #endif +-#if !defined(OS_MACOSX) && !defined(OS_ANDROID) ++#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) + #include "sandbox/linux/services/libc_interceptor.h" + #include "services/service_manager/zygote/zygote_main.h" + #endif +@@ -695,11 +695,11 @@ int ContentMainRunnerImpl::Initialize(const ContentMai + base::GlobalDescriptors::kBaseDescriptor); + #endif // !OS_ANDROID + +-#if defined(OS_LINUX) || defined(OS_OPENBSD) ++#if defined(OS_LINUX) + g_fds->Set(service_manager::kCrashDumpSignal, + service_manager::kCrashDumpSignal + + base::GlobalDescriptors::kBaseDescriptor); +-#endif // OS_LINUX || OS_OPENBSD ++#endif // OS_LINUX + + #endif // !OS_WIN + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_BUILD.gn @@ -1,68 +1,75 @@ ---- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/browser/BUILD.gn -@@ -1421,10 +1421,11 @@ source_set("browser") { - "memory/memory_monitor_chromeos.cc", - "memory/memory_monitor_chromeos.h", +@@ -1775,7 +1775,8 @@ jumbo_source_set("browser") { + deps += [ "//ui/events" ] + } + +- if (is_linux) { ++ # YYY ++ if (is_linux || is_bsd) { + deps += [ + "//components/services/font:lib", + "//components/services/font/public/interfaces", +@@ -1799,11 +1800,6 @@ jumbo_source_set("browser") { + "tracing/cros_tracing_agent.cc", + "tracing/cros_tracing_agent.h", ] - } else { - sources += [ - "memory/memory_monitor_linux.cc", - "memory/memory_monitor_linux.h", -+ } -+ +- ] + } + + if (is_chromeos || is_android || is_chromecast) { +@@ -1820,6 +1816,12 @@ jumbo_source_set("browser") { + + defines += [ "CAST_TRACING_AGENT=1" ] + } ++ ++ # YYY - works now? + if (is_bsd) { -+ sources -= [ -+ "download/quarantine_linux.cc", - ] ++ #sources -= [ "child_process_launcher_helper_linux.cc" ] ++ deps -= [ "//components/download/quarantine", ] ++ } + + if (is_fuchsia) { + sources += [ +@@ -1847,8 +1849,9 @@ jumbo_source_set("browser") { + deps += [ "//ui/events:dom_keyboard_layout" ] } -@@ -1490,7 +1491,7 @@ source_set("browser") { - if (!is_ios) { - defines += [ "ENABLE_SCREEN_CAPTURE=1" ] ++ #YYY + if (!is_mac) { +- deps += [ "//sandbox" ] ++ deps += [ "//sandbox", "//sandbox/linux:sandbox_services" ] + } + if (!is_android && !use_qt) { + deps += [ +@@ -2099,7 +2102,7 @@ jumbo_source_set("browser") { } -- if (is_linux || is_mac || is_win) { -+ if (is_linux || is_bsd || is_mac || is_win) { - sources += [ - "media/capture/desktop_capture_device.cc", - "media/capture/desktop_capture_device.h", -@@ -1657,7 +1658,7 @@ source_set("browser") { - } } - if (is_linux && use_aura) { + if ((is_linux || is_bsd) && use_aura) { - deps += [ "//build/linux:fontconfig" ] + deps += [ "//third_party/fontconfig" ] } -@@ -1807,6 +1808,17 @@ source_set("browser") { - "//chromeos", - "//chromeos:power_manager_proto", +@@ -2209,7 +2212,7 @@ jumbo_source_set("browser") { ] -+ } else if (is_bsd) { + + set_sources_assignment_filter([]) +- sources += [ + sources -= [ -+ "zygote_host/zygote_communication_linux.cc", -+ "zygote_host/zygote_communication_linux.h", -+ "zygote_host/zygote_handle_linux.cc", -+ "zygote_host/zygote_host_impl_linux.cc", -+ "zygote_host/zygote_host_impl_linux.h", -+ "../zygote/zygote_linux.cc", -+ "../zygote/zygote_linux.h", -+ "../zygote/zygote_main_linux.cc", -+ ] + "memory/swap_metrics_driver_impl_linux.cc", + "memory/swap_metrics_driver_impl_linux.h", + ] +@@ -2427,7 +2430,7 @@ jumbo_source_set("browser") { + ] } - if (enable_mojo_media) { -@@ -1930,11 +1942,11 @@ source_set("browser") { - deps += [ "//third_party/flac" ] - } - - if (is_linux && use_dbus) { + if ((is_linux || is_bsd) && use_dbus) { deps += [ "//dbus" ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - deps += [ "//third_party/boringssl" ] } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_accessibility_browser__accessibility__manager.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_accessibility_browser__accessibility__manager.h +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/browser/accessibility/browser_accessibility_manager.h.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/accessibility/browser_accessibility_manager.h -@@ -34,7 +34,7 @@ class BrowserAccessibilityManager; - class BrowserAccessibilityManagerAndroid; - #elif defined(OS_WIN) - class BrowserAccessibilityManagerWin; --#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11) -+#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(USE_X11) - class BrowserAccessibilityManagerAuraLinux; - #elif defined(OS_MACOSX) - class BrowserAccessibilityManagerMac; -@@ -244,7 +244,7 @@ class CONTENT_EXPORT BrowserAccessibilit - BrowserAccessibilityManagerAndroid* ToBrowserAccessibilityManagerAndroid(); - #endif - --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(USE_X11) - BrowserAccessibilityManagerAuraLinux* - ToBrowserAccessibilityManagerAuraLinux(); - #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_browser__main__loop.cc @@ -1,39 +1,27 @@ ---- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/browser/browser_main_loop.cc -@@ -203,6 +203,10 @@ - #include "gpu/vulkan/vulkan_implementation.h" +@@ -241,6 +241,11 @@ + #include "base/mac/foundation_util.h" #endif -+#if defined(OS_BSD) -+#include "content/common/child_process_sandbox_support_impl_linux.h" -+#endif ++#include "content/browser/sandbox_host_linux.h" ++#include "services/service_manager/zygote/common/common_sandbox_support_linux.h" ++#include "content/public/common/common_sandbox_support_linux.h" ++#include "services/service_manager/sandbox/sandbox.h" + // One of the linux specific headers defines this as a macro. #ifdef DestroyAll #undef DestroyAll -@@ -211,7 +215,7 @@ - namespace content { - namespace { - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - void SetupSandbox(const base::CommandLine& parsed_command_line) { - TRACE_EVENT0("startup", "SetupSandbox"); - if (parsed_command_line.HasSwitch(switches::kNoZygote)) { -@@ -482,10 +486,15 @@ void BrowserMainLoop::Init() { - void BrowserMainLoop::EarlyInitialization() { - TRACE_EVENT0("startup", "BrowserMainLoop::EarlyInitialization"); - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - // No thread should be created before this call, as SetupSandbox() - // will end-up using fork(). - SetupSandbox(parsed_command_line_); +@@ -590,6 +595,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()); ++// YYY - works now? +#elif defined(OS_BSD) -+ RenderSandboxHostLinux::GetInstance()->Init(); ++ SandboxHostLinux::GetInstance()->Init(); + base::FileHandleMappingVector fds_to_map; -+ const int sfd = RenderSandboxHostLinux::GetInstance()->GetRendererSocket(); -+ fds_to_map.push_back(std::make_pair(sfd, GetSandboxFD())); ++ const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket(); ++ fds_to_map.push_back(std::make_pair(sfd, service_manager::GetSandboxFD())); #endif - #if defined(USE_X11) + #if defined(USE_X11) && !defined(TOOLKIT_QT) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- src/3rdparty/chromium/content/browser/child_process_launcher.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/child_process_launcher.cc -@@ -249,7 +249,7 @@ void LaunchOnLauncherThread(const Notify - // We need to close the client end of the IPC channel to reliably detect - // child termination. - --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - ZygoteHandle* zygote_handle = - !base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) - ? delegate->GetZygote() -@@ -267,7 +267,7 @@ void LaunchOnLauncherThread(const Notify - process = base::Process(handle); - } else - // Fall through to the normal posix case below when we're not zygoting. --#endif // !defined(OS_MACOSX) -+#endif // !defined(OS_MACOSX) && !defined(OS_BSD) - { - // Convert FD mapping to FileHandleMappingVector - base::FileHandleMappingVector fds_to_map = -@@ -358,7 +358,7 @@ void TerminateOnLauncherThread(ZygoteHan - process.Terminate(RESULT_CODE_NORMAL_EXIT, false); - // On POSIX, we must additionally reap the child. - #if defined(OS_POSIX) --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - if (zygote) { - // If the renderer was created via a zygote, we have to proxy the reaping - // through the zygote process. -@@ -475,7 +475,7 @@ void ChildProcessLauncher::Launch(Sandbo - - void ChildProcessLauncher::UpdateTerminationStatus(bool known_dead) { - DCHECK(CalledOnValidThread()); --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - if (zygote_) { - termination_status_ = zygote_->GetTerminationStatus( - process_.Handle(), known_dead, &exit_code_); -@@ -549,7 +549,7 @@ void ChildProcessLauncher::Notify(Zygote - mojo_child_token_, process_error_callback_); - } - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - zygote_ = zygote; - #endif - if (process_.IsValid()) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_child__process__launcher__helper__linux.cc @@ -0,0 +1,93 @@ +--- src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc +@@ -17,7 +17,9 @@ + #include "content/public/common/sandboxed_process_launcher_delegate.h" + #include "services/service_manager/sandbox/linux/sandbox_linux.h" + #include "services/service_manager/zygote/common/common_sandbox_support_linux.h" ++#if !defined(OS_BSD) + #include "services/service_manager/zygote/common/zygote_handle.h" ++#endif + #include "services/service_manager/zygote/host/zygote_communication_linux.h" + #include "services/service_manager/zygote/host/zygote_host_impl_linux.h" + +@@ -50,6 +52,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche + options->fds_to_remap = files_to_register.GetMappingWithIDAdjustment( + base::GlobalDescriptors::kBaseDescriptor); + ++/// YYY - works now? ++//#if !defined(OS_BSD) + if (GetProcessType() == switches::kRendererProcess) { + const int sandbox_fd = SandboxHostLinux::GetInstance()->GetChildSocket(); + options->fds_to_remap.push_back( +@@ -57,6 +61,7 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche + } + + options->environ = delegate_->GetEnvironment(); ++//#endif + + return true; + } +@@ -69,6 +74,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr + int* launch_result) { + *is_synchronous_launch = true; + ++#if !defined(OS_BSD) + service_manager::ZygoteHandle zygote_handle = + base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) + ? nullptr +@@ -82,7 +88,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr + GetProcessType()); + *launch_result = LAUNCH_RESULT_SUCCESS; + +-#if !defined(OS_OPENBSD) + if (handle) { + // This is just a starting score for a renderer or extension (the + // only types of processes that will be started this way). It will +@@ -93,13 +98,13 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr + service_manager::ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore( + handle, kLowestRendererOomScore); + } +-#endif + + Process process; + process.process = base::Process(handle); + process.zygote = zygote_handle; + return process; + } ++#endif + + Process process; + process.process = base::LaunchProcess(*command_line(), options); +@@ -117,10 +122,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper + const ChildProcessLauncherHelper::Process& process, + bool known_dead) { + ChildProcessTerminationInfo info; ++#if !defined(OS_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 { +@@ -144,13 +153,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer + DCHECK(CurrentlyOnProcessLauncherTaskRunner()); + process.process.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, false); + // On POSIX, we must additionally reap the child. ++#if !defined(OS_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 !defined(OS_BSD) + } ++#endif + } + + void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_device__sensors_data__fetcher__shared__memory.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_device__sensors_data__fetcher__shared__memory.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/browser/device_sensors/data_fetcher_shared_memory.h.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/device_sensors/data_fetcher_shared_memory.h -@@ -45,7 +45,7 @@ class CONTENT_EXPORT DataFetcherSharedMe - bool Start(ConsumerType consumer_type, void* buffer) override; - bool Stop(ConsumerType consumer_type) override; - --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) - #if !defined(OS_CHROMEOS) - DeviceMotionHardwareBuffer* motion_buffer_ = nullptr; - DeviceOrientationHardwareBuffer* orientation_buffer_ = nullptr; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_color__picker.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_devtools_protocol_color__picker.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/browser/devtools/protocol/color_picker.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/devtools/protocol/color_picker.cc -@@ -151,7 +151,7 @@ void ColorPicker::UpdateCursor() { - // 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; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_download_base__file.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_download_base__file.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/browser/download/base_file.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/download/base_file.cc -@@ -373,7 +373,7 @@ DownloadInterruptReason BaseFile::LogInt - return reason; - } - --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - - namespace { - -@@ -456,7 +456,7 @@ DownloadInterruptReason BaseFile::Annota - } - return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED; - } --#else // !OS_WIN && !OS_MACOSX && !OS_LINUX -+#else // !OS_WIN && !OS_MACOSX && !OS_LINUX && !OS_BSD - DownloadInterruptReason BaseFile::AnnotateWithSourceInformation( - const std::string& client_guid, - const GURL& source_url, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.h.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.h -@@ -154,7 +154,7 @@ class CONTENT_EXPORT GpuDataManagerImplP - UnblockOtherDomainFrom3DAPIs); - FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, - UnblockThisDomainFrom3DAPIs); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, - SetGLStrings); - FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__data__manager__impl__private.cc +++ /dev/null @@ -1,45 +0,0 @@ ---- src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -376,7 +376,7 @@ bool GpuDataManagerImplPrivate::GpuAcces - // strings even if all features are blacklisted. If all GPU features are - // disabled, the GPU process will only initialize GL bindings, create a GL - // context, and collect full GPU info. --#if !defined(OS_LINUX) -+#if !defined(OS_LINUX) || !defined(OS_BSD) - if (reason) { - *reason = "All GPU features are blacklisted."; - } -@@ -493,8 +493,10 @@ void GpuDataManagerImplPrivate::SetGLStr - gpu_info.gl_renderer = gl_renderer; - gpu_info.gl_version = gl_version; - -+#if !defined(OS_BSD) - gpu::IdentifyActiveGPU(&gpu_info); - gpu::CollectDriverInfoGL(&gpu_info); -+#endif - - UpdateGpuInfo(gpu_info); - UpdateGpuSwitchingManager(gpu_info); -@@ -549,10 +551,12 @@ void GpuDataManagerImplPrivate::Initiali - // Skip collecting the basic driver info if SetGpuInfo() is already called. - if (IsCompleteGpuInfoAvailable()) { - gpu_info = gpu_info_; -+#ifndef OS_BSD - } else { - TRACE_EVENT0("startup", - "GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo"); - gpu::CollectBasicGraphicsInfo(&gpu_info); -+#endif - } - - if (command_line->HasSwitch(switches::kGpuTestingVendorId) && -@@ -664,7 +668,9 @@ void GpuDataManagerImplPrivate::UpdateGp - return; - - bool was_info_available = IsCompleteGpuInfoAvailable(); -+#ifndef OS_BSD - gpu::MergeGPUInfo(&gpu_info_, gpu_info); -+#endif - if (IsCompleteGpuInfoAvailable()) { - complete_gpu_info_already_requested_ = true; - } else if (was_info_available) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__internals__ui.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__internals__ui.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- src/3rdparty/chromium/content/browser/gpu/gpu_internals_ui.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/gpu/gpu_internals_ui.cc -@@ -42,7 +42,7 @@ - #include "third_party/skia/include/core/SkMilestone.h" - #include "ui/gl/gpu_switching_manager.h" - --#if defined(OS_LINUX) && defined(USE_X11) -+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(USE_X11) - #include - #endif - #if defined(OS_WIN) -@@ -50,7 +50,7 @@ - #include "ui/gfx/win/physical_size.h" - #endif - --#if defined(OS_LINUX) && defined(USE_X11) -+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(USE_X11) - #include "ui/base/x/x11_util.h" // nogncheck - #include "ui/gfx/x/x11_atom_cache.h" // nogncheck - #endif -@@ -206,7 +206,7 @@ base::DictionaryValue* GpuInfoAsDictiona - gpu_info.gl_ws_version)); - basic_info->Append(NewDescriptionValuePair("Window system binding extensions", - gpu_info.gl_ws_extensions)); --#if defined(OS_LINUX) && defined(USE_X11) -+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(USE_X11) - basic_info->Append(NewDescriptionValuePair("Window manager", - ui::GuessWindowManagerName())); - { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_gpu_gpu__process__host.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/gpu/gpu_process_host.cc -@@ -984,7 +984,7 @@ bool GpuProcessHost::LaunchGpuProcess(gp - base::CommandLine* cmd_line = - new base::CommandLine(base::CommandLine::NO_PROGRAM); - #else --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - int child_flags = gpu_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF : - ChildProcessHost::CHILD_NORMAL; - #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__internals.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__internals.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_media_media__internals.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/content/browser/media/media_internals.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/browser/media/media_internals.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/browser/media/media_internals.cc -@@ -755,7 +755,7 @@ void MediaInternals::UpdateVideoCaptureD +@@ -724,7 +724,7 @@ void MediaInternals::UpdateVideoCaptureDeviceCapabilit device_dict->SetString("name", descriptor.GetNameAndModel()); - device_dict->Set("formats", format_list); + device_dict->Set("formats", std::move(format_list)); #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ - defined(OS_ANDROID) + defined(OS_ANDROID) || defined(OS_BSD) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_memory__coordinator__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_memory__coordinator__impl.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/3rdparty/chromium/content/browser/memory/memory_coordinator_impl.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/memory/memory_coordinator_impl.cc -@@ -116,8 +116,12 @@ void RecordMetricsOnStateChange(base::Me - struct MemoryCoordinatorSingletonTraits - : public base::LeakySingletonTraits { - static MemoryCoordinator* New() { -+#if defined(OS_BSD) -+ return NULL; -+#else - return new MemoryCoordinatorImpl(base::ThreadTaskRunnerHandle::Get(), - CreateMemoryMonitor()); -+#endif - } - }; - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_memory__monitor.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_memory__monitor.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_memory__monitor.cc @@ -1,21 +1,11 @@ ---- src/3rdparty/chromium/content/browser/memory/memory_monitor.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/browser/memory/memory_monitor.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/browser/memory/memory_monitor.cc -@@ -8,6 +8,7 @@ - - namespace content { - -+#if !defined(OS_FREEBSD) - // static - MemoryMonitorDelegate* MemoryMonitorDelegate::GetInstance() { - return base::Singleton< -@@ -21,8 +22,9 @@ void MemoryMonitorDelegate::GetSystemMem - base::SystemMemoryInfoKB* mem_info) { +@@ -22,7 +22,7 @@ void MemoryMonitorDelegate::GetSystemMemoryInfo( base::GetSystemMemoryInfo(mem_info); } -+#endif // !defined(OS_FREEBSD) -#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) && !defined(OS_FREEBSD) ++#if defined(OS_MACOSX) || defined(OS_FREEBSD) // TODO(bashi,bcwhite): Remove when memory monitor for mac is available. std::unique_ptr CreateMemoryMonitor() { NOTREACHED(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_swap__metrics__driver__impl__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_memory_swap__metrics__driver__impl__linux.cc @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/content/browser/memory/swap_metrics_driver_impl_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/memory/swap_metrics_driver_impl_linux.cc +@@ -44,9 +44,13 @@ SwapMetricsDriverImplLinux::~SwapMetricsDriverImplLinu + SwapMetricsDriver::SwapMetricsUpdateResult + SwapMetricsDriverImplLinux::UpdateMetricsInternal(base::TimeDelta interval) { + base::VmStatInfo vmstat; ++#if !defined(OS_BSD) + if (!base::GetVmStatInfo(&vmstat)) { + return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed; + } ++#else ++ return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed; ++#endif + + uint64_t in_counts = vmstat.pswpin - last_pswpin_; + uint64_t out_counts = vmstat.pswpout - last_pswpout_; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_ppapi__plugin__process__host.cc +++ /dev/null @@ -1,48 +0,0 @@ ---- src/3rdparty/chromium/content/browser/ppapi_plugin_process_host.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/ppapi_plugin_process_host.cc -@@ -53,9 +53,9 @@ - - namespace content { - --#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - ZygoteHandle g_ppapi_zygote; --#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - - // NOTE: changes to this class need to be reviewed by the security team. - class PpapiPluginSandboxedProcessLauncherDelegate -@@ -109,7 +109,7 @@ class PpapiPluginSandboxedProcessLaunche - return true; - } - --#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - ZygoteHandle* GetZygote() override { - const base::CommandLine& browser_command_line = - *base::CommandLine::ForCurrentProcess(); -@@ -203,13 +203,13 @@ PpapiPluginProcessHost* PpapiPluginProce - return NULL; - } - --#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - // static - void PpapiPluginProcessHost::EarlyZygoteLaunch() { - DCHECK(!g_ppapi_zygote); - g_ppapi_zygote = CreateZygote(); - } --#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - - // static - void PpapiPluginProcessHost::DidCreateOutOfProcessInstance( -@@ -361,7 +361,7 @@ bool PpapiPluginProcessHost::Init(const - base::CommandLine::StringType plugin_launcher = - browser_command_line.GetSwitchValueNative(switches::kPpapiPluginLauncher); - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - int flags = plugin_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF : - ChildProcessHost::CHILD_NORMAL; - #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__truetype__font__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_pepper_pepper__truetype__font__linux.cc @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/pepper/pepper_truetype_font_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/pepper/pepper_truetype_font_linux.cc +@@ -76,12 +76,15 @@ int32_t PepperTrueTypeFontLinux::Initialize( + } + } + ++/// YYY ++#if !defined(OS_BSD) + fd_.reset(font_service::MatchFontFaceWithFallback( + desc->family, desc->weight >= PP_TRUETYPEFONTWEIGHT_BOLD, + desc->style & PP_TRUETYPEFONTSTYLE_ITALIC, desc->charset, + PP_BROWSERFONT_TRUSTED_FAMILY_DEFAULT)); + // TODO(bbudge) Modify content API to return results of font matching and + // fallback, so we can update |desc| to reflect that. ++#endif + return fd_.is_valid() ? PP_OK : PP_ERROR_FAILED; + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.h @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.h +@@ -110,14 +110,14 @@ class CONTENT_EXPORT RenderMessageFilter + const url::Origin& cache_storage_origin, + const std::string& cache_storage_cache_name) override; + void HasGpuProcess(HasGpuProcessCallback callback) override; +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void SetThreadPriority(int32_t ns_tid, +- base::ThreadPriority priority) override; ++ base::ThreadPriority priority); + #endif + + void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void SetThreadPriorityOnFileThread(base::PlatformThreadId ns_tid, + base::ThreadPriority priority); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__message__filter.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/render_message_filter.cc +@@ -73,7 +73,7 @@ + #if defined(OS_MACOSX) + #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "base/linux_util.h" + #include "base/threading/platform_thread.h" + #endif +@@ -165,7 +165,7 @@ void RenderMessageFilter::CreateFullscreenWidget( + std::move(callback).Run(route_id); + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void RenderMessageFilter::SetThreadPriorityOnFileThread( + base::PlatformThreadId ns_tid, + base::ThreadPriority priority) { +@@ -186,7 +186,7 @@ void RenderMessageFilter::SetThreadPriorityOnFileThrea + } + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void RenderMessageFilter::SetThreadPriority(int32_t ns_tid, + base::ThreadPriority priority) { + constexpr base::TaskTraits kTraits = { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.h @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.h +@@ -348,10 +348,10 @@ class CONTENT_EXPORT RenderProcessHostImpl + is_for_guests_only_ = is_for_guests_only; + } + +-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) ++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) + // Launch the zygote early in the browser startup. + static void EarlyZygoteLaunch(); +-#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) ++#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) + + void RecomputeAndUpdateWebKitPreferences(); + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__process__host__impl.cc +++ /dev/null @@ -1,52 +0,0 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/renderer_host/render_process_host_impl.cc -@@ -368,11 +368,11 @@ SiteProcessMap* GetSiteProcessMapForBrow - return map; - } - --#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - // This static member variable holds the zygote communication information for - // the renderer. - ZygoteHandle g_render_zygote; --#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - - // NOTE: changes to this class need to be reviewed by the security team. - class RendererSandboxedProcessLauncherDelegate -@@ -395,7 +395,7 @@ class RendererSandboxedProcessLauncherDe - return GetContentClient()->browser()->PreSpawnRenderer(policy); - } - --#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - ZygoteHandle* GetZygote() override { - const base::CommandLine& browser_command_line = - *base::CommandLine::ForCurrentProcess(); -@@ -635,7 +635,7 @@ void RenderProcessHost::SetMaxRendererPr - g_max_renderer_count_override = count; - } - --#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - // static - void RenderProcessHostImpl::EarlyZygoteLaunch() { - DCHECK(!g_render_zygote); -@@ -645,7 +645,7 @@ void RenderProcessHostImpl::EarlyZygoteL - ZygoteHostImpl::GetInstance()->SetRendererSandboxStatus( - (*GetGenericZygote())->GetSandboxStatus()); - } --#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - - RenderProcessHostImpl::RenderProcessHostImpl( - BrowserContext* browser_context, -@@ -788,7 +788,7 @@ bool RenderProcessHostImpl::Init() { - renderer_prefix = - browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - int flags = renderer_prefix.empty() ? ChildProcessHost::CHILD_ALLOW_SELF - : ChildProcessHost::CHILD_NORMAL; - #else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__view__host__impl.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/render_view_host_impl.cc +@@ -151,7 +151,7 @@ void GetPlatformSpecificPrefs(RendererPreferences* pre + display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL); + prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = + display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + prefs->system_font_family_name = gfx::Font().GetFontName(); + #endif + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -107,7 +107,7 @@ - #include "ui/gfx/gdi_util.h" +@@ -119,7 +119,7 @@ + #include "content/browser/accessibility/browser_accessibility_auralinux.h" #endif -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) @@ -9,7 +9,7 @@ #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h" #endif -@@ -1961,7 +1961,7 @@ bool RenderWidgetHostViewAura::NeedsInpu +@@ -2077,7 +2077,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { @@ -18,7 +18,7 @@ return NeedsInputGrab(); #endif return false; -@@ -2158,7 +2158,7 @@ void RenderWidgetHostViewAura::ForwardKe +@@ -2277,7 +2277,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_renderer__host_render__widget__host__view__event__handler.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/renderer_host/render_widget_host_view_event_handler.cc +@@ -619,7 +619,7 @@ bool RenderWidgetHostViewEventHandler::CanRendererHand + if (event->type() == ui::ET_MOUSE_EXITED) { + if (mouse_locked || selection_popup) + return false; +-#if defined(OS_WIN) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_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. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_tracing_tracing__controller__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_tracing_tracing__controller__impl.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/browser/tracing/tracing_controller_impl.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/tracing/tracing_controller_impl.cc -@@ -475,7 +475,7 @@ void TracingControllerImpl::AddTraceMess - return; - } - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // On Linux the browser process dumps process metrics for child process due to - // sandbox. - tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_utility__process__host__impl.cc +++ /dev/null @@ -1,94 +0,0 @@ ---- src/3rdparty/chromium/content/browser/utility_process_host_impl.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/browser/utility_process_host_impl.cc -@@ -43,9 +43,9 @@ - #include "services/service_manager/public/cpp/interface_provider.h" - #include "ui/base/ui_base_switches.h" - --#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - #include "content/public/browser/zygote_handle_linux.h" --#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - - #if defined(OS_WIN) - #include "sandbox/win/src/sandbox_policy.h" -@@ -54,11 +54,11 @@ - - namespace content { - --#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - namespace { - ZygoteHandle g_utility_zygote; - } // namespace --#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - - // NOTE: changes to this class need to be reviewed by the security team. - class UtilitySandboxedProcessLauncherDelegate -@@ -73,10 +73,10 @@ class UtilitySandboxedProcessLauncherDel - launch_elevated_(launch_elevated) - #elif defined(OS_POSIX) - env_(env) --#if !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - , - no_sandbox_(no_sandbox) --#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - #endif // OS_WIN - {} - -@@ -105,13 +105,13 @@ class UtilitySandboxedProcessLauncherDel - - #elif defined(OS_POSIX) - --#if !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - ZygoteHandle* GetZygote() override { - if (no_sandbox_ || !exposed_dir_.empty()) - return nullptr; - return GetGenericZygote(); - } --#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - base::EnvironmentMap GetEnvironment() override { return env_; } - #endif // OS_WIN - -@@ -126,9 +126,9 @@ class UtilitySandboxedProcessLauncherDel - bool launch_elevated_; - #elif defined(OS_POSIX) - base::EnvironmentMap env_; --#if !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - bool no_sandbox_; --#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) -+#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) - #endif // OS_WIN - }; - -@@ -153,7 +153,7 @@ UtilityProcessHostImpl::UtilityProcessHo - is_batch_mode_(false), - no_sandbox_(false), - run_elevated_(false), --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - child_flags_(ChildProcessHost::CHILD_ALLOW_SELF), - #else - child_flags_(ChildProcessHost::CHILD_NORMAL), -@@ -235,13 +235,13 @@ void UtilityProcessHostImpl::SetName(con - name_ = name; - } - --#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - // static - void UtilityProcessHostImpl::EarlyZygoteLaunch() { - DCHECK(!g_utility_zygote); - g_utility_zygote = CreateZygote(); - } --#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) -+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD) - - bool UtilityProcessHostImpl::StartProcess() { - if (started_) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__data__source__impl.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__data__source__impl.h @@ -0,0 +1,25 @@ +--- src/3rdparty/chromium/content/browser/webui/web_ui_data_source_impl.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/webui/web_ui_data_source_impl.h +@@ -31,15 +31,15 @@ class CONTENT_EXPORT WebUIDataSourceImpl : public URLD + public WebUIDataSource { + public: + // WebUIDataSource implementation: +- void AddString(base::StringPiece name, const base::string16& value) override; +- void AddString(base::StringPiece name, const std::string& value) override; +- void AddLocalizedString(base::StringPiece name, int ids) override; ++ void AddString(const std::string& name, const base::string16& value) override; ++ void AddString(const std::string& name, const std::string& value) override; ++ void AddLocalizedString(const std::string& name, int ids) override; + void AddLocalizedStrings( + const base::DictionaryValue& localized_strings) override; +- void AddBoolean(base::StringPiece name, bool value) override; +- void AddInteger(base::StringPiece name, int32_t value) override; +- void SetJsonPath(base::StringPiece path) override; +- void AddResourcePath(base::StringPiece path, int resource_id) override; ++ void AddBoolean(const std::string& name, bool value) override; ++ void AddInteger(const std::string& name, int32_t value) override; ++ void SetJsonPath(const std::string& path) override; ++ void AddResourcePath(const std::string& path, int resource_id) override; + void SetDefaultResource(int resource_id) override; + void SetRequestFilter( + const WebUIDataSource::HandleRequestCallback& callback) override; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__data__source__impl.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__data__source__impl.cc @@ -0,0 +1,69 @@ +--- src/3rdparty/chromium/content/browser/webui/web_ui_data_source_impl.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/webui/web_ui_data_source_impl.cc +@@ -120,24 +120,24 @@ WebUIDataSourceImpl::WebUIDataSourceImpl(const std::st + WebUIDataSourceImpl::~WebUIDataSourceImpl() { + } + +-void WebUIDataSourceImpl::AddString(base::StringPiece name, ++void WebUIDataSourceImpl::AddString(const std::string& name, + const base::string16& value) { + // TODO(dschuyler): Share only one copy of these strings. + localized_strings_.SetKey(name, base::Value(value)); +- replacements_[name.as_string()] = base::UTF16ToUTF8(value); ++ replacements_[name] = base::UTF16ToUTF8(value); + } + +-void WebUIDataSourceImpl::AddString(base::StringPiece name, ++void WebUIDataSourceImpl::AddString(const std::string& name, + const std::string& value) { + localized_strings_.SetKey(name, base::Value(value)); +- replacements_[name.as_string()] = value; ++ replacements_[name] = value; + } + +-void WebUIDataSourceImpl::AddLocalizedString(base::StringPiece name, int ids) { ++void WebUIDataSourceImpl::AddLocalizedString(const std::string& name, int ids) { + std::string utf8_str = + base::UTF16ToUTF8(GetContentClient()->GetLocalizedString(ids)); + localized_strings_.SetKey(name, base::Value(utf8_str)); +- replacements_[name.as_string()] = utf8_str; ++ replacements_[name] = utf8_str; + } + + void WebUIDataSourceImpl::AddLocalizedStrings( +@@ -147,7 +147,7 @@ void WebUIDataSourceImpl::AddLocalizedStrings( + &replacements_); + } + +-void WebUIDataSourceImpl::AddBoolean(base::StringPiece name, bool value) { ++void WebUIDataSourceImpl::AddBoolean(const std::string& name, bool value) { + localized_strings_.SetBoolean(name, value); + // TODO(dschuyler): Change name of |localized_strings_| to |load_time_data_| + // or similar. These values haven't been found as strings for +@@ -156,21 +156,21 @@ void WebUIDataSourceImpl::AddBoolean(base::StringPiece + // replacements. + } + +-void WebUIDataSourceImpl::AddInteger(base::StringPiece name, int32_t value) { ++void WebUIDataSourceImpl::AddInteger(const std::string& name, int32_t value) { + localized_strings_.SetInteger(name, value); + } + +-void WebUIDataSourceImpl::SetJsonPath(base::StringPiece path) { ++void WebUIDataSourceImpl::SetJsonPath(const std::string& path) { + DCHECK(json_path_.empty()); + DCHECK(!path.empty()); + +- json_path_ = path.as_string(); ++ json_path_ = path; + excluded_paths_.insert(json_path_); + } + +-void WebUIDataSourceImpl::AddResourcePath(base::StringPiece path, ++void WebUIDataSourceImpl::AddResourcePath(const std::string& path, + int resource_id) { +- path_to_idr_map_[path.as_string()] = resource_id; ++ path_to_idr_map_[path] = resource_id; + } + + void WebUIDataSourceImpl::SetDefaultResource(int resource_id) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__impl.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__impl.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/browser/webui/web_ui_impl.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/webui/web_ui_impl.h +@@ -52,7 +52,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, + int GetBindings() const override; + void SetBindings(int bindings) override; + void AddMessageHandler(std::unique_ptr handler) override; +- void RegisterMessageCallback(base::StringPiece message, ++ void RegisterMessageCallback(const std::string& message, + const MessageCallback& callback) override; + void ProcessWebUIMessage(const GURL& source_url, + const std::string& message, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__impl.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_webui_web__ui__impl.cc @@ -0,0 +1,14 @@ +--- src/3rdparty/chromium/content/browser/webui/web_ui_impl.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/browser/webui/web_ui_impl.cc +@@ -249,9 +249,9 @@ void WebUIImpl::CallJavascriptFunctionUnsafe( + ExecuteJavascript(GetJavascriptCall(function_name, args)); + } + +-void WebUIImpl::RegisterMessageCallback(base::StringPiece message, ++void WebUIImpl::RegisterMessageCallback(const std::string& message, + const MessageCallback& callback) { +- message_callbacks_.emplace(message.as_string(), callback); ++ message_callbacks_.insert(std::make_pair(message, callback)); + } + + void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_BUILD.gn @@ -1,27 +1,15 @@ ---- src/3rdparty/chromium/content/common/BUILD.gn.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/common/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/common/BUILD.gn -@@ -500,7 +500,7 @@ source_set("common") { - if (use_seccomp_bpf) { - defines += [ "USE_SECCOMP_BPF" ] - } else { -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources -= [ - "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc", - "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h", -@@ -514,6 +514,15 @@ source_set("common") { - "sandbox_linux/bpf_utility_policy_linux.h", - "sandbox_linux/sandbox_bpf_base_policy_linux.cc", - "sandbox_linux/sandbox_bpf_base_policy_linux.h", -+ "sandbox_linux/sandbox_seccomp_bpf_linux.cc", -+ "sandbox_linux/sandbox_seccomp_bpf_linux.h", -+ ] -+ } -+ if (is_bsd) { -+ sources -= [ -+ "sandbox_linux/sandbox_linux.cc", -+ "sandbox_linux/sandbox_linux.h", -+ "sandbox_linux/sandbox_init_linux.cc", - ] - } - if (is_android) { +@@ -414,6 +414,12 @@ source_set("common") { + libs += [ "android" ] + } + ++ if (is_bsd) { ++ sources -= [ ++ "sandbox_init_linux.cc", ++ ] ++ } ++ + if (is_debug && !is_component_build && enable_plugins) { + # Content depends on the PPAPI message logging stuff; if this isn't here, + # some unit test binaries won't compile. This only worked in release mode Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_common__sandbox__support__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_common__sandbox__support__linux.cc @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/content/common/common_sandbox_support_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/common/common_sandbox_support_linux.cc +@@ -5,6 +5,7 @@ + #include "content/public/common/common_sandbox_support_linux.h" + + #include ++#include + + #include + #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_sandbox__linux_sandbox__debug__handling__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_sandbox__linux_sandbox__debug__handling__linux.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- src/3rdparty/chromium/content/common/sandbox_linux/sandbox_debug_handling_linux.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/common/sandbox_linux/sandbox_debug_handling_linux.cc -@@ -7,7 +7,9 @@ - #include - #include - #include -+#if 0 // no OS_FREEBSD here? - #include -+#endif - #include - - #include "base/command_line.h" -@@ -69,12 +71,16 @@ bool SandboxDebugHandling::SetDumpableSt - return true; - } - -+#if 0 // no OS_FREEBSD here? - if (prctl(PR_SET_DUMPABLE, 0) != 0) { - PLOG(ERROR) << "Failed to set non-dumpable flag"; - return false; - } - - return prctl(PR_GET_DUMPABLE) == 0; -+#else -+ return false; -+#endif - } - - } // namespace content Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_set__process__title__linux.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_set__process__title__linux.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_set__process__title__linux.h @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/common/set_process_title_linux.h.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/common/set_process_title_linux.h -@@ -5,6 +5,9 @@ - #ifndef CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_ - #define CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_ - -+#include "build/build_config.h" -+ -+#if !defined(OS_FREEBSD) - // Set the process title that will show in "ps" and similar tools. Takes - // printf-style format string and arguments. After calling setproctitle() - // the original main() argv[] array should not be used. By default, the -@@ -14,6 +17,7 @@ - // This signature and naming is to be compatible with most other Unix - // implementations of setproctitle(). - void setproctitle(const char* fmt, ...); -+#endif - - // Initialize state needed for setproctitle() on Linux. Pass the argv pointer - // from main() to setproctitle_init() before calling setproctitle(). Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_set__process__title__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_set__process__title__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_set__process__title__linux.cc @@ -1,19 +0,0 @@ ---- src/3rdparty/chromium/content/common/set_process_title_linux.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/common/set_process_title_linux.cc -@@ -49,6 +49,8 @@ - extern char** environ; - - static char** g_main_argv = NULL; -+ -+#if !defined(OS_FREEBSD) - static char* g_orig_argv0 = NULL; - - void setproctitle(const char* fmt, ...) { -@@ -101,6 +103,7 @@ void setproctitle(const char* fmt, ...) - va_end(ap); - g_main_argv[1] = NULL; - } -+#endif - - // A version of this built into glibc would not need this function, since - // it could stash the argv pointer in __libc_start_main(). But we need it. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_BUILD.gn @@ -1,10 +1,11 @@ ---- src/3rdparty/chromium/content/gpu/BUILD.gn.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/gpu/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/gpu/BUILD.gn -@@ -96,6 +96,7 @@ target(link_target_type, "gpu_sources") +@@ -130,7 +130,7 @@ target(link_target_type, "gpu_sources") { - if (use_x11) { - deps += [ "//ui/events/platform/x11" ] -+ configs += [ "//build/config/linux:x11" ] + # Use DRI on desktop Linux builds. + if (current_cpu != "s390x" && current_cpu != "ppc64" && is_desktop_linux && +- (!is_chromecast || is_cast_desktop_build) && !use_qt) { ++ (!is_chromecast || is_cast_desktop_build) && !use_qt && !is_bsd) { + configs += [ "//build/config/linux/dri" ] } - - if (use_ozone) { + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__child__thread.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__child__thread.cc +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/content/gpu/gpu_child_thread.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/gpu/gpu_child_thread.cc -@@ -383,6 +383,7 @@ void GpuChildThread::OnCollectGraphicsIn - if (dead_on_arrival_) - return; - -+#if !defined(OS_BSD) - #if defined(OS_WIN) - // GPU full info collection should only happen on un-sandboxed GPU process - // or single process/in-process gpu mode on Windows. -@@ -434,6 +435,7 @@ void GpuChildThread::OnCollectGraphicsIn - base::MessageLoop::current()->QuitWhenIdle(); - } - #endif // OS_WIN -+#endif // XXX(rene) !FreeBSD - } - - void GpuChildThread::OnGetVideoMemoryUsageStats() { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__main.cc @@ -1,29 +1,47 @@ ---- src/3rdparty/chromium/content/gpu/gpu_main.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/gpu/gpu_main.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/gpu/gpu_main.cc -@@ -92,7 +92,7 @@ namespace content { +@@ -77,7 +77,7 @@ + #include "ui/gfx/x/x11_switches.h" // nogncheck + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "content/gpu/gpu_sandbox_hook_linux.h" + #include "content/public/common/sandbox_init.h" + #include "services/service_manager/sandbox/linux/sandbox_linux.h" +@@ -110,7 +110,7 @@ namespace content { + namespace { -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) - bool StartSandboxLinux(gpu::GpuWatchdogThread*); - #elif defined(OS_WIN) - bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo*); -@@ -145,7 +145,7 @@ class ContentSandboxHelper : public gpu: - - bool EnsureSandboxInitialized( - gpu::GpuWatchdogThread* watchdog_thread) override { + bool StartSandboxLinux(gpu::GpuWatchdogThread*, + const gpu::GPUInfo*, + const gpu::GpuPreferences&); +@@ -171,7 +171,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel + bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, + const gpu::GPUInfo* gpu_info, + const gpu::GpuPreferences& gpu_prefs) override { -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) - return StartSandboxLinux(watchdog_thread); + return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif defined(OS_WIN) return StartSandboxWindows(sandbox_info_); -@@ -292,7 +292,7 @@ int GpuMain(const MainFunctionParams& pa +@@ -355,7 +355,7 @@ int GpuMain(const MainFunctionParams& parameters) { namespace { -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) - bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread) { - TRACE_EVENT0("gpu,startup", "Initialize sandbox"); + bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, + const gpu::GPUInfo* gpu_info, + const gpu::GpuPreferences& gpu_prefs) { +@@ -390,7 +390,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo + return res; + } +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) && !defined(OS_BSD) + + #if defined(OS_WIN) + bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo* sandbox_info) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_gpu__sandbox__hook__linux.cc @@ -0,0 +1,27 @@ +--- src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/gpu/gpu_sandbox_hook_linux.cc +@@ -68,7 +68,7 @@ inline bool UseLibV4L2() { + #endif + } + +-constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; ++constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL; + + void AddV4L2GpuWhitelist( + std::vector* permissions, +@@ -283,6 +283,8 @@ bool BrokerProcessPreSandboxHook( + + } // namespace + ++// YYY - Required for successful debug build? ++#if !defined(OS_BSD) + bool GpuProcessPreSandboxHook(service_manager::SandboxLinux::Options options) { + service_manager::SandboxLinux::GetInstance()->StartBrokerProcess( + CommandSetForGPU(options), FilePermissionsForGpu(options), +@@ -296,5 +298,6 @@ bool GpuProcessPreSandboxHook(service_manager::Sandbox + errno = 0; + return true; + } ++#endif + + } // namespace content Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_in__process__gpu__thread.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_in__process__gpu__thread.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/content/gpu/in_process_gpu_thread.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/gpu/in_process_gpu_thread.cc -@@ -53,8 +53,6 @@ void InProcessGpuThread::Init() { - gpu::GPUInfo gpu_info; - if (!gl::init::InitializeGLOneOff()) - VLOG(1) << "gl::init::InitializeGLOneOff failed"; -- else -- gpu::CollectContextGraphicsInfo(&gpu_info); - - // The process object takes ownership of the thread object, so do not - // save and delete the pointer. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.h +@@ -53,7 +53,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp + bool sync_dir) override; + + private: +-#if !defined(OS_ANDROID) && !defined(OS_WIN) ++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) + class SandboxSupport; + std::unique_ptr sandbox_support_; + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__blink__platform__impl.cc @@ -0,0 +1,47 @@ +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc +@@ -20,7 +20,7 @@ + + #if defined(OS_MACOSX) + #include "third_party/blink/public/platform/mac/web_sandbox_support.h" +-#elif defined(OS_POSIX) && !defined(OS_ANDROID) ++#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_BSD) + #include "content/child/child_process_sandbox_support_impl_linux.h" + #include "third_party/blink/public/platform/linux/web_fallback_font.h" + #include "third_party/blink/public/platform/linux/web_sandbox_support.h" +@@ -36,7 +36,7 @@ typedef struct CGFont* CGFontRef; + + namespace content { + +-#if !defined(OS_ANDROID) && !defined(OS_WIN) ++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) + + class PpapiBlinkPlatformImpl::SandboxSupport : public WebSandboxSupport { + public: +@@ -126,7 +126,7 @@ void PpapiBlinkPlatformImpl::SandboxSupport::GetWebFon + + #endif + +-#endif // !defined(OS_ANDROID) && !defined(OS_WIN) ++#endif // !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) + + PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl() { + #if defined(OS_LINUX) +@@ -144,7 +144,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() { + } + + void PpapiBlinkPlatformImpl::Shutdown() { +-#if !defined(OS_ANDROID) && !defined(OS_WIN) ++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) + // SandboxSupport contains a map of WebFallbackFont objects, which hold + // WebStrings and WebVectors, which become invalidated when blink is shut + // down. Hence, we need to clear that map now, just before blink::shutdown() +@@ -158,7 +158,7 @@ blink::WebThread* PpapiBlinkPlatformImpl::CurrentThrea + } + + blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetSandboxSupport() { +-#if !defined(OS_ANDROID) && !defined(OS_WIN) ++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) + return sandbox_support_.get(); + #else + return nullptr; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_web__ui.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_web__ui.h @@ -0,0 +1,19 @@ +--- src/3rdparty/chromium/content/public/browser/web_ui.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/public/browser/web_ui.h +@@ -11,7 +11,6 @@ + + #include "base/callback.h" + #include "base/strings/string16.h" +-#include "base/strings/string_piece.h" + #include "content/common/content_export.h" + #include "ui/base/page_transition_types.h" + +@@ -75,7 +74,7 @@ class CONTENT_EXPORT WebUI { + // Used by WebUIMessageHandlers. If the given message is already registered, + // the call has no effect. + using MessageCallback = base::RepeatingCallback; +- virtual void RegisterMessageCallback(base::StringPiece message, ++ virtual void RegisterMessageCallback(const std::string& message, + const MessageCallback& callback) = 0; + + // This is only needed if an embedder overrides handling of a WebUIMessage and Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_web__ui__data__source.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_browser_web__ui__data__source.h @@ -0,0 +1,51 @@ +--- src/3rdparty/chromium/content/public/browser/web_ui_data_source.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/public/browser/web_ui_data_source.h +@@ -13,7 +13,6 @@ + + #include "base/callback.h" + #include "base/strings/string16.h" +-#include "base/strings/string_piece.h" + #include "content/common/content_export.h" + + namespace base { +@@ -45,33 +44,33 @@ class WebUIDataSource { + std::unique_ptr update); + + // Adds a string keyed to its name to our dictionary. +- virtual void AddString(base::StringPiece name, ++ virtual void AddString(const std::string& name, + const base::string16& value) = 0; + + // Adds a string keyed to its name to our dictionary. +- virtual void AddString(base::StringPiece name, const std::string& value) = 0; ++ virtual void AddString(const std::string& name, const std::string& value) = 0; + + // Adds a localized string with resource |ids| keyed to its name to our + // dictionary. +- virtual void AddLocalizedString(base::StringPiece name, int ids) = 0; ++ virtual void AddLocalizedString(const std::string& name, int ids) = 0; + + // Add strings from |localized_strings| to our dictionary. + virtual void AddLocalizedStrings( + const base::DictionaryValue& localized_strings) = 0; + + // Adds a boolean keyed to its name to our dictionary. +- virtual void AddBoolean(base::StringPiece name, bool value) = 0; ++ virtual void AddBoolean(const std::string& name, bool value) = 0; + + // Adds a signed 32-bit integer keyed to its name to our dictionary. Larger + // integers may not be exactly representable in JavaScript. See + // MAX_SAFE_INTEGER in /v8/src/globals.h. +- virtual void AddInteger(base::StringPiece name, int32_t value) = 0; ++ virtual void AddInteger(const std::string& name, int32_t value) = 0; + + // Sets the path which will return the JSON strings. +- virtual void SetJsonPath(base::StringPiece path) = 0; ++ virtual void SetJsonPath(const std::string& path) = 0; + + // Adds a mapping between a path name and a resource to return. +- virtual void AddResourcePath(base::StringPiece path, int resource_id) = 0; ++ virtual void AddResourcePath(const std::string& path, int resource_id) = 0; + + // Sets the resource to returned when no other paths match. + virtual void SetDefaultResource(int resource_id) = 0; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_child__process__host.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_child__process__host.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_child__process__host.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/public/common/child_process_host.h.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/public/common/child_process_host.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/public/common/child_process_host.h -@@ -53,7 +53,7 @@ class CONTENT_EXPORT ChildProcessHost : +@@ -45,7 +45,7 @@ class CONTENT_EXPORT ChildProcessHost : public IPC::Se // No special behavior requested. CHILD_NORMAL = 0, @@ -9,7 +9,7 @@ // Indicates that the child execed after forking may be execced from // /proc/self/exe rather than using the "real" app path. This prevents // autoupdate from confusing us if it changes the file out from under us. -@@ -62,7 +62,7 @@ class CONTENT_EXPORT ChildProcessHost : +@@ -54,7 +54,7 @@ class CONTENT_EXPORT ChildProcessHost : public IPC::Se // gdb). In this case, you'd use GetChildPath to get the real executable // file name, and then prepend the GDB command to the command line. CHILD_ALLOW_SELF = 1 << 0, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.h @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/content/public/common/content_switches.h.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/public/common/content_switches.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/public/common/content_switches.h -@@ -293,7 +293,7 @@ CONTENT_EXPORT extern const char kDisabl - CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[]; +@@ -277,7 +277,7 @@ CONTENT_EXPORT extern const char kEnableOSKOverscroll[ + CONTENT_EXPORT extern const char kDisablePanelFitting[]; #endif -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_content__switches.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/content/public/common/content_switches.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/public/common/content_switches.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/public/common/content_switches.cc -@@ -992,7 +992,7 @@ const char kDisableVaapiAcceleratedVideo - "disable-vaapi-accelerated-video-encode"; +@@ -978,7 +978,7 @@ const char kDisableAudioSupportForDesktopShare[] = + const char kDisablePanelFitting[] = "disable-panel-fitting"; #endif -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_renderer__preferences.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_renderer__preferences.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_common_renderer__preferences.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/public/common/renderer_preferences.h.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/public/common/renderer_preferences.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/public/common/renderer_preferences.h -@@ -139,7 +139,7 @@ struct CONTENT_EXPORT RendererPreference +@@ -137,7 +137,7 @@ struct CONTENT_EXPORT RendererPreferences { // Country iso of the mobile network for content detection purpose. std::string network_contry_iso; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_stream_processed__local__audio__source.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_stream_processed__local__audio__source.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/renderer/media/stream/processed_local_audio_source.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/renderer/media/stream/processed_local_audio_source.cc +@@ -267,7 +267,7 @@ void ProcessedLocalAudioSource::Capture(const media::A + bool key_pressed) { + #if defined(OS_WIN) || defined(OS_MACOSX) + DCHECK_LE(volume, 1.0); +-#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD) ++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_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 Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_webrtc_processed__local__audio__source.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_media_webrtc_processed__local__audio__source.cc +++ /dev/null @@ -1,13 +0,0 @@ ---- src/3rdparty/chromium/content/renderer/media/webrtc/processed_local_audio_source.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/renderer/media/webrtc/processed_local_audio_source.cc -@@ -269,8 +269,8 @@ void ProcessedLocalAudioSource::Capture( - bool key_pressed) { - #if defined(OS_WIN) || defined(OS_MACOSX) - DCHECK_LE(volume, 1.0); --#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD) -- // We have a special situation on Linux where the microphone volume can be -+#elif defined(OS_POSIX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) -+ // We have a special situation on POSIX 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 - // even if the reported maximum levels is N, the actual microphone level can Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_render__thread__impl.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/renderer/render_thread_impl.cc -@@ -206,11 +206,13 @@ - #include "content/common/external_ipc_dumper.h" +@@ -199,12 +199,21 @@ + #include "mojo/public/cpp/bindings/message_dumper.h" #endif +#if !defined(OS_BSD) @@ -12,23 +12,66 @@ #endif +#endif ++#if defined(OS_BSD) ++#include ++#include ++#include ++#include ++#endif ++ using base::ThreadRestrictions; using blink::WebDocument; -@@ -1488,7 +1490,7 @@ media::GpuVideoAcceleratorFactories* Ren - const bool enable_video_accelerator = - !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); - const bool enable_gpu_memory_buffer_video_frames = --#if defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) && - !cmd_line->HasSwitch(switches::kDisableGpuCompositing) && - !gpu_channel_host->gpu_info().software_rendering; -@@ -1846,6 +1848,8 @@ void RenderThreadImpl::RecordPurgeAndSus - #else - size_t malloc_usage = minfo.hblkhd + minfo.arena; + using blink::WebFrame; +@@ -980,7 +989,7 @@ void RenderThreadImpl::Init( + DCHECK(parsed_num_raster_threads) << string_value; + DCHECK_GT(num_raster_threads, 0); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) // || defined(OS_BSD) YYY + categorized_worker_pool_->SetBackgroundingCallback( + main_thread_scheduler_->DefaultTaskRunner(), + base::BindOnce( +@@ -1021,7 +1030,7 @@ void RenderThreadImpl::Init( + GetConnector()->BindInterface(mojom::kBrowserServiceName, + mojo::MakeRequest(&storage_partition_service_)); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) // || defined(OS_BSD) YYY + render_message_filter()->SetThreadPriority( + ChildProcess::current()->io_thread_id(), base::ThreadPriority::DISPLAY); #endif -+#elif defined(OS_BSD) -+ size_t malloc_usage = 0; - #else - size_t malloc_usage = GetMallocUsage(); +@@ -1227,7 +1236,7 @@ void RenderThreadImpl::InitializeCompositorThread() { + false)); + GetContentClient()->renderer()->PostCompositorThreadCreated( + compositor_task_runner_.get()); +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) // || defined(OS_BSD) YYY + render_message_filter()->SetThreadPriority(compositor_thread_->ThreadId(), + base::ThreadPriority::DISPLAY); #endif +@@ -1451,11 +1460,11 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: + gpu::kGpuFeatureStatusEnabled); + const bool enable_gpu_memory_buffers = + !is_gpu_compositing_disabled_ && +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames); + #else + cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); +-#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) ++#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + const bool enable_media_stream_gpu_memory_buffers = + enable_gpu_memory_buffers && + base::FeatureList::IsEnabled( +@@ -1825,7 +1834,11 @@ bool RenderThreadImpl::GetRendererMemoryMetrics( + blink_stats.blink_gc_total_allocated_bytes / 1024; + std::unique_ptr metric( + base::ProcessMetrics::CreateCurrentProcessMetrics()); ++#if defined(OS_BSD) ++ size_t malloc_usage = 0; ++#else + size_t malloc_usage = metric->GetMallocUsage(); ++#endif + memory_metrics->malloc_mb = malloc_usage / 1024 / 1024; + + discardable_memory::ClientDiscardableSharedMemoryManager::Statistics Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.h -@@ -256,7 +256,7 @@ class CONTENT_EXPORT RendererBlinkPlatfo - class FileUtilities; - std::unique_ptr file_utilities_; +@@ -265,7 +265,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi + std::unique_ptr main_thread_; + std::unique_ptr connector_; --#if !defined(OS_ANDROID) && !defined(OS_WIN) -+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) +-#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) ++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) class SandboxSupport; std::unique_ptr sandbox_support_; #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__blink__platform__impl.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/renderer/renderer_blink_platform_impl.cc -@@ -111,7 +111,7 @@ +@@ -123,7 +123,7 @@ #if defined(OS_POSIX) #include "base/file_descriptor_posix.h" @@ -9,48 +9,57 @@ #include #include -@@ -201,7 +201,7 @@ class RendererBlinkPlatformImpl::FileUti - scoped_refptr thread_safe_sender_; - }; +@@ -203,7 +203,7 @@ gpu::ContextType ToGpuContextType(blink::Platform::Con --#if !defined(OS_ANDROID) && !defined(OS_WIN) -+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) + //------------------------------------------------------------------------------ + +-#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) ++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) class RendererBlinkPlatformImpl::SandboxSupport : public blink::WebSandboxSupport { public: -@@ -247,7 +247,7 @@ RendererBlinkPlatformImpl::RendererBlink - renderer_scheduler_(renderer_scheduler), - blink_interface_provider_( - new BlinkInterfaceProviderImpl(remote_interfaces)) { --#if !defined(OS_ANDROID) && !defined(OS_WIN) -+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) +@@ -238,7 +238,7 @@ class RendererBlinkPlatformImpl::SandboxSupport + sk_sp font_loader_; + #endif + }; +-#endif // !defined(OS_ANDROID) && !defined(OS_WIN) ++#endif // !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) + + //------------------------------------------------------------------------------ + +@@ -276,7 +276,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( + connector_ = service_manager::Connector::Create(&request); + } + +-#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) ++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) if (g_sandbox_enabled && sandboxEnabled()) { - sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport); - } else { -@@ -283,7 +283,7 @@ RendererBlinkPlatformImpl::~RendererBlin + #if defined(OS_MACOSX) + sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport()); +@@ -304,7 +304,7 @@ RendererBlinkPlatformImpl::~RendererBlinkPlatformImpl( } void RendererBlinkPlatformImpl::Shutdown() { --#if !defined(OS_ANDROID) && !defined(OS_WIN) -+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD) - // SandboxSupport contains a map of WebFontFamily objects, which hold - // WebCStrings, which become invalidated when blink is shut down. Hence, we - // need to clear that map now, just before blink::shutdown() is called. -@@ -331,7 +331,7 @@ blink::WebFileUtilities* RendererBlinkPl +-#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) ++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD) + // SandboxSupport contains a map of WebFallbackFont objects, which hold + // WebStrings and WebVectors, which become invalidated when blink is shut + // down. Hence, we need to clear that map now, just before blink::shutdown() +@@ -396,7 +396,7 @@ blink::BlameContext* RendererBlinkPlatformImpl::GetTop } - blink::WebSandboxSupport* RendererBlinkPlatformImpl::sandboxSupport() { --#if defined(OS_ANDROID) || defined(OS_WIN) -+#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_BSD) + blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { +-#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_FUCHSIA) ++#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_FUCHSIA) || defined(OS_BSD) // These platforms do not require sandbox support. return NULL; #else -@@ -539,7 +539,7 @@ bool RendererBlinkPlatformImpl::SandboxS - return FontLoader::CGFontRefFromBuffer(font_data, font_data_size, out); +@@ -589,7 +589,7 @@ bool RendererBlinkPlatformImpl::SandboxSupport::LoadFo + return content::LoadFont(src_font, out, font_id); } -#elif defined(OS_POSIX) && !defined(OS_ANDROID) +#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_BSD) - void RendererBlinkPlatformImpl::SandboxSupport::getFallbackFontForCharacter( + void RendererBlinkPlatformImpl::SandboxSupport::GetFallbackFontForCharacter( blink::WebUChar32 character, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main.cc @@ -0,0 +1,27 @@ +--- src/3rdparty/chromium/content/renderer/renderer_main.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/renderer/renderer_main.cc +@@ -177,7 +177,7 @@ int RendererMain(const MainFunctionParams& parameters) + bool need_sandbox = + !command_line.HasSwitch(service_manager::switches::kNoSandbox); + +-#if !defined(OS_WIN) && !defined(OS_MACOSX) ++#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) + // Sandbox is enabled before RenderProcess initialization on all platforms, + // except Windows and Mac. + // TODO(markus): Check if it is OK to remove ifdefs for Windows and Mac. +@@ -187,12 +187,15 @@ int RendererMain(const MainFunctionParams& parameters) + } + #endif + ++// YYY ++//#if !defined(OS_BSD) + auto render_process = RenderProcessImpl::Create(); + RenderThreadImpl::Create(std::move(main_message_loop), + std::move(main_thread_scheduler)); + + if (need_sandbox) + run_loop = platform.EnableSandbox(); ++//#endif + + base::HighResolutionTimerManager hi_res_timer_manager; + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_renderer__main__platform__delegate__linux.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/renderer/renderer_main_platform_delegate_linux.cc -@@ -29,6 +29,7 @@ void RendererMainPlatformDelegate::Platf +@@ -30,6 +30,7 @@ void RendererMainPlatformDelegate::PlatformUninitializ } bool RendererMainPlatformDelegate::EnableSandbox() { @@ -8,7 +8,7 @@ // The setuid sandbox is started in the zygote process: zygote_main_linux.cc // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox.md // -@@ -59,7 +60,7 @@ bool RendererMainPlatformDelegate::Enabl +@@ -65,7 +66,7 @@ bool RendererMainPlatformDelegate::EnableSandbox() { CHECK_EQ(errno, EPERM); } #endif // __x86_64__ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_webscrollbarbehavior__impl__aura.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_renderer_webscrollbarbehavior__impl__aura.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/content/renderer/webscrollbarbehavior_impl_aura.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/renderer/webscrollbarbehavior_impl_aura.cc -@@ -14,7 +14,7 @@ bool WebScrollbarBehaviorImpl::shouldCen - blink::WebPointerProperties::Button mouseButton, - bool shiftKeyPressed, - bool altKeyPressed) { --#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) - if (mouseButton == blink::WebPointerProperties::Button::Middle) - return true; - #endif -@@ -29,7 +29,7 @@ bool WebScrollbarBehaviorImpl::shouldSna - // Disable snapback on desktop Linux to better integrate with the desktop - // behavior. Typically, Linux apps do not implement scrollbar snapback (this is - // true for at least GTK and QT apps). --#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) - return false; - #endif - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_shell_BUILD.gn @@ -1,34 +1,25 @@ ---- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2017-01-26 00:49:13 UTC +--- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/content/shell/BUILD.gn -@@ -296,7 +296,7 @@ static_library("content_shell_lib") { +@@ -349,7 +349,7 @@ static_library("content_shell_lib") { ] } - if (is_linux) { + if (is_linux || is_bsd) { deps += [ - "//build/linux:fontconfig", + "//third_party/fontconfig", "//ui/gfx:test_support", -@@ -317,7 +317,7 @@ static_library("content_shell_lib") { - deps += [ "//content/shell/android:content_shell_jni_headers" ] - } - -- if (is_posix && !is_mac) { -+ if (is_posix && !is_mac && !is_bsd) { - deps += [ - "//components/crash/content/app", - "//components/crash/content/browser", -@@ -366,7 +366,7 @@ static_library("content_shell_lib") { +@@ -416,7 +416,7 @@ static_library("content_shell_lib") { ] } - if (is_linux) { + if (is_linux || is_bsd) { - deps += [ "//third_party/freetype2" ] + deps += [ "//build/config/freetype" ] } -@@ -532,7 +532,7 @@ if (is_android) { - } +@@ -612,7 +612,7 @@ if (is_android) { + [ "//third_party/crashpad/crashpad/handler:crashpad_handler" ] } - if (is_linux && !is_component_build) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_content_test_BUILD.gn +++ /dev/null @@ -1,38 +0,0 @@ ---- src/3rdparty/chromium/content/test/BUILD.gn.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/test/BUILD.gn -@@ -748,7 +748,7 @@ test("content_browsertests") { - } - } - -- if (is_android || is_linux || is_mac || is_win) { -+ if (is_android || is_linux || is_bsd || is_mac || is_win) { - data += [ - "$root_out_dir/content_shell.pak", - "data/", -@@ -1350,7 +1350,7 @@ test("content_unittests") { - sources += [ "../browser/memory/memory_monitor_linux_unittest.cc" ] - } - -- if (is_android || is_linux || is_mac || is_win) { -+ if (is_android || is_linux || is_bsd || is_mac || is_win) { - data = [ - "$root_out_dir/content_shell.pak", - "data/", -@@ -1540,7 +1540,7 @@ test("content_unittests") { - "//ui/shell_dialogs:shell_dialogs", - ] - -- if (is_linux || is_mac || is_win) { -+ if (is_linux || is_bsd || is_mac || is_win) { - sources += - [ "../browser/media/capture/desktop_capture_device_unittest.cc" ] - deps += [ "//third_party/webrtc/modules/desktop_capture" ] -@@ -1576,7 +1576,7 @@ test("content_unittests") { - ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - if (use_dbus) { - deps += [ "//dbus:test_support" ] - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__main.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_utility_utility__main.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/utility/utility_main.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/utility/utility_main.cc +@@ -64,7 +64,7 @@ int UtilityMain(const MainFunctionParams& parameters) + if (parameters.command_line.HasSwitch(switches::kUtilityStartupDialog)) + WaitForDebugger("Utility"); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) && !defined(OS_BSD) + // Initializes the sandbox before any threads are created. + // TODO(jorgelo): move this after GTK initialization when we enable a strict + // Seccomp-BPF policy. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_crypto_nss__util.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_crypto_nss__util.cc +++ /dev/null @@ -1,24 +0,0 @@ ---- src/3rdparty/chromium/crypto/nss_util.cc.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/crypto/nss_util.cc -@@ -20,7 +20,7 @@ - #include "base/threading/thread_task_runner_handle.h" - #include "crypto/nss_util_internal.h" - --#if defined(OS_OPENBSD) -+#if defined(OS_BSD) - #include - #include - #endif -@@ -150,10 +150,10 @@ void UseLocalCacheOfNSSDatabaseIfNFS(con - base::FileSystemType fs_type = base::FILE_SYSTEM_UNKNOWN; - if (base::GetFileSystemType(database_dir, &fs_type)) - db_on_nfs = (fs_type == base::FILE_SYSTEM_NFS); --#elif defined(OS_OPENBSD) -+#elif defined(OS_BSD) - struct statfs buf; - if (statfs(database_dir.value().c_str(), &buf) == 0) -- db_on_nfs = (strcmp(buf.f_fstypename, MOUNT_NFS) == 0); -+ db_on_nfs = (strcmp(buf.f_fstypename, "nfs") == 0); - #else - NOTIMPLEMENTED(); - #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_BUILD.gn @@ -1,6 +1,28 @@ ---- src/3rdparty/chromium/device/BUILD.gn.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/BUILD.gn -@@ -184,7 +184,7 @@ test("device_unittests") { +@@ -15,7 +15,7 @@ if (is_mac) { + import("//build/config/mac/mac_sdk.gni") + } + +-is_linux_without_udev = is_linux && !use_udev ++is_linux_without_udev = (is_linux || is_bsd) && !use_udev + + test("device_unittests") { + sources = [ +@@ -144,10 +144,10 @@ test("device_unittests") { + ] + + # Serial is supported in below platforms. See //device/servial/BUILD.gn +- if (is_win || is_linux || is_mac) { ++ if (is_win || is_linux || is_bsd || is_mac) { + sources += [ "serial/serial_device_enumerator_unittest.cc" ] + deps += [ "//device/serial" ] +- if (is_linux || is_mac) { ++ if (is_linux || is_bsd || is_mac) { + sources += [ "serial/serial_io_handler_posix_unittest.cc" ] + } + } +@@ -212,7 +212,7 @@ test("device_unittests") { ] } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_battery_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_battery_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_battery_BUILD.gn @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/device/battery/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/battery/BUILD.gn -@@ -47,7 +47,7 @@ if (!is_android) { - ] - } - -- if (is_linux && !is_chromeos) { -+ if ((is_linux || is_bsd) && !is_chromeos) { - if (use_dbus) { - configs += [ "//build/config/linux/dbus" ] - deps += [ "//dbus" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_bluetooth_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_bluetooth_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_bluetooth_BUILD.gn @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/device/bluetooth/BUILD.gn.orig 2017-12-15 17:05:52.395544000 -0500 -+++ src/3rdparty/chromium/device/bluetooth/BUILD.gn 2017-12-15 17:06:09.864315000 -0500 -@@ -193,7 +193,7 @@ +--- src/3rdparty/chromium/device/bluetooth/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/device/bluetooth/BUILD.gn +@@ -266,7 +266,7 @@ component("bluetooth") { ] } - if (is_chromeos || is_linux) { + if (is_chromeos || (is_linux && !is_bsd)) { - if (use_dbus) { + if (use_dbus && is_chromeos) { + # This crap uses ChromeOS specific system API sources += [ - "bluez/bluetooth_adapter_bluez.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_BUILD.gn @@ -0,0 +1,17 @@ +--- src/3rdparty/chromium/device/gamepad/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/device/gamepad/BUILD.gn +@@ -113,6 +113,14 @@ component("gamepad") { + } + } + ++ if (is_bsd) { ++ sources -= [ ++ "gamepad_device_linux.cc", ++ "gamepad_platform_data_fetcher_linux.cc", ++ "udev_gamepad_linux.cc", ++ ] ++ } ++ + if (is_android) { + deps += [ ":jni_headers" ] + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_gamepad_gamepad__provider.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/device/gamepad/gamepad_provider.cc.orig 2017-02-02 02:02:54 UTC +--- src/3rdparty/chromium/device/gamepad/gamepad_provider.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/gamepad/gamepad_provider.cc -@@ -145,7 +145,7 @@ void GamepadProvider::Initialize(std::un +@@ -187,7 +187,7 @@ void GamepadProvider::Initialize(std::unique_ptrAddDevicesChangedObserver(this); polling_thread_.reset(new base::Thread("Gamepad polling thread")); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_geolocation_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_geolocation_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_geolocation_BUILD.gn @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/device/geolocation/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/geolocation/BUILD.gn -@@ -89,7 +89,7 @@ component("geolocation") { - if (is_android) { - sources -= [ "wifi_data_provider_common.cc" ] - } -- if (is_chromeos || (is_linux && !use_dbus)) { -+ if (is_chromeos || (is_linux && !use_dbus) || is_bsd) { - sources -= [ "wifi_data_provider_linux.cc" ] - } - if (is_linux && use_dbus) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_geolocation_location__arbitrator.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_geolocation_location__arbitrator.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/device/geolocation/location_arbitrator.cc.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/geolocation/location_arbitrator.cc -@@ -182,7 +182,7 @@ LocationArbitrator::NewNetworkLocationPr - - std::unique_ptr - LocationArbitrator::NewSystemLocationProvider() { --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - return nullptr; - #else - return device::NewSystemLocationProvider(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_hid_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_hid_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_hid_BUILD.gn @@ -1,16 +0,0 @@ ---- src/3rdparty/chromium/device/hid/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/hid/BUILD.gn -@@ -56,6 +56,13 @@ source_set("hid") { - deps += [ "//device/udev_linux" ] - } - -+ if (is_bsd) { -+ sources -= [ -+ "hid_connection_linux.cc", -+ "hid_connection_linux.h", -+ ] -+ } -+ - if (is_chromeos) { - deps += [ "//chromeos" ] - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_media__transfer__protocol_media__transfer__protocol__daemon__client.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_media__transfer__protocol_media__transfer__protocol__daemon__client.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h.orig 2017-02-02 02:02:54 UTC -+++ src/3rdparty/chromium/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h -@@ -19,7 +19,7 @@ - #include "base/macros.h" - #include "build/build_config.h" - --#if !defined(OS_LINUX) -+#if !defined(OS_LINUX) && !defined(OS_BSD) - #error "Only used on Linux and ChromeOS" - #endif - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_media__transfer__protocol_media__transfer__protocol__manager.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_media__transfer__protocol_media__transfer__protocol__manager.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/device/media_transfer_protocol/media_transfer_protocol_manager.h.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/media_transfer_protocol/media_transfer_protocol_manager.h -@@ -15,7 +15,7 @@ - #include "base/memory/ref_counted.h" - #include "build/build_config.h" - --#if !defined(OS_LINUX) -+#if !defined(OS_LINUX) && !defined(OS_FREEBSD) - #error "Only used on Linux and ChromeOS" - #endif - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_BUILD.gn @@ -1,24 +1,24 @@ ---- src/3rdparty/chromium/device/serial/BUILD.gn.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/serial/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/serial/BUILD.gn @@ -6,7 +6,7 @@ import("//build/config/features.gni") import("//mojo/public/tools/bindings/mojom.gni") # Library works only on desktop platforms. --assert(is_win || is_linux || is_mac) -+assert(is_win || is_linux || is_bsd || is_mac) - - config("platform_support") { - visibility = [ ":serial" ] -@@ -55,6 +55,12 @@ static_library("serial") { - if (use_udev) { - deps += [ "//device/udev_linux" ] - } -+ if (is_bsd) { -+ sources -= [ -+ "serial_device_enumerator_linux.cc", -+ "serial_device_enumerator_linux.h" -+ ] -+ } - if (is_chromeos) { - deps += [ - "//chromeos", +-if (is_win || is_linux || is_mac) { ++if (is_win || is_linux || is_bsd || is_mac) { + config("platform_support") { + visibility = [ ":serial" ] + if (is_win) { +@@ -64,6 +64,12 @@ if (is_win || is_linux || is_mac) { + } + if (use_udev) { + deps += [ "//device/udev_linux" ] ++ } ++ if (is_bsd) { ++ sources -= [ ++ "serial_device_enumerator_linux.cc", ++ "serial_device_enumerator_linux.h" ++ ] + } + if (is_chromeos) { + deps += [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_serial__io__handler__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_serial__io__handler__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_serial__io__handler__posix.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc -@@ -61,7 +61,7 @@ bool BitrateToSpeedConstant(int bitrate, +@@ -62,7 +62,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee BITRATE_TO_SPEED_CASE(9600) BITRATE_TO_SPEED_CASE(19200) BITRATE_TO_SPEED_CASE(38400) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_time__zone__monitor_time__zone__monitor.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_time__zone__monitor_time__zone__monitor.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/device/time_zone_monitor/time_zone_monitor.cc.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/time_zone_monitor/time_zone_monitor.cc -@@ -31,7 +31,7 @@ void TimeZoneMonitor::NotifyClients() { - std::unique_ptr new_zone(icu::TimeZone::createDefault()); - #else - icu::TimeZone* new_zone = icu::TimeZone::detectHostTimeZone(); --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // We get here multiple times on Linux per a single tz change, but - // want to update the ICU default zone and notify renderer only once. - std::unique_ptr current_zone(icu::TimeZone::createDefault()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_time__zone__monitor_time__zone__monitor__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_time__zone__monitor_time__zone__monitor__linux.cc +++ /dev/null @@ -1,22 +0,0 @@ ---- src/3rdparty/chromium/device/time_zone_monitor/time_zone_monitor_linux.cc.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/time_zone_monitor/time_zone_monitor_linux.cc -@@ -59,6 +59,9 @@ class TimeZoneMonitorLinuxImpl - main_task_runner_(base::ThreadTaskRunnerHandle::Get()), - file_task_runner_(file_task_runner), - owner_(owner) { -+ } -+ -+ void StartWatching() { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); - file_task_runner_->PostTask( - FROM_HERE, -@@ -152,6 +155,9 @@ TimeZoneMonitorLinux::TimeZoneMonitorLin - // changed. - if (!getenv("TZ")) { - impl_ = new TimeZoneMonitorLinuxImpl(this, file_task_runner); -+ if (impl_.get()) { -+ impl_->StartWatching(); -+ } - } - } - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__context.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__context.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__context.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/device/usb/usb_context.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/usb/usb_context.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/usb/usb_context.cc @@ -9,8 +9,13 @@ #include "base/macros.h" @@ -14,7 +14,7 @@ namespace device { -@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() +@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() { void UsbContext::UsbEventHandler::Stop() { base::subtle::Release_Store(&running_, 0); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__context__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__context__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__context__unittest.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/device/usb/usb_context_unittest.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/usb/usb_context_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/usb/usb_context_unittest.cc @@ -7,7 +7,11 @@ #include "build/build_config.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__handle__impl.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__handle__impl.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__handle__impl.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/device/usb/usb_device_handle_impl.h.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/usb/usb_device_handle_impl.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/usb/usb_device_handle_impl.h @@ -18,7 +18,12 @@ #include "base/memory/ref_counted.h" @@ -12,4 +12,4 @@ +#endif namespace base { - class SequencedTaskRunner; + class RefCountedBytes; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__handle__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__handle__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__handle__impl.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/device/usb/usb_device_handle_impl.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/usb/usb_device_handle_impl.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/usb/usb_device_handle_impl.cc @@ -25,7 +25,11 @@ + #include "device/usb/usb_device_impl.h" #include "device/usb/usb_error.h" #include "device/usb/usb_service.h" - #include "net/base/io_buffer.h" -#include "third_party/libusb/src/libusb/libusb.h" +#if defined(OS_FREEBSD) +# include "libusb.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__device__impl.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/device/usb/usb_device_impl.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/usb/usb_device_impl.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/usb/usb_device_impl.cc -@@ -22,7 +22,11 @@ - #include "device/usb/usb_descriptors.h" +@@ -24,7 +24,11 @@ #include "device/usb/usb_device_handle_impl.h" #include "device/usb/usb_error.h" + #include "device/usb/usb_service.h" +#if defined(OS_FREEBSD) +#include "libusb.h" +#else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__error.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__error.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__error.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/device/usb/usb_error.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/usb/usb_error.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/usb/usb_error.cc @@ -4,7 +4,11 @@ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__service__impl.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__service__impl.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__service__impl.h @@ -1,34 +1,32 @@ ---- src/3rdparty/chromium/device/usb/usb_service_impl.h.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/usb/usb_service_impl.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/usb/usb_service_impl.h -@@ -15,7 +15,13 @@ - #include "build/build_config.h" +@@ -21,7 +21,11 @@ + #include "device/usb/scoped_libusb_device_ref.h" #include "device/usb/usb_context.h" #include "device/usb/usb_device_impl.h" +#if defined(OS_FREEBSD) +#include "libusb.h" -+#define LIBUSB_CALL +#else #include "third_party/libusb/src/libusb/libusb.h" +#endif -+ #if defined(OS_WIN) #include "base/scoped_observer.h" -@@ -70,11 +76,13 @@ class UsbServiceImpl : +@@ -73,11 +77,13 @@ class UsbServiceImpl : scoped_refptr device); void RemoveDevice(scoped_refptr device); +#if !defined(OS_FREEBSD) // Handle hotplug events from libusb. static int LIBUSB_CALL HotplugCallback(libusb_context* context, - PlatformUsbDevice device, + libusb_device* device, libusb_hotplug_event event, void* user_data); +#endif // These functions release a reference to the provided platform device. - void OnPlatformDeviceAdded(PlatformUsbDevice platform_device); - void OnPlatformDeviceRemoved(PlatformUsbDevice platform_device); -@@ -90,7 +98,9 @@ class UsbServiceImpl : + void OnPlatformDeviceAdded(ScopedLibusbDeviceRef platform_device); + void OnPlatformDeviceRemoved(ScopedLibusbDeviceRef platform_device); +@@ -95,7 +101,9 @@ class UsbServiceImpl : // connected instead of only when a full enumeration is requested. // TODO(reillyg): Support this on all platforms. crbug.com/411715 bool hotplug_enabled_ = false; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__service__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__service__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_usb__service__impl.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/device/usb/usb_service_impl.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/device/usb/usb_service_impl.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/device/usb/usb_service_impl.cc -@@ -26,7 +26,11 @@ +@@ -27,7 +27,11 @@ + #include "device/usb/usb_device_handle.h" #include "device/usb/usb_error.h" #include "device/usb/webusb_descriptors.h" - #include "net/base/io_buffer.h" -#include "third_party/libusb/src/libusb/libusb.h" +#if defined(OS_FREEBSD) +# include @@ -12,48 +12,47 @@ +#endif #if defined(OS_WIN) - #include -@@ -213,6 +217,7 @@ UsbServiceImpl::UsbServiceImpl( - } - context_ = new UsbContext(platform_context); + #define INITGUID +@@ -239,8 +243,10 @@ UsbServiceImpl::UsbServiceImpl() + } + UsbServiceImpl::~UsbServiceImpl() { +#if !defined(OS_FREEBSD) - rv = libusb_hotplug_register_callback( + if (hotplug_enabled_) + libusb_hotplug_deregister_callback(context_->context(), hotplug_handle_); ++#endif + } + + void UsbServiceImpl::GetDevices(const GetDevicesCallback& callback) { +@@ -295,6 +301,7 @@ void UsbServiceImpl::OnUsbContext(scoped_refptrcontext(), static_cast(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | -@@ -225,6 +230,8 @@ UsbServiceImpl::UsbServiceImpl( - } +@@ -307,6 +314,7 @@ void UsbServiceImpl::OnUsbContext(scoped_refptrcontext(), hotplug_handle_); -+#endif // !defined(OS_FREEBSD) - for (auto* platform_device : ignored_devices_) - libusb_unref_device(platform_device); - } -@@ -477,6 +486,7 @@ void UsbServiceImpl::RemoveDevice(scoped +@@ -503,6 +511,7 @@ void UsbServiceImpl::RemoveDevice(scoped_refptrOnDisconnect(); } +#if !defined(OS_FREEBSD) // static int LIBUSB_CALL UsbServiceImpl::HotplugCallback(libusb_context* context, - PlatformUsbDevice device, -@@ -514,6 +524,7 @@ int LIBUSB_CALL UsbServiceImpl::HotplugC + libusb_device* device_raw, +@@ -537,6 +546,7 @@ int LIBUSB_CALL UsbServiceImpl::HotplugCallback(libusb return 0; } +#endif // !defined(OS_FREEBSD) - void UsbServiceImpl::OnPlatformDeviceAdded(PlatformUsbDevice platform_device) { - DCHECK(CalledOnValidThread()); + void UsbServiceImpl::OnPlatformDeviceAdded( + ScopedLibusbDeviceRef platform_device) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_declarative__webrequest_webrequest__action.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_declarative__webrequest_webrequest__action.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_declarative__webrequest_webrequest__action.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/extensions/browser/api/declarative_webrequest/webrequest_action.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/extensions/browser/api/declarative_webrequest/webrequest_action.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/extensions/browser/api/declarative_webrequest/webrequest_action.cc -@@ -29,7 +29,11 @@ +@@ -28,7 +28,11 @@ + #include "extensions/common/extension.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "net/http/http_util.h" - #include "net/url_request/url_request.h" +#if defined(OS_BSD) +#include +#else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/chrome/browser/extensions/api/messaging/message_service.cc.orig 2017-01-26 00:49:08 UTC -+++ src/3rdparty/chromium/chrome/browser/extensions/api/messaging/message_service.cc -@@ -119,7 +119,7 @@ MessageService::PolicyPermission Message +--- src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/extensions/browser/api/messaging/message_service.cc +@@ -60,7 +60,7 @@ namespace { const char kReceivingEndDoesntExistError[] = "Could not establish connection. Receiving end does not exist."; @@ -9,7 +9,7 @@ const char kMissingPermissionError[] = "Access to native messaging requires nativeMessaging permission."; const char kProhibitedByPoliciesError[] = -@@ -414,7 +414,7 @@ void MessageService::OpenChannelToNative +@@ -362,7 +362,7 @@ void MessageService::OpenChannelToNativeApp( if (!source) return; @@ -18,18 +18,18 @@ content::WebContents* web_contents = content::WebContents::FromRenderFrameHost(source); ExtensionWebContentsObserver* extension_web_contents_observer = -@@ -477,12 +477,12 @@ void MessageService::OpenChannelToNative +@@ -422,12 +422,12 @@ void MessageService::OpenChannelToNativeApp( channel->opener->IncrementLazyKeepaliveCount(); AddChannel(std::move(channel), receiver_port_id); -#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) -+#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)) ++#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) || defined(OS_BSD) const char kNativeMessagingNotSupportedError[] = "Native Messaging is not supported on this platform."; DispatchOnDisconnect( source, receiver_port_id, kNativeMessagingNotSupportedError); -#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) -+#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)) ++#endif // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) || defined(OS_BSD) } void MessageService::OpenChannelToTab(int source_process_id, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__event__router__factory.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__event__router__factory.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_networking__private_networking__private__event__router__factory.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_event_router_factory.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_event_router_factory.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/extensions/browser/api/networking_private/networking_private_event_router_factory.cc @@ -13,6 +13,7 @@ @@ -8,7 +8,7 @@ // static NetworkingPrivateEventRouter* NetworkingPrivateEventRouterFactory::GetForProfile( -@@ -57,5 +58,6 @@ bool NetworkingPrivateEventRouterFactory +@@ -57,5 +58,6 @@ bool NetworkingPrivateEventRouterFactory::ServiceIsCre bool NetworkingPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const { return true; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_serial_serial__api.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_serial_serial__api.cc +++ /dev/null @@ -1,17 +0,0 @@ ---- src/3rdparty/chromium/extensions/browser/api/serial/serial_api.cc.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/extensions/browser/api/serial/serial_api.cc -@@ -85,12 +85,13 @@ bool SerialGetDevicesFunction::Prepare() - - void SerialGetDevicesFunction::Work() { - DCHECK_CURRENTLY_ON(BrowserThread::FILE); -- -+#if !defined(OS_BSD) - std::unique_ptr enumerator = - device::SerialDeviceEnumerator::Create(); - mojo::Array devices = enumerator->GetDevices(); - results_ = serial::GetDevices::Results::Create( - devices.To>()); -+#endif - } - - SerialConnectFunction::SerialConnectFunction() { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_web__request_form__data__parser.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_web__request_form__data__parser.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_web__request_form__data__parser.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc @@ -15,7 +15,11 @@ #include "base/values.h" #include "net/base/escape.h" - #include "net/url_request/url_request.h" + #include "net/http/http_request_headers.h" +#if defined(OS_BSD) +#include +#else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_image__util.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_image__util.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_image__util.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/extensions/common/image_util.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/extensions/common/image_util.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/extensions/common/image_util.cc @@ -11,7 +11,11 @@ #include "base/strings/string_number_conversions.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_stack__frame.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_stack__frame.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_common_stack__frame.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/extensions/common/stack_frame.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/extensions/common/stack_frame.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/extensions/common/stack_frame.cc @@ -7,7 +7,11 @@ #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_BUILD.gn @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/gpu/BUILD.gn.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/gpu/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/gpu/BUILD.gn -@@ -93,7 +93,7 @@ test("command_buffer_gles2_tests") { - libs += [ "android" ] - deps += [ "//ui/android:ui_java" ] +@@ -124,7 +124,7 @@ if (!use_static_angle) { + libs += [ "android" ] + deps += [ "//ui/android:ui_java" ] + } +- if (is_linux && !is_component_build) { ++ if ((is_linux || is_bsd) && !is_component_build) { + configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] + } } -- if (is_linux && !is_component_build) { -+ if ((is_linux || is_bsd) && !is_component_build) { - configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] - } - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_program__manager.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_program__manager.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_command__buffer_service_program__manager.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/gpu/command_buffer/service/program_manager.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/gpu/command_buffer/service/program_manager.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/gpu/command_buffer/service/program_manager.cc @@ -31,7 +31,11 @@ - #include "gpu/command_buffer/service/program_cache.h" #include "gpu/command_buffer/service/progress_reporter.h" #include "gpu/command_buffer/service/shader_manager.h" + #include "gpu/config/gpu_preferences.h" +#if defined(OS_BSD) +#include +#else Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_BUILD.gn +++ /dev/null @@ -1,27 +0,0 @@ ---- src/3rdparty/chromium/gpu/config/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/config/BUILD.gn -@@ -8,7 +8,8 @@ import("//build/config/ui.gni") - - declare_args() { - # Use the PCI lib to collect GPU information on Linux. -- use_libpci = is_linux && (!is_chromecast || is_cast_desktop_build) && -+ use_libpci = (is_linux || is_bsd) && -+ (!is_chromecast || is_cast_desktop_build) && - (use_x11 || use_ozone) - } - -@@ -97,6 +98,14 @@ source_set("config_sources") { - ] - } - } -+ -+ if (is_bsd) { -+ sources -= [ -+ "gpu_info_collector_linux.cc", -+ "gpu_info_collector_linux.h" -+ ] -+ } -+ - if (is_mac) { - libs = [ - "IOKit.framework", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/gpu/config/gpu_control_list.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/gpu/config/gpu_control_list.cc -@@ -19,7 +19,11 @@ - #include "base/sys_info.h" +@@ -16,7 +16,11 @@ + #include "base/values.h" + #include "build/build_config.h" #include "gpu/config/gpu_info.h" - #include "gpu/config/gpu_util.h" +#if defined(OS_BSD) +#include +#else @@ -12,8 +12,8 @@ namespace gpu { namespace { -@@ -1154,7 +1158,7 @@ GpuControlList::GpuControlListEntry::GLT - GpuControlList::GpuControlListEntry::GetDefaultGLType() { +@@ -213,7 +217,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( + GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if defined(OS_CHROMEOS) return kGLTypeGL; -#elif defined(OS_LINUX) || defined(OS_OPENBSD) @@ -21,10 +21,10 @@ return kGLTypeGL; #elif defined(OS_MACOSX) return kGLTypeGL; -@@ -1606,7 +1610,7 @@ GpuControlList::OsType GpuControlList::G - return kOsWin; - #elif defined(OS_ANDROID) +@@ -681,7 +685,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; + #elif defined(OS_FUCHSIA) + return kOsFuchsia; -#elif defined(OS_LINUX) || defined(OS_OPENBSD) +#elif defined(OS_LINUX) || defined(OS_BSD) return kOsLinux; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__control__list__unittest.cc +++ /dev/null @@ -1,12 +0,0 @@ ---- src/3rdparty/chromium/gpu/config/gpu_control_list_unittest.cc.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/config/gpu_control_list_unittest.cc -@@ -175,8 +175,7 @@ TEST_F(GpuControlListTest, VendorOnAllOs - features = control_list->MakeDecision( - GpuControlList::kOsLinux, kOsVersion, gpu_info()); - EXPECT_SINGLE_FEATURE(features, TEST_FEATURE_0); --#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || \ -- defined(OS_OPENBSD) -+#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_ANDROID)) - // ControlList entries will be filtered to the current OS only upon loading. - EXPECT_TRUE(control_list->LoadList( - vendor_json, GpuControlList::kCurrentOsOnly)); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__info__collector.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__info__collector.cc +++ /dev/null @@ -1,13 +0,0 @@ ---- src/3rdparty/chromium/gpu/config/gpu_info_collector.cc.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/config/gpu_info_collector.cc -@@ -193,8 +193,10 @@ CollectInfoResult CollectGraphicsInfoGL( - gpu_info->pixel_shader_version = glsl_version; - gpu_info->vertex_shader_version = glsl_version; - -+#ifndef __FreeBSD__ - IdentifyActiveGPU(gpu_info); - return CollectDriverInfoGL(gpu_info); -+#endif - } - - void MergeGPUInfoGL(GPUInfo* basic_gpu_info, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_config_gpu__test__config.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/gpu/config/gpu_test_config.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/gpu/config/gpu_test_config.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/gpu/config/gpu_test_config.cc -@@ -24,7 +24,7 @@ namespace { +@@ -25,7 +25,7 @@ namespace { GPUTestConfig::OS GetCurrentOS() { #if defined(OS_CHROMEOS) return GPUTestConfig::kOsChromeOS; @@ -9,22 +9,3 @@ return GPUTestConfig::kOsLinux; #elif defined(OS_WIN) int32_t major_version = 0; -@@ -255,6 +255,10 @@ bool GPUTestBotConfig::LoadCurrentConfig - bool rt; - if (gpu_info == NULL) { - GPUInfo my_gpu_info; -+#if defined(OS_FREEBSD) -+ rt = false; -+ LOG(WARNING) << "CollectGpuID not present on FreeBSD"; -+#else - CollectInfoResult result = CollectGpuID( - &my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id); - if (result != kCollectInfoSuccess) { -@@ -264,6 +268,7 @@ bool GPUTestBotConfig::LoadCurrentConfig - } else { - rt = SetGPUInfo(my_gpu_info); - } -+#endif - } else { - rt = SetGPUInfo(*gpu_info); - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_gles2__conform__support_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_gles2__conform__support_BUILD.gn +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/gpu/gles2_conform_support/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/gles2_conform_support/BUILD.gn -@@ -60,7 +60,7 @@ executable("gles2_conform_support") { - "//gpu/gles2_conform_support/egl", - "//ui/gl", - ] -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources += [ - "native/egl_native_aura.cc", - "native/egl_native_x11.cc", -@@ -413,7 +413,7 @@ if (internal_gles2_conform_tests) { - # Must be done this way for warning flags to be ordered correctly. - ":gles2_conform_test_warnings", - ] -- if (is_linux) { -+ if (is_linux || is_bsd) { - if (!is_chromeos) { - deps += [ "//build/config/linux/gtk2" ] - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_gles2__conform__support_native_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_gles2__conform__support_native_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/gpu/gles2_conform_support/native/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/gles2_conform_support/native/BUILD.gn -@@ -20,7 +20,7 @@ source_set("native") { - "//gpu/gles2_conform_support/egl", - "//ui/gl", - ] -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources += [ - "egl_native_aura.cc", - "egl_native_x11.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_client_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_client_BUILD.gn +++ /dev/null @@ -1,10 +0,0 @@ ---- src/3rdparty/chromium/gpu/ipc/client/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/ipc/client/BUILD.gn -@@ -51,6 +51,7 @@ source_set("ipc_client_sources") { - configs += [ - "//build/config/compiler:no_size_t_to_int_warning", - "//gpu:gpu_implementation", -+ "//build/config/linux:x11", - ] - deps = [ - "//base", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/gpu/ipc/common/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/gpu/ipc/common/BUILD.gn +@@ -96,7 +96,7 @@ source_set("ipc_common_sources") { + "gpu_memory_buffer_impl_dxgi.h", + ] + } +- if (is_linux) { ++ if (is_linux || is_bsd) { + sources += [ + "gpu_memory_buffer_impl_native_pixmap.cc", + "gpu_memory_buffer_impl_native_pixmap.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.h @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.h +@@ -16,7 +16,7 @@ + #include "ui/gfx/geometry/size.h" + #include "ui/gfx/gpu_memory_buffer.h" + +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) + namespace gfx { + class ClientNativePixmapFactory; + } +@@ -28,7 +28,7 @@ namespace gpu { + class GPU_EXPORT GpuMemoryBufferSupport { + public: + GpuMemoryBufferSupport(); +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) + GpuMemoryBufferSupport(std::unique_ptr + client_native_pixmap_factory); + #endif +@@ -42,7 +42,7 @@ class GPU_EXPORT GpuMemoryBufferSupport { + bool IsNativeGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format, + gfx::BufferUsage usage); + +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) + gfx::ClientNativePixmapFactory* client_native_pixmap_factory() { + return client_native_pixmap_factory_.get(); + } +@@ -65,7 +65,7 @@ class GPU_EXPORT GpuMemoryBufferSupport { + const GpuMemoryBufferImpl::DestructionCallback& callback); + + private: +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE) + std::unique_ptr client_native_pixmap_factory_; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_common_gpu__memory__buffer__support.cc @@ -0,0 +1,54 @@ +--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc +@@ -12,7 +12,7 @@ + #include "gpu/ipc/common/gpu_memory_buffer_impl_io_surface.h" + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" + #include "ui/gfx/client_native_pixmap_factory.h" + #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" +@@ -36,13 +36,13 @@ namespace gpu { + GpuMemoryBufferSupport::GpuMemoryBufferSupport() { + #if defined(USE_OZONE) + client_native_pixmap_factory_ = ui::CreateClientNativePixmapFactoryOzone(); +-#elif defined(OS_LINUX) && !defined(TOOLKIT_QT) ++#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT) + client_native_pixmap_factory_.reset( + gfx::CreateClientNativePixmapFactoryDmabuf()); + #endif + } + +-#if defined(OS_LINUX) || defined(USE_OZONE) ++#if defined(OS_LINUX) || defined(USE_OZONE) || defined(OS_BSD) + GpuMemoryBufferSupport::GpuMemoryBufferSupport( + std::unique_ptr + client_native_pixmap_factory) +@@ -57,7 +57,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemoryBufferType() + return gfx::IO_SURFACE_BUFFER; + #elif defined(OS_ANDROID) + return gfx::ANDROID_HARDWARE_BUFFER; +-#elif defined(OS_LINUX) && !defined(TOOLKIT_QT) ++#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT) + return gfx::NATIVE_PIXMAP; + #elif defined(OS_WIN) + return gfx::DXGI_SHARED_HANDLE; +@@ -114,7 +114,7 @@ bool GpuMemoryBufferSupport::IsNativeGpuMemoryBufferCo + return false; + #elif defined(USE_OZONE) + return client_native_pixmap_factory_->IsConfigurationSupported(format, usage); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + return false; // TODO(julian.isorce): Add linux support. + #elif defined(OS_WIN) + switch (usage) { +@@ -171,7 +171,7 @@ GpuMemoryBufferSupport::CreateGpuMemoryBufferImplFromH + return GpuMemoryBufferImplIOSurface::CreateFromHandle( + std::move(handle), size, format, usage, callback); + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + case gfx::NATIVE_PIXMAP: + return GpuMemoryBufferImplNativePixmap::CreateFromHandle( + client_native_pixmap_factory(), std::move(handle), size, format, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_BUILD.gn @@ -1,16 +1,11 @@ ---- src/3rdparty/chromium/gpu/ipc/service/BUILD.gn.orig 2017-12-15 17:07:13.968625000 -0500 -+++ src/3rdparty/chromium/gpu/ipc/service/BUILD.gn 2017-12-15 17:08:34.840034000 -0500 -@@ -104,11 +104,12 @@ +--- src/3rdparty/chromium/gpu/ipc/service/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/gpu/ipc/service/BUILD.gn +@@ -120,7 +120,7 @@ component("service") { ] libs += [ "android" ] } -- if (is_linux && ui_compositor_image_transport) { -+ if ((is_linux || is_bsd) && ui_compositor_image_transport) { - sources += [ "image_transport_surface_linux.cc" ] - } - if (use_x11) { - sources += [ "x_util.h" ] -+ configs += [ "//build/config/linux:x11" ] - } - if (use_ozone) { +- if (is_linux) { ++ if (is_linux || is_bsd) { sources += [ + "gpu_memory_buffer_factory_native_pixmap.cc", + "gpu_memory_buffer_factory_native_pixmap.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__init.cc @@ -1,38 +1,56 @@ ---- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2017-01-26 00:49:14 UTC +--- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc -@@ -75,7 +75,7 @@ void GetGpuInfoFromCommandLine(gpu::GPUI - } +@@ -74,7 +74,7 @@ bool CollectGraphicsInfo(GPUInfo* gpu_info, + return success; } --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - void CollectGraphicsInfo(gpu::GPUInfo& gpu_info) { - TRACE_EVENT0("gpu,startup", "Collect Graphics Info"); - -@@ -94,7 +94,7 @@ void CollectGraphicsInfo(gpu::GPUInfo& g - break; +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) ++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) && !defined(OS_BSD) + bool CanAccessNvidiaDeviceFile() { + bool res = true; + base::AssertBlockingAllowed(); +@@ -84,7 +84,7 @@ bool CanAccessNvidiaDeviceFile() { } + return res; } --#endif // defined(OS_MACOSX) -+#endif // defined(OS_MACOSX) && defined(OS_BSD) +-#endif // OS_LINUX && !OS_CHROMEOS && !IS_CHROMECAST ++#endif // OS_LINUX && !OS_CHROMEOS && !IS_CHROMECAST && !OS_BSD - #if defined(OS_LINUX) && !defined(OS_CHROMEOS) - bool CanAccessNvidiaDeviceFile() { -@@ -189,7 +189,7 @@ bool GpuInit::InitializeAndStartSandbox( - // By skipping the following code on Mac, we don't really lose anything, - // because the basic GPU information is passed down from the host process. - base::TimeTicks before_collect_context_graphics_info = base::TimeTicks::Now(); --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - CollectGraphicsInfo(gpu_info_); - if (gpu_info_.context_info_state == gpu::kCollectInfoFatalFailure) + } // namespace + +@@ -110,7 +110,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + // crash during feature collection. + gpu::SetKeysForCrashLogging(gpu_info_); + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD) + if (gpu_info_.gpu.vendor_id == 0x10de && // NVIDIA + gpu_info_.gpu.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile()) return false; -@@ -206,7 +206,7 @@ bool GpuInit::InitializeAndStartSandbox( - gpu::ApplyGpuDriverBugWorkarounds( - gpu_info_, const_cast(&command_line)); +@@ -121,7 +121,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + gpu_feature_info_ = gpu::ComputeGpuFeatureInfo( + gpu_info_, gpu_preferences_, command_line, &needs_more_info); } --#endif // !defined(OS_MACOSX) -+#endif // !defined(OS_MACOSX) && !defined(OS_BSD) +-#endif // !OS_ANDROID && !IS_CHROMECAST ++#endif // !OS_ANDROID && !IS_CHROMECAST && !OS_BSD + gpu_info_.in_process_gpu = false; - base::TimeDelta collect_context_time = - base::TimeTicks::Now() - before_collect_context_graphics_info; + bool use_swiftshader = false; +@@ -194,7 +194,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + sandbox_helper_->PreSandboxStartup(); + + bool attempted_startsandbox = false; +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) && !defined(OS_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. +@@ -203,7 +203,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + watchdog_thread_.get(), &gpu_info_, gpu_preferences_); + attempted_startsandbox = true; + } +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) && !defined(OS_BSD) + + base::TimeTicks before_initialize_one_off = base::TimeTicks::Now(); + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_ipc_service_gpu__memory__buffer__factory.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/gpu/ipc/service/gpu_memory_buffer_factory.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/gpu/ipc/service/gpu_memory_buffer_factory.cc +@@ -12,7 +12,7 @@ + #include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h" + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h" + #endif + +@@ -33,7 +33,7 @@ GpuMemoryBufferFactory::CreateNativeType() { + return base::WrapUnique(new GpuMemoryBufferFactoryIOSurface); + #elif defined(OS_ANDROID) + return base::WrapUnique(new GpuMemoryBufferFactoryAndroidHardwareBuffer); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + return base::WrapUnique(new GpuMemoryBufferFactoryNativePixmap); + #elif defined(OS_WIN) + return base::WrapUnique(new GpuMemoryBufferFactoryDXGI); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_tools_compositor__model__bench_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_tools_compositor__model__bench_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/gpu/tools/compositor_model_bench/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/tools/compositor_model_bench/BUILD.gn -@@ -4,7 +4,7 @@ - - import("//build/config/ui.gni") - --if (is_linux && !is_chromeos && current_cpu != "arm" && use_x11) { -+if ((is_linux || is_bsd) && !is_chromeos && current_cpu != "arm" && use_x11) { - executable("compositor_model_bench") { - sources = [ - "compositor_model_bench.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_vulkan_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/gpu/vulkan/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/vulkan/BUILD.gn -@@ -14,7 +14,7 @@ if (enable_vulkan) { - component("vulkan") { - output_name = "vulkan_wrapper" - -- if (is_linux) { -+ if (is_linux || is_bsd) { - assert(use_x11, "Vulkan only support x11 at this point.") - sources = [ - "vulkan_command_buffer.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.h +@@ -32,7 +32,7 @@ class HeadlessContentBrowserClient : public content::C + content::BrowserContext* context, + content::StoragePartition* partition, + storage::OptionalQuotaSettingsCallback callback) override; +-#if defined(OS_POSIX) && !defined(OS_MACOSX) ++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) + void GetAdditionalMappedFilesForChildProcess( + const base::CommandLine& command_line, + int child_process_id, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_browser_headless__content__browser__client.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc +@@ -205,7 +205,7 @@ void HeadlessContentBrowserClient::GetQuotaSettings( + partition->GetPath(), context->IsOffTheRecord(), std::move(callback)); + } + +-#if defined(OS_POSIX) && !defined(OS_MACOSX) ++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) + void HeadlessContentBrowserClient::GetAdditionalMappedFilesForChildProcess( + const base::CommandLine& command_line, + int child_process_id, +@@ -216,7 +216,7 @@ void HeadlessContentBrowserClient::GetAdditionalMapped + mappings->Share(service_manager::kCrashDumpSignal, crash_signal_fd); + #endif // defined(HEADLESS_USE_BREAKPAD) + } +-#endif // defined(OS_POSIX) && !defined(OS_MACOSX) ++#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) + + void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( + base::CommandLine* command_line, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__macros.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_headless_lib_headless__macros.h @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/headless/lib/headless_macros.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/headless/lib/headless_macros.h +@@ -7,8 +7,8 @@ + + #include "build/build_config.h" + +-#if defined(OS_POSIX) && !defined(OS_MACOSX) ++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) + #define HEADLESS_USE_BREAKPAD +-#endif // defined(OS_POSIX) && !defined(OS_MACOSX) ++#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) + + #endif // HEADLESS_LIB_HEADLESS_MACROS_H_ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel.h @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/ipc/ipc_channel.h.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/ipc/ipc_channel.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/ipc/ipc_channel.h -@@ -245,7 +245,7 @@ class IPC_EXPORT Channel : public Sender +@@ -244,7 +244,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { static std::string GenerateUniqueRandomChannelID(); #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__common.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ipc/ipc_channel_common.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/ipc/ipc_channel_common.cc +@@ -9,7 +9,7 @@ + + namespace IPC { + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + + namespace { + int g_global_pid = 0; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__channel__mojo.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/ipc/ipc_channel_mojo.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/ipc/ipc_channel_mojo.cc +@@ -64,7 +64,7 @@ class MojoChannelFactory : public ChannelFactory { + }; + + base::ProcessId GetSelfPID() { +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + if (int global_pid = Channel::GetGlobalPid()) + return global_pid; + #endif // OS_LINUX Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ipc/ipc_message_utils.h.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/ipc/ipc_message_utils.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/ipc/ipc_message_utils.h -@@ -210,7 +210,7 @@ struct ParamTraits { - // 3) Android 64 bit also has int64_t typedef'd to long. +@@ -203,7 +203,7 @@ struct ParamTraits { + // 3) Android 64 bit and Fuchsia also have int64_t typedef'd to long. // 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 defined(OS_WIN) || defined(OS_LINUX) || \ -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || \ +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FUCHSIA) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_FUCHSIA) || \ (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) template <> struct ParamTraits { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ipc_ipc__message__utils.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/ipc/ipc_message_utils.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/ipc/ipc_message_utils.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/ipc/ipc_message_utils.cc -@@ -425,7 +425,7 @@ void ParamTraits::Log(cons - l->append(base::UintToString(p)); +@@ -348,7 +348,7 @@ void ParamTraits::Log(const param_type& + l->append(base::NumberToString(p)); } --#if defined(OS_WIN) || defined(OS_LINUX) || \ -+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || \ +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FUCHSIA) || \ ++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_FUCHSIA) || \ (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS)) void ParamTraits::Log(const param_type& p, std::string* l) { - l->append(base::Int64ToString(static_cast(p))); + l->append(base::NumberToString(p)); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/BUILD.gn.orig 2018-06-21 14:13:32 UTC +--- src/3rdparty/chromium/media/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/BUILD.gn -@@ -53,6 +53,9 @@ config("media_config") { +@@ -63,6 +63,9 @@ config("media_config") { if (use_cras) { defines += [ "USE_CRAS" ] } @@ -9,4 +9,4 @@ + } } - config("media_implementation") { + # Internal grouping of the configs necessary to support sub-folders having their Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media__audio__alsa__audio_manager_alsa.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media__audio__alsa__audio_manager_alsa.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media__audio__alsa__audio_manager_alsa.cc @@ -1,54 +0,0 @@ ---- src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc.orig 2017-01-26 00:49:15 UTC -+++ src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc -@@ -135,7 +135,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic - int card = -1; - - // Loop through the sound cards to get ALSA device hints. -+#ifdef OS_LINUX - while (!wrapper_->CardNext(&card) && card >= 0) { -+#endif - void** hints = NULL; - int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); - if (!error) { -@@ -147,7 +149,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic - DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " - << wrapper_->StrError(error); - } -+#ifdef OS_LINUX - } -+#endif - } - - void AudioManagerAlsa::GetAlsaDevicesInfo( -@@ -230,7 +234,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvail - // goes through software conversion if needed (e.g. incompatible - // sample rate). - // TODO(joi): Should we prefer "hw" instead? -+#ifdef OS_LINUX - static const char kDeviceTypeDesired[] = "plughw"; -+#else -+ static const char kDeviceTypeDesired[] = "plug"; -+#endif - return strncmp(kDeviceTypeDesired, - device_name, - arraysize(kDeviceTypeDesired) - 1) == 0; -@@ -254,7 +262,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe - // Loop through the sound cards. - // Don't use snd_device_name_hint(-1,..) since there is a access violation - // inside this ALSA API with libasound.so.2.0.0. -+#ifdef OS_LINUX - 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++) { -@@ -278,7 +288,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe - DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: " - << wrapper_->StrError(error); - } -+#ifdef OS_LINUX - } -+#endif - - return has_device; - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_BUILD.gn @@ -1,37 +1,36 @@ ---- src/3rdparty/chromium/media/audio/BUILD.gn.orig 2018-04-10 14:05:55 UTC +--- src/3rdparty/chromium/media/audio/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/audio/BUILD.gn -@@ -206,7 +206,7 @@ source_set("audio") { +@@ -254,9 +254,19 @@ source_set("audio") { deps += [ "//media/base/android:media_jni_headers" ] } - if (is_linux) { -+ if (is_linux || (is_bsd && !use_sndio)) { ++ if ((is_linux || is_bsd) && !use_sndio) { sources += [ "linux/audio_manager_linux.cc" ] } - -@@ -255,10 +255,24 @@ source_set("audio") { - configs += [ ":libpulse" ] - } else { - # TODO(ajwong): Technically, this dl should go in the action. -- libs += [ "dl" ] - deps += [ ":pulse_generate_stubs" ] - sources += get_target_outputs(":pulse_generate_stubs") - } -+ if (is_linux) { -+ libs += [ "dl" ] -+ } -+ } -+ + if (use_sndio) { + libs += [ "sndio" ] + sources += [ + "openbsd/audio_manager_openbsd.cc", -+ "openbsd/audio_manager_openbsd.h", + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", + "sndio/sndio_output.h", + ] ++ } + + if (use_alsa) { + libs += [ "asound" ] +@@ -302,9 +312,11 @@ source_set("audio") { + if (link_pulseaudio) { + configs += [ ":libpulse" ] + } else { +- libs += [ "dl" ] + deps += [ ":pulse_generate_stubs" ] + sources += get_target_outputs(":pulse_generate_stubs") ++ } ++ if (is_linux) { ++ libs += [ "dl" ] + } } - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/audio/alsa/audio_manager_alsa.cc -@@ -135,7 +135,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic +@@ -93,7 +93,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType int card = -1; // Loop through the sound cards to get ALSA device hints. @@ -10,7 +10,7 @@ void** hints = NULL; int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { -@@ -147,7 +149,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic +@@ -105,7 +107,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " << wrapper_->StrError(error); } @@ -19,20 +19,20 @@ +#endif } - void AudioManagerAlsa::GetAlsaDevicesInfo( -@@ -230,7 +234,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvail - // goes through software conversion if needed (e.g. incompatible - // sample rate). - // TODO(joi): Should we prefer "hw" instead? + void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type, +@@ -188,7 +192,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( + // goes through software conversion if needed (e.g. incompatible + // sample rate). + // TODO(joi): Should we prefer "hw" instead? +#ifdef OS_LINUX - static const char kDeviceTypeDesired[] = "plughw"; + static const char kDeviceTypeDesired[] = "plughw"; +#else -+ static const char kDeviceTypeDesired[] = "plug"; ++ static const char kDeviceTypeDesired[] = "plug"; +#endif - return strncmp(kDeviceTypeDesired, - device_name, - arraysize(kDeviceTypeDesired) - 1) == 0; -@@ -254,7 +262,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe + return strncmp(kDeviceTypeDesired, device_name, + arraysize(kDeviceTypeDesired) - 1) == 0; + } +@@ -210,7 +218,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( // Loop through the sound cards. // Don't use snd_device_name_hint(-1,..) since there is a access violation // inside this ALSA API with libasound.so.2.0.0. @@ -42,7 +42,7 @@ int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) { -@@ -278,7 +288,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe +@@ -234,7 +244,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: " << wrapper_->StrError(error); } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.h @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/audio/audio_manager.h.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/audio/audio_manager.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/audio/audio_manager.h -@@ -84,7 +84,7 @@ class MEDIA_EXPORT AudioManager { - // See http://crbug.com/422522 - static void EnableCrashKeyLoggingForAudioThreadHangs(); +@@ -70,7 +70,7 @@ class MEDIA_EXPORT AudioManager { + static void StartHangMonitorIfNeeded( + scoped_refptr task_runner); -#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_FREEBSD) ++#if defined(OS_LINUX) || defined(OS_BSD) // Sets the name of the audio source as seen by external apps. Only actually // used with PulseAudio as of this writing. static void SetGlobalAppName(const std::string& app_name); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_audio__manager.cc @@ -1,29 +1,29 @@ ---- src/3rdparty/chromium/media/audio/audio_manager.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/audio/audio_manager.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/audio/audio_manager.cc -@@ -95,7 +95,7 @@ class AudioManagerHelper : public base:: +@@ -94,7 +94,7 @@ class AudioManagerHelper : public base::PowerObserver } #endif -#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_FREEBSD) ++#if defined(OS_LINUX) || defined(OS_BSD) void set_app_name(const std::string& app_name) { app_name_ = app_name; } const std::string& app_name() const { return app_name_; } #endif -@@ -253,7 +253,7 @@ class AudioManagerHelper : public base:: +@@ -229,7 +229,7 @@ class AudioManagerHelper : public base::PowerObserver std::unique_ptr com_initializer_for_testing_; #endif -#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_FREEBSD) ++#if defined(OS_LINUX) || defined(OS_BSD) std::string app_name_; #endif -@@ -365,7 +365,7 @@ void AudioManager::EnableCrashKeyLogging - g_helper.Pointer()->enable_crash_key_logging(); +@@ -313,7 +313,7 @@ void AudioManager::StartHangMonitorIfNeeded( + GetHelper()->StartHangTimer(std::move(task_runner)); } -#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_FREEBSD) ++#if defined(OS_LINUX) || defined(OS_BSD) // static void AudioManager::SetGlobalAppName(const std::string& app_name) { - g_helper.Pointer()->set_app_name(app_name); + GetHelper()->set_app_name(app_name); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_BUILD.gn @@ -1,16 +1,7 @@ ---- src/3rdparty/chromium/media/base/BUILD.gn.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/base/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/base/BUILD.gn -@@ -309,7 +309,7 @@ target(link_target_type, "base") { - allow_circular_includes_from += [ "//media/base/android" ] - } - -- if (is_linux && use_x11) { -+ if ((is_linux || is_bsd) && use_x11) { - configs += [ - "//build/config/linux:x11", - "//build/config/linux:xext", -@@ -345,7 +345,7 @@ target(link_target_type, "base") { - deps += [ ":media_yasm" ] +@@ -349,7 +349,7 @@ source_set("base") { + defines += [ "DISABLE_USER_INPUT_MONITOR" ] } - if (is_linux || is_win) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_audio__latency.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_audio__latency.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/media/base/audio_latency.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/media/base/audio_latency.cc +@@ -106,7 +106,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in + return frames_per_buffer; + } + +-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) || defined(OS_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. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ ---- src/3rdparty/chromium/media/capture/BUILD.gn.orig 2017-01-26 00:49:15 UTC -+++ src/3rdparty/chromium/media/capture/BUILD.gn -@@ -127,6 +127,16 @@ component("capture") { - ] - } - -+ if (is_bsd) { -+ sources -= [ -+ "video/linux/video_capture_device_linux.cc", -+ "video/linux/video_capture_device_linux.h", -+ "video/linux/video_capture_device_factory_linux.cc", -+ "video/linux/video_capture_device_factory_linux.h", -+ "video/linux/v4l2_capture_delegate.cc", -+ ] -+ } -+ - if (is_win) { - deps += [ - "//media/base", # For media_switches. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_fake__video__capture__device__factory.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/capture/video/fake_video_capture_device_factory.cc -@@ -71,7 +71,7 @@ void FakeVideoCaptureDeviceFactory::GetD - for (int n = 0; n < number_of_devices_; ++n) { - device_descriptors->emplace_back(base::StringPrintf("fake_device_%d", n), - base::StringPrintf("/dev/video%d", n), +@@ -200,7 +200,7 @@ void FakeVideoCaptureDeviceFactory::GetDeviceDescripto + for (const auto& entry : devices_config_) { + device_descriptors->emplace_back( + base::StringPrintf("fake_device_%d", entry_index), entry.device_id, -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE + VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE #elif defined(OS_MACOSX) - VideoCaptureApi::MACOSX_AVFOUNDATION + VideoCaptureApi::MACOSX_AVFOUNDATION Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_file__video__capture__device__factory.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/capture/video/file_video_capture_device_factory.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/capture/video/file_video_capture_device_factory.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/capture/video/file_video_capture_device_factory.cc -@@ -53,7 +53,7 @@ void FileVideoCaptureDeviceFactory::GetD +@@ -53,7 +53,7 @@ void FileVideoCaptureDeviceFactory::GetDeviceDescripto #elif defined(OS_MACOSX) command_line_file_path.value(), kFileVideoCaptureDeviceName, VideoCaptureApi::MACOSX_AVFOUNDATION Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.h +@@ -15,7 +15,7 @@ + #include "media/capture/video/linux/v4l2_capture_device_impl.h" + #include "media/capture/video/video_capture_device.h" + +-#if defined(OS_OPENBSD) ++#if defined(OS_BSD) + #include + #else + #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_v4l2__capture__delegate.cc @@ -1,18 +1,27 @@ ---- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/capture/video/linux/v4l2_capture_delegate.cc -@@ -4,7 +4,9 @@ +@@ -4,15 +4,17 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" +#if !defined(OS_BSD) #include + #include +#endif #include #include #include -@@ -20,10 +22,10 @@ - #include "media/capture/video/blob_utils.h" - #include "media/capture/video/linux/video_capture_device_linux.h" + #include + #include + +-#if !defined(OS_OPENBSD) ++#if !defined(OS_BSD) + #include + #endif + +@@ -27,10 +29,10 @@ + + using media::mojom::MeteringMode; -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) +// #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__linux.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_linux.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_linux.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/capture/video/linux/video_capture_device_linux.cc -@@ -21,6 +21,7 @@ +@@ -23,12 +23,14 @@ namespace media { @@ -8,15 +8,14 @@ // Translates Video4Linux pixel formats to Chromium pixel formats. // static VideoPixelFormat VideoCaptureDeviceLinux::V4l2FourCcToChromiumPixelFormat( -@@ -34,6 +35,7 @@ std::list VideoCaptureDeviceLi - bool favour_mjpeg) { - return V4L2CaptureDelegate::GetListOfUsableFourCcs(favour_mjpeg); + uint32_t v4l2_fourcc) { + return V4L2CaptureDelegate::V4l2FourCcToChromiumPixelFormat(v4l2_fourcc); } +#endif // !defined(OS_FREEBSD) - VideoCaptureDeviceLinux::VideoCaptureDeviceLinux( - const VideoCaptureDeviceDescriptor& device_descriptor) -@@ -47,6 +49,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDe + // Gets a list of usable Four CC formats prioritized. + // static +@@ -51,6 +53,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDeviceLinux() { v4l2_thread_.Stop(); } @@ -24,9 +23,9 @@ void VideoCaptureDeviceLinux::AllocateAndStart( const VideoCaptureParams& params, std::unique_ptr client) { -@@ -70,7 +73,13 @@ void VideoCaptureDeviceLinux::AllocateAn - params.requested_format.frame_size.height(), - params.requested_format.frame_rate, base::Passed(&client))); +@@ -80,7 +83,13 @@ void VideoCaptureDeviceLinux::AllocateAndStart( + v4l2_thread_.task_runner()->PostTask(FROM_HERE, request); + photo_requests_queue_.clear(); } +#else // !defined(OS_FREEBSD) +void VideoCaptureDeviceLinux::AllocateAndStart( @@ -38,20 +37,26 @@ void VideoCaptureDeviceLinux::StopAndDeAllocate() { if (!v4l2_thread_.IsRunning()) return; // Wrong state. -@@ -110,7 +119,11 @@ void VideoCaptureDeviceLinux::SetPhotoOp - base::Bind(&V4L2CaptureDelegate::SetPhotoOptions, capture_impl_, - base::Passed(&settings), base::Passed(&callback))); +@@ -92,6 +101,9 @@ void VideoCaptureDeviceLinux::StopAndDeAllocate() { + + capture_impl_ = nullptr; } +#else // !defined(OS_FREEBSD) +void VideoCaptureDeviceLinux::StopAndDeAllocate() {} +#endif // !defined(OS_FREEBSD) + void VideoCaptureDeviceLinux::TakePhoto(TakePhotoCallback callback) { + DCHECK(capture_impl_); +@@ -132,6 +144,7 @@ void VideoCaptureDeviceLinux::SetPhotoOptions( + v4l2_thread_.task_runner()->PostTask(FROM_HERE, std::move(functor)); + } + +#if !defined(OS_FREEBSD) void VideoCaptureDeviceLinux::SetRotation(int rotation) { if (v4l2_thread_.IsRunning()) { v4l2_thread_.task_runner()->PostTask( -@@ -118,6 +131,9 @@ void VideoCaptureDeviceLinux::SetRotatio - base::Bind(&V4L2CaptureDelegate::SetRotation, capture_impl_, rotation)); +@@ -139,6 +152,9 @@ void VideoCaptureDeviceLinux::SetRotation(int rotation + capture_impl_->GetWeakPtr(), rotation)); } } +#else // !defined(OS_FREEBSD) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__client.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/capture/video/video_capture_device_client.cc -@@ -193,7 +193,7 @@ void VideoCaptureDeviceClient::OnIncomin +@@ -238,7 +238,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. // Windows RGB24 defines blue at lowest byte, // see https://msdn.microsoft.com/en-us/library/windows/desktop/dd407253 Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__factory.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_video__capture__device__factory.cc +++ /dev/null @@ -1,30 +0,0 @@ ---- src/3rdparty/chromium/media/capture/video/video_capture_device_factory.cc.orig 2017-01-26 00:49:15 UTC -+++ src/3rdparty/chromium/media/capture/video/video_capture_device_factory.cc -@@ -18,6 +18,10 @@ namespace media { - std::unique_ptr - VideoCaptureDeviceFactory::CreateFactory( - scoped_refptr ui_task_runner) { -+#if defined(OS_BSD) -+ return std::unique_ptr( -+ new media::FakeVideoCaptureDeviceFactory()); -+#else - const base::CommandLine* command_line = - base::CommandLine::ForCurrentProcess(); - // Use a Fake or File Video Device Factory if the command line flags are -@@ -36,6 +40,7 @@ VideoCaptureDeviceFactory::CreateFactory - return std::unique_ptr( - CreateVideoCaptureDeviceFactory(ui_task_runner)); - } -+#endif - } - - VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { -@@ -55,7 +60,7 @@ void VideoCaptureDeviceFactory::Enumerat - callback.Run(std::move(device_descriptors)); - } - --#if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ -+#if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_BSD) && !defined(OS_ANDROID) && \ - !defined(OS_WIN) - // static - VideoCaptureDeviceFactory* Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_cast_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_cast_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_cast_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/cast/BUILD.gn.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/cast/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/cast/BUILD.gn -@@ -356,7 +356,7 @@ test("cast_unittests") { +@@ -364,7 +364,7 @@ test("cast_unittests") { } } @@ -9,16 +9,14 @@ # This is a target for the collection of cast development tools. They are # not built/linked into the Chromium browser. group("testing_tools") { -@@ -410,7 +410,7 @@ if (is_win || is_mac || (is_linux && !is - "//ui/gfx/geometry", +@@ -510,13 +510,13 @@ if (is_win || is_mac || (is_linux && !is_chromeos)) { + "//net", ] - -- if (is_linux && !is_chromeos && use_x11) { -+ if ((is_linux || is_bsd) && !is_chromeos && use_x11) { - sources += [ - "test/linux_output_window.cc", - "test/linux_output_window.h", -@@ -513,7 +513,7 @@ if (is_win || is_mac || (is_linux && !is + } +-} else { # !(is_win || is_mac || (is_linux && !is_chromeos)) ++} else { # !(is_win || is_mac || (is_linux && !is_chromeos) || is_bsd) + # The testing tools are only built for the desktop platforms. + group("testing_tools") { } } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_cdm_ppapi_ppapi__cdm__adapter.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_cdm_ppapi_ppapi__cdm__adapter.gni +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/media/cdm/ppapi/ppapi_cdm_adapter.gni.orig 2017-01-26 00:49:15 UTC -+++ src/3rdparty/chromium/media/cdm/ppapi/ppapi_cdm_adapter.gni -@@ -5,7 +5,7 @@ - # This template defines a CDM adapter target. Just use this as you would a - # normal target and everything should work correctly. - template("ppapi_cdm_adapter") { -- if (is_mac || is_linux) { -+ if (is_mac || is_linux || is_bsd) { - _target_type = "loadable_module" - } else { - _target_type = "shared_library" -@@ -57,7 +57,7 @@ template("ppapi_cdm_adapter") { - libs += [ "rt" ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - # CDM adapter depends on a CDM in component and non-component builds. - configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_filters_vp9__parser.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_filters_vp9__parser.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_filters_vp9__parser.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/filters/vp9_parser.h.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/filters/vp9_parser.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/filters/vp9_parser.h @@ -14,6 +14,7 @@ @@ -7,4 +7,4 @@ +#include #include - #include + #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/media/formats/common/offset_byte_queue.h.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/formats/common/offset_byte_queue.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/formats/common/offset_byte_queue.h @@ -36,15 +36,15 @@ class MEDIA_EXPORT OffsetByteQueue { // a null |buf| and a |size| of zero. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_common_offset__byte__queue.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/formats/common/offset_byte_queue.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/formats/common/offset_byte_queue.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/formats/common/offset_byte_queue.cc -@@ -46,13 +46,13 @@ void OffsetByteQueue::PeekAt(int64_t off +@@ -46,13 +46,13 @@ void OffsetByteQueue::PeekAt(int64_t offset, const uin *size = tail() - offset; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__adts.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__adts.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__adts.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/formats/mp2t/es_parser_adts.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/formats/mp2t/es_parser_adts.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/formats/mp2t/es_parser_adts.cc -@@ -54,11 +54,11 @@ bool EsParserAdts::LookForAdtsFrame(Adts +@@ -63,11 +63,11 @@ bool EsParserAdts::LookForAdtsFrame(AdtsFrame* adts_fr const uint8_t* es; es_queue_->Peek(&es, &es_size); @@ -15,7 +15,7 @@ const uint8_t* cur_buf = &es[offset]; if (!isAdtsSyncWord(cur_buf)) continue; -@@ -96,7 +96,7 @@ bool EsParserAdts::LookForAdtsFrame(Adts +@@ -107,7 +107,7 @@ bool EsParserAdts::LookForAdtsFrame(AdtsFrame* adts_fr return true; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__mpeg1audio.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__mpeg1audio.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_formats_mp2t_es__parser__mpeg1audio.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/media/formats/mp2t/es_parser_mpeg1audio.cc.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/media/formats/mp2t/es_parser_mpeg1audio.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/formats/mp2t/es_parser_mpeg1audio.cc -@@ -109,11 +109,11 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud +@@ -108,11 +108,11 @@ bool EsParserMpeg1Audio::LookForMpeg1AudioFrame( const uint8_t* es; es_queue_->Peek(&es, &es_size); @@ -15,7 +15,7 @@ const uint8_t* cur_buf = &es[offset]; if (cur_buf[0] != 0xff) continue; -@@ -154,7 +154,7 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud +@@ -153,7 +153,7 @@ bool EsParserMpeg1Audio::LookForMpeg1AudioFrame( return true; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_media__options.gni @@ -1,12 +1,12 @@ ---- src/3rdparty/chromium/media/media_options.gni.orig 2018-06-21 14:06:20 UTC +--- src/3rdparty/chromium/media/media_options.gni.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/media/media_options.gni -@@ -53,6 +53,9 @@ declare_args() { - +@@ -99,6 +99,9 @@ declare_args() { # Enables runtime selection of ALSA library for audio. use_alsa = false -+ -+ # Enables runtime selection of sndio library for audio. -+ use_sndio = false ++ # Enables runtime selection of sndio library for audio. ++ use_sndio = false ++ # Alsa should be used on non-Android, non-Mac POSIX systems. # Alsa should be used on desktop Chromecast and audio-only Chromecast builds. + if (is_posix && !is_android && !is_mac && Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_BUILD.gn @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/mojo/BUILD.gn.orig 2017-01-26 00:49:15 UTC +--- src/3rdparty/chromium/mojo/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/mojo/BUILD.gn @@ -12,7 +12,7 @@ group("mojo") { - "//mojo/common", + ":tests", ] - if (!(is_linux && current_cpu == "x86")) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_edk_test_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_edk_test_BUILD.gn +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/mojo/edk/test/BUILD.gn.orig 2017-01-26 00:49:15 UTC -+++ src/3rdparty/chromium/mojo/edk/test/BUILD.gn -@@ -48,7 +48,7 @@ source_set("run_all_unittests") { - "//testing/gtest", - ] - -- if (is_linux && !is_component_build) { -+ if ((is_linux || is_bsd) && !is_component_build) { - public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ] - } - } -@@ -68,7 +68,7 @@ source_set("run_all_perftests") { - "run_all_perftests.cc", - ] - -- if (is_linux && !is_component_build) { -+ if ((is_linux || is_bsd) && !is_component_build) { - public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ] - } - } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_tools_bindings_mojom.gni @@ -0,0 +1,32 @@ +--- src/3rdparty/chromium/mojo/public/tools/bindings/mojom.gni.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/mojo/public/tools/bindings/mojom.gni +@@ -46,9 +46,10 @@ declare_args() { + # ARC) we have to explicitly opt out there even when NaCl is enabled (and + # consequently also when building for NaCl toolchains.) For this reason we + # check |target_os| explicitly, as it's consistent across all toolchains. ++# YYY + enable_scrambled_message_ids = + enable_mojom_message_id_scrambling && +- (is_mac || is_win || (is_linux && !is_chromeos) || ++ (is_bsd || is_mac || is_win || (is_linux && !is_chromeos) || + ((enable_nacl || is_nacl || is_nacl_nonsfi) && target_os != "chromeos")) + + mojom_generator_root = "//mojo/public/tools/bindings" +@@ -393,6 +394,8 @@ template("mojom") { + enabled_features += [ "is_ios" ] + } else if (is_linux) { + enabled_features += [ "is_linux" ] ++ } else if (is_bsd) { ++ enabled_features += [ "is_bsd" ] + } else if (is_mac) { + enabled_features += [ "is_mac" ] + } else if (is_win) { +@@ -760,6 +763,8 @@ template("mojom") { + } else if (os == "ios" && is_ios) { + enabled = true + } else if (os == "linux" && is_linux) { ++ enabled = true ++ } else if (os == "bsd" && is_bsd) { + enabled = true + } else if (os == "mac" && is_mac) { + enabled = true Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_native__client__sdk_src_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_native__client__sdk_src_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_native__client__sdk_src_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/native_client_sdk/src/BUILD.gn.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/native_client_sdk/src/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/native_client_sdk/src/BUILD.gn -@@ -7,7 +7,7 @@ import("//build/config/features.gni") +@@ -7,7 +7,7 @@ import("//components/nacl/features.gni") declare_args() { # Set to true if cross compiling trusted (e.g. building sel_ldr_arm on x86) # binaries is supported. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_BUILD.gn @@ -1,18 +1,6 @@ ---- src/3rdparty/chromium/net/BUILD.gn.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/BUILD.gn -@@ -153,6 +153,11 @@ component("net") { - ] - if (is_android) { - sources -= [ "base/openssl_private_key_store_android.cc" ] -+ } else if (is_bsd) { -+ sources -= [ -+ "base/address_tracker_linux.cc", -+ "base/address_tracker_linux.h", -+ ] - } - } else { - if (is_android) { -@@ -278,6 +283,13 @@ component("net") { +@@ -1906,6 +1906,13 @@ component("net") { sources -= [ "disk_cache/blockfile/file_posix.cc" ] } @@ -24,18 +12,25 @@ + } + if (is_ios || is_mac) { - sources += gypi_values.net_base_mac_ios_sources + sources += [ + "base/mac/url_conversions.h", +@@ -1925,6 +1932,15 @@ component("net") { + ] } -@@ -966,7 +978,7 @@ if (!is_ios && !is_android) { - } - } --if (is_linux || is_mac) { -+if (is_linux || is_bsd || is_mac) { - executable("cachetool") { - testonly = true - sources = [ -@@ -995,7 +1007,7 @@ if (is_linux || is_mac) { ++ if (is_bsd) { ++ sources -= [ ++ "base/address_tracker_linux.cc", ++ "base/address_tracker_linux.h", ++ #"base/network_interfaces_linux.cc", ++ ] ++ #sources += [ "base/network_interfaces_freebsd.cc" ] ++ } ++ + if (is_fuchsia) { + sources += [ + "base/network_change_notifier_fuchsia.cc", +@@ -2932,7 +2948,7 @@ if (is_linux || is_mac) { } } @@ -44,7 +39,7 @@ static_library("epoll_server") { sources = [ "tools/epoll_server/epoll_server.cc", -@@ -1098,7 +1110,7 @@ if (is_android) { +@@ -3035,7 +3051,7 @@ if (is_android) { } } @@ -53,34 +48,14 @@ executable("disk_cache_memory_test") { testonly = true sources = [ -@@ -1276,7 +1288,7 @@ test("net_unittests") { - "third_party/nist-pkits/", - ] +@@ -5320,6 +5336,10 @@ test("net_unittests") { -- if (is_linux || is_mac || is_win) { -+ if (is_linux || is_bsd || is_mac || is_win) { - deps += [ - "//third_party/pyftpdlib/", - "//third_party/pywebsocket/", -@@ -1299,7 +1311,7 @@ test("net_unittests") { - if (is_desktop_linux) { - deps += [ ":epoll_quic_tools" ] - } -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources += gypi_values.net_linux_test_sources - deps += [ - ":epoll_quic_tools", -@@ -1319,6 +1331,12 @@ test("net_unittests") { - sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ] - } - -+ if (is_bsd) { -+ sources -= [ -+ "base/address_tracker_linux_unittest.cc", -+ ] + if (is_chromeos) { + sources -= [ "proxy_resolution/proxy_config_service_linux_unittest.cc" ] + } + - if (v8_use_external_startup_data) { - deps += [ "//gin" ] ++ if (is_bsd) { ++ sources -= [ "base/address_tracker_linux_unittest.cc" ] } + + if (!is_proto_quic && v8_use_external_startup_data) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux.h @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/base/address_tracker_linux.h.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/base/address_tracker_linux.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/base/address_tracker_linux.h @@ -6,10 +6,12 @@ #define NET_BASE_ADDRESS_TRACKER_LINUX_H_ @@ -13,13 +13,13 @@ #include #include -@@ -34,8 +36,11 @@ namespace internal { - class NET_EXPORT_PRIVATE AddressTrackerLinux : - public base::MessageLoopForIO::Watcher { +@@ -34,8 +36,12 @@ namespace internal { + class NET_EXPORT_PRIVATE AddressTrackerLinux + : public base::MessagePumpForIO::FdWatcher { public: +#if !defined(__FreeBSD__) typedef std::map AddressMap; -- + +#else + typedef void* AddressMap; +#endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux.cc @@ -0,0 +1,347 @@ +--- src/3rdparty/chromium/net/base/address_tracker_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/base/address_tracker_linux.cc +@@ -21,96 +21,10 @@ + namespace net { + namespace internal { + +-namespace { +- +-// Some kernel functions such as wireless_send_event and rtnetlink_ifinfo_prep +-// may send spurious messages over rtnetlink. RTM_NEWLINK messages where +-// ifi_change == 0 and rta_type == IFLA_WIRELESS should be ignored. +-bool IgnoreWirelessChange(const struct nlmsghdr* header, +- const struct ifinfomsg* msg) { +- size_t length = IFLA_PAYLOAD(header); +- for (const struct rtattr* attr = IFLA_RTA(msg); RTA_OK(attr, length); +- attr = RTA_NEXT(attr, length)) { +- if (attr->rta_type == IFLA_WIRELESS && msg->ifi_change == 0) +- return true; +- } +- return false; +-} +- +-// Retrieves address from NETLINK address message. +-// Sets |really_deprecated| for IPv6 addresses with preferred lifetimes of 0. +-bool GetAddress(const struct nlmsghdr* header, +- IPAddress* out, +- bool* really_deprecated) { +- if (really_deprecated) +- *really_deprecated = false; +- const struct ifaddrmsg* msg = +- reinterpret_cast(NLMSG_DATA(header)); +- size_t address_length = 0; +- switch (msg->ifa_family) { +- case AF_INET: +- address_length = IPAddress::kIPv4AddressSize; +- break; +- case AF_INET6: +- address_length = IPAddress::kIPv6AddressSize; +- break; +- default: +- // Unknown family. +- return false; +- } +- // Use IFA_ADDRESS unless IFA_LOCAL is present. This behavior here is based on +- // getaddrinfo in glibc (check_pf.c). Judging from kernel implementation of +- // NETLINK, IPv4 addresses have only the IFA_ADDRESS attribute, while IPv6 +- // have the IFA_LOCAL attribute. +- uint8_t* address = NULL; +- uint8_t* local = NULL; +- size_t length = IFA_PAYLOAD(header); +- for (const struct rtattr* attr = +- reinterpret_cast(IFA_RTA(msg)); +- RTA_OK(attr, length); +- attr = RTA_NEXT(attr, length)) { +- switch (attr->rta_type) { +- case IFA_ADDRESS: +- DCHECK_GE(RTA_PAYLOAD(attr), address_length); +- address = reinterpret_cast(RTA_DATA(attr)); +- break; +- case IFA_LOCAL: +- DCHECK_GE(RTA_PAYLOAD(attr), address_length); +- local = reinterpret_cast(RTA_DATA(attr)); +- break; +- case IFA_CACHEINFO: { +- const struct ifa_cacheinfo *cache_info = +- reinterpret_cast(RTA_DATA(attr)); +- if (really_deprecated) +- *really_deprecated = (cache_info->ifa_prefered == 0); +- } break; +- default: +- break; +- } +- } +- if (local) +- address = local; +- if (!address) +- return false; +- *out = IPAddress(address, address_length); +- return true; +-} +- +-} // namespace +- + // static + char* AddressTrackerLinux::GetInterfaceName(int interface_index, char* buf) { +- memset(buf, 0, IFNAMSIZ); +- base::ScopedFD ioctl_socket = GetSocketForIoctl(); +- if (!ioctl_socket.is_valid()) +- return buf; +- +- struct ifreq ifr = {}; +- ifr.ifr_ifindex = interface_index; +- +- if (ioctl(ioctl_socket.get(), SIOCGIFNAME, &ifr) == 0) +- strncpy(buf, ifr.ifr_name, IFNAMSIZ - 1); +- return buf; ++ NOTIMPLEMENTED(); ++ return NULL; + } + + AddressTrackerLinux::AddressTrackerLinux() +@@ -153,76 +67,10 @@ AddressTrackerLinux::~AddressTrackerLinux() { + } + + void AddressTrackerLinux::Init() { +- netlink_fd_ = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); +- if (netlink_fd_ < 0) { +- PLOG(ERROR) << "Could not create NETLINK socket"; +- AbortAndForceOnline(); +- return; +- } ++NOTIMPLEMENTED(); ++AbortAndForceOnline(); ++} + +- int rv; +- +- if (tracking_) { +- // Request notifications. +- struct sockaddr_nl addr = {}; +- addr.nl_family = AF_NETLINK; +- addr.nl_pid = getpid(); +- // TODO(szym): Track RTMGRP_LINK as well for ifi_type, +- // http://crbug.com/113993 +- addr.nl_groups = +- RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR | RTMGRP_NOTIFY | RTMGRP_LINK; +- rv = bind( +- netlink_fd_, reinterpret_cast(&addr), sizeof(addr)); +- if (rv < 0) { +- PLOG(ERROR) << "Could not bind NETLINK socket"; +- AbortAndForceOnline(); +- return; +- } +- } +- +- // Request dump of addresses. +- struct sockaddr_nl peer = {}; +- peer.nl_family = AF_NETLINK; +- +- struct { +- struct nlmsghdr header; +- struct rtgenmsg msg; +- } request = {}; +- +- request.header.nlmsg_len = NLMSG_LENGTH(sizeof(request.msg)); +- request.header.nlmsg_type = RTM_GETADDR; +- request.header.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; +- request.header.nlmsg_pid = getpid(); +- request.msg.rtgen_family = AF_UNSPEC; +- +- rv = HANDLE_EINTR(sendto(netlink_fd_, &request, request.header.nlmsg_len, +- 0, reinterpret_cast(&peer), +- sizeof(peer))); +- if (rv < 0) { +- PLOG(ERROR) << "Could not send NETLINK request"; +- AbortAndForceOnline(); +- return; +- } +- +- // Consume pending message to populate the AddressMap, but don't notify. +- // Sending another request without first reading responses results in EBUSY. +- bool address_changed; +- bool link_changed; +- bool tunnel_changed; +- ReadMessages(&address_changed, &link_changed, &tunnel_changed); +- +- // Request dump of link state +- request.header.nlmsg_type = RTM_GETLINK; +- +- rv = HANDLE_EINTR(sendto(netlink_fd_, &request, request.header.nlmsg_len, 0, +- reinterpret_cast(&peer), +- sizeof(peer))); +- if (rv < 0) { +- PLOG(ERROR) << "Could not send NETLINK request"; +- AbortAndForceOnline(); +- return; +- } +- + // Consume pending message to populate links_online_, but don't notify. + ReadMessages(&address_changed, &link_changed, &tunnel_changed); + { +@@ -250,25 +98,6 @@ void AddressTrackerLinux::AbortAndForceOnline() { + connection_type_initialized_cv_.Broadcast(); + } + +-AddressTrackerLinux::AddressMap AddressTrackerLinux::GetAddressMap() const { +- AddressTrackerAutoLock lock(*this, address_map_lock_); +- return address_map_; +-} +- +-std::unordered_set AddressTrackerLinux::GetOnlineLinks() const { +- AddressTrackerAutoLock lock(*this, online_links_lock_); +- return online_links_; +-} +- +-bool AddressTrackerLinux::IsInterfaceIgnored(int interface_index) const { +- if (ignored_interfaces_.empty()) +- return false; +- +- char buf[IFNAMSIZ] = {0}; +- const char* interface_name = get_interface_name_(interface_index, buf); +- return ignored_interfaces_.find(interface_name) != ignored_interfaces_.end(); +-} +- + NetworkChangeNotifier::ConnectionType + AddressTrackerLinux::GetCurrentConnectionType() { + // http://crbug.com/125097 +@@ -323,102 +152,7 @@ void AddressTrackerLinux::HandleMessage(char* buffer, + bool* address_changed, + bool* link_changed, + bool* tunnel_changed) { +- DCHECK(buffer); +- for (struct nlmsghdr* header = reinterpret_cast(buffer); +- NLMSG_OK(header, length); +- header = NLMSG_NEXT(header, length)) { +- switch (header->nlmsg_type) { +- case NLMSG_DONE: +- return; +- case NLMSG_ERROR: { +- const struct nlmsgerr* msg = +- reinterpret_cast(NLMSG_DATA(header)); +- LOG(ERROR) << "Unexpected netlink error " << msg->error << "."; +- } return; +- case RTM_NEWADDR: { +- IPAddress address; +- bool really_deprecated; +- struct ifaddrmsg* msg = +- reinterpret_cast(NLMSG_DATA(header)); +- if (IsInterfaceIgnored(msg->ifa_index)) +- break; +- if (GetAddress(header, &address, &really_deprecated)) { +- AddressTrackerAutoLock lock(*this, address_map_lock_); +- // Routers may frequently (every few seconds) output the IPv6 ULA +- // prefix which can cause the linux kernel to frequently output two +- // back-to-back messages, one without the deprecated flag and one with +- // the deprecated flag but both with preferred lifetimes of 0. Avoid +- // interpretting this as an actual change by canonicalizing the two +- // messages by setting the deprecated flag based on the preferred +- // lifetime also. http://crbug.com/268042 +- if (really_deprecated) +- msg->ifa_flags |= IFA_F_DEPRECATED; +- // Only indicate change if the address is new or ifaddrmsg info has +- // changed. +- AddressMap::iterator it = address_map_.find(address); +- if (it == address_map_.end()) { +- address_map_.insert(it, std::make_pair(address, *msg)); +- *address_changed = true; +- } else if (memcmp(&it->second, msg, sizeof(*msg))) { +- it->second = *msg; +- *address_changed = true; +- } +- } +- } break; +- case RTM_DELADDR: { +- IPAddress address; +- const struct ifaddrmsg* msg = +- reinterpret_cast(NLMSG_DATA(header)); +- if (IsInterfaceIgnored(msg->ifa_index)) +- break; +- if (GetAddress(header, &address, NULL)) { +- AddressTrackerAutoLock lock(*this, address_map_lock_); +- if (address_map_.erase(address)) +- *address_changed = true; +- } +- } break; +- case RTM_NEWLINK: { +- const struct ifinfomsg* msg = +- reinterpret_cast(NLMSG_DATA(header)); +- if (IsInterfaceIgnored(msg->ifi_index)) +- break; +- if (IgnoreWirelessChange(header, msg)) { +- VLOG(2) << "Ignoring RTM_NEWLINK message"; +- break; +- } +- if (!(msg->ifi_flags & IFF_LOOPBACK) && (msg->ifi_flags & IFF_UP) && +- (msg->ifi_flags & IFF_LOWER_UP) && (msg->ifi_flags & IFF_RUNNING)) { +- AddressTrackerAutoLock lock(*this, online_links_lock_); +- if (online_links_.insert(msg->ifi_index).second) { +- *link_changed = true; +- if (IsTunnelInterface(msg->ifi_index)) +- *tunnel_changed = true; +- } +- } else { +- AddressTrackerAutoLock lock(*this, online_links_lock_); +- if (online_links_.erase(msg->ifi_index)) { +- *link_changed = true; +- if (IsTunnelInterface(msg->ifi_index)) +- *tunnel_changed = true; +- } +- } +- } break; +- case RTM_DELLINK: { +- const struct ifinfomsg* msg = +- reinterpret_cast(NLMSG_DATA(header)); +- if (IsInterfaceIgnored(msg->ifi_index)) +- break; +- AddressTrackerAutoLock lock(*this, online_links_lock_); +- if (online_links_.erase(msg->ifi_index)) { +- *link_changed = true; +- if (IsTunnelInterface(msg->ifi_index)) +- *tunnel_changed = true; +- } +- } break; +- default: +- break; +- } +- } ++ NOTIMPLEMENTED(); + } + + void AddressTrackerLinux::OnFileCanReadWithoutBlocking(int fd) { +@@ -455,34 +189,7 @@ bool AddressTrackerLinux::IsTunnelInterfaceName(const + } + + void AddressTrackerLinux::UpdateCurrentConnectionType() { +- AddressTrackerLinux::AddressMap address_map = GetAddressMap(); +- std::unordered_set online_links = GetOnlineLinks(); +- +- // Strip out tunnel interfaces from online_links +- for (std::unordered_set::const_iterator it = online_links.begin(); +- it != online_links.end();) { +- if (IsTunnelInterface(*it)) { +- std::unordered_set::const_iterator tunnel_it = it; +- ++it; +- online_links.erase(*tunnel_it); +- } else { +- ++it; +- } +- } +- +- NetworkInterfaceList networks; +- NetworkChangeNotifier::ConnectionType type = +- NetworkChangeNotifier::CONNECTION_NONE; +- if (GetNetworkListImpl(&networks, 0, online_links, address_map, +- get_interface_name_)) { +- type = NetworkChangeNotifier::ConnectionTypeFromInterfaceList(networks); +- } else { +- type = online_links.empty() ? NetworkChangeNotifier::CONNECTION_NONE +- : NetworkChangeNotifier::CONNECTION_UNKNOWN; +- } +- +- AddressTrackerAutoLock lock(*this, connection_type_lock_); +- current_connection_type_ = type; ++ NOTIMPLEMENTED(); + } + + int AddressTrackerLinux::GetThreadsWaitingForConnectionTypeInitForTesting() Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_address__tracker__linux__unittest.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/base/address_tracker_linux_unittest.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/base/address_tracker_linux_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/base/address_tracker_linux_unittest.cc @@ -4,7 +4,11 @@ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_mime__util__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_mime__util__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/net/base/mime_util_unittest.cc.orig 2017-01-26 00:49:16 UTC -+++ src/3rdparty/chromium/net/base/mime_util_unittest.cc -@@ -243,7 +243,7 @@ TEST(MimeUtilTest, TestGetExtensionsForM - { "MeSsAge/*", 1, "eml" }, - { "image/bmp", 1, "bmp" }, - { "video/*", 6, "mp4" }, --#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_IOS) -+#if (defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(OS_IOS) - { "video/*", 6, "mpg" }, - #else - { "video/*", 6, "mpeg" }, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.h @@ -1,15 +1,15 @@ ---- src/3rdparty/chromium/net/base/network_change_notifier.h.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/base/network_change_notifier.h.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/base/network_change_notifier.h -@@ -26,7 +26,7 @@ struct NetworkInterface; +@@ -22,7 +22,7 @@ class NetworkChangeNotifierFactory; + struct NetworkInterface; typedef std::vector NetworkInterfaceList; - class URLRequest; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) namespace internal { class AddressTrackerLinux; } -@@ -332,7 +332,7 @@ class NET_EXPORT NetworkChangeNotifier { +@@ -348,7 +348,7 @@ class NET_EXPORT NetworkChangeNotifier { // a large HOSTS file. static void GetDnsConfig(DnsConfig* config); @@ -18,7 +18,7 @@ // Returns the AddressTrackerLinux if present. static const internal::AddressTrackerLinux* GetAddressTracker(); #endif -@@ -488,7 +488,7 @@ class NET_EXPORT NetworkChangeNotifier { +@@ -499,7 +499,7 @@ class NET_EXPORT NetworkChangeNotifier { const NetworkChangeCalculatorParams& params = NetworkChangeCalculatorParams()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__change__notifier.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/base/network_change_notifier.cc -@@ -533,7 +533,6 @@ NetworkChangeNotifier* NetworkChangeNoti +@@ -217,7 +217,6 @@ NetworkChangeNotifier* NetworkChangeNotifier::Create() #elif defined(OS_MACOSX) return new NetworkChangeNotifierMac(); #else @@ -8,7 +8,7 @@ return NULL; #endif } -@@ -753,7 +752,7 @@ void NetworkChangeNotifier::LogOperatorC +@@ -425,7 +424,7 @@ void NetworkChangeNotifier::LogOperatorCodeHistogram(C #endif } @@ -17,7 +17,7 @@ // static const internal::AddressTrackerLinux* NetworkChangeNotifier::GetAddressTracker() { -@@ -978,7 +977,7 @@ NetworkChangeNotifier::NetworkChangeNoti +@@ -674,7 +673,7 @@ NetworkChangeNotifier::NetworkChangeNotifier( network_change_calculator_->Init(); } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__freebsd.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__freebsd.h @@ -0,0 +1,47 @@ +--- src/3rdparty/chromium/net/base/network_interfaces_freebsd.h.orig 2018-12-29 13:28:53 UTC ++++ src/3rdparty/chromium/net/base/network_interfaces_freebsd.h +@@ -0,0 +1,44 @@ ++// Copyright (c) 2014 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ ++#define NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ ++ ++// This file is only used to expose some of the internals ++// of network_interfaces_mac.cc to tests. ++ ++#include ++ ++#include "base/macros.h" ++#include "net/base/net_export.h" ++#include "net/base/network_interfaces.h" ++ ++struct ifaddrs; ++struct sockaddr; ++ ++namespace net { ++namespace internal { ++ ++class NET_EXPORT IPAttributesGetterFreeBSD { ++ public: ++ IPAttributesGetterFreeBSD() {} ++ virtual ~IPAttributesGetterFreeBSD() {} ++ virtual bool IsInitialized() const = 0; ++ virtual bool GetIPAttributes(const char* ifname, ++ const sockaddr* sock_addr, ++ int* native_attributes) = 0; ++ ++ private: ++ DISALLOW_COPY_AND_ASSIGN(IPAttributesGetterFreeBSD); ++}; ++ ++NET_EXPORT bool GetNetworkListImpl(NetworkInterfaceList* networks, ++ int policy, ++ const ifaddrs* interfaces, ++ IPAttributesGetterFreeBSD* ip_attributes_getter); ++ ++} // namespace internal ++} // namespace net ++ ++#endif // NET_BASE_NETWORK_INTERFACES_FREEBSD_H_ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__freebsd.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__freebsd.cc @@ -0,0 +1,243 @@ +--- src/3rdparty/chromium/net/base/network_interfaces_freebsd.cc.orig 2018-12-29 13:28:53 UTC ++++ src/3rdparty/chromium/net/base/network_interfaces_freebsd.cc +@@ -0,0 +1,240 @@ ++// Copyright (c) 2014 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "net/base/network_interfaces_freebsd.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "base/files/file_path.h" ++#include "base/logging.h" ++#include "base/strings/string_number_conversions.h" ++#include "base/strings/string_tokenizer.h" ++#include "base/strings/string_util.h" ++#include "base/threading/thread_restrictions.h" ++#include "net/base/escape.h" ++#include "net/base/ip_endpoint.h" ++#include "net/base/net_errors.h" ++#include "net/base/network_interfaces_posix.h" ++#include "url/gurl.h" ++ ++namespace net { ++ ++namespace { ++ ++// FreeBSD implementation of IPAttributesGetterFreeBSD which calls ioctl on socket to ++// retrieve IP attributes. ++class IPAttributesGetterFreeBSDImpl : public internal::IPAttributesGetterFreeBSD { ++ public: ++ IPAttributesGetterFreeBSDImpl(); ++ ~IPAttributesGetterFreeBSDImpl() override; ++ bool IsInitialized() const override; ++ bool GetIPAttributes(const char* ifname, ++ const sockaddr* sock_addr, ++ int* native_attributes) override; ++ ++ private: ++ int ioctl_socket_; ++}; ++ ++IPAttributesGetterFreeBSDImpl::IPAttributesGetterFreeBSDImpl() ++ : ioctl_socket_(socket(AF_INET6, SOCK_DGRAM, 0)) { ++ DCHECK_GE(ioctl_socket_, 0); ++} ++ ++bool IPAttributesGetterFreeBSDImpl::IsInitialized() const { ++ return ioctl_socket_ >= 0; ++} ++ ++IPAttributesGetterFreeBSDImpl::~IPAttributesGetterFreeBSDImpl() { ++ if (ioctl_socket_ >= 0) { ++ close(ioctl_socket_); ++ } ++} ++ ++bool IPAttributesGetterFreeBSDImpl::GetIPAttributes(const char* ifname, ++ const sockaddr* sock_addr, ++ int* native_attributes) { ++ struct in6_ifreq ifr = {}; ++ strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name) - 1); ++ memcpy(&ifr.ifr_ifru.ifru_addr, sock_addr, sock_addr->sa_len); ++ int rv = ioctl(ioctl_socket_, SIOCGIFAFLAG_IN6, &ifr); ++ if (rv >= 0) { ++ *native_attributes = ifr.ifr_ifru.ifru_flags; ++ } ++ return (rv >= 0); ++} ++ ++// When returning true, the platform native IPv6 address attributes were ++// successfully converted to net IP address attributes. Otherwise, returning ++// false and the caller should drop the IP address which can't be used by the ++// application layer. ++bool TryConvertNativeToNetIPAttributes(int native_attributes, ++ int* net_attributes) { ++ // For FreeBSD, we disallow addresses with attributes IN6_IFF_ANYCASE, ++ // IN6_IFF_DUPLICATED, IN6_IFF_TENTATIVE, and IN6_IFF_DETACHED as these are ++ // still progressing through duplicated address detection (DAD) or are not ++ // suitable to be used in an one-to-one communication and shouldn't be used ++ // by the application layer. ++ if (native_attributes & (IN6_IFF_ANYCAST | IN6_IFF_DUPLICATED | ++ IN6_IFF_TENTATIVE | IN6_IFF_DETACHED)) { ++ return false; ++ } ++ ++ if (native_attributes & IN6_IFF_DEPRECATED) { ++ *net_attributes |= IP_ADDRESS_ATTRIBUTE_DEPRECATED; ++ } ++ ++ return true; ++} ++ ++NetworkChangeNotifier::ConnectionType GetNetworkInterfaceType( ++ int addr_family, ++ const std::string& interface_name) { ++ NetworkChangeNotifier::ConnectionType type = ++ NetworkChangeNotifier::CONNECTION_UNKNOWN; ++ ++ struct ifmediareq ifmr = {}; ++ strncpy(ifmr.ifm_name, interface_name.c_str(), sizeof(ifmr.ifm_name) - 1); ++ ++ int s = socket(addr_family, SOCK_DGRAM, 0); ++ if (s == -1) { ++ return type; ++ } ++ ++ if (ioctl(s, SIOCGIFMEDIA, &ifmr) != -1) { ++ if (ifmr.ifm_current & IFM_IEEE80211) { ++ type = NetworkChangeNotifier::CONNECTION_WIFI; ++ } else if (ifmr.ifm_current & IFM_ETHER) { ++ type = NetworkChangeNotifier::CONNECTION_ETHERNET; ++ } ++ } ++ close(s); ++ return type; ++} ++ ++} // namespace ++ ++namespace internal { ++ ++bool GetNetworkListImpl(NetworkInterfaceList* networks, ++ int policy, ++ const ifaddrs* interfaces, ++ IPAttributesGetterFreeBSD* ip_attributes_getter) { ++ // Enumerate the addresses assigned to network interfaces which are up. ++ for (const ifaddrs* interface = interfaces; interface != NULL; ++ interface = interface->ifa_next) { ++ // Skip loopback interfaces, and ones which are down. ++ if (!(IFF_RUNNING & interface->ifa_flags)) ++ continue; ++ if (IFF_LOOPBACK & interface->ifa_flags) ++ continue; ++ // Skip interfaces with no address configured. ++ struct sockaddr* addr = interface->ifa_addr; ++ if (!addr) ++ continue; ++ ++ // Skip unspecified addresses (i.e. made of zeroes) and loopback addresses ++ // configured on non-loopback interfaces. ++ if (IsLoopbackOrUnspecifiedAddress(addr)) ++ continue; ++ ++ const std::string& name = interface->ifa_name; ++ // Filter out VMware interfaces, typically named vmnet1 and vmnet8. ++ if (ShouldIgnoreInterface(name, policy)) { ++ continue; ++ } ++ ++ NetworkChangeNotifier::ConnectionType connection_type = ++ NetworkChangeNotifier::CONNECTION_UNKNOWN; ++ ++ int ip_attributes = IP_ADDRESS_ATTRIBUTE_NONE; ++ ++ // Retrieve native ip attributes and convert to net version if a getter is ++ // given. ++ if (ip_attributes_getter && ip_attributes_getter->IsInitialized()) { ++ int native_attributes = 0; ++ if (addr->sa_family == AF_INET6 && ++ ip_attributes_getter->GetIPAttributes( ++ interface->ifa_name, interface->ifa_addr, &native_attributes)) { ++ if (!TryConvertNativeToNetIPAttributes(native_attributes, ++ &ip_attributes)) { ++ continue; ++ } ++ } ++ } ++ ++ connection_type = GetNetworkInterfaceType(addr->sa_family, name); ++ ++ IPEndPoint address; ++ ++ int addr_size = 0; ++ if (addr->sa_family == AF_INET6) { ++ addr_size = sizeof(sockaddr_in6); ++ } else if (addr->sa_family == AF_INET) { ++ addr_size = sizeof(sockaddr_in); ++ } ++ ++ if (address.FromSockAddr(addr, addr_size)) { ++ uint8_t prefix_length = 0; ++ if (interface->ifa_netmask) { ++ // If not otherwise set, assume the same sa_family as ifa_addr. ++ if (interface->ifa_netmask->sa_family == 0) { ++ interface->ifa_netmask->sa_family = addr->sa_family; ++ } ++ IPEndPoint netmask; ++ if (netmask.FromSockAddr(interface->ifa_netmask, addr_size)) { ++ prefix_length = MaskPrefixLength(netmask.address()); ++ } ++ } ++ networks->push_back(NetworkInterface( ++ name, name, if_nametoindex(name.c_str()), connection_type, ++ address.address(), prefix_length, ip_attributes)); ++ } ++ } ++ ++ return true; ++} ++ ++} // namespace internal ++ ++bool GetNetworkList(NetworkInterfaceList* networks, int policy) { ++ if (networks == NULL) ++ return false; ++ ++ // getifaddrs() may require IO operations. ++ base::AssertBlockingAllowed(); ++ ++ ifaddrs* interfaces; ++ if (getifaddrs(&interfaces) < 0) { ++ PLOG(ERROR) << "getifaddrs"; ++ return false; ++ } ++ ++ std::unique_ptr ip_attributes_getter; ++ ++ ip_attributes_getter.reset(new IPAttributesGetterFreeBSDImpl()); ++ ++ bool result = internal::GetNetworkListImpl(networks, policy, interfaces, ++ ip_attributes_getter.get()); ++ freeifaddrs(interfaces); ++ return result; ++} ++ ++std::string GetWifiSSID() { ++ NOTIMPLEMENTED(); ++ return ""; ++} ++ ++} // namespace net Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__linux.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/base/network_interfaces_linux.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/base/network_interfaces_linux.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/base/network_interfaces_linux.cc @@ -6,12 +6,14 @@ @@ -11,11 +11,11 @@ #include #include #include -+#endif // !defined(OS_FREEBSD) ++#endif // !defined(OS_FREEBSD) #include #include #include -@@ -49,6 +51,7 @@ bool TryConvertNativeToNetIPAttributes(i +@@ -49,6 +51,7 @@ bool TryConvertNativeToNetIPAttributes(int native_attr // are still progressing through duplicated address detection (DAD) // and shouldn't be used by the application layer until DAD process // is completed. @@ -23,18 +23,18 @@ if (native_attributes & ( #if !defined(OS_ANDROID) IFA_F_OPTIMISTIC | IFA_F_DADFAILED | -@@ -66,6 +69,10 @@ bool TryConvertNativeToNetIPAttributes(i +@@ -66,6 +69,10 @@ bool TryConvertNativeToNetIPAttributes(int native_attr } return true; +#else + // the flags tested above are not present on FreeBSD + return false; -+#endif // !OS_FREEBSD ++#endif // !OS_FREEBSD } } // namespace -@@ -80,13 +87,15 @@ NetworkChangeNotifier::ConnectionType Ge +@@ -80,13 +87,15 @@ NetworkChangeNotifier::ConnectionType GetInterfaceConn if (!s.is_valid()) return NetworkChangeNotifier::CONNECTION_UNKNOWN; @@ -44,14 +44,14 @@ strncpy(pwrq.ifr_name, ifname.c_str(), IFNAMSIZ - 1); if (ioctl(s.get(), SIOCGIWNAME, &pwrq) != -1) return NetworkChangeNotifier::CONNECTION_WIFI; -+#endif // !defined(OS_FREEBSD) ++#endif // !defined(OS_FREEBSD) -#if !defined(OS_ANDROID) +#if !defined(OS_ANDROID) && !defined(OS_FREEBSD) // Test ethtool for CONNECTION_ETHERNET struct ethtool_cmd ecmd = {}; ecmd.cmd = ETHTOOL_GSET; -@@ -95,12 +104,13 @@ NetworkChangeNotifier::ConnectionType Ge +@@ -95,12 +104,13 @@ NetworkChangeNotifier::ConnectionType GetInterfaceConn strncpy(ifr.ifr_name, ifname.c_str(), IFNAMSIZ - 1); if (ioctl(s.get(), SIOCETHTOOL, &ifr) != -1) return NetworkChangeNotifier::CONNECTION_ETHERNET; @@ -63,15 +63,15 @@ std::string GetInterfaceSSID(const std::string& ifname) { +#if !defined(OS_FREEBSD) - base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0)); + base::ScopedFD ioctl_socket = GetSocketForIoctl(); if (!ioctl_socket.is_valid()) - return ""; -@@ -112,9 +122,11 @@ std::string GetInterfaceSSID(const std:: + return std::string(); +@@ -112,9 +122,11 @@ std::string GetInterfaceSSID(const std::string& ifname wreq.u.essid.length = IW_ESSID_MAX_SIZE; if (ioctl(ioctl_socket.get(), SIOCGIWESSID, &wreq) != -1) return ssid; -+#endif // !defined(OS_FREEBSD) - return ""; ++#endif // !defined(OS_FREEBSD) + return std::string(); } +#if !defined(OS_FREEBSD) @@ -82,11 +82,11 @@ return true; } -+#endif // !defined(OS_FREEBSD) ++#endif // !defined(OS_FREEBSD) std::string GetWifiSSIDFromInterfaceListInternal( const NetworkInterfaceList& interfaces, -@@ -207,12 +220,16 @@ bool GetNetworkList(NetworkInterfaceList +@@ -214,12 +227,16 @@ bool GetNetworkList(NetworkInterfaceList* networks, in if (networks == NULL) return false; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/base/network_interfaces_posix.h.orig 2018-11-13 18:25:11 UTC ++++ 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 ++ + #include + + struct sockaddr; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_network__interfaces__posix.cc @@ -1,14 +1,14 @@ ---- src/3rdparty/chromium/net/base/network_interfaces_posix.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/base/network_interfaces_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/base/network_interfaces_posix.cc -@@ -20,6 +20,7 @@ namespace net { - #if !defined(OS_NACL) +@@ -16,6 +16,7 @@ + namespace net { namespace internal { +#if !defined(OS_BSD) // The application layer can pass |policy| defined in net_util.h to // request filtering out certain type of interfaces. bool ShouldIgnoreInterface(const std::string& name, int policy) { -@@ -33,6 +34,7 @@ bool ShouldIgnoreInterface(const std::st +@@ -29,6 +30,7 @@ bool ShouldIgnoreInterface(const std::string& name, in return false; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_platform__mime__util__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_base_platform__mime__util__linux.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/net/base/platform_mime_util_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/base/platform_mime_util_linux.cc +@@ -34,6 +34,7 @@ bool PlatformMimeUtil::GetPlatformMimeTypeFromExtensio + const base::FilePath::StringType& ext, + std::string* result) const { + base::FilePath dummy_path("foo." + ext); ++#if !defined(OS_BSD) + std::string out = base::nix::GetFileMimeType(dummy_path); + + // GetFileMimeType likes to return application/octet-stream +@@ -51,6 +52,9 @@ bool PlatformMimeUtil::GetPlatformMimeTypeFromExtensio + + *result = out; + return true; ++#else ++ return false; ++#endif + } + + #endif // defined(OS_ANDROID) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_disk__cache_blockfile_disk__format.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_disk__cache_blockfile_disk__format.h @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/net/disk_cache/blockfile/disk_format.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/disk_cache/blockfile/disk_format.h +@@ -149,7 +149,9 @@ struct RankingsNode { + }; + #pragma pack(pop) + ++#if !defined(OS_BSD) + static_assert(sizeof(RankingsNode) == 36, "bad RankingsNode"); ++#endif + + } // namespace disk_cache + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_address__sorter__posix.cc @@ -1,10 +1,10 @@ ---- src/3rdparty/chromium/net/dns/address_sorter_posix.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/dns/address_sorter_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/dns/address_sorter_posix.cc -@@ -13,6 +13,7 @@ - #include // Must be included before ifaddrs.h. +@@ -14,6 +14,7 @@ #include #include -+#include #include ++#include #include #include + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__config__service__posix__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__config__service__posix__unittest.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__config__service__posix__unittest.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/dns/dns_config_service_posix_unittest.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/dns/dns_config_service_posix_unittest.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/dns/dns_config_service_posix_unittest.cc @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__reloader.cc @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/net/dns/dns_reloader.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/dns/dns_reloader.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/dns/dns_reloader.cc @@ -7,6 +7,10 @@ #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ - !defined(OS_ANDROID) + !defined(OS_ANDROID) && !defined(OS_FUCHSIA) +#if defined(OS_FREEBSD) +#include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__util.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_dns__util.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/dns/dns_util.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/dns/dns_util.cc +@@ -28,6 +28,8 @@ const int kMaxLabelLength = 63; + + } // namespace + ++#include ++ + #if defined(OS_POSIX) + #include + #if !defined(OS_NACL) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_dns_host__resolver__proc.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/dns/host_resolver_proc.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/dns/host_resolver_proc.cc +@@ -195,7 +195,7 @@ int SystemHostResolverCall(const std::string& host, + // current process during that time. + base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK); + +-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ ++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) && \ + !defined(OS_ANDROID) && !defined(OS_FUCHSIA) + DnsReloaderMaybeReload(); + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_features.gni =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_features.gni @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/features.gni.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/features.gni +@@ -27,7 +27,7 @@ declare_args() { + disable_brotli_filter = false + + # Multicast DNS. +- enable_mdns = is_win || is_linux || is_fuchsia ++ enable_mdns = is_win || is_linux || is_fuchsia || is_bsd + + # Reporting not used on iOS. + enable_reporting = !is_ios Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__auth__gssapi__posix.cc @@ -1,13 +1,14 @@ ---- src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/http/http_auth_gssapi_posix.cc -@@ -431,8 +431,8 @@ base::NativeLibrary GSSAPISharedLibrary: +@@ -431,8 +431,9 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLib static const char* const kDefaultLibraryNames[] = { #if defined(OS_MACOSX) - "/System/Library/Frameworks/Kerberos.framework/Kerberos" + "/System/Library/Frameworks/GSS.framework/GSS" -#elif defined(OS_OPENBSD) - "libgssapi.so" // Heimdal - OpenBSD +#elif defined(OS_BSD) + "libgssapi.so" // Heimdal - OpenBSD / FreeBSD ++ "libgssapi_krb5.so.2", // MIT Kerberos - FreeBSD #else "libgssapi_krb5.so.2", // MIT Kerberos - FC, Suse10, Debian "libgssapi.so.4", // Heimdal - Suse10, MDK Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__network__session.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__network__session.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_http_http__network__session.cc @@ -1,12 +1,12 @@ ---- src/3rdparty/chromium/net/http/http_network_session.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/http/http_network_session.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/http/http_network_session.cc -@@ -17,7 +17,9 @@ - #include "base/strings/string_util.h" +@@ -20,7 +20,9 @@ + #include "base/trace_event/memory_dump_request_args.h" + #include "base/trace_event/process_memory_dump.h" #include "base/values.h" - #include "net/base/network_throttle_manager.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_impl.h" + #include "net/http/http_stream_factory.h" #include "net/http/url_security_manager.h" Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__config__service__linux.cc @@ -0,0 +1,39 @@ +--- src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/proxy_resolution/proxy_config_service_linux.cc +@@ -6,7 +6,9 @@ + + #include + #include ++#if !defined(OS_BSD) + #include ++#endif + #include + + #include +@@ -493,6 +495,7 @@ int StringToIntOrDefault(base::StringPiece value, int + return default_value; + } + ++#if !defined(OS_BSD) + // This is the KDE version that reads kioslaverc and simulates gsettings. + // Doing this allows the main Delegate code, as well as the unit tests + // for it, to stay the same - and the settings map fairly well besides. +@@ -982,6 +985,7 @@ class SettingGetterImplKDE : public ProxyConfigService + + DISALLOW_COPY_AND_ASSIGN(SettingGetterImplKDE); + }; ++#endif + + } // namespace + +@@ -1197,8 +1201,10 @@ ProxyConfigServiceLinux::Delegate::Delegate( + case base::nix::DESKTOP_ENVIRONMENT_KDE3: + case base::nix::DESKTOP_ENVIRONMENT_KDE4: + case base::nix::DESKTOP_ENVIRONMENT_KDE5: ++#if !defined(OS_BSD) + setting_getter_.reset(new SettingGetterImplKDE(env_var_getter_.get())); + break; ++#endif + case base::nix::DESKTOP_ENVIRONMENT_XFCE: + case base::nix::DESKTOP_ENVIRONMENT_OTHER: + break; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__resolution__service.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy__resolution_proxy__resolution__service.cc @@ -0,0 +1,29 @@ +--- src/3rdparty/chromium/net/proxy_resolution/proxy_resolution_service.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/proxy_resolution/proxy_resolution_service.cc +@@ -47,7 +47,7 @@ + #elif defined(OS_MACOSX) + #include "net/proxy_resolution/proxy_config_service_mac.h" + #include "net/proxy_resolution/proxy_resolver_mac.h" +-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#elif (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) + #include "net/proxy_resolution/proxy_config_service_linux.h" + #elif defined(OS_ANDROID) + #include "net/proxy_resolution/proxy_config_service_android.h" +@@ -61,7 +61,7 @@ namespace net { + namespace { + + #if defined(OS_WIN) || defined(OS_IOS) || defined(OS_MACOSX) || \ +- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) ++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) + constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation = + net::DefineNetworkTrafficAnnotation("proxy_config_system", R"( + semantics { +@@ -1530,7 +1530,7 @@ ProxyResolutionService::CreateSystemProxyConfigService + << "profile_io_data.cc::CreateProxyConfigService and this should " + << "be used only for examples."; + return std::make_unique(); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + std::unique_ptr linux_config_service( + new ProxyConfigServiceLinux()); + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy_proxy__config__service__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy_proxy__config__service__linux.cc +++ /dev/null @@ -1,145 +0,0 @@ ---- src/3rdparty/chromium/net/proxy/proxy_config_service_linux.cc.orig 2017-01-26 00:49:16 UTC -+++ src/3rdparty/chromium/net/proxy/proxy_config_service_linux.cc -@@ -11,7 +11,14 @@ - #include - #include - #include -+#if defined(OS_FREEBSD) -+#include -+#include -+#include -+#include -+#else - #include -+#endif - #include - - #include -@@ -863,6 +870,7 @@ class SettingGetterImplKDE : public Prox - public: - explicit SettingGetterImplKDE(base::Environment* env_var_getter) - : inotify_fd_(-1), -+ config_fd_(-1), - notify_delegate_(nullptr), - debounce_timer_(new base::OneShotTimer()), - indirect_manual_(false), -@@ -937,9 +945,10 @@ class SettingGetterImplKDE : public Prox - // and pending tasks may then be deleted without being run. - // Here in the KDE version, we can safely close the file descriptor - // anyway. (Not that it really matters; the process is exiting.) -- if (inotify_fd_ >= 0) -+ if (inotify_fd_ >= 0 || config_fd_ >= 0) - ShutDown(); - DCHECK_LT(inotify_fd_, 0); -+ DCHECK_LT(config_fd_, 0); - } - - bool Init(const scoped_refptr& glib_task_runner, -@@ -948,9 +957,17 @@ class SettingGetterImplKDE : public Prox - // This has to be called on the UI thread (http://crbug.com/69057). - base::ThreadRestrictions::ScopedAllowIO allow_io; - DCHECK_LT(inotify_fd_, 0); -+#if defined(OS_BSD) -+ inotify_fd_ = kqueue(); -+#else - inotify_fd_ = inotify_init(); -+#endif - if (inotify_fd_ < 0) { -+#if defined(OS_BSD) -+ PLOG(ERROR) << "kqueue failed"; -+#else - PLOG(ERROR) << "inotify_init failed"; -+#endif - return false; - } - if (!base::SetNonBlocking(inotify_fd_)) { -@@ -974,22 +991,40 @@ class SettingGetterImplKDE : public Prox - close(inotify_fd_); - inotify_fd_ = -1; - } -+ if (config_fd_ >= 0) { -+ close(config_fd_); -+ config_fd_ = -1; -+ } - debounce_timer_.reset(); - } - - bool SetUpNotifications( - ProxyConfigServiceLinux::Delegate* delegate) override { - DCHECK_GE(inotify_fd_, 0); -+ DCHECK_GE(config_fd_, 0); - DCHECK(file_task_runner_->BelongsToCurrentThread()); - // We can't just watch the kioslaverc file directly, since KDE will write - // a new copy of it and then rename it whenever settings are changed and - // inotify watches inodes (so we'll be watching the old deleted file after - // the first change, and it will never change again). So, we watch the - // directory instead. We then act only on changes to the kioslaverc entry. -+#if defined(OS_BSD) -+ config_fd_ = HANDLE_EINTR(open(kde_config_dir_.value().c_str(), O_RDONLY)); -+ -+ if (config_fd_ == -1) -+ return false; -+ -+ struct kevent ev; -+ EV_SET(&ev, config_fd_, EVFILT_VNODE, EV_ADD | EV_CLEAR, NOTE_WRITE, -+ 0, NULL); -+ if (kevent(inotify_fd_, &ev, 1, NULL, 0, NULL) == -1) -+ return false; -+#else - if (inotify_add_watch(inotify_fd_, kde_config_dir_.value().c_str(), - IN_MODIFY | IN_MOVED_TO) < 0) { - return false; - } -+#endif - notify_delegate_ = delegate; - if (!base::MessageLoopForIO::current()->WatchFileDescriptor( - inotify_fd_, true, base::MessageLoopForIO::WATCH_READ, -@@ -1010,7 +1045,19 @@ class SettingGetterImplKDE : public Prox - void OnFileCanReadWithoutBlocking(int fd) override { - DCHECK_EQ(fd, inotify_fd_); - DCHECK(file_task_runner_->BelongsToCurrentThread()); -+#if defined(OS_BSD) -+ struct kevent ev; -+ int rv = kevent(inotify_fd_, NULL, 0, &ev, 1, NULL); -+ -+ if (rv != -1 && (ev.flags & EV_ERROR) == 0) { -+ OnChangeNotification(); -+ } else { -+ LOG(ERROR) << "kevent() failure; no longer watching kioslaverc!"; -+ ShutDown(); -+ } -+#else - OnChangeNotification(); -+#endif - } - void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); } - -@@ -1283,8 +1330,11 @@ class SettingGetterImplKDE : public Prox - void OnChangeNotification() { - DCHECK_GE(inotify_fd_, 0); - DCHECK(file_task_runner_->BelongsToCurrentThread()); -- char event_buf[(sizeof(inotify_event) + NAME_MAX + 1) * 4]; - bool kioslaverc_touched = false; -+#if defined(OS_BSD) -+ kioslaverc_touched = true; -+#else -+ char event_buf[(sizeof(inotify_event) + NAME_MAX + 1) * 4]; - ssize_t r; - while ((r = read(inotify_fd_, event_buf, sizeof(event_buf))) > 0) { - // inotify returns variable-length structures, which is why we have -@@ -1321,6 +1371,7 @@ class SettingGetterImplKDE : public Prox - inotify_fd_ = -1; - } - } -+#endif - if (kioslaverc_touched) { - // We don't use Reset() because the timer may not yet be running. - // (In that case Stop() is a no-op.) -@@ -1336,6 +1387,7 @@ class SettingGetterImplKDE : public Prox - std::vector > strings_map_type; - - int inotify_fd_; -+ int config_fd_; - base::MessagePumpLibevent::FileDescriptorWatcher inotify_watcher_; - ProxyConfigServiceLinux::Delegate* notify_delegate_; - std::unique_ptr debounce_timer_; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy_proxy__service.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_proxy_proxy__service.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/net/proxy/proxy_service.cc.orig 2017-01-26 00:49:16 UTC -+++ src/3rdparty/chromium/net/proxy/proxy_service.cc -@@ -49,7 +49,7 @@ - #elif defined(OS_MACOSX) - #include "net/proxy/proxy_config_service_mac.h" - #include "net/proxy/proxy_resolver_mac.h" --#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_FREEBSD) - #include "net/proxy/proxy_config_service_linux.h" - #elif defined(OS_ANDROID) - #include "net/proxy/proxy_config_service_android.h" -@@ -1520,7 +1520,7 @@ ProxyService::CreateSystemProxyConfigSer - << "profile_io_data.cc::CreateProxyConfigService and this should " - << "be used only for examples."; - return base::WrapUnique(new UnsetProxyConfigService); --#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined(OS_BSD) - std::unique_ptr linux_config_service( - new ProxyConfigServiceLinux()); - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_socks5__client__socket.cc @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/net/socket/socks5_client_socket.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/socket/socks5_client_socket.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/socket/socks5_client_socket.cc @@ -4,6 +4,10 @@ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_socket_udp__socket__posix.cc @@ -1,29 +1,96 @@ ---- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/socket/udp_socket_posix.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/socket/udp_socket_posix.cc -@@ -58,7 +58,7 @@ const int kBindRetries = 10; - const int kPortStart = 1024; - const int kPortEnd = 65535; +@@ -68,7 +68,7 @@ const int kActivityMonitorMinimumSamplesForThroughputE + const base::TimeDelta kActivityMonitorMsThreshold = + base::TimeDelta::FromMilliseconds(100); -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) + // When enabling multicast using setsockopt(IP_MULTICAST_IF) MacOS + // requires passing IPv4 address instead of interface index. This function + // resolves IPv4 address by interface index. The |address| is returned in +@@ -97,7 +97,7 @@ int GetIPv4AddressFromIndex(int socket, uint32_t index + return OK; + } - // Returns IPv4 address in network order. - int GetIPv4AddressFromIndex(int socket, uint32_t index, uint32_t* address) { -@@ -762,7 +762,7 @@ int UDPSocketPosix::SetMulticastOptions( +-#endif // OS_MACOSX ++#endif // OS_MACOSX || OS_BSD + + #if defined(OS_MACOSX) && !defined(OS_IOS) + +@@ -632,13 +632,13 @@ int UDPSocketPosix::SetDoNotFragment() { + } + + void UDPSocketPosix::SetMsgConfirm(bool confirm) { +-#if !defined(OS_MACOSX) && !defined(OS_IOS) ++#if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_BSD) + if (confirm) { + sendto_flags_ |= MSG_CONFIRM; + } else { + sendto_flags_ &= ~MSG_CONFIRM; + } +-#endif // !defined(OS_MACOSX) && !defined(OS_IOS) ++#endif // !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_BSD) + } + + int UDPSocketPosix::AllowAddressReuse() { +@@ -653,17 +653,20 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + int value = broadcast ? 1 : 0; + int rv; +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + // SO_REUSEPORT on OSX permits multiple processes to each receive + // UDP multicast or broadcast datagrams destined for the bound + // port. + // This is only being set on OSX because its behavior is platform dependent + // and we are playing it safe by only setting it on platforms where things + // break. ++ rv = setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value)); ++ if (rv != 0) ++ return MapSystemError(errno); + rv = setsockopt(socket_, SOL_SOCKET, SO_REUSEPORT, &value, sizeof(value)); + if (rv != 0) + return MapSystemError(errno); +-#endif // defined(OS_MACOSX) ++#endif // defined(OS_MACOSX) || defined(OS_BSD) + rv = setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, &value, sizeof(value)); + + return rv == 0 ? OK : MapSystemError(errno); +@@ -901,19 +904,24 @@ int UDPSocketPosix::SetMulticastOptions() { if (multicast_interface_ != 0) { switch (addr_family_) { case AF_INET: { --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - ip_mreqn mreq; +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + ip_mreq mreq = {}; + int error = GetIPv4AddressFromIndex(socket_, multicast_interface_, + &mreq.imr_interface.s_addr); + if (error != OK) + return error; +-#else // defined(OS_MACOSX) ++#else // defined(OS_MACOSX) || defined(OS_BSD) + ip_mreqn mreq = {}; mreq.imr_ifindex = multicast_interface_; mreq.imr_address.s_addr = htonl(INADDR_ANY); -@@ -837,7 +837,7 @@ int UDPSocketPosix::JoinGroup(const IPAd +-#endif // !defined(OS_MACOSX) ++#endif // !defined(OS_MACOSX) && !defined(OS_BSD) + int rv = setsockopt(socket_, IPPROTO_IP, IP_MULTICAST_IF, ++#if defined(OS_BSD) ++ reinterpret_cast(&mreq.imr_interface.s_addr), ++ sizeof(mreq.imr_interface.s_addr)); ++#else + reinterpret_cast(&mreq), sizeof(mreq)); ++#endif + if (rv) + return MapSystemError(errno); + break; +@@ -975,7 +983,7 @@ int UDPSocketPosix::JoinGroup(const IPAddress& group_a if (addr_family_ != AF_INET) return ERR_ADDRESS_INVALID; --#if !defined(OS_MACOSX) -+#if !defined(OS_MACOSX) && !defined(OS_BSD) - ip_mreqn mreq; - mreq.imr_ifindex = multicast_interface_; - mreq.imr_address.s_addr = htonl(INADDR_ANY); +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + ip_mreq mreq = {}; + int error = GetIPv4AddressFromIndex(socket_, multicast_interface_, + &mreq.imr_interface.s_addr); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_third__party_quic_platform_impl_quic__ip__address__impl.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_third__party_quic_platform_impl_quic__ip__address__impl.cc @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/net/third_party/quic/platform/impl/quic_ip_address_impl.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/third_party/quic/platform/impl/quic_ip_address_impl.cc +@@ -13,6 +13,7 @@ + #include + #elif defined(OS_POSIX) || defined(OS_FUCHSIA) + #include ++#include + #endif + + using std::string; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_cert__verify__tool_cert__verify__tool.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/net/tools/cert_verify_tool/cert_verify_tool.cc +@@ -26,7 +26,7 @@ + #include "net/url_request/url_request_context_builder.h" + #include "net/url_request/url_request_context_getter.h" + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "net/proxy_resolution/proxy_config.h" + #include "net/proxy_resolution/proxy_config_service_fixed.h" + #endif +@@ -45,7 +45,7 @@ void SetUpOnNetworkThread(std::unique_ptr BuildURLRequestContext( - net::NetLog* net_log) { - net::URLRequestContextBuilder builder; --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - // On Linux, use a fixed ProxyConfigService, since the default one - // depends on glib. - // Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_net_url__request_url__request__context__builder.cc @@ -1,11 +1,11 @@ ---- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/net/url_request/url_request_context_builder.cc -@@ -327,7 +327,7 @@ std::unique_ptr URLRe - if (!proxy_service_) { - // TODO(willchan): Switch to using this code when - // ProxyService::CreateSystemProxyConfigService()'s signature doesn't suck. +@@ -512,7 +512,7 @@ std::unique_ptr URLRequestContextBu + } + + if (!proxy_resolution_service_) { -#if !defined(OS_LINUX) && !defined(OS_ANDROID) +#if !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD) - if (!proxy_config_service_) { - proxy_config_service_ = ProxyService::CreateSystemProxyConfigService( - base::ThreadTaskRunnerHandle::Get().get(), + // TODO(willchan): Switch to using this code when + // ProxyResolutionService::CreateSystemProxyConfigService()'s signature + // doesn't suck. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_pdf_pdfium_pdfium__engine.cc @@ -1,15 +1,24 @@ ---- src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/pdf/pdfium/pdfium_engine.cc -@@ -127,7 +127,7 @@ std::vector GetPageNumbersFrom - return page_numbers; - } +@@ -137,7 +137,7 @@ constexpr bool kIsEditModeTracked = false; + PDFiumEngine* g_engine_for_fontmapper = nullptr; + -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) PP_Instance g_last_instance_id; -@@ -629,7 +629,7 @@ bool InitializeSDK() { +@@ -417,7 +417,7 @@ void Release(FPDF_SYSFONTINFO* sysfontinfo) { + fontinfo_with_metrics->default_sysfontinfo->Release( + fontinfo_with_metrics->default_sysfontinfo); + } +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + + PDFiumEngine::CreateDocumentLoaderFunction + g_create_document_loader_for_testing = nullptr; +@@ -641,7 +641,7 @@ bool InitializeSDK() { config.m_v8EmbedderSlot = gin::kEmbedderPDFium; FPDF_InitLibraryWithConfig(&config); @@ -18,7 +27,7 @@ // Font loading doesn't work in the renderer sandbox in Linux. FPDF_SetSystemFontInfo(&g_font_info); #else -@@ -654,7 +654,7 @@ bool InitializeSDK() { +@@ -666,7 +666,7 @@ bool InitializeSDK() { void ShutdownSDK() { FPDF_DestroyLibrary(); @@ -27,7 +36,7 @@ delete g_font_info; #endif TearDownV8(); -@@ -758,7 +758,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Cl +@@ -690,7 +690,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Client* client, IFSDK_PAUSE::user = nullptr; IFSDK_PAUSE::NeedToPauseNow = Pause_NeedToPauseNow; @@ -36,30 +45,30 @@ // PreviewModeClient does not know its pp::Instance. pp::Instance* instance = client_->GetPluginInstance(); if (instance) -@@ -1510,7 +1510,7 @@ pp::Buffer_Dev PDFiumEngine::PrintPagesA - FPDF_ClosePage(pdf_page); - } +@@ -1147,7 +1147,7 @@ pp::Buffer_Dev PDFiumEngine::PrintPagesAsRasterPDF( + KillFormFocus(); + -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) g_last_instance_id = client_->GetPluginInstance()->pp_instance(); #endif -@@ -2919,7 +2919,7 @@ bool PDFiumEngine::ContinuePaint(int pro - DCHECK_LT(static_cast(progressive_index), progressive_paints_.size()); +@@ -2842,7 +2842,7 @@ bool PDFiumEngine::ContinuePaint(int progressive_index DCHECK(image_data); + last_progressive_start_time_ = base::Time::Now(); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) g_last_instance_id = client_->GetPluginInstance()->pp_instance(); #endif -@@ -3377,7 +3377,7 @@ void PDFiumEngine::SetCurrentPage(int in - FORM_DoPageAAction(old_page, form_, FPDFPAGE_AACTION_CLOSE); +@@ -3320,7 +3320,7 @@ void PDFiumEngine::SetCurrentPage(int index) { + FORM_DoPageAAction(old_page, form(), FPDFPAGE_AACTION_CLOSE); } most_visible_page_ = index; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) - g_last_instance_id = client_->GetPluginInstance()->pp_instance(); + g_last_instance_id = client_->GetPluginInstance()->pp_instance(); #endif if (most_visible_page_ != -1 && called_do_document_action_) { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_proxy_file__io__resource.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_proxy_file__io__resource.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_proxy_file__io__resource.cc @@ -1,13 +1,11 @@ ---- src/3rdparty/chromium/ppapi/proxy/file_io_resource.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/ppapi/proxy/file_io_resource.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/ppapi/proxy/file_io_resource.cc -@@ -285,17 +285,19 @@ int32_t FileIOResource::Write(int64_t of +@@ -285,17 +285,17 @@ int32_t FileIOResource::Write(int64_t offset, if (check_quota_) { int64_t increase = 0; - uint64_t max_offset = 0; + uint64_t _max_offset = 0; -+ // (rene) avoid name collission with /usr/include/vm/vm_map.h on FreeBSD -+ // which also defines max_offset bool append = (open_flags_ & PP_FILEOPENFLAG_APPEND) != 0; if (append) { increase = bytes_to_write; @@ -24,7 +22,7 @@ } if (increase > 0) { -@@ -319,7 +321,7 @@ int32_t FileIOResource::Write(int64_t of +@@ -319,7 +319,7 @@ int32_t FileIOResource::Write(int64_t offset, if (append) append_mode_write_amount_ += bytes_to_write; else @@ -33,7 +31,7 @@ } } return WriteValidated(offset, buffer, bytes_to_write, callback); -@@ -597,9 +599,9 @@ void FileIOResource::OnRequestWriteQuota +@@ -597,9 +597,9 @@ void FileIOResource::OnRequestWriteQuotaComplete( } else { DCHECK_LE(offset + bytes_to_write - max_written_offset_, granted); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_shared__impl_private_net__address__private__impl.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_shared__impl_private_net__address__private__impl.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_shared__impl_private_net__address__private__impl.cc @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/ppapi/shared_impl/private/net_address_private_impl.cc.orig 2017-01-26 00:49:16 UTC +--- src/3rdparty/chromium/ppapi/shared_impl/private/net_address_private_impl.cc.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/ppapi/shared_impl/private/net_address_private_impl.cc -@@ -26,9 +26,12 @@ - #include +@@ -27,6 +27,9 @@ + #include #include #include +#if defined(OS_BSD) @@ -9,8 +9,4 @@ +#endif #endif --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) || defined(OS_BSD) - // This is a bit evil, but it's standard operating procedure for |s6_addr|.... - #define s6_addr16 __u6_addr.__u6_addr16 - #endif + // The net address interface doesn't have a normal C -> C++ thunk since it Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_tests_extensions_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_ppapi_tests_extensions_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/ppapi/tests/extensions/BUILD.gn.orig 2017-01-26 00:49:16 UTC -+++ src/3rdparty/chromium/ppapi/tests/extensions/BUILD.gn -@@ -20,7 +20,7 @@ group("extensions") { - ":ppapi_tests_extensions_popup($newlib)", - ":ppapi_tests_extensions_socket_permissions($newlib)", - ] -- if ((target_cpu == "x86" || target_cpu == "x64") && is_linux && -+ if ((target_cpu == "x86" || target_cpu == "x64") && (is_linux || is_bsd) && - enable_nacl_nonsfi) { - nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi" - data_deps += [ ":ppapi_tests_extensions_packaged_app($nonsfi)" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_printing_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_printing_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_printing_BUILD.gn @@ -1,20 +1,11 @@ ---- src/3rdparty/chromium/printing/BUILD.gn.orig 2017-01-26 00:49:17 UTC +--- src/3rdparty/chromium/printing/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/printing/BUILD.gn -@@ -129,7 +129,7 @@ component("printing") { - if (use_cups) { - configs += [ ":cups" ] - -- if (is_linux) { -+ if (is_linux || is_bsd) { - # rebase_path does not accept an empty string - if (use_sysroot) { - cups_sysroot = rebase_path(sysroot) -@@ -206,7 +206,7 @@ component("printing") { - "printing_context_no_system_dialog.cc", - "printing_context_no_system_dialog.h", +@@ -225,7 +225,7 @@ component("printing") { ] -- } else if (is_linux) { # Non-ChromeOS Linux. -+ } else if (is_linux || is_bsd) { # Non-ChromeOS Linux/BSD. + + deps += [ ":printing_jni_headers" ] +- } else if (is_linux) { # Desktop Linux. ++ } else if (is_linux || is_bsd) { # Desktop Linux. sources += [ "printed_document_linux.cc", "printing_context_linux.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_printing_cups__config__helper.py =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_printing_cups__config__helper.py +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_printing_cups__config__helper.py @@ -1,4 +1,4 @@ ---- src/3rdparty/chromium/printing/cups_config_helper.py.orig 2017-01-26 00:49:17 UTC +--- src/3rdparty/chromium/printing/cups_config_helper.py.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/printing/cups_config_helper.py @@ -65,7 +65,7 @@ def main(): mode = sys.argv[1] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_remoting_host_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_remoting_host_BUILD.gn +++ /dev/null @@ -1,47 +0,0 @@ ---- src/3rdparty/chromium/remoting/host/BUILD.gn.orig 2017-01-26 00:49:17 UTC -+++ src/3rdparty/chromium/remoting/host/BUILD.gn -@@ -326,7 +326,7 @@ static_library("host") { - deps += [ "//components/policy:generated" ] - } - -- if (is_linux && !is_chromeos) { -+ if ((is_linux || is_bsd) && !is_chromeos) { - libs += [ "pam" ] - } - -@@ -349,7 +349,7 @@ static_library("host") { - "input_injector_x11.cc", - "local_input_monitor_x11.cc", - ] -- if (is_linux) { -+ if (is_linux || is_bsd) { - # These will already be filtered out on non-Linux. - sources -= [ - "linux/unicode_to_keysym.cc", -@@ -538,7 +538,7 @@ source_set("unit_tests") { - "touch_injector_win_unittest.cc", - ] - -- if (!use_x11 && is_linux) { -+ if (!use_x11 && (is_linux || is_bsd)) { - sources -= [ "linux/unicode_to_keysym_unittest.cc" ] - } - if (use_ozone || is_chromeos) { -@@ -755,7 +755,7 @@ if (enable_me2me_host) { - deps += [ "//build/config/linux/gtk2" ] - } - } -- if ((is_linux && !is_chromeos) || is_mac) { -+ if ((is_linux && !is_chromeos) || is_mac || is_bsd) { - libs = [ "pam" ] - } - -@@ -825,7 +825,7 @@ if (enable_me2me_host) { - } - } - } -- if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) { -+ if (is_chrome_branded && enable_me2me_host && is_linux && is_bsd && !is_chromeos) { - group("remoting_me2me_host_archive") { - deps = [ - "//remoting/host/installer/linux:remoting_me2me_host_archive", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_BUILD.gn @@ -0,0 +1,31 @@ +--- src/3rdparty/chromium/sandbox/linux/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/sandbox/linux/BUILD.gn +@@ -398,7 +398,7 @@ component("sandbox_services") { + public_deps += [ ":sandbox_services_headers" ] + } + +- if (is_nacl_nonsfi) { ++ if (is_nacl_nonsfi || is_bsd) { + cflags = [ "-fgnu-inline-asm" ] + + sources -= [ +@@ -406,6 +406,8 @@ component("sandbox_services") { + "services/init_process_reaper.h", + "services/scoped_process.cc", + "services/scoped_process.h", ++ "services/syscall_wrappers.cc", ++ "services/syscall_wrappers.h", + "services/yama.cc", + "services/yama.h", + "syscall_broker/broker_channel.cc", +@@ -424,6 +426,10 @@ component("sandbox_services") { + "syscall_broker/broker_process.h", + "syscall_broker/broker_simple_message.cc", + "syscall_broker/broker_simple_message.h", ++ ] ++ sources += [ ++ "services/libc_interceptor.cc", ++ "services/libc_interceptor.h", + ] + } else if (!is_android) { + sources += [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_init__process__reaper.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_init__process__reaper.cc @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/sandbox/linux/services/init_process_reaper.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/sandbox/linux/services/init_process_reaper.cc +@@ -1,6 +1,7 @@ + // 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. ++#if 0 + + #include "sandbox/linux/services/init_process_reaper.h" + +@@ -100,3 +101,4 @@ bool CreateInitProcessReaper(base::OnceClosure post_fo + } + + } // namespace sandbox. ++#endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_linux_services_libc__interceptor.cc @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc +@@ -11,7 +11,9 @@ + #include + #include + #include ++#if !defined(OS_BSD) + #include ++#endif + #include + #include + #include +@@ -94,7 +96,7 @@ bool ReadTimeStruct(base::PickleIterator* iter, + } 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; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_sdch_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_sdch_BUILD.gn +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/sdch/BUILD.gn.orig 2017-01-26 00:49:17 UTC -+++ src/3rdparty/chromium/sdch/BUILD.gn -@@ -11,7 +11,7 @@ config("sdch_config") { - # from a config and can't be on the target directly. - config("sdch_warnings") { - cflags = [] -- if (is_linux) { -+ if (is_linux || is_bsd) { - # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11: - cflags += [ "-Wno-deprecated-declarations" ] - } -@@ -59,7 +59,7 @@ static_library("sdch") { - "//third_party/zlib", - ] - -- if (is_linux || is_android) { -+ if (is_linux || is_bsd || is_android) { - include_dirs = [ "linux" ] - } else if (is_ios) { - include_dirs = [ "ios" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_catalog_public_cpp_manifest__parsing__util.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_catalog_public_cpp_manifest__parsing__util.cc @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/services/catalog/public/cpp/manifest_parsing_util.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/catalog/public/cpp/manifest_parsing_util.cc +@@ -17,7 +17,8 @@ bool IsValidPlatformName(const std::string& name) { + name == Store::kRequiredFilesKey_PlatformValue_Linux || + name == Store::kRequiredFilesKey_PlatformValue_MacOSX || + name == Store::kRequiredFilesKey_PlatformValue_Android || +- name == Store::kRequiredFilesKey_PlatformValue_Fuchsia; ++ name == Store::kRequiredFilesKey_PlatformValue_Fuchsia || ++ name == Store::kRequiredFilesKey_PlatformValue_FreeBSD; + } + + bool IsCurrentPlatform(const std::string& name) { +@@ -31,6 +32,8 @@ bool IsCurrentPlatform(const std::string& name) { + return name == Store::kRequiredFilesKey_PlatformValue_Android; + #elif defined(OS_FUCHSIA) + return name == Store::kRequiredFilesKey_PlatformValue_Fuchsia; ++#elif defined(OS_BSD) ++ return name == Store::kRequiredFilesKey_PlatformValue_FreeBSD; + #else + #error This architecture is not supported. + #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_catalog_store.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_catalog_store.h @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/services/catalog/store.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/catalog/store.h +@@ -36,6 +36,7 @@ class Store { + static const char kRequiredFilesKey_PlatformValue_MacOSX[]; + static const char kRequiredFilesKey_PlatformValue_Android[]; + static const char kRequiredFilesKey_PlatformValue_Fuchsia[]; ++ static const char kRequiredFilesKey_PlatformValue_FreeBSD[]; + }; + + } // namespace catalog Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_catalog_store.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_catalog_store.cc @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/services/catalog/store.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/catalog/store.cc +@@ -36,5 +36,7 @@ const char Store::kRequiredFilesKey_PlatformValue_MacO + const char Store::kRequiredFilesKey_PlatformValue_Android[] = "android"; + // static + const char Store::kRequiredFilesKey_PlatformValue_Fuchsia[] = "fuchsia"; ++// static ++const char Store::kRequiredFilesKey_PlatformValue_FreeBSD[] = "freebsd"; + + } // namespace catalog Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_battery_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_battery_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_battery_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/device/battery/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/battery/BUILD.gn -@@ -47,7 +47,7 @@ if (!is_android) { +--- src/3rdparty/chromium/services/device/battery/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/device/battery/BUILD.gn +@@ -51,7 +51,7 @@ if (!is_android) { ] } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/device/geolocation/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/geolocation/BUILD.gn -@@ -89,7 +89,7 @@ component("geolocation") { +--- src/3rdparty/chromium/services/device/geolocation/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/device/geolocation/BUILD.gn +@@ -92,7 +92,7 @@ source_set("geolocation") { if (is_android) { sources -= [ "wifi_data_provider_common.cc" ] } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_geolocation_location__arbitrator.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/device/geolocation/location_arbitrator.cc +@@ -167,7 +167,7 @@ LocationArbitrator::NewNetworkLocationProvider( + std::unique_ptr + LocationArbitrator::NewSystemLocationProvider() { + #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +- defined(OS_FUCHSIA) ++ defined(OS_FUCHSIA) || defined(OS_BSD) + return nullptr; + #else + return device::NewSystemLocationProvider(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/device/hid/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/hid/BUILD.gn -@@ -56,6 +56,13 @@ source_set("hid") { +--- src/3rdparty/chromium/services/device/hid/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/device/hid/BUILD.gn +@@ -51,6 +51,13 @@ source_set("hid") { deps += [ "//device/udev_linux" ] } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_time__zone__monitor_time__zone__monitor.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/device/time_zone_monitor/time_zone_monitor.cc +@@ -41,7 +41,7 @@ void TimeZoneMonitor::NotifyClients() { + #else + std::unique_ptr new_zone(icu::TimeZone::detectHostTimeZone()); + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // We get here multiple times on Linux per a single tz change, but + // want to update the ICU default zone and notify renderer only once. + std::unique_ptr current_zone(icu::TimeZone::createDefault()); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_BUILD.gn @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/services/network/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/network/BUILD.gn +@@ -160,7 +160,6 @@ component("network_service") { + + if (is_linux) { + deps += [ +- "//sandbox/linux:sandbox_services", + "//services/service_manager/sandbox:sandbox", + ] + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc @@ -0,0 +1,18 @@ +--- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc +@@ -14,6 +14,7 @@ using sandbox::syscall_broker::MakeBrokerCommandSet; + namespace network { + + bool NetworkPreSandboxHook(service_manager::SandboxLinux::Options options) { ++#if !defined(OS_BSD) + auto* instance = service_manager::SandboxLinux::GetInstance(); + + // TODO(tsepez): remove universal permission under filesytem root. +@@ -32,6 +33,7 @@ bool NetworkPreSandboxHook(service_manager::SandboxLin + service_manager::SandboxLinux::PreSandboxHook(), options); + + instance->EngageNamespaceSandbox(false /* from_zygote */); ++#endif + return true; + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_BUILD.gn @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/BUILD.gn +@@ -52,8 +52,12 @@ component("resource_coordinator_cpp") { + set_sources_assignment_filter(sources_assignment_filter) + } + +- if (is_fuchsia) { ++ if (is_fuchsia || is_bsd) { + sources += [ "memory_instrumentation/os_metrics_fuchsia.cc" ] ++ ++ if (is_bsd) { ++ sources -= [ "memory_instrumentation/os_metrics_linux.cc" ] ++ } + } + + defines = [ "SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_IMPLEMENTATION" ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h +@@ -36,7 +36,7 @@ class SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_EXPORT + static std::vector GetProcessModules(base::ProcessId); + #endif + +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + static void SetProcSmapsForTesting(FILE*); + #endif // defined(OS_LINUX) + }; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc @@ -0,0 +1,40 @@ +--- src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc +@@ -16,8 +16,10 @@ + #include "build/build_config.h" + #include "services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h" + ++#if !defined(OS_BSD) + // Symbol with virtual address of the start of ELF header of the current binary. + extern char __ehdr_start; ++#endif + + namespace memory_instrumentation { + +@@ -101,7 +103,7 @@ bool ParseSmapsHeader(const char* header_line, VmRegio + // Build ID is needed to symbolize heap profiles, and is generated only on + // official builds. Build ID is only added for the current library (chrome) + // since it is racy to read other libraries which can be unmapped any time. +-#if defined(OFFICIAL_BUILD) ++#if defined(OFFICIAL_BUILD) && !defined(OS_BSD) + uintptr_t addr = reinterpret_cast(&ParseSmapsHeader); + if (addr >= region->start_address && addr < end_addr) { + base::Optional buildid = +@@ -196,6 +198,9 @@ void OSMetrics::SetProcSmapsForTesting(FILE* f) { + // static + bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, + mojom::RawOSMemDump* dump) { ++#if defined(OS_BSD) ++ return false; ++#else + base::ScopedFD autoclose = OpenStatm(pid); + int statm_fd = autoclose.get(); + +@@ -221,6 +226,7 @@ bool OSMetrics::FillOSMemoryDump(base::ProcessId pid, + dump->resident_set_kb = process_metrics->GetResidentSetSize() / 1024; + + return true; ++#endif + } + + // static Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.h @@ -1,8 +1,8 @@ ---- src/3rdparty/chromium/content/common/set_process_title_linux.h.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/common/set_process_title_linux.h +--- src/3rdparty/chromium/services/service_manager/embedder/set_process_title_linux.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/embedder/set_process_title_linux.h @@ -5,6 +5,9 @@ - #ifndef CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_ - #define CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_ + #ifndef SERVICES_SERVICE_MANAGER_EMBEDDER_SET_PROCESS_TITLE_LINUX_H_ + #define SERVICES_SERVICE_MANAGER_EMBEDDER_SET_PROCESS_TITLE_LINUX_H_ +#include "build/build_config.h" + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.cc @@ -1,5 +1,5 @@ ---- src/3rdparty/chromium/content/common/set_process_title_linux.cc.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/common/set_process_title_linux.cc +--- src/3rdparty/chromium/services/service_manager/embedder/set_process_title_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/embedder/set_process_title_linux.cc @@ -49,6 +49,8 @@ extern char** environ; @@ -9,7 +9,7 @@ static char* g_orig_argv0 = NULL; void setproctitle(const char* fmt, ...) { -@@ -101,6 +103,7 @@ void setproctitle(const char* fmt, ...) +@@ -101,6 +103,7 @@ void setproctitle(const char* fmt, ...) { va_end(ap); g_main_argv[1] = NULL; } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_standalone__service_standalone__service.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_standalone__service_standalone__service.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/service_manager/public/cpp/standalone_service/standalone_service.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/public/cpp/standalone_service/standalone_service.cc +@@ -62,6 +62,8 @@ void RunStandaloneService(const StandaloneServiceCallb + command_line.GetSwitchValueASCII(switches::kServiceSandboxType)), + SandboxLinux::PreSandboxHook(), sandbox_options); + } ++#elif defined(OS_BSD) ++ NOTIMPLEMENTED(); + #endif + + mojo::core::Init(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_runner_host_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_runner_host_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/runner/host/BUILD.gn.orig 2017-01-26 00:49:17 UTC -+++ src/3rdparty/chromium/services/service_manager/runner/host/BUILD.gn -@@ -51,7 +51,7 @@ source_set("child_process_base") { - "//services/service_manager/runner/common", - ] - -- if (is_linux && !is_android) { -+ if (is_linux && !is_android && !is_bsd) { - sources += [ - "linux_sandbox.cc", - "linux_sandbox.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_standalone_context.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_standalone_context.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/services/service_manager/standalone/context.cc.orig 2017-01-26 00:49:17 UTC -+++ src/3rdparty/chromium/services/service_manager/standalone/context.cc -@@ -208,7 +208,7 @@ void Context::Init(std::unique_ptrSetServiceManagerProcessCreationTime( Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_BUILD.gn @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/services/service_manager/zygote/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/zygote/BUILD.gn +@@ -6,7 +6,8 @@ import("//build/buildflag_header.gni") + import("//build/config/nacl/config.gni") + import("//services/service_manager/zygote/common/zygote_features.gni") + +-if (is_linux) { ++# YYY ++if (is_linux || is_bsd) { + component("zygote") { + if (is_nacl_nonsfi) { + # When running the nacl toolchain is_linux is false so *_linux.cc files are Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_common_zygote__features.gni =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_common_zygote__features.gni @@ -0,0 +1,8 @@ +--- src/3rdparty/chromium/services/service_manager/zygote/common/zygote_features.gni.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/zygote/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_handle = is_posix && !is_android && !is_mac ++use_zygote_handle = is_posix && !is_android && !is_mac && !is_bsd Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.h @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.h +@@ -44,8 +44,10 @@ class COMPONENT_EXPORT(SERVICE_MANAGER_ZYGOTE) ZygoteH + base::ScopedFD* control_fd, + base::FileHandleMappingVector additional_remapped_fds); + ++#if !defined(OS_BSD) + void AdjustRendererOOMScore(base::ProcessHandle process_handle, + int score) override; ++#endif + + private: + friend struct base::DefaultSingletonTraits; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_host_zygote__host__impl__linux.cc @@ -0,0 +1,40 @@ +--- src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/zygote/host/zygote_host_impl_linux.cc +@@ -72,6 +72,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInstance() { + } + + void ZygoteHostImpl::Init(const base::CommandLine& command_line) { ++#if !defined(OS_BSD) + if (command_line.HasSwitch(service_manager::switches::kNoSandbox)) { + return; + } +@@ -122,6 +123,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com + "you can try using --" + << service_manager::switches::kNoSandbox << "."; + } ++#endif + } + + void ZygoteHostImpl::AddZygotePid(pid_t pid) { +@@ -146,6 +148,7 @@ pid_t ZygoteHostImpl::LaunchZygote( + base::CommandLine* cmd_line, + base::ScopedFD* control_fd, + base::FileHandleMappingVector additional_remapped_fds) { ++#if !defined(OS_BSD) + int fds[2]; + CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); + CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0])); +@@ -210,9 +213,12 @@ pid_t ZygoteHostImpl::LaunchZygote( + + AddZygotePid(pid); + return pid; ++#else ++ return 0; ++#endif + } + +-#if !defined(OS_OPENBSD) ++#if !defined(OS_BSD) + void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid, + int score) { + // 1) You can't change the oom_score_adj of a non-dumpable process Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__host__linux.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__host__linux.h @@ -0,0 +1,16 @@ +--- src/3rdparty/chromium/services/service_manager/zygote/zygote_host_linux.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/zygote/zygote_host_linux.h +@@ -30,11 +30,13 @@ class ZygoteHost { + // after the first render has been forked. + virtual int GetRendererSandboxStatus() const = 0; + ++#if !defined(OS_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 + }; + + } // namespace service_manager Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__linux.cc @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc +@@ -1,6 +1,7 @@ + // 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. ++#if 0 + + #include "services/service_manager/zygote/zygote_linux.h" + +@@ -664,3 +665,4 @@ bool Zygote::HandleGetSandboxStatus(int fd, base::Pick + } + + } // namespace service_manager ++#endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__main__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_zygote_zygote__main__linux.cc @@ -0,0 +1,48 @@ +--- src/3rdparty/chromium/services/service_manager/zygote/zygote_main_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/zygote/zygote_main_linux.cc +@@ -11,7 +11,9 @@ + #include + #include + #include ++#if !defined(OS_BSD) + #include ++#endif + #include + #include + #include +@@ -101,6 +103,7 @@ static bool CreateInitProcessReaper( + // created through the setuid sandbox. + static bool EnterSuidSandbox(sandbox::SetuidSandboxClient* setuid_sandbox, + base::OnceClosure post_fork_parent_callback) { ++#if !defined(OS_BSD) + DCHECK(setuid_sandbox); + DCHECK(setuid_sandbox->IsSuidSandboxChild()); + +@@ -133,6 +136,9 @@ static bool EnterSuidSandbox(sandbox::SetuidSandboxCli + + CHECK(service_manager::SandboxDebugHandling::SetDumpableStatusAndHandlers()); + return true; ++#else ++ return false; ++#endif + } + + static void DropAllCapabilities(int proc_fd) { +@@ -178,6 +184,7 @@ static void EnterLayerOneSandbox(service_manager::Sand + + bool ZygoteMain( + std::vector> fork_delegates) { ++#if !defined(OS_BSD) + sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD()); + + auto* linux_sandbox = service_manager::SandboxLinux::GetInstance(); +@@ -240,6 +247,9 @@ bool ZygoteMain( + + // This function call can return multiple times, once per fork(). + return zygote.ProcessRequests(); ++#else ++ return false; ++#endif + } + + } // namespace service_manager Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_BUILD.gn @@ -1,18 +1,10 @@ ---- src/3rdparty/chromium/services/ui/BUILD.gn.orig 2017-01-26 00:49:17 UTC +--- src/3rdparty/chromium/services/ui/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/services/ui/BUILD.gn -@@ -13,7 +13,6 @@ group("all") { +@@ -12,7 +12,6 @@ group("all") { testonly = true deps = [ ":ui", - "//services/ui/ime/test_ime_driver", - "//services/ui/test_wm", + "//services/viz", ] } -@@ -38,7 +37,6 @@ service("ui") { - - data_deps = [ - ":manifest", -- "//services/ui/ime/test_ime_driver", - ] - - resources = [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_ime_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_ime_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_ime_BUILD.gn @@ -1,7 +1,7 @@ ---- src/3rdparty/chromium/services/ui/ime/BUILD.gn.orig 2017-01-26 00:49:17 UTC +--- src/3rdparty/chromium/services/ui/ime/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/services/ui/ime/BUILD.gn -@@ -50,7 +50,6 @@ test("mus_ime_unittests") { - ":test_manifest", +@@ -42,7 +42,6 @@ source_set("tests") { + data_deps = [ ":lib", "//services/ui", - "//services/ui/ime/test_ime_driver", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_public_cpp_gles2__context.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_public_cpp_gles2__context.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/services/ui/public/cpp/gles2_context.cc.orig 2017-02-02 02:02:57 UTC -+++ src/3rdparty/chromium/services/ui/public/cpp/gles2_context.cc -@@ -46,7 +46,7 @@ bool GLES2Context::Initialize( - gpu::CommandBuffer* command_buffer = command_buffer_proxy_impl_.get(); - gpu::GpuControl* gpu_control = command_buffer_proxy_impl_.get(); - -- constexpr gpu::SharedMemoryLimits default_limits; -+ constexpr gpu::SharedMemoryLimits default_limits = gpu::SharedMemoryLimits(); - gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer)); - if (!gles2_helper_->Initialize(default_limits.command_buffer_size)) - return false; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_surfaces_surfaces__context__provider.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_services_ui_surfaces_surfaces__context__provider.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/services/ui/surfaces/surfaces_context_provider.cc.orig 2017-02-02 02:02:57 UTC -+++ src/3rdparty/chromium/services/ui/surfaces/surfaces_context_provider.cc -@@ -78,7 +78,7 @@ bool SurfacesContextProvider::BindToCurr - gpu::CommandBuffer* command_buffer = command_buffer_proxy_impl_.get(); - - gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer)); -- constexpr gpu::SharedMemoryLimits default_limits; -+ constexpr gpu::SharedMemoryLimits default_limits = gpu::SharedMemoryLimits(); - if (!gles2_helper_->Initialize(default_limits.command_buffer_size)) - return false; - gles2_helper_->SetAutomaticFlushes(false); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_BUILD.gn @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/skia/BUILD.gn.orig 2017-01-26 00:49:17 UTC +--- src/3rdparty/chromium/skia/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/skia/BUILD.gn -@@ -135,7 +135,7 @@ config("skia_library_config") { +@@ -166,7 +166,7 @@ config("skia_library_config") { } # Settings for text blitting, chosen to approximate the system browser. @@ -9,38 +9,39 @@ defines += [ "SK_GAMMA_EXPONENT=1.2", "SK_GAMMA_CONTRAST=0.2", -@@ -363,7 +363,7 @@ component("skia") { - sources -= [ "//third_party/skia/src/ports/SkFontHost_mac.cpp" ] +@@ -241,7 +241,7 @@ source_set("skcms") { + # LLVM automatically sets the equivalent of GCC's -mfp16-format=ieee on ARM + # builds by default, while GCC itself does not. We need it to enable support + # for half-precision floating point data types used by SKCMS on ARM. +- if (is_linux && !is_clang && current_cpu == "arm") { ++ if ((is_linux || is_bsd) && !is_clang && current_cpu == "arm") { + cflags += [ "-mfp16-format=ieee" ] } -- if (!is_linux) { -+ if (!is_linux && !is_bsd) { - sources -= [ - "//third_party/skia/src/ports/SkFontConfigInterface.cpp", - "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", -@@ -375,14 +375,14 @@ component("skia") { +@@ -456,7 +456,7 @@ component("skia") { + set_sources_assignment_filter(sources_assignment_filter) + } - # Add the files for the SkFontMgr_Android. This is used to emulate android - # fonts on linux. See content/zygote/zygote_main_linux.cc - if (is_linux) { + if (is_linux || is_bsd) { sources += [ - "//third_party/skia/src/ports/SkFontMgr_android.cpp", - "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", + "//third_party/skia/src/ports/SkFontConfigInterface.cpp", + "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", +@@ -465,7 +465,7 @@ component("skia") { ] } -- if (!is_linux && !is_android) { -+ if (!is_linux && !is_bsd && !is_android) { - sources -= [ - "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", - "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", -@@ -421,7 +421,7 @@ component("skia") { - "//base/third_party/dynamic_annotations", - ] +- if (is_linux || is_android || is_fuchsia) { ++ if (is_linux || is_bsd || is_android || is_fuchsia) { + sources += [ + # Retain the files for the SkFontMgr_Android on linux to emulate android + # fonts. See content/zygote/zygote_main_linux.cc +@@ -538,7 +538,7 @@ component("skia") { + ] + } - if (is_linux) { + if (is_linux || is_bsd) { - if (use_pango) { - configs += [ "//build/config/linux/pangocairo" ] - } + deps += [ + "//third_party/expat", + "//third_party/fontconfig", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp @@ -1,20 +1,20 @@ ---- src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp.orig 2017-01-26 00:49:17 UTC +--- src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp -@@ -68,7 +68,7 @@ static void* sk_malloc_nothrow(size_t si - // TODO(b.kelemen): we should always use UncheckedMalloc but currently it - // doesn't work as intended everywhere. - void* result; +@@ -77,7 +77,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 defined(OS_IOS) -+#if defined(OS_IOS) || defined(OS_FREEBSD) ++#if defined(OS_IOS) || defined(OS_BSD) result = malloc(size); #else // It's the responsibility of the caller to check the return value. -@@ -95,7 +95,7 @@ void* sk_calloc(size_t size) { - // TODO(b.kelemen): we should always use UncheckedCalloc but currently it - // doesn't work as intended everywhere. - void* result; +@@ -97,7 +97,7 @@ static void* calloc_nothrow(size_t size) { + // TODO(b.kelemen): we should always use UncheckedCalloc but currently it + // doesn't work as intended everywhere. + void* result; -#if defined(OS_IOS) -+#if defined(OS_IOS) || defined(OS_FREEBSD) ++#if defined(OS_IOS) || defined(OS_BSD) result = calloc(1, size); #else // It's the responsibility of the caller to check the return value. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_testing_gtest_src_gtest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_testing_gtest_src_gtest.cc +++ /dev/null @@ -1,22 +0,0 @@ ---- src/3rdparty/chromium/testing/gtest/src/gtest.cc.orig 2017-01-26 00:50:07 UTC -+++ src/3rdparty/chromium/testing/gtest/src/gtest.cc -@@ -122,6 +122,10 @@ - - #endif // GTEST_OS_LINUX - -+#if GTEST_OS_FREEBSD -+# include -+#endif -+ - #if GTEST_HAS_EXCEPTIONS - # include - #endif -@@ -1930,7 +1934,7 @@ bool String::CaseInsensitiveWideCStringE - - #if GTEST_OS_WINDOWS - return _wcsicmp(lhs, rhs) == 0; --#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID -+#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID && !GTEST_OS_FREEBSD - return wcscasecmp(lhs, rhs) == 0; - #else - // Android, Mac OS X and Cygwin don't define wcscasecmp. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp.orig 2017-01-26 00:49:27 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp -@@ -46,6 +46,8 @@ - - #if OS(WIN) - #include -+#elif OS(FREEBSD) -+#include - #else - #include - #endif Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_core_layout_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_core_layout_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/core/layout/BUILD.gn.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/core/layout/BUILD.gn -@@ -361,7 +361,7 @@ blink_core_sources("layout") { - sources += [ "LayoutThemeFontProviderDefault.cpp" ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources += [ - "LayoutThemeLinux.cpp", - "LayoutThemeLinux.h", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_FontCache.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_FontCache.h +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/FontCache.h.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/FontCache.h -@@ -121,7 +121,7 @@ class PLATFORM_EXPORT FontCache { - #else - static const AtomicString& legacySystemFontFamily(); - #endif --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD) - static void setSystemFontFamily(const AtomicString&); - #endif - -@@ -231,7 +231,7 @@ class PLATFORM_EXPORT FontCache { - const FontFaceCreationParams&, - CString& name); - --#if OS(ANDROID) || OS(LINUX) -+#if OS(ANDROID) || OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) - static AtomicString getFamilyNameForCharacter(SkFontMgr*, - UChar32, - const FontDescription&, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_FontCache.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_FontCache.cpp +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/FontCache.cpp.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/FontCache.cpp -@@ -62,9 +62,9 @@ using namespace WTF; - - namespace blink { - --#if !OS(WIN) && !OS(LINUX) -+#if !OS(WIN) && !OS(LINUX) && !OS(FREEBSD) && !OS(OPENBSD) - FontCache::FontCache() : m_purgePreventCount(0), m_fontManager(nullptr) {} --#endif // !OS(WIN) && !OS(LINUX) -+#endif // !OS(WIN) && !OS(LINUX) && !OS(FREEBSD) && !OS(OPENBSD) - - typedef HashMap, Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_FontPlatformData.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_FontPlatformData.h +++ /dev/null @@ -1,32 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/FontPlatformData.h.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/FontPlatformData.h -@@ -47,9 +47,9 @@ - #include "wtf/text/CString.h" - #include "wtf/text/StringImpl.h" - --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(BSD) - #include "platform/fonts/linux/FontRenderStyle.h" --#endif // OS(LINUX) || OS(ANDROID) -+#endif // OS(LINUX) || OS(ANDROID) || OS(BSD) - - #if OS(MACOSX) - OBJC_CLASS NSFont; -@@ -149,7 +149,7 @@ class PLATFORM_EXPORT FontPlatformData { - PassRefPtr verticalData() const; - PassRefPtr openTypeTable(SkFontTableTag) const; - --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(BSD) - // The returned styles are all actual styles without - // FontRenderStyle::NoPreference. - const FontRenderStyle& getFontRenderStyle() const { return m_style; } -@@ -177,7 +177,7 @@ class PLATFORM_EXPORT FontPlatformData { - FontOrientation m_orientation; - - private: --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(BSD) - FontRenderStyle m_style; - #endif - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp +++ /dev/null @@ -1,47 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp -@@ -99,7 +99,7 @@ FontPlatformData::FontPlatformData(const - m_syntheticBold(source.m_syntheticBold), - m_syntheticItalic(source.m_syntheticItalic), - m_orientation(source.m_orientation), --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(BSD) - m_style(source.m_style), - #endif - m_harfBuzzFace(nullptr), -@@ -122,7 +122,7 @@ FontPlatformData::FontPlatformData(const - m_syntheticBold(src.m_syntheticBold), - m_syntheticItalic(src.m_syntheticItalic), - m_orientation(src.m_orientation), --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(BSD) - m_style(FontRenderStyle::querySystem(m_family, - m_textSize, - m_typeface->style())), -@@ -155,7 +155,7 @@ FontPlatformData::FontPlatformData(sk_sp - m_syntheticBold(syntheticBold), - m_syntheticItalic(syntheticItalic), - m_orientation(orientation), --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) | OS(BSD) - m_style(FontRenderStyle::querySystem(m_family, - m_textSize, - m_typeface->style())), -@@ -200,7 +200,7 @@ const FontPlatformData& FontPlatformData - m_syntheticItalic = other.m_syntheticItalic; - m_harfBuzzFace = nullptr; - m_orientation = other.m_orientation; --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) | OS(BSD) - m_style = other.m_style; - #endif - -@@ -226,7 +226,7 @@ bool FontPlatformData::operator==(const - m_isHashTableDeletedValue == a.m_isHashTableDeletedValue && - m_syntheticBold == a.m_syntheticBold && - m_syntheticItalic == a.m_syntheticItalic --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(BSD) - && m_style == a.m_style - #endif - && m_orientation == a.m_orientation; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp +++ /dev/null @@ -1,29 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp -@@ -50,7 +50,7 @@ namespace blink { - const float smallCapsFontSizeMultiplier = 0.7f; - const float emphasisMarkFontSizeMultiplier = 0.5f; - --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(BSD) - // This is the largest VDMX table which we'll try to load and parse. - static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB - #endif -@@ -105,7 +105,7 @@ void SimpleFontData::platformInit(bool s - int vdmxAscent = 0, vdmxDescent = 0; - bool isVDMXValid = false; - --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(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). -@@ -149,7 +149,7 @@ void SimpleFontData::platformInit(bool s - ascent = SkScalarRoundToScalar(-metrics.fAscent); - descent = SkScalarRoundToScalar(metrics.fDescent); - } --#if OS(LINUX) || OS(ANDROID) -+#if OS(LINUX) || OS(ANDROID) || OS(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 ascent when Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp -@@ -63,7 +63,7 @@ static sk_sp typefaceForFont - - namespace blink { - --#if OS(ANDROID) || OS(LINUX) -+#if OS(ANDROID) || OS(LINUX) || OS(BSD) - // Android special locale for retrieving the color emoji font - // based on the proposed changes in UTR #51 for introducing - // an Emoji script code: -@@ -230,7 +230,7 @@ sk_sp FontCache::createTypef - } - #endif - --#if OS(LINUX) || OS(WIN) -+#if OS(LINUX) || OS(WIN) || OS(BSD) - // On linux if the fontManager has been overridden then we should be calling - // the embedder provided font Manager rather than calling - // SkTypeface::CreateFromName which may redirect the call to the default font Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_heap_GCInfo.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_heap_GCInfo.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/GCInfo.cpp.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/GCInfo.cpp -@@ -7,6 +7,8 @@ - #include "platform/heap/Handle.h" - #include "platform/heap/Heap.h" - -+#include -+ - namespace blink { - - // GCInfo indices start from 1 for heap objects, with 0 being treated Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp -@@ -6,6 +6,8 @@ - - #include "public/platform/Platform.h" - -+#include -+ - #if OS(WIN) - #include - #include Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_web_PopupMenuImpl.cpp =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_web_PopupMenuImpl.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/third_party/WebKit/Source/web/PopupMenuImpl.cpp.orig 2017-01-26 00:49:28 UTC -+++ src/3rdparty/chromium/third_party/WebKit/Source/web/PopupMenuImpl.cpp -@@ -154,7 +154,7 @@ class PopupMenuImpl::ItemIterationContex - m_isInGroup(false), - m_buffer(buffer) { - DCHECK(m_buffer); --#if OS(LINUX) -+#if OS(LINUX) || OS(BSD) - // On other platforms, the