aboutsummaryrefslogtreecommitdiffstats
path: root/community/qt5-qtwebengine
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-09-04 11:11:01 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2018-09-04 11:24:46 +0200
commit3815b72ba156c35b962e15d65a52bb4ded404a58 (patch)
tree3e1595be115eb37e60a1fc57c242e43e7d26f9f3 /community/qt5-qtwebengine
parentde17d5212836b5874586e9f7cfee4381ee2a8401 (diff)
downloadaports-3815b72ba156c35b962e15d65a52bb4ded404a58.tar.bz2
aports-3815b72ba156c35b962e15d65a52bb4ded404a58.tar.xz
community/qt5-qtwebengine: move from testing
Diffstat (limited to 'community/qt5-qtwebengine')
-rw-r--r--community/qt5-qtwebengine/APKBUILD110
-rw-r--r--community/qt5-qtwebengine/arm-void-is-not-android.patch17
-rw-r--r--community/qt5-qtwebengine/musl-sandbox.patch70
-rw-r--r--community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch109
-rw-r--r--community/qt5-qtwebengine/qt-musl-execinfo.patch124
-rw-r--r--community/qt5-qtwebengine/qt-musl-mallinfo.patch42
-rw-r--r--community/qt5-qtwebengine/qt-musl-off_t.patch10
-rw-r--r--community/qt5-qtwebengine/qt-musl-pvalloc.patch14
-rw-r--r--community/qt5-qtwebengine/qt-musl-resolve.patch61
-rw-r--r--community/qt5-qtwebengine/qt-musl-serialio.patch12
-rw-r--r--community/qt5-qtwebengine/qt-musl-siginfo_t.patch18
-rw-r--r--community/qt5-qtwebengine/qt-musl-stackstart.patch20
-rw-r--r--community/qt5-qtwebengine/qtwebkit-chartype.patch157
-rw-r--r--community/qt5-qtwebengine/yasm-nls.patch13
14 files changed, 777 insertions, 0 deletions
diff --git a/community/qt5-qtwebengine/APKBUILD b/community/qt5-qtwebengine/APKBUILD
new file mode 100644
index 0000000000..56371a5c2a
--- /dev/null
+++ b/community/qt5-qtwebengine/APKBUILD
@@ -0,0 +1,110 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=qt5-qtwebengine
+pkgver=5.10.1
+pkgrel=5
+pkgdesc="Qt5 - QtWebEngine components"
+url="http://qt-project.org/"
+# ppc64le, s390x: not supported
+# x86: fails to build
+arch="all !ppc64le !x86 !s390x"
+license="LGPL-2.0 with exceptions or GPL-3.0 with exceptions"
+depends=""
+depends_dev="qt5-qtdeclarative-dev qt5-qtwebchannel-dev gstreamer-dev gst-plugins-base-dev
+ libxslt-dev mesa-dev icu-dev libxext-dev glib-dev libxcomposite-dev
+ libxrender-dev ninja ffmpeg-dev
+ "
+makedepends="$depends_dev
+ alsa-lib-dev
+ bison
+ bsd-compat-headers
+ ffmpeg-dev
+ flex
+ fontconfig-dev
+ gperf
+ gzip
+ harfbuzz-dev
+ icu-dev
+ jsoncpp-dev
+ libevent-dev
+ libjpeg-turbo-dev
+ libpng-dev
+ libsrtp-dev
+ libvpx-dev
+ libwebp-dev
+ libxcursor-dev
+ libxi-dev
+ libxml2
+ libxrandr-dev
+ libxslt
+ libxtst-dev
+ linux-headers
+ nss-dev
+ opus-dev
+ paxmark
+ pcre-dev
+ protobuf-dev
+ qt5-qtbase-dev
+ re2-dev
+ ruby
+ snappy-dev
+ sqlite-dev
+ yasm-dev
+ zlib-dev
+ "
+subpackages="$pkgname-dev"
+
+_ver=${pkgver/_/-}
+_ver=${_ver/beta0/beta}
+_ver=${_ver/rc0/rc}
+_V=${_ver/rc/RC}
+case $pkgver in
+*_beta*|*_rc*) _rel=development_releases;;
+*) _rel=official_releases;;
+esac
+
+source="http://download.qt-project.org/$_rel/qt/${pkgver%.*}/$_ver/submodules/qtwebengine-everywhere-src-$_V.tar.xz
+ arm-void-is-not-android.patch
+ qt-musl-dispatch_to_musl.patch
+ qt-musl-execinfo.patch
+ qt-musl-mallinfo.patch
+ qt-musl-off_t.patch
+ qt-musl-pvalloc.patch
+ qt-musl-resolve.patch
+ qt-musl-serialio.patch
+ qt-musl-siginfo_t.patch
+ qt-musl-stackstart.patch
+ qtwebkit-chartype.patch
+ musl-sandbox.patch
+ yasm-nls.patch
+ "
+builddir="$srcdir"/qtwebengine-everywhere-src-$_V
+
+build() {
+ cd "$builddir"
+ export NINJA_PATH="/usr/bin/ninja"
+ qmake-qt5 QMAKE_EXTRA_ARGS+="-webengine-ffmpeg -webengine-opus -webengine-webp"
+ make || paxmark -m src/core/release/mksnapshot && make
+}
+
+package() {
+ cd "$builddir"
+ make install INSTALL_ROOT="$pkgdir" || return 1
+ # remove rpath
+# chrpath --delete "$pkgdir"/usr/lib/qt5/libexec/* || return 1
+ sed -i -e 's:-L/home[^ ]\+::g' "$pkgdir"/usr/lib/pkgconfig/*.pc
+}
+
+sha512sums="dc1b15eb857cb9ff3ef98a2f90cfec8c40429eea292bbed6a323cf1c4b044f3b73efaf51833fe8d9ca2ecc4f99d7092590a1a34248a9ab14fa5a38d4335f4925 qtwebengine-everywhere-src-5.10.1.tar.xz
+5e017e6500af56d0e608839c466782193ab3f6e5d01938b84b7f9c86fbb826e140f9fca789a23e7a7431ba42377be328a8bfcacbf7c302746de79f7857f2832d arm-void-is-not-android.patch
+e8ca442eebc47a01ef51304a38062dcf3a334c8985b67c1fcefbbc530a5c773d26086b3ba7909e051fe5fea8b7784336b08f9899a3c6ab2508f7251db122e5de qt-musl-dispatch_to_musl.patch
+3af77688071c5d42bb8e902e059f2c1c956ed531c5072f16dfc02cff091df4828fda2cce887deba49b2e8c4c4195754c2ccb2a2238b9b827eb4d58398e1f0e07 qt-musl-execinfo.patch
+819786f225c2312cf1afeceed24968204095db0ff4e5739f6b46bfec639e26a9d1702e0d7ce8493562f9d4c08d5a31ba48bdc47553ac78ef5763cb4ec1e57e5c qt-musl-mallinfo.patch
+7eba28eb015f1a7e5cf70e9354fcd647b69f4e7c061b889a8c0d55f4a94a033f95d0252f9baebf13c3d501438074a05d547eef2c8cf898dc2c87cec3b60e76e0 qt-musl-off_t.patch
+ac563e0c444a6d3214ff7465cad2c701692cfa90408c57243d3ae9459937c36e88acd57335bb90da85157e03865faaf17d61a767483b00ed8f3580ebf8a2fbb5 qt-musl-pvalloc.patch
+8d95e4fcb463b5d2053c9538e66150ec9a3acddd7815cc34c8cd6fa115e49f1d602c4f1fc73f5e507a932c918e36c9c3d1386476dca91c5fc422906d0d88f610 qt-musl-resolve.patch
+c39b4c39ad3e297dc4f2508af9fb6b1618e8f6fac4399e41b5bde00a1e79cc0cd24af8b8c01bfe61e4748b2b74778a06afff166095e59baf491d6fc56f3537f7 qt-musl-serialio.patch
+2fead16e7d7379b622da0e3172905444d9d72d1a53ff080327a3d59f60541c5c076d9b58f110b039da8c9ebc3b5efec53af118e1172efd01886ff9ac2b730d5f qt-musl-siginfo_t.patch
+1acac5b3c94096f3ff05105008a971d44512074b09a2c1313b48e10cb1bcefb94d8a6d29c305c00d461c532afbeed2f2953ffc8c722d9000e178d977c8566f33 qt-musl-stackstart.patch
+20e8262292aa55c2a30f66570e702cbf3539e03ca563be987de734c50b6e0ccceccab64d1b11e55dde01868abd965470eb1c1fbf0d56917fa370e500c90a9660 qtwebkit-chartype.patch
+635d77109b5ce9bc9697d621f1bf98193903e2ac69fc4079fb92f175daa80147fed8ae15544d239ef680e120474d8f811002935ef1a078836ba01695f9ddfcb9 musl-sandbox.patch
+f6b1941e40f44b675ab554166e3cd8d3272b23f48571b4949b3af7b8e1c642ee84fe0ee26dd2457fc3bf20e9924cddb411e293b7a8a103029ee196587371a1e2 yasm-nls.patch"
diff --git a/community/qt5-qtwebengine/arm-void-is-not-android.patch b/community/qt5-qtwebengine/arm-void-is-not-android.patch
new file mode 100644
index 0000000000..6ae86dde37
--- /dev/null
+++ b/community/qt5-qtwebengine/arm-void-is-not-android.patch
@@ -0,0 +1,17 @@
+--- qtwebengine/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2018-01-30 16:42:15.332826020 +0100
+@@ -194,14 +194,6 @@
+ "sp/src/arm/armv7/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S",
+ "sp/src/arm/armv7/omxSP_FFTInv_CCSToR_F32_Sfs_s.S",
+ ]
+- if (arm_optionally_use_neon) {
+- # Run-time NEON detection.
+- deps = [ "//third_party/android_tools:cpu_features" ]
+- # To get the __android_log_print routine
+- libs = [ "log" ]
+- # Detection routine
+- sources += [ "sp/src/arm/detect.c" ]
+- }
+ }
+
+ # GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl_neon
diff --git a/community/qt5-qtwebengine/musl-sandbox.patch b/community/qt5-qtwebengine/musl-sandbox.patch
new file mode 100644
index 0000000000..46b5d0bce1
--- /dev/null
+++ b/community/qt5-qtwebengine/musl-sandbox.patch
@@ -0,0 +1,70 @@
+diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+index 5f81dff..85b7ea0 100644
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -129,23 +129,13 @@ namespace sandbox {
+ // CLONE_VM, nor CLONE_THREAD, which includes all fork() implementations.
+ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
+ const Arg<unsigned long> flags(0);
++ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
++ CLONE_THREAD | CLONE_SYSVSEM;
++ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
++ CLONE_DETACHED;
++ const BoolExpr thread_clone_ok = (flags&~safe)==required;
+
+- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
+- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
+- CLONE_SIGHAND | CLONE_THREAD |
+- CLONE_SYSVSEM;
+- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED;
+-
+- const uint64_t kGlibcPthreadFlags =
+- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD |
+- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID;
+- const BoolExpr glibc_test = flags == kGlibcPthreadFlags;
+-
+- const BoolExpr android_test =
+- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
+- flags == kGlibcPthreadFlags);
+-
+- return If(IsAndroid() ? android_test : glibc_test, Allow())
++ return If(thread_clone_ok, Allow())
+ .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
+ .Else(CrashSIGSYSClone());
+ }
+diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+index 1d9f95c..21fbe21 100644
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -373,6 +373,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
+ #if defined(__i386__)
+ case __NR_waitpid:
+ #endif
++ case __NR_set_tid_address:
+ return true;
+ case __NR_clone: // Should be parameter-restricted.
+ case __NR_setns: // Privileged.
+@@ -385,7 +386,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+ case __NR_set_thread_area:
+ #endif
+- case __NR_set_tid_address:
+ case __NR_unshare:
+ #if !defined(__mips__) && !defined(__aarch64__)
+ case __NR_vfork:
+@@ -492,6 +492,7 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+ case __NR_mlock:
+ case __NR_munlock:
+ case __NR_munmap:
++ case __NR_mremap:
+ return true;
+ case __NR_madvise:
+ case __NR_mincore:
+@@ -507,7 +508,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+ case __NR_modify_ldt:
+ #endif
+ case __NR_mprotect:
+- case __NR_mremap:
+ case __NR_msync:
+ case __NR_munlockall:
+ case __NR_readahead:
diff --git a/community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch b/community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch
new file mode 100644
index 0000000000..86e09d5cfd
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-dispatch_to_musl.patch
@@ -0,0 +1,109 @@
+--- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc 2017-09-19 18:15:15.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc 2017-10-09 19:35:11.762384809 +0200
+@@ -6,6 +6,7 @@
+
+ #include <malloc.h>
+
++#if defined(__GLIBC__)
+ // This translation unit defines a default dispatch for the allocator shim which
+ // routes allocations to libc functions.
+ // The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
+@@ -59,3 +60,98 @@
+ &GlibcGetSizeEstimate, /* get_size_estimate_function */
+ nullptr, /* next */
+ };
++
++#else // defined(__GLIBC__)
++
++#include <dlfcn.h>
++
++extern "C" {
++// Declare function pointers to the memory functions
++typedef void* (*t_libc_malloc)(size_t size);
++typedef void* (*t_libc_calloc)(size_t n, size_t size);
++typedef void* (*t_libc_realloc)(void* address, size_t size);
++typedef void* (*t_libc_memalign)(size_t alignment, size_t size);
++typedef void (*t_libc_free)(void* ptr);
++typedef size_t (*t_libc_malloc_usable_size)(void* ptr);
++
++// Static instances of pointers to libc.so dl symbols
++static t_libc_malloc libc_malloc = NULL;
++static t_libc_calloc libc_calloc = NULL;
++static t_libc_realloc libc_realloc = NULL;
++static t_libc_memalign libc_memalign = NULL;
++static t_libc_free libc_free = NULL;
++static t_libc_malloc_usable_size libc_malloc_usable_size = NULL;
++
++// resolve the symbols in libc.so
++void musl_libc_memory_init(void)
++{
++ void* libc = dlopen("libc", RTLD_LAZY);
++ if (!libc)
++ libc = dlopen("libc.so", RTLD_LAZY);
++ if (!libc)
++ libc = dlopen("libc.so.6", RTLD_LAZY);
++ libc_malloc = (t_libc_malloc) dlsym(libc, "malloc");
++ libc_calloc = (t_libc_calloc) dlsym(libc, "calloc");
++ libc_realloc = (t_libc_realloc) dlsym(libc, "realloc");
++ libc_memalign = (t_libc_memalign) dlsym(libc, "memalign");
++ libc_free = (t_libc_free) dlsym(libc, "free");
++ libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(libc, "malloc_usable_size");
++ dlclose(libc);
++}
++} // extern "C"
++
++namespace {
++
++using base::allocator::AllocatorDispatch;
++
++void* MuslMalloc(const AllocatorDispatch*, size_t size, void* context) {
++ if (!libc_malloc)
++ musl_libc_memory_init();
++ return (*libc_malloc)(size);
++}
++
++void* MuslCalloc(const AllocatorDispatch*, size_t n, size_t size, void* context) {
++ if (!libc_calloc)
++ musl_libc_memory_init();
++ return (*libc_calloc)(n, size);
++}
++
++void* MuslRealloc(const AllocatorDispatch*, void* address, size_t size, void* context) {
++ if (!libc_realloc)
++ musl_libc_memory_init();
++ return (*libc_realloc)(address, size);
++}
++
++void* MuslMemalign(const AllocatorDispatch*, size_t alignment, size_t size, void* context) {
++ if (!libc_memalign)
++ musl_libc_memory_init();
++ return (*libc_memalign)(alignment, size);
++}
++
++void MuslFree(const AllocatorDispatch*, void* address, void* context) {
++ if (!libc_free)
++ musl_libc_memory_init();
++ (*libc_free)(address);
++}
++
++size_t MuslGetSizeEstimate(const AllocatorDispatch*, void* address, void* context) {
++ // TODO(siggi, primiano): malloc_usable_size may need redirection in the
++ // presence of interposing shims that divert allocations.
++ if (!libc_malloc_usable_size)
++ musl_libc_memory_init();
++ return (*libc_malloc_usable_size)(address);
++}
++
++} // namespace
++
++const AllocatorDispatch AllocatorDispatch::default_dispatch = {
++ &MuslMalloc, /* alloc_function */
++ &MuslCalloc, /* alloc_zero_initialized_function */
++ &MuslMemalign, /* alloc_aligned_function */
++ &MuslRealloc, /* realloc_function */
++ &MuslFree, /* free_function */
++ &MuslGetSizeEstimate, /* get_size_estimate_function */
++ nullptr, /* next */
++};
++
++#endif
diff --git a/community/qt5-qtwebengine/qt-musl-execinfo.patch b/community/qt5-qtwebengine/qt-musl-execinfo.patch
new file mode 100644
index 0000000000..615177ba16
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-execinfo.patch
@@ -0,0 +1,124 @@
+--- qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2018-01-27 21:50:04.693231905 +0100
+@@ -26,7 +26,7 @@
+ #if !defined(USE_SYMBOLIZE)
+ #include <cxxabi.h>
+ #endif
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ #include <execinfo.h>
+ #endif
+
+@@ -82,7 +82,7 @@
+ // Note: code in this function is NOT async-signal safe (std::string uses
+ // malloc internally).
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ std::string::size_type search_from = 0;
+ while (search_from < text->size()) {
+ // Look for the start of a mangled symbol, from search_from.
+@@ -117,7 +117,7 @@
+ search_from = mangled_start + 2;
+ }
+ }
+-#endif // !defined(__UCLIBC__) && !defined(_AIX)
++#endif // !defined(__GLIBC__) && !defined(_AIX)
+ }
+ #endif // !defined(USE_SYMBOLIZE)
+
+@@ -129,7 +129,7 @@
+ virtual ~BacktraceOutputHandler() {}
+ };
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
+ // This should be more than enough to store a 64-bit number in hex:
+ // 16 hex digits + 1 for null-terminator.
+@@ -206,7 +206,7 @@
+ }
+ #endif // defined(USE_SYMBOLIZE)
+ }
+-#endif // !defined(__UCLIBC__) && !defined(_AIX)
++#endif // !defined(__GLIBC__) && !defined(_AIX)
+
+ void PrintToStderr(const char* output) {
+ // NOTE: This code MUST be async-signal safe (it's used by in-process
+@@ -749,7 +749,7 @@
+ // NOTE: This code MUST be async-signal safe (it's used by in-process
+ // stack dumping signal handler). NO malloc or stdio is allowed here.
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ count = std::min(arraysize(trace_), count);
+
+ // Though the backtrace API man page does not list any possible negative
+@@ -764,13 +764,13 @@
+ // NOTE: This code MUST be async-signal safe (it's used by in-process
+ // stack dumping signal handler). NO malloc or stdio is allowed here.
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ PrintBacktraceOutputHandler handler;
+ ProcessBacktrace(trace_, count_, &handler);
+ #endif
+ }
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ void StackTrace::OutputToStream(std::ostream* os) const {
+ StreamBacktraceOutputHandler handler(os);
+ ProcessBacktrace(trace_, count_, &handler);
+--- qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc 2018-01-27 22:31:08.296359000 +0100
+@@ -214,7 +214,7 @@
+
+ std::string StackTrace::ToString() const {
+ std::stringstream stream;
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ OutputToStream(&stream);
+ #endif
+ return stream.str();
+--- qtwebengine/src/3rdparty/chromium/base/logging.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/logging.cc 2018-01-27 22:46:34.970406807 +0100
+@@ -546,7 +546,7 @@
+
+ LogMessage::~LogMessage() {
+ size_t stack_start = stream_.tellp();
+-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
++#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \
+ !defined(OS_AIX)
+ if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
+ // Include a stack trace on a fatal, unless a debugger is attached.
+--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/Assertions.cpp 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/Assertions.cpp 2018-01-29 20:23:26.498185623 +0100
+@@ -59,7 +59,6 @@
+ #if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+-#include <execinfo.h>
+ #endif
+
+ #if defined(OS_ANDROID)
+--- qtwebengine/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.cc 2018-01-29 20:32:41.070163511 +0100
+@@ -16,7 +16,7 @@
+ #include <cstdio>
+ #include <cstdlib>
+
+-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
++#if defined(__GLIBCXX__) && defined(__GLIBC__)
+ #include <cxxabi.h>
+ #include <execinfo.h>
+ #endif
+@@ -60,7 +60,7 @@
+ // to get usable symbols on Linux. This is copied from V8. Chromium has a more
+ // advanced stace trace system; also more difficult to copy.
+ void DumpBacktrace() {
+-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
++#if defined(__GLIBCXX__) && defined(__GLIBC__)
+ void* trace[100];
+ int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
+ char** symbols = backtrace_symbols(trace, size);
diff --git a/community/qt5-qtwebengine/qt-musl-mallinfo.patch b/community/qt5-qtwebengine/qt-musl-mallinfo.patch
new file mode 100644
index 0000000000..67ce2cb3f7
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-mallinfo.patch
@@ -0,0 +1,42 @@
+--- qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2018-01-27 20:13:26.960932805 +0100
+@@ -243,7 +243,7 @@
+ allocated_objects_count = main_heap_info.block_count;
+ #elif defined(OS_FUCHSIA)
+ // TODO(fuchsia): Port, see https://crbug.com/706592.
+-#else
++#elif defined(__GLIBC__)
+ struct mallinfo info = mallinfo();
+ DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
+
+@@ -255,6 +255,8 @@
+
+ // Total allocated space is given by |uordblks|.
+ allocated_objects_size = info.uordblks;
++#else
++// musl libc does not support mallinfo()
+ #endif
+
+ MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
+--- qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2018-01-27 20:48:11.571040348 +0100
+@@ -94,7 +94,7 @@
+ malloc_statistics_t stats = {0};
+ malloc_zone_statistics(nullptr, &stats);
+ return stats.size_in_use;
+-#elif defined(OS_LINUX) || defined(OS_ANDROID)
++#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID)
+ struct mallinfo minfo = mallinfo();
+ #if defined(USE_TCMALLOC)
+ return minfo.uordblks;
+--- qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2018-01-28 06:23:14.891238507 +0100
+@@ -25,7 +25,7 @@
+ // though, this provides only a partial and misleading value.
+ // Unfortunately some telemetry benchmark rely on it and these need to
+ // be refactored before getting rid of this. See crbug.com/581365 .
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(__GLIBC__) || defined(OS_ANDROID)
+ size_t GetMemoryUsageKB() {
+ struct mallinfo minfo = mallinfo();
+ uint64_t mem_usage =
diff --git a/community/qt5-qtwebengine/qt-musl-off_t.patch b/community/qt5-qtwebengine/qt-musl-off_t.patch
new file mode 100644
index 0000000000..52db3b9ebf
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-off_t.patch
@@ -0,0 +1,10 @@
+--- qtwebengine/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h 2016-05-26 14:58:54.000000000 +0200
++++ qtwebengine/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h 2016-10-01 14:31:30.885000000 +0200
+@@ -21,6 +21,7 @@
+ #define htons(x) _byteswap_ushort (x)
+ #else
+ #include <arpa/inet.h>
++#include <sys/types.h>
+ #include <stdint.h>
+ #endif
+
diff --git a/community/qt5-qtwebengine/qt-musl-pvalloc.patch b/community/qt5-qtwebengine/qt-musl-pvalloc.patch
new file mode 100644
index 0000000000..d5caf3836d
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-pvalloc.patch
@@ -0,0 +1,14 @@
+--- qtwebengine/src/core/api/qtbug-61521.cpp 2017-11-29 09:42:29.000000000 +0100
++++ qtwebengine/src/core/api/qtbug-61521.cpp 2018-01-28 06:49:29.454175725 +0100
+@@ -111,7 +111,11 @@
+ }
+
+ SHIM_HIDDEN void* ShimPvalloc(size_t size) {
++#if defined(__GLIBC__)
+ return pvalloc(size);
++#else
++ return valloc((size+4095)&~4095);
++#endif
+ }
+
+ SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) {
diff --git a/community/qt5-qtwebengine/qt-musl-resolve.patch b/community/qt5-qtwebengine/qt-musl-resolve.patch
new file mode 100644
index 0000000000..a481e50d26
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-resolve.patch
@@ -0,0 +1,61 @@
+--- qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc 2016-11-07 15:46:18.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc 2016-12-20 03:33:11.749059656 +0100
+@@ -9,6 +9,10 @@
+
+ #include <resolv.h>
+
++#if !defined(__GLIBC__)
++#include "resolv_compat.h"
++#endif
++
+ #include "base/lazy_instance.h"
+ #include "base/logging.h"
+ #include "base/macros.h"
+--- qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc 2016-11-07 15:46:18.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc 2016-12-20 03:40:07.671953098 +0100
+@@ -6,6 +6,10 @@
+
+ #include <string>
+
++#if !defined(__GLIBC__)
++#include "resolv_compat.h"
++#endif
++
+ #include "base/bind.h"
+ #include "base/files/file.h"
+ #include "base/files/file_path.h"
+diff --git a/src/3rdparty/chromium/net/dns/resolv_compat.h b/src/3rdparty/chromium/net/dns/resolv_compat.h
+new file mode 100644
+index 0000000..4f0e852
+--- /dev/null
++++ b/src/3rdparty/chromium/net/dns/resolv_compat.h
+@@ -0,0 +1,29 @@
++#if !defined(__GLIBC__)
++/***************************************************************************
++ * resolv_compat.h
++ *
++ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
++ * Note: res_init() is actually deprecated according to
++ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
++ **************************************************************************/
++#include <string.h>
++
++static inline int res_ninit(res_state statp)
++{
++ int rc = res_init();
++ if (statp != &_res) {
++ memcpy(statp, &_res, sizeof(*statp));
++ }
++ return rc;
++}
++
++static inline int res_nclose(res_state statp)
++{
++ if (!statp)
++ return -1;
++ if (statp != &_res) {
++ memset(statp, 0, sizeof(*statp));
++ }
++ return 0;
++}
++#endif
diff --git a/community/qt5-qtwebengine/qt-musl-serialio.patch b/community/qt5-qtwebengine/qt-musl-serialio.patch
new file mode 100644
index 0000000000..cf0e0fa768
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-serialio.patch
@@ -0,0 +1,12 @@
+--- qtwebengine/src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc 2017-01-03 10:28:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc 2017-02-23 21:20:42.650669563 +0100
+@@ -12,6 +12,9 @@
+
+ #if defined(OS_LINUX)
+ #include <linux/serial.h>
++#if !defined(__GLIBC__)
++#include <asm-generic/ioctls.h>
++#endif
+
+ // The definition of struct termios2 is copied from asm-generic/termbits.h
+ // because including that header directly conflicts with termios.h.
diff --git a/community/qt5-qtwebengine/qt-musl-siginfo_t.patch b/community/qt5-qtwebengine/qt-musl-siginfo_t.patch
new file mode 100644
index 0000000000..fe760be166
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-siginfo_t.patch
@@ -0,0 +1,18 @@
+There's a subtle difference in the internal name of siginfo_t fields
+between glibc and musl. The structure itself is equivalent, so it
+should suffice to add a macro to rename the field.
+
+--- qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc 2015-02-17 05:57:43.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc 2015-06-03 08:20:25.032716427 +0200
+@@ -22,6 +22,11 @@
+ #include "sandbox/linux/services/android_ucontext.h"
+ #endif
+
++// musl libc defines siginfo_t __si_fields instead of _sifields
++#if !defined(__GLIBC__)
++#define _sifields __si_fields
++#endif
++
+ namespace {
+
+ const int kCapacityIncrement = 20;
diff --git a/community/qt5-qtwebengine/qt-musl-stackstart.patch b/community/qt5-qtwebengine/qt-musl-stackstart.patch
new file mode 100644
index 0000000000..d8dd1aa90f
--- /dev/null
+++ b/community/qt5-qtwebengine/qt-musl-stackstart.patch
@@ -0,0 +1,20 @@
+--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp 2018-01-27 23:08:43.586475349 +0100
++++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp 2018-01-27 23:18:22.274505203 +0100
+@@ -28,7 +28,7 @@
+ // FIXME: On Mac OSX and Linux, this method cannot estimate stack size
+ // correctly for the main thread.
+
+-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
+ defined(OS_FUCHSIA)
+ // pthread_getattr_np() can fail if the thread is not invoked by
+ // pthread_create() (e.g., the main thread of webkit_unit_tests).
+@@ -96,7 +96,7 @@
+ }
+
+ void* GetStackStart() {
+-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
+ defined(OS_FUCHSIA)
+ pthread_attr_t attr;
+ int error;
diff --git a/community/qt5-qtwebengine/qtwebkit-chartype.patch b/community/qt5-qtwebengine/qtwebkit-chartype.patch
new file mode 100644
index 0000000000..3b621db1aa
--- /dev/null
+++ b/community/qt5-qtwebengine/qtwebkit-chartype.patch
@@ -0,0 +1,157 @@
+--- qtwebengine/src/3rdparty/chromium/base/i18n/unicodestring.h 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/i18n/unicodestring.h 2018-01-27 19:45:41.595846890 +0100
+@@ -18,7 +18,7 @@
+
+ inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) {
+ #if U_ICU_VERSION_MAJOR_NUM >= 59
+- return base::string16(icu::toUCharPtr(unistr.getBuffer()),
++ return base::string16(reinterpret_cast<const UChar *>(unistr.getBuffer()),
+ static_cast<size_t>(unistr.length()));
+ #else
+ return base::string16(unistr.getBuffer(),
+--- qtwebengine/src/3rdparty/chromium/base/i18n/string_search.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/i18n/string_search.cc 2018-01-27 18:35:29.907629612 +0100
+@@ -20,7 +20,9 @@
+ const string16& dummy = find_this_;
+
+ UErrorCode status = U_ZERO_ERROR;
+- search_ = usearch_open(find_this_.data(), find_this_.size(),
+- dummy.data(), dummy.size(),
++ search_ = usearch_open(reinterpret_cast<const UChar*>(find_this_.data()),
++ find_this_.size(),
++ reinterpret_cast<const UChar*>(dummy.data()),
++ dummy.size(),
+ uloc_getDefault(),
+ NULL, // breakiter
+@@ -43,7 +43,7 @@
+ bool FixedPatternStringSearchIgnoringCaseAndAccents::Search(
+ const string16& in_this, size_t* match_index, size_t* match_length) {
+ UErrorCode status = U_ZERO_ERROR;
+- usearch_setText(search_, in_this.data(), in_this.size(), &status);
++ usearch_setText(search_, reinterpret_cast<const UChar*>(in_this.data()), in_this.size(), &status);
+
+ // Default to basic substring search if usearch fails. According to
+ // http://icu-project.org/apiref/icu4c/usearch_8h.html, usearch_open will fail
+--- qtwebengine/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc 2018-01-27 18:57:39.643698212 +0100
+@@ -44,7 +44,7 @@
+ bidi_ = ubidi_openSized(static_cast<int>(text.length()), 0, &error);
+ if (U_FAILURE(error))
+ return false;
+- ubidi_setPara(bidi_, text.data(), static_cast<int>(text.length()),
++ ubidi_setPara(bidi_, reinterpret_cast<const UChar*>(text.data()), static_cast<int>(text.length()),
+ GetParagraphLevelForDirection(direction), NULL, &error);
+ return (U_SUCCESS(error) == TRUE);
+ }
+--- qtwebengine/src/3rdparty/chromium/base/i18n/break_iterator.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/i18n/break_iterator.cc 2018-01-27 19:08:24.185731464 +0100
+@@ -59,7 +59,7 @@
+ return false;
+ }
+ if (break_type_ == RULE_BASED) {
+- iter_ = ubrk_openRules(rules_.c_str(),
+- static_cast<int32_t>(rules_.length()),
+- string_.data(),
++ iter_ = ubrk_openRules(reinterpret_cast<const UChar *>(rules_.c_str()),
++ static_cast<int32_t>(rules_.length()),
++ reinterpret_cast<const UChar *>(string_.data()),
+ static_cast<int32_t>(string_.size()),
+@@ -72,7 +72,7 @@
+ } else {
+ iter_ = ubrk_open(break_type,
+ NULL,
+- string_.data(),
++ reinterpret_cast<const UChar*>(string_.data()),
+ static_cast<int32_t>(string_.size()),
+ &status);
+ if (U_FAILURE(status)) {
+@@ -128,7 +128,7 @@
+ bool BreakIterator::SetText(const base::char16* text, const size_t length) {
+ UErrorCode status = U_ZERO_ERROR;
+ ubrk_setText(static_cast<UBreakIterator*>(iter_),
+- text, length, &status);
++ reinterpret_cast<const UChar *>(text), length, &status);
+ pos_ = 0; // implicit when ubrk_setText is done
+ prev_ = npos;
+ if (U_FAILURE(status)) {
+--- qtwebengine/src/3rdparty/chromium/base/i18n/rtl.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/i18n/rtl.cc 2018-01-27 19:25:16.283783677 +0100
+@@ -212,7 +212,7 @@
+ }
+
+ TextDirection GetFirstStrongCharacterDirection(const string16& text) {
+- const UChar* string = text.c_str();
++ const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
+ size_t length = text.length();
+ size_t position = 0;
+ while (position < length) {
+@@ -228,7 +228,7 @@
+ }
+
+ TextDirection GetLastStrongCharacterDirection(const string16& text) {
+- const UChar* string = text.c_str();
++ const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
+ size_t position = text.length();
+ while (position > 0) {
+ UChar32 character;
+@@ -243,7 +243,7 @@
+ }
+
+ TextDirection GetStringDirection(const string16& text) {
+- const UChar* string = text.c_str();
++ const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
+ size_t length = text.length();
+ size_t position = 0;
+
+@@ -374,7 +374,7 @@
+ #endif // !OS_WIN
+
+ bool StringContainsStrongRTLChars(const string16& text) {
+- const UChar* string = text.c_str();
++ const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
+ size_t length = text.length();
+ size_t position = 0;
+ while (position < length) {
+--- qtwebengine/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc 2018-01-27 19:51:29.425864834 +0100
+@@ -151,7 +151,7 @@
+ if (!U_SUCCESS(status))
+ return false;
+
+- return ConvertFromUTF16(converter, utf16.c_str(),
++ return ConvertFromUTF16(converter, reinterpret_cast<const UChar *>(utf16.c_str()),
+ static_cast<int>(utf16.length()), on_error, encoded);
+ }
+
+@@ -178,7 +178,7 @@
+
+ SetUpErrorHandlerForToUChars(on_error, converter, &status);
+ std::unique_ptr<char16[]> buffer(new char16[uchar_max_length]);
+- int actual_size = ucnv_toUChars(converter, buffer.get(),
++ int actual_size = ucnv_toUChars(converter, reinterpret_cast<UChar *>(buffer.get()),
+ static_cast<int>(uchar_max_length), encoded.data(),
+ static_cast<int>(encoded.length()), &status);
+ ucnv_close(converter);
+@@ -205,8 +205,8 @@
+ string16 normalized_utf16;
+ std::unique_ptr<char16[]> buffer(new char16[max_length]);
+ int actual_length = unorm_normalize(
+- utf16.c_str(), utf16.length(), UNORM_NFC, 0,
+- buffer.get(), static_cast<int>(max_length), &status);
++ reinterpret_cast<const UChar *>(utf16.c_str()), utf16.length(), UNORM_NFC, 0,
++ reinterpret_cast<UChar *>(buffer.get()), static_cast<int>(max_length), &status);
+ if (!U_SUCCESS(status))
+ return false;
+ normalized_utf16.assign(buffer.get(), actual_length);
+--- qtwebengine/src/3rdparty/chromium/base/i18n/case_conversion.cc 2017-11-28 14:06:53.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/i18n/case_conversion.cc 2018-01-27 19:59:11.955888696 +0100
+@@ -65,7 +65,7 @@
+ // Don't use WriteInto, which assumes null terminators.
+ int32_t new_length = case_mapper(
+- &dest[0], saturated_cast<int32_t>(dest.size()),
+- string.data(), saturated_cast<int32_t>(string.size()),
++ reinterpret_cast<UChar *>(&dest[0]), saturated_cast<int32_t>(dest.size()),
++ reinterpret_cast<const UChar *>(string.data()), saturated_cast<int32_t>(string.size()),
+ &error);
+ dest.resize(new_length);
+ } while (error == U_BUFFER_OVERFLOW_ERROR);
diff --git a/community/qt5-qtwebengine/yasm-nls.patch b/community/qt5-qtwebengine/yasm-nls.patch
new file mode 100644
index 0000000000..6b412abd90
--- /dev/null
+++ b/community/qt5-qtwebengine/yasm-nls.patch
@@ -0,0 +1,13 @@
+diff --git a/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h b/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h
+index 9e36539..f588083 100644
+--- a/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h
++++ b/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h
+@@ -5,7 +5,7 @@
+ #define CPP_PROG "gcc -E"
+
+ /* */
+-#define ENABLE_NLS 1
++/* #undef ENABLE_NLS 1 */
+
+ /* Define to 1 if you have the `abort' function. */
+ #define HAVE_ABORT 1