Page MenuHomeFreeBSD

D18757.id55415.diff
No OneTemporary

D18757.id55415.diff

This file is larger than 256 KB, so syntax highlighting was skipped.
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<base::SingleThreadTaskRunner> task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
- AudioLogFactory* audio_log_factory);
+ AudioManagerOpenBSD(std::unique_ptr<AudioThread> 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<base::SingleThreadTaskRunner> task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
- AudioLogFactory* audio_log_factory)
- : AudioManagerBase(std::move(task_runner),
- std::move(worker_task_runner),
+AudioManagerOpenBSD::AudioManagerOpenBSD(std::unique_ptr<AudioThread> 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<base::SingleThreadTaskRunner> task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
+std::unique_ptr<media::AudioManager> CreateAudioManager(
+ std::unique_ptr<AudioThread> 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<AudioManagerPulse, AudioManagerDeleter> 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<AudioManagerOpenBSD>(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<FakeAudioManager>(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_<foo>`
# 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<DecoderBuffer> {
- 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<uint8_t*>(
-- 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<uint8_t*>(
-- 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("<NULL>", 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<int*>(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<ThreadData*>(NULL));
-+ DCHECK_EQ(this->next_retired_worker_, static_cast<ThreadData*>(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<Births*>(NULL), birth);
-+ EXPECT_EQ(static_cast<Births*>(NULL), birth);
- else
-- EXPECT_NE(reinterpret_cast<Births*>(NULL), birth);
-+ EXPECT_NE(static_cast<Births*>(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<AudioOutputStream*>(NULL)));
+ .WillRepeatedly(Return(static_cast<AudioOutputStream*>(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<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat0,
cmap_id) {
}
-@@ -563,7 +563,7 @@
+@@ -563,7 +563,7 @@ CMapTable::CMapFormat2::Builder::Builder(WritableFontD
: CMapTable::CMap::Builder(data ? down_cast<WritableFontData*>(
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<ReadableFontData*>(
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<int32_t>* glyph_id_array,
const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(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<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(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<Task *>::iterator it;
- it = std::remove(tasks_.begin(),
- tasks_.end(),
-- reinterpret_cast<Task *>(NULL));
-+ static_cast<Task *>(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 <atomic> if using newer C++ library than sysroot, except if
+ # building inside the cros_sdk environment - use host_toolchain as a
+ # more robust check for this.
+- if (!use_sysroot && (is_android || (is_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<const allocator::AllocatorDispatch*>(
+-#if defined(OS_LINUX) && defined(__clang__)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(__clang__)
+ *static_cast<const volatile subtle::AtomicWord*>(&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 <malloc.h>
+#include <stdio.h>
+#include <stdlib.h>
@@ -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 <malloc.h>
+ #endif
- #include "base/allocator/allocator_shim.h"
-
--#include <malloc.h>
- #include <stdlib.h>
- #include <string.h>
-
-@@ -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<uintptr_t>(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<uintptr_t>(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<char*>(realloc(nullptr, 71));
-@@ -240,8 +243,10 @@ TEST_F(AllocatorShimTest, InterceptLibcS
+ char* realloc_ptr = static_cast<char*>(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<std::string> ElfSegmentBuildIDNoteAsString(co
+ const void* section_end = segment.data() + segment.size_bytes();
+ const Nhdr* note_header = reinterpret_cast<const Nhdr*>(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<const Nhdr*>(
+ reinterpret_cast<const char*>(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 <sys/stdint.h>
+ #include <unistd.h>
+ #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 <AvailabilityMacros.h>
+ #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 <memory>
++
+ #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<FilePathWatcherKQueue>();
++ }
++ 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<PlatformDelegate> 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<icu::TimeZone> 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<uintptr_t>(info->si_addr);
+ #else // OS_POSIX && !OS_MACOSX
+- ucontext_t* context = reinterpret_cast<ucontext_t*>(context_ptr);
++ struct ucontext_t* context = reinterpret_cast<ucontext_t*>(context_ptr);
+ #if defined(ARCH_CPU_X86)
+ crash_addr = static_cast<uintptr_t>(context->uc_mcontext.gregs[REG_EIP]);
+ #elif defined(ARCH_CPU_X86_64)
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 <errno.h>
++#include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
++#include <sys/ucred.h>
+ #if !defined(OS_NACL_NONSFI)
+ #include <sys/un.h>
+ #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<struct ucred*>(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<struct ucred*>(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 <stddef.h>
- #include <stdint.h>
- #include <sys/socket.h>
- #include <sys/types.h>
-+#if defined(OS_BSD)
-+#include <signal.h>
-+#endif
- #include <unistd.h>
-
- #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 <stdint.h>
+ #include <sys/socket.h>
+ #include <sys/types.h>
++#if defined(OS_BSD)
++#include <signal.h>
++#endif
+ #include <unistd.h>
+
+ #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 <sys/sysctl.h>
@@ -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 <kvm.h>
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#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 <mach/mach.h>
- #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/<pid>/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/<pid>/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 <unistd.h> /* getpagesize() */
+#include <fcntl.h> /* O_RDONLY */
++#include <kvm.h>
+
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> 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 <malloc/malloc.h>
++#elif defined(OS_FREEBSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #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 <sys/event.h>
- #endif
-
-+#if defined(OS_BSD)
-+#include <signal.h>
-+#include <sys/types.h>
-+#include <sys/event.h>
-+#include <sys/time.h>
-+#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<int64_t>((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<int64_t>(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<uint64_t>(limit);
++ return static_cast<int64_t>((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<uint64_t>(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<int, NumberOfProcessors> >::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 <pthread.h>
+#if !defined(OS_BSD)
#include <sys/prctl.h>
@@ -10,21 +10,12 @@
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/types.h>
-@@ -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 <utility>
+
+ #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<SingleThreadTaskRunner> 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<SingleThreadTaskRunner> 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 <malloc/malloc.h>
#else
@@ -9,3 +9,13 @@
#endif
#if defined(OS_WIN)
#include <windows.h>
+@@ -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<char[]> 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<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
+ new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]);
+-#elif defined(OS_MACOSX)
++#elif defined(OS_MACOSX) || defined(OS_BSD)
+ std::unique_ptr<char[]> vec(new char[max_vec_size]);
+ #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
+ std::unique_ptr<unsigned char[]> 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
</message>
<!-- ProcessSingleton -->
- <if expr="is_linux or is_macosx">
-+ <if expr="is_linux or is_macosx or is_bsd">
++ <if expr="is_linux or is_macosx or is_posix">
<message name="IDS_PROFILE_IN_USE_POSIX" desc="Message shown when the browser cannot start because the profile is in use on a different host.">
The profile appears to be in use by another Chromium process (<ph name="PROCESS_ID">$1<ex>12345</ex></ph>) on another computer (<ph name="HOST_NAME">$2<ex>example.com</ex></ph>). 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.
</message>
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
- <message name="IDS_FLAGS_FORCE_UI_DIRECTION_RTL" desc="Name for the option to force right-to-left UI direction mode.">
- Right-to-left
- </message>
-- <if expr="is_win or is_linux">
-+ <if expr="is_win or is_linux or is_bsd">
- <message name="IDS_FLAGS_ENABLE_INPUT_IME_API_NAME" desc="Name of the flag to enable che chrome.input.ime API.">
- Enable Input IME API
- </message>
-@@ -10334,7 +10334,7 @@ I don't think this site should be blocke
- <message name="IDS_APPEARANCE_GROUP_NAME" desc="The title of the appearance group">
- Appearance
- </message>
-- <if expr="not is_linux or chromeos">
-+ <if expr="not is_linux or not is_bsd or chromeos">
- <message name="IDS_THEMES_GROUP_NAME" desc="The title of the themes group">
- Themes
+@@ -5208,7 +5208,7 @@ the Bookmarks menu.">
</message>
-@@ -10342,7 +10342,7 @@ I don't think this site should be blocke
- <message name="IDS_THEMES_RESET_BUTTON" desc="The button to reset your theme">
- Reset to default theme
+ </if>
+
+- <if expr="is_win or (is_linux and not chromeos)">
++ <if expr="is_win or (is_posix and not chromeos)">
+ <!-- Confirm to quit panel -->
+ <message name="IDS_CONFIRM_TO_QUIT_DESCRIPTION" desc="Instructions for how the user should confirm quitting.">
+ Hold |<ph name="ACCELERATOR1">$1<ex>Ctrl</ex></ph>|+|<ph name="ACCELERATOR2">$2<ex>Shift</ex></ph>|+|<ph name="ACCELERATOR3">$3<ex>Q</ex></ph>| to exit
+@@ -6064,7 +6064,7 @@ the Bookmarks menu.">
+ Google Pay
</message>
+
- <if expr="is_linux and not chromeos">
-+ <if expr="is_linux or is_bsd and not chromeos">
- <message name="IDS_THEMES_GTK_BUTTON" desc="The button to choose GTK colors and icons as the current theme.">
- Use GTK+ theme
++ <if expr="is_posix and not chromeos">
+ <message name="IDS_SHOW_WINDOW_DECORATIONS" desc="The label of a radio button in the options dialog for using the system title bar and borders.">
+ Use system title bar and borders
</message>
-@@ -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
</message>
- <if expr="is_linux and not chromeos">
-+ <if expr="is_linux or is_bsd and not chromeos">
- <message name="IDS_SHOW_WINDOW_DECORATIONS_MENU" desc="The menu entry text in the tab strip context menu. This toggles the system title bar and window borders (window decorations) on linux.">
- Use system title bar and borders
++ <if expr="is_posix and not chromeos">
+ <message name="IDS_MINIMIZE_WINDOW_MENU" desc="The Linux browser window menu item text for minimizing the window.">
+ Minimize
</message>
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
+ </message>
+
+ <!-- ProcessSingleton -->
+- <if expr="is_linux or is_macosx">
++ <if expr="is_linux or is_macosx or is_posix">
+ <message name="IDS_PROFILE_IN_USE_POSIX" desc="Message shown when the browser cannot start because the profile is in use on a different host.">
+ The profile appears to be in use by another Google Chrome process (<ph name="PROCESS_ID">$1<ex>12345</ex></ph>) on another computer (<ph name="HOST_NAME">$2<ex>example.com</ex></ph>). 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.
+ </message>
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
- </message>
-
-- <if expr="is_win or is_linux or chromeos">
-+ <if expr="is_win or is_linux or chromeos or is_bsd">
- <!-- The width of the ash/ChromeOS system tray menu in pixels. -->
- <message name="IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS" use_name_for_id="true">
- 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
+ </message>
+ </if>
+- <if expr="is_linux and not chromeos">
++ <if expr="is_posix and not chromeos">
+ <message name="IDS_SETTINGS_SYSTEM_THEME" desc="Text of the label describing the system (GTK+) browser theme on Linux">
+ GTK+
+ </message>
+@@ -522,7 +522,7 @@
+ Use Classic
+ </message>
+ </if>
+- <if expr="not is_linux or chromeos">
++ <if expr="not is_posix or chromeos">
+ <message name="IDS_SETTINGS_RESET_TO_DEFAULT_THEME" desc="Name of the control which resets the browser theme back to the default theme.">
+ Reset to default
+ </message>
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 @@
+ <include name="IDR_PROFILE_AVATAR_2X_25" file="default_200_percent/common/profile_avatar_sun_cloud.png" type="BINDATA" />
+ <include name="IDR_PROFILE_AVATAR_2X_26" file="default_200_percent/common/profile_avatar_placeholder.png" type="BINDATA" />
+ </if>
+- <if expr="is_linux and enable_app_list">
++ <if expr="is_posix and enable_app_list">
+ <!-- App Launcher icons for desktop icon. -->
+ <if expr="_google_chrome">
+ <then>
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::LazyInstance<scoped_refptr<StorageDeviceL
+
+ void RemovableStorageProvider::GetAllDevices(DeviceListReadyCallback callback) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
++#if !defined(OS_BSD)
+ if (g_test_device_list.Get().get() != nullptr) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ 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 <sys/types.h>
-+#include <net/if_dl.h>
-+#endif
- #include <ifaddrs.h>
- #include <net/if.h>
- #include <stddef.h>
-@@ -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<const char*>(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<NaClUI>;
+ #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<ConstrainedWebDialogUI>;
+ #endif
+@@ -630,12 +630,12 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we
+ return &NewWebUI<CastUI>;
+ }
+ #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<SandboxInternalsUI>;
+ }
+ #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<DiscardsUI>;
+ #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<SkTypeface> 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<SkFontMgr> font_mgr(SkFontMgr::RefDefault());
- typeface_ = sk_sp<SkTypeface>(
- 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 <re2/re2.h>
+#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 <stddef.h>
+ #include <sys/types.h>
++#if !defined(OS_BSD)
+ #include <sys/xattr.h>
++#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<ssize_t>(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 <re2/re2.h>
+#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;
--<if expr="is_macosx or is_ios or is_linux or is_android">
-+<if expr="is_macosx or is_ios or is_linux or is_android or is_bsd">
+-// <if expr="is_macosx or is_ios or is_linux or is_android">
++// <if expr="is_macosx or is_ios or is_linux or is_android or is_bsd">
primaryControlOnLeft = false;
- </if>
+ // </if>
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<os_crypt::Config> 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 <re2/re2.h>
+#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<StorageInfo> 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<std::string> 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 <re2/re2.h>
+#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 <X11/Xlib.h>
- #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<MemoryCoordinator> {
- 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<MemoryMonitor> 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<ui::TextEditCommandAuraLinux> 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<WebUIMessageHandler> 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 <sys/stat.h>
++#include <unistd.h>
+
+ #include <limits>
+ #include <memory>
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 <errno.h>
- #include <signal.h>
- #include <stddef.h>
-+#if 0 // no OS_FREEBSD here?
- #include <sys/prctl.h>
-+#endif
- #include <unistd.h>
-
- #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<BrokerFilePermission>* 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<SandboxSupport> sandbox_support_;
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ sk_sp<font_service::FontLoader> 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_service::FontLoader> 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<font_service::FontLoader>(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<void(const base::ListValue*)>;
+- 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<base::DictionaryValue> 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 <stddef.h>
++#include <stdint.h>
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#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<FileUtilities> file_utilities_;
+@@ -265,7 +265,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi
+ std::unique_ptr<blink::WebThread> main_thread_;
+ std::unique_ptr<service_manager::Connector> 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<SandboxSupport> 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 <map>
#include <string>
-@@ -201,7 +201,7 @@ class RendererBlinkPlatformImpl::FileUti
- scoped_refptr<ThreadSafeSender> 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_service::FontLoader> 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 <sys/mount.h>
- #include <sys/param.h>
- #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<LocationProvider>
- 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<icu::TimeZone> 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<icu::TimeZone> 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<libusb_error>(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<UsbDeviceImpl> device);
void RemoveDevice(scoped_refptr<UsbDeviceImpl> 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 <libusb.h>
-+#else
-+# include "third_party/libusb/src/libusb/libusb.h"
-+#endif
+@@ -239,8 +239,10 @@ UsbServiceImpl::UsbServiceImpl()
+ }
- #if defined(OS_WIN)
- #include <setupapi.h>
-@@ -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_refptr<UsbCon
+
+ context_ = std::move(context);
+#if !defined(OS_FREEBSD)
- rv = libusb_hotplug_register_callback(
+ int rv = libusb_hotplug_register_callback(
context_->context(),
static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
-@@ -225,6 +230,8 @@ UsbServiceImpl::UsbServiceImpl(
- }
+@@ -307,6 +310,7 @@ void UsbServiceImpl::OnUsbContext(scoped_refptr<UsbCon
+ // This will call any enumeration callbacks queued while initializing.
RefreshDevices();
+#endif // !defined(OS_FREEBSD)
-+
+
#if defined(OS_WIN)
DeviceMonitorWin* device_monitor = DeviceMonitorWin::GetForAllInterfaces();
- if (device_monitor) {
-@@ -234,8 +241,10 @@ UsbServiceImpl::UsbServiceImpl(
- }
-
- UsbServiceImpl::~UsbServiceImpl() {
-+#if !defined(OS_FREEBSD)
- if (hotplug_enabled_)
- libusb_hotplug_deregister_callback(context_->context(), 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_refptr<UsbDev
device->OnDisconnect();
}
+#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 <re2/re2.h>
+#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<device::SerialDeviceEnumerator> enumerator =
- device::SerialDeviceEnumerator::Create();
- mojo::Array<device::serial::DeviceInfoPtr> devices = enumerator->GetDevices();
- results_ = serial::GetDevices::Results::Create(
- devices.To<std::vector<serial::DeviceInfo>>());
-+#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 <re2/re2.h>
+#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 <re2/re2.h>
+#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 <re2/re2.h>
+#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<gfx::ClientNativePixmapFactory>
+ 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<gfx::ClientNativePixmapFactory> 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<gfx::ClientNativePixmapFactory>
+ 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<base::CommandLine*>(&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<unsigned int> {
- // 3) Android 64 bit also has int64_t typedef'd to long.
+@@ -203,7 +203,7 @@ struct ParamTraits<unsigned int> {
+ // 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<long> {
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<unsigned int>::Log(cons
- l->append(base::UintToString(p));
+@@ -348,7 +348,7 @@ void ParamTraits<unsigned int>::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<long>::Log(const param_type& p, std::string* l) {
- l->append(base::Int64ToString(static_cast<int64_t>(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<base::SingleThreadTaskRunner> 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<base::win::ScopedCOMInitializer> 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<base::ScopedFD> DuplicateFDs(
+ const std::vector<base::ScopedFD>& 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> VideoFrame::WrapExternalYuva
+ return frame;
+ }
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // static
+ scoped_refptr<VideoFrame> VideoFrame::WrapExternalDmabufs(
+ VideoPixelFormat format,
+@@ -488,7 +488,7 @@ scoped_refptr<VideoFrame> 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<int> VideoFrame::DmabufFds() const {
+ DCHECK_EQ(storage_type_, STORAGE_DMABUFS);
+ std::vector<int> 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 <linux/version.h>
+ #include <linux/videodev2.h>
+#endif
#include <poll.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>
-@@ -20,10 +22,10 @@
- #include "media/capture/video/blob_utils.h"
- #include "media/capture/video/linux/video_capture_device_linux.h"
+ #include <sys/mman.h>
+ #include <utility>
+
+-#if !defined(OS_OPENBSD)
++#if !defined(OS_BSD)
+ #include <linux/version.h>
+ #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<uint32_t>& 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 <sys/videoio.h>
+ #else
+ #include <linux/videodev2.h>
+-#include <linux/version.h>
+ #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<uint32_t> VideoCaptureDeviceLi
+@@ -36,6 +36,7 @@ std::list<uint32_t> 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<V4L2CaptureDevice> v4l2,
+@@ -54,6 +55,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDeviceLinux() {
void VideoCaptureDeviceLinux::AllocateAndStart(
const VideoCaptureParams& params,
std::unique_ptr<VideoCaptureDevice::Client> 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<VideoCaptureDevice::Client> 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>
- VideoCaptureDeviceFactory::CreateFactory(
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
-+#if defined(OS_BSD)
-+ return std::unique_ptr<VideoCaptureDeviceFactory>(
-+ 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<VideoCaptureDeviceFactory>(
- 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<struct ifaddrmsg*>(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<const struct rtattr*>(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<uint8_t*>(RTA_DATA(attr));
+- break;
+- case IFA_LOCAL:
+- DCHECK_GE(RTA_PAYLOAD(attr), address_length);
+- local = reinterpret_cast<uint8_t*>(RTA_DATA(attr));
+- break;
+- case IFA_CACHEINFO: {
+- const struct ifa_cacheinfo *cache_info =
+- reinterpret_cast<const struct ifa_cacheinfo*>(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<struct sockaddr*>(&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<struct sockaddr*>(&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<struct sockaddr*>(&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<int> 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<struct nlmsghdr*>(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<struct nlmsgerr*>(NLMSG_DATA(header));
+- LOG(ERROR) << "Unexpected netlink error " << msg->error << ".";
+- } return;
+- case RTM_NEWADDR: {
+- IPAddress address;
+- bool really_deprecated;
+- struct ifaddrmsg* msg =
+- reinterpret_cast<struct ifaddrmsg*>(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<struct ifaddrmsg*>(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<struct ifinfomsg*>(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<struct ifinfomsg*>(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<int> online_links = GetOnlineLinks();
+-
+- // Strip out tunnel interfaces from online_links
+- for (std::unordered_set<int>::const_iterator it = online_links.begin();
+- it != online_links.end();) {
+- if (IsTunnelInterface(*it)) {
+- std::unordered_set<int>::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 <sys/socket.h>
++
++#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 <ifaddrs.h>
++#include <net/if.h>
++#include <netinet/in.h>
++#include <sys/types.h>
++#include <net/if_media.h>
++#include <net/if_var.h>
++#include <netinet/in_var.h>
++#include <netinet6/in6_var.h>
++#include <sys/ioctl.h>
++
++#include <memory>
++#include <set>
++
++#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<internal::IPAttributesGetterFreeBSD> 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 <memory>
-
-+#if !defined(OS_FREEBSD)
- #if !defined(OS_ANDROID)
- #include <linux/ethtool.h>
- #endif // !defined(OS_ANDROID)
- #include <linux/if.h>
- #include <linux/sockios.h>
- #include <linux/wireless.h>
-+#endif // !defined(OS_FREEBSD)
- #include <set>
- #include <sys/ioctl.h>
- #include <sys/types.h>
-@@ -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 <sys/socket.h>
++
+ #include <string>
+
+ 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 <sys/socket.h> // Must be included before ifaddrs.h.
+@@ -14,6 +14,7 @@
#include <ifaddrs.h>
#include <net/if.h>
-+#include <net/if_var.h>
#include <netinet/in_var.h>
++#include <netinet6/in6_var.h>
#include <string.h>
#include <sys/ioctl.h>
+ #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 <sys/socket.h>
++
+ #if defined(OS_POSIX)
+ #include <netinet/in.h>
+ #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 <errno.h>
+ #include <limits.h>
++#if !defined(OS_BSD)
+ #include <sys/inotify.h>
++#endif
+ #include <unistd.h>
+
+ #include <map>
+@@ -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<UnsetProxyConfigService>();
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ std::unique_ptr<ProxyConfigServiceLinux> 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 <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
-+#if defined(OS_FREEBSD)
-+#include <fcntl.h>
-+#include <sys/types.h>
-+#include <sys/event.h>
-+#include <sys/time.h>
-+#else
- #include <sys/inotify.h>
-+#endif
- #include <unistd.h>
-
- #include <map>
-@@ -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<base::SingleThreadTaskRunner>& 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<std::string> > strings_map_type;
-
- int inotify_fd_;
-+ int config_fd_;
- base::MessagePumpLibevent::FileDescriptorWatcher inotify_watcher_;
- ProxyConfigServiceLinux::Delegate* notify_delegate_;
- std::unique_ptr<base::OneShotTimer> 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<ProxyConfigServiceLinux> 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<const char*>(&mreq.imr_interface.s_addr),
++ sizeof(mreq.imr_interface.s_addr));
++#else
+ reinterpret_cast<const char*>(&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 <ws2bth.h>
+ #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
+ #include <netinet/in.h>
++#include <sys/socket.h>
+ #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<net::URLRequ
+ base::WaitableEvent* initialization_complete_event) {
+ net::URLRequestContextBuilder url_request_context_builder;
+ url_request_context_builder.set_user_agent(GetUserAgent());
+-#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_tools_get__server__time_get__server__time.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_net_tools_get__server__time_get__server__time.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/3rdparty/chromium/net/tools/get_server_time/get_server_time.cc.orig 2017-01-26 00:49:16 UTC
-+++ src/3rdparty/chromium/net/tools/get_server_time/get_server_time.cc
-@@ -46,7 +46,7 @@
-
- #if defined(OS_MACOSX)
- #include "base/mac/scoped_nsautorelease_pool.h"
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #include "net/proxy/proxy_config.h"
- #include "net/proxy/proxy_config_service_fixed.h"
- #endif
-@@ -142,7 +142,7 @@ class PrintingLogObserver : public net::
- std::unique_ptr<net::URLRequestContext> 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<URLRequestContext> 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<URLRequestContext> 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<uint32_t> 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<size_t>(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 <arpa/inet.h>
+@@ -27,6 +27,9 @@
+ #include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
+#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 <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
++#if !defined(OS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <time.h>
+@@ -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<LocationProvider>
+ 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<icu::TimeZone> 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<icu::TimeZone> 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<os_crypt::Config>();
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<mojom::VmRegionPtr> 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<uintptr_t>(&ParseSmapsHeader);
+ if (addr >= region->start_address && addr < end_addr) {
+ base::Optional<std::string> 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_ptr<InitP
- tracing::mojom::StartupPerformanceDataCollectorPtr collector;
- ConnectToInterface(service_manager(), source_identity, tracing_identity,
- &collector);
--#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
-+#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
- // CurrentProcessInfo::CreationTime is only defined on some platforms.
- const base::Time creation_time = base::CurrentProcessInfo::CreationTime();
- collector->SetServiceManagerProcessCreationTime(
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<ZygoteHostImpl>;
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 <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
++#if !defined(OS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -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<std::unique_ptr<ZygoteForkDelegate>> 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 <sys/socket.h>
-+#endif
-+
- #if GTEST_HAS_EXCEPTIONS
- # include <stdexcept>
- #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 <malloc.h>
-+#elif OS(FREEBSD)
-+#include <stdlib.h>
- #else
- #include <alloca.h>
- #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<unsigned,
- std::unique_ptr<FontPlatformData>,
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<OpenTypeVerticalData> verticalData() const;
- PassRefPtr<SharedBuffer> 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<SkTypeface> 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<SkTypeface> 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 <stdlib.h>
-+
- 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 <pthread_np.h>
-+
- #if OS(WIN)
- #include <stddef.h>
- #include <windows.h>
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 <option> background color is the same as the
- // <select> background color. On Linux, that makes the <option>
- // background color very dark, so by default, try to use a lighter
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_Assertions.cpp
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_Assertions.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp.orig 2017-01-26 00:49:28 UTC
-+++ src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp
-@@ -60,7 +60,7 @@
- #include <windows.h>
- #endif
-
--#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
-+#if OS(MACOSX) || ((OS(LINUX) || OS(BSD)) && !defined(__UCLIBC__))
- #include <cxxabi.h>
- #include <dlfcn.h>
- #include <execinfo.h>
-@@ -164,7 +164,7 @@ void WTFReportAssertionFailure(const cha
- }
-
- void WTFGetBacktrace(void** stack, int* size) {
--#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
-+#if OS(MACOSX) || ((OS(LINUX) || OS(BSD)) && !defined(__UCLIBC__))
- *size = backtrace(stack, *size);
- #elif OS(WIN)
- // The CaptureStackBackTrace function is available in XP, but it is not
-@@ -215,7 +215,7 @@ class FrameToNameScope {
- };
-
- FrameToNameScope::FrameToNameScope(void* addr) : m_name(0), m_cxaDemangled(0) {
--#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
-+#if OS(MACOSX) || ((OS(LINUX) || OS(BSD)) && !defined(__UCLIBC__))
- Dl_info info;
- if (!dladdr(addr, &info) || !info.dli_sname)
- return;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_Atomics.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_Atomics.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/WebKit/Source/wtf/Atomics.h.orig 2017-01-26 00:49:28 UTC
-+++ src/3rdparty/chromium/third_party/WebKit/Source/wtf/Atomics.h
-@@ -176,7 +176,7 @@ ALWAYS_INLINE void atomicSetOneToZero(in
- #if defined(THREAD_SANITIZER)
- // The definitions below assume an LP64 data model. This is fine because
- // TSan is only supported on x86_64 Linux.
--#if CPU(64BIT) && OS(LINUX)
-+#if CPU(64BIT) && (OS(LINUX) || OS(BSD))
- ALWAYS_INLINE void releaseStore(volatile int* ptr, int value) {
- __tsan_atomic32_store(ptr, value, __tsan_memory_order_release);
- }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/3rdparty/chromium/third_party/WebKit/Source/wtf/BUILD.gn.orig 2017-01-26 00:49:28 UTC
-+++ src/3rdparty/chromium/third_party/WebKit/Source/wtf/BUILD.gn
-@@ -284,6 +284,10 @@ component("wtf") {
- libs = [ "dl" ]
- }
-
-+ if (is_bsd) {
-+ libs = [ "execinfo" ]
-+ }
-+
- if (is_mac) {
- libs = [
- "CoreFoundation.framework",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_ByteSwap.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_ByteSwap.h
+++ /dev/null
@@ -1,24 +0,0 @@
---- src/3rdparty/chromium/third_party/WebKit/Source/wtf/ByteSwap.h.orig 2017-01-26 00:49:28 UTC
-+++ src/3rdparty/chromium/third_party/WebKit/Source/wtf/ByteSwap.h
-@@ -60,15 +60,21 @@ ALWAYS_INLINE uint16_t bswap16(uint16_t
-
- #else
-
-+#ifndef bswap64
- ALWAYS_INLINE uint64_t bswap64(uint64_t x) {
- return __builtin_bswap64(x);
- }
-+#endif
-+#ifndef bswap32
- ALWAYS_INLINE uint32_t bswap32(uint32_t x) {
- return __builtin_bswap32(x);
- }
-+#endif
-+#ifndef bswap16
- ALWAYS_INLINE uint16_t bswap16(uint16_t x) {
- return __builtin_bswap16(x);
- }
-+#endif
-
- #endif
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_ContainerAnnotations.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_ContainerAnnotations.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/WebKit/Source/wtf/ContainerAnnotations.h.orig 2017-01-26 00:49:28 UTC
-+++ src/3rdparty/chromium/third_party/WebKit/Source/wtf/ContainerAnnotations.h
-@@ -10,7 +10,7 @@
-
- // TODO(ochang): Remove the CPU(X86_64) condition to enable this for X86 once
- // the crashes there have been fixed: http://crbug.com/461406
--#if defined(ADDRESS_SANITIZER) && OS(LINUX) && CPU(X86_64)
-+#if defined(ADDRESS_SANITIZER) && (OS(LINUX) || OS(BSD)) && CPU(X86_64)
- #define ANNOTATE_CONTIGUOUS_CONTAINER
- #define ANNOTATE_NEW_BUFFER(buffer, capacity, newSize) \
- if (buffer) { \
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/3rdparty/chromium/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp.orig 2017-01-26 00:49:28 UTC
-+++ src/3rdparty/chromium/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp
-@@ -49,11 +49,15 @@
- #include <objc/objc-auto.h>
- #endif
-
--#if OS(LINUX)
-+#if OS(LINUX) || OS(BSD)
- #include <sys/syscall.h>
- #endif
-
--#if OS(LINUX) || OS(ANDROID)
-+#if OS(BSD)
-+#include <pthread_np.h>
-+#endif
-+
-+#if OS(LINUX) || OS(ANDROID) || OS(BSD)
- #include <unistd.h>
- #endif
-
-@@ -91,6 +95,8 @@ ThreadIdentifier currentThread() {
- return pthread_mach_thread_np(pthread_self());
- #elif OS(LINUX)
- return syscall(__NR_gettid);
-+#elif OS(BSD)
-+ return pthread_getthreadid_np();
- #elif OS(ANDROID)
- return gettid();
- #else
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_BUILD.gn
@@ -1,37 +1,31 @@
---- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig 2017-01-26 00:50:09 UTC
+--- src/3rdparty/chromium/third_party/angle/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/angle/BUILD.gn
-@@ -16,6 +16,12 @@ if (ozone_platform_gbm) {
- }
- }
+@@ -266,7 +266,8 @@ static_library("angle_gpu_info_util") {
+ sources +=
+ rebase_path(gles_gypi.libangle_gpu_info_util_linux_sources, ".", "src")
-+if (use_x11) {
-+ pkg_config("x11") {
-+ packages = [ "x11", "xi", "xext" ]
-+ }
-+}
-+
- angle_git_is_present = exec_script("src/commit_id.py",
- [
- "check",
-@@ -340,11 +346,7 @@ static_library("libANGLE") {
- if (use_x11) {
- sources += rebase_path(gles_gypi.libangle_gl_glx_sources, ".", "src")
+- if (use_x11) {
++ # Somewhere "use_x11" is set to false, so we need to add is_bsd here
++ if (use_x11 || is_bsd) {
+ sources +=
+ rebase_path(gles_gypi.libangle_gpu_info_util_x11_sources, ".", "src")
deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
+@@ -275,6 +276,7 @@ static_library("angle_gpu_info_util") {
+ "X11",
+ "Xi",
+ "Xext",
++ "GL",
+ ]
+ }
+ }
+@@ -842,10 +844,6 @@ foreach(is_shared_library,
+ libs = []
+ if (is_linux) {
+ sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
- libs += [
-- "X11",
-- "Xi",
-- "Xext",
+- "rt",
+- "dl",
- ]
-+ configs += [ ":x11" ]
}
- if (is_mac) {
- sources += rebase_path(gles_gypi.libangle_gl_cgl_sources, ".", "src")
-@@ -486,7 +488,7 @@ util_gypi = exec_script("//build/gypi_to
- config("angle_util_config") {
- include_dirs = [ "util" ]
-- if (is_linux && use_x11) {
-+ if ((is_linux || is_bsd) && use_x11) {
- libs = [ "X11" ]
- }
- }
+ if (is_mac) {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_gni_angle.gni
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_gni_angle.gni
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/angle/gni/angle.gni.orig 2017-01-26 00:50:09 UTC
-+++ src/3rdparty/chromium/third_party/angle/gni/angle.gni
-@@ -20,6 +20,8 @@ if (is_win) {
- import("//build/config/win/visual_studio_version.gni")
- } else if (is_linux && use_x11 && !is_chromeos) {
- angle_enable_gl = true
-+} else if (is_bsd) {
-+ angle_enable_gl = true
- } else if (is_mac || ozone_platform_gbm) {
- angle_enable_gl = true
- } else if (is_android) {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__internal.h
@@ -0,0 +1,16 @@
+--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_internal.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_internal.h
+@@ -14,8 +14,13 @@
+ namespace angle
+ {
+
++bool CollectMesaCardInfo(std::vector<GPUDeviceInfo> *devices);
++
+ // Defined in SystemInfo_libpci when GPU_INFO_USE_LIBPCI is defined.
+ bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices);
++#if defined(__FreeBSD__)
++bool GetPCIDevicesFreeBSD(std::vector<GPUDeviceInfo> *devices);
++#endif
+ // Defined in SystemInfo_x11 when GPU_INFO_USE_X11 is defined.
+ bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version);
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp
@@ -0,0 +1,90 @@
+--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_libpci.cpp
+@@ -12,6 +12,11 @@
+ #include <pci/pci.h>
+ #include <unistd.h>
+
++#if defined(__FreeBSD__)
++#include <fcntl.h>
++#include <sys/pciio.h>
++#endif
++
+ #include "common/angleutils.h"
+ #include "common/debug.h"
+
+@@ -82,6 +87,75 @@ struct LibPCI : private angle::NonCopyable
+ };
+
+ } // anonymous namespace
++
++#if defined(__FreeBSD__)
++// Adds an entry per PCI GPU found and fills the device and vendor ID.
++bool GetPCIDevicesFreeBSD(std::vector<GPUDeviceInfo> *devices)
++{
++ int fd;
++ struct pci_conf_io conf;
++ struct pci_conf *matches;
++ uint32_t offset = 0;
++
++ fd = open("/dev/pci", O_RDONLY);
++ if (fd < 0)
++ return false;
++
++ matches = new struct pci_conf[32];
++ conf.generation = 0;
++ do {
++ conf.pat_buf_len = 0;
++ conf.num_patterns = 0;
++ conf.patterns = NULL;
++ conf.match_buf_len = 32 * sizeof(struct pci_conf);
++ conf.num_matches = 32;
++ conf.matches = matches;
++ conf.offset = offset;
++ conf.status = PCI_GETCONF_ERROR;
++ if (ioctl(fd, PCIOCGETCONF, &conf) < 0) {
++ if (errno == ENODEV)
++ break;
++ }
++ /* PCI_GETCONF_LIST_CHANGED would require us to start over. */
++ if (conf.status == PCI_GETCONF_ERROR || conf.status == PCI_GETCONF_LIST_CHANGED) {
++ break;
++ }
++
++ for (unsigned int i = 0; i < conf.num_matches; i++) {
++ uint16_t device_class = (matches[i].pc_class << 8) | matches[i].pc_subclass;
++
++ // Skip non-GPU devices
++ switch (device_class)
++ {
++ case PCI_CLASS_DISPLAY_VGA:
++ case PCI_CLASS_DISPLAY_XGA:
++ case PCI_CLASS_DISPLAY_3D:
++ break;
++ default:
++ continue;
++ }
++
++ // Skip unknown devices
++ if (matches[i].pc_vendor == 0 || matches[i].pc_device == 0) {
++ continue;
++ }
++
++ GPUDeviceInfo info;
++ info.vendorId = matches[i].pc_vendor;
++ info.deviceId = matches[i].pc_device;
++
++ devices->push_back(info);
++ }
++ offset += conf.num_matches;
++ } while (conf.status == PCI_GETCONF_MORE_DEVS);
++
++ delete[] matches;
++
++ close(fd);
++
++ return true;
++}
++#endif
+
+ // Adds an entry per PCI GPU found and fills the device and vendor ID.
+ bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
@@ -0,0 +1,21 @@
+--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp
+@@ -71,10 +71,18 @@ bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo
+
+ bool GetSystemInfo(SystemInfo *info)
+ {
++#if defined(__FreeBSD__)
++ if (!CollectMesaCardInfo(&(info->gpus)))
++ {
++ if (!GetPCIDevicesFreeBSD(&(info->gpus)))
++ return false;
++ }
++#else
+ if (!GetPCIDevicesWithLibPCI(&(info->gpus)))
+ {
+ return false;
+ }
++#endif
+
+ if (info->gpus.size() == 0)
+ {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp
@@ -0,0 +1,56 @@
+--- src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/angle/src/gpu_info_util/SystemInfo_x11.cpp
+@@ -8,6 +8,8 @@
+
+ #include "gpu_info_util/SystemInfo_internal.h"
+
++#include <GL/glx.h>
++#include <GL/glxext.h>
+ #include <X11/Xlib.h>
+
+ #include "common/debug.h"
+@@ -18,8 +20,44 @@
+ #error SystemInfo_x11.cpp compiled without GPU_INFO_USE_X11
+ #endif
+
++#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
++#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
++
+ namespace angle
+ {
++
++bool CollectMesaCardInfo(std::vector<GPUDeviceInfo> *devices)
++{
++
++ unsigned int vid[3], did[3];
++
++ Display *display = XOpenDisplay(NULL);
++ if (!display) {
++ return false;
++ }
++
++ PFNGLXQUERYRENDERERINTEGERMESAPROC queryInteger =
++ (PFNGLXQUERYRENDERERINTEGERMESAPROC) glXGetProcAddressARB((const GLubyte *)
++ "glXQueryRendererIntegerMESA");
++
++ if (!queryInteger)
++ return false;
++
++ bool vendor_ret =
++ queryInteger(display, 0, 0, GLX_RENDERER_VENDOR_ID_MESA, vid);
++ bool device_ret =
++ queryInteger(display, 0, 0, GLX_RENDERER_DEVICE_ID_MESA, did);
++
++ if (vendor_ret && device_ret) {
++ GPUDeviceInfo info;
++ info.vendorId = vid[0];
++ info.deviceId = did[0];
++ devices->push_back(info);
++ }
++
++ return true;
++}
++
+
+ bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version)
+ {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_Display.cpp
@@ -0,0 +1,20 @@
+--- src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/angle/src/libANGLE/Display.cpp
+@@ -63,7 +63,7 @@
+ #if defined(ANGLE_ENABLE_VULKAN)
+ #if defined(ANGLE_PLATFORM_WINDOWS)
+ #include "libANGLE/renderer/vulkan/win32/DisplayVkWin32.h"
+-#elif defined(ANGLE_PLATFORM_LINUX)
++#elif defined(ANGLE_PLATFORM_POSIX)
+ #include "libANGLE/renderer/vulkan/xcb/DisplayVkXcb.h"
+ #elif defined(ANGLE_PLATFORM_ANDROID)
+ #include "libANGLE/renderer/vulkan/android/DisplayVkAndroid.h"
+@@ -211,7 +211,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(const Attrib
+ #if defined(ANGLE_ENABLE_VULKAN)
+ #if defined(ANGLE_PLATFORM_WINDOWS)
+ impl = new rx::DisplayVkWin32(state);
+-#elif defined(ANGLE_PLATFORM_LINUX)
++#elif defined(ANGLE_PLATFORM_POSIX)
+ impl = new rx::DisplayVkXcb(state);
+ #elif defined(ANGLE_PLATFORM_ANDROID)
+ impl = new rx::DisplayVkAndroid(state);
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_renderergl__utils.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_libANGLE_renderer_gl_renderergl__utils.cpp
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp
+@@ -1127,7 +1127,7 @@ void GenerateWorkarounds(const FunctionsGL *functions,
+ workarounds->doesSRGBClearsOnLinearFramebufferAttachments =
+ functions->standard == STANDARD_GL_DESKTOP && (IsIntel(vendor) || IsAMD(vendor));
+
+-#if defined(ANGLE_PLATFORM_LINUX)
++#if defined(ANGLE_PLATFORM_POSIX)
+ workarounds->emulateMaxVertexAttribStride =
+ functions->standard == STANDARD_GL_DESKTOP && IsAMD(vendor);
+ workarounds->useUnusedBlocksWithStandardOrSharedLayout = IsAMD(vendor);
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_tests_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_angle_src_tests_BUILD.gn
+++ /dev/null
@@ -1,65 +0,0 @@
---- src/3rdparty/chromium/third_party/angle/src/tests/BUILD.gn.orig 2017-01-26 00:50:09 UTC
-+++ src/3rdparty/chromium/third_party/angle/src/tests/BUILD.gn
-@@ -41,7 +41,7 @@ test("angle_unittests") {
- ]
- }
-
--if (is_win || is_linux || is_mac || is_android) {
-+if (is_win || is_linux || is_mac || is_android || is_bsd) {
- end2end_gypi = exec_script("//build/gypi_to_gn.py",
- [
- rebase_path("angle_end2end_tests.gypi"),
-@@ -82,7 +82,7 @@ if (is_win || is_linux || is_mac || is_a
- "//third_party/angle:libANGLE_config",
- ]
-
-- if (is_linux && !is_component_build) {
-+ if ((is_linux || is_bsd) && !is_component_build) {
- # Set rpath to find libEGL.so and libGLESv2.so even in a non-component build.
- configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
- }
-@@ -175,7 +175,7 @@ if (build_angle_deqp_tests) {
- # Ask the system headers to expose all the regular function otherwise
- # dEQP doesn't compile and produces warnings about implicitly defined
- # functions.
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- # This has to be GNU_SOURCE as on Linux dEQP uses syscall()
- defines += [ "_GNU_SOURCE" ]
- }
-@@ -198,7 +198,7 @@ if (build_angle_deqp_tests) {
- ]
- }
-
-- if (is_linux || is_android) {
-+ if (is_linux || is_android || is_bsd) {
- deqp_undefine_configs += [ "//build/config/gcc:no_exceptions" ]
- }
-
-@@ -234,7 +234,7 @@ if (build_angle_deqp_tests) {
- if (is_win) {
- sources += rebase_path(deqp_gypi.deqp_libtester_sources_win, ".", "../..")
- }
-- if (is_linux || is_android) {
-+ if (is_linux || is_android || is_bsd) {
- sources +=
- rebase_path(deqp_gypi.deqp_libtester_sources_unix, ".", "../..")
- }
-@@ -262,7 +262,7 @@ if (build_angle_deqp_tests) {
-
- # Taken from gpu/BUILD.gn
- # TODO(jmadill): this should be in a shared location
-- if (is_linux && !is_chromecast) {
-+ if ((is_linux || is_bsd) && !is_chromecast) {
- libs = [ "pci" ]
- }
- }
-@@ -335,7 +335,7 @@ if (build_angle_deqp_tests) {
- "../../../deqp/src/data/",
- ]
-
-- if (is_linux && !is_component_build) {
-+ if ((is_linux || is_bsd) && !is_component_build) {
- # Set rpath to find *.so files even in a non-component build.
- configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
- }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_editing_editing__behavior.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/core/editing/editing_behavior.cc
+@@ -270,7 +270,7 @@ bool EditingBehavior::ShouldInsertCharacter(const Keyb
+ // unexpected behaviour
+ if (ch < ' ')
+ return false;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // According to XKB map no keyboard combinations with ctrl key are mapped to
+ // printable characters, however we need the filter as the DomKey/text could
+ // contain printable characters.
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
+@@ -34,7 +34,7 @@ namespace {
+ constexpr TimeDelta kSlackBeforeDeadline = TimeDelta::FromMilliseconds(1);
+
+ /* The value is based on user statistics on Nov 2017. */
+-#if (defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN))
++#if (defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)) || defined(OS_BSD)
+ const double kIdleTaskStartTimeoutDelayMs = 1000.0;
+ #else
+ const double kIdleTaskStartTimeoutDelayMs = 4000.0; // For ChromeOS, Mobile
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_forms_internal__popup__menu.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_html_forms_internal__popup__menu.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc
+@@ -126,7 +126,7 @@ class InternalPopupMenu::ItemIterationContext {
+ is_in_group_(false),
+ buffer_(buffer) {
+ DCHECK(buffer_);
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // On other platforms, the <option> background color is the same as the
+ // <select> background color. On Linux, that makes the <option>
+ // background color very dark, so by default, try to use a lighter
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_BUILD.gn
@@ -0,0 +1,10 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/BUILD.gn.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/BUILD.gn
+@@ -144,6 +144,7 @@ executable("character_data_generator") {
+ "//build/win:default_exe_manifest",
+ "//third_party/icu",
+ ]
++ libs = [ "cxxrt" ]
+ }
+
+ # This isn't strictly necessary since we can just add the deps to "platform",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.h
@@ -0,0 +1,47 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.h
+@@ -156,7 +156,7 @@ class PLATFORM_EXPORT FontCache {
+ sk_sp<SkFontMgr> FontManager() { return font_manager_; }
+ static void SetFontManager(sk_sp<SkFontMgr>);
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ // These are needed for calling QueryRenderStyleForStrike, since
+ // gfx::GetFontRenderParams makes distinctions based on DSF.
+ static float DeviceScaleFactor() { return device_scale_factor_; }
+@@ -217,7 +217,7 @@ class PLATFORM_EXPORT FontCache {
+ const FontDescription&);
+ #endif // defined(OS_ANDROID)
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ struct PlatformFallbackFont {
+ String name;
+ CString filename;
+@@ -229,7 +229,7 @@ class PLATFORM_EXPORT FontCache {
+ static void GetFontForCharacter(UChar32,
+ const char* preferred_locale,
+ PlatformFallbackFont*);
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+
+ scoped_refptr<SimpleFontData> FontDataFromFontPlatformData(
+ const FontPlatformData*,
+@@ -291,7 +291,7 @@ class PLATFORM_EXPORT FontCache {
+ const FontFaceCreationParams&,
+ CString& name);
+
+-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA)
++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD)
+ static AtomicString GetFamilyNameForCharacter(SkFontMgr*,
+ UChar32,
+ const FontDescription&,
+@@ -327,7 +327,7 @@ class PLATFORM_EXPORT FontCache {
+ bool is_test_font_mgr_ = false;
+ #endif // defined(OS_WIN)
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ static float device_scale_factor_;
+ #endif
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__cache.cc
@@ -0,0 +1,20 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_cache.cc
+@@ -65,7 +65,7 @@ namespace blink {
+
+ SkFontMgr* FontCache::static_font_manager_ = nullptr;
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ float FontCache::device_scale_factor_ = 1.0;
+ #endif
+
+@@ -88,7 +88,7 @@ FontCache::FontCache()
+ FontPlatformData* FontCache::SystemFontPlatformData(
+ const FontDescription& font_description) {
+ const AtomicString& family = FontCache::SystemFontFamily();
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ if (family.IsEmpty() || family == FontFamilyNames::system_ui)
+ return nullptr;
+ #else
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__metrics.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_font__metrics.cc
@@ -0,0 +1,29 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_metrics.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/font_metrics.cc
+@@ -38,7 +38,7 @@
+
+ namespace blink {
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD)
+ // This is the largest VDMX table which we'll try to load and parse.
+ static const size_t kMaxVDMXTableSize = 1024 * 1024; // 1 MB
+ #endif
+@@ -60,7 +60,7 @@ void FontMetrics::AscentDescentWithHacks(
+ int vdmx_ascent = 0, vdmx_descent = 0;
+ bool is_vdmx_valid = false;
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(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).
+@@ -106,7 +106,7 @@ void FontMetrics::AscentDescentWithHacks(
+ visual_overflow_inflation_for_ascent = 1;
+ if (descent < metrics.fDescent) {
+ visual_overflow_inflation_for_descent = 1;
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(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
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc
@@ -0,0 +1,29 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc
+@@ -59,7 +59,7 @@ AtomicString ToAtomicString(const SkString& str) {
+ return AtomicString::FromUTF8(str.c_str(), str.size());
+ }
+
+-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA)
++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(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:
+@@ -103,7 +103,7 @@ AtomicString FontCache::GetFamilyNameForCharacter(
+ typeface->getFamilyName(&skia_family_name);
+ return ToAtomicString(skia_family_name);
+ }
+-#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA)
++#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD)
+
+ void FontCache::PlatformInit() {}
+
+@@ -248,7 +248,7 @@ PaintTypeface FontCache::CreateTypeface(
+ }
+ #endif
+
+-#if defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_WIN) || defined(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_blink_renderer_platform_heap_stack__frame__depth.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_heap_stack__frame__depth.cc
@@ -0,0 +1,14 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/heap/stack_frame_depth.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/heap/stack_frame_depth.cc
+@@ -15,6 +15,11 @@
+ extern "C" void* __libc_stack_end; // NOLINT
+ #endif
+
++#if defined(OS_FREEBSD)
++#include <sys/signal.h>
++#include <pthread_np.h>
++#endif
++
+ namespace blink {
+
+ static const char* g_avoid_optimization = nullptr;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_BUILD.gn
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_BUILD.gn
@@ -0,0 +1,16 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/BUILD.gn.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/BUILD.gn
+@@ -276,8 +276,12 @@ jumbo_component("wtf") {
+ if (is_android) {
+ libs = [ "log" ]
+ }
+- if (is_linux) {
++ if (is_linux && !is_bsd) {
+ libs = [ "dl" ]
++ }
++
++ if (is_bsd) {
++ libs = [ "execinfo" ]
+ }
+
+ if (is_mac) {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_assertions.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_assertions.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/assertions.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/assertions.cc
+@@ -48,7 +48,7 @@
+ #include <windows.h>
+ #endif
+
+-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__))
++#if defined(OS_MACOSX) || ((defined(OS_LINUX) || defined(OS_BSD)) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_atomics.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_atomics.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/atomics.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/atomics.h
+@@ -176,7 +176,7 @@ ALWAYS_INLINE void AtomicSetOneToZero(int volatile* pt
+ #if defined(THREAD_SANITIZER)
+ // The definitions below assume an LP64 data model. This is fine because
+ // TSan is only supported on x86_64 Linux.
+-#if defined(ARCH_CPU_64_BITS) && defined(OS_LINUX)
++#if defined(ARCH_CPU_64_BITS) && (defined(OS_LINUX) || defined(OS_BSD))
+ ALWAYS_INLINE void ReleaseStore(volatile int* ptr, int value) {
+ __tsan_atomic32_store(ptr, value, __tsan_memory_order_release);
+ }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_container__annotations.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_container__annotations.h
@@ -0,0 +1,27 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/container_annotations.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/container_annotations.h
+@@ -10,7 +10,7 @@
+
+ // TODO(ochang): Remove the ARCH_CPU_X86_64 condition to enable this for X86
+ // once the crashes there have been fixed: http://crbug.com/461406
+-#if defined(ADDRESS_SANITIZER) && defined(OS_LINUX) && defined(ARCH_CPU_X86_64)
++#if defined(ADDRESS_SANITIZER) && (defined(OS_LINUX) || defined(OS_BSD)) && defined(ARCH_CPU_X86_64)
+ #define ANNOTATE_CONTIGUOUS_CONTAINER
+ #define ANNOTATE_NEW_BUFFER(buffer, capacity, newSize) \
+ if (buffer) { \
+@@ -35,13 +35,13 @@
+ ANNOTATE_NEW_BUFFER(buffer, newCapacity, bufferSize);
+ // Annotations require buffers to begin on an 8-byte boundary.
+
+-#else // ADDRESS_SANITIZER && OS_LINUX && ARCH_CPU_X86_64
++#else // ADDRESS_SANITIZER && (OS_LINUX || OS_BSD) && ARCH_CPU_X86_64
+
+ #define ANNOTATE_NEW_BUFFER(buffer, capacity, newSize)
+ #define ANNOTATE_DELETE_BUFFER(buffer, capacity, oldSize)
+ #define ANNOTATE_CHANGE_SIZE(buffer, capacity, oldSize, newSize)
+ #define ANNOTATE_CHANGE_CAPACITY(buffer, oldCapacity, bufferSize, newCapacity)
+
+-#endif // ADDRESS_SANITIZER && OS_LINUX && ARCH_CPU_X86_64
++#endif // ADDRESS_SANITIZER && (OS_LINUX || OS_BSD) && ARCH_CPU_X86_64
+
+ #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_CONTAINER_ANNOTATIONS_H_
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_stack__util.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_stack__util.cc
@@ -0,0 +1,14 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
+@@ -16,6 +16,11 @@
+ extern "C" void* __libc_stack_end; // NOLINT
+ #endif
+
++#if defined(OS_FREEBSD)
++#include <sys/signal.h>
++#include <pthread_np.h>
++#endif
++
+ namespace WTF {
+
+ size_t GetUnderestimatedStackSize() {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_threading__pthreads.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_wtf_threading__pthreads.cc
@@ -0,0 +1,33 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/threading_pthreads.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/threading_pthreads.cc
+@@ -51,14 +51,19 @@
+ #include <objc/objc-auto.h>
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include <sys/syscall.h>
+ #endif
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ #include <unistd.h>
+ #endif
+
++#if defined(OS_BSD)
++#include <sys/signal.h>
++#include <pthread_np.h>
++#endif
++
+ namespace WTF {
+
+ namespace internal {
+@@ -70,6 +75,8 @@ ThreadIdentifier CurrentThreadSyscall() {
+ return syscall(__NR_gettid);
+ #elif defined(OS_ANDROID)
+ return gettid();
++#elif defined(OS_BSD)
++ return pthread_getthreadid_np();
+ #else
+ return reinterpret_cast<uintptr_t>(pthread_self());
+ #endif
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_BUILD.gn
@@ -1,6 +1,6 @@
---- src/3rdparty/chromium/third_party/boringssl/BUILD.gn.orig 2017-01-26 00:49:29 UTC
+--- src/3rdparty/chromium/third_party/boringssl/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/boringssl/BUILD.gn
-@@ -83,7 +83,7 @@ if (is_win && !is_msan) {
+@@ -72,7 +72,7 @@ if (is_win && !is_msan) {
} else if (current_cpu == "x64") {
if (is_mac) {
sources += crypto_sources_mac_x86_64
@@ -9,7 +9,7 @@
sources += crypto_sources_linux_x86_64
} else {
public_configs = [ ":no_asm_config" ]
-@@ -91,14 +91,14 @@ if (is_win && !is_msan) {
+@@ -80,13 +80,13 @@ if (is_win && !is_msan) {
} else if (current_cpu == "x86") {
if (is_mac) {
sources += crypto_sources_mac_x86
@@ -19,11 +19,18 @@
} else {
public_configs = [ ":no_asm_config" ]
}
-- } else if (current_cpu == "arm" && (is_linux || is_android)) {
-+ } else if (current_cpu == "arm" && (is_linux || is_bsd || is_android)) {
- sources += crypto_sources_linux_arm
-- } else if (current_cpu == "arm64" && (is_linux || is_android)) {
-+ } else if (current_cpu == "arm64" && (is_linux || is_bsd || is_android)) {
- sources += crypto_sources_linux_aarch64
- } else {
- public_configs = [ ":no_asm_config" ]
+ } else if (current_cpu == "arm") {
+- if (is_linux || is_android) {
++ if (is_linux || is_bsd || is_android) {
+ sources += crypto_sources_linux_arm
+ } else if (is_ios) {
+ sources += crypto_sources_ios_arm
+@@ -94,7 +94,7 @@ if (is_win && !is_msan) {
+ public_configs = [ ":no_asm_config" ]
+ }
+ } else if (current_cpu == "arm64") {
+- if (is_linux || is_android) {
++ if (is_linux || is_bsd || is_android) {
+ sources += crypto_sources_linux_aarch64
+ } else if (is_ios) {
+ sources += crypto_sources_ios_aarch64
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_cpu.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_cpu.h
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_include_openssl_cpu.h
@@ -1,11 +1,11 @@
---- src/3rdparty/chromium/third_party/boringssl/src/include/openssl/cpu.h.orig 2018-03-21 07:29:16 UTC
+--- src/3rdparty/chromium/third_party/boringssl/src/include/openssl/cpu.h.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/boringssl/src/include/openssl/cpu.h
-@@ -95,7 +95,7 @@ extern uint32_t OPENSSL_ia32cap_P[4];
+@@ -105,7 +105,7 @@ static inline const uint32_t *OPENSSL_ia32cap_get(void
#if defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
-#if defined(OPENSSL_APPLE)
+#if defined(OPENSSL_APPLE) || defined(__FreeBSD__)
- /* iOS builds use the static ARM configuration. */
+ // iOS builds use the static ARM configuration.
#define OPENSSL_STATIC_ARMCAP
#endif
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_src_src_crc32c__arm64__linux__check.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_src_src_crc32c__arm64__linux__check.h
@@ -0,0 +1,19 @@
+--- src/3rdparty/chromium/third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/crc32c/src/src/crc32c_arm64_linux_check.h
+@@ -29,6 +29,8 @@ extern "C" unsigned long getauxval(unsigned long type)
+ namespace crc32c {
+
+ inline bool CanUseArm64Linux() {
++return false;
++#if 0
+ #if HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
+ // From 'arch/arm64/include/uapi/asm/hwcap.h' in Linux kernel source code.
+ constexpr unsigned long kHWCAP_PMULL = 1 << 4;
+@@ -39,6 +41,7 @@ inline bool CanUseArm64Linux() {
+ #else
+ return false;
+ #endif // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
++#endif
+ }
+
+ } // namespace crc32c
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_expat_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_expat_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/expat/BUILD.gn.orig 2017-01-26 00:49:29 UTC
-+++ src/3rdparty/chromium/third_party/expat/BUILD.gn
-@@ -9,7 +9,7 @@ import("//testing/libfuzzer/fuzzer_test.
- # let's not pull it in twice.
- # Chromecast doesn't ship expat as a system library.
- # Libfuzzer and AFL need to build library from sources.
--if (is_linux && !is_chromecast && !use_libfuzzer && !use_afl) {
-+if ((is_linux || is_bsd) && !is_chromecast && !use_libfuzzer && !use_afl) {
- config("expat_config") {
- libs = [ "expat" ]
- }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_ffmpeg__generated.gni
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_ffmpeg_ffmpeg__generated.gni
+++ /dev/null
@@ -1,285 +0,0 @@
---- src/3rdparty/chromium/third_party/ffmpeg/ffmpeg_generated.gni.orig 2017-01-26 00:50:10 UTC
-+++ src/3rdparty/chromium/third_party/ffmpeg/ffmpeg_generated.gni
-@@ -12,7 +12,7 @@ ffmpeg_c_sources = []
- ffmpeg_gas_sources = []
- ffmpeg_yasm_sources = []
-
--if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && current_cpu == "arm64") || (is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm") || (is_linux && current_cpu == "arm64") || (is_linux && current_cpu == "mipsel") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && current_cpu == "arm64") || (is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm") || ((is_linux || is_bsd) && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
- ffmpeg_c_sources += [
- "libavcodec/allcodecs.c",
- "libavcodec/autorename_libavcodec_flacdec.c",
-@@ -160,7 +160,7 @@ if ((is_android && current_cpu == "arm"
- ]
- }
-
--if ((is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm") || (is_linux && current_cpu == "arm64") || (is_linux && current_cpu == "mipsel") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm") || ((is_linux || is_bsd) && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
- ffmpeg_c_sources += [
- "libavcodec/autorename_libavcodec_hpeldsp.c",
- "libavcodec/autorename_libavcodec_videodsp.c",
-@@ -175,7 +175,7 @@ if ((is_linux && current_cpu == "arm" &&
- ]
- }
-
--if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) {
-+if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) {
- ffmpeg_c_sources += [
- "libavcodec/aac_ac3_parser.c",
- "libavcodec/aac_parser.c",
-@@ -212,7 +212,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
- ]
- }
-
--if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
- ffmpeg_c_sources += [
- "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c",
- "libavcodec/x86/constants.c",
-@@ -225,7 +225,7 @@ if ((is_android && current_cpu == "x64")
- ]
- }
-
--if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome")) {
- ffmpeg_c_sources += [
- "libavcodec/cabac.c",
- "libavcodec/h2645_parse.c",
-@@ -257,7 +257,7 @@ if ((is_android && current_cpu == "arm"
- ]
- }
-
--if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm")) {
- ffmpeg_c_sources += [
- "libavcodec/arm/fft_fixed_init_arm.c",
- "libavcodec/arm/fft_init_arm.c",
-@@ -276,7 +276,7 @@ if ((is_android && current_cpu == "arm"
- ]
- }
-
--if ((is_android && current_cpu == "x64") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if ((is_android && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
- ffmpeg_yasm_sources += [
- "libavcodec/x86/fft.asm",
- "libavcodec/x86/flacdsp.asm",
-@@ -288,7 +288,7 @@ if ((is_android && current_cpu == "x64")
- ]
- }
-
--if ((is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if (((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
- ffmpeg_c_sources += [
- "libavcodec/x86/autorename_libavcodec_x86_videodsp_init.c",
- "libavcodec/x86/h264_intrapred_init.c",
-@@ -308,7 +308,7 @@ if ((is_linux && current_cpu == "x64") |
- ]
- }
-
--if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) {
-+if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) {
- ffmpeg_c_sources += [
- "libavcodec/x86/aacpsdsp_init.c",
- "libavcodec/x86/dct_init.c",
-@@ -317,7 +317,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
- ]
- }
-
--if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) {
-+if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) {
- ffmpeg_yasm_sources += [
- "libavcodec/x86/aacpsdsp.asm",
- "libavcodec/x86/dct32.asm",
-@@ -326,7 +326,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
- ]
- }
-
--if ((is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm")) {
- ffmpeg_c_sources += [
- "libavcodec/arm/h264pred_init_arm.c",
- "libavcodec/arm/hpeldsp_init_arm.c",
-@@ -346,13 +346,13 @@ if ((is_linux && current_cpu == "arm" &&
- ]
- }
-
--if ((is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_linux && current_cpu == "mipsel")) {
-+if ((is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "mipsel")) {
- ffmpeg_c_sources += [
- "libavutil/mips/float_dsp_mips.c",
- ]
- }
-
--if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/acelp_filters.c",
- "libavcodec/acelp_pitch_delay.c",
-@@ -407,7 +407,7 @@ if ((is_linux && current_cpu == "arm" &&
- ]
- }
-
--if ((is_android && current_cpu == "arm64") || (is_linux && current_cpu == "arm64")) {
-+if ((is_android && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "arm64")) {
- ffmpeg_c_sources += [
- "libavcodec/aarch64/fft_init_aarch64.c",
- "libavcodec/aarch64/vorbisdsp_init.c",
-@@ -422,7 +422,7 @@ if ((is_android && current_cpu == "arm64
- ]
- }
-
--if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/arm/aacpsdsp_init_arm.c",
- "libavcodec/arm/mpegaudiodsp_init_arm.c",
-@@ -433,7 +433,7 @@ if ((is_android && current_cpu == "arm"
- ]
- }
-
--if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm" && arm_use_neon)) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon)) {
- ffmpeg_c_sources += [
- "libavutil/arm/float_dsp_init_neon.c",
- ]
-@@ -448,7 +448,7 @@ if ((is_android && current_cpu == "arm"
- ]
- }
-
--if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/arm/h264chroma_init_arm.c",
- "libavcodec/arm/h264dsp_init_arm.c",
-@@ -459,7 +459,7 @@ if ((is_linux && current_cpu == "arm" &&
- ]
- }
-
--if ((is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome")) {
-+if (((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome")) {
- ffmpeg_c_sources += [
- "libavcodec/x86/h264_qpel.c",
- "libavcodec/x86/h264chroma_init.c",
-@@ -480,7 +480,7 @@ if ((is_linux && current_cpu == "x64" &&
- ]
- }
-
--if ((is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
-+if ((is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/mips/aacdec_mips.c",
- "libavcodec/mips/aacpsdsp_mips.c",
-@@ -489,7 +489,7 @@ if ((is_android && current_cpu == "mips6
- ]
- }
-
--if (is_linux && current_cpu == "mipsel") {
-+if ((is_linux || is_bsd) && current_cpu == "mipsel") {
- ffmpeg_c_sources += [
- "libavcodec/mips/h264pred_init_mips.c",
- "libavcodec/mips/hpeldsp_init_mips.c",
-@@ -497,7 +497,7 @@ if (is_linux && current_cpu == "mipsel")
- ]
- }
-
--if ((is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/mips/h264chroma_init_mips.c",
- "libavcodec/mips/h264dsp_init_mips.c",
-@@ -505,7 +505,7 @@ if ((is_linux && current_cpu == "mipsel"
- ]
- }
-
--if (is_linux && current_cpu == "arm64") {
-+if ((is_linux || is_bsd) && current_cpu == "arm64") {
- ffmpeg_c_sources += [
- "libavcodec/aarch64/h264pred_init.c",
- "libavcodec/aarch64/hpeldsp_init_aarch64.c",
-@@ -518,7 +518,7 @@ if (is_linux && current_cpu == "arm64")
- ]
- }
-
--if ((is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
-+if ((is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/aarch64/imdct15_init.c",
- "libavcodec/aarch64/mpegaudiodsp_init.c",
-@@ -529,7 +529,7 @@ if ((is_android && current_cpu == "arm64
- ]
- }
-
--if ((is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/aarch64/h264chroma_init_aarch64.c",
- "libavcodec/aarch64/h264dsp_init_aarch64.c",
-@@ -543,7 +543,7 @@ if ((is_linux && current_cpu == "arm64"
- ]
- }
-
--if (is_linux && current_cpu == "arm" && arm_use_neon) {
-+if ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) {
- ffmpeg_c_sources += [
- "libavcodec/arm/hpeldsp_init_neon.c",
- "libavcodec/arm/vp8dsp_init_neon.c",
-@@ -556,14 +556,14 @@ if (is_linux && current_cpu == "arm" &&
- ]
- }
-
--if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_gas_sources += [
- "libavcodec/arm/aacpsdsp_neon.S",
- "libavcodec/arm/sbrdsp_neon.S",
- ]
- }
-
--if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/arm/blockdsp_init_arm.c",
- "libavcodec/arm/idctdsp_init_arm.c",
-@@ -587,13 +587,13 @@ if ((is_linux && current_cpu == "arm" &&
- ]
- }
-
--if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/neon/autorename_libavcodec_neon_mpegvideo.c",
- ]
- }
-
--if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_gas_sources += [
- "libavcodec/arm/h264cmc_neon.S",
- "libavcodec/arm/h264dsp_neon.S",
-@@ -608,7 +608,7 @@ if (is_win && current_cpu == "x64") {
- ]
- }
-
--if ((is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
- ffmpeg_c_sources += [
- "libavcodec/x86/blockdsp_init.c",
- "libavcodec/x86/fdct.c",
-@@ -635,7 +635,7 @@ if ((is_linux && current_cpu == "x64" &&
- ]
- }
-
--if (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") {
-+if ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") {
- ffmpeg_c_sources += [
- "libavcodec/mips/blockdsp_init_mips.c",
- "libavcodec/mips/h263dsp_init_mips.c",
-@@ -648,7 +648,7 @@ if (is_linux && current_cpu == "mipsel"
- ]
- }
-
--if (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") {
-+if ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") {
- ffmpeg_c_sources += [
- "libavcodec/arm/blockdsp_init_neon.c",
- "libavcodec/arm/idctdsp_init_neon.c",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_fontconfig_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_fontconfig_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/fontconfig/BUILD.gn.orig 2017-01-26 00:49:29 UTC
-+++ src/3rdparty/chromium/third_party/fontconfig/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)
-+assert(is_linux || is_bsd)
-
- config("fontconfig_config") {
- include_dirs = [ "src" ]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_freetype2_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_freetype2_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/freetype2/BUILD.gn.orig 2017-01-26 00:49:29 UTC
-+++ src/3rdparty/chromium/third_party/freetype2/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 depended on from Linux.")
-+assert(is_linux || is_bsd, "This file should only be depended on from Linux.")
-
- config("freetype2_config") {
- include_dirs = [
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_glslang_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_glslang_BUILD.gn
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/3rdparty/chromium/third_party/glslang/BUILD.gn.orig 2017-01-26 00:49:29 UTC
-+++ src/3rdparty/chromium/third_party/glslang/BUILD.gn
-@@ -8,7 +8,7 @@ config("glslang_config") {
- include_dirs = [ "src" ]
-
- defines = []
-- if (is_linux || is_android) {
-+ if (is_linux || is_bsd || is_android) {
- defines += [ "GLSLANG_OSINCLUDE_UNIX" ]
- } else if (is_win) {
- defines += [ "GLSLANG_OSINCLUDE_WIN32" ]
-@@ -132,7 +132,7 @@ static_library("glslang") {
- "src/glslang/Public/ShaderLang.h",
- ]
-
-- if (is_linux || is_android) {
-+ if (is_linux || is_bsd || is_android) {
- sources += [ "src/glslang/OSDependent/Unix/ossource.cpp" ]
- } else if (is_win) {
- sources += [
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_harfbuzz-ng_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_harfbuzz-ng_BUILD.gn
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/3rdparty/chromium/third_party/harfbuzz-ng/BUILD.gn.orig 2017-01-26 00:49:29 UTC
-+++ src/3rdparty/chromium/third_party/harfbuzz-ng/BUILD.gn
-@@ -50,7 +50,7 @@ if (use_system_harfbuzz) {
-
- # See also chrome/browser/ui/libgtkui/BUILD.gn which pulls this.
- config("pangoft2_link_hack") {
-- if (is_linux && use_pango && !is_chromeos && !is_official_build &&
-+ if ((is_linux || is_bsd) && use_pango && !is_chromeos && !is_official_build &&
- current_cpu != "arm" && current_cpu != "mipsel" && !is_component_build) {
- # These symbols are referenced from libpangoft2, which will be
- # dynamically linked later.
-@@ -193,7 +193,7 @@ if (use_system_harfbuzz) {
- # in the tree, all symbols pango needs must be included, or
- # pango uses mixed versions of harfbuzz and leads to crash.
- # See crbug.com/462689.
-- if (is_linux && use_pango && !is_chromeos && !is_official_build &&
-+ if ((is_linux || is_bsd) && use_pango && !is_chromeos && !is_official_build &&
- current_cpu != "arm" && current_cpu != "mipsel") {
- deps += [ "//build/linux:freetype2" ]
- configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libXNVCtrl_NVCtrl.c
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libXNVCtrl_NVCtrl.c
@@ -0,0 +1,25 @@
+--- src/3rdparty/chromium/third_party/libXNVCtrl/NVCtrl.c.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/libXNVCtrl/NVCtrl.c
+@@ -27,10 +27,6 @@
+ * libXNVCtrl library properly protects the Display connection.
+ */
+
+-#if !defined(XTHREADS)
+-#define XTHREADS
+-#endif /* XTHREADS */
+-
+ #define NEED_EVENTS
+ #define NEED_REPLIES
+ #include <stdint.h>
+@@ -39,6 +35,11 @@
+ #include <X11/Xutil.h>
+ #include <X11/extensions/Xext.h>
+ #include <X11/extensions/extutil.h>
++
++#if !defined(XTHREADS)
++#define XTHREADS
++#endif /* XTHREADS */
++
+ #include "NVCtrlLib.h"
+ #include "nv_control.h"
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libusb_BUILD.gn
+++ /dev/null
@@ -1,256 +0,0 @@
---- src/3rdparty/chromium/third_party/libusb/BUILD.gn.orig 2017-01-26 00:49:30 UTC
-+++ src/3rdparty/chromium/third_party/libusb/BUILD.gn
-@@ -6,8 +6,25 @@ assert(!is_android && !is_ios)
-
- import("//build/config/features.gni")
-
--config("libusb_config") {
-- include_dirs = [ "src/libusb" ]
-+declare_args() {
-+ use_system_libusb = is_bsd
-+}
-+
-+
-+if (use_system_libusb) {
-+ config("libusb_config") {
-+ defines = ["USE_SYSTEM_LIBUSB"]
-+ libs = ["usb"]
-+ }
-+
-+ source_set("libusb") {
-+ public_configs = [ ":libusb_config" ]
-+ }
-+} else {
-+
-+ config("libusb_config") {
-+ include_dirs = [ "src/libusb" ]
-+ }
- }
-
- config("libusb_warnings") {
-@@ -21,118 +38,119 @@ config("libusb_warnings") {
- }
- }
-
--static_library("libusb") {
-- sources = [
-- "src/config.h",
-- "src/libusb/core.c",
-- "src/libusb/descriptor.c",
-- "src/libusb/hotplug.c",
-- "src/libusb/hotplug.h",
-- "src/libusb/interrupt.c",
-- "src/libusb/interrupt.h",
-- "src/libusb/io.c",
-- "src/libusb/libusb.h",
-- "src/libusb/libusbi.h",
-- "src/libusb/os/darwin_usb.c",
-- "src/libusb/os/darwin_usb.h",
-- "src/libusb/os/poll_posix.c",
-- "src/libusb/os/poll_posix.h",
-- "src/libusb/os/poll_windows.c",
-- "src/libusb/os/poll_windows.h",
-- "src/libusb/os/threads_posix.c",
-- "src/libusb/os/threads_posix.h",
-- "src/libusb/os/threads_windows.c",
-- "src/libusb/os/threads_windows.h",
-- "src/libusb/os/windows_common.h",
-- "src/libusb/os/windows_usb.c",
-- "src/libusb/os/windows_usb.h",
-- "src/libusb/strerror.c",
-- "src/libusb/sync.c",
-- "src/libusb/version.h",
-- "src/libusb/version_nano.h",
-- "src/msvc/config.h",
-- "src/msvc/inttypes.h",
-- "src/msvc/stdint.h",
-- ]
-- deps = []
-- include_dirs = [ "src/libusb/os" ]
-+if (!use_system_libusb) {
-+ static_library("libusb") {
-+ sources = [
-+ "src/config.h",
-+ "src/libusb/core.c",
-+ "src/libusb/descriptor.c",
-+ "src/libusb/hotplug.c",
-+ "src/libusb/hotplug.h",
-+ "src/libusb/interrupt.c",
-+ "src/libusb/interrupt.h",
-+ "src/libusb/io.c",
-+ "src/libusb/libusb.h",
-+ "src/libusb/libusbi.h",
-+ "src/libusb/os/darwin_usb.c",
-+ "src/libusb/os/darwin_usb.h",
-+ "src/libusb/os/poll_posix.c",
-+ "src/libusb/os/poll_posix.h",
-+ "src/libusb/os/poll_windows.c",
-+ "src/libusb/os/poll_windows.h",
-+ "src/libusb/os/threads_posix.c",
-+ "src/libusb/os/threads_posix.h",
-+ "src/libusb/os/threads_windows.c",
-+ "src/libusb/os/threads_windows.h",
-+ "src/libusb/os/windows_common.h",
-+ "src/libusb/os/windows_usb.c",
-+ "src/libusb/os/windows_usb.h",
-+ "src/libusb/strerror.c",
-+ "src/libusb/sync.c",
-+ "src/libusb/version.h",
-+ "src/libusb/version_nano.h",
-+ "src/msvc/config.h",
-+ "src/msvc/inttypes.h",
-+ "src/msvc/stdint.h",
-+ ]
-+ deps = []
-+ include_dirs = [ "src/libusb/os" ]
-
-- configs -= [ "//build/config/compiler:chromium_code" ]
-- configs += [
-- "//build/config/compiler:no_chromium_code",
-+ configs -= [ "//build/config/compiler:chromium_code" ]
-+ configs += [
-+ "//build/config/compiler:no_chromium_code",
-
-- # Must be after no_chromium_code for warning flags to be ordered correctly.
-- ":libusb_warnings",
-- ]
-+# Must be after no_chromium_code for warning flags to be ordered correctly.
-+ ":libusb_warnings",
-+ ]
-
-- public_configs = [ ":libusb_config" ]
-+ public_configs = [ ":libusb_config" ]
-
-- if (is_posix) {
-- defines = [
-- "DEFAULT_VISIBILITY=",
-- "HAVE_GETTIMEOFDAY=1",
-- "HAVE_POLL_H=1",
-- "HAVE_SYS_TIME_H=1",
-- "LIBUSB_DESCRIBE=\"1.0.16\"",
-- "POLL_NFDS_TYPE=nfds_t",
-- "THREADS_POSIX=1",
-- ]
-- }
-+ if (is_posix) {
-+ defines = [
-+ "DEFAULT_VISIBILITY=",
-+ "HAVE_GETTIMEOFDAY=1",
-+ "HAVE_POLL_H=1",
-+ "HAVE_SYS_TIME_H=1",
-+ "LIBUSB_DESCRIBE=\"1.0.16\"",
-+ "POLL_NFDS_TYPE=nfds_t",
-+ "THREADS_POSIX=1",
-+ ]
-+ }
-
-- if (is_mac) {
-- defines += [
-- "OS_DARWIN=1",
-+ if (is_mac) {
-+ defines += [
-+ "OS_DARWIN=1",
-
-- # Needed on OSX 10.12 to silence a deprecation warning.
-+# Needed on OSX 10.12 to silence a deprecation warning.
- "OBJC_SILENCE_GC_DEPRECATIONS=1",
-- ]
-- } else {
-- sources -= [
-- "src/libusb/os/darwin_usb.c",
-+ ]
-+ } else {
-+ sources -= [
-+ "src/libusb/os/darwin_usb.c",
- "src/libusb/os/darwin_usb.h",
-- ]
-- }
-+ ]
-+ }
-
-- if (is_linux) {
-- sources += [
-- "src/libusb/os/linux_usbfs.c",
-+ if (is_linux) {
-+ sources += [
-+ "src/libusb/os/linux_usbfs.c",
- "src/libusb/os/linux_usbfs.h",
-- ]
-- defines += [
-- "OS_LINUX=1",
-+ ]
-+ defines += [
-+ "OS_LINUX=1",
- "_GNU_SOURCE=1",
-- ]
-- }
-+ ]
-+ }
-
-- if (is_chromeos) {
-- defines += [ "USBI_TIMERFD_AVAILABLE" ]
-- }
-+ if (is_chromeos) {
-+ defines += [ "USBI_TIMERFD_AVAILABLE" ]
-+ }
-
-- if (use_udev) {
-- sources += [ "src/libusb/os/linux_udev.cc" ]
-- defines += [
-- "HAVE_LIBUDEV=1",
-- "USE_UDEV=1",
-- ]
-- deps += [ "//build/linux/libudev" ]
-- }
-+ if (use_udev) {
-+ sources += [ "src/libusb/os/linux_udev.cc" ]
-+ defines += [
-+ "HAVE_LIBUDEV=1",
-+ "USE_UDEV=1",
-+ ]
-+ deps += [ "//build/linux/libudev" ]
-+ }
-
-- if (is_linux && !use_udev) {
-- sources += [ "src/libusb/os/linux_netlink.c" ]
-- defines += [ "HAVE_LINUX_NETLINK_H" ]
-- }
-+ if (is_linux && !use_udev) {
-+ sources += [ "src/libusb/os/linux_netlink.c" ]
-+ defines += [ "HAVE_LINUX_NETLINK_H" ]
-+ }
-
-- if (is_win) {
-- include_dirs += [ "src/msvc" ]
-- sources -= [
-- "src/libusb/os/poll_posix.c",
-- "src/libusb/os/threads_posix.c",
-- ]
-- libs = [ "setupapi.lib" ]
-- } else {
-- include_dirs += [ "src" ]
-- sources -= [
-- "src/libusb/os/poll_windows.c",
-+ if (is_win) {
-+ include_dirs += [ "src/msvc" ]
-+ sources -= [
-+ "src/libusb/os/poll_posix.c",
-+ "src/libusb/os/threads_posix.c",
-+ ]
-+ libs = [ "setupapi.lib" ]
-+ } else {
-+ include_dirs += [ "src" ]
-+ sources -= [
-+ "src/libusb/os/poll_windows.c",
- "src/libusb/os/poll_windows.h",
- "src/libusb/os/threads_windows.c",
- "src/libusb/os/threads_windows.h",
-@@ -142,6 +160,7 @@ static_library("libusb") {
- "src/msvc/config.h",
- "src/msvc/inttypes.h",
- "src/msvc/stdint.h",
-- ]
-+ ]
-+ }
- }
- }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libxml_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libxml_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/libxml/BUILD.gn.orig 2017-01-26 00:49:30 UTC
-+++ src/3rdparty/chromium/third_party/libxml/BUILD.gn
-@@ -4,7 +4,7 @@
-
- # Define an "os_include" variable that points at the OS-specific generated
- # headers. These were generated by running the configure script offline.
--if (is_linux || is_android || is_nacl) {
-+if (is_linux || is_bsd || is_android || is_nacl) {
- os_include = "linux"
- } else if (is_mac || is_ios) {
- os_include = "mac"
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_libxslt_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/libxslt/BUILD.gn.orig 2017-01-26 00:49:30 UTC
-+++ src/3rdparty/chromium/third_party/libxslt/BUILD.gn
-@@ -82,7 +82,7 @@ static_library("libxslt") {
- public_configs = [ ":libxslt_config" ]
-
- cflags = []
-- if (is_linux || is_android) {
-+ if (is_linux || is_bsd || is_android) {
- include_dirs = [ "linux" ]
- } else if (is_win) {
- include_dirs = [ "win32" ]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_mesa_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_mesa_BUILD.gn
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/3rdparty/chromium/third_party/mesa/BUILD.gn.orig 2017-01-26 00:49:30 UTC
-+++ src/3rdparty/chromium/third_party/mesa/BUILD.gn
-@@ -90,6 +90,10 @@ config("mesa_internal_config") {
- defines += [ "_GNU_SOURCE" ]
- }
-
-+ if (is_bsd) {
-+ defines += [ "_BSD_SOURCE" ]
-+ }
-+
- if (is_win) {
- defines += [
- # Generated files use const only if __cplusplus or __STDC__ is defined.
-@@ -757,7 +761,8 @@ loadable_module("osmesa") {
- ]
-
- # Required for the allocator implementation, which is not used on Mac.
-- if (!is_mac) {
-+ # For BSD, there's no poing to include everything.
-+ if (!is_mac && !is_bsd) {
- deps += [ "//base" ]
- }
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_minigbm_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_minigbm_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/minigbm/BUILD.gn.orig 2017-01-26 00:49:30 UTC
-+++ src/3rdparty/chromium/third_party/minigbm/BUILD.gn
-@@ -4,7 +4,7 @@
-
- import("//build/config/linux/pkg_config.gni")
-
--assert(is_linux)
-+assert(is_linux || is_bsd)
-
- declare_args() {
- # Controls whether the build should use the version of minigbm library
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_opus_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_opus_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/opus/BUILD.gn.orig 2017-01-26 00:49:30 UTC
-+++ src/3rdparty/chromium/third_party/opus/BUILD.gn
-@@ -14,7 +14,7 @@ use_opus_arm_optimization = current_cpu
- # If OPUS Run Time CPU Detections (RTCD) shall be used.
- # Based on the conditions in celt/arm/armcpu.c:
- # defined(_MSC_VER) || defined(__linux__).
--use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux)
-+use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux || is_bsd)
-
- config("opus_config") {
- include_dirs = [ "src/include" ]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_ots_include_opentype-sanitiser.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_ots_include_opentype-sanitiser.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h.orig 2017-01-26 00:49:30 UTC
-+++ src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h
-@@ -22,6 +22,7 @@ typedef unsigned __int64 uint64_t;
- #else
- #include <arpa/inet.h>
- #include <stdint.h>
-+#include <sys/types.h>
- #endif
-
- #include <algorithm>
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/pdfium/BUILD.gn.orig 2017-01-26 00:50:14 UTC
-+++ src/3rdparty/chromium/third_party/pdfium/BUILD.gn
-@@ -44,7 +44,7 @@ config("pdfium_core_config") {
- cflags = []
- configs = [ ":pdfium_common_config" ]
- defines = [ "V8_DEPRECATION_WARNINGS" ]
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- if (current_cpu == "x64") {
- defines += [ "_FX_CPU_=_FX_X64_" ]
- cflags += [ "-fPIC" ]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxcrt_fx__system.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxcrt_fx__system.h
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxcrt_fx__system.h
@@ -1,11 +1,11 @@
---- src/3rdparty/chromium/third_party/pdfium/core/fxcrt/fx_system.h.orig 2017-01-26 00:50:14 UTC
+--- src/3rdparty/chromium/third_party/pdfium/core/fxcrt/fx_system.h.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/pdfium/core/fxcrt/fx_system.h
-@@ -40,7 +40,7 @@
+@@ -41,7 +41,7 @@
#elif defined(_WIN64)
- #define _FX_OS_ _FX_WIN64_DESKTOP_
- #define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_
+ #define _FX_OS_ _FX_OS_WIN64_
+ #define _FX_PLATFORM_ _FX_PLATFORM_WINDOWS_
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__FreeBSD__)
- #define _FX_OS_ _FX_LINUX_DESKTOP_
- #define _FXM_PLATFORM_ _FXM_PLATFORM_LINUX_
+ #define _FX_OS_ _FX_OS_LINUX_
+ #define _FX_PLATFORM_ _FX_PLATFORM_LINUX_
#elif defined(__APPLE__)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_fx__ge__linux.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_fx__ge__linux.cpp
@@ -0,0 +1,14 @@
+--- src/3rdparty/chromium/third_party/pdfium/core/fxge/fx_ge_linux.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/pdfium/core/fxge/fx_ge_linux.cpp
+@@ -146,9 +146,8 @@ std::unique_ptr<SystemFontInfoIface> SystemFontInfoIfa
+ const char** pUserPaths) {
+ auto pInfo = pdfium::MakeUnique<CFX_LinuxFontInfo>();
+ if (!pInfo->ParseFontCfg(pUserPaths)) {
+- pInfo->AddPath("/usr/share/fonts");
+- pInfo->AddPath("/usr/share/X11/fonts/Type1");
+- pInfo->AddPath("/usr/share/X11/fonts/TTF");
++ pInfo->AddPath("/usr/local/share/fonts/Type1");
++ pInfo->AddPath("/usr/local/share/fonts/TTF");
+ pInfo->AddPath("/usr/local/share/fonts");
+ }
+ return std::move(pInfo);
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
---- src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp.orig 2017-01-26 00:50:15 UTC
-+++ src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp
-@@ -458,11 +458,12 @@ v8::Local<v8::Date> CJS_Date::ToV8Date(C
- }
-
- double _getLocalTZA() {
-+ struct tm *lt;
- if (!FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS))
- return 0;
- time_t t = 0;
- time(&t);
-- localtime(&t);
-+ lt = localtime(&t);
- #if _MSC_VER >= 1900
- // In gcc and in Visual Studio prior to VS 2015 'timezone' is a global
- // variable declared in time.h. That variable was deprecated and in VS 2015
-@@ -470,7 +471,11 @@ double _getLocalTZA() {
- long timezone = 0;
- _get_timezone(&timezone);
- #endif
-+#if defined(__FreeBSD__)
-+ return (double)(-(lt->tm_gmtoff * 1000));
-+#else
- return (double)(-(timezone * 1000));
-+#endif
- }
-
- int _getDaylightSavingTA(double d) {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
---- src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp.orig 2017-01-26 00:50:15 UTC
-+++ src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp
-@@ -68,6 +68,103 @@ const FX_WCHAR* const fullmonths[] = {L"
- L"July", L"August", L"September",
- L"October", L"November", L"December"};
-
-+#if defined(__FreeBSD__)
-+/*
-+ * cvt.c - IEEE floating point formatting routines for FreeBSD
-+ * from GNU libc-4.6.27
-+ */
-+
-+/*
-+ * ap_ecvt converts to decimal
-+ * the number of digits is specified by ndigit
-+ * decpt is set to the position of the decimal point
-+ * sign is set to 0 for positive, 1 for negative
-+ */
-+
-+#define NDIG 80
-+
-+static char *
-+ ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag)
-+{
-+ register int r2;
-+ double fi, fj;
-+ register char *p, *p1;
-+ static char buf[NDIG];
-+
-+ if (ndigits >= NDIG - 1)
-+ ndigits = NDIG - 2;
-+ r2 = 0;
-+ *sign = 0;
-+ p = &buf[0];
-+ if (arg < 0) {
-+ *sign = 1;
-+ arg = -arg;
-+ }
-+ arg = modf(arg, &fi);
-+ p1 = &buf[NDIG];
-+ /*
-+ * Do integer part
-+ */
-+ if (fi != 0) {
-+ p1 = &buf[NDIG];
-+ while (fi != 0) {
-+ fj = modf(fi / 10, &fi);
-+ *--p1 = (int) ((fj + .03) * 10) + '0';
-+ r2++;
-+ }
-+ while (p1 < &buf[NDIG])
-+ *p++ = *p1++;
-+ }
-+ else if (arg > 0) {
-+ while ((fj = arg * 10) < 1) {
-+ arg = fj;
-+ r2--;
-+ }
-+ }
-+ p1 = &buf[ndigits];
-+ if (eflag == 0)
-+ p1 += r2;
-+ *decpt = r2;
-+ if (p1 < &buf[0]) {
-+ buf[0] = '\0';
-+ return (buf);
-+ }
-+ while (p <= p1 && p < &buf[NDIG]) {
-+ arg *= 10;
-+ arg = modf(arg, &fj);
-+ *p++ = (int) fj + '0';
-+ }
-+ if (p1 >= &buf[NDIG]) {
-+ buf[NDIG - 1] = '\0';
-+ return (buf);
-+ }
-+ p = p1;
-+ *p1 += 5;
-+ while (*p1 > '9') {
-+ *p1 = '0';
-+ if (p1 > buf)
-+ ++ * --p1;
-+ else {
-+ *p1 = '1';
-+ (*decpt)++;
-+ if (eflag == 0) {
-+ if (p > buf)
-+ *p = '0';
-+ p++;
-+ }
-+ }
-+ }
-+ *p = '\0';
-+ return (buf);
-+}
-+
-+static char *
-+ fcvt(double arg, int ndigits, int *decpt, int *sign)
-+{
-+ return (ap_cvt(arg, ndigits, decpt, sign, 0));
-+}
-+#endif // defined(__FreeBSD__)
-+
- CFX_ByteString StrTrim(const CFX_ByteString& pStr) {
- CFX_ByteString result(pStr);
- result.TrimLeft(' ');
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_cjs__publicmethods.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_cjs__publicmethods.cpp
@@ -0,0 +1,106 @@
+--- src/3rdparty/chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp
+@@ -72,6 +72,103 @@ const wchar_t* const kFullMonths[] = {L"January", L"Fe
+ L"July", L"August", L"September",
+ L"October", L"November", L"December"};
+
++#if defined(__FreeBSD__)
++/*
++ * cvt.c - IEEE floating point formatting routines for FreeBSD
++ * from GNU libc-4.6.27
++ */
++
++/*
++ * ap_ecvt converts to decimal
++ * the number of digits is specified by ndigit
++ * decpt is set to the position of the decimal point
++ * sign is set to 0 for positive, 1 for negative
++ */
++
++#define NDIG 80
++
++static char *
++ ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag)
++{
++ register int r2;
++ double fi, fj;
++ register char *p, *p1;
++ static char buf[NDIG];
++
++ if (ndigits >= NDIG - 1)
++ ndigits = NDIG - 2;
++ r2 = 0;
++ *sign = 0;
++ p = &buf[0];
++ if (arg < 0) {
++ *sign = 1;
++ arg = -arg;
++ }
++ arg = modf(arg, &fi);
++ p1 = &buf[NDIG];
++ /*
++ * Do integer part
++ */
++ if (fi != 0) {
++ p1 = &buf[NDIG];
++ while (fi != 0) {
++ fj = modf(fi / 10, &fi);
++ *--p1 = (int) ((fj + .03) * 10) + '0';
++ r2++;
++ }
++ while (p1 < &buf[NDIG])
++ *p++ = *p1++;
++ }
++ else if (arg > 0) {
++ while ((fj = arg * 10) < 1) {
++ arg = fj;
++ r2--;
++ }
++ }
++ p1 = &buf[ndigits];
++ if (eflag == 0)
++ p1 += r2;
++ *decpt = r2;
++ if (p1 < &buf[0]) {
++ buf[0] = '\0';
++ return (buf);
++ }
++ while (p <= p1 && p < &buf[NDIG]) {
++ arg *= 10;
++ arg = modf(arg, &fj);
++ *p++ = (int) fj + '0';
++ }
++ if (p1 >= &buf[NDIG]) {
++ buf[NDIG - 1] = '\0';
++ return (buf);
++ }
++ p = p1;
++ *p1 += 5;
++ while (*p1 > '9') {
++ *p1 = '0';
++ if (p1 > buf)
++ ++ * --p1;
++ else {
++ *p1 = '1';
++ (*decpt)++;
++ if (eflag == 0) {
++ if (p > buf)
++ *p = '0';
++ p++;
++ }
++ }
++ }
++ *p = '\0';
++ return (buf);
++}
++
++static char *
++ fcvt(double arg, int ndigits, int *decpt, int *sign)
++{
++ return (ap_cvt(arg, ndigits, decpt, sign, 0));
++}
++#endif // defined(__FreeBSD__)
++
+ template <typename T>
+ T StrTrim(const T& str) {
+ T result = str;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_js__define.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_fxjs_js__define.cpp
@@ -0,0 +1,27 @@
+--- src/3rdparty/chromium/third_party/pdfium/fxjs/js_define.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/pdfium/fxjs/js_define.cpp
+@@ -19,18 +19,23 @@
+ namespace {
+
+ double GetLocalTZA() {
++ struct tm *lt;
+ if (!FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS))
+ return 0;
+ time_t t = 0;
+ time(&t);
+- localtime(&t);
++ lt = localtime(&t);
+ #if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
+ // In gcc 'timezone' is a global variable declared in time.h. In VC++, that
+ // variable was removed in VC++ 2015, with _get_timezone replacing it.
+ long timezone = 0;
+ _get_timezone(&timezone);
+ #endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
++#if defined(__FreeBSD__)
++ return (double)(-(lt->tm_gmtoff * 1000));
++#else
+ return (double)(-(timezone * 1000));
++#endif
+ }
+
+ int GetDaylightSavingTA(double d) {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_pdfium.gni
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/pdfium/pdfium.gni.orig 2017-12-15 17:45:56.915001000 -0500
-+++ src/3rdparty/chromium/third_party/pdfium/pdfium.gni 2017-12-15 17:45:31.223848000 -0500
-@@ -9,7 +9,7 @@
- declare_args() {
- # On Android there's no system FreeType. On Windows and Mac, only a few
- # methods are used from it.
-- pdfium_bundle_freetype = !is_linux
-+ pdfium_bundle_freetype = false
-
- # Build PDFium either with or without v8 support.
- pdf_enable_v8 = pdf_enable_v8_override
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_skia_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_skia_BUILD.gn
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/3rdparty/chromium/third_party/pdfium/skia/BUILD.gn.orig 2017-01-26 00:50:15 UTC
-+++ src/3rdparty/chromium/third_party/pdfium/skia/BUILD.gn
-@@ -102,7 +102,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",
-@@ -280,7 +280,7 @@ component("skia") {
- "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp",
- ]
- }
-- if (!is_linux && !is_android && !is_win && !is_mac) {
-+ if (!is_linux && !is_android && !is_win && !is_mac || !is_bsd) {
- sources -= [
- "//third_party/skia/src/ports/SkFontHost_FreeType.cpp",
- "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp",
-@@ -309,7 +309,7 @@ component("skia") {
- "../third_party:fx_zlib",
- ]
-
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- deps += [ "//third_party/icu:icuuc" ]
- }
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp
@@ -0,0 +1,19 @@
+--- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp
+@@ -74,6 +74,8 @@
+ #include <sys/auxv.h>
+
+ static uint32_t read_cpu_features() {
++return 0;
++#if 0
+ const uint32_t kHWCAP_CRC32 = (1<< 7),
+ kHWCAP_ASIMDHP = (1<<10);
+
+@@ -82,6 +84,7 @@
+ if (hwcaps & kHWCAP_CRC32 ) { features |= SkCpu::CRC32; }
+ if (hwcaps & kHWCAP_ASIMDHP) { features |= SkCpu::ASIMDHP; }
+ return features;
++#endif
+ }
+
+ #elif defined(SK_CPU_ARM32) && __has_include(<sys/auxv.h>) && \
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_gpu_GrAutoLocaleSetter.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_gpu_GrAutoLocaleSetter.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/skia/src/gpu/GrAutoLocaleSetter.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/skia/src/gpu/GrAutoLocaleSetter.h
+@@ -27,7 +27,7 @@
+ #define HAVE_XLOCALE 0
+ #endif
+
+-#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION)
++#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__FreeBSD__)
+ #define HAVE_LOCALE_T 0
+ #else
+ #define HAVE_LOCALE_T 1
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkOSFile__stdio.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_ports_SkOSFile__stdio.cpp
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/skia/src/ports/SkOSFile_stdio.cpp.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/skia/src/ports/SkOSFile_stdio.cpp
+@@ -129,7 +129,7 @@ void sk_fflush(FILE* f) {
+
+ void sk_fsync(FILE* f) {
+ #if !defined(_WIN32) && !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) \
+- && !defined(_NEWLIB_VERSION)
++ && !defined(_NEWLIB_VERSION) && !defined(__FreeBSD__)
+ int fd = fileno(f);
+ fsync(fd);
+ #endif
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_sksl_SkSLString.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_sksl_SkSLString.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/skia/src/sksl/SkSLString.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/skia/src/sksl/SkSLString.h
+@@ -22,6 +22,8 @@
+ #include "SkString.h"
+ #endif
+
++#include <stdarg.h>
++
+ namespace SkSL {
+
+ // Represents a (not necessarily null-terminated) slice of a string.
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_third__party_vulkanmemoryallocator_include_vk__mem__alloc.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_third__party_vulkanmemoryallocator_include_vk__mem__alloc.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h
+@@ -2232,7 +2232,7 @@ remove them if not needed.
+ #include <mutex> // for std::mutex
+ #include <atomic> // for std::atomic
+
+-#if !defined(_WIN32) && !defined(__APPLE__)
++#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__FreeBSD__)
+ #include <malloc.h> // for aligned_alloc()
+ #endif
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_sqlite_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_sqlite_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_sqlite_BUILD.gn
@@ -1,38 +1,11 @@
---- src/3rdparty/chromium/third_party/sqlite/BUILD.gn.orig 2017-01-26 00:49:30 UTC
+--- src/3rdparty/chromium/third_party/sqlite/BUILD.gn.orig 2019-01-16 10:59:47 UTC
+++ src/3rdparty/chromium/third_party/sqlite/BUILD.gn
-@@ -22,7 +22,7 @@ if (!use_system_sqlite) {
- # sqlite3Fts3InitTok).
- cflags += [ "-Wno-unused-function" ]
+@@ -188,7 +188,7 @@ config("sqlite_warnings") {
+ ]
}
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- cflags += [
- # SQLite doesn"t believe in compiler warnings,
- # preferring testing.
-@@ -187,7 +187,7 @@ if (!use_system_sqlite) {
- public_configs = [ ":sqlite_export" ]
}
-
- if (is_linux) {
-+ if (is_linux || is_bsd) {
- executable("sqlite_shell") {
- # So shell.c can find the correct sqlite3.h.
- include_dirs = [ "amalgamation" ]
-@@ -216,7 +216,7 @@ if (use_system_sqlite) {
-
- config("sqlite_config") {
- defines = [ "USE_SYSTEM_SQLITE" ]
-- if (is_ios) {
-+ if (is_ios || is_bsd) {
- libs = [ "sqlite3" ]
- } else {
- assert(false, "extra flags to use system sqlite3 library missing")
-@@ -235,7 +235,7 @@ if (use_system_sqlite) {
- }
- }
-
-- if (is_ios) {
-+ if (is_ios || is_bsd) {
- source_set("sqlite_recover") {
- sources = [
- # TODO(shess): Move out of the SQLite source tree, perhaps to ext/.
++ if (is_linux && !is_bsd) {
+ cflags += [
+ # SQLite doesn't believe in compiler warnings, preferring testing.
+ # http://www.sqlite.org/faq.html#q17
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_usrsctp_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_usrsctp_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_usrsctp_BUILD.gn
@@ -1,11 +1,16 @@
---- src/3rdparty/chromium/third_party/usrsctp/BUILD.gn.orig 2017-01-26 00:49:31 UTC
+--- src/3rdparty/chromium/third_party/usrsctp/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/usrsctp/BUILD.gn
-@@ -112,6 +112,12 @@ static_library("usrsctp") {
+@@ -116,11 +116,16 @@ static_library("usrsctp") {
+ "-UINET6",
+ ]
+
+- if (is_linux || is_android) {
++ if ((is_linux && !is_bsd) || is_android ) {
+ defines += [
"__Userspace_os_Linux",
"_GNU_SOURCE",
]
+ } else if (is_bsd) {
-+ # For now, freebsd hard coding, differentiate different bsd is a plan
+ defines += [
+ "__Userspace_os_FreeBSD",
+ ]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_BUILD.gn
@@ -1,11 +1,11 @@
---- src/3rdparty/chromium/third_party/webrtc/BUILD.gn.orig 2017-01-26 00:50:17 UTC
+--- src/3rdparty/chromium/third_party/webrtc/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/webrtc/BUILD.gn
-@@ -60,6 +60,9 @@ config("common_inherited_config") {
+@@ -132,6 +132,9 @@ config("common_inherited_config") {
if (is_linux) {
defines += [ "WEBRTC_LINUX" ]
}
+ if (is_bsd) {
-+ defines += [ "WEBRTC_LINUX", "WEBRTC_BSD", "WEBRTC_THREAD_RR" ]
++ defines += [ "WEBRTC_BSD" ]
+ }
if (is_mac) {
defines += [ "WEBRTC_MAC" ]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_BUILD.gn
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/BUILD.gn.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/BUILD.gn
-@@ -650,7 +650,6 @@ rtc_static_library("rtc_base") {
- "x11windowpicker.h",
- ]
- libs += [
-- "dl",
- "rt",
- "Xext",
- "X11",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_httpcommon.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_httpcommon.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/httpcommon.cc.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/httpcommon.cc
-@@ -384,7 +384,7 @@ bool HttpDateToSeconds(const std::string
- gmt = non_gmt + kTimeZoneOffsets[zindex] * 60 * 60;
- }
- // TODO: Android should support timezone, see b/2441195
--#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || defined(BSD)
-+#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
- tm *tm_for_timezone = localtime(&gmt);
- *seconds = gmt + tm_for_timezone->tm_gmtoff;
- #else
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_ifaddrs__converter.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_ifaddrs__converter.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/ifaddrs_converter.h.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/ifaddrs_converter.h
-@@ -14,6 +14,8 @@
- #if defined(WEBRTC_ANDROID)
- #include "webrtc/base/ifaddrs-android.h"
- #else
-+#include <sys/types.h>
-+#include <sys/socket.h>
- #include <ifaddrs.h>
- #endif // WEBRTC_ANDROID
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_ipaddress.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_ipaddress.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/ipaddress.h.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/ipaddress.h
-@@ -17,6 +17,10 @@
- #include <arpa/inet.h>
- #include <netdb.h>
- #endif
-+#if defined(WEBRTC_BSD)
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#endif
- #if defined(WEBRTC_WIN)
- #include <winsock2.h>
- #include <ws2tcpip.h>
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_linux.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_linux.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/linux.h.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/linux.h
-@@ -11,7 +11,7 @@
- #ifndef WEBRTC_BASE_LINUX_H_
- #define WEBRTC_BASE_LINUX_H_
-
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #include <string>
- #include <map>
- #include <memory>
-@@ -114,5 +114,5 @@ int ReadCpuMaxFreq();
-
- } // namespace rtc
-
--#endif // defined(WEBRTC_LINUX)
-+#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #endif // WEBRTC_BASE_LINUX_H_
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_linux.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_linux.cc
+++ /dev/null
@@ -1,17 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/linux.cc.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/linux.cc
-@@ -8,7 +8,7 @@
- * be found in the AUTHORS file in the root of the source tree.
- */
-
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #include "webrtc/base/linux.h"
-
- #include <ctype.h>
-@@ -261,4 +261,4 @@ int ReadCpuMaxFreq() {
-
- } // namespace rtc
-
--#endif // defined(WEBRTC_LINUX)
-+#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_network.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_network.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/network.h.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/network.h
-@@ -23,6 +23,10 @@
- #include "webrtc/base/messagehandler.h"
- #include "webrtc/base/sigslot.h"
-
-+#if defined(WEBRTC_BSD)
-+#include <sys/types.h>
-+#endif
-+
- #if defined(WEBRTC_POSIX)
- struct ifaddrs;
- #endif // defined(WEBRTC_POSIX)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_network.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_network.cc
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/network.cc.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/network.cc
-@@ -14,7 +14,7 @@
- // linux/if.h can't be included at the same time as the posix sys/if.h, and
- // it's transitively required by linux/route.h, so include that version on
- // linux instead of the standard posix one.
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
- #include <linux/if.h>
- #include <linux/route.h>
- #elif !defined(__native_client__)
-@@ -656,7 +656,7 @@ bool BasicNetworkManager::CreateNetworks
- }
- #endif // WEBRTC_WIN
-
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
- bool IsDefaultRoute(const std::string& network_name) {
- FileStream fs;
- if (!fs.Open("/proc/net/route", "r", NULL)) {
-@@ -699,7 +699,7 @@ bool BasicNetworkManager::IsIgnoredNetwo
- strncmp(network.name().c_str(), "vboxnet", 7) == 0) {
- return true;
- }
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
- // Make sure this is a default route, if we're ignoring non-defaults.
- if (ignore_non_default_routes_ && !IsDefaultRoute(network.name())) {
- return true;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_physicalsocketserver.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_physicalsocketserver.cc
+++ /dev/null
@@ -1,45 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/physicalsocketserver.cc.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/physicalsocketserver.cc
-@@ -61,7 +61,11 @@ typedef void* SockOptArg;
-
- int64_t GetSocketRecvTimestamp(int socket) {
- struct timeval tv_ioctl;
-+#if defined(WEBRTC_BSD)
-+ int ret = ioctl(socket, SO_TIMESTAMP, &tv_ioctl);
-+#else
- int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl);
-+#endif
- if (ret != 0)
- return -1;
- int64_t timestamp =
-@@ -274,7 +278,7 @@ int PhysicalSocket::GetOption(Option opt
- socklen_t optlen = sizeof(*value);
- int ret = ::getsockopt(s_, slevel, sopt, (SockOptArg)value, &optlen);
- if (ret != -1 && opt == OPT_DONTFRAGMENT) {
--#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
- *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0;
- #endif
- }
-@@ -287,7 +291,7 @@ int PhysicalSocket::SetOption(Option opt
- if (TranslateOption(opt, &slevel, &sopt) == -1)
- return -1;
- if (opt == OPT_DONTFRAGMENT) {
--#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
- value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
- #endif
- }
-@@ -569,10 +573,10 @@ int PhysicalSocket::TranslateOption(Opti
- *slevel = IPPROTO_IP;
- *sopt = IP_DONTFRAGMENT;
- break;
--#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__)
-+#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD) || defined(__native_client__)
- LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported.";
- return -1;
--#elif defined(WEBRTC_POSIX)
-+#elif defined(WEBRTC_POSIX) && !defined(WEBRTC_BSD)
- *slevel = IPPROTO_IP;
- *sopt = IP_MTU_DISCOVER;
- break;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_platform__thread.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_platform__thread.cc
+++ /dev/null
@@ -1,42 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/platform_thread.cc.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/platform_thread.cc
-@@ -12,11 +12,18 @@
-
- #include "webrtc/base/checks.h"
-
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) && !defined(__FreeBSD__)
- #include <sys/prctl.h>
- #include <sys/syscall.h>
- #endif
-
-+#if defined(WEBRTC_BSD)
-+#include <pthread.h>
-+#include <pthread_np.h>
-+#include <sys/syscall.h>
-+#include <sys/thr.h>
-+#endif
-+
- namespace rtc {
-
- PlatformThreadId CurrentThreadId() {
-@@ -26,6 +33,8 @@ PlatformThreadId CurrentThreadId() {
- #elif defined(WEBRTC_POSIX)
- #if defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
- ret = pthread_mach_thread_np(pthread_self());
-+#elif defined(WEBRTC_BSD)
-+ ret = reinterpret_cast<int>(pthread_getthreadid_np());
- #elif defined(WEBRTC_LINUX)
- ret = syscall(__NR_gettid);
- #elif defined(WEBRTC_ANDROID)
-@@ -69,7 +78,9 @@ void SetCurrentThreadName(const char* na
- reinterpret_cast<ULONG_PTR*>(&threadname_info));
- } __except (EXCEPTION_EXECUTE_HANDLER) {
- }
--#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
-+#elif defined(WEBRTC_BSD)
-+ pthread_set_name_np(pthread_self(), name);
-+#elif (defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)) && !defined(WEBRTC_BSD)
- prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name));
- #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
- pthread_setname_np(name);
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_stringutils.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_stringutils.h
+++ /dev/null
@@ -1,17 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/stringutils.h.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/stringutils.h
-@@ -23,11 +23,11 @@
- #endif // WEBRTC_WIN
-
- #if defined(WEBRTC_POSIX)
--#ifdef BSD
-+#if defined(WEBRTC_BSD) || defined(BSD)
- #include <stdlib.h>
--#else // BSD
-+#else // WEBRTC_BSD
- #include <alloca.h>
--#endif // !BSD
-+#endif // !WEBRTC_BSD
- #endif // WEBRTC_POSIX
-
- #include <string>
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_systeminfo.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_base_systeminfo.cc
+++ /dev/null
@@ -1,40 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/base/systeminfo.cc.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/base/systeminfo.cc
-@@ -20,8 +20,12 @@
- #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
- #include <ApplicationServices/ApplicationServices.h>
- #include <CoreServices/CoreServices.h>
--#elif defined(WEBRTC_LINUX)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #include <unistd.h>
-+#if defined(WEBRTC_BSD)
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#endif
- #endif
- #if defined(WEBRTC_MAC)
- #include <sys/sysctl.h>
-@@ -66,7 +70,7 @@ static int DetectNumberOfCores() {
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- number_of_cores = static_cast<int>(si.dwNumberOfProcessors);
--#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
- number_of_cores = static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
- #elif defined(WEBRTC_MAC)
- int name[] = {CTL_HW, HW_AVAILCPU};
-@@ -174,9 +178,13 @@ int64_t SystemInfo::GetMemorySize() {
- LOG_GLE(LS_WARNING) << "GlobalMemoryStatusEx failed.";
- }
-
--#elif defined(WEBRTC_MAC)
-+#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD)
- size_t len = sizeof(memory);
-+ #if defined(WEBRTC_MAC)
- int error = sysctlbyname("hw.memsize", &memory, &len, NULL, 0);
-+ #else
-+ int error = sysctlbyname("hw.physmem", &memory, &len, NULL, 0);
-+ #endif
- if (error || memory == 0)
- memory = -1;
- #elif defined(WEBRTC_LINUX)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_audio__device_BUILD.gn
@@ -1,20 +1,11 @@
---- src/3rdparty/chromium/third_party/webrtc/modules/audio_device/BUILD.gn.orig 2017-01-26 00:50:17 UTC
+--- src/3rdparty/chromium/third_party/webrtc/modules/audio_device/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/webrtc/modules/audio_device/BUILD.gn
-@@ -77,7 +77,7 @@ rtc_static_library("audio_device") {
- ]
-
- include_dirs = []
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- include_dirs += [ "linux" ]
- }
- if (is_ios) {
-@@ -125,7 +125,7 @@ rtc_static_library("audio_device") {
+@@ -331,7 +331,7 @@ rtc_source_set("audio_device_impl") {
if (rtc_use_dummy_audio_file_devices) {
defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]
} else {
- if (is_linux) {
-+ if (is_linux || is_bsd) {
++ if (is_linux && !is_bsd) {
sources += [
"linux/alsasymboltable_linux.cc",
"linux/alsasymboltable_linux.h",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_video__coding_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_modules_video__coding_BUILD.gn
+++ /dev/null
@@ -1,24 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/modules/video_coding/BUILD.gn.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/modules/video_coding/BUILD.gn
-@@ -137,9 +137,7 @@ rtc_static_library("webrtc_h264") {
- }
-
- defines = []
-- deps = [
-- "../../system_wrappers",
-- ]
-+ deps = []
-
- if (rtc_use_h264) {
- defines += [ "WEBRTC_USE_H264" ]
-@@ -153,9 +151,9 @@ rtc_static_library("webrtc_h264") {
- "codecs/h264/h264_encoder_impl.h",
- ]
- deps += [
-- "../../common_video",
- "//third_party/ffmpeg:ffmpeg",
- "//third_party/openh264:encoder",
-+ "../../common_video",
- ]
- }
- }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_BUILD.gn
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_BUILD.gn
@@ -0,0 +1,20 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/BUILD.gn.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/BUILD.gn
+@@ -907,8 +907,6 @@ rtc_static_library("rtc_base_generic") {
+
+ if (rtc_use_x11) {
+ libs += [
+- "dl",
+- "rt",
+ "Xext",
+ "X11",
+ "Xcomposite",
+@@ -916,7 +914,7 @@ rtc_static_library("rtc_base_generic") {
+ ]
+ }
+
+- if (is_linux) {
++ if (is_linux && !is_bsd) {
+ libs += [
+ "dl",
+ "rt",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byteorder.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_byteorder.h
@@ -0,0 +1,14 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/byteorder.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/byteorder.h
+@@ -79,7 +79,11 @@
+ #error WEBRTC_ARCH_BIG_ENDIAN or WEBRTC_ARCH_LITTLE_ENDIAN must be defined.
+ #endif // defined(WEBRTC_ARCH_LITTLE_ENDIAN)
+ #elif defined(WEBRTC_POSIX)
++#if defined(__FreeBSD__)
++#include <sys/endian.h>
++#else
+ #include <endian.h>
++#endif
+ #endif
+
+ namespace rtc {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_httpcommon.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_httpcommon.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/httpcommon.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/httpcommon.cc
+@@ -459,7 +459,7 @@ bool HttpDateToSeconds(const std::string& date, time_t
+ }
+ // TODO: Android should support timezone, see b/2441195
+ #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || \
+- defined(BSD)
++ defined(WEBRTC_BSD)
+ tm* tm_for_timezone = localtime(&gmt);
+ *seconds = gmt + tm_for_timezone->tm_gmtoff;
+ #else
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ifaddrs__converter.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ifaddrs__converter.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/ifaddrs_converter.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/ifaddrs_converter.h
+@@ -14,6 +14,8 @@
+ #if defined(WEBRTC_ANDROID)
+ #include "rtc_base/ifaddrs-android.h"
+ #else
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <ifaddrs.h>
+ #endif // WEBRTC_ANDROID
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ipaddress.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_ipaddress.h
@@ -0,0 +1,13 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/ipaddress.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/ipaddress.h
+@@ -17,6 +17,10 @@
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+ #endif
++#if defined(WEBRTC_BSD)
++#include <sys/types.h>
++#include <sys/socket.h>
++#endif
+ #if defined(WEBRTC_WIN)
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.h
@@ -0,0 +1,13 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/network.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/network.h
+@@ -24,6 +24,10 @@
+ #include "rtc_base/networkmonitor.h"
+ #include "rtc_base/sigslot.h"
+
++#if defined(WEBRTC_BSD)
++#include <sys/types.h>
++#endif
++
+ #if defined(WEBRTC_POSIX)
+ struct ifaddrs;
+ #endif // defined(WEBRTC_POSIX)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_network.cc
@@ -0,0 +1,29 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/network.cc
+@@ -14,7 +14,7 @@
+ // linux/if.h can't be included at the same time as the posix sys/if.h, and
+ // it's transitively required by linux/route.h, so include that version on
+ // linux instead of the standard posix one.
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ #include <linux/if.h>
+ #include <linux/route.h>
+ #elif !defined(__native_client__)
+@@ -764,7 +764,7 @@ bool BasicNetworkManager::CreateNetworks(bool include_
+ }
+ #endif // WEBRTC_WIN
+
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ bool IsDefaultRoute(const std::string& network_name) {
+ FileStream fs;
+ if (!fs.Open("/proc/net/route", "r", nullptr)) {
+@@ -805,7 +805,7 @@ bool BasicNetworkManager::IsIgnoredNetwork(const Netwo
+ strncmp(network.name().c_str(), "vboxnet", 7) == 0) {
+ return true;
+ }
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ // Make sure this is a default route, if we're ignoring non-defaults.
+ if (ignore_non_default_routes_ && !IsDefaultRoute(network.name())) {
+ return true;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physicalsocketserver.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physicalsocketserver.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.h
+@@ -11,7 +11,7 @@
+ #ifndef RTC_BASE_PHYSICALSOCKETSERVER_H_
+ #define RTC_BASE_PHYSICALSOCKETSERVER_H_
+
+-#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX)
++#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ #include <sys/epoll.h>
+ #define WEBRTC_USE_EPOLL 1
+ #endif
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physicalsocketserver.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_physicalsocketserver.cc
@@ -0,0 +1,56 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc
+@@ -67,7 +67,7 @@ typedef void* SockOptArg;
+
+ #endif // WEBRTC_POSIX
+
+-#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__)
++#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) && !defined(__native_client__)
+
+ int64_t GetSocketRecvTimestamp(int socket) {
+ struct timeval tv_ioctl;
+@@ -295,7 +295,7 @@ int PhysicalSocket::GetOption(Option opt, int* value)
+ socklen_t optlen = sizeof(*value);
+ int ret = ::getsockopt(s_, slevel, sopt, (SockOptArg)value, &optlen);
+ if (ret != -1 && opt == OPT_DONTFRAGMENT) {
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+ *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0;
+ #endif
+ }
+@@ -308,7 +308,7 @@ int PhysicalSocket::SetOption(Option opt, int value) {
+ if (TranslateOption(opt, &slevel, &sopt) == -1)
+ return -1;
+ if (opt == OPT_DONTFRAGMENT) {
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+ value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
+ #endif
+ }
+@@ -318,7 +318,7 @@ int PhysicalSocket::SetOption(Option opt, int value) {
+ int PhysicalSocket::Send(const void* pv, size_t cb) {
+ int sent = DoSend(
+ s_, reinterpret_cast<const char*>(pv), static_cast<int>(cb),
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+ // Suppress SIGPIPE. Without this, attempting to send on a socket whose
+ // other end is closed will result in a SIGPIPE signal being raised to
+ // our process, which by default will terminate the process, which we
+@@ -347,7 +347,7 @@ int PhysicalSocket::SendTo(const void* buffer,
+ size_t len = addr.ToSockAddrStorage(&saddr);
+ int sent =
+ DoSendTo(s_, static_cast<const char*>(buffer), static_cast<int>(length),
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+ // Suppress SIGPIPE. See above for explanation.
+ MSG_NOSIGNAL,
+ #else
+@@ -538,7 +538,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* s
+ *slevel = IPPROTO_IP;
+ *sopt = IP_DONTFRAGMENT;
+ break;
+-#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__)
++#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD) || defined(__native_client__)
+ RTC_LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported.";
+ return -1;
+ #elif defined(WEBRTC_POSIX)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread.cc
@@ -0,0 +1,12 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread.cc
+@@ -15,7 +15,9 @@
+ #include "rtc_base/timeutils.h"
+
+ #if defined(WEBRTC_LINUX)
++#if !defined(__FreeBSD__)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/syscall.h>
+ #endif
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread__types.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_platform__thread__types.cc
@@ -0,0 +1,40 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread_types.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/platform_thread_types.cc
+@@ -11,7 +11,9 @@
+ #include "rtc_base/platform_thread_types.h"
+
+ #if defined(WEBRTC_LINUX)
++#if !defined(__FreeBSD__)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/syscall.h>
+ #endif
+
+@@ -27,8 +29,10 @@ PlatformThreadId CurrentThreadId() {
+ return gettid();
+ #elif defined(WEBRTC_FUCHSIA)
+ return zx_thread_self();
+-#elif defined(WEBRTC_LINUX)
++#elif defined(WEBRTC_LINUX) && !defined(__FreeBSD__)
+ return syscall(__NR_gettid);
++#elif defined(__FreeBSD__)
++ return reinterpret_cast<uint64_t>(pthread_self());
+ #else
+ // Default implementation for nacl and solaris.
+ return reinterpret_cast<pid_t>(pthread_self());
+@@ -55,6 +59,7 @@ bool IsThreadRefEqual(const PlatformThreadRef& a, cons
+ }
+
+ void SetCurrentThreadName(const char* name) {
++#if !defined(__FreeBSD__)
+ #if defined(WEBRTC_WIN)
+ struct {
+ DWORD dwType;
+@@ -72,6 +77,7 @@ void SetCurrentThreadName(const char* name) {
+ prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT
+ #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
+ pthread_setname_np(name);
++#endif
+ #endif
+ }
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_stringutils.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_rtc__base_stringutils.h
@@ -0,0 +1,17 @@
+--- src/3rdparty/chromium/third_party/webrtc/rtc_base/stringutils.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/stringutils.h
+@@ -24,11 +24,11 @@
+ #endif // WEBRTC_WIN
+
+ #if defined(WEBRTC_POSIX)
+-#ifdef BSD
++#if defined(WEBRTC_BSD) || defined(BSD)
+ #include <stdlib.h>
+-#else // BSD
++#else // WEBRTC_BSD
+ #include <alloca.h>
+-#endif // !BSD
++#endif // !WEBRTC_BSD
+ #endif // WEBRTC_POSIX
+
+ #include <string>
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_BUILD.gn
@@ -1,20 +1,11 @@
---- src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn.orig 2017-01-26 00:50:17 UTC
+--- src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn
-@@ -90,7 +90,7 @@ rtc_static_library("system_wrappers") {
- libs += [ "log" ]
- }
-
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- defines += [ "WEBRTC_THREAD_RR" ]
-
+@@ -75,8 +75,6 @@ rtc_static_library("system_wrappers") {
if (!build_with_chromium) {
-@@ -100,7 +100,7 @@ rtc_static_library("system_wrappers") {
- libs += [ "rt" ]
- }
-
-- if (is_linux || is_android) {
-+ if (is_linux || is_android || is_bsd) {
- sources += [ "source/atomic32_non_darwin_unix.cc" ]
+ deps += [ ":cpu_features_linux" ]
+ }
+-
+- libs += [ "rt" ]
}
+ if (is_ios || is_mac) {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/atomic32_non_darwin_unix.cc.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/atomic32_non_darwin_unix.cc
-@@ -12,7 +12,7 @@
-
- #include <assert.h>
- #include <inttypes.h>
--#include <malloc.h>
-+#include <stdlib.h>
-
- #include "webrtc/common_types.h"
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_voice__engine_voice__engine__defines.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_voice__engine_voice__engine__defines.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/third_party/webrtc/voice_engine/voice_engine_defines.h.orig 2017-01-26 00:50:17 UTC
-+++ src/3rdparty/chromium/third_party/webrtc/voice_engine/voice_engine_defines.h
-@@ -210,7 +210,7 @@ inline int VoEChannelId(int moduleId) {
- #include <pthread.h>
- #include <sys/socket.h>
- #include <sys/types.h>
--#ifndef QNX
-+#if !defined(QNX) && !defined(WEBRTC_BSD)
- #include <linux/net.h>
- #ifndef ANDROID
- #include <sys/soundcard.h>
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_webrtc_webrtc.gni
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/third_party/webrtc/webrtc.gni.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/webrtc/webrtc.gni
+@@ -206,7 +206,7 @@ rtc_libvpx_dir = "//third_party/libvpx"
+ rtc_opus_dir = "//third_party/opus"
+
+ # Desktop capturer is supported only on Windows, OSX and Linux.
+-rtc_desktop_capture_supported = is_win || is_mac || (is_linux && rtc_use_x11)
++rtc_desktop_capture_supported = is_win || is_mac || ((is_linux && rtc_use_x11) && !is_bsd)
+
+ ###############################################################################
+ # Templates
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_widevine_cdm_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_widevine_cdm_BUILD.gn
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/3rdparty/chromium/third_party/widevine/cdm/BUILD.gn.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/third_party/widevine/cdm/BUILD.gn
-@@ -26,7 +26,7 @@ if (is_android) {
- widevine_cdm_version_h_file =
- "chromeos/$widevine_arch/widevine_cdm_version.h"
- widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
-- } else if (is_linux) {
-+ } else if (is_linux || is_bsd) {
- widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h"
- widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ]
- } else if (is_win) {
-@@ -160,7 +160,7 @@ if ((is_chrome_branded || enable_widevin
- ":widevinecdm",
- ]
-
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- ldflags =
- [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so",
- root_build_dir) ]
-@@ -183,7 +183,7 @@ if ((is_chrome_branded || enable_widevin
- # This target exists for tests to depend on that pulls in a runtime dependency
- # on the license server.
- source_set("widevine_test_license_server") {
-- if (is_chrome_branded && is_linux) {
-+ if (is_chrome_branded && is_linux || is_bsd) {
- deps = [
- # TODO(jrummell)
- # This target should be removed and targets should have data_deps on this target:
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_BUILD.gn
@@ -1,11 +1,11 @@
---- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig 2017-01-26 00:49:31 UTC
+--- src/3rdparty/chromium/third_party/zlib/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/zlib/BUILD.gn
-@@ -115,7 +115,7 @@ static_library("minizip") {
- "contrib/minizip/iowin32.h",
+@@ -359,7 +359,7 @@ static_library("bundled_minizip") {
]
}
-- if (is_mac || is_ios || is_android) {
-+ if (is_mac || is_ios || is_android || is_bsd) {
+
+- if (is_mac || is_ios || is_android || is_nacl) {
++ if (is_mac || is_ios || is_android || is_nacl || is_bsd) {
# Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
# use fopen, ftell, and fseek instead on these systems.
defines = [ "USE_FILE32API" ]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_arm__features.c
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_arm__features.c
@@ -0,0 +1,29 @@
+--- src/3rdparty/chromium/third_party/zlib/arm_features.c.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/third_party/zlib/arm_features.c
+@@ -16,12 +16,13 @@
+ #include <asm/hwcap.h>
+ #include <sys/auxv.h>
+ #else
+-#error ### No ARM CPU features detection in your platform/OS
++/* #error ### No ARM CPU features detection in your platform/OS */
+ #endif
+
+ int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0;
+ int ZLIB_INTERNAL arm_cpu_enable_pmull = 0;
+
++#ifdef ARMV8_OS_LINUX
+ static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT;
+
+ static void init_arm_features(void)
+@@ -53,8 +54,11 @@ static void init_arm_features(void)
+ if (capabilities & flag_pmull)
+ arm_cpu_enable_pmull = 1;
+ }
++#endif
+
+ void ZLIB_INTERNAL arm_check_features(void)
+ {
++#ifdef ARMV8_OS_LINUX
+ pthread_once(&cpu_check_inited_once, init_arm_features);
++#endif
+ }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_battor__agent_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_battor__agent_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/tools/battor_agent/BUILD.gn.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/tools/battor_agent/BUILD.gn
-@@ -5,7 +5,7 @@
- import("//testing/test.gni")
-
- # Works only on desktop platforms.
--assert(is_win || is_linux || is_mac)
-+assert(is_win || is_linux || is_bsd || is_mac)
-
- executable("battor_agent") {
- sources = [
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_gn_args.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_gn_args.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/tools/gn/args.cc.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/tools/gn/args.cc
-@@ -254,6 +254,8 @@ void Args::SetSystemVarsLocked(Scope* de
- os = "mac";
- #elif defined(OS_LINUX)
- os = "linux";
-+#elif defined(OS_BSD)
-+ os = "bsd";
- #elif defined(OS_ANDROID)
- os = "android";
- #elif defined(OS_NETBSD)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_gn_bootstrap_bootstrap.py
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_gn_bootstrap_bootstrap.py
+++ /dev/null
@@ -1,69 +0,0 @@
---- src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py
-@@ -23,6 +23,7 @@ import os
- import shutil
- import subprocess
- import sys
-+import platform
- import tempfile
-
- BOOTSTRAP_DIR = os.path.dirname(os.path.abspath(__file__))
-@@ -31,8 +32,9 @@ SRC_ROOT = os.path.dirname(os.path.dirname(GN_ROOT))
-
- is_win = sys.platform.startswith('win')
- is_linux = sys.platform.startswith('linux')
-+is_bsd = platform.system().lower().endswith('bsd')
- is_mac = sys.platform.startswith('darwin')
--is_posix = is_linux or is_mac
-+is_posix = is_linux or is_mac or is_bsd
-
- def check_call(cmd, **kwargs):
- logging.debug('Running: %s', ' '.join(cmd))
-@@ -497,7 +499,6 @@ def write_gn_ninja(path, root_gen_dir, options):
- 'base/trace_event/heap_profiler_heap_dump_writer.cc',
- 'base/trace_event/heap_profiler_stack_frame_deduplicator.cc',
- 'base/trace_event/heap_profiler_type_name_deduplicator.cc',
-- 'base/trace_event/malloc_dump_provider.cc',
- 'base/trace_event/memory_allocator_dump.cc',
- 'base/trace_event/memory_allocator_dump_guid.cc',
- 'base/trace_event/memory_dump_manager.cc',
-@@ -605,6 +606,39 @@ def write_gn_ninja(path, root_gen_dir, options):
- 'base/third_party/libevent/epoll.c',
- ])
-
-+ if is_bsd:
-+ libs.extend(['-lexecinfo', '-lkvm'])
-+ ldflags.extend(['-pthread'])
-+
-+ static_libraries['xdg_user_dirs'] = {
-+ 'sources': [
-+ 'base/third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
-+ ],
-+ 'tool': 'cxx',
-+ }
-+ static_libraries['base']['sources'].extend([
-+ 'base/allocator/allocator_shim.cc',
-+ 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
-+ 'base/memory/shared_memory_posix.cc',
-+ 'base/nix/xdg_util.cc',
-+ #'base/process/internal_linux.cc',
-+ 'base/process/process_handle_' + platform.system().lower() + '.cc',
-+ 'base/process/process_iterator_' + platform.system().lower() + '.cc',
-+ # 'base/process/process_linux.cc',
-+ 'base/process/process_metrics_'+ platform.system().lower() + '.cc',
-+ 'base/strings/sys_string_conversions_posix.cc',
-+ 'base/sys_info_' + platform.system().lower() + '.cc',
-+ 'base/threading/platform_thread_' + platform.system().lower() + '.cc',
-+ # 'base/trace_event/malloc_dump_provider.cc',
-+ ])
-+ static_libraries['libevent']['include_dirs'].extend([
-+ os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'freebsd')
-+ ])
-+ static_libraries['libevent']['sources'].extend([
-+ 'base/third_party/libevent/kqueue.c',
-+ ])
-+ # Suppressing warnings
-+ cflags.extend(['-Wno-deprecated-register', '-Wno-parentheses-equality'])
-
- if is_mac:
- static_libraries['base']['sources'].extend([
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_json__schema__compiler_feature__compiler.py
@@ -0,0 +1,10 @@
+--- src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/tools/json_schema_compiler/feature_compiler.py
+@@ -205,6 +205,7 @@ FEATURE_GRAMMAR = (
+ 'enum_map': {
+ 'chromeos': 'Feature::CHROMEOS_PLATFORM',
+ 'linux': 'Feature::LINUX_PLATFORM',
++ 'bsd': 'Feature::LINUX_PLATFORM',
+ 'mac': 'Feature::MACOSX_PLATFORM',
+ 'win': 'Feature::WIN_PLATFORM',
+ }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_json__schema__compiler_model.py
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_json__schema__compiler_model.py
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/tools/json_schema_compiler/model.py.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/tools/json_schema_compiler/model.py
+@@ -602,7 +602,7 @@ class Platforms(object):
+ """
+ CHROMEOS = _PlatformInfo("chromeos")
+ CHROMEOS_TOUCH = _PlatformInfo("chromeos_touch")
+- LINUX = _PlatformInfo("linux")
++ LINUX = _PlatformInfo("bsd")
+ MAC = _PlatformInfo("mac")
+ WIN = _PlatformInfo("win")
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_perf_chrome__telemetry__build_BUILD.gn
@@ -1,11 +1,11 @@
---- src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn.orig 2017-12-15 17:17:15.832652000 -0500
-+++ src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn 2017-12-15 17:17:42.136926000 -0500
-@@ -93,7 +93,7 @@
+--- src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/tools/perf/chrome_telemetry_build/BUILD.gn
+@@ -44,7 +44,7 @@ group("telemetry_chrome_test") {
data_deps += [ "//chrome:reorder_imports" ]
}
- if (is_linux) {
+ if (is_linux && !is_bsd) {
- data_deps += [
- "//tools/xdisplaycheck",
- "//breakpad:dump_syms($host_toolchain)",
+ data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
+ }
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_tools_variations_fieldtrial__to__struct.py
@@ -1,11 +1,10 @@
---- src/3rdparty/chromium/tools/variations/fieldtrial_to_struct.py.orig 2017-01-26 00:49:31 UTC
+--- src/3rdparty/chromium/tools/variations/fieldtrial_to_struct.py.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/tools/variations/fieldtrial_to_struct.py
-@@ -116,7 +116,7 @@ def main(arguments):
- if not opts.platform:
- parser.error('You must specify a --platform.')
+@@ -30,6 +30,7 @@ _platforms = [
+ 'linux',
+ 'mac',
+ 'windows',
++ 'bsd',
+ ]
-- supported_platforms = ['android', 'chromeos', 'ios', 'linux', 'mac', 'win']
-+ supported_platforms = ['android', 'chromeos', 'ios', 'linux', 'mac', 'win', 'bsd']
- if opts.platform not in supported_platforms:
- parser.error('\'%s\' is an unknown platform. Supported platforms: %s' %
- (opts.platform, supported_platforms))
+ # Convert a platform argument to the matching Platform enum value in
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_accessibility_platform_ax__platform__node.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_accessibility_platform_ax__platform__node.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node.h.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node.h
-@@ -22,7 +22,7 @@
- #define PLATFORM_HAS_AX_PLATFORM_NODE_IMPL 1
- #endif
-
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(USE_X11)
- #define PLATFORM_HAS_AX_PLATFORM_NODE_IMPL 1
- #endif
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_aura_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_aura_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/aura/BUILD.gn.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/ui/aura/BUILD.gn
-@@ -361,7 +361,7 @@ test("aura_unittests") {
- "//ui/gl:test_support",
- ]
-
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- deps += [ "//third_party/mesa" ]
- }
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_BUILD.gn
+++ /dev/null
@@ -1,61 +0,0 @@
---- src/3rdparty/chromium/ui/base/BUILD.gn.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/ui/base/BUILD.gn
-@@ -348,7 +348,7 @@ component("base") {
- sources += [ "touch/touch_device_android.cc" ]
- } else if (is_ios) {
- sources += [ "touch/touch_device_ios.cc" ]
-- } else if (is_linux) {
-+ } else if (is_linux || is_bsd) {
- sources += [ "touch/touch_device_linux.cc" ]
- } else {
- # Empty implementation for all other cases.
-@@ -450,11 +450,11 @@ component("base") {
- ]
- }
-
-- if (!use_aura || !is_linux) {
-+ if (!use_aura || !(is_linux || is_bsd)) {
- sources -= [ "resource/resource_bundle_auralinux.cc" ]
- }
-
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- deps += [ "//build/linux:fontconfig" ]
- }
-
-@@ -462,7 +462,7 @@ component("base") {
- configs += [ "//build/config/linux:glib" ]
- }
-
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- if (!toolkit_views && !use_aura) {
- sources -= [
- "dragdrop/drag_utils.cc",
-@@ -801,7 +801,7 @@ test("ui_base_unittests") {
- "ime/win/imm32_manager_unittest.cc",
- "ime/win/tsf_input_scope_unittest.cc",
- ]
-- if (is_linux && use_aura && !is_chromeos) {
-+ if ((is_linux || is_bsd) && use_aura && !is_chromeos) {
- sources += [ "ime/input_method_auralinux_unittest.cc" ]
- }
- if (use_x11) {
-@@ -924,7 +924,7 @@ test("ui_base_unittests") {
- ]
- }
-
-- if (is_android || is_linux || is_mac || is_win) {
-+ if (is_android || is_linux || is_bsd || is_mac || is_win) {
- # TODO(brettw): We should be able to depend on //ui/resources:ui_test_pak
- # instead of depending directly on the non-test .pak files, but depending
- # on ui_test_pak seems to have no effect.
-@@ -937,7 +937,7 @@ test("ui_base_unittests") {
- "//third_party/mesa:osmesa",
- ]
- }
-- if (is_linux || is_win) {
-+ if (is_linux || is_bsd || is_win) {
- data += [
- # TODO(brettw): Remove these two lines.
- "$root_out_dir/ui/en-US.pak",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_dragdrop_os__exchange__data__provider__factory.cc
@@ -0,0 +1,20 @@
+--- src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_factory.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/base/dragdrop/os_exchange_data_provider_factory.cc
+@@ -8,7 +8,7 @@
+
+ #if defined(USE_X11)
+ #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #include "ui/base/dragdrop/os_exchange_data_provider_aura.h"
+ #elif defined(OS_MACOSX)
+ #include "ui/base/dragdrop/os_exchange_data_provider_builder_mac.h"
+@@ -43,7 +43,7 @@ OSExchangeDataProviderFactory::CreateProvider() {
+
+ #if defined(USE_X11)
+ return std::make_unique<OSExchangeDataProviderAuraX11>();
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ return std::make_unique<OSExchangeDataProviderAura>();
+ #elif defined(OS_MACOSX)
+ return ui::BuildOSExchangeDataProviderMac();
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_BUILD.gn
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/3rdparty/chromium/ui/base/ime/BUILD.gn.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/ui/base/ime/BUILD.gn
-@@ -123,7 +123,7 @@ component("ime") {
- ":text_input_types",
- ]
-
-- if (!use_aura || (!is_linux && !use_ozone)) {
-+ if (!use_aura || (!(is_linux || is_bsd) && !use_ozone) || !is_bsd) {
- sources -= [
- "input_method_auralinux.cc",
- "input_method_auralinux.h",
-@@ -137,7 +137,7 @@ component("ime") {
- ]
- }
-
-- if (!is_chromeos && is_linux) {
-+ if (!is_chromeos && (is_linux || is_bsd)) {
- sources += [
- "linux/text_edit_command_auralinux.cc",
- "linux/text_edit_command_auralinux.h",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_input__method__factory.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_input__method__factory.cc
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/3rdparty/chromium/ui/base/ime/input_method_factory.cc.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/ui/base/ime/input_method_factory.cc
-@@ -14,7 +14,8 @@
- #include "ui/base/ime/input_method_win.h"
- #elif defined(OS_MACOSX)
- #include "ui/base/ime/input_method_mac.h"
--#elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11)
-+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) && \
-+ defined(USE_X11)
- #include "ui/base/ime/input_method_auralinux.h"
- #elif defined(OS_ANDROID)
- #include "ui/base/ime/input_method_android.h"
-@@ -55,7 +56,8 @@ std::unique_ptr<InputMethod> CreateInput
- return base::MakeUnique<InputMethodWin>(delegate, widget);
- #elif defined(OS_MACOSX)
- return base::MakeUnique<InputMethodMac>(delegate);
--#elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11)
-+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) && \
-+ defined(USE_X11)
- return base::MakeUnique<InputMethodAuraLinux>(delegate);
- #elif defined(OS_ANDROID)
- return base::MakeUnique<InputMethodAndroid>(delegate);
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_input__method__initializer.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_input__method__initializer.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ime_input__method__initializer.cc
@@ -1,6 +1,6 @@
---- src/3rdparty/chromium/ui/base/ime/input_method_initializer.cc.orig 2017-01-26 00:49:31 UTC
+--- src/3rdparty/chromium/ui/base/ime/input_method_initializer.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/base/ime/input_method_initializer.cc
-@@ -8,14 +8,14 @@
+@@ -8,7 +8,7 @@
#if defined(OS_CHROMEOS)
#include "ui/base/ime/ime_bridge.h"
@@ -8,30 +8,31 @@
+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
#include "base/logging.h"
#include "ui/base/ime/linux/fake_input_method_context_factory.h"
- #endif
+ #elif defined(OS_WIN)
+@@ -18,7 +18,7 @@
namespace {
-#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
+#if !defined(OS_CHROMEOS) && defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
- const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory;
+ const ui::LinuxInputMethodContextFactory*
+ g_linux_input_method_context_factory_for_testing;
#endif
-
-@@ -38,7 +38,7 @@ void ShutdownInputMethod() {
+@@ -46,7 +46,7 @@ void ShutdownInputMethod() {
void InitializeInputMethodForTesting() {
#if defined(OS_CHROMEOS)
IMEBridge::Initialize();
-#elif defined(USE_AURA) && defined(OS_LINUX)
+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
- if (!g_linux_input_method_context_factory)
- g_linux_input_method_context_factory = new FakeInputMethodContextFactory();
- const LinuxInputMethodContextFactory* factory =
-@@ -54,7 +54,7 @@ void InitializeInputMethodForTesting() {
+ if (!g_linux_input_method_context_factory_for_testing)
+ g_linux_input_method_context_factory_for_testing =
+ new FakeInputMethodContextFactory();
+@@ -67,7 +67,7 @@ void InitializeInputMethodForTesting() {
void ShutdownInputMethodForTesting() {
#if defined(OS_CHROMEOS)
IMEBridge::Shutdown();
-#elif defined(USE_AURA) && defined(OS_LINUX)
-+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
++#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
const LinuxInputMethodContextFactory* factory =
LinuxInputMethodContextFactory::instance();
- CHECK(!factory || factory == g_linux_input_method_context_factory)
+ CHECK(!factory || factory == g_linux_input_method_context_factory_for_testing)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_resource_resource__bundle.cc
@@ -1,20 +1,20 @@
---- src/3rdparty/chromium/ui/base/resource/resource_bundle.cc.orig 2017-01-26 00:49:31 UTC
+--- src/3rdparty/chromium/ui/base/resource/resource_bundle.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/base/resource/resource_bundle.cc
-@@ -651,7 +651,7 @@ void ResourceBundle::ReloadFonts() {
+@@ -720,7 +720,7 @@ void ResourceBundle::ReloadFonts() {
}
ScaleFactor ResourceBundle::GetMaxScaleFactor() const {
--#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
-+#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
return max_scale_factor_;
#else
return GetSupportedScaleFactors().back();
-@@ -711,7 +711,7 @@ void ResourceBundle::InitSharedInstance(
- supported_scale_factors.push_back(SCALE_FACTOR_100P);
- }
- #elif defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_LINUX) || \
-- defined(OS_WIN)
-+ defined(OS_WIN) || defined(OS_BSD)
+@@ -766,7 +766,7 @@ void ResourceBundle::InitSharedInstance(Delegate* dele
+ // On platforms other than iOS, 100P is always a supported scale factor.
+ // For Windows we have a separate case in this function.
+ supported_scale_factors.push_back(SCALE_FACTOR_100P);
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
supported_scale_factors.push_back(SCALE_FACTOR_200P);
#endif
- ui::SetSupportedScaleFactors(supported_scale_factors);
+ #endif
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.h
@@ -0,0 +1,14 @@
+--- src/3rdparty/chromium/ui/base/ui_base_features.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/base/ui_base_features.h
+@@ -43,9 +43,9 @@ UI_BASE_EXPORT extern const base::Feature kTSFImeSuppo
+ UI_BASE_EXPORT bool IsUsingWMPointerForTouch();
+ #endif // defined(OS_WIN)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ UI_BASE_EXPORT extern const base::Feature kDirectManipulationStylus;
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ // Used to have ash (Chrome OS system UI) run in its own process.
+ // TODO(jamescook): Make flag only available in Chrome OS.
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__base__features.cc
@@ -0,0 +1,20 @@
+--- src/3rdparty/chromium/ui/base/ui_base_features.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/base/ui_base_features.cc
+@@ -120,7 +120,7 @@ const base::Feature kPrecisionTouchpadScrollPhase{
+ "PrecisionTouchpadScrollPhase", base::FEATURE_ENABLED_BY_DEFAULT};
+ #endif // defined(OS_WIN)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ // Enables stylus appearing as touch when in contact with digitizer.
+ const base::Feature kDirectManipulationStylus = {
+ "DirectManipulationStylus",
+@@ -130,7 +130,7 @@ const base::Feature kDirectManipulationStylus = {
+ base::FEATURE_DISABLED_BY_DEFAULT
+ #endif
+ };
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ const base::Feature kMash = {"Mash", base::FEATURE_DISABLED_BY_DEFAULT};
+
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__features.gni
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_base_ui__features.gni
+++ /dev/null
@@ -1,8 +0,0 @@
---- src/3rdparty/chromium/ui/base/ui_features.gni.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/ui/base/ui_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.
-
--enable_hidpi = is_mac || is_win || is_linux
-+enable_hidpi = is_mac || is_win || is_linux || is_bsd
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_compositor_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_compositor_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/compositor/BUILD.gn.orig 2017-01-26 00:49:31 UTC
-+++ src/3rdparty/chromium/ui/compositor/BUILD.gn
-@@ -201,7 +201,7 @@ test("compositor_unittests") {
- "//ui/gl",
- "//ui/resources",
- ]
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- deps += [ "//third_party/mesa:osmesa" ]
- }
- }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_events_devices_x11_device__data__manager__x11.cc
@@ -0,0 +1,19 @@
+--- src/3rdparty/chromium/ui/events/devices/x11/device_data_manager_x11.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/events/devices/x11/device_data_manager_x11.cc
+@@ -829,6 +829,8 @@ void DeviceDataManagerX11::SetDisabledKeyboardAllowedK
+ }
+
+ void DeviceDataManagerX11::DisableDevice(int deviceid) {
++ NOTIMPLEMENTED();
++#if !defined(OS_BSD)
+ blocked_devices_.set(deviceid, true);
+ // TODO(rsadam@): Support blocking touchscreen devices.
+ std::vector<InputDevice> keyboards = GetKeyboardDevices();
+@@ -840,6 +842,7 @@ void DeviceDataManagerX11::DisableDevice(int deviceid)
+ keyboards.erase(it);
+ DeviceDataManager::OnKeyboardDevicesUpdated(keyboards);
+ }
++#endif
+ }
+
+ void DeviceDataManagerX11::EnableDevice(int deviceid) {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_BUILD.gn
@@ -1,20 +1,11 @@
---- src/3rdparty/chromium/ui/gfx/BUILD.gn.orig 2017-01-26 00:49:31 UTC
+--- src/3rdparty/chromium/ui/gfx/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/gfx/BUILD.gn
-@@ -371,7 +371,7 @@ component("gfx") {
+@@ -572,7 +572,7 @@ source_set("memory_buffer_sources") {
+ deps += [ "//third_party/libdrm" ]
}
- # Linux.
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- deps += [ "//build/linux:fontconfig" ]
+- if (is_linux || is_android) {
++ if ((is_linux || is_android) && !is_bsd) {
+ deps += [ "//third_party/libsync" ]
}
-@@ -549,7 +549,7 @@ static_library("test_support") {
- "test/ui_cocoa_test_helper.mm",
- ]
- }
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- deps += [ "//build/linux:fontconfig" ]
- }
- }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__list.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__list.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/ui/gfx/font_list.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gfx/font_list.cc
+@@ -24,7 +24,7 @@ base::LazyInstance<scoped_refptr<gfx::FontListImpl>>::
+ bool g_default_impl_initialized = false;
+
+ bool IsFontFamilyAvailable(const std::string& family, SkFontMgr* fontManager) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ return !!fontManager->legacyMakeTypeface(family.c_str(), SkFontStyle());
+ #else
+ sk_sp<SkFontStyleSet> set(fontManager->matchFamily(family.c_str()));
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_font__render__params.h
@@ -1,6 +1,6 @@
---- src/3rdparty/chromium/ui/gfx/font_render_params.h.orig 2017-01-26 00:49:31 UTC
+--- src/3rdparty/chromium/ui/gfx/font_render_params.h.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/gfx/font_render_params.h
-@@ -106,13 +106,13 @@ GFX_EXPORT FontRenderParams GetFontRende
+@@ -111,13 +111,13 @@ GFX_EXPORT FontRenderParams GetFontRenderParams(
const FontRenderParamsQuery& query,
std::string* family_out);
@@ -11,8 +11,8 @@
GFX_EXPORT void ClearFontRenderParamsCacheForTest();
#endif
--#if defined(OS_CHROMEOS) || defined(OS_LINUX)
-+#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+-#if defined(OS_LINUX) || (defined(OS_ANDROID) && BUILDFLAG(ENABLE_VR))
++#if defined(OS_LINUX) || defined(OS_BSD) || (defined(OS_ANDROID) && BUILDFLAG(ENABLE_VR))
// Gets the device scale factor to query the FontRenderParams.
GFX_EXPORT float GetFontRenderParamsDeviceScaleFactor();
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_gpu__memory__buffer.h
@@ -0,0 +1,20 @@
+--- src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gfx/gpu_memory_buffer.h
+@@ -16,7 +16,7 @@
+ #include "ui/gfx/geometry/rect.h"
+ #include "ui/gfx/gfx_export.h"
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "ui/gfx/native_pixmap_handle.h"
+ #elif defined(OS_MACOSX) && !defined(OS_IOS)
+ #include "ui/gfx/mac/io_surface.h"
+@@ -57,7 +57,7 @@ struct GFX_EXPORT GpuMemoryBufferHandle {
+ base::SharedMemoryHandle handle;
+ uint32_t offset;
+ int32_t stride;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ NativePixmapHandle native_pixmap_handle;
+ #elif defined(OS_MACOSX) && !defined(OS_IOS)
+ ScopedRefCountedIOSurfaceMachPort mach_port;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_ipc_gfx__param__traits__macros.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_ipc_gfx__param__traits__macros.h
@@ -0,0 +1,29 @@
+--- src/3rdparty/chromium/ui/gfx/ipc/gfx_param_traits_macros.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gfx/ipc/gfx_param_traits_macros.h
+@@ -18,7 +18,7 @@
+ #include "ui/gfx/selection_bound.h"
+ #include "ui/gfx/swap_result.h"
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "ui/gfx/native_pixmap_handle.h"
+ #endif
+
+@@ -51,7 +51,7 @@ IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle)
+ IPC_STRUCT_TRAITS_MEMBER(handle)
+ IPC_STRUCT_TRAITS_MEMBER(offset)
+ IPC_STRUCT_TRAITS_MEMBER(stride)
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ IPC_STRUCT_TRAITS_MEMBER(native_pixmap_handle)
+ #elif defined(OS_MACOSX)
+ IPC_STRUCT_TRAITS_MEMBER(mach_port)
+@@ -66,7 +66,7 @@ IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId)
+ IPC_STRUCT_TRAITS_MEMBER(id)
+ IPC_STRUCT_TRAITS_END()
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ IPC_STRUCT_TRAITS_BEGIN(gfx::NativePixmapPlane)
+ IPC_STRUCT_TRAITS_MEMBER(stride)
+ IPC_STRUCT_TRAITS_MEMBER(offset)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_linux_client__native__pixmap__dmabuf.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_linux_client__native__pixmap__dmabuf.cc
@@ -0,0 +1,25 @@
+--- src/3rdparty/chromium/ui/gfx/linux/client_native_pixmap_dmabuf.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gfx/linux/client_native_pixmap_dmabuf.cc
+@@ -5,7 +5,9 @@
+ #include "ui/gfx/linux/client_native_pixmap_dmabuf.h"
+
+ #include <fcntl.h>
++#if !defined(__FreeBSD__)
+ #include <linux/version.h>
++#endif
+ #include <stddef.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+@@ -17,11 +19,7 @@
+ #include "base/strings/stringprintf.h"
+ #include "base/trace_event/trace_event.h"
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+-#include <linux/dma-buf.h>
+-#else
+-#include <linux/types.h>
+-
++#if defined(__FreeBSD__)
+ struct dma_buf_sync {
+ __u64 flags;
+ };
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_mojo_buffer__types__struct__traits.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_mojo_buffer__types__struct__traits.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/ui/gfx/mojo/buffer_types_struct_traits.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gfx/mojo/buffer_types_struct_traits.h
+@@ -291,7 +291,7 @@ template <>
+ struct StructTraits<gfx::mojom::NativePixmapHandleDataView,
+ gfx::NativePixmapHandle> {
+ static bool IsNull(const gfx::NativePixmapHandle& handle) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ return false;
+ #else
+ // NativePixmapHandle are not used on non-linux platforms.
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_mojo_buffer__types__struct__traits.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_mojo_buffer__types__struct__traits.cc
@@ -0,0 +1,42 @@
+--- src/3rdparty/chromium/ui/gfx/mojo/buffer_types_struct_traits.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gfx/mojo/buffer_types_struct_traits.cc
+@@ -27,10 +27,10 @@ std::vector<mojo::ScopedHandle>
+ StructTraits<gfx::mojom::NativePixmapHandleDataView, gfx::NativePixmapHandle>::
+ fds(const gfx::NativePixmapHandle& pixmap_handle) {
+ std::vector<mojo::ScopedHandle> handles;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ for (const base::FileDescriptor& fd : pixmap_handle.fds)
+ handles.emplace_back(mojo::WrapPlatformFile(fd.fd));
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+ return handles;
+ }
+
+@@ -38,7 +38,7 @@ bool StructTraits<
+ gfx::mojom::NativePixmapHandleDataView,
+ gfx::NativePixmapHandle>::Read(gfx::mojom::NativePixmapHandleDataView data,
+ gfx::NativePixmapHandle* out) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ mojo::ArrayDataView<mojo::ScopedHandle> handles_data_view;
+ data.GetFdsDataView(&handles_data_view);
+ for (size_t i = 0; i < handles_data_view.size(); ++i) {
+@@ -71,7 +71,7 @@ const gfx::NativePixmapHandle&
+ StructTraits<gfx::mojom::GpuMemoryBufferHandleDataView,
+ gfx::GpuMemoryBufferHandle>::
+ native_pixmap_handle(const gfx::GpuMemoryBufferHandle& handle) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ return handle.native_pixmap_handle;
+ #else
+ static gfx::NativePixmapHandle pixmap_handle;
+@@ -154,7 +154,7 @@ bool StructTraits<gfx::mojom::GpuMemoryBufferHandleDat
+ out->offset = data.offset();
+ out->stride = data.stride();
+ }
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ if (out->type == gfx::NATIVE_PIXMAP &&
+ !data.ReadNativePixmapHandle(&out->native_pixmap_handle))
+ return false;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.h
@@ -0,0 +1,28 @@
+--- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gfx/native_pixmap_handle.h
+@@ -13,7 +13,7 @@
+ #include "build/build_config.h"
+ #include "ui/gfx/gfx_export.h"
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/file_descriptor_posix.h"
+ #endif
+
+@@ -54,14 +54,14 @@ struct GFX_EXPORT NativePixmapHandle {
+
+ ~NativePixmapHandle();
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // File descriptors for the underlying memory objects (usually dmabufs).
+ std::vector<base::FileDescriptor> fds;
+ #endif
+ std::vector<NativePixmapPlane> planes;
+ };
+
+-#if defined(OS_LINUX) && !defined(TOOLKIT_QT)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT)
+ // Returns an instance of |handle| which can be sent over IPC. This duplicates
+ // the file-handles, so that the IPC code take ownership of them, without
+ // invalidating |handle|.
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gfx_native__pixmap__handle.cc
@@ -0,0 +1,28 @@
+--- src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gfx/native_pixmap_handle.cc
+@@ -4,14 +4,14 @@
+
+ #include "ui/gfx/native_pixmap_handle.h"
+
+-#if defined(OS_LINUX) && !defined(TOOLKIT_QT)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT)
+ #include <drm_fourcc.h>
+ #include "base/posix/eintr_wrapper.h"
+ #endif
+
+ namespace gfx {
+
+-#if defined(OS_LINUX) && !defined(TOOLKIT_QT)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT)
+ static_assert(NativePixmapPlane::kNoModifier == DRM_FORMAT_MOD_INVALID,
+ "gfx::NativePixmapPlane::kNoModifier should be an alias for"
+ "DRM_FORMAT_MOD_INVALID");
+@@ -36,7 +36,7 @@ NativePixmapHandle::NativePixmapHandle(const NativePix
+
+ NativePixmapHandle::~NativePixmapHandle() {}
+
+-#if defined(OS_LINUX) && !defined(TOOLKIT_QT)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(TOOLKIT_QT)
+ NativePixmapHandle CloneHandleForIPC(const NativePixmapHandle& handle) {
+ NativePixmapHandle clone;
+ std::vector<base::ScopedFD> scoped_fds;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_BUILD.gn
@@ -1,20 +1,11 @@
---- src/3rdparty/chromium/ui/gl/BUILD.gn.orig 2017-01-26 00:49:31 UTC
+--- src/3rdparty/chromium/ui/gl/BUILD.gn.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/gl/BUILD.gn
-@@ -13,7 +13,7 @@ declare_args() {
- enable_swiftshader = is_chrome_branded && is_win
- }
+@@ -200,7 +200,7 @@ component("gl") {
+ }
+ }
--use_egl = is_win || is_android || is_linux
-+use_egl = is_win || is_android || is_linux || is_bsd
- use_glx = use_x11 || ozone_platform_x11
-
- if (is_android) {
-@@ -170,7 +170,7 @@ component("gl") {
- "gl_surface_egl.h",
- ]
- }
-- if (is_android || is_linux) {
-+ if (is_android || is_linux || is_bsd) {
- sources += [
- "gl_implementation_osmesa.cc",
- "gl_implementation_osmesa.h",
+- if (is_posix && !is_fuchsia && !is_mac) {
++ if (is_posix && !is_fuchsia && !is_mac && !is_bsd) {
+ # Windows has USE_EGL but doesn't support base::FileDescriptor.
+ # libsync isn't supported or needed on MacOSX.
+ # Fuchsia is excluded due to a libsync dependency and because it's
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_generate__bindings.py
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_generate__bindings.py
@@ -0,0 +1,12 @@
+--- src/3rdparty/chromium/ui/gl/generate_bindings.py.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gl/generate_bindings.py
+@@ -2350,6 +2350,9 @@ GLX_FUNCTIONS = [
+ 'arguments':
+ 'Display* dpy, GLXDrawable drawable, int32_t* numerator, '
+ 'int32_t* denominator' },
++{ 'return_type': '__GLXextFuncPtr',
++ 'names': ['glXGetProcAddressARB'],
++ 'arguments': 'const GLubyte* procName', },
+ { 'return_type': 'void',
+ 'names': ['glXGetSelectedEvent'],
+ 'arguments': 'Display* dpy, GLXDrawable drawable, unsigned long* mask', },
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__bindings__api__autogen__glx.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__bindings__api__autogen__glx.h
@@ -0,0 +1,10 @@
+--- src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_glx.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_glx.h
+@@ -84,6 +84,7 @@ bool glXGetMscRateOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int32_t* numerator,
+ int32_t* denominator) override;
++__GLXextFuncPtr glXGetProcAddressARBFn(const GLubyte* procName) override;
+ void glXGetSelectedEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) override;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__bindings__autogen__glx.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__bindings__autogen__glx.h
@@ -0,0 +1,43 @@
+--- src/3rdparty/chromium/ui/gl/gl_bindings_autogen_glx.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gl/gl_bindings_autogen_glx.h
+@@ -104,6 +104,8 @@ typedef bool(GL_BINDING_CALL* glXGetMscRateOMLProc)(Di
+ GLXDrawable drawable,
+ int32_t* numerator,
+ int32_t* denominator);
++typedef __GLXextFuncPtr(GL_BINDING_CALL* glXGetProcAddressARBProc)(
++ const GLubyte* procName);
+ typedef void(GL_BINDING_CALL* glXGetSelectedEventProc)(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask);
+@@ -166,6 +168,7 @@ typedef void(GL_BINDING_CALL* glXWaitXProc)(void);
+
+ struct ExtensionsGLX {
+ bool b_GLX_ARB_create_context;
++ bool b_GLX_ARB_get_proc_address;
+ bool b_GLX_EXT_swap_control;
+ bool b_GLX_EXT_texture_from_pixmap;
+ bool b_GLX_MESA_copy_sub_buffer;
+@@ -203,6 +206,7 @@ struct ProcsGLX {
+ glXGetFBConfigFromVisualSGIXProc glXGetFBConfigFromVisualSGIXFn;
+ glXGetFBConfigsProc glXGetFBConfigsFn;
+ glXGetMscRateOMLProc glXGetMscRateOMLFn;
++ glXGetProcAddressARBProc glXGetProcAddressARBFn;
+ glXGetSelectedEventProc glXGetSelectedEventFn;
+ glXGetSyncValuesOMLProc glXGetSyncValuesOMLFn;
+ glXGetVisualFromFBConfigProc glXGetVisualFromFBConfigFn;
+@@ -310,6 +314,7 @@ class GL_EXPORT GLXApi {
+ GLXDrawable drawable,
+ int32_t* numerator,
+ int32_t* denominator) = 0;
++ virtual __GLXextFuncPtr glXGetProcAddressARBFn(const GLubyte* procName) = 0;
+ virtual void glXGetSelectedEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) = 0;
+@@ -394,6 +399,7 @@ class GL_EXPORT GLXApi {
+ ::gl::g_current_glx_context->glXGetFBConfigFromVisualSGIXFn
+ #define glXGetFBConfigs ::gl::g_current_glx_context->glXGetFBConfigsFn
+ #define glXGetMscRateOML ::gl::g_current_glx_context->glXGetMscRateOMLFn
++#define glXGetProcAddressARB ::gl::g_current_glx_context->glXGetProcAddressARBFn
+ #define glXGetSelectedEvent ::gl::g_current_glx_context->glXGetSelectedEventFn
+ #define glXGetSyncValuesOML ::gl::g_current_glx_context->glXGetSyncValuesOMLFn
+ #define glXGetVisualFromFBConfig \
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__bindings__autogen__glx.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__bindings__autogen__glx.cc
@@ -0,0 +1,61 @@
+--- src/3rdparty/chromium/ui/gl/gl_bindings_autogen_glx.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gl/gl_bindings_autogen_glx.cc
+@@ -119,6 +119,8 @@ void DriverGLX::InitializeExtensionBindings() {
+
+ ext.b_GLX_ARB_create_context =
+ gfx::HasExtension(extensions, "GLX_ARB_create_context");
++ ext.b_GLX_ARB_get_proc_address =
++ gfx::HasExtension(extensions, "GLX_ARB_get_proc_address");
+ ext.b_GLX_EXT_swap_control =
+ gfx::HasExtension(extensions, "GLX_EXT_swap_control");
+ ext.b_GLX_EXT_texture_from_pixmap =
+@@ -149,6 +151,11 @@ void DriverGLX::InitializeExtensionBindings() {
+ GetGLProcAddress("glXCreateContextAttribsARB"));
+ }
+
++ if (ext.b_GLX_ARB_get_proc_address) {
++ fn.glXGetProcAddressARBFn = reinterpret_cast<glXGetProcAddressARBProc>(
++ GetGLProcAddress("glXGetProcAddressARB"));
++ }
++
+ if (ext.b_GLX_SGIX_fbconfig) {
+ fn.glXGetFBConfigFromVisualSGIXFn =
+ reinterpret_cast<glXGetFBConfigFromVisualSGIXProc>(
+@@ -350,6 +357,10 @@ bool GLXApiBase::glXGetMscRateOMLFn(Display* dpy,
+ return driver_->fn.glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
+ }
+
++__GLXextFuncPtr GLXApiBase::glXGetProcAddressARBFn(const GLubyte* procName) {
++ return driver_->fn.glXGetProcAddressARBFn(procName);
++}
++
+ void GLXApiBase::glXGetSelectedEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) {
+@@ -650,6 +661,11 @@ bool TraceGLXApi::glXGetMscRateOMLFn(Display* dpy,
+ return glx_api_->glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
+ }
+
++__GLXextFuncPtr TraceGLXApi::glXGetProcAddressARBFn(const GLubyte* procName) {
++ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetProcAddressARB")
++ return glx_api_->glXGetProcAddressARBFn(procName);
++}
++
+ void TraceGLXApi::glXGetSelectedEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) {
+@@ -1072,6 +1088,14 @@ bool DebugGLXApi::glXGetMscRateOMLFn(Display* dpy,
+ << static_cast<const void*>(denominator) << ")");
+ bool result =
+ glx_api_->glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
++ GL_SERVICE_LOG("GL_RESULT: " << result);
++ return result;
++}
++
++__GLXextFuncPtr DebugGLXApi::glXGetProcAddressARBFn(const GLubyte* procName) {
++ GL_SERVICE_LOG("glXGetProcAddressARB"
++ << "(" << static_cast<const void*>(procName) << ")");
++ __GLXextFuncPtr result = glx_api_->glXGetProcAddressARBFn(procName);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+ }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__fence.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/ui/gl/gl_fence.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gl/gl_fence.cc
+@@ -18,7 +18,7 @@
+ #include "ui/gl/gl_fence_apple.h"
+ #endif
+
+-#if defined(USE_EGL) && defined(OS_POSIX) && !defined(OS_MACOSX)
++#if defined(USE_EGL) && defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD)
+ #define USE_GL_FENCE_ANDROID_NATIVE_FENCE_SYNC
+ #include "ui/gl/gl_fence_android_native_fence_sync.h"
+ #include "ui/gl/gl_surface_egl.h"
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_gl__implementation.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/ui/gl/gl_implementation.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/gl/gl_implementation.cc
+@@ -123,7 +123,7 @@ GLImplementation GetNamedGLImplementation(const std::s
+
+ GLImplementation GetSoftwareGLImplementation() {
+ #if (defined(OS_WIN) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)) || \
++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)) || \
+ (defined(OS_MACOSX) && defined(USE_EGL)))
+ return kGLImplementationSwiftShaderGL;
+ #else
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.h
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.h
@@ -1,24 +1,32 @@
---- src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.h.orig 2017-01-26 00:49:32 UTC
+--- src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.h.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.h
-@@ -32,7 +32,7 @@ class GL_EXPORT SyncControlVSyncProvider
+@@ -26,11 +26,11 @@ class SyncControlVSyncProvider : public gfx::VSyncProv
+ bool SupportGetVSyncParametersIfAvailable() const override;
+
+ static constexpr bool IsSupported() {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ return true;
+ #else
+ return false;
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+ }
+
+ protected:
+@@ -41,7 +41,7 @@ class SyncControlVSyncProvider : public gfx::VSyncProv
virtual bool GetMscRate(int32_t* numerator, int32_t* denominator) = 0;
private:
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
- bool AdjustSyncValues(int64_t* system_time, int64_t* media_stream_counter);
-
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
base::TimeTicks last_timebase_;
-@@ -46,11 +46,11 @@ class GL_EXPORT SyncControlVSyncProvider
+ uint64_t last_media_stream_counter_ = 0;
+ base::TimeDelta last_good_interval_;
+@@ -52,7 +52,7 @@ class SyncControlVSyncProvider : public gfx::VSyncProv
// from configuration change (monitor reconfiguration, moving windows
// between monitors, suspend and resume, etc.).
- std::queue<base::TimeDelta> last_computed_intervals_;
--#endif // defined(OS_LINUX) || defined(OS_WIN)
-+#endif // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
-
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- bool invalid_msc_ = false;
+ base::queue<base::TimeDelta> last_computed_intervals_;
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_gl_sync__control__vsync__provider.cc
@@ -1,63 +1,43 @@
---- src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.cc.orig 2017-01-26 00:49:32 UTC
+--- src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/gl/sync_control_vsync_provider.cc
@@ -11,7 +11,7 @@
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
// These constants define a reasonable range for a calculated refresh interval.
// Calculating refreshes out of this range will be considered a fatal error.
const int64_t kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400;
-@@ -21,17 +21,17 @@ const int64_t kMaxVsyncIntervalUs = base
- // we think the latest computed interval is invalid (noisey due to
- // monitor configuration change, moving a window between monitors, etc.).
- const double kRelativeIntervalDifferenceThreshold = 0.05;
--#endif // defined(OS_LINUX) || defined(OS_WIN)
-+#endif // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
-
+@@ -26,7 +26,7 @@ const double kRelativeIntervalDifferenceThreshold = 0.
namespace gl {
SyncControlVSyncProvider::SyncControlVSyncProvider() : gfx::VSyncProvider() {
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
// On platforms where we can't get an accurate reading on the refresh
// rate we fall back to the assumption that we're displaying 60 frames
// per second.
- last_good_interval_ = base::TimeDelta::FromSeconds(1) / 60;
--#endif // defined(OS_LINUX) || defined(OS_WIN)
-+#endif // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
- }
-
- SyncControlVSyncProvider::~SyncControlVSyncProvider() {}
-@@ -39,7 +39,7 @@ SyncControlVSyncProvider::~SyncControlVS
- void SyncControlVSyncProvider::GetVSyncParameters(
- const UpdateVSyncCallback& callback) {
+@@ -48,7 +48,7 @@ bool SyncControlVSyncProvider::GetVSyncParametersIfAva
+ base::TimeTicks* timebase_out,
+ base::TimeDelta* interval_out) {
TRACE_EVENT0("gpu", "SyncControlVSyncProvider::GetVSyncParameters");
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
- base::TimeTicks timebase;
-
- int64_t system_time;
-@@ -129,10 +129,10 @@ void SyncControlVSyncProvider::GetVSyncP
- last_timebase_ = timebase;
- last_media_stream_counter_ = media_stream_counter;
- callback.Run(timebase, last_good_interval_);
--#endif // defined(OS_LINUX) || defined(OS_WIN)
-+#endif // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
- }
-
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
- bool SyncControlVSyncProvider::AdjustSyncValues(int64_t* system_time,
- int64_t* media_stream_counter) {
- // Both Intel and Mali drivers will return TRUE for GetSyncValues
-@@ -192,7 +192,7 @@ bool SyncControlVSyncProvider::AdjustSyn
-
+ // The actual clock used for the system time returned by glXGetSyncValuesOML
+ // is unspecified. In practice, the clock used is likely to be either
+ // CLOCK_REALTIME or CLOCK_MONOTONIC, so we compare the returned time to the
+@@ -157,11 +157,11 @@ bool SyncControlVSyncProvider::GetVSyncParametersIfAva
return true;
- }
+ #else
+ return false;
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
+ }
- #if defined(OS_WIN)
- bool SyncControlVSyncProvider::AdjustSyncValues(int64_t* system_time,
+ bool SyncControlVSyncProvider::SupportGetVSyncParametersIfAvailable() const {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ return true;
+ #else
+ return false;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_message__center__style.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_message__center__style.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/message_center/message_center_style.h.orig 2017-01-26 00:49:32 UTC
-+++ src/3rdparty/chromium/ui/message_center/message_center_style.h
-@@ -115,7 +115,7 @@ const int kButtonHorizontalPadding = 16;
- const int kButtonIconTopPadding = 11; // In DIPs.
- const int kButtonIconToTitlePadding = 16; // In DIPs.
-
--#if !defined(OS_LINUX) || defined(USE_AURA)
-+#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(USE_AURA)
- const SkColor kButtonSeparatorColor = SkColorSetRGB(234, 234, 234);
- const SkColor kHoveredButtonBackgroundColor = SkColorSetRGB(243, 243, 243);
- #endif
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__center__button__bar.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__center__button__bar.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/message_center/views/message_center_button_bar.h.orig 2017-01-26 00:49:32 UTC
-+++ src/3rdparty/chromium/ui/message_center/views/message_center_button_bar.h
-@@ -74,7 +74,7 @@ class MessageCenterButtonBar : public vi
- // close-on-deactivation is off. This is a tentative solution. Once pkotwicz
- // Fixes the problem of focus-follow-mouse, close-on-deactivation will be
- // back and this field will be removed. See crbug.com/319516.
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- views::ImageButton* close_bubble_button_;
- #endif
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__center__button__bar.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__center__button__bar.cc
+++ /dev/null
@@ -1,47 +0,0 @@
---- src/3rdparty/chromium/ui/message_center/views/message_center_button_bar.cc.orig 2017-01-26 00:49:32 UTC
-+++ src/3rdparty/chromium/ui/message_center/views/message_center_button_bar.cc
-@@ -95,7 +95,7 @@ MessageCenterButtonBar::MessageCenterBut
- const base::string16& title)
- : message_center_view_(message_center_view),
- message_center_(message_center),
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- close_bubble_button_(NULL),
- #endif
- title_arrow_(NULL),
-@@ -170,7 +170,7 @@ MessageCenterButtonBar::MessageCenterBut
- IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL);
- button_container_->AddChildView(settings_button_);
-
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- close_bubble_button_ = new views::ImageButton(this);
- close_bubble_button_->SetImage(
- views::Button::STATE_NORMAL,
-@@ -232,7 +232,7 @@ void MessageCenterButtonBar::ViewVisibil
- 0,
- 0);
-
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- // The close-bubble button.
- column->AddColumn(views::GridLayout::LEADING,
- views::GridLayout::LEADING,
-@@ -247,7 +247,7 @@ void MessageCenterButtonBar::ViewVisibil
- layout->AddView(title_arrow_);
- layout->AddView(notification_label_);
- layout->AddView(button_container_);
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- layout->AddView(close_bubble_button_);
- #endif
- }
-@@ -297,7 +297,7 @@ void MessageCenterButtonBar::ButtonPress
- else
- message_center()->EnterQuietModeWithExpire(base::TimeDelta::FromDays(1));
- quiet_mode_button_->SetToggled(message_center()->IsQuietMode());
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- } else if (sender == close_bubble_button_) {
- message_center_view()->tray()->HideMessageCenterBubble();
- #endif
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__view__factory.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__view__factory.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_message__center_views_message__view__factory.cc
@@ -1,11 +1,11 @@
---- src/3rdparty/chromium/ui/message_center/views/message_view_factory.cc.orig 2017-01-26 00:49:32 UTC
+--- src/3rdparty/chromium/ui/message_center/views/message_view_factory.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/message_center/views/message_view_factory.cc
-@@ -43,7 +43,7 @@ MessageView* MessageViewFactory::Create(
- notification_view = new NotificationView(controller, notification);
+@@ -57,7 +57,7 @@ MessageView* MessageViewFactory::Create(const Notifica
+ notification_view = new NotificationView(notification);
}
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- // Don't create shadows for notification toasts on linux wih aura.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Don't create shadows for notification toasts on Linux or CrOS.
if (top_level)
return notification_view;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme.h
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/ui/native_theme/native_theme.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/native_theme/native_theme.h
+@@ -47,7 +47,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
+ // The part to be painted / sized.
+ enum Part {
+ kCheckbox,
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ kFrameTopArea,
+ #endif
+ kInnerSpinButton,
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_native__theme_native__theme__base.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/chromium/ui/native_theme/native_theme_base.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/ui/native_theme/native_theme_base.cc
+@@ -172,7 +172,7 @@ void NativeThemeBase::Paint(cc::PaintCanvas* canvas,
+ case kCheckbox:
+ PaintCheckbox(canvas, state, rect, extra.button);
+ break;
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ case kFrameTopArea:
+ PaintFrameTopArea(canvas, state, rect, extra.frame_top_area);
+ break;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_resources_ui__resources.grd
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_resources_ui__resources.grd
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/resources/ui_resources.grd.orig 2017-01-26 00:49:32 UTC
-+++ src/3rdparty/chromium/ui/resources/ui_resources.grd
-@@ -15,7 +15,7 @@
- <!-- KEEP THESE IN ALPHABETICAL ORDER! DO NOT ADD TO RANDOM PLACES JUST
- BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
- SAME CONDITIONALS. -->
-- <if expr="is_linux and use_aura">
-+ <if expr="(is_linux or is_bsd) and use_aura">
- <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_ALIAS" file="common/pointers/alias_big.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_CELL" file="common/pointers/cell_big.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_COL_RESIZE" file="common/pointers/sb_h_double_arrow_big.png" />
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_BUILD.gn
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/3rdparty/chromium/ui/views/BUILD.gn.orig 2017-01-26 00:49:32 UTC
-+++ src/3rdparty/chromium/ui/views/BUILD.gn
-@@ -426,7 +426,7 @@ component("views") {
- if (use_x11 && !is_chromeos) {
- deps += [ "//ui/display/util" ]
- }
-- if (is_linux && !is_chromeos) {
-+ if ((is_linux || is_bsd) && !is_chromeos) {
- sources -= [ "window/window_button_order_provider.cc" ]
- deps += [ "//ui/shell_dialogs" ]
- } else {
-@@ -618,7 +618,7 @@ component("views") {
- "widget/desktop_aura/desktop_window_tree_host_ozone.cc",
- ]
- }
-- if (is_linux) {
-+ if (is_linux || is_bsd) {
- sources += [
- "style/platform_style_linux.cc",
- "widget/desktop_aura/desktop_cursor_loader_updater_auralinux.cc",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_accessibility_native__view__accessibility.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_accessibility_native__view__accessibility.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/views/accessibility/native_view_accessibility.h.orig 2017-01-26 00:49:32 UTC
-+++ src/3rdparty/chromium/ui/views/accessibility/native_view_accessibility.h
-@@ -22,7 +22,7 @@
- #define PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL 1
- #endif
-
--#if defined(OS_LINUX) && defined(USE_X11) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(USE_X11) && !defined(OS_CHROMEOS)
- #define PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL 1
- #endif
-
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_label.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_label.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_label.cc
@@ -1,15 +1,15 @@
---- src/3rdparty/chromium/ui/views/controls/label.cc.orig 2017-01-26 00:49:32 UTC
+--- src/3rdparty/chromium/ui/views/controls/label.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/views/controls/label.cc
-@@ -523,7 +523,7 @@ bool Label::OnMousePressed(const ui::Mou
+@@ -549,7 +549,7 @@ bool Label::OnMousePressed(const ui::MouseEvent& event
GetFocusManager()->SetFocusedView(this);
}
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- if (event.IsOnlyMiddleMouseButton() && GetFocusManager())
+ if (event.IsOnlyMiddleMouseButton() && GetFocusManager() && !had_focus)
GetFocusManager()->SetFocusedView(this);
#endif
-@@ -687,7 +687,7 @@ bool Label::PasteSelectionClipboard() {
+@@ -734,7 +734,7 @@ bool Label::PasteSelectionClipboard() {
}
void Label::UpdateSelectionClipboard() {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_textfield_textfield.cc
@@ -1,7 +1,7 @@
---- src/3rdparty/chromium/ui/views/controls/textfield/textfield.cc.orig 2017-01-26 00:49:32 UTC
+--- src/3rdparty/chromium/ui/views/controls/textfield/textfield.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/views/controls/textfield/textfield.cc
-@@ -53,7 +53,7 @@
- #include "ui/base/win/osk_display_manager.h"
+@@ -59,7 +59,7 @@
+ #include "base/win/win_util.h"
#endif
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
@@ -9,7 +9,7 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/base/ime/linux/text_edit_command_auralinux.h"
#include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
-@@ -146,14 +146,14 @@ ui::TextEditCommand GetCommandForKeyEven
+@@ -156,14 +156,14 @@ ui::TextEditCommand GetCommandForKeyEvent(const ui::Ke
case ui::VKEY_BACK:
if (!control)
return ui::TextEditCommand::DELETE_BACKWARD;
@@ -26,16 +26,25 @@
// Only erase by line break on Linux and ChromeOS.
if (shift && control)
return ui::TextEditCommand::DELETE_TO_END_OF_LINE;
-@@ -580,7 +580,7 @@ bool Textfield::OnMousePressed(const ui:
- ShowImeIfNeeded();
+@@ -219,7 +219,7 @@ bool IsControlKeyModifier(int flags) {
+ // Control-modified key combination, but we cannot extend it to other platforms
+ // as Control has different meanings and behaviors.
+ // https://crrev.com/2580483002/#msg46
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ return flags & ui::EF_CONTROL_DOWN;
+ #else
+ return false;
+@@ -669,7 +669,7 @@ bool Textfield::OnMousePressed(const ui::MouseEvent& e
+ ShowVirtualKeyboardIfEnabled();
}
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- if (!handled && !HasFocus() && event.IsOnlyMiddleMouseButton())
- RequestFocus();
+ if (!handled && !had_focus && event.IsOnlyMiddleMouseButton())
+ RequestFocusWithPointer(ui::EventPointerType::POINTER_TYPE_MOUSE);
#endif
-@@ -617,7 +617,7 @@ bool Textfield::OnKeyPressed(const ui::K
+@@ -713,7 +713,7 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event
if (!textfield)
return handled;
@@ -44,7 +53,7 @@
ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
ui::GetTextEditKeyBindingsDelegate();
std::vector<ui::TextEditCommandAuraLinux> commands;
-@@ -757,7 +757,7 @@ void Textfield::AboutToRequestFocusFromT
+@@ -875,7 +875,7 @@ void Textfield::AboutToRequestFocusFromTabTraversal(bo
}
bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {
@@ -53,16 +62,7 @@
// Skip any accelerator handling that conflicts with custom keybindings.
ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
ui::GetTextEditKeyBindingsDelegate();
-@@ -1035,7 +1035,7 @@ void Textfield::WriteDragDataForView(Vie
- std::unique_ptr<gfx::Canvas> canvas(
- GetCanvasForDragImage(GetWidget(), label.size()));
- label.SetEnabledColor(GetTextColor());
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- // Desktop Linux Aura does not yet support transparency in drag images.
- canvas->DrawColor(GetBackgroundColor());
- #endif
-@@ -1827,7 +1827,7 @@ bool Textfield::PasteSelectionClipboard(
+@@ -2071,7 +2071,7 @@ bool Textfield::PasteSelectionClipboard() {
}
void Textfield::UpdateSelectionClipboard() {
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_webview_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_controls_webview_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/views/controls/webview/BUILD.gn.orig 2017-01-26 00:49:32 UTC
-+++ src/3rdparty/chromium/ui/views/controls/webview/BUILD.gn
-@@ -39,7 +39,7 @@ component("webview") {
- "//ui/views",
- ]
-
-- if (is_linux || is_android) {
-+ if (is_linux || is_bsd || is_android) {
- sources += [ "unhandled_keyboard_event_handler_default.cc" ]
- }
- }
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_mus_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_mus_BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/views/mus/BUILD.gn.orig 2017-12-15 17:19:07.971596000 -0500
-+++ src/3rdparty/chromium/ui/views/mus/BUILD.gn 2017-12-15 17:19:42.039556000 -0500
-@@ -91,7 +91,7 @@
- "//ui/wm",
- ]
-
-- if (is_linux && !is_android) {
-+ if ((is_linux || is_bsd) && !is_android) {
- deps += [ "//components/font_service/public/cpp" ]
- data_deps = [
- "//components/font_service",
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_style_platform__style.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_style_platform__style.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_style_platform__style.cc
@@ -1,11 +1,11 @@
---- src/3rdparty/chromium/ui/views/style/platform_style.cc.orig 2017-01-26 00:49:32 UTC
+--- src/3rdparty/chromium/ui/views/style/platform_style.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/ui/views/style/platform_style.cc
-@@ -17,7 +17,7 @@
- #include "ui/views/controls/focusable_border.h"
- #include "ui/views/controls/scrollbar/scroll_bar_views.h"
+@@ -19,7 +19,7 @@
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #if defined(OS_CHROMEOS)
+ #include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
#define DESKTOP_LINUX
#endif
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_views__switches.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_views_views__switches.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/3rdparty/chromium/ui/views/views_switches.cc.orig 2017-01-26 00:49:32 UTC
-+++ src/3rdparty/chromium/ui/views/views_switches.cc
-@@ -18,7 +18,7 @@ const char kDisableViewsRectBasedTargeti
- "disable-views-rect-based-targeting";
-
- bool IsRectBasedTargetingEnabled() {
--#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
-+#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
- return !base::CommandLine::ForCurrentProcess()->HasSwitch(
- kDisableViewsRectBasedTargeting);
- #else
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_BUILD.gn
@@ -1,16 +1,16 @@
---- src/3rdparty/chromium/v8/BUILD.gn.orig 2017-06-20 05:10:02.000000000 -0400
-+++ src/3rdparty/chromium/v8/BUILD.gn 2017-12-16 11:25:43.174788000 -0500
-@@ -348,7 +348,7 @@
- # TODO(jochen): Add support for compiling with simulators.
-
- if (is_debug) {
-- if (is_linux && v8_enable_backtrace) {
-+ if ((is_linux || is_bsd) && v8_enable_backtrace) {
- ldflags += [ "-rdynamic" ]
+--- src/3rdparty/chromium/v8/BUILD.gn.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/chromium/v8/BUILD.gn
+@@ -2597,7 +2597,7 @@ v8_source_set("v8_base") {
+ "src/x64/simulator-x64.h",
+ "src/x64/sse-instr.h",
+ ]
+- if (is_linux) {
++ if (is_linux && !is_bsd) {
+ sources += [
+ "src/trap-handler/handler-inside-linux.cc",
+ "src/trap-handler/handler-outside-linux.cc",
+@@ -2951,7 +2951,7 @@ v8_component("v8_libbase") {
}
-
-@@ -2282,7 +2282,7 @@
- sources += [ "src/base/platform/platform-posix.cc" ]
}
- if (is_linux) {
@@ -18,7 +18,7 @@
sources += [
"src/base/debug/stack_trace_posix.cc",
"src/base/platform/platform-linux.cc",
-@@ -2292,6 +2292,12 @@
+@@ -2971,6 +2971,12 @@ v8_component("v8_libbase") {
"dl",
"rt",
]
@@ -31,7 +31,7 @@
} else if (is_android) {
if (current_toolchain == host_toolchain) {
libs = [
-@@ -2429,6 +2435,7 @@
+@@ -3142,6 +3148,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapsho
sources = [
"src/snapshot/mksnapshot.cc",
]
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_arm_cpu-arm.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_arm_cpu-arm.cc
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/3rdparty/chromium/v8/src/arm/cpu-arm.cc.orig 2017-09-25 11:16:57 UTC
-+++ src/3rdparty/chromium/v8/src/arm/cpu-arm.cc
-@@ -17,6 +17,11 @@
- #include "src/assembler.h"
- #include "src/macro-assembler.h"
-
-+#if V8_OS_FREEBSD
-+#include <sys/types.h>
-+#include <machine/sysarch.h>
-+#endif
-+
- namespace v8 {
- namespace internal {
-
-@@ -24,6 +29,8 @@ void CpuFeatures::FlushICache(void* start, size_t size
- #if !defined(USE_SIMULATOR)
- #if V8_OS_QNX
- msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE);
-+#elif V8_OS_FREEBSD
-+ __clear_cache(start, reinterpret_cast<char*>(start) + size);
- #else
- register uint32_t beg asm("r0") = reinterpret_cast<uint32_t>(start);
- register uint32_t end asm("r1") = beg + size;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_cpu.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_cpu.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_cpu.cc
@@ -1,19 +1,18 @@
---- src/3rdparty/chromium/v8/src/base/cpu.cc.orig 2018-03-20 07:26:22 UTC
+--- src/3rdparty/chromium/v8/src/base/cpu.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/v8/src/base/cpu.cc
-@@ -600,7 +600,7 @@ CPU::CPU()
- #endif
+@@ -424,6 +424,7 @@ CPU::CPU()
+
+ #if V8_OS_LINUX
- #elif V8_HOST_ARCH_ARM64
--
+#if V8_OS_LINUX
CPUInfo cpu_info;
// Extract implementor from the "CPU implementer" field.
-@@ -634,6 +634,7 @@ CPU::CPU()
+@@ -457,6 +458,7 @@ CPU::CPU()
}
delete[] part;
}
-+#endif // V8_OS_LINUX
-
- #elif V8_HOST_ARCH_PPC
++#endif
+ // Extract architecture from the "CPU Architecture" field.
+ // The list is well-known, unlike the the output of
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc
+++ /dev/null
@@ -1,25 +0,0 @@
---- src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc.orig 2017-09-25 11:52:56 UTC
-+++ src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc
-@@ -36,6 +36,22 @@ namespace v8 {
- namespace base {
-
-
-+#ifdef __arm__
-+bool OS::ArmUsingHardFloat() {
-+#if defined(__ARM_PCS_VFP)
-+ return true;
-+#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \
-+ !defined(__VFP_FP__)
-+ return false;
-+#else
-+#error "Your compiler does not report the FP ABI compiled for." \
-+ "Please report it on this issue" \
-+ "http://code.google.com/p/v8/issues/detail?id=2140"
-+#endif
-+}
-+#endif
-+
-+
- const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
- if (std::isnan(time)) return "";
- time_t tv = static_cast<time_t>(std::floor(time/msPerSecond));
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc
+++ www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-posix.cc
@@ -1,17 +1,6 @@
---- src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig 2017-01-26 00:50:20 UTC
+--- src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
-@@ -27,6 +27,10 @@
- #include <sys/sysctl.h> // NOLINT, for sysctl
- #endif
-
-+#if V8_OS_NETBSD
-+#include <lwp.h> // for _lwp_self
-+#endif
-+
- #undef MAP_TYPE
-
- #if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT)
-@@ -329,6 +333,12 @@ int OS::GetCurrentThreadId() {
+@@ -496,6 +496,12 @@ int OS::GetCurrentThreadId() {
return static_cast<int>(syscall(__NR_gettid));
#elif V8_OS_ANDROID
return static_cast<int>(gettid());
@@ -23,4 +12,4 @@
+ return static_cast<int>(_lwp_self());
#elif V8_OS_AIX
return static_cast<int>(thread_self());
- #elif V8_OS_SOLARIS
+ #elif V8_OS_FUCHSIA
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_globals.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_globals.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/3rdparty/chromium/v8/src/globals.h.orig 2017-12-15 19:22:04.283569000 -0500
-+++ src/3rdparty/chromium/v8/src/globals.h 2017-12-15 19:23:21.959960000 -0500
-@@ -179,7 +179,11 @@
- const size_t kMaximalCodeRangeSize = 256 * MB;
- const size_t kCodeRangeAreaAlignment = 256 * MB;
- #elif V8_HOST_ARCH_PPC && V8_TARGET_ARCH_PPC && V8_OS_LINUX
-+#if defined(__FreeBSD__)
-+const size_t kMaximalCodeRangeSize = 256 * MB;
-+#else
- const size_t kMaximalCodeRangeSize = 512 * MB;
-+#endif
- const size_t kCodeRangeAreaAlignment = 64 * KB; // OS page on PPC Linux
- #else
- const size_t kMaximalCodeRangeSize = 512 * MB;
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_libsampler_sampler.cc
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_libsampler_sampler.cc
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/3rdparty/chromium/v8/src/libsampler/sampler.cc.orig 2018-03-20 07:19:58 UTC
-+++ src/3rdparty/chromium/v8/src/libsampler/sampler.cc
-@@ -499,9 +499,9 @@ void SignalHandler::FillRegisterState(void* context, R
- state->sp = reinterpret_cast<void*>(mcontext.mc_rsp);
- state->fp = reinterpret_cast<void*>(mcontext.mc_rbp);
- #elif V8_HOST_ARCH_ARM
-- state->pc = reinterpret_cast<void*>(mcontext.mc_r15);
-- state->sp = reinterpret_cast<void*>(mcontext.mc_r13);
-- state->fp = reinterpret_cast<void*>(mcontext.mc_r11);
-+ state->pc = reinterpret_cast<void*>(mcontext.__gregs[_REG_PC]);
-+ state->sp = reinterpret_cast<void*>(mcontext.__gregs[_REG_SP]);
-+ state->fp = reinterpret_cast<void*>(mcontext.__gregs[_REG_FP]);
- #endif // V8_HOST_ARCH_*
- #elif V8_OS_NETBSD
- #if V8_HOST_ARCH_IA32
Index: www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_wasm-result.h
===================================================================
--- www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_wasm_wasm-result.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/3rdparty/chromium/v8/src/wasm/wasm-result.h.orig 2017-12-15 19:26:27.709014000 -0500
-+++ src/3rdparty/chromium/v8/src/wasm/wasm-result.h 2017-12-15 19:26:41.537495000 -0500
-@@ -5,6 +5,7 @@
- #ifndef V8_WASM_RESULT_H_
- #define V8_WASM_RESULT_H_
-
-+#include <cstdarg>
- #include <memory>
-
- #include "src/base/compiler-specific.h"
Index: www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_file__posix.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_gn_base_files_file__posix.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/gn/base/files/file_posix.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/gn/base/files/file_posix.cc
+@@ -86,7 +86,7 @@ void File::Info::FromStat(const stat_wrapper_t& stat_i
+ is_symbolic_link = S_ISLNK(stat_info.st_mode);
+ size = stat_info.st_size;
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ time_t last_modified_sec = stat_info.st_mtim.tv_sec;
+ int64_t last_modified_nsec = stat_info.st_mtim.tv_nsec;
+ time_t last_accessed_sec = stat_info.st_atim.tv_sec;
Index: www/qt5-webengine/files/patch-src_3rdparty_gn_build_gen.py
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_gn_build_gen.py
@@ -0,0 +1,58 @@
+--- src/3rdparty/gn/build/gen.py.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/gn/build/gen.py
+@@ -41,10 +41,12 @@ class Platform(object):
+ self._platform = 'aix'
+ elif self._platform.startswith('fuchsia'):
+ self._platform = 'fuchsia'
++ elif self._platform.lower().startswith('freebsd'):
++ self._platform = 'bsd'
+
+ @staticmethod
+ def known_platforms():
+- return ['linux', 'darwin', 'msvc', 'aix', 'fuchsia']
++ return ['linux', 'darwin', 'msvc', 'aix', 'fuchsia', 'bsd']
+
+ def platform(self):
+ return self._platform
+@@ -67,8 +69,11 @@ class Platform(object):
+ def is_aix(self):
+ return self._platform == 'aix'
+
++ def is_bsd(self):
++ return self._platform == 'bsd'
++
+ def is_posix(self):
+- return self._platform in ['linux', 'darwin', 'aix']
++ return self._platform in ['linux', 'darwin', 'aix', 'bsd']
+
+
+ def main(argv):
+@@ -221,6 +226,7 @@ def WriteGenericNinja(path, static_libraries, executab
+ 'darwin': 'build_mac.ninja.template',
+ 'linux': 'build_linux.ninja.template',
+ 'aix': 'build_aix.ninja.template',
++ 'bsd': 'build_linux.ninja.template',
+ }[platform.platform()])
+
+ with open(template_filename) as f:
+@@ -388,6 +394,11 @@ def WriteGNNinja(path, platform, host, options, linux_
+ elif platform.is_aix():
+ cflags_cc.append('-maix64')
+ ldflags.extend(['-maix64', '-pthread'])
++ elif platform.is_bsd():
++ cflags.extend(['-Wno-deprecated-register', '-Wno-parentheses-equality'])
++ ldflags.extend(['-pthread'])
++ libs.extend(['-lexecinfo', '-lkvm'])
++ include_dirs += ['/usr/local/include']
+
+ if options.use_lto:
+ cflags.extend(['-flto', '-fwhole-program-vtables'])
+@@ -686,7 +697,7 @@ def WriteGNNinja(path, platform, host, options, linux_
+ 'base/strings/string16.cc',
+ ])
+
+- if platform.is_linux() or platform.is_aix():
++ if platform.is_linux() or platform.is_aix() or platform.is_bsd():
+ static_libraries['base']['sources'].extend([
+ 'base/strings/sys_string_conversions_posix.cc',
+ ])
Index: www/qt5-webengine/files/patch-src_3rdparty_gn_tools_gn_args.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_gn_tools_gn_args.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/gn/tools/gn/args.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/gn/tools/gn/args.cc
+@@ -294,6 +294,8 @@ void Args::SetSystemVarsLocked(Scope* dest) const {
+ os = "mac";
+ #elif defined(OS_LINUX)
+ os = "linux";
++#elif defined(OS_BSD)
++ os = "bsd";
+ #elif defined(OS_AIX)
+ os = "aix";
+ #else
Index: www/qt5-webengine/files/patch-src_3rdparty_gn_tools_gn_exec__process.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_gn_tools_gn_exec__process.cc
@@ -0,0 +1,12 @@
+--- src/3rdparty/gn/tools/gn/exec_process.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/gn/tools/gn/exec_process.cc
+@@ -22,6 +22,9 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <sys/wait.h>
++#if defined(OS_BSD)
++#include <sys/signal.h>
++#endif
+ #include <unistd.h>
+
+ #include "base/posix/eintr_wrapper.h"
Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_exe__path.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_gn_util_exe__path.cc
@@ -0,0 +1,33 @@
+--- src/3rdparty/gn/util/exe_path.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/gn/util/exe_path.cc
+@@ -13,6 +13,9 @@
+ #include <mach-o/dyld.h>
+ #elif defined(OS_WIN)
+ #include <windows.h>
++#elif defined(OS_FREEBSD)
++#include <sys/param.h>
++#include <sys/sysctl.h>
+ #endif
+
+ #if defined(OS_MACOSX)
+@@ -44,6 +47,20 @@ base::FilePath GetExePath() {
+ return base::FilePath();
+ }
+ return base::FilePath(system_buffer);
++}
++
++#elif defined(OS_FREEBSD)
++
++base::FilePath GetExePath() {
++ int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
++ char system_buffer[PATH_MAX + 1];
++ size_t length = sizeof(system_buffer);
++ int error = sysctl(name, 4, system_buffer, &length, NULL, 0);
++ if (error < 0 || length <= 1) {
++ NOTREACHED() << "Unable to resolve path.";
++ return base::FilePath();
++ }
++ return base::FilePath(base::FilePath::StringType(system_buffer, length - 1));
+ }
+
+ #else
Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_semaphore.h
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_gn_util_semaphore.h
@@ -0,0 +1,20 @@
+--- src/3rdparty/gn/util/semaphore.h.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/gn/util/semaphore.h
+@@ -15,7 +15,7 @@
+ #include <windows.h>
+ #elif defined(OS_MACOSX)
+ #include <mach/mach.h>
+-#elif defined(OS_LINUX) || defined(OS_AIX)
++#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ #include <semaphore.h>
+ #else
+ #error Port.
+@@ -35,7 +35,7 @@ class Semaphore {
+
+ #if defined(OS_MACOSX)
+ typedef semaphore_t NativeHandle;
+-#elif defined(OS_LINUX) || defined(OS_AIX)
++#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ typedef sem_t NativeHandle;
+ #elif defined(OS_WIN)
+ typedef HANDLE NativeHandle;
Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_semaphore.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_gn_util_semaphore.cc
@@ -0,0 +1,11 @@
+--- src/3rdparty/gn/util/semaphore.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/gn/util/semaphore.cc
+@@ -36,7 +36,7 @@ void Semaphore::Wait() {
+ }
+ }
+
+-#elif defined(OS_LINUX) || defined(OS_AIX)
++#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+
+ Semaphore::Semaphore(int count) {
+ DCHECK_GE(count, 0);
Index: www/qt5-webengine/files/patch-src_3rdparty_gn_util_ticks.cc
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_3rdparty_gn_util_ticks.cc
@@ -0,0 +1,38 @@
+--- src/3rdparty/gn/util/ticks.cc.orig 2018-11-13 18:25:11 UTC
++++ src/3rdparty/gn/util/ticks.cc
+@@ -11,7 +11,7 @@
+ #include <windows.h>
+ #elif defined(OS_MACOSX)
+ #include <mach/mach_time.h>
+-#elif defined(OS_LINUX) || defined(OS_AIX)
++#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ #include <time.h>
+ #else
+ #error Port.
+@@ -27,7 +27,7 @@ LARGE_INTEGER g_start;
+ #elif defined(OS_MACOSX)
+ mach_timebase_info_data_t g_timebase;
+ uint64_t g_start;
+-#elif defined(OS_LINUX) || defined(OS_AIX)
++#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ uint64_t g_start;
+ #else
+ #error Port.
+@@ -44,7 +44,7 @@ void Init() {
+ #elif defined(OS_MACOSX)
+ mach_timebase_info(&g_timebase);
+ g_start = (mach_absolute_time() * g_timebase.numer) / g_timebase.denom;
+-#elif defined(OS_LINUX) || defined(OS_AIX)
++#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ g_start = static_cast<uint64_t>(ts.tv_sec) * kNano +
+@@ -74,7 +74,7 @@ Ticks TicksNow() {
+ #elif defined(OS_MACOSX)
+ now =
+ ((mach_absolute_time() * g_timebase.numer) / g_timebase.denom) - g_start;
+-#elif defined(OS_LINUX) || defined(OS_AIX)
++#elif defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ now = (static_cast<uint64_t>(ts.tv_sec) * kNano +
Index: www/qt5-webengine/files/patch-src_buildtools_gn.pro
===================================================================
--- www/qt5-webengine/files/patch-src_buildtools_gn.pro
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/buildtools/gn.pro
-+++ src/buildtools/gn.pro
-@@ -20,7 +20,7 @@ build_pass|!debug_and_release {
- src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
- gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir))
- gn_args = $$system_quote($$gn_args)
-- gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path
-+ gn_configure = $$system_quote($$gn_bootstrap) --no-clean --no-rebuild --shadow --gn-gen-args=$$gn_args $$ninja_path
- !system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$gn_configure") {
- error("GN build error!")
- }
Index: www/qt5-webengine/files/patch-src_core_api_core__api.pro
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_core_api_core__api.pro
@@ -0,0 +1,11 @@
+--- src/core/api/core_api.pro.orig 2018-11-27 04:10:38 UTC
++++ src/core/api/core_api.pro
+@@ -58,7 +58,7 @@ SOURCES = \
+ qwebengineurlschemehandler.cpp
+
+ ### Qt6 Remove this workaround
+-unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static {
++linux:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static {
+ CONFIG -= warning_clean
+ SOURCES += qtbug-60565.cpp \
+ qtbug-61521.cpp
Index: www/qt5-webengine/files/patch-src_core_api_core_api.pro
===================================================================
--- www/qt5-webengine/files/patch-src_core_api_core_api.pro
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/core/api/core_api.pro.orig 2018-04-10 14:50:39 UTC
-+++ src/core/api/core_api.pro
-@@ -53,7 +53,7 @@ SOURCES = \
- qwebengineurlschemehandler.cpp
-
- ### Qt6 Remove this workaround
--unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static {
-+linux:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static {
- SOURCES += qtbug-60565.cpp \
- qtbug-61521.cpp
- }
Index: www/qt5-webengine/files/patch-src_core_config_linux.pri
===================================================================
--- www/qt5-webengine/files/patch-src_core_config_linux.pri
+++ www/qt5-webengine/files/patch-src_core_config_linux.pri
@@ -1,14 +1,14 @@
---- src/core/config/linux.pri.orig 2018-06-21 17:19:26 UTC
+--- src/core/config/linux.pri.orig 2019-01-16 22:42:58 UTC
+++ src/core/config/linux.pri
-@@ -136,6 +136,11 @@ host_build {
+@@ -166,6 +166,11 @@ host_build {
} else {
gn_args += use_alsa=false
}
-+ qtConfig(sndio) {
++ qtConfig(webengine-sndio) {
+ gn_args += use_sndio=true
+ } else {
+ gn_args += use_sndio=false
+ }
- packagesExist(libffi): gn_args += use_system_libffi=true
- else: gn_args += use_system_libffi=false
!packagesExist(libpci): gn_args += use_libpci=false
+
+ qtConfig(webengine-system-x11): hasX11Dependencies() {
Index: www/qt5-webengine/files/patch-src_core_configure.json
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_core_configure.json
@@ -0,0 +1,54 @@
+--- src/core/configure.json.orig 2019-01-16 22:42:58 UTC
++++ src/core/configure.json
+@@ -18,6 +18,7 @@
+ "webengine-printing-and-pdf": "boolean",
+ "webengine-proprietary-codecs": "boolean",
+ "webengine-pulseaudio": "boolean",
++ "webengine-sndio": "boolean",
+ "webengine-spellchecker": "boolean",
+ "webengine-native-spellchecker": "boolean",
+ "webengine-webrtc": "boolean",
+@@ -27,6 +28,7 @@
+ "webengine-kerberos": "boolean",
+ "alsa": { "type": "boolean", "name": "webengine-alsa" },
+ "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" },
++ "sndio": { "type": "boolean", "name": "webengine-sndio" },
+ "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
+ "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
+ "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
+@@ -147,6 +149,12 @@
+ { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" }
+ ]
+ },
++ "sndio": {
++ "label": "sndio",
++ "sources": [
++ { "type": "pkgConfig", "args": "libsndio >= 1.5.0 libsndio" }
++ ]
++ },
+ "webengine-icu": {
+ "label": "icu >= 53",
+ "sources": [
+@@ -507,6 +515,10 @@
+ "condition": "libs.pulseaudio",
+ "output": [ "privateFeature" ]
+ },
++ "webengine-sndio": {
++ "label": "Use sndio",
++ "output": [ "privateFeature" ]
++ },
+ "webengine-pepper-plugins": {
+ "label": "Pepper Plugins",
+ "purpose": "Enables use of Pepper Flash plugins.",
+@@ -743,6 +755,11 @@
+ {
+ "type": "feature",
+ "args": "webengine-pulseaudio",
++ "condition": "config.unix"
++ },
++ {
++ "type": "feature",
++ "args": "webengine-sndio",
+ "condition": "config.unix"
+ },
+ {
Index: www/qt5-webengine/files/patch-src_core_core__module.pro
===================================================================
--- www/qt5-webengine/files/patch-src_core_core__module.pro
+++ www/qt5-webengine/files/patch-src_core_core__module.pro
@@ -2,7 +2,7 @@
* Extend some Linux-only compiler arguments to FreeBSD.
* Generate split out debug files on FreeBSD too.
---- src/core/core_module.pro.orig 2017-04-20 22:41:02 UTC
+--- src/core/core_module.pro.orig 2018-11-27 04:10:38 UTC
+++ src/core/core_module.pro
@@ -4,6 +4,9 @@ include(core_common.pri)
# Needed to set a CFBundleIdentifier
@@ -14,7 +14,7 @@
linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri
!include($$linking_pri) {
-@@ -29,15 +32,15 @@ RSP_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}.rsp
+@@ -29,21 +32,21 @@ RSP_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}.rsp
for(object, NINJA_OBJECTS): RSP_CONTENT += $$object
write_file($$RSP_FILE, RSP_CONTENT)
macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_FILE)
@@ -28,12 +28,19 @@
LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS
# GN's LFLAGS doesn't always work across all the Linux configurations we support.
# The Windows and macOS ones from GN does provide a few useful flags however
--linux: QMAKE_LFLAGS += -Wl,--gc-sections -Wl,-O1 -Wl,-z,now -Wl,-z,defs
-+unix: QMAKE_LFLAGS += -Wl,--gc-sections -Wl,-O1 -Wl,-z,now
- else: QMAKE_LFLAGS += $$NINJA_LFLAGS
- POST_TARGETDEPS += $$NINJA_TARGETDEPS
-@@ -67,7 +70,7 @@ CONFIG -= bsymbolic_functions
+-linux {
++unix {
+ QMAKE_LFLAGS += -Wl,--gc-sections -Wl,-O1 -Wl,-z,now
+ # Embedded address sanitizer symbols are undefined and are picked up by the dynamic link loader
+ # at runtime. Thus we do not to pass the linker flag below, because the linker would complain
+ # about the undefined sanitizer symbols.
+- !sanitizer: QMAKE_LFLAGS += -Wl,-z,defs
++ #!sanitizer: QMAKE_LFLAGS += -Wl,-z,defs
+ } else {
+ QMAKE_LFLAGS += $$NINJA_LFLAGS
+ }
+@@ -86,7 +89,7 @@ CONFIG -= bsymbolic_functions
qtConfig(egl): CONFIG += egl
Index: www/qt5-webengine/files/patch-src_core_ozone_gl__surface__glx__qt.cpp
===================================================================
--- /dev/null
+++ www/qt5-webengine/files/patch-src_core_ozone_gl__surface__glx__qt.cpp
@@ -0,0 +1,11 @@
+--- src/core/ozone/gl_surface_glx_qt.cpp.orig 2019-01-16 22:42:58 UTC
++++ src/core/ozone/gl_surface_glx_qt.cpp
+@@ -173,7 +173,7 @@ bool GLSurfaceGLXQt::Initialize(GLSurfaceFormat format
+ GLX_PBUFFER_HEIGHT, m_size.height(),
+ GLX_LARGEST_PBUFFER, x11::False,
+ GLX_PRESERVED_CONTENTS, x11::False,
+- NULL
++ GLX_NONE
+ };
+
+ m_surfaceBuffer = glXCreatePbuffer(display, static_cast<GLXFBConfig>(g_config), pbuffer_attributes);
Index: www/qt5-webengine/files/sndio_input.h
===================================================================
--- www/qt5-webengine/files/sndio_input.h
+++ www/qt5-webengine/files/sndio_input.h
@@ -59,6 +59,7 @@
void SetVolume(double volume) override;
double GetVolume() override;
bool IsMuted() override;
+ void SetOutputDeviceForAec(const std::string& output_device_id) override;
// C-linkage call-backs are friends to access private data
friend void sndio_in_onmove(void *arg, int delta);
Index: www/qt5-webengine/files/sndio_input.cc
===================================================================
--- www/qt5-webengine/files/sndio_input.cc
+++ www/qt5-webengine/files/sndio_input.cc
@@ -15,11 +15,13 @@
namespace media {
+static const SampleFormat kSampleFormat = kSampleFormatS16;
+
void sndio_in_onmove(void *arg, int delta) {
NOTIMPLEMENTED();
SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
- self->hw_delay_ = delta - self->params_.GetBytesPerFrame();
+ self->hw_delay_ = delta - self->params_.GetBytesPerFrame(kSampleFormat);
}
void *sndio_in_threadstart(void *arg) {
@@ -36,9 +38,7 @@
: audio_manager_(audio_manager),
device_name_(device_name),
params_(params),
- bytes_per_buffer_(params.frames_per_buffer() *
- (params.channels() * params.bits_per_sample()) /
- 8),
+ bytes_per_buffer_(params.GetBytesPerBuffer(kSampleFormat)),
buffer_duration_(base::TimeDelta::FromMicroseconds(
params.frames_per_buffer() * base::Time::kMicrosecondsPerSecond /
static_cast<float>(params.sample_rate()))),
@@ -66,7 +66,7 @@
sio_initpar(&par);
par.rate = params_.sample_rate();
par.pchan = params_.channels();
- par.bits = params_.bits_per_sample();
+ par.bits = SampleFormatToBytesPerChannel(kSampleFormat);
par.bps = par.bits / 8;
par.sig = sig = par.bits != 8 ? 1 : 0;
par.le = SIO_LE_NATIVE;
@@ -88,7 +88,7 @@
if (par.rate != (unsigned int)params_.sample_rate() ||
par.pchan != (unsigned int)params_.channels() ||
- par.bits != (unsigned int)params_.bits_per_sample() ||
+ par.bits != (unsigned int)SampleFormatToBytesPerChannel(kSampleFormat) ||
par.sig != (unsigned int)sig ||
(par.bps > 1 && par.le != SIO_LE_NATIVE) ||
(par.bits != par.bps * 8)) {
@@ -121,31 +121,6 @@
void SndioAudioInputStream::ReadAudio() {
NOTIMPLEMENTED();
- DCHECK(callback_);
-
- int num_buffers = sndio_rec_bufsize_ / params_.frames_per_buffer();
- double normalized_volume = 0.0;
-
- // Update the AGC volume level once every second. Note that, |volume| is
- // also updated each time SetVolume() is called through IPC by the
- // render-side AGC.
- GetAgcVolume(&normalized_volume);
-
- while (num_buffers--) {
- int frames_read = sio_read(device_handle_, audio_buffer_.get(),
- params_.frames_per_buffer());
- if (frames_read == params_.frames_per_buffer()) {
- audio_bus_->FromInterleaved(audio_buffer_.get(),
- audio_bus_->frames(),
- params_.bits_per_sample() / 8);
- callback_->OnData(
- this, audio_bus_.get(), hw_delay_, normalized_volume);
- } else {
- LOG(WARNING) << "sio_read() returning less than expected frames: "
- << frames_read << " vs. " << params_.frames_per_buffer()
- << ". Dropping this buffer.";
- }
- }
}
void SndioAudioInputStream::Stop() {
@@ -187,4 +162,9 @@
return false;
}
+void SndioAudioInputStream::SetOutputDeviceForAec(
+ const std::string& output_device_id) {
+// Not supported. Do nothing.
+}
+
} // namespace media
Index: www/qt5-webengine/files/sndio_output.cc
===================================================================
--- www/qt5-webengine/files/sndio_output.cc
+++ www/qt5-webengine/files/sndio_output.cc
@@ -11,6 +11,8 @@
namespace media {
+static const SampleFormat kSampleFormat = kSampleFormatS16;
+
void sndio_onmove(void *arg, int delta) {
SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
@@ -35,7 +37,7 @@
: manager(manager),
params(params),
audio_bus(AudioBus::Create(params)),
- bytes_per_frame(params.GetBytesPerFrame()),
+ bytes_per_frame(params.GetBytesPerFrame(kSampleFormat)),
state(kClosed),
mutex(PTHREAD_MUTEX_INITIALIZER) {
}
@@ -57,7 +59,7 @@
sio_initpar(&par);
par.rate = params.sample_rate();
par.pchan = params.channels();
- par.bits = params.bits_per_sample();
+ par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
par.bps = par.bits / 8;
par.sig = sig = par.bits != 8 ? 1 : 0;
par.le = SIO_LE_NATIVE;
@@ -74,7 +76,7 @@
}
if (par.rate != (unsigned int)params.sample_rate() ||
par.pchan != (unsigned int)params.channels() ||
- par.bits != (unsigned int)params.bits_per_sample() ||
+ par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
par.sig != (unsigned int)sig ||
(par.bps > 1 && par.le != SIO_LE_NATIVE) ||
(par.bits != par.bps * 8)) {
@@ -84,7 +86,7 @@
state = kStopped;
volpending = 0;
vol = 0;
- buffer = new char[audio_bus->frames() * params.GetBytesPerFrame()];
+ buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
sio_onmove(hdl, sndio_onmove, this);
sio_onvol(hdl, sndio_onvol, this);
return true;
@@ -153,16 +155,16 @@
// Get data to play
const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, params.sample_rate() * 1000);
count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
- audio_bus->ToInterleaved(count, params.bits_per_sample() / 8, buffer);
+ audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer);
if (count == 0) {
// We have to submit something to the device
count = audio_bus->frames();
- memset(buffer, 0, count * params.GetBytesPerFrame());
+ memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
LOG(WARNING) << "No data to play, running empty cycle.";
}
// Submit data to the device
- avail = count * params.GetBytesPerFrame();
+ avail = count * params.GetBytesPerFrame(kSampleFormat);
count = sio_write(hdl, buffer, avail);
if (count == 0) {
LOG(WARNING) << "Audio device disconnected.";
Index: www/qt5-webengine/pkg-plist
===================================================================
--- www/qt5-webengine/pkg-plist
+++ www/qt5-webengine/pkg-plist
@@ -1,4 +1,6 @@
%%QT_BINDIR%%/qwebengine_convert_dict
+%%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebengineaction_p.h
+%%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebengineaction_p_p.h
%%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginecertificateerror_p.h
%%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginecontextmenurequest_p.h
%%QT_INCDIR%%/QtWebEngine/%%FULLVER%%/QtWebEngine/private/qquickwebenginedialogrequests_p.h
@@ -28,28 +30,35 @@
%%QT_INCDIR%%/QtWebEngine/qtwebengineglobal.h
%%QT_INCDIR%%/QtWebEngine/qtwebengineversion.h
%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qtwebenginecoreglobal_p.h
-%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginebrowsercontext_p.h
%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginecallback_p.h
%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebenginecookiestore_p.h
%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qwebengineurlrequestinfo_p.h
+%%QT_INCDIR%%/QtWebEngineCore/%%FULLVER%%/QtWebEngineCore/private/qtwebenginecore-config_p.h
%%QT_INCDIR%%/QtWebEngineCore/QWebEngineCallback
%%QT_INCDIR%%/QtWebEngineCore/QWebEngineCookieStore
%%QT_INCDIR%%/QtWebEngineCore/QWebEngineHttpRequest
+%%QT_INCDIR%%/QtWebEngineCore/QWebEngineQuotaRequest
+%%QT_INCDIR%%/QtWebEngineCore/QWebEngineRegisterProtocolHandlerRequest
%%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlRequestInfo
%%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlRequestInterceptor
%%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlRequestJob
+%%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlScheme
%%QT_INCDIR%%/QtWebEngineCore/QWebEngineUrlSchemeHandler
%%QT_INCDIR%%/QtWebEngineCore/QtWebEngineCore
%%QT_INCDIR%%/QtWebEngineCore/QtWebEngineCoreDepends
%%QT_INCDIR%%/QtWebEngineCore/QtWebEngineCoreVersion
%%QT_INCDIR%%/QtWebEngineCore/qtwebenginecoreglobal.h
%%QT_INCDIR%%/QtWebEngineCore/qtwebenginecoreversion.h
+%%QT_INCDIR%%/QtWebEngineCore/qtwebenginecore-config.h
%%QT_INCDIR%%/QtWebEngineCore/qwebenginecallback.h
%%QT_INCDIR%%/QtWebEngineCore/qwebenginecookiestore.h
%%QT_INCDIR%%/QtWebEngineCore/qwebenginehttprequest.h
+%%QT_INCDIR%%/QtWebEngineCore/qwebenginequotarequest.h
+%%QT_INCDIR%%/QtWebEngineCore/qwebengineregisterprotocolhandlerrequest.h
%%QT_INCDIR%%/QtWebEngineCore/qwebengineurlrequestinfo.h
%%QT_INCDIR%%/QtWebEngineCore/qwebengineurlrequestinterceptor.h
%%QT_INCDIR%%/QtWebEngineCore/qwebengineurlrequestjob.h
+%%QT_INCDIR%%/QtWebEngineCore/qwebengineurlscheme.h
%%QT_INCDIR%%/QtWebEngineCore/qwebengineurlschemehandler.h
%%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebenginedownloaditem_p.h
%%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebenginehistory_p.h
@@ -58,6 +67,7 @@
%%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebenginescriptcollection_p.h
%%QT_INCDIR%%/QtWebEngineWidgets/%%FULLVER%%/QtWebEngineWidgets/private/qwebengineview_p.h
%%QT_INCDIR%%/QtWebEngineWidgets/QWebEngineCertificateError
+%%QT_INCDIR%%/QtWebEngineWidgets/QWebEngineClientCertificateSelection
%%QT_INCDIR%%/QtWebEngineWidgets/QWebEngineContextMenuData
%%QT_INCDIR%%/QtWebEngineWidgets/QWebEngineDownloadItem
%%QT_INCDIR%%/QtWebEngineWidgets/QWebEngineFullScreenRequest
@@ -75,6 +85,7 @@
%%QT_INCDIR%%/QtWebEngineWidgets/qtwebenginewidgetsglobal.h
%%QT_INCDIR%%/QtWebEngineWidgets/qtwebenginewidgetsversion.h
%%QT_INCDIR%%/QtWebEngineWidgets/qwebenginecertificateerror.h
+%%QT_INCDIR%%/QtWebEngineWidgets/qwebengineclientcertificateselection.h
%%QT_INCDIR%%/QtWebEngineWidgets/qwebenginecontextmenudata.h
%%QT_INCDIR%%/QtWebEngineWidgets/qwebenginedownloaditem.h
%%QT_INCDIR%%/QtWebEngineWidgets/qwebenginefullscreenrequest.h
@@ -97,19 +108,19 @@
%%QT_LIBDIR%%/libQt5WebEngine.so.5
%%QT_LIBDIR%%/libQt5WebEngine.so.%%SHORTVER%%
%%QT_LIBDIR%%/libQt5WebEngine.so.%%FULLVER%%
-%%DEBUG%%%%QT_LIBDIR%%/libQt5WebEngine.so.%%FULLVER%%.debug
+@comment %%DEBUG%%%%QT_LIBDIR%%/libQt5WebEngine.so.%%FULLVER%%.debug
%%QT_LIBDIR%%/libQt5WebEngineCore.prl
%%QT_LIBDIR%%/libQt5WebEngineCore.so
%%QT_LIBDIR%%/libQt5WebEngineCore.so.5
%%QT_LIBDIR%%/libQt5WebEngineCore.so.%%SHORTVER%%
%%QT_LIBDIR%%/libQt5WebEngineCore.so.%%FULLVER%%
-%%DEBUG%%%%QT_LIBDIR%%/libQt5WebEngineCore.so.%%FULLVER%%.debug
+@comment %%DEBUG%%%%QT_LIBDIR%%/libQt5WebEngineCore.so.%%FULLVER%%.debug
%%QT_LIBDIR%%/libQt5WebEngineWidgets.prl
%%QT_LIBDIR%%/libQt5WebEngineWidgets.so
%%QT_LIBDIR%%/libQt5WebEngineWidgets.so.5
%%QT_LIBDIR%%/libQt5WebEngineWidgets.so.%%SHORTVER%%
%%QT_LIBDIR%%/libQt5WebEngineWidgets.so.%%FULLVER%%
-%%DEBUG%%%%QT_LIBDIR%%/libQt5WebEngineWidgets.so.%%FULLVER%%.debug
+@comment %%DEBUG%%%%QT_LIBDIR%%/libQt5WebEngineWidgets.so.%%FULLVER%%.debug
%%QT_MKSPECDIR%%/modules/qt_lib_webengine.pri
%%QT_MKSPECDIR%%/modules/qt_lib_webengine_private.pri
%%QT_MKSPECDIR%%/modules/qt_lib_webenginecore.pri
@@ -118,7 +129,7 @@
%%QT_MKSPECDIR%%/modules/qt_lib_webenginewidgets.pri
%%QT_MKSPECDIR%%/modules/qt_lib_webenginewidgets_private.pri
%%QT_PLUGINDIR%%/designer/libqwebengineview.so
-%%DEBUG%%%%QT_PLUGINDIR%%/designer/libqwebengineview.so.debug
+@comment %%DEBUG%%%%QT_PLUGINDIR%%/designer/libqwebengineview.so.debug
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/AlertDialog.qml
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/AuthenticationDialog.qml
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/ColorDialog.qml
@@ -127,7 +138,6 @@
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/Menu.qml
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/MenuItem.qml
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/MenuSeparator.qml
-%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/MessageBubble.qml
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/PromptDialog.qml
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/ToolTip.qml
%%QT_QMLDIR%%/QtWebEngine/Controls1Delegates/qmldir
@@ -143,7 +153,7 @@
%%QT_QMLDIR%%/QtWebEngine/Controls2Delegates/qmldir
%%QT_QMLDIR%%/QtWebEngine/Controls2Delegates/question.png
%%QT_QMLDIR%%/QtWebEngine/libqtwebengineplugin.so
-%%DEBUG%%%%QT_QMLDIR%%/QtWebEngine/libqtwebengineplugin.so.debug
+@comment %%DEBUG%%%%QT_QMLDIR%%/QtWebEngine/libqtwebengineplugin.so.debug
%%QT_QMLDIR%%/QtWebEngine/plugins.qmltypes
%%QT_QMLDIR%%/QtWebEngine/qmldir
libdata/pkgconfig/Qt5WebEngine.pc

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 28, 1:44 PM (5 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15623337
Default Alt Text
D18757.id55415.diff (781 KB)

Event Timeline