New package: qt5-webengine-5.14.2
This commit is contained in:
parent
91fea1614b
commit
96e307c459
25 changed files with 4937 additions and 1 deletions
|
@ -1 +1 @@
|
|||
qt5
|
||||
qt5-webengine
|
29
srcpkgs/qt5-webengine/files/resolv_compat.h
Normal file
29
srcpkgs/qt5-webengine/files/resolv_compat.h
Normal file
|
@ -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
|
|
@ -0,0 +1,42 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2018-06-15 09:47:20.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2018-09-07 22:21:28.521763716 +0200
|
||||
@@ -50,7 +50,7 @@
|
||||
// info: the collection of register structures.
|
||||
#if defined(__i386__) || defined(__x86_64)
|
||||
static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
||||
- const struct _libc_fpstate* fp);
|
||||
+ const struct _fpstate* fp);
|
||||
#elif defined(__aarch64__)
|
||||
static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
||||
const struct fpsimd_context* fpregs);
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc 2018-06-15 09:47:20.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc 2018-09-07 22:21:45.766762688 +0200
|
||||
@@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
||||
- const struct _libc_fpstate* fp) {
|
||||
+ const struct _fpstate* fp) {
|
||||
const greg_t* regs = uc->uc_mcontext.gregs;
|
||||
|
||||
out->context_flags = MD_CONTEXT_X86_FULL |
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
|
||||
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
||||
- const struct _libc_fpstate* fpregs) {
|
||||
+ const struct _fpstate* fpregs) {
|
||||
const greg_t* regs = uc->uc_mcontext.gregs;
|
||||
|
||||
out->context_flags = MD_CONTEXT_AMD64_FULL;
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h 2018-06-15 09:47:20.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h 2018-09-07 23:36:32.049495285 +0200
|
||||
@@ -48,7 +48,7 @@
|
||||
#if defined(__aarch64__)
|
||||
typedef struct fpsimd_context fpstate_t;
|
||||
#elif !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
-typedef struct _libc_fpstate fpstate_t;
|
||||
+typedef struct _fpstate fpstate_t;
|
||||
#endif
|
||||
|
||||
// These entries store a list of memory regions that the client wants included
|
|
@ -0,0 +1,26 @@
|
|||
From 9001c54d6b974449174a8cee8f3f5d78a9bd6c9e Mon Sep 17 00:00:00 2001
|
||||
From: Felix Janda <felix.janda@posteo.de>
|
||||
Date: Sun, 1 Feb 2015 14:26:52 +0100
|
||||
Subject: [PATCH 3/6] include <sys/reg.h> to get __WORDSIZE on musl libc
|
||||
|
||||
---
|
||||
qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/common/linux/elf_core_dump.h b/src/common/linux/elf_core_dump.h
|
||||
index d03c7a8..02eb391 100644
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
|
||||
@@ -36,6 +36,9 @@
|
||||
#include <elf.h>
|
||||
#include <link.h>
|
||||
#include <stddef.h>
|
||||
+#ifndef __GLIBC__
|
||||
+#include <sys/reg.h>
|
||||
+#endif
|
||||
|
||||
#include "common/memory_range.h"
|
||||
|
||||
--
|
||||
2.0.5
|
||||
|
103
srcpkgs/qt5-webengine/patches/0003-musl-dispatch-to-musl.patch
Normal file
103
srcpkgs/qt5-webengine/patches/0003-musl-dispatch-to-musl.patch
Normal file
|
@ -0,0 +1,103 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc
|
||||
--- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc
|
||||
@@ -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.
|
||||
@@ -73,3 +74,92 @@ const AllocatorDispatch AllocatorDispatch::default_dispatch = {
|
||||
nullptr, /* free_definite_size_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)
|
||||
+{
|
||||
+ libc_malloc = (t_libc_malloc) dlsym(RTLD_NEXT, "malloc");
|
||||
+ libc_calloc = (t_libc_calloc) dlsym(RTLD_NEXT, "calloc");
|
||||
+ libc_realloc = (t_libc_realloc) dlsym(RTLD_NEXT, "realloc");
|
||||
+ libc_memalign = (t_libc_memalign) dlsym(RTLD_NEXT, "memalign");
|
||||
+ libc_free = (t_libc_free) dlsym(RTLD_NEXT, "free");
|
||||
+ libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(RTLD_NEXT, "malloc_usable_size");
|
||||
+}
|
||||
+} // 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
|
40
srcpkgs/qt5-webengine/patches/0004-musl-no-mallinfo.patch
Normal file
40
srcpkgs/qt5-webengine/patches/0004-musl-no-mallinfo.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
--- 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
|
||||
@@ -100,14 +100,14 @@
|
||||
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;
|
||||
#else
|
||||
return minfo.hblkhd + minfo.arena;
|
||||
#endif
|
||||
-#elif defined(OS_FUCHSIA)
|
||||
+#else //if defined(OS_FUCHSIA) // also musl doesn't do this.
|
||||
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
|
||||
return 0;
|
||||
#endif
|
||||
|
10
srcpkgs/qt5-webengine/patches/0005-musl-off_t.patch
Normal file
10
srcpkgs/qt5-webengine/patches/0005-musl-off_t.patch
Normal file
|
@ -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
|
||||
|
18
srcpkgs/qt5-webengine/patches/0006-musl-pread-pwrite.patch
Normal file
18
srcpkgs/qt5-webengine/patches/0006-musl-pread-pwrite.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h 2018-09-07 21:25:26.639964100 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h 2018-09-07 21:25:11.611964995 +0200
|
||||
@@ -1794,6 +1794,15 @@
|
||||
/* End of s390/s390x definitions */
|
||||
#endif
|
||||
|
||||
+#ifndef __GLIBC__
|
||||
+ /* For Musl libc pread/pread is the same as pread64/pwrite64 */
|
||||
+#ifndef __NR_pread
|
||||
+#define __NR_pread __NR_pread64
|
||||
+#endif
|
||||
+#ifndef __NR_pwrite
|
||||
+#define __NR_pwrite __NR_pwrite64
|
||||
+#endif
|
||||
+#endif /* ifndef __GLIBC__ */
|
||||
|
||||
/* After forking, we must make sure to only call system calls. */
|
||||
#if defined(__BOUNDED_POINTERS__)
|
|
@ -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) {
|
26
srcpkgs/qt5-webengine/patches/0008-musl-resolve.patch
Normal file
26
srcpkgs/qt5-webengine/patches/0008-musl-resolve.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- 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"
|
18
srcpkgs/qt5-webengine/patches/0009-musl-siginfo_t.patch
Normal file
18
srcpkgs/qt5-webengine/patches/0009-musl-siginfo_t.patch
Normal file
|
@ -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;
|
20
srcpkgs/qt5-webengine/patches/0010-musl-stackstart.patch
Normal file
20
srcpkgs/qt5-webengine/patches/0010-musl-stackstart.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc 2018-01-27 23:08:43.586475349 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc 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;
|
71
srcpkgs/qt5-webengine/patches/0011-musl-sandbox.patch
Normal file
71
srcpkgs/qt5-webengine/patches/0011-musl-sandbox.patch
Normal file
|
@ -0,0 +1,71 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2018-06-15 09:47:20.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2018-09-13 19:53:53.453780253 +0200
|
||||
@@ -129,7 +129,7 @@
|
||||
// CLONE_VM, nor CLONE_THREAD, which includes all fork() implementations.
|
||||
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
|
||||
const Arg<unsigned long> flags(0);
|
||||
-
|
||||
+#if defined(__GLIBC__)
|
||||
// TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
|
||||
const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
|
||||
CLONE_SIGHAND | CLONE_THREAD |
|
||||
@@ -148,6 +148,17 @@
|
||||
return If(IsAndroid() ? android_test : glibc_test, Allow())
|
||||
.ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
|
||||
.Else(CrashSIGSYSClone());
|
||||
+#else
|
||||
+ 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;
|
||||
+
|
||||
+ return If(thread_clone_ok, Allow())
|
||||
+ .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
|
||||
+ .Else(CrashSIGSYSClone());
|
||||
+#endif
|
||||
}
|
||||
|
||||
ResultExpr RestrictPrctl() {
|
||||
--- qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2018-06-15 09:47:20.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2018-09-13 19:56:31.779773940 +0200
|
||||
@@ -375,6 +375,9 @@
|
||||
#if defined(__i386__)
|
||||
case __NR_waitpid:
|
||||
#endif
|
||||
+#if !defined(__GLIBC__)
|
||||
+ case __NR_set_tid_address:
|
||||
+#endif
|
||||
return true;
|
||||
case __NR_clone: // Should be parameter-restricted.
|
||||
case __NR_setns: // Privileged.
|
||||
@@ -387,7 +390,9 @@
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
case __NR_set_thread_area:
|
||||
#endif
|
||||
+#if defined(__GLIBC__)
|
||||
case __NR_set_tid_address:
|
||||
+#endif
|
||||
case __NR_unshare:
|
||||
#if !defined(__mips__) && !defined(__aarch64__)
|
||||
case __NR_vfork:
|
||||
@@ -496,6 +501,9 @@
|
||||
case __NR_mlock:
|
||||
case __NR_munlock:
|
||||
case __NR_munmap:
|
||||
+#if !defined(__GLIBC__)
|
||||
+ case __NR_mremap:
|
||||
+#endif
|
||||
return true;
|
||||
case __NR_madvise:
|
||||
case __NR_mincore:
|
||||
@@ -511,7 +519,9 @@
|
||||
case __NR_modify_ldt:
|
||||
#endif
|
||||
case __NR_mprotect:
|
||||
+#if defined(__GLIBC__)
|
||||
case __NR_mremap:
|
||||
+#endif
|
||||
case __NR_msync:
|
||||
case __NR_munlockall:
|
||||
case __NR_readahead:
|
|
@ -0,0 +1,15 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/base/threading/platform_thread_linux.cc.orig 2018-09-19 18:05:15.523923703 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/threading/platform_thread_linux.cc 2018-09-19 18:08:05.150932454 +0200
|
||||
@@ -173,7 +173,12 @@
|
||||
|
||||
size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
|
||||
#if !defined(THREAD_SANITIZER)
|
||||
+#if defined(__GLIBC__)
|
||||
return 0;
|
||||
+#else // defined(__GLIBC__)
|
||||
+ // For Musl libc try with a default stack size of 2 MiB
|
||||
+ return 2 * 1024 * 1024;
|
||||
+#endif // !defined(__GLIBC__)
|
||||
#else
|
||||
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
|
||||
// default stack size isn't enough for some browser tests.
|
|
@ -0,0 +1,30 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc 2018-08-27 10:21:31.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc 2018-11-22 00:41:58.522477559 +0100
|
||||
@@ -38,7 +38,12 @@
|
||||
|
||||
#include "client/linux/minidump_writer/linux_ptrace_dumper.h"
|
||||
|
||||
+#if defined(__GLIBC__)
|
||||
#include <asm/ptrace.h>
|
||||
+#else
|
||||
+/* For arm*-musl this definition is missing */
|
||||
+#define ARM_sp uregs[13]
|
||||
+#endif
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc 2018-08-27 10:21:31.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc 2018-11-22 00:49:39.533492245 +0100
|
||||
@@ -32,7 +32,12 @@
|
||||
|
||||
#include "client/linux/minidump_writer/linux_core_dumper.h"
|
||||
|
||||
+#if defined(__GLIBC__)
|
||||
#include <asm/ptrace.h>
|
||||
+#else
|
||||
+/* For arm*-musl this definition is missing */
|
||||
+#define ARM_sp uregs[13]
|
||||
+#endif
|
||||
#include <assert.h>
|
||||
#include <elf.h>
|
||||
#include <stdio.h>
|
13
srcpkgs/qt5-webengine/patches/0015-yasm-nls.patch
Normal file
13
srcpkgs/qt5-webengine/patches/0015-yasm-nls.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h
|
||||
index 9e36539..f588083 100644
|
||||
--- qtwebengine/src/3rdparty/chromium//third_party/yasm/source/config/linux/config.h
|
||||
--- qtwebengine/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
|
94
srcpkgs/qt5-webengine/patches/0016-qt-musl-execinfo.patch
Normal file
94
srcpkgs/qt5-webengine/patches/0016-qt-musl-execinfo.patch
Normal file
|
@ -0,0 +1,94 @@
|
|||
--- qtwebengine/src/3rdparty/chromium//base/debug/stack_trace_posix.cc.orig 2019-04-09 09:31:16.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium//base/debug/stack_trace_posix.cc 2019-05-06 23:16:13.245502467 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
#if !defined(USE_SYMBOLIZE)
|
||||
#include <cxxabi.h>
|
||||
#endif
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
@@ -86,7 +86,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.
|
||||
@@ -121,7 +121,7 @@
|
||||
search_from = mangled_start + 2;
|
||||
}
|
||||
}
|
||||
-#endif // !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#endif // !defined(__GLIBC__) && !defined(_AIX)
|
||||
}
|
||||
#endif // !defined(USE_SYMBOLIZE)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
virtual ~BacktraceOutputHandler() = default;
|
||||
};
|
||||
|
||||
-#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.
|
||||
@@ -216,7 +216,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
|
||||
@@ -812,7 +812,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)
|
||||
// Though the backtrace API man page does not list any possible negative
|
||||
// return values, we take no chance.
|
||||
return base::saturated_cast<size_t>(backtrace(trace, count));
|
||||
@@ -825,13 +825,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_, prefix_string, &handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
|
||||
const char* prefix_string) const {
|
||||
StreamBacktraceOutputHandler handler(os);
|
||||
--- qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc 2019-04-09 09:31:16.000000000 +0200
|
||||
+++ - 2019-05-06 23:18:14.923566992 +0200
|
||||
@@ -233,7 +233,7 @@
|
||||
}
|
||||
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
|
||||
std::stringstream stream;
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
OutputToStreamWithPrefix(&stream, prefix_string);
|
||||
#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.
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc b/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
|
||||
index 02bf49b..05ee182 100644
|
||||
--- qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
|
||||
+++ qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
|
||||
@@ -13,7 +13,7 @@ namespace pp {
|
||||
namespace {
|
||||
|
||||
// Use 2MB default stack size for Native Client, otherwise use system default.
|
||||
-#if defined(__native_client__)
|
||||
+#if defined(__native_client__) || !defined(__GLIBC__)
|
||||
const size_t kDefaultStackSize = 2 * 1024 * 1024;
|
||||
#else
|
||||
const size_t kDefaultStackSize = 0;
|
||||
diff --git a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
|
||||
index cf7f3ec..e06a5ce 100644
|
||||
--- qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
|
||||
+++ qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
|
||||
@@ -761,7 +761,7 @@ void Thread::Start() {
|
||||
#if V8_OS_MACOSX
|
||||
// Default on Mac OS X is 512kB -- bump up to 1MB
|
||||
stack_size = 1 * 1024 * 1024;
|
||||
-#elif V8_OS_AIX
|
||||
+#elif V8_OS_AIX || !defined(__GLIBC__)
|
||||
// Default on AIX is 96kB -- bump up to 2MB
|
||||
stack_size = 2 * 1024 * 1024;
|
||||
#endif
|
60
srcpkgs/qt5-webengine/patches/0018-sandbox-membarrier.patch
Normal file
60
srcpkgs/qt5-webengine/patches/0018-sandbox-membarrier.patch
Normal file
|
@ -0,0 +1,60 @@
|
|||
--- qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/arm64_linux_syscalls.h
|
||||
+++ qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/arm64_linux_syscalls.h
|
||||
@@ -1063,4 +1063,8 @@
|
||||
#define __NR_memfd_create 279
|
||||
#endif
|
||||
|
||||
+#if !defined(__NR_membarrier)
|
||||
+#define __NR_membarrier 283
|
||||
+#endif
|
||||
+
|
||||
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
|
||||
|
||||
--- qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/arm_linux_syscalls.h
|
||||
+++ qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/arm_linux_syscalls.h
|
||||
@@ -1385,6 +1385,10 @@
|
||||
#define __NR_memfd_create (__NR_SYSCALL_BASE+385)
|
||||
#endif
|
||||
|
||||
+#if !defined(__NR_membarrier)
|
||||
+#define __NR_membarrier (__NR_SYSCALL_BASE+389)
|
||||
+#endif
|
||||
+
|
||||
// ARM private syscalls.
|
||||
#if !defined(__ARM_NR_BASE)
|
||||
#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
|
||||
|
||||
--- qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/x86_32_linux_syscalls.h
|
||||
+++ qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/x86_32_linux_syscalls.h
|
||||
@@ -1422,5 +1422,9 @@
|
||||
#define __NR_memfd_create 356
|
||||
#endif
|
||||
|
||||
+#if !defined(__NR_membarrier)
|
||||
+#define __NR_membarrier 375
|
||||
+#endif
|
||||
+
|
||||
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_
|
||||
|
||||
--- qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/x86_64_linux_syscalls.h
|
||||
+++ qtwebengine/src/3rdparty/chromium//sandbox/linux/system_headers/x86_64_linux_syscalls.h
|
||||
@@ -1290,5 +1290,9 @@
|
||||
#define __NR_memfd_create 319
|
||||
#endif
|
||||
|
||||
+#if !defined(__NR_membarrier)
|
||||
+#define __NR_membarrier 324
|
||||
+#endif
|
||||
+
|
||||
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_
|
||||
|
||||
--- qtwebengine/src/3rdparty/chromium//sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ qtwebengine/src/3rdparty/chromium//sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -370,6 +370,7 @@
|
||||
switch (sysno) {
|
||||
case __NR_exit:
|
||||
case __NR_exit_group:
|
||||
+ case __NR_membarrier:
|
||||
case __NR_wait4:
|
||||
case __NR_waitid:
|
||||
#if defined(__i386__)
|
24
srcpkgs/qt5-webengine/patches/0019-gn-cross-sysroot.patch
Normal file
24
srcpkgs/qt5-webengine/patches/0019-gn-cross-sysroot.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
There is no reason to run this script and running it fails on architectures
|
||||
chromium does not officially support (such as ppc64).
|
||||
|
||||
--- qtwebengine/src/3rdparty/chromium/build/config/posix/BUILD.gn
|
||||
+++ qtwebengine/src/3rdparty/chromium/build/config/posix/BUILD.gn
|
||||
@@ -102,12 +102,12 @@ config("runtime_library") {
|
||||
# when turning the sysroot on or off. (defines are passed via the command
|
||||
# line, and build system rebuilds things when their commandline
|
||||
# changes). Nothing should ever read this define.
|
||||
- sysroot_hash =
|
||||
- exec_script("//build/linux/sysroot_scripts/install-sysroot.py",
|
||||
- [ "--print-hash=$current_cpu" ],
|
||||
- "trim string",
|
||||
- [ "//build/linux/sysroot_scripts/sysroots.json" ])
|
||||
- defines += [ "CR_SYSROOT_HASH=$sysroot_hash" ]
|
||||
+ #sysroot_hash =
|
||||
+ # exec_script("//build/linux/sysroot_scripts/install-sysroot.py",
|
||||
+ # [ "--print-hash=$current_cpu" ],
|
||||
+ # "trim string",
|
||||
+ # [ "//build/linux/sysroot_scripts/sysroots.json" ])
|
||||
+ #defines += [ "CR_SYSROOT_HASH=$sysroot_hash" ]
|
||||
}
|
||||
asmflags += sysroot_flags
|
||||
|
14
srcpkgs/qt5-webengine/patches/0020-msgvec-push_back.patch
Normal file
14
srcpkgs/qt5-webengine/patches/0020-msgvec-push_back.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- qtwebengine-everywhere-src-5.14.0-beta2/src/3rdparty/chromium/net/socket/udp_socket_posix.cc 2019-10-08 08:27:43.000000000 +0200
|
||||
+++ - 2019-11-11 22:41:46.699068889 +0100
|
||||
@@ -1191,7 +1191,11 @@
|
||||
msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
|
||||
msgvec->reserve(buffers.size());
|
||||
for (size_t j = 0; j < buffers.size(); j++)
|
||||
+#if defined(__GLIBC__)
|
||||
msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
|
||||
+#else
|
||||
+ msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
|
||||
+#endif
|
||||
int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
|
||||
SendResult send_result(0, 0, std::move(buffers));
|
||||
if (result < 0) {
|
|
@ -0,0 +1,24 @@
|
|||
Allow SYS_sched_getparam and SYS_sched_getscheduler
|
||||
musl uses them for pthread_getschedparam()
|
||||
|
||||
source: https://git.alpinelinux.org/aports/commit/community/chromium?id=54af9f8ac24f52d382c5758e2445bf0206eff40e
|
||||
|
||||
--- a/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc 2019-10-08 08:27:43.000000000 +0200
|
||||
+++ - 2019-11-11 22:33:51.865153684 +0100
|
||||
@@ -88,10 +88,16 @@
|
||||
case __NR_sysinfo:
|
||||
case __NR_times:
|
||||
case __NR_uname:
|
||||
+#if !defined(__GLIBC__)
|
||||
+ case __NR_sched_getparam:
|
||||
+ case __NR_sched_getscheduler:
|
||||
+#endif
|
||||
return Allow();
|
||||
case __NR_sched_getaffinity:
|
||||
+#if defined(__GLIBC__)
|
||||
case __NR_sched_getparam:
|
||||
case __NR_sched_getscheduler:
|
||||
+#endif
|
||||
case __NR_sched_setscheduler:
|
||||
return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno);
|
||||
case __NR_prlimit64:
|
|
@ -0,0 +1,11 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/nasm/nasmlib/realpath.c 2019-09-23 14:24:20.000000000 +0200
|
||||
+++ - 2019-10-11 06:27:28.450329986 +0200
|
||||
@@ -57,7 +57,7 @@
|
||||
*/
|
||||
char *nasm_realpath(const char *rel_path)
|
||||
{
|
||||
- char *rp = canonicalize_file_name(rel_path);
|
||||
+ char *rp = realpath(rel_path, NULL);
|
||||
return rp ? rp : nasm_strdup(rel_path);
|
||||
}
|
||||
|
4048
srcpkgs/qt5-webengine/patches/0090-chromium-ppc64le.patch
Normal file
4048
srcpkgs/qt5-webengine/patches/0090-chromium-ppc64le.patch
Normal file
File diff suppressed because it is too large
Load diff
160
srcpkgs/qt5-webengine/template
Normal file
160
srcpkgs/qt5-webengine/template
Normal file
|
@ -0,0 +1,160 @@
|
|||
# Template file for 'qt5-webengine'
|
||||
pkgname=qt5-webengine
|
||||
version=5.14.2
|
||||
revision=1
|
||||
wrksrc="qtwebengine-everywhere-src-${version}"
|
||||
archs="x86_64* i686* armv[67]* ppc64* aarch64*"
|
||||
build_style=qmake
|
||||
configure_args="--
|
||||
-webengine-icu -webengine-ffmpeg -webengine-opus -webengine-webp
|
||||
-webengine-pepper-plugins -webengine-printing-and-pdf -webengine-proprietary-codecs
|
||||
-webengine-pulseaudio -webengine-spellchecker -webengine-webrtc -webengine-geolocation
|
||||
$(vopt_if snapshot '' '-no')-webengine-v8-snapshot -webengine-kerberos"
|
||||
# Rely on auto detection (fails if forced for cross builds) -webengine-alsa
|
||||
hostmakedepends="qt5-qmake gperf ninja qt5-host-tools flex pkg-config
|
||||
which perl python protobuf"
|
||||
makedepends="qt5-webchannel-devel qt5-location-devel qt5-tools-devel
|
||||
qt5-declarative-devel libevent-devel snappy-devel icu-devel ffmpeg-devel
|
||||
libwebp-devel opus-devel cups-devel nss-devel minizip-devel libxslt-devel
|
||||
libvpx-devel re2-devel libXtst-devel libXcursor-devel libXcomposite-devel
|
||||
jsoncpp-devel harfbuzz-devel lcms2-devel protobuf-devel pulseaudio-devel
|
||||
libXrandr-devel MesaLib-devel mit-krb5-devel"
|
||||
short_desc="Cross-platform application and UI framework (QT5) - WebEngine component"
|
||||
maintainer="John <johnz@posteo.net>"
|
||||
license="GPL-3.0-or-later, LGPL-3.0-or-later"
|
||||
homepage="https://qt.io/"
|
||||
distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebengine-everywhere-src-${version}.tar.xz"
|
||||
checksum=e169d6a75d8c397e04f843bc1b9585950fb9a001255cd18d6293f66fa8a6c947
|
||||
patch_args="-Np1"
|
||||
|
||||
build_options="snapshot"
|
||||
build_options_default="snapshot"
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" nss-devel libevent-devel qt5-location-devel
|
||||
qt5-declarative-devel"
|
||||
fi
|
||||
|
||||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||
makedepends+=" musl-legacy-compat"
|
||||
fi
|
||||
|
||||
if [ "$XBPS_LIBC" = "musl" ]; then
|
||||
hostmakedepends+=" musl-legacy-compat"
|
||||
fi
|
||||
|
||||
if [ "$XBPS_WORDSIZE" -eq 32 ]; then
|
||||
nodebug=yes # prevent OOM
|
||||
fi
|
||||
|
||||
if [ ! "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then
|
||||
broken="webengine can be built only if word size matches"
|
||||
fi
|
||||
|
||||
if [ "$XBPS_NO_ATOMIC8" ]; then
|
||||
hostmakedepends+=" libatomic-devel"
|
||||
fi
|
||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||
makedepends+=" libatomic-devel"
|
||||
fi
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv7l*) broken="ERROR at //skia/BUILD.gn:707:11: Undefined identifier.";;
|
||||
# configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
|
||||
armv6l*) broken="ERROR at //build/toolchain/gcc_toolchain.gni:102:3: Duplicate definition.";;
|
||||
esac
|
||||
|
||||
_bootstrap_gn() {
|
||||
# Bootstrap gn (generate ninja)
|
||||
echo "Bootstrapping 'gn'"
|
||||
cd ${wrksrc}/src/3rdparty/gn
|
||||
CFLAGS="$CFLAGS_host" CXXFLAGS="$CXXFLAGS_host" LDFLAGS="$LDFLAGS_host" \
|
||||
PKGCONFIG=/usr/bin/pkgconfig PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" \
|
||||
python2 build/gen.py --no-last-commit-position --out-path \
|
||||
${wrksrc}/src/3rdparty/gn/out/Release --cc "$CC_host" \
|
||||
--cxx "$CXX_host" --ld "$CXX_host" --ar "$AR_host"
|
||||
ninja -C out/Release gn
|
||||
cd ${wrksrc}
|
||||
}
|
||||
|
||||
_cleanup_wrksrc_leak() {
|
||||
if [ -d "${PKGDESTDIR}/usr/lib/cmake" ]; then
|
||||
# Replace references to ${wrksrc} in cmake files
|
||||
vsed -i ${PKGDESTDIR}/usr/lib/cmake/*/*.cmake \
|
||||
-e "s;${wrksrc}/host;/usr/lib/qt5;g" \
|
||||
-e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g"
|
||||
fi
|
||||
if [ -d "${PKGDESTDIR}/usr/lib/pkgconfig" ]; then
|
||||
# Replace references to ${wrksrc} in pkgconfig files
|
||||
vsed -i ${PKGDESTDIR}/usr/lib/pkgconfig/*.pc \
|
||||
-e "s;${wrksrc}/host;/usr/lib/qt5;g" \
|
||||
-e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g"
|
||||
fi
|
||||
# Remove QMAKE_PRL_BUILD_DIR from hint files for static libraries
|
||||
# and replace references to ${wrksrc}
|
||||
find ${PKGDESTDIR} -iname "*.prl" -exec sed -i "{}" \
|
||||
-e "/^QMAKE_PRL_BUILD_DIR/d" \
|
||||
-e "s;-L${wrksrc}/qtbase/lib;-L/usr/lib;g" \;
|
||||
# Replace ${wrksrc} in project include files
|
||||
find ${PKGDESTDIR} -iname "*.pri" -exec sed -i "{}" \
|
||||
-e "s;${wrksrc}/qtbase;/usr/lib/qt5;g" \;
|
||||
}
|
||||
|
||||
pre_configure() {
|
||||
export PATH=${PATH/\/builddir\/.xbps-qt5-webengine\/wrappers:/}
|
||||
cp ${FILESDIR}/resolv_compat.h ${wrksrc}/src/3rdparty/chromium/net/dns
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv5*|armv6*) # Disable "yield" assembler instruction
|
||||
vsed -i src/3rdparty/chromium/base/allocator/partition_allocator/spin_lock.cc \
|
||||
src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/spin_lock.cc \
|
||||
-e 's;"yield";"nop";'
|
||||
;;
|
||||
esac
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) export CXXFLAGS+=" -D_POSIX_THREAD_ATTR_STACKSIZE=2097152";;
|
||||
esac
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
mips*) # sgidefs.h is in /usr/include/asm
|
||||
for f in \
|
||||
qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h \
|
||||
qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/android/include/asm-mips/fpregdef.h \
|
||||
qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/android/include/asm-mips/regdef.h \
|
||||
qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/android/include/asm-mips/asm.h \
|
||||
qtwebengine/src/3rdparty/chromium/third_party/tcmalloc/vendor/src/base/linux_syscall_support.h \
|
||||
qtwebengine/src/3rdparty/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h \
|
||||
qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h; do
|
||||
vsed -i $f -e "s;<sgidefs.h>;<asm/sgidefs.h>;"
|
||||
done
|
||||
# Assume that RGBA order is correct for big endian CPUs
|
||||
vsed -i qtwebengine/src/3rdparty/chromium/skia/config/SkUserConfig.h \
|
||||
-e '/#error Read the comment at this location/d'
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
_bootstrap_gn
|
||||
fi
|
||||
}
|
||||
|
||||
pre_build() {
|
||||
export NINJAJOBS=${makejobs}
|
||||
}
|
||||
|
||||
qt5-webengine-devel_package() {
|
||||
depends="${sourcepkg}>=${version}_${revision}"
|
||||
short_desc+=" - development files"
|
||||
pkg_install() {
|
||||
vmove usr/include
|
||||
vmove usr/lib/cmake
|
||||
vmove usr/lib/pkgconfig
|
||||
vmove usr/lib/qt5/mkspecs
|
||||
#TODO: FIX!!!
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
vmove usr/lib/qt5/plugins/designer
|
||||
fi
|
||||
vmove "usr/lib/*.so"
|
||||
vmove "usr/lib/*.prl"
|
||||
vmove "usr/lib/*.la"
|
||||
_cleanup_wrksrc_leak
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue