Index: www/qt5-webengine/Makefile =================================================================== --- www/qt5-webengine/Makefile +++ www/qt5-webengine/Makefile @@ -20,7 +20,6 @@ PORTNAME= webengine DISTVERSION= ${QT5_VERSION} -PORTREVISION= 15 CATEGORIES= www PKGNAMEPREFIX= qt5- @@ -30,6 +29,7 @@ BUILD_DEPENDS= bison:devel/bison \ ninja:devel/ninja \ yasm:devel/yasm \ + ${LOCALBASE}/include/linux/input.h:devel/evdev-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ libdbus-1.so:devel/dbus \ @@ -45,10 +45,11 @@ libpng.so:graphics/png \ libre2.so:devel/re2 \ libsnappy.so:archivers/snappy \ + libvpx.so:multimedia/libvpx \ libwebp.so:graphics/webp DISTINFO_FILE= ${.CURDIR}/distinfo -QT5_VERSION= 5.9.5 +QT5_VERSION= 5.12.1 OPTIONS_SINGLE= AUDIO OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO SNDIO @@ -72,8 +73,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= gl 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,8 +84,7 @@ USE_LDCONFIG= ${QT_LIBDIR} - -QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg +QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg -disable-webrtc # 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. 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 = 1549725518 +SHA256 (KDE/Qt/5.12.1/qtwebengine-everywhere-src-5.12.1.tar.xz) = 43e91e06bc4a60ef0f91d15ae06425cf9c6b4f7dafe960259a5b013c687c3bd0 +SIZE (KDE/Qt/5.12.1/qtwebengine-everywhere-src-5.12.1.tar.xz) = 249191844 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,11 @@ -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-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-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,17 @@ 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 2019-01-16 22:42:58 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 @@ - } +@@ -82,6 +82,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 @@ +@@ -101,6 +102,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,174 +1,87 @@ ---- 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 @@ - ] - } - -- if (!is_ios && !is_android && !is_chromecast) { -+ if (!is_ios && !is_android && !is_bsd && !is_chromecast) { - 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" ] +--- src/3rdparty/chromium/BUILD.gn.orig 2019-01-16 10:59:47 UTC ++++ src/3rdparty/chromium/BUILD.gn +@@ -356,7 +356,7 @@ group("gn_all") { + [ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ] } -@@ -504,18 +504,23 @@ - ] - } - -- if (is_linux) { -- # The following are definitely linux-only. -+ if (is_linux || is_bsd) { -+ # The following are definitely? linux-only. - deps += [ - "//chrome:manpage", - "//chrome:xdg_mime", +- if (is_linux || is_android) { ++ if ((is_linux && !is_bsd) || is_android) { + deps += [ + "//third_party/breakpad:breakpad_unittests", + "//third_party/breakpad:core-2-minidump", +@@ -398,8 +398,6 @@ group("gn_all") { "//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 @@ - } - } - -- if (is_ios || is_win || (is_linux && !is_chromeos)) { -+ if (is_ios || is_win || is_bsd || (is_linux && !is_chromeos)) { - deps += [ - "//base:base_i18n_perftests", - "//base:base_perftests", -@@ -612,7 +617,7 @@ - if (enable_nacl) { - deps += [ "//components/nacl/loader:nacl_loader_unittests" ] - -- if (is_linux) { -+ if (is_linux || is_bsd) { - # 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" ] - } -- } else if (!is_android && !is_ios) { -+ } else if (!is_android && !is_ios && !is_bsd) { - deps += [ "//breakpad:symupload($host_toolchain)" ] - } - -@@ -787,7 +792,7 @@ - } - } - -- if (is_linux && !is_chromeos && !is_chromecast) { -+ if ((is_linux || is_bsd) && !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 @@ +@@ -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", +@@ -527,10 +521,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 (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 (!is_android) { +@@ -607,7 +597,7 @@ group("gn_all") { + host_os == "win" && !use_qt) { + deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] + } +- } else if (!is_android && !is_ios && !is_fuchsia) { ++ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { + deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] + } + +@@ -833,7 +823,6 @@ if (is_chromeos) { + "//ppapi/examples/video_decode", + "//sandbox/linux:chrome_sandbox", + "//sandbox/linux:sandbox_linux_unittests", +- "//third_party/breakpad:minidump_stackwalk($host_toolchain)", + + # Blocked on https://github.com/catapult-project/catapult/issues/2297 + #"//third_party/catapult/telemetry:bitmaptools", +@@ -956,7 +945,7 @@ if (!is_ios && !use_qt) { ] } -- 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)) { -+ (use_libfuzzer && is_mac) || is_bsd) { - deps += [ - "//testing/libfuzzer/fuzzers", - "//testing/libfuzzer/tests:libfuzzer_tests", -@@ -904,7 +909,7 @@ - - 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 @@ - } - } - --if (!is_ios) { -+if (!is_ios || !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" ] - } - 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)" ] +@@ -965,7 +954,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 @@ - group("chromium_builder_perf") { - testonly = true - -- if (!is_ios && !is_android && !is_chromecast) { -+ if (!is_ios && !is_android && !is_chromecast && !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", - ] +@@ -1090,9 +1079,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,25 +1,45 @@ ---- 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" ] +@@ -1248,8 +1248,8 @@ jumbo_component("base") { + # Needed for if using newer C++ library than sysroot, except if + # building inside the cros_sdk environment - use host_toolchain as a + # more robust check for this. +- if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt)) && +- host_toolchain != "//build/toolchain/cros:host") { ++ if (!use_sysroot && (is_android || (is_linux && !is_chromecast && !use_qt) && !is_clang && ++ host_toolchain != "//build/toolchain/cros:host")) { + libs += [ "atomic" ] + } + +@@ -1274,7 +1274,7 @@ jumbo_component("base") { + "allocator/allocator_shim_override_glibc_weak_symbols.h", + ] + deps += [ "//base/allocator:tcmalloc" ] +- } else if (is_linux && use_allocator == "none") { ++ } else if ((is_linux && !is_bsd) && use_allocator == "none") { + sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] + } else if (is_android && use_allocator == "none") { + sources += [ +@@ -1704,6 +1704,33 @@ 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", @@ -31,53 +51,19 @@ + ] + } + -+ -+ - # 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 +2720,12 @@ test("base_unittests") { + ] set_sources_assignment_filter(sources_assignment_filter) } - ++ + 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 +++ /dev/null @@ -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" - --#include - #include - #include - -@@ -193,11 +192,13 @@ TEST_F(AllocatorShimTest, InterceptLibcS - ASSERT_GE(zero_allocs_intercepted_by_size[2 * 23], 1u); +@@ -294,7 +294,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { + ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u); + #endif // !OS_WIN - #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 - 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); +@@ -307,7 +307,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { 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 && !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 && !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_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_files_file__path__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_file__path__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 -@@ -1133,7 +1133,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_ - "\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" }, - }; - --#if !defined(SYSTEM_NATIVE_UTF8) && defined(OS_LINUX) -+#if !defined(SYSTEM_NATIVE_UTF8) && (defined(OS_LINUX) || defined(OS_BSD)) - ScopedLocale locale("en_US.UTF-8"); - #endif - 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_AIX) || defined(OS_BSD) // Broad categories of file systems as returned by statfs() on Linux. enum FileSystemType { FILE_SYSTEM_UNKNOWN, // statfs failed. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_memory__mapped__file__posix.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_files_memory__mapped__file__posix.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/base/files/memory_mapped_file_posix.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/files/memory_mapped_file_posix.cc +@@ -110,6 +110,8 @@ bool MemoryMappedFile::MapFileRegionToMemory( + // Only Android API>=21 supports the fallocate call. Older versions need + // to manually extend the file by writing zeros at block intervals. + do_manual_extension = true; ++#elif defined(OS_BSD) ++ do_manual_extension = true; + #elif defined(OS_MACOSX) + // MacOS doesn't support fallocate even though their new APFS filesystem + // does support sparse files. It does, however, have the functionality 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_logging__unittest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_logging__unittest.cc @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/base/logging_unittest.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/base/logging_unittest.cc +@@ -420,10 +420,10 @@ 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); ++ struct ucontext_t* context = reinterpret_cast(context_ptr); + #if defined(ARCH_CPU_X86) + crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); + #elif defined(ARCH_CPU_X86_64) 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,49 @@ +--- 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]; +@@ -180,9 +191,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd, + // 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_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_ANDROID) || defined(OS_AIX) || defined(OS_BSD) 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 +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/base/process/memory_stubs.cc.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/base/process/memory_stubs.cc -@@ -31,6 +31,8 @@ void TerminateBecauseOutOfMemory(size_t - // their respective stdlib function since those functions will return null on a - // failure to allocate. - -+#if !defined(OS_FREEBSD) -+// FreeBSD brings it's own implementation in memory.cc -- cmt - bool UncheckedMalloc(size_t size, void** result) { - *result = malloc(size); - return *result != nullptr; -@@ -40,5 +42,6 @@ bool UncheckedCalloc(size_t num_items, s - *result = calloc(num_items, size); - return *result != nullptr; - } -+#endif - - } // namespace base 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" @@ -26,12 +26,12 @@ + 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,16 @@ #include "base/logging.h" #include "base/macros.h" #include "base/strings/string_split.h" -@@ -72,19 +76,13 @@ bool ProcessIterator::CheckForNextProces +@@ -40,7 +44,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* + num_of_kinfo_proc += 16; + kinfo_procs_.resize(num_of_kinfo_proc); + len = num_of_kinfo_proc * sizeof(struct kinfo_proc); +- if (sysctl(mib, arraysize(mib), &kinfo_procs_[0], &len, NULL, 0) <0) { ++ if (sysctl(mib, arraysize(mib), kinfo_procs_.data(), &len, NULL, 0) <0) { + // If we get a mem error, it just means we need a bigger buffer, so + // loop around again. Anything else is a real error and give up. + if (errno != ENOMEM) { +@@ -72,19 +76,13 @@ bool ProcessIterator::CheckForNextProcess() { 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" - -+#if defined(OS_BSD) -+#include -+#include -+#include -+#endif -+ +@@ -41,7 +41,7 @@ namespace base { + // Full declaration is in process_metrics_iocounters.h. + struct IoCounters; + +-#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_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_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_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) - // Get the number of threads of |process| as available in /proc//stat. - // This should be used with care as no synchronization with running threads is - // done. This is mostly useful to guarantee being single-threaded. - // Returns 0 on failure. - BASE_EXPORT int GetNumberOfThreads(ProcessHandle process); -+#endif - -+#if defined(OS_LINUX) || defined(OS_ANDROID) - // /proc/self/exe refers to the current executable. - BASE_EXPORT extern const char kProcSelfExe[]; + #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,20 @@ +--- 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_FREEBSD) ++#include + #else + #include + #endif +@@ -107,7 +109,7 @@ size_t ProcessMetrics::GetMallocUsage() { + #else + return minfo.hblkhd + minfo.arena; + #endif +-#elif defined(OS_FUCHSIA) ++#elif defined(OS_FUCHSIA) || defined(OS_BSD) + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #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 +++ /dev/null @@ -1,90 +0,0 @@ ---- src/3rdparty/chromium/base/process/process_posix.cc.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/base/process/process_posix.cc -@@ -21,8 +21,18 @@ - #include - #endif - -+#if defined(OS_BSD) -+#include -+#include -+#include -+#include -+#endif -+ - namespace { - -+const int kBackgroundPriority = 5; -+const int kForegroundPriority = 0; -+ - #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) { --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) || defined(OS_BSD) - // On Mac we can wait on non child processes. -- return WaitForSingleNonChildProcess(handle, timeout); -+ /* return WaitForSingleNonChildProcess(handle, timeout); */ - #else - // Currently on Linux we can't handle non child processes. - NOTIMPLEMENTED(); --#endif // OS_MACOSX -+#endif // OS_MACOSX || OS_BSD - } - - int status; -@@ -257,12 +267,16 @@ Process Process::DeprecatedGetProcessFro - return Process(handle); - } - --#if !defined(OS_LINUX) && !defined(OS_MACOSX) -+#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD) - // static - bool Process::CanBackgroundProcesses() { - return false; - } --#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) -+#elif defined(OS_FREEBSD) -+bool Process::CanBackgroundProcesses() { -+ return true; -+} -+#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD) - - bool Process::IsValid() const { - return process_ != kNullProcessHandle; -@@ -365,15 +379,32 @@ bool Process::WaitForExitWithTimeout(Tim - bool Process::IsProcessBackgrounded() const { - // See SetProcessBackgrounded(). - DCHECK(IsValid()); -+#if defined(OS_FREEBSD) -+ return true; -+#else - return false; -+#endif - } - - 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 -+ DCHECK(IsValid()); -+ -+ if (!CanBackgroundProcesses()) -+ return false; -+ -+ int priority = value ? 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) - 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); @@ -34,19 +13,41 @@ + if(r == 0) + r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); + if(r == 0) -+ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if (r == -1) { ++ r =sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); ++ if(r == -1) { 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/base/test/BUILD.gn.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/base/test/BUILD.gn -@@ -303,7 +303,7 @@ static_library("run_all_base_unittests") - ] - } - --if (is_linux) { -+if (is_linux || is_bsd) { - shared_library("malloc_wrapper") { - testonly = true - sources = [ 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__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,12 @@ #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) - } - --#if !defined(OS_NACL) -+#if !defined(OS_NACL) && !defined(OS_BSD) - // static - void PlatformThread::SetThreadPriority(PlatformThreadId thread_id, - ThreadPriority priority) { 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 =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_base_trace__event_process__memory__dump.h @@ -0,0 +1,11 @@ +--- 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 +@@ -22,7 +22,7 @@ + + // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the + // resident memory. +-#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 +++ /dev/null @@ -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,22 @@ # 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") { +@@ -273,9 +273,7 @@ config("default_libs") { ] - } else if (is_ios) { - configs += [ "//build/config/ios:ios_dynamic_flags" ] -- } else if (is_linux || is_android) { -+ } else if (is_linux || is_android || is_bsd) { + } else if (is_linux) { + libs = [ +- "dl", + "pthread", +- "rt", + ] + } + } +@@ -331,7 +329,7 @@ config("executable_config") { + "//build/config/ios:ios_dynamic_flags", + "//build/config/ios:ios_executable_flags", + ] +- } else if (is_linux || is_android || current_os == "aix") { ++ } else if (is_linux || is_bsd || is_android || current_os == "aix") { configs += [ "//build/config/gcc:executable_ldconfig" ] if (is_android) { configs += [ "//build/config/android:executable_config" ] 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,19 @@ ---- 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,10 @@ declare_args() { + is_official_build = false # Whether we're a traditional desktop unix. - is_desktop_linux = current_os == "linux" + is_desktop_linux = current_os == "linux" || current_os == "bsd" - # 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 +191,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 +24,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 +232,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 +306,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = false + is_win = true ++ is_bsd = false + } else if (current_os == "mac") { + is_aix = false + is_android = false +@@ -317,6 +318,7 @@ if (current_os == "win" || current_os == "winuwp") { is_nacl = false is_posix = true is_win = false ++ is_bsd = false + } else if (current_os == "android") { + is_aix = false + is_android = true +@@ -328,6 +330,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "chromeos") { + is_aix = false + is_android = false +@@ -339,6 +342,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "nacl") { + # current_os == "nacl" will be passed by the nacl toolchain definition. + # It is not set by default or on the command line. We treat is as a +@@ -353,6 +357,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = true + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "fuchsia") { + is_aix = false + is_android = false +@@ -364,6 +369,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = false + is_win = false ++ is_bsd = false + } else if (current_os == "ios") { + is_aix = false + is_android = false +@@ -375,6 +381,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "linux") { + is_aix = false + is_android = false +@@ -386,6 +393,7 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false + } else if (current_os == "aix") { + is_aix = true + is_android = false +@@ -397,6 +405,19 @@ if (current_os == "win" || current_os == "winuwp") { + is_nacl = false + is_posix = true + is_win = false ++ is_bsd = false +} else if (current_os == "bsd") { ++ is_aix = false + is_android = false + is_chromeos = false ++ is_fuchsia = false + is_ios = false -+ is_linux = false -+ is_bsd = true ++ is_linux = 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 +480,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 +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/build/config/clang/BUILD.gn.orig 2017-01-26 00:49:07 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", - ] - -- if ((is_linux || is_android) && !is_chromecast) { -+ if ((is_linux || is_bsd || is_android) && !is_chromecast) { - 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,123 +1,65 @@ ---- 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") { - configs += [ "//build/config/win:compiler" ] - } else if (is_android) { - configs += [ "//build/config/android:compiler" ] -- } else if (is_linux) { -+ } else if (is_linux || is_bsd) { - configs += [ "//build/config/linux:compiler" ] - } else if (is_nacl) { - configs += [ "//build/config/nacl:compiler" ] -@@ -290,7 +290,7 @@ config("compiler") { - - # Linux/Android 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=." ] +@@ -55,7 +55,7 @@ declare_args() { + # only two architectures that are currently checked in). Turn this off when + # you are using a custom toolchain and need to control -B in cflags. + linux_use_bundled_binutils = +- linux_use_bundled_binutils_override && is_linux && ++ linux_use_bundled_binutils_override && (is_linux && !is_bsd) && + (current_cpu == "x64" || current_cpu == "x86") + binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", + root_build_dir) +@@ -269,7 +269,7 @@ config("compiler") { + # Linker warnings. + if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && + !(is_android && use_order_profiling) && !is_mac && !is_ios && +- current_os != "aix") { ++ current_os != "aix" && !is_bsd) { + # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 + # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 + # crbug.com/485542 +@@ -507,7 +507,7 @@ config("compiler") { } - # 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") { + if (is_clang && !is_nacl && current_toolchain == host_toolchain && +- target_os != "chromeos" && !use_qt) { ++ target_os != "chromeos" && !is_bsd && !use_qt) { + cflags += [ + # TODO(hans): Remove this once Clang generates better optimized debug info + # by default. https://crbug.com/765793 +@@ -761,7 +761,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) { +- if (is_clang && !is_android && !is_nacl && !is_fuchsia) { ++ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } -@@ -758,7 +758,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") { -- if (is_clang && current_cpu == "x86" && is_linux) { -+ if (is_clang && current_cpu == "x86" && (is_linux || is_bsd)) { - cflags = [ - # Align the stack on 16-byte boundaries, http://crbug.com/418554. - "-mstack-alignment=16", -@@ -804,7 +804,7 @@ config("runtime_library") { - # smaller. - if (is_win) { - configs += [ "//build/config/win:runtime_library" ] -- } else if (is_linux) { -+ } else if (is_linux || is_bsd) { - 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") { - ] +@@ -1681,7 +1681,7 @@ config("thin_archive") { + # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't + # have a "thin archive" mode (it does accept -T, but it means truncating + # archive names to 16 characters, which is not what we want). +- if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { ++ if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) { + arflags = [ "-T" ] } - -- 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", + } +@@ -2216,7 +2216,7 @@ config("symbols") { + # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f + cflags += [ "-gdwarf-3" ] + } +- cflags += [ "-g2" ] ++ cflags += [ "-g0" ] + } + if (use_debug_fission && !is_nacl && !is_android) { + # NOTE: Some Chrome OS builds globally set |use_debug_fission| to true, +@@ -2236,7 +2236,7 @@ config("symbols") { + # DWARF info may be corrupt; offsets in a range list entry are in different + # sections" there. Maybe just a bug in nacl_switch_32.S. + if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" && +- (use_gold || use_lld)) { ++ (use_gold || use_lld) && !is_bsd) { + if (is_clang) { + # This flag enables the GNU-format pubnames and pubtypes sections, + # which lld needs in order to generate a correct GDB index. 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 +++ /dev/null @@ -1,9 +0,0 @@ ---- src/3rdparty/chromium/build/config/crypto.gni.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/build/config/crypto.gni -@@ -21,5 +21,5 @@ declare_args() { - - # 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 - } 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,11 @@ ---- 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() { - # 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 +@@ -46,7 +46,7 @@ declare_args() { + fieldtrial_testing_like_official_build = is_chrome_branded - # 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 + # libudev usage. This currently only affects the content layer. +- use_udev = is_linux && !is_chromecast ++ use_udev = is_linux && !is_chromecast && !is_bsd -- use_gio = is_linux && !is_chromeos && !is_chromecast -+ use_gio = (is_linux || is_bsd) && !is_chromeos && !is_chromecast + use_dbus = is_linux && !is_chromecast - # Whether or not to use external popup menu. - use_external_popup_menu = is_android || is_mac Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_linux_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/build/config/linux/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/build/config/linux/BUILD.gn +@@ -28,7 +28,7 @@ config("runtime_library") { + } + + if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") && +- (!use_custom_libcxx || current_cpu == "mipsel") && !use_qt) { ++ (!use_custom_libcxx || current_cpu == "mipsel") && !use_qt && !is_bsd) { + libs = [ "atomic" ] + } + } 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 -@@ -4,7 +4,7 @@ - - import("//build/config/linux/pkg_config.gni") - --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. - # 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 -@@ -4,7 +4,7 @@ - - import("//build/config/linux/pkg_config.gni") - --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/gtk3 to use GTKv3. - # 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 +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/build/config/sanitizers/BUILD.gn.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/build/config/sanitizers/BUILD.gn -@@ -405,7 +405,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") { - - 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 = [ 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 +++ /dev/null @@ -1,14 +0,0 @@ ---- src/3rdparty/chromium/build/config/sanitizers/sanitizers.gni.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/build/config/sanitizers/sanitizers.gni -@@ -54,8 +54,9 @@ 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_cfi = (target_os == "linux" || target_os == "bsd") && !is_chromeos && -+ target_cpu == "x64" && is_chrome_branded && is_official_build && -+ allow_posix_link_time_opt - - # 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_sysroot.gni =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_sysroot.gni @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/build/config/sysroot.gni.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/build/config/sysroot.gni +@@ -15,9 +15,10 @@ declare_args() { + # The absolute path to directory containing linux sysroot images + target_sysroot_dir = "//build/linux" + +- use_sysroot = current_cpu == "x86" || current_cpu == "x64" || ++ use_sysroot = !is_bsd && ( ++ current_cpu == "x86" || current_cpu == "x64" || + current_cpu == "arm" || current_cpu == "arm64" || +- current_cpu == "mipsel" || current_cpu == "mips64el" ++ current_cpu == "mipsel" || current_cpu == "mips64el") + } + + if (current_os == target_os && current_cpu == target_cpu && 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 +++ /dev/null @@ -1,29 +0,0 @@ ---- src/3rdparty/chromium/build/config/ui.gni -+++ src/3rdparty/chromium/build/config/ui.gni -@@ -32,7 +32,7 @@ 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 - - # True means the UI is built using the "views" framework. - toolkit_views = -@@ -48,7 +48,7 @@ declare_args() { - use_xkbcommon = false - - # Whether we should use glib, a low level C utility library. -- use_glib = is_linux -+ use_glib = is_linux || is_bsd - - # 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 GTK. - use_gtk = use_x11 && !use_qt 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_chrome.map =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_chrome.map @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/build/linux/chrome.map.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/build/linux/chrome.map +@@ -20,6 +20,10 @@ global: + # Program entry point. + _start; + ++ # FreeBSD specific variables. ++ __progname; ++ environ; ++ + # Memory allocation symbols. We want chrome and any libraries to + # share the same heap, so it is correct to export these symbols. + calloc; +@@ -81,7 +85,4 @@ global: + localtime64; + localtime64_r; + localtime_r; +- +-local: +- *; + }; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_unbundle_libusb.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_unbundle_libusb.gn @@ -0,0 +1,27 @@ +--- src/3rdparty/chromium/build/linux/unbundle/libusb.gn.orig 2019-01-11 07:56:52 UTC ++++ src/3rdparty/chromium/build/linux/unbundle/libusb.gn +@@ -0,0 +1,24 @@ ++# Copyright 2016 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/linux/pkg_config.gni") ++import("//build/shim_headers.gni") ++ ++pkg_config("system_libusb") { ++ packages = [ "libusb-1.0" ] ++} ++ ++shim_headers("libusb_shim") { ++ root_path = "src/libusb" ++ headers = [ ++ "libusb.h", ++ ] ++} ++ ++source_set("libusb") { ++ deps = [ ++ ":libusb_shim", ++ ] ++ public_configs = [ ":system_libusb" ] ++} 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_linux_unbundle_replace__gn__files.py =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_build_linux_unbundle_replace__gn__files.py @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/build/linux/unbundle/replace_gn_files.py.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/build/linux/unbundle/replace_gn_files.py +@@ -27,6 +27,7 @@ REPLACEMENTS = { + 'libevent': 'base/third_party/libevent/BUILD.gn', + 'libjpeg': 'third_party/libjpeg.gni', + 'libpng': 'third_party/libpng/BUILD.gn', ++ 'libusb': 'third_party/libusb/BUILD.gn', + 'libvpx': 'third_party/libvpx/BUILD.gn', + 'libwebp': 'third_party/libwebp/BUILD.gn', + 'libxml': 'third_party/libxml/BUILD.gn', Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_build_secondary_third__party_nss_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_build_secondary_third__party_nss_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn.orig 2017-01-26 00:49:07 UTC -+++ src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn -@@ -4,7 +4,7 @@ - - import("//build/config/linux/pkg_config.gni") - --if (is_linux) { -+if (is_linux || is_bsd) { - # This is a dependency on NSS with no libssl. On Linux we use a built-in SSL - # library but the system NSS libraries. Non-Linux platforms using NSS use the - # hermetic one in //third_party/nss. 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_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,24 +1,10 @@ ---- 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 @@ - import("//build/toolchain/gcc_toolchain.gni") - - clang_toolchain("clang_arm") { -- toolprefix = "arm-linux-gnueabihf-" -+ if (!is_bsd) { -+ toolprefix = "arm-linux-gnueabihf-" -+ } - toolchain_args = { - current_cpu = "arm" - current_os = "linux" -@@ -14,7 +16,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 +@@ -14,7 +14,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,11 @@ +--- 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", + ] Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_BUILD.gn +++ /dev/null @@ -1,29 +0,0 @@ ---- src/3rdparty/chromium/chrome/BUILD.gn.orig 2017-01-26 00:49:07 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" ] - } - -- 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 - } - } - --if (is_linux) { -+if (is_linux || is_bsd) { - action("manpage") { - if (is_chrome_branded) { - name = "Google 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,11 +1,11 @@ ---- 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 - -+ ++ 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. 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 - -@@ -10334,7 +10334,7 @@ I don't think this site should be blocke - - Appearance - -- -+ - - Themes +@@ -5208,7 +5208,7 @@ the Bookmarks menu."> -@@ -10342,7 +10342,7 @@ I don't think this site should be blocke - - Reset to default theme + + +- ++ + + + Hold |$1Ctrl|+|$2Shift|+|$3Q| to exit +@@ -6064,7 +6064,7 @@ the Bookmarks menu."> + Google Pay + - -+ - - 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 +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/chrome/browser/BUILD.gn.orig 2017-01-26 00:49:08 UTC -+++ src/3rdparty/chromium/chrome/browser/BUILD.gn -@@ -2142,7 +2142,7 @@ split_static_library("browser") { - deps += [ "//device/udev_linux" ] - } - -- 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" ] - if (use_dbus) { 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,16 +1,7 @@ ---- 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" ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - deps += [ "//build/linux:fontconfig" ] - - if (use_dbus) { -@@ -1115,6 +1115,12 @@ static_library("extensions") { - defines += [ "ENABLE_HOTWORDING" ] +@@ -1133,6 +1133,12 @@ jumbo_static_library("extensions") { + deps += [ "//chrome/common:service_process_mojom" ] } + if (is_bsd) { @@ -21,4 +12,4 @@ + if (enable_service_discovery) { sources += [ - "api/gcd_private/gcd_private_api.cc", + "api/mdns/mdns_api.cc", 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_messaging_message__service.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_browser_extensions_api_messaging_message__service.cc +++ /dev/null @@ -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 +++ /dev/null @@ -1,66 +0,0 @@ ---- 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 -@@ -4,6 +4,10 @@ - - #include "chrome/browser/extensions/api/music_manager_private/device_id.h" - -+#if defined(OS_FREEBSD) -+#include -+#include -+#endif - #include - #include - #include -@@ -105,11 +109,33 @@ class MacAddressProcessor { - const char* const prefixes[], - size_t prefixes_count) { - const int MAC_LENGTH = 6; -+#if defined(OS_FREEBSD) -+ struct ifaddrs *ifap, *ifinfo; -+#else - struct ifreq ifinfo; -+#endif - - memset(&ifinfo, 0, sizeof(ifinfo)); -- strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1); - -+#if defined(OS_FREEBSD) -+ int result = getifaddrs(&ifap); -+ if (result != 0) -+ return true; -+ result = 1; // no MAC found yet -+ for (ifinfo = ifap; ifinfo != NULL; ifinfo = ifinfo->ifa_next) { -+ struct sockaddr* sa = ifinfo->ifa_addr; -+ if (sa->sa_family == AF_LINK && -+ !strncmp(ifinfo->ifa_name, ifaddr->ifa_name, -+ sizeof(ifinfo->ifa_name) - 1)) { -+ result = 0; -+ break; -+ } -+ } -+ -+ char mac_address[6]; -+ strncpy(mac_address, (const char*)LLADDR((struct sockaddr_dl*)ifinfo->ifa_addr), sizeof(mac_address)); -+#else -+ strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1); - int sd = socket(AF_INET, SOCK_DGRAM, 0); - int result = ioctl(sd, SIOCGIFHWADDR, &ifinfo); - close(sd); -@@ -119,11 +145,17 @@ class MacAddressProcessor { - - const char* mac_address = - static_cast(ifinfo.ifr_hwaddr.sa_data); -+#endif - if (!is_valid_mac_address_.Run(mac_address, MAC_LENGTH)) - return true; - -+#if defined(OS_FREEBSD) -+ if (!IsValidPrefix(ifinfo->ifa_name, prefixes, prefixes_count)) -+ return true; -+#else - if (!IsValidPrefix(ifinfo.ifr_name, prefixes, prefixes_count)) - return true; -+#endif - - // Got one! - found_mac_address_ = 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 -@@ -29,6 +29,8 @@ action("make_file_types_protobuf") { - target_arch = "mac" - } else if (is_linux) { - target_arch = "linux" -+ } else if (is_bsd) { -+ target_arch = "bsd" - } else { - # This will cause the script to fail. - target_arch = "unknown_target_arch" 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chrome/browser/ui/BUILD.gn.orig 2017-01-26 00:49:09 UTC -+++ src/3rdparty/chromium/chrome/browser/ui/BUILD.gn -@@ -3090,7 +3090,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", 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 -@@ -2,7 +2,7 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - --assert(is_linux, "This file should only be referenced on Linux") -+assert(is_linux || is_bsd, "This file should only be referenced on Linux") - - import("//build/config/features.gni") - import("//build/config/ui.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,14 +1,11 @@ ---- 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,10 @@ static_library("common") { public_deps += [ "//ppapi/shared_impl" ] } + if (is_bsd) { -+ sources -= [ -+ "component_flash_hint_file_linux.cc", -+ "component_flash_hint_file_linux.h", -+ ] ++ sources -= [ "component_flash_hint_file_linux.cc" ] + } + if (enable_extensions) { 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.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_chrome_common_webui__url__constants.h @@ -0,0 +1,25 @@ +--- src/3rdparty/chromium/chrome/common/webui_url_constants.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/chrome/common/webui_url_constants.h +@@ -232,7 +232,7 @@ extern const char kChromeUICastHost[]; + extern const char kChromeUICastURL[]; + #endif + +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + extern const char kChromeUIDiscardsHost[]; + extern const char kChromeUIDiscardsURL[]; + #endif +@@ -241,11 +241,11 @@ extern const char kChromeUIDiscardsURL[]; + extern const char kChromeUILinuxProxyConfigHost[]; + #endif + +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + extern const char kChromeUISandboxHost[]; + #endif + +-#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) ++#if ((defined(OS_BSD) || defined(OS_LINUX)) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) + extern const char kChromeUITabModalConfirmDialogHost[]; + #endif + 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chromecast/BUILD.gn.orig 2017-01-26 00:49:11 UTC -+++ src/3rdparty/chromium/chromecast/BUILD.gn -@@ -51,7 +51,7 @@ cast_test_group("cast_tests") { - tests += [ "//gpu:gpu_unittests" ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - tests += [ "//chromecast/crash:cast_crash_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 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chromecast/browser/BUILD.gn.orig 2017-01-26 00:49:11 UTC -+++ src/3rdparty/chromium/chromecast/browser/BUILD.gn -@@ -120,7 +120,7 @@ source_set("browser") { - "//ui/gl", - ] - -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources += [ - "cast_memory_pressure_monitor.cc", - "cast_memory_pressure_monitor.h", 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chromecast/browser/metrics/BUILD.gn.orig 2017-01-26 00:49:11 UTC -+++ src/3rdparty/chromium/chromecast/browser/metrics/BUILD.gn -@@ -26,7 +26,7 @@ source_set("metrics") { - "//content/public/common", - ] - -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources += [ - "external_metrics.cc", - "external_metrics.h", 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/chromecast/crash/BUILD.gn.orig 2017-01-26 00:49:11 UTC -+++ src/3rdparty/chromium/chromecast/crash/BUILD.gn -@@ -78,7 +78,7 @@ source_set("test_support") { - ] - } - --if (is_linux) { -+if (is_linux || is_bsd) { - test("cast_crash_unittests") { - sources = [ - "cast_crashdump_uploader_unittest.cc", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_BUILD.gn +++ /dev/null @@ -1,13 +0,0 @@ ---- src/3rdparty/chromium/components/BUILD.gn.orig 2017-01-26 00:49:11 UTC -+++ src/3rdparty/chromium/components/BUILD.gn -@@ -168,8 +168,8 @@ test("components_unittests") { - "//components/certificate_reporting:unit_tests", - "//components/certificate_transparency:unit_tests", - "//components/contextual_search:unit_tests", -- "//components/crash/content/app:unit_tests", -- "//components/crash/core/common:unit_tests", -+ #"//components/crash/content/app:unit_tests", -+ #"//components/crash/core/common:unit_tests", - "//components/data_reduction_proxy/content/browser: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 +++ /dev/null @@ -1,15 +0,0 @@ ---- 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 -@@ -36,10 +36,11 @@ class WebsiteSettingsRegistry { - PLATFORM_MAC = 1 << 3, - PLATFORM_ANDROID = 1 << 4, - PLATFORM_IOS = 1 << 5, -+ PLATFORM_BSD = 1 << 6, - - // 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 applied to all platforms, including win, mac, linux, chromeos, - // android, ios. 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_crash_content_app_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_BUILD.gn +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_crash_content_app_BUILD.gn @@ -1,11 +1,20 @@ ---- 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.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/components/crash/content/app/BUILD.gn -@@ -145,7 +145,7 @@ source_set("app_non_mac_win") { - "//breakpad:breakpad_handler", +@@ -36,7 +36,7 @@ static_library("app") { + sources += [ "crashpad.cc" ] + } + +- if (is_android || is_linux) { ++ if (is_android || (is_linux && !is_bsd)) { + # Want these files on both Linux and Android. + set_sources_assignment_filter([]) + sources += [ +@@ -73,8 +73,6 @@ static_library("app") { + "//content/public/common:content_descriptors", + "//content/public/common:result_codes", "//sandbox", +- "//third_party/breakpad:client", +- "//third_party/crashpad/crashpad/snapshot", ] -- } else if (is_posix && !is_ios) { -+ } else if (is_posix && !is_ios && !is_bsd) { - deps += [ "//breakpad:client" ] - } - } + + # Clang's -mstackrealign doesn't work well with 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,23 @@ ---- 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,10 +26,9 @@ source_set("browser") { "//components/crash/content/app", "//content/public/browser", "//content/public/common", -@@ -39,7 +39,7 @@ source_set("browser") { +- "//third_party/breakpad:client", + ] + +- if (is_linux || is_android) { ++ if ((is_linux && !is_bsd) || is_android) { + set_sources_assignment_filter([]) + + # Want this file on both Linux and Android. +@@ -45,7 +44,7 @@ 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) { ++ if ((is_posix && !is_ios && !is_bsd) || is_fuchsia) { + configs += [ "//third_party/breakpad:client_config" ] + public_configs = [ "//third_party/breakpad:client_config" ] } - } 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,28 @@ +--- 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") { +@@ -88,7 +88,6 @@ target(crash_key_target_type, "crash_key") { + ] + } + +- deps += [ "//third_party/breakpad:client" ] + } + } + +@@ -143,7 +142,7 @@ source_set("unit_tests") { + sources += [ "objc_zombie_unittest.mm" ] + } + +- if (!is_mac && !is_win && !is_fuchsia) { ++ if (!is_mac && !is_win && !is_fuchsia && !is_bsd) { + include_dirs = [ "//third_party/breakpad/breakpad/src/" ] + sources += [ "crash_key_breakpad_unittest.cc" ] + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_quarantine_quarantine__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_quarantine_quarantine__linux.cc @@ -0,0 +1,49 @@ +--- src/3rdparty/chromium/components/download/quarantine/quarantine_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/components/download/quarantine/quarantine_linux.cc +@@ -2,11 +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 "components/download/quarantine/quarantine.h" + + #include + #include ++#if !defined(OS_BSD) + #include ++#endif + + #include "base/files/file_path.h" + #include "base/files/file_util.h" +@@ -29,17 +33,20 @@ bool SetExtendedFileAttribute(const char* path, + size_t value_size, + int flags) { + base::AssertBlockingAllowed(); ++#if !defined(OS_BSD) + int result = setxattr(path, name, value, value_size, flags); + if (result) { + DPLOG(ERROR) << "Could not set extended attribute " << name << " on file " + << path; + return false; + } ++#endif // !defined(OS_BSD) + return true; + } + + std::string GetExtendedFileAttribute(const char* path, const char* name) { + base::AssertBlockingAllowed(); ++#if !defined(OS_BSD) + ssize_t len = getxattr(path, name, nullptr, 0); + if (len <= 0) + return std::string(); +@@ -49,6 +56,9 @@ std::string GetExtendedFileAttribute(const char* path, + if (len < static_cast(buffer.size())) + return std::string(); + return std::string(buffer.begin(), buffer.end()); ++#else ++ return std::string(); ++#endif // !defined(OS_BSD) + } + + } // namespace Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_feedback_anonymizer__tool.cc @@ -1,9 +1,9 @@ ---- src/3rdparty/chromium/components/feedback/anonymizer_tool.cc.orig 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_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,34 +1,14 @@ ---- 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" ] +@@ -142,6 +142,11 @@ static_library("metrics") { + if (is_fuchsia) { + sources += [ "drive_metrics_provider_fuchsia.cc" ] } + + if (is_bsd) { -+ sources -= [ -+ "system_memory_stats_recorder_linux.cc" -+ ] ++ sources -= [ "system_memory_stats_recorder_linux.cc" ] + } + } - if (!is_ios) { -@@ -282,7 +289,7 @@ static_library("test_support") { - ] - } - --if (is_linux) { -+if (is_linux || is_bsd) { - static_library("serialization") { - sources = [ - "serialization/metric_sample.cc", -@@ -341,7 +348,7 @@ source_set("unit_tests") { - "//ui/gfx/geometry", - ] - -- if (is_linux) { -+ if (is_linux || is_bsd) { - sources += [ "serialization/serialization_utils_unittest.cc" ] - deps += [ ":serialization" ] - } + # The component metrics provider is a separate target because it depends upon 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_network__session__configurator_browser_network__session__configurator.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_network__session__configurator_browser_network__session__configurator.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/network_session_configurator/browser/network_session_configurator.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/components/network_session_configurator/browser/network_session_configurator.cc +@@ -591,7 +591,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C + } + #endif // #if !defined(OS_ANDROID) + +-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) + return net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; + #else + return net::URLRequestContextBuilder::HttpCacheParams::DISK_BLOCKFILE; 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_plugins_renderer_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_plugins_renderer_BUILD.gn +++ /dev/null @@ -1,17 +0,0 @@ ---- src/3rdparty/chromium/components/plugins/renderer/BUILD.gn.orig 2017-01-26 00:49:12 UTC -+++ src/3rdparty/chromium/components/plugins/renderer/BUILD.gn -@@ -19,6 +19,7 @@ static_library("renderer") { - } - - deps = [ -+ "//v8", - "//content/public/child", - "//content/public/common", - "//content/public/renderer", -@@ -27,6 +28,5 @@ static_library("renderer") { - "//third_party/WebKit/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 +++ /dev/null @@ -1,19 +0,0 @@ ---- src/3rdparty/chromium/components/policy/BUILD.gn.orig 2017-01-26 00:49:12 UTC -+++ src/3rdparty/chromium/components/policy/BUILD.gn -@@ -14,6 +14,7 @@ import("//tools/grit/grit_rule.gni") - 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" ] - } 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,6 +1,6 @@ ---- 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") { +@@ -65,6 +65,17 @@ static_library("storage_monitor") { ] } @@ -8,10 +8,6 @@ + sources -= [ + "mtab_watcher_linux.cc", + "mtab_watcher_linux.h", -+ "storage_monitor_linux.cc", -+ "storage_monitor_linux.h", -+ "udev_util_linux.cc", -+ "udev_util_linux.h", + ] + sources += [ + "storage_monitor_freebsd.cc", 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 +++ /dev/null @@ -1,18 +0,0 @@ ---- 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 -@@ -85,6 +85,7 @@ std::vector StorageMonitor: - - void StorageMonitor::EnsureInitialized(base::Closure callback) { - DCHECK(thread_checker_.CalledOnValidThread()); -+//#if !defined(OS_BSD) //XXX(rene) why disabled? - if (initialized_) { - if (!callback.is_null()) - callback.Run(); -@@ -100,6 +101,7 @@ void StorageMonitor::EnsureInitialized(b - - initializing_ = true; - Init(); -+//#endif - } - - bool StorageMonitor::IsInitialized() const { Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.cc +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_components_storage__monitor_storage__monitor__freebsd.cc @@ -1,6 +1,6 @@ ---- src/3rdparty/chromium/components/storage_monitor/storage_monitor_freebsd.cc.orig 2017-01-29 22:59:23 UTC +--- src/3rdparty/chromium/components/storage_monitor/storage_monitor_freebsd.cc.orig 2018-12-29 13:28:53 UTC +++ src/3rdparty/chromium/components/storage_monitor/storage_monitor_freebsd.cc -@@ -0,0 +1,101 @@ +@@ -0,0 +1,54 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -31,53 +31,6 @@ + +namespace { + -+// udev device property constants. -+const char kBlockSubsystemKey[] = "block"; -+const char kDiskDeviceTypeKey[] = "disk"; -+const char kFsUUID[] = "ID_FS_UUID"; -+const char kLabel[] = "ID_FS_LABEL"; -+const char kModel[] = "ID_MODEL"; -+const char kModelID[] = "ID_MODEL_ID"; -+const char kRemovableSysAttr[] = "removable"; -+const char kSerialShort[] = "ID_SERIAL_SHORT"; -+const char kSizeSysAttr[] = "size"; -+const char kVendor[] = "ID_VENDOR"; -+const char kVendorID[] = "ID_VENDOR_ID"; -+ -+StorageMonitor::EjectStatus EjectPathOnFileThread( -+ const base::FilePath& path, -+ const base::FilePath& device) { -+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); -+ -+ static const char kUmountBinary[] = "/sbin/umount"; -+ std::vector command; -+ command.push_back(kUmountBinary); -+ command.push_back(path.value()); -+ -+ base::LaunchOptions options; -+ base::Process process = base::LaunchProcess(command, options); -+ if (!process.IsValid()) -+ return StorageMonitor::EJECT_FAILURE; -+ -+ int exit_code = -1; -+ if (!process.WaitForExitWithTimeout(base::TimeDelta::FromMilliseconds(3000), -+ &exit_code)) { -+ process.Terminate(-1, false); -+ base::EnsureProcessTerminated(std::move(process)); -+ return StorageMonitor::EJECT_FAILURE; -+ } -+ -+ // TODO(gbillock): Make sure this is found in documentation -+ // somewhere. Experimentally it seems to hold that exit code -+ // 1 means device is in use. -+ if (exit_code == 1) -+ return StorageMonitor::EJECT_IN_USE; -+ if (exit_code != 0) -+ return StorageMonitor::EJECT_FAILURE; -+ -+ return StorageMonitor::EJECT_OK; -+} -+ +} // namespace + +StorageMonitorFreeBSD::StorageMonitorFreeBSD() { 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 +++ /dev/null @@ -1,10 +0,0 @@ ---- src/3rdparty/chromium/components/variations/proto/study.proto.orig 2017-01-26 00:49:13 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; - } - - // 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,14 @@ ---- 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", +@@ -1799,11 +1799,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_bsd) { -+ sources -= [ -+ "download/quarantine_linux.cc", - ] - } - -@@ -1490,7 +1491,7 @@ source_set("browser") { - if (!is_ios) { - defines += [ "ENABLE_SCREEN_CAPTURE=1" ] - } -- 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" ] - } - -@@ -1807,6 +1808,17 @@ source_set("browser") { - "//chromeos", - "//chromeos:power_manager_proto", - ] -+ } else if (is_bsd) { -+ 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", -+ ] - } - - 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" ] +- ] } + if (is_chromeos || is_android || is_chromecast) { 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,26 @@ ---- 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,11 @@ int BrowserMainLoop::EarlyInitialization() { + // by now since a thread to start the ServiceManager has been created + // before the browser main loop starts. + DCHECK(SandboxHostLinux::GetInstance()->IsInitialized()); +#elif 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,76 @@ +--- 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" + +@@ -69,6 +71,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 +85,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 +95,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 +119,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 +150,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_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_BSD) // 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_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,19 @@ +--- 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; + #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,29 +1,29 @@ ---- 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) -+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) #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() { -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) return NeedsInputGrab(); #endif return false; -@@ -2158,7 +2158,7 @@ void RenderWidgetHostViewAura::ForwardKe +@@ -2277,7 +2277,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD) ++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = ui::GetTextEditKeyBindingsDelegate(); std::vector commands; 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 +++ /dev/null @@ -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 +++ /dev/null @@ -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_common_user__agent.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_user__agent.cc @@ -0,0 +1,17 @@ +--- src/3rdparty/chromium/content/common/user_agent.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/common/user_agent.cc +@@ -125,6 +125,14 @@ std::string BuildOSCpuInfo() { + #endif + ); // NOLINT + ++#if defined(OS_BSD) ++#if defined(__x86_64__) ++ base::StringAppendF(&os_cpu, "; Linux x86_64"); ++#else ++ base::StringAppendF(&os_cpu, "; Linux i686"); ++#endif ++#endif ++ + return os_cpu; + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_view__messages.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_common_view__messages.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/common/view_messages.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/common/view_messages.h +@@ -221,7 +221,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::RendererPreferences) + IPC_STRUCT_TRAITS_MEMBER(disable_client_blocked_error_page) + IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed) + IPC_STRUCT_TRAITS_MEMBER(network_contry_iso) +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + IPC_STRUCT_TRAITS_MEMBER(system_font_family_name) + #endif + #if defined(OS_WIN) Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_gpu_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,26 @@ +--- 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,7 @@ bool BrokerProcessPreSandboxHook( + + } // namespace + ++#if !defined(OS_BSD) + bool GpuProcessPreSandboxHook(service_manager::SandboxLinux::Options options) { + service_manager::SandboxLinux::GetInstance()->StartBrokerProcess( + CommandSetForGPU(options), FilePermissionsForGpu(options), +@@ -296,5 +297,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,20 @@ +--- 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 +@@ -13,7 +13,7 @@ + #include "build/build_config.h" + #include "content/child/blink_platform_impl.h" + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "components/services/font/public/cpp/font_loader.h" + #include "third_party/skia/include/core/SkRefCnt.h" + #endif +@@ -58,7 +58,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp + std::unique_ptr sandbox_support_; + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + sk_sp font_loader_; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_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,29 @@ +--- 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 +@@ -40,7 +40,7 @@ namespace content { + + class PpapiBlinkPlatformImpl::SandboxSupport : public WebSandboxSupport { + public: +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + explicit SandboxSupport(sk_sp font_loader) + : font_loader_(std::move(font_loader)) {} + #endif +@@ -48,7 +48,7 @@ class PpapiBlinkPlatformImpl::SandboxSupport : public + + #if defined(OS_MACOSX) + bool LoadFont(CTFontRef srcFont, CGFontRef* out, uint32_t* fontID) override; +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + SandboxSupport(); + void GetFallbackFontForCharacter( + WebUChar32 character, +@@ -129,7 +129,7 @@ void PpapiBlinkPlatformImpl::SandboxSupport::GetWebFon + #endif // !defined(OS_ANDROID) && !defined(OS_WIN) + + PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl() { +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + font_loader_ = + sk_make_sp(ChildThread::Get()->GetConnector()); + SkFontConfigInterface::SetGlobal(font_loader_); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_content_ppapi__plugin_ppapi__plugin__main.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/ppapi_plugin/ppapi_plugin_main.cc +@@ -126,6 +126,8 @@ int PpapiPluginMain(const MainFunctionParams& paramete + service_manager::SandboxTypeFromCommandLine(command_line), + service_manager::SandboxLinux::PreSandboxHook(), + service_manager::SandboxLinux::Options()); ++#elif defined(OS_BSD) ++ NOTIMPLEMENTED(); + #endif + + ChildProcess ppapi_process; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_public_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_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,54 @@ #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) + 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) + 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) + 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( 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,11 @@ +--- src/3rdparty/chromium/content/renderer/renderer_main.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/content/renderer/renderer_main.cc +@@ -177,7 +177,7 @@ int RendererMain(const MainFunctionParams& parameters) + bool need_sandbox = + !command_line.HasSwitch(service_manager::switches::kNoSandbox); + +-#if !defined(OS_WIN) && !defined(OS_MACOSX) ++#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) + // Sandbox is enabled before RenderProcess initialization on all platforms, + // except Windows and Mac. + // TODO(markus): Check if it is OK to remove ifdefs for Windows and Mac. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_content_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 +++ /dev/null @@ -1,38 +0,0 @@ ---- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2017-01-26 00:49:13 UTC -+++ src/3rdparty/chromium/content/shell/BUILD.gn -@@ -296,7 +296,7 @@ static_library("content_shell_lib") { - ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - deps += [ - "//build/linux: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") { - ] - } - -- if (is_linux) { -+ if (is_linux || is_bsd) { - deps += [ "//third_party/freetype2" ] - } - -@@ -532,7 +532,7 @@ if (is_android) { - } - } - -- if (is_linux && !is_component_build) { -+ if ((is_linux || is_bsd) && !is_component_build) { - # Set rpath to find our own libfreetype even in a non-component build. - configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] - } 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 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/device/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/device/BUILD.gn -@@ -184,7 +184,7 @@ test("device_unittests") { - ] - } - -- if ((is_chromeos || is_linux) && use_dbus) { -+ if ((is_chromeos || is_linux || is_bsd) && use_dbus) { - configs += [ "//build/config/linux/dbus" ] - - sources += [ 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 +++ /dev/null @@ -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_geolocation_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_geolocation_BUILD.gn +++ /dev/null @@ -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 +++ /dev/null @@ -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,25 @@ ---- 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) +-if (is_win || is_linux || is_mac) { ++if (is_win || is_linux || is_mac || is_bsd) { + config("platform_support") { + visibility = [ ":serial" ] + if (is_win) { +@@ -55,6 +55,13 @@ if (is_win || is_linux || is_mac) { + "//net", + "//third_party/re2", + ] ++ ++ if (is_bsd) { ++ sources -= [ ++ "serial_device_enumerator_linux.cc", ++ "serial_device_enumerator_linux.h", ++ ] ++ } - 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_posix) { + sources += [ Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_serial__io__handler__posix.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_device_serial_serial__io__handler__posix.cc +++ 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_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_device_usb_BUILD.gn @@ -0,0 +1,21 @@ +--- src/3rdparty/chromium/device/usb/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/device/usb/BUILD.gn +@@ -109,10 +109,17 @@ static_library("usb") { + ] + } + +- if (is_android || is_chromeos || is_linux) { ++ if (is_android || is_chromeos || (is_linux && !is_bsd)) { + sources += [ + "usb_device_handle_usbfs.cc", + "usb_device_handle_usbfs.h", ++ ] ++ } ++ ++ if (is_bsd) { ++ sources -= [ ++ "usb_device_linux.cc", ++ "usb_device_linux.h", + ] + } + 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,20 +1,6 @@ ---- 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" - #include "base/threading/simple_thread.h" - #include "device/usb/usb_error.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#define LIBUSB_CALL -+#else - #include "third_party/libusb/src/libusb/interrupt.h" - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace device { - -@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() +@@ -58,7 +58,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 +++ /dev/null @@ -1,14 +0,0 @@ ---- 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 -@@ -7,7 +7,11 @@ - #include "build/build_config.h" - #include "device/usb/usb_context.h" - #include "testing/gtest/include/gtest/gtest.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace device { - 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 +++ /dev/null @@ -1,15 +0,0 @@ ---- 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 -@@ -18,7 +18,12 @@ - #include "base/memory/ref_counted.h" - #include "base/threading/thread_checker.h" - #include "device/usb/usb_device_handle.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#define LIBUSB_CALL -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace base { - class SequencedTaskRunner; 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 +++ /dev/null @@ -1,15 +0,0 @@ ---- 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 -@@ -25,7 +25,11 @@ - #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" -+#else -+# include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace device { - 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 +++ /dev/null @@ -1,14 +0,0 @@ ---- 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 -@@ -22,7 +22,11 @@ - #include "device/usb/usb_descriptors.h" - #include "device/usb/usb_device_handle_impl.h" - #include "device/usb/usb_error.h" -+#if defined(OS_FREEBSD) -+#include "libusb.h" -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - - namespace device { - 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,14 +1,11 @@ ---- 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 @@ - - #include "device/usb/usb_error.h" - -+#if defined(__FreeBSD__) -+#include "libusb.h" -+#else - #include "third_party/libusb/src/libusb/libusb.h" -+#endif - +@@ -9,7 +9,7 @@ namespace device { + std::string ConvertPlatformUsbErrorToString(int errcode) { +- return libusb_strerror(static_cast(errcode)); ++ return ""; + } + + } // namespace device 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,20 @@ ---- 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" - #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 +73,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 +97,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,59 +1,45 @@ ---- 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 @@ - #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 -+#else -+# include "third_party/libusb/src/libusb/libusb.h" -+#endif +@@ -239,8 +239,10 @@ UsbServiceImpl::UsbServiceImpl() + } - #if defined(OS_WIN) - #include -@@ -213,6 +217,7 @@ UsbServiceImpl::UsbServiceImpl( - } - context_ = new UsbContext(platform_context); + UsbServiceImpl::~UsbServiceImpl() { ++#if !defined(OS_FREEBSD) + if (hotplug_enabled_) + libusb_hotplug_deregister_callback(context_->context(), hotplug_handle_); ++#endif // !defined(OS_FREEBSD) + } + + void UsbServiceImpl::GetDevices(const GetDevicesCallback& callback) { +@@ -295,6 +297,7 @@ void UsbServiceImpl::OnUsbContext(scoped_refptrcontext(), static_cast(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | -@@ -225,6 +230,8 @@ UsbServiceImpl::UsbServiceImpl( - } +@@ -307,6 +310,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 +507,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 +542,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 =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_browser_api_messaging_message__service.cc @@ -0,0 +1,20 @@ +--- 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."; +-#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[] = +@@ -362,7 +362,7 @@ void MessageService::OpenChannelToNativeApp( + 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 = 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_renderer_bindings_api__binding__util.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_extensions_renderer_bindings_api__binding__util.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/extensions/renderer/bindings/api_binding_util.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/extensions/renderer/bindings/api_binding_util.cc +@@ -128,6 +128,8 @@ std::string GetPlatformString() { + return "mac"; + #elif defined(OS_WIN) + return "win"; ++#elif defined(OS_BSD) ++ return "bsd"; + #else + NOTREACHED(); + return std::string(); Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_gpu_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/gpu/BUILD.gn.orig 2017-01-26 00:49:14 UTC -+++ src/3rdparty/chromium/gpu/BUILD.gn -@@ -93,7 +93,7 @@ test("command_buffer_gles2_tests") { - 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" ] - } - } 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_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 +++ /dev/null @@ -1,16 +0,0 @@ ---- 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 @@ - ] - 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) { - sources += [ 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,29 @@ ---- 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; - } - } --#endif // defined(OS_MACOSX) -+#endif // defined(OS_MACOSX) && defined(OS_BSD) - - #if defined(OS_LINUX) && !defined(OS_CHROMEOS) +-#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() { -@@ -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) + bool res = true; + base::AssertBlockingAllowed(); +@@ -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)); - } --#endif // !defined(OS_MACOSX) -+#endif // !defined(OS_MACOSX) && !defined(OS_BSD) +@@ -194,7 +194,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + sandbox_helper_->PreSandboxStartup(); - base::TimeDelta collect_context_time = - base::TimeTicks::Now() - before_collect_context_graphics_info; + 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. 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__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__audio__alsa__audio_manager_alsa.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_media__audio__alsa__audio_manager_alsa.cc +++ /dev/null @@ -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,31 @@ ---- 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 && !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", ++ "sndio/sndio_output.h" + ] - } ++ } - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] + if (use_alsa) { + libs += [ "asound" ] +@@ -302,7 +312,6 @@ source_set("audio") { + if (link_pulseaudio) { + configs += [ ":libpulse" ] + } else { +- libs += [ "dl" ] + deps += [ ":pulse_generate_stubs" ] + sources += get_target_outputs(":pulse_generate_stubs") + } Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_audio_alsa_audio__manager__alsa.cc @@ -0,0 +1,54 @@ +--- 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 +@@ -93,7 +93,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType + 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) { +@@ -105,7 +107,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType + DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " + << wrapper_->StrError(error); + } ++#ifdef OS_LINUX + } ++#endif + } + + 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"; ++#else ++ static const char kDeviceTypeDesired[] = "plug"; ++#endif + 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. ++#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++) { +@@ -234,7 +244,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( + 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_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 +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/media/base/BUILD.gn.orig 2017-01-26 00:49:15 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" ] - } - -- if (is_linux || is_win) { -+ if (is_linux || is_bsd || is_win) { - sources += [ - "keyboard_event_counter.cc", - "keyboard_event_counter.h", 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_base_scopedfd__helper.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_scopedfd__helper.h @@ -0,0 +1,19 @@ +--- src/3rdparty/chromium/media/base/scopedfd_helper.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/media/base/scopedfd_helper.h +@@ -14,14 +14,14 @@ namespace media { + // since the only current user is V4L2 we are limiting the scope to OS_LINUX so + // the binary size does not inflate on non-using systems. Feel free to adapt + // this and BUILD.gn as our needs evolve. +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + + // Return a new vector containing duplicates of |fds|, or an empty vector in + // case of error. + MEDIA_EXPORT std::vector DuplicateFDs( + const std::vector& fds); + +-#endif // OS_LINUX ++#endif // OS_LINUX || OS_BSD + + } // namespace media + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.h @@ -0,0 +1,38 @@ +--- src/3rdparty/chromium/media/base/video_frame.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/media/base/video_frame.h +@@ -69,7 +69,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + STORAGE_UNOWNED_MEMORY = 2, // External, non owned data pointers. + STORAGE_OWNED_MEMORY = 3, // VideoFrame has allocated its own data buffer. + STORAGE_SHMEM = 4, // Pixels are backed by Shared Memory. +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // TODO(mcasas): Consider turning this type into STORAGE_NATIVE + // based on the idea of using this same enum value for both DMA + // buffers on Linux and CVPixelBuffers on Mac (which currently use +@@ -225,7 +225,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + uint8_t* a_data, + base::TimeDelta timestamp); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // Wraps provided dmabufs + // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a + // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will +@@ -387,7 +387,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + // Returns the offset into the shared memory where the frame data begins. + size_t shared_memory_offset() const; + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // Return a vector containing the backing DmaBufs for this frame. The number + // of returned DmaBufs will be equal or less than the number of planes of + // the frame. If there are less, this means that the last FD contains the +@@ -606,7 +606,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + // memory. + size_t shared_memory_offset_; + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either + // equal or less than the number of planes of the frame. If it is less, then + // the memory area represented by the last FD contains the remaining planes. Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_base_video__frame.cc @@ -0,0 +1,47 @@ +--- src/3rdparty/chromium/media/base/video_frame.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/media/base/video_frame.cc +@@ -64,7 +64,7 @@ static std::string StorageTypeToString( + return "OWNED_MEMORY"; + case VideoFrame::STORAGE_SHMEM: + return "SHMEM"; +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + case VideoFrame::STORAGE_DMABUFS: + return "DMABUFS"; + #endif +@@ -80,7 +80,7 @@ static std::string StorageTypeToString( + // static + static bool IsStorageTypeMappable(VideoFrame::StorageType storage_type) { + return +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // This is not strictly needed but makes explicit that, at VideoFrame + // level, DmaBufs are not mappable from userspace. + storage_type != VideoFrame::STORAGE_DMABUFS && +@@ -367,7 +367,7 @@ scoped_refptr VideoFrame::WrapExternalYuva + return frame; + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // static + scoped_refptr VideoFrame::WrapExternalDmabufs( + VideoPixelFormat format, +@@ -488,7 +488,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( + wrapping_frame->data_[i] = frame->data(i); + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + // If there are any |dmabuf_fds_| plugged in, we should duplicate them. + if (frame->storage_type() == STORAGE_DMABUFS) { + wrapping_frame->dmabuf_fds_ = DuplicateFDs(frame->dmabuf_fds_); +@@ -860,7 +860,7 @@ size_t VideoFrame::shared_memory_offset() const { + return shared_memory_offset_; + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + std::vector VideoFrame::DmabufFds() const { + DCHECK_EQ(storage_type_, STORAGE_DMABUFS); + std::vector ret; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_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_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) @@ -23,3 +32,15 @@ // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the // format is introduced to kernel. +@@ -367,9 +369,9 @@ void V4L2CaptureDelegate::AllocateAndStart( + // operation (|errno| == EINVAL in this case) or plain failure. + if ((power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_50HZ) + || (power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_60HZ) +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) ++//#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) + || (power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_AUTO) +-#endif ++//#endif + ) { + struct v4l2_control control = {}; + control.id = V4L2_CID_POWER_LINE_FREQUENCY; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_media_capture_video_linux_video__capture__device__factory__linux.cc @@ -0,0 +1,32 @@ +--- src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_linux.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/media/capture/video/linux/video_capture_device_factory_linux.cc +@@ -253,6 +253,7 @@ bool VideoCaptureDeviceFactoryLinux::HasUsableFormats( + if (!(capabilities & V4L2_CAP_VIDEO_CAPTURE)) + return false; + ++#if !defined(OS_FREEBSD) + const std::list& usable_fourccs = + VideoCaptureDeviceLinux::GetListOfUsableFourCCs(false); + v4l2_fmtdesc fmtdesc = {}; +@@ -264,6 +265,7 @@ bool VideoCaptureDeviceFactoryLinux::HasUsableFormats( + return true; + } + } ++#endif + + DLOG(ERROR) << "No usable formats found"; + return false; +@@ -311,9 +313,13 @@ void VideoCaptureDeviceFactoryLinux::GetSupportedForma + for (; HANDLE_EINTR(v4l2_->ioctl(fd, VIDIOC_ENUM_FMT, &v4l2_format)) == 0; + ++v4l2_format.index) { + VideoCaptureFormat supported_format; ++#if !defined(OS_FREEBSD) + supported_format.pixel_format = + VideoCaptureDeviceLinux::V4l2FourCcToChromiumPixelFormat( + v4l2_format.pixelformat); ++#else ++ supported_format.pixel_format = PIXEL_FORMAT_UNKNOWN; ++#endif + + if (supported_format.pixel_format == PIXEL_FORMAT_UNKNOWN) + continue; 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,11 @@ ---- 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 @@ +@@ -18,11 +18,11 @@ + #include + #else + #include +-#include + #endif namespace media { @@ -8,55 +13,62 @@ // Translates Video4Linux pixel formats to Chromium pixel formats. // static VideoPixelFormat VideoCaptureDeviceLinux::V4l2FourCcToChromiumPixelFormat( -@@ -34,6 +35,7 @@ std::list VideoCaptureDeviceLi +@@ -36,6 +36,7 @@ std::list VideoCaptureDeviceLinux::GetListOf bool favour_mjpeg) { return V4L2CaptureDelegate::GetListOfUsableFourCcs(favour_mjpeg); } +#endif // !defined(OS_FREEBSD) VideoCaptureDeviceLinux::VideoCaptureDeviceLinux( - const VideoCaptureDeviceDescriptor& device_descriptor) -@@ -47,6 +49,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDe - v4l2_thread_.Stop(); - } - -+#if !defined(OS_FREEBSD) + scoped_refptr v4l2, +@@ -54,6 +55,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDeviceLinux() { 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))); - } -+#else // !defined(OS_FREEBSD) -+void VideoCaptureDeviceLinux::AllocateAndStart( -+ const VideoCaptureParams& params, -+ std::unique_ptr client) {} ++#if !defined(OS_FREEBSD) + DCHECK(!capture_impl_); + if (v4l2_thread_.IsRunning()) + return; // Wrong state. +@@ -79,9 +81,11 @@ void VideoCaptureDeviceLinux::AllocateAndStart( + for (const auto& request : photo_requests_queue_) + v4l2_thread_.task_runner()->PostTask(FROM_HERE, request); + photo_requests_queue_.clear(); +#endif // !defined(OS_FREEBSD) + } -+#if !defined(OS_FREEBSD) void VideoCaptureDeviceLinux::StopAndDeAllocate() { ++#if !defined(OS_FREEBSD) 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))); - } -+#else // !defined(OS_FREEBSD) -+void VideoCaptureDeviceLinux::StopAndDeAllocate() {} + v4l2_thread_.task_runner()->PostTask( +@@ -91,6 +95,7 @@ void VideoCaptureDeviceLinux::StopAndDeAllocate() { + v4l2_thread_.Stop(); + + capture_impl_ = nullptr; +#endif // !defined(OS_FREEBSD) + } + + void VideoCaptureDeviceLinux::TakePhoto(TakePhotoCallback callback) { +@@ -133,11 +138,13 @@ void VideoCaptureDeviceLinux::SetPhotoOptions( + } -+#if !defined(OS_FREEBSD) void VideoCaptureDeviceLinux::SetRotation(int rotation) { ++#if !defined(OS_FREEBSD) if (v4l2_thread_.IsRunning()) { v4l2_thread_.task_runner()->PostTask( -@@ -118,6 +131,9 @@ void VideoCaptureDeviceLinux::SetRotatio - base::Bind(&V4L2CaptureDelegate::SetRotation, capture_impl_, rotation)); + FROM_HERE, base::Bind(&V4L2CaptureDelegate::SetRotation, + capture_impl_->GetWeakPtr(), rotation)); } ++#endif } -+#else // !defined(OS_FREEBSD) -+void VideoCaptureDeviceLinux::SetRotation(int rotation) {} -+#endif // !defined(OS_FREEBSD) // static - int VideoCaptureDeviceLinux::TranslatePowerLineFrequencyToV4L2( +@@ -149,7 +156,7 @@ int VideoCaptureDeviceLinux::TranslatePowerLineFrequen + case PowerLineFrequency::FREQUENCY_60HZ: + return V4L2_CID_POWER_LINE_FREQUENCY_60HZ; + default: +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) ++#if defined(OS_BSD) + // If we have no idea of the frequency, at least try and set it to AUTO. + return V4L2_CID_POWER_LINE_FREQUENCY_AUTO; + #else 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 +++ /dev/null @@ -1,29 +0,0 @@ ---- src/3rdparty/chromium/media/cast/BUILD.gn.orig 2017-01-26 00:49:15 UTC -+++ src/3rdparty/chromium/media/cast/BUILD.gn -@@ -356,7 +356,7 @@ test("cast_unittests") { - } - } - --if (is_win || is_mac || (is_linux && !is_chromeos)) { -+if (is_win || is_mac || (is_linux && !is_chromeos) || is_bsd) { - # 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", - ] - -- 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 - } - } - --if (is_linux && !is_chromeos) { -+if ((is_linux || is_bsd) && !is_chromeos) { - test("tap_proxy") { - sources = [ - "test/utility/tap_proxy.cc", 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_mojo_BUILD.gn =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/mojo/BUILD.gn.orig 2017-01-26 00:49:15 UTC -+++ src/3rdparty/chromium/mojo/BUILD.gn -@@ -12,7 +12,7 @@ group("mojo") { - "//mojo/common", - ] - -- if (!(is_linux && current_cpu == "x86")) { -+ if (!((is_linux || is_bsd) && current_cpu == "x86")) { - deps += [ "//mojo/public" ] - } - Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_core_validation__unittest.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_core_validation__unittest.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/mojo/core/options_validation_unittest.cc.orig 2018-04-10 14:05:55 UTC ++++ src/3rdparty/chromium/mojo/core/options_validation_unittest.cc +@@ -18,7 +18,7 @@ namespace { + + using TestOptionsFlags = uint32_t; + +-static_assert(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); ++static_assert(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); + struct MOJO_ALIGNAS(8) TestOptions { + uint32_t struct_size; + TestOptionsFlags flags; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_edk_system_options__validation__unittest.cc =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_edk_system_options__validation__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/3rdparty/chromium/mojo/edk/system/options_validation_unittest.cc.orig 2018-04-10 14:05:55 UTC -+++ src/3rdparty/chromium/mojo/edk/system/options_validation_unittest.cc -@@ -18,7 +18,7 @@ namespace { - - using TestOptionsFlags = uint32_t; - --static_assert(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); -+static_assert(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); - struct MOJO_ALIGNAS(8) TestOptions { - uint32_t struct_size; - TestOptionsFlags flags; Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_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_c_system_buffer.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_buffer.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_buffer.h @@ -1,11 +1,11 @@ --- src/3rdparty/chromium/mojo/public/c/system/buffer.h.orig 2018-04-10 14:05:55 UTC +++ src/3rdparty/chromium/mojo/public/c/system/buffer.h -@@ -40,7 +40,7 @@ const MojoCreateSharedBufferOptionsFlags - ((MojoCreateSharedBufferOptionsFlags)0) - #endif - +@@ -30,7 +30,7 @@ struct MOJO_ALIGNAS(8) MojoCreateSharedBufferOptions { + // See |MojoCreateSharedBufferFlags|. + MojoCreateSharedBufferFlags flags; + }; -MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); +MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); - struct MOJO_ALIGNAS(8) MojoCreateSharedBufferOptions { - uint32_t struct_size; - MojoCreateSharedBufferOptionsFlags flags; + MOJO_STATIC_ASSERT(sizeof(MojoCreateSharedBufferOptions) == 8, + "MojoCreateSharedBufferOptions has wrong size"); + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_data__pipe.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_data__pipe.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_data__pipe.h @@ -1,11 +1,11 @@ --- src/3rdparty/chromium/mojo/public/c/system/data_pipe.h.orig 2018-04-10 14:05:55 UTC +++ src/3rdparty/chromium/mojo/public/c/system/data_pipe.h -@@ -41,7 +41,7 @@ const MojoCreateDataPipeOptionsFlags MOJO_CREATE_DATA_ - ((MojoCreateDataPipeOptionsFlags)0) - #endif - +@@ -40,7 +40,7 @@ struct MOJO_ALIGNAS(8) MojoCreateDataPipeOptions { + // system-dependent capacity of at least one element in size. + uint32_t capacity_num_bytes; + }; -MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); +MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); - struct MOJO_ALIGNAS(8) MojoCreateDataPipeOptions { - MOJO_ALIGNAS(4) uint32_t struct_size; - MOJO_ALIGNAS(4) MojoCreateDataPipeOptionsFlags flags; + MOJO_STATIC_ASSERT(sizeof(MojoCreateDataPipeOptions) == 16, + "MojoCreateDataPipeOptions has wrong size"); + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_message__pipe.h =================================================================== --- www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_message__pipe.h +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_mojo_public_c_system_message__pipe.h @@ -1,11 +1,11 @@ --- src/3rdparty/chromium/mojo/public/c/system/message_pipe.h.orig 2018-04-10 14:05:55 UTC +++ src/3rdparty/chromium/mojo/public/c/system/message_pipe.h -@@ -46,7 +46,7 @@ const MojoCreateMessagePipeOptionsFlags - ((MojoCreateMessagePipeOptionsFlags)0) - #endif - +@@ -35,7 +35,7 @@ struct MOJO_ALIGNAS(8) MojoCreateMessagePipeOptions { + // See |MojoCreateMessagePipeFlags|. + MojoCreateMessagePipeFlags flags; + }; -MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); +MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) <= 8, "int64_t has weird alignment"); - struct MOJO_ALIGNAS(8) MojoCreateMessagePipeOptions { - uint32_t struct_size; - MojoCreateMessagePipeOptionsFlags flags; + MOJO_STATIC_ASSERT(sizeof(MojoCreateMessagePipeOptions) == 8, + "MojoCreateMessagePipeOptions has wrong size"); + 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 +++ /dev/null @@ -1,20 +0,0 @@ ---- 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 -@@ -7,7 +7,7 @@ import("//build/config/features.gni") - declare_args() { - # Set to true if cross compiling trusted (e.g. building sel_ldr_arm on x86) - # binaries is supported. -- enable_cross_trusted = is_linux -+ enable_cross_trusted = is_linux || is_bsd - - # Build the nacl SDK untrusted components. This is disabled by default since - # not all NaCl untrusted compilers are in goma (e.g arm-nacl-glibc) -@@ -28,7 +28,7 @@ if (enable_nacl) { - "//native_client/src/trusted/service_runtime:sel_ldr", - "//native_client/src/trusted/validator/driver:ncval_new", - ] -- if (is_linux) { -+ if (is_linux || is_bsd) { - deps += [ "//native_client/src/nonsfi/loader:nonsfi_loader" ] - } - } 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,86 +1,29 @@ ---- 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") { +@@ -95,7 +95,7 @@ net_configs = [ + "//build/config/compiler:wexit_time_destructors", + ] + +-if (is_linux) { ++if (is_linux && !is_bsd) { + net_configs += [ "//build/config/linux:libresolv" ] + } + +@@ -1904,6 +1904,17 @@ 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") { - sources -= [ "disk_cache/blockfile/file_posix.cc" ] - } + sources -= [ "disk_cache/blockfile/file_posix.cc" ] ++ } ++ + if (is_bsd) { + sources -= [ ++ "base/address_tracker_linux.cc", ++ "base/address_tracker_linux.h", + "base/network_change_notifier_linux.cc", + "base/network_change_notifier_linux.h", ++ "base/network_interfaces_linux.cc", + ] -+ } -+ - if (is_ios || is_mac) { - sources += gypi_values.net_base_mac_ios_sources ++ sources += [ "base/network_interfaces_freebsd.cc" ] } -@@ -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_linux) { -+if (is_linux || is_bsd) { - static_library("epoll_server") { - sources = [ - "tools/epoll_server/epoll_server.cc", -@@ -1098,7 +1110,7 @@ if (is_android) { - } - } - --if (is_android || is_linux) { -+if (is_android || is_linux || is_bsd) { - executable("disk_cache_memory_test") { - testonly = true - sources = [ -@@ -1276,7 +1288,7 @@ test("net_unittests") { - "third_party/nist-pkits/", - ] - -- 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 (v8_use_external_startup_data) { - deps += [ "//gin" ] - } + if (is_ios || is_mac) { 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_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.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 +++ /dev/null @@ -1,105 +0,0 @@ ---- 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 -@@ -6,12 +6,14 @@ - - #include - -+#if !defined(OS_FREEBSD) - #if !defined(OS_ANDROID) - #include - #endif // !defined(OS_ANDROID) - #include - #include - #include -+#endif // !defined(OS_FREEBSD) - #include - #include - #include -@@ -49,6 +51,7 @@ bool TryConvertNativeToNetIPAttributes(i - // are still progressing through duplicated address detection (DAD) - // and shouldn't be used by the application layer until DAD process - // is completed. -+#if !defined(OS_FREEBSD) - if (native_attributes & ( - #if !defined(OS_ANDROID) - IFA_F_OPTIMISTIC | IFA_F_DADFAILED | -@@ -66,6 +69,10 @@ bool TryConvertNativeToNetIPAttributes(i - } - - return true; -+#else -+ // the flags tested above are not present on FreeBSD -+ return false; -+#endif // !OS_FREEBSD - } - - } // namespace -@@ -80,13 +87,15 @@ NetworkChangeNotifier::ConnectionType Ge - if (!s.is_valid()) - return NetworkChangeNotifier::CONNECTION_UNKNOWN; - -+#if !defined(OS_FREEBSD) - // Test wireless extensions for CONNECTION_WIFI - struct iwreq pwrq = {}; - strncpy(pwrq.ifr_name, ifname.c_str(), IFNAMSIZ - 1); - if (ioctl(s.get(), SIOCGIWNAME, &pwrq) != -1) - return NetworkChangeNotifier::CONNECTION_WIFI; -+#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 - strncpy(ifr.ifr_name, ifname.c_str(), IFNAMSIZ - 1); - if (ioctl(s.get(), SIOCETHTOOL, &ifr) != -1) - return NetworkChangeNotifier::CONNECTION_ETHERNET; --#endif // !defined(OS_ANDROID) -+#endif // !defined(OS_ANDROID) && !defined(OS_FREEBSD) - - return NetworkChangeNotifier::CONNECTION_UNKNOWN; - } - - std::string GetInterfaceSSID(const std::string& ifname) { -+#if !defined(OS_FREEBSD) - base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0)); - if (!ioctl_socket.is_valid()) - return ""; -@@ -112,9 +122,11 @@ std::string GetInterfaceSSID(const std:: - wreq.u.essid.length = IW_ESSID_MAX_SIZE; - if (ioctl(ioctl_socket.get(), SIOCGIWESSID, &wreq) != -1) - return ssid; -+#endif // !defined(OS_FREEBSD) - return ""; - } - -+#if !defined(OS_FREEBSD) - bool GetNetworkListImpl( - NetworkInterfaceList* networks, - int policy, -@@ -183,6 +195,7 @@ bool GetNetworkListImpl( - - return true; - } -+#endif // !defined(OS_FREEBSD) - - std::string GetWifiSSIDFromInterfaceListInternal( - const NetworkInterfaceList& interfaces, -@@ -207,12 +220,16 @@ bool GetNetworkList(NetworkInterfaceList - if (networks == NULL) - return false; - -+#if !defined(OS_FREEBSD) - internal::AddressTrackerLinux tracker; - tracker.Init(); - - return internal::GetNetworkListImpl( - networks, policy, tracker.GetOnlineLinks(), tracker.GetAddressMap(), - &internal::AddressTrackerLinux::GetInterfaceName); -+#else -+ return false; -+#endif - } - - std::string GetWifiSSID() { 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 +++ /dev/null @@ -1,18 +0,0 @@ ---- 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 -@@ -20,6 +20,7 @@ namespace net { - #if !defined(OS_NACL) - 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 - - return false; - } -+#endif - - // Check if the address is unspecified (i.e. made of zeroes) or loopback. - bool IsLoopbackOrUnspecifiedAddress(const sockaddr* addr) { 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__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 2019-01-16 10:59:47 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 { +@@ -1538,7 +1538,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_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,15 @@ ---- 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() { +@@ -641,7 +641,7 @@ bool InitializeSDK() { config.m_v8EmbedderSlot = gin::kEmbedderPDFium; FPDF_InitLibraryWithConfig(&config); @@ -18,7 +18,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 +27,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 +36,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_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 +++ /dev/null @@ -1,20 +0,0 @@ ---- src/3rdparty/chromium/printing/BUILD.gn.orig 2017-01-26 00:49:17 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", - ] -- } else if (is_linux) { # Non-ChromeOS Linux. -+ } else if (is_linux || is_bsd) { # Non-ChromeOS Linux/BSD. - sources += [ - "printed_document_linux.cc", - "printing_context_linux.cc", 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_features.gni =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_sandbox_features.gni @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/sandbox/features.gni.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/sandbox/features.gni +@@ -12,6 +12,6 @@ use_seccomp_bpf = + (is_linux || is_android) && + (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm" || + current_cpu == "arm64" || current_cpu == "mipsel" || +- current_cpu == "mips64el") ++ current_cpu == "mips64el") && !is_bsd + + use_seccomp_bpf = use_seccomp_bpf || is_nacl_nonsfi 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,47 @@ +--- src/3rdparty/chromium/sandbox/linux/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/sandbox/linux/BUILD.gn +@@ -12,12 +12,12 @@ if (is_android) { + } + + declare_args() { +- compile_suid_client = is_linux ++ compile_suid_client = is_linux && !is_bsd + +- compile_credentials = is_linux ++ compile_credentials = is_linux && !is_bsd + + # On Android, use plain GTest. +- use_base_test_suite = is_linux ++ use_base_test_suite = is_linux && !is_bsd + } + + if (is_nacl_nonsfi) { +@@ -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_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 =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_device_hid_BUILD.gn @@ -0,0 +1,16 @@ +--- 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" ] + } + ++ 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_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_network_network__service.h =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/network/network_service.h.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/network/network_service.h +@@ -133,7 +133,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService + void GetTotalNetworkUsages( + mojom::NetworkService::GetTotalNetworkUsagesCallback callback) override; + void UpdateSignedTreeHead(const net::ct::SignedTreeHead& sth) override; +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + void SetCryptConfig(mojom::CryptConfigPtr crypt_config) override; + #endif + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_network_network__service.cc @@ -0,0 +1,20 @@ +--- src/3rdparty/chromium/services/network/network_service.cc.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/network/network_service.cc +@@ -38,7 +38,7 @@ + #include "third_party/boringssl/src/include/openssl/cpu.h" + #endif + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)) || defined(OS_BSD) + #include "components/os_crypt/key_storage_config_linux.h" + #include "components/os_crypt/os_crypt.h" + #endif +@@ -367,7 +367,7 @@ void NetworkService::UpdateSignedTreeHead(const net::c + sth_distributor_->NewSTHObserved(sth); + } + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + void NetworkService::SetCryptConfig(mojom::CryptConfigPtr crypt_config) { + #if !defined(IS_CHROMECAST) && !defined(TOOLKIT_QT) + auto config = std::make_unique(); 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 =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.h @@ -0,0 +1,20 @@ +--- 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 SERVICES_SERVICE_MANAGER_EMBEDDER_SET_PROCESS_TITLE_LINUX_H_ + #define SERVICES_SERVICE_MANAGER_EMBEDDER_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_services_service__manager_embedder_set__process__title__linux.cc =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_embedder_set__process__title__linux.cc @@ -0,0 +1,19 @@ +--- 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; + + 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_services_service__manager_public_cpp_standalone__service_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_standalone__service_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/service_manager/public/cpp/standalone_service/BUILD.gn.orig 2019-01-11 08:38:15 UTC ++++ src/3rdparty/chromium/services/service_manager/public/cpp/standalone_service/BUILD.gn +@@ -25,7 +25,7 @@ source_set("standalone_service") { + "//services/service_manager/public/mojom", + ] + +- if (is_linux) { ++ if (is_linux && !is_bsd) { + deps += [ + "//sandbox/linux:sandbox", + "//sandbox/linux:sandbox_services", Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_public_cpp_standalone__service_standalone__service.cc =================================================================== --- /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 +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_runner_host_BUILD.gn @@ -1,11 +1,11 @@ ---- 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.orig 2018-11-13 18:25:11 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", +@@ -31,7 +31,7 @@ source_set("lib") { + "//mojo/public/cpp/system", ] -- if (is_linux && !is_android) { -+ if (is_linux && !is_android && !is_bsd) { - sources += [ - "linux_sandbox.cc", - "linux_sandbox.h", +- if (is_linux) { ++ if (is_linux && !is_bsd) { + deps += [ "//sandbox/linux:sandbox_services" ] + } + Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_BUILD.gn =================================================================== --- /dev/null +++ www/qt5-webengine/files/patch-src_3rdparty_chromium_services_service__manager_sandbox_BUILD.gn @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/services/service_manager/sandbox/BUILD.gn.orig 2018-11-13 18:25:11 UTC ++++ src/3rdparty/chromium/services/service_manager/sandbox/BUILD.gn +@@ -28,7 +28,7 @@ component("sandbox") { + "//base", + "//sandbox:common", + ] +- if (is_linux) { ++ if (is_linux && !is_bsd) { + sources += [ + "linux/bpf_base_policy_linux.cc", + "linux/bpf_base_policy_linux.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_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 +++ /dev/null @@ -1,18 +0,0 @@ ---- src/3rdparty/chromium/services/ui/BUILD.gn.orig 2017-01-26 00:49:17 UTC -+++ src/3rdparty/chromium/services/ui/BUILD.gn -@@ -13,7 +13,6 @@ group("all") { - testonly = true - deps = [ - ":ui", -- "//services/ui/ime/test_ime_driver", - "//services/ui/test_wm", - ] - } -@@ -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 +++ /dev/null @@ -1,10 +0,0 @@ ---- src/3rdparty/chromium/services/ui/ime/BUILD.gn.orig 2017-01-26 00:49:17 UTC -+++ src/3rdparty/chromium/services/ui/ime/BUILD.gn -@@ -50,7 +50,6 @@ test("mus_ime_unittests") { - ":test_manifest", - ":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 +++ /dev/null @@ -1,46 +0,0 @@ ---- src/3rdparty/chromium/skia/BUILD.gn.orig 2017-01-26 00:49:17 UTC -+++ src/3rdparty/chromium/skia/BUILD.gn -@@ -135,7 +135,7 @@ config("skia_library_config") { - } - - # Settings for text blitting, chosen to approximate the system browser. -- if (is_linux) { -+ if (is_linux || is_bsd) { - 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" ] - } - -- 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") { - - # 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", - ] - } - -- 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) { -+ if (is_linux || is_bsd) { - if (use_pango) { - configs += [ "//build/config/linux/pangocairo" ] - } 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