diff --git a/srcpkgs/qt5/files/cross-gcc.patch b/srcpkgs/qt5/files/cross-gcc.patch new file mode 100644 index 00000000000..0992eba5edc --- /dev/null +++ b/srcpkgs/qt5/files/cross-gcc.patch @@ -0,0 +1,15 @@ +--- qtwebengine/tools/qmake/mkspecs/features/functions.prf 2016-05-26 20:01:25.000000000 +0200 ++++ qtwebengine/tools/qmake/mkspecs/features/functions.prf 2016-08-07 23:17:46.870626280 +0200 +@@ -63,11 +63,7 @@ + } + + defineTest(isGCCVersionSupported) { +- # The below will work for gcc 4.7 and up and also match gcc 5 +- greaterThan(QT_GCC_MINOR_VERSION, 6):return(true) +- greaterThan(QT_GCC_MAJOR_VERSION, 4):return(true) +- skipBuild("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.7 is required to build Qt WebEngine.") +- return(false) ++ return(true) + } + + defineTest(isQMLTestSupportApiEnabled) { diff --git a/srcpkgs/qt5/files/cross-ninja.patch b/srcpkgs/qt5/files/cross-ninja.patch new file mode 100644 index 00000000000..bc52789fd56 --- /dev/null +++ b/srcpkgs/qt5/files/cross-ninja.patch @@ -0,0 +1,39 @@ +--- qtwebengine/src/3rdparty/chromium/build/compiler_version.py 2016-05-26 14:58:54.000000000 +0200 ++++ qtwebengine/src/3rdparty/chromium/build/compiler_version.py 2016-08-08 20:46:31.311068824 +0200 +@@ -41,7 +41,9 @@ + """Look up an environment variable from a possible list of variable names.""" + for var in var_list: + if var in os.environ: +- return os.environ[var] ++ val = os.environ[var] ++ if val != "": ++ return val + return default + + +--- qtwebengine/src/3rdparty/ninja/configure.py 2016-05-26 14:58:54.000000000 +0200 ++++ qtwebengine/src/3rdparty/ninja/configure.py 2016-08-08 20:58:43.594054074 +0200 +@@ -245,6 +245,8 @@ + n.newline() + + CXX = configure_env.get('CXX', 'g++') ++if CXX == '': ++ CXX = 'g++' + objext = '.o' + if platform.is_msvc(): + CXX = 'cl' +@@ -270,9 +272,12 @@ + n.variable('builddir', 'build') + n.variable('cxx', CXX) + if platform.is_msvc(): +- n.variable('ar', 'link') ++ AR = 'link' + else: +- n.variable('ar', configure_env.get('AR', 'ar')) ++ AR = configure_env.get('AR', 'ar') ++ if AR == '': ++ AR = 'ar' ++n.variable('ar', AR) + + if platform.is_msvc(): + cflags = ['/showIncludes', diff --git a/srcpkgs/qt5/files/moc/moc.pro b/srcpkgs/qt5/files/moc/moc.pro new file mode 100644 index 00000000000..54425cfb462 --- /dev/null +++ b/srcpkgs/qt5/files/moc/moc.pro @@ -0,0 +1,8 @@ +QT += core-private +DEFINES += QT_MOC + +include(moc.pri) +HEADERS += qdatetime_p.h +SOURCES += main.cpp + +load(qt_tool) diff --git a/srcpkgs/qt5/files/musl-sandbox.patch b/srcpkgs/qt5/files/musl-sandbox.patch deleted file mode 100644 index 5c4674f3c02..00000000000 --- a/srcpkgs/qt5/files/musl-sandbox.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -@@ -114,23 +114,13 @@ - // CLONE_VM, nor CLONE_THREAD, which includes all fork() implementations. - ResultExpr RestrictCloneToThreadsAndEPERMFork() { - const Arg 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()); - } ---- ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.orig -+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -@@ -494,6 +494,7 @@ - case __NR_mlock: - case __NR_munlock: - case __NR_munmap: -+ case __NR_mremap: - return true; - case __NR_madvise: - case __NR_mincore: -@@ -509,7 +510,6 @@ - case __NR_modify_ldt: - #endif - case __NR_mprotect: -- case __NR_mremap: - case __NR_msync: - case __NR_munlockall: - case __NR_readahead: -diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index 80f02c0..21fbe21 100644 ---- sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -+++ 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: diff --git a/srcpkgs/qt5/files/qdbuscpp2xml/qdbuscpp2xml.pro b/srcpkgs/qt5/files/qdbuscpp2xml/qdbuscpp2xml.pro new file mode 100644 index 00000000000..7ca6d36bcb8 --- /dev/null +++ b/srcpkgs/qt5/files/qdbuscpp2xml/qdbuscpp2xml.pro @@ -0,0 +1,8 @@ +QT = core-private dbus-private +QMAKE_CXXFLAGS += $$QT_HOST_CFLAGS_DBUS + +include(../moc/moc.pri) + +SOURCES += qdbuscpp2xml.cpp + +load(qt_tool) diff --git a/srcpkgs/qt5/files/qdoc.pro b/srcpkgs/qt5/files/qdoc.pro deleted file mode 100644 index 41c51b1905e..00000000000 --- a/srcpkgs/qt5/files/qdoc.pro +++ /dev/null @@ -1,91 +0,0 @@ -QT = core qml network qmldevtools-private - -DEFINES += \ - QDOC2_COMPAT - -INCLUDEPATH += $$QT_SOURCE_TREE/src/tools/qdoc \ - $$QT_SOURCE_TREE/src/tools/qdoc/qmlparser - -# Increase the stack size on MSVC to 4M to avoid a stack overflow -win32-msvc*:{ - QMAKE_LFLAGS += /STACK:4194304 -} - -HEADERS += atom.h \ - codechunk.h \ - codemarker.h \ - codeparser.h \ - config.h \ - cppcodemarker.h \ - cppcodeparser.h \ - doc.h \ - editdistance.h \ - generator.h \ - helpprojectwriter.h \ - htmlgenerator.h \ - location.h \ - node.h \ - openedlist.h \ - plaincodemarker.h \ - puredocparser.h \ - qdocdatabase.h \ - qdoctagfiles.h \ - qdocindexfiles.h \ - quoter.h \ - separator.h \ - text.h \ - tokenizer.h \ - tree.h -SOURCES += atom.cpp \ - codechunk.cpp \ - codemarker.cpp \ - codeparser.cpp \ - config.cpp \ - cppcodemarker.cpp \ - cppcodeparser.cpp \ - doc.cpp \ - editdistance.cpp \ - generator.cpp \ - helpprojectwriter.cpp \ - htmlgenerator.cpp \ - location.cpp \ - main.cpp \ - node.cpp \ - openedlist.cpp \ - plaincodemarker.cpp \ - puredocparser.cpp \ - qdocdatabase.cpp \ - qdoctagfiles.cpp \ - qdocindexfiles.cpp \ - quoter.cpp \ - separator.cpp \ - text.cpp \ - tokenizer.cpp \ - tree.cpp \ - yyindent.cpp - -### QML/JS Parser ### - -HEADERS += jscodemarker.h \ - qmlcodemarker.h \ - qmlcodeparser.h \ - qmlmarkupvisitor.h \ - qmlvisitor.h - -SOURCES += jscodemarker.cpp \ - qmlcodemarker.cpp \ - qmlcodeparser.cpp \ - qmlmarkupvisitor.cpp \ - qmlvisitor.cpp - -### Documentation for qdoc ### - -qtPrepareTool(QDOC, qdoc) -qtPrepareTool(QHELPGENERATOR, qhelpgenerator) - -QMAKE_DOCS = $$PWD/doc/config/qdoc.qdocconf - -QMAKE_TARGET_DESCRIPTION = "Qt Documentation Compiler" -load(qt_tool) - -TR_EXCLUDE += $$PWD/* diff --git a/srcpkgs/qt5/files/qlalr/qlalr.pro b/srcpkgs/qt5/files/qlalr/qlalr.pro new file mode 100644 index 00000000000..3d776727fef --- /dev/null +++ b/srcpkgs/qt5/files/qlalr/qlalr.pro @@ -0,0 +1,23 @@ +SOURCES += \ + compress.cpp \ + cppgenerator.cpp \ + dotgraph.cpp \ + lalr.cpp \ + main.cpp \ + parsetable.cpp \ + recognizer.cpp \ + grammar.cpp + +HEADERS += \ + compress.h \ + cppgenerator.h \ + dotgraph.h \ + lalr.h \ + parsetable.h \ + recognizer.h \ + grammar_p.h + +OTHER_FILES += \ + lalr.g + +load(qt_tool) diff --git a/srcpkgs/qt5/files/rcc/rcc.pro b/srcpkgs/qt5/files/rcc/rcc.pro new file mode 100644 index 00000000000..581cd4564f6 --- /dev/null +++ b/srcpkgs/qt5/files/rcc/rcc.pro @@ -0,0 +1,6 @@ +DEFINES += QT_RCC + +include(rcc.pri) +SOURCES += main.cpp + +load(qt_tool) diff --git a/srcpkgs/qt5/files/uic/uic.pro b/srcpkgs/qt5/files/uic/uic.pro new file mode 100644 index 00000000000..c78b123759f --- /dev/null +++ b/srcpkgs/qt5/files/uic/uic.pro @@ -0,0 +1,11 @@ +DEFINES += QT_UIC + +include(uic.pri) +include(cpp/cpp.pri) + +HEADERS += uic.h + +SOURCES += main.cpp \ + uic.cpp + +load(qt_tool) diff --git a/srcpkgs/qt5/patches/0001-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch b/srcpkgs/qt5/patches/0001-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch new file mode 100644 index 00000000000..4f23a22f450 --- /dev/null +++ b/srcpkgs/qt5/patches/0001-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch @@ -0,0 +1,35 @@ +From 1ac282ad3a859077cbff8bf4773db9bb5b6a5bbd Mon Sep 17 00:00:00 2001 +From: Felix Janda +Date: Sun, 1 Feb 2015 13:41:08 +0100 +Subject: [PATCH 1/6] Fix conflict between musl libc and lss + +Include late to avoid the macro getdents64 in musl +libc's to conflict with linux_sycall_support.h. +--- + qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/crash_generation/crash_generation_server.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc +index 860e8bc..f0aa801 100644 +--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/crash_generation/crash_generation_server.cc ++++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/crash_generation/crash_generation_server.cc +@@ -28,7 +28,6 @@ + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #include +-#include + #include + #include + #include +@@ -49,6 +48,8 @@ + #include "common/linux/guid_creator.h" + #include "common/linux/safe_readlink.h" + ++#include ++ + static const char kCommandQuit = 'x'; + + namespace google_breakpad { +-- +2.0.5 + diff --git a/srcpkgs/qt5/patches/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch b/srcpkgs/qt5/patches/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch new file mode 100644 index 00000000000..3e787d1374e --- /dev/null +++ b/srcpkgs/qt5/patches/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch @@ -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 diff --git a/srcpkgs/qt5/patches/0003-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch b/srcpkgs/qt5/patches/0003-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch new file mode 100644 index 00000000000..da4160b21bd --- /dev/null +++ b/srcpkgs/qt5/patches/0003-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch @@ -0,0 +1,26 @@ +From 9001c54d6b974449174a8cee8f3f5d78a9bd6c9e Mon Sep 17 00:00:00 2001 +From: Felix Janda +Date: Sun, 1 Feb 2015 14:26:52 +0100 +Subject: [PATCH 3/6] include 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 + #include + #include ++#ifndef __GLIBC__ ++#include ++#endif + + #include "common/memory_range.h" + +-- +2.0.5 + diff --git a/srcpkgs/qt5/patches/qt-musl-dispatch_to_musl.patch b/srcpkgs/qt5/patches/0004-musl-dispatch-to-musl.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-dispatch_to_musl.patch rename to srcpkgs/qt5/patches/0004-musl-dispatch-to-musl.patch diff --git a/srcpkgs/qt5/patches/qt-musl-execinfo.patch b/srcpkgs/qt5/patches/0005-musl-no-execinfo.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-execinfo.patch rename to srcpkgs/qt5/patches/0005-musl-no-execinfo.patch diff --git a/srcpkgs/qt5/patches/0006-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch b/srcpkgs/qt5/patches/0006-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch new file mode 100644 index 00000000000..5491d6440e1 --- /dev/null +++ b/srcpkgs/qt5/patches/0006-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch @@ -0,0 +1,81 @@ +From 7e0a2a72d16c11699558054c01a2082517f7dac1 Mon Sep 17 00:00:00 2001 +From: Felix Janda +Date: Sun, 1 Feb 2015 14:40:41 +0100 +Subject: [PATCH 6/6] is a nonportable alias for + +--- + qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc | 2 +- + qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/android/include/sys/signal.h | 35 --------------------------- + qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/common.gyp | 1 - + 3 files changed, 1 insertion(+), 37 deletions(-) + delete mode 100644 src/common/android/include/sys/signal.h + +diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc +index 3e2d196..cc3b1d3 100644 +--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc ++++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +@@ -78,7 +78,7 @@ + #include + #include + +-#include ++#include + #include + #include + #include +diff --git a/src/common/android/include/sys/signal.h b/src/common/android/include/sys/signal.h +deleted file mode 100644 +index 20c81e9..0000000 +--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/android/include/sys/signal.h ++++ /dev/null +@@ -1,35 +0,0 @@ +-// Copyright (c) 2012, Google Inc. +-// All rights reserved. +-// +-// Redistribution and use in source and binary forms, with or without +-// modification, are permitted provided that the following conditions are +-// met: +-// +-// * Redistributions of source code must retain the above copyright +-// notice, this list of conditions and the following disclaimer. +-// * Redistributions in binary form must reproduce the above +-// copyright notice, this list of conditions and the following disclaimer +-// in the documentation and/or other materials provided with the +-// distribution. +-// * Neither the name of Google Inc. nor the names of its +-// contributors may be used to endorse or promote products derived from +-// this software without specific prior written permission. +-// +-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- +-#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H +-#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H +- +-#include +- +-#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H +diff --git a/src/common/common.gyp b/src/common/common.gyp +index c49ff85..1a6b1ae 100644 +--- qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/common.gyp ++++ qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/common.gyp +@@ -47,7 +47,6 @@ + 'android/include/link.h', + 'android/include/sgidefs.h', + 'android/include/sys/procfs.h', +- 'android/include/sys/signal.h', + 'android/include/sys/user.h', + 'android/include/ucontext.h', + 'android/testing/include/wchar.h', +-- +2.0.5 + diff --git a/srcpkgs/qt5/patches/qt-musl-iconv-no-bom.patch b/srcpkgs/qt5/patches/0007-musl-iconv-no-bom.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-iconv-no-bom.patch rename to srcpkgs/qt5/patches/0007-musl-iconv-no-bom.patch diff --git a/srcpkgs/qt5/patches/qt-musl-mallinfo.patch b/srcpkgs/qt5/patches/0008-musl-no-mallinfo.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-mallinfo.patch rename to srcpkgs/qt5/patches/0008-musl-no-mallinfo.patch diff --git a/srcpkgs/qt5/patches/qt-musl-off_t.patch b/srcpkgs/qt5/patches/0009-musl-off_t.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-off_t.patch rename to srcpkgs/qt5/patches/0009-musl-off_t.patch diff --git a/srcpkgs/qt5/patches/0010-musl-pread-pwrite.patch b/srcpkgs/qt5/patches/0010-musl-pread-pwrite.patch new file mode 100644 index 00000000000..00017bba017 --- /dev/null +++ b/srcpkgs/qt5/patches/0010-musl-pread-pwrite.patch @@ -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__) diff --git a/srcpkgs/qt5/patches/qt-musl-pvalloc.patch b/srcpkgs/qt5/patches/0011-musl-replace-pvalloc.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-pvalloc.patch rename to srcpkgs/qt5/patches/0011-musl-replace-pvalloc.patch diff --git a/srcpkgs/qt5/patches/qt-musl-resolve.patch b/srcpkgs/qt5/patches/0012-musl-resolve.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-resolve.patch rename to srcpkgs/qt5/patches/0012-musl-resolve.patch diff --git a/srcpkgs/qt5/patches/qt-musl-serialio.patch b/srcpkgs/qt5/patches/0013-musl-serialio.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-serialio.patch rename to srcpkgs/qt5/patches/0013-musl-serialio.patch diff --git a/srcpkgs/qt5/patches/qt-musl-set_thread_name_np.patch b/srcpkgs/qt5/patches/0014-musl-set_thread_name_np.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-set_thread_name_np.patch rename to srcpkgs/qt5/patches/0014-musl-set_thread_name_np.patch diff --git a/srcpkgs/qt5/patches/qt-musl-siginfo_t.patch b/srcpkgs/qt5/patches/0015-musl-siginfo_t.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-siginfo_t.patch rename to srcpkgs/qt5/patches/0015-musl-siginfo_t.patch diff --git a/srcpkgs/qt5/patches/qt-musl-stackbottom.patch b/srcpkgs/qt5/patches/0016-musl-stackbottom.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-stackbottom.patch rename to srcpkgs/qt5/patches/0016-musl-stackbottom.patch diff --git a/srcpkgs/qt5/patches/qt-musl-stackstart.patch b/srcpkgs/qt5/patches/0017-musl-stackstart.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-stackstart.patch rename to srcpkgs/qt5/patches/0017-musl-stackstart.patch diff --git a/srcpkgs/qt5/patches/qt-musl-timeval.patch b/srcpkgs/qt5/patches/0018-musl-timeval.patch similarity index 100% rename from srcpkgs/qt5/patches/qt-musl-timeval.patch rename to srcpkgs/qt5/patches/0018-musl-timeval.patch diff --git a/srcpkgs/qt5/patches/0019-musl-v8-thread-stacksize.patch b/srcpkgs/qt5/patches/0019-musl-v8-thread-stacksize.patch new file mode 100644 index 00000000000..d800d2b3ec6 --- /dev/null +++ b/srcpkgs/qt5/patches/0019-musl-v8-thread-stacksize.patch @@ -0,0 +1,32 @@ +--- qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc.orig 2018-09-19 13:42:22.591109990 +0200 ++++ qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc 2018-09-19 13:43:38.538113908 +0200 +@@ -12,11 +12,15 @@ + + namespace { + +-// Use 2MB default stack size for Native Client, otherwise use system default. + #if defined(__native_client__) ++// Use 2MB default stack size for Native Client + const size_t kDefaultStackSize = 2 * 1024 * 1024; +-#else ++#elif defined(__GLIBC__) ++// Use system default for Gnu libc + const size_t kDefaultStackSize = 0; ++#else ++// Use 2MB default stack size for Musl libc ++const size_t kDefaultStackSize = 2 * 1024 * 1024; + #endif + + +--- qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig 2018-09-23 17:42:44.130455819 +0200 ++++ qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc 2018-09-23 17:43:35.195452776 +0200 +@@ -732,6 +732,9 @@ + // Default on AIX is 96kB -- bump up to 2MB + stack_size = 2 * 1024 * 1024; + #endif ++#if !defined(__GLIBC__) ++ stack_size = 2 * 1024 * 1024; ++#endif + } + if (stack_size > 0) { + result = pthread_attr_setstacksize(&attr, stack_size); diff --git a/srcpkgs/qt5/patches/0020-musl-sandbox.patch b/srcpkgs/qt5/patches/0020-musl-sandbox.patch new file mode 100644 index 00000000000..d3de1e41183 --- /dev/null +++ b/srcpkgs/qt5/patches/0020-musl-sandbox.patch @@ -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 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: diff --git a/srcpkgs/qt5/patches/gcc8-chromium-mojo.patch b/srcpkgs/qt5/patches/0021-chromium-mojo-gcc8.patch similarity index 100% rename from srcpkgs/qt5/patches/gcc8-chromium-mojo.patch rename to srcpkgs/qt5/patches/0021-chromium-mojo-gcc8.patch diff --git a/srcpkgs/qt5/patches/0022-libressl-compat.patch b/srcpkgs/qt5/patches/0022-libressl-compat.patch new file mode 100644 index 00000000000..277cc60858f --- /dev/null +++ b/srcpkgs/qt5/patches/0022-libressl-compat.patch @@ -0,0 +1,52 @@ +--- qtbase/config.tests/unix/openssl11/openssl.cpp 2017-11-05 16:07:40.963385070 -0500 ++++ qtbase/config.tests/unix/openssl11/openssl.cpp 2017-11-05 16:07:51.755255545 -0500 +@@ -39,7 +39,7 @@ + + #include + +-#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L ++#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + # error "OpenSSL >= 1.1 is required" + #endif + + +diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp +index 41b759364b..17ce5b4b30 100644 +--- qtbase/src/network/ssl/qsslcontext_openssl.cpp ++++ qtbase/src/network/ssl/qsslcontext_openssl.cpp +@@ -248,7 +248,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext) + if (sslContext->sslConfiguration.backendConfiguration().isEmpty()) + return; + +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) + if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) { + QSharedPointer cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free); + if (cctx) { + +diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp +index 82ff5e9e3a..77e5d03b7d 100644 +--- qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp ++++ qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp +@@ -402,7 +402,7 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return - + DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return) + DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return) + DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return 0, return) +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) + DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return 0, return); + DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return); + DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return); +diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h +index 4fb8f26cf6..3a7de93113 100644 +--- qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h ++++ qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h +@@ -352,7 +352,7 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b); + int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b); + int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c); + X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a); +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) + SSL_CONF_CTX *q_SSL_CONF_CTX_new(); + void q_SSL_CONF_CTX_free(SSL_CONF_CTX *a); + void q_SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *a, SSL_CTX *b); diff --git a/srcpkgs/qt5/patches/0023-enable_tools-cross.patch b/srcpkgs/qt5/patches/0023-enable_tools-cross.patch new file mode 100644 index 00000000000..81092c77b41 --- /dev/null +++ b/srcpkgs/qt5/patches/0023-enable_tools-cross.patch @@ -0,0 +1,37 @@ +--- qttools/src/src.pro 2018-06-09 13:10:38.000000000 +0200 ++++ qttools/src/src.pro 2018-08-19 09:34:29.803670205 +0200 +@@ -1,16 +1,10 @@ + TEMPLATE = subdirs + +-qtHaveModule(widgets) { +- no-png { +- message("Some graphics-related tools are unavailable without PNG support") +- } else { +- SUBDIRS = assistant \ +- pixeltool \ +- designer ++SUBDIRS = assistant \ ++ pixeltool \ ++ designer + +- linguist.depends = designer +- } +-} ++linguist.depends = designer + + SUBDIRS += linguist \ + qtattributionsscanner +@@ -31,11 +25,11 @@ + SUBDIRS += androiddeployqt + } + +-qtHaveModule(dbus): SUBDIRS += qdbus ++SUBDIRS += qdbus + + win32|winrt:SUBDIRS += windeployqt + winrt:SUBDIRS += winrtrunner +-qtHaveModule(gui):!android:!uikit:!qnx:!winrt: SUBDIRS += qtdiag ++SUBDIRS += qtdiag + + qtNomakeTools( \ + pixeltool \ diff --git a/srcpkgs/qt5/patches/0024-musl-mesa-gallium-thread-stacksize.patch b/srcpkgs/qt5/patches/0024-musl-mesa-gallium-thread-stacksize.patch new file mode 100644 index 00000000000..f259a95b6ee --- /dev/null +++ b/srcpkgs/qt5/patches/0024-musl-mesa-gallium-thread-stacksize.patch @@ -0,0 +1,20 @@ +--- qtwebengine/src/3rdparty/chromium/third_party/mesa/src/src/gallium/auxiliary/os/os_thread.h.orig 2018-09-19 17:15:54.558770949 +0200 ++++ qtwebengine/src/3rdparty/chromium/third_party/mesa/src/src/gallium/auxiliary/os/os_thread.h 2018-09-19 17:22:16.914790675 +0200 +@@ -62,6 +62,16 @@ + + sigfillset(&new_set); + pthread_sigmask(SIG_SETMASK, &new_set, &saved_set); ++ ++ pthread_attr_t attr; ++ pthread_attr_init(&attr); ++#if !defined(__GLIBC__) ++ /* For Musl libc set a thread stack size of 2 MiB */ ++ ret = pthread_attr_setstacksize(&attr, 2 * 1024 * 1024); ++ if (ret) ++ return 0; ++#endif ++ +- ret = pthread_create( &thread, NULL, routine, param ); ++ ret = pthread_create( &thread, &attr, routine, param ); + pthread_sigmask(SIG_SETMASK, &saved_set, NULL); + if (ret) diff --git a/srcpkgs/qt5/patches/0025-musl-chromium-default-stacksize.patch b/srcpkgs/qt5/patches/0025-musl-chromium-default-stacksize.patch new file mode 100644 index 00000000000..7bf5a22fba7 --- /dev/null +++ b/srcpkgs/qt5/patches/0025-musl-chromium-default-stacksize.patch @@ -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. diff --git a/srcpkgs/qt5/patches/0026-data_pack-be.patch b/srcpkgs/qt5/patches/0026-data_pack-be.patch new file mode 100644 index 00000000000..c113ddb6566 --- /dev/null +++ b/srcpkgs/qt5/patches/0026-data_pack-be.patch @@ -0,0 +1,15 @@ +--- qtwebengine/src/3rdparty/chromium/ui/base/resource/data_pack.cc.orig 2018-09-11 14:16:53.104897379 +0200 ++++ qtwebengine/src/3rdparty/chromium/ui/base/resource/data_pack.cc 2018-09-11 14:17:12.009896253 +0200 +@@ -383,12 +383,6 @@ + + bool DataPack::GetStringPiece(uint16_t resource_id, + base::StringPiece* data) const { +- // It won't be hard to make this endian-agnostic, but it's not worth +- // bothering to do right now. +-#if !defined(ARCH_CPU_LITTLE_ENDIAN) +-#error "datapack assumes little endian" +-#endif +- + const Entry* target = LookupEntryById(resource_id); + if (!target) + return false; diff --git a/srcpkgs/qt5/patches/0027-skia_cpu-be.patch b/srcpkgs/qt5/patches/0027-skia_cpu-be.patch new file mode 100644 index 00000000000..9352f190a3b --- /dev/null +++ b/srcpkgs/qt5/patches/0027-skia_cpu-be.patch @@ -0,0 +1,12 @@ +--- qtwebengine/src/3rdparty/chromium/third_party/skia/include/gpu/GrTypes.h.orig 2018-09-11 14:37:56.832822055 +0200 ++++ qtwebengine/src/3rdparty/chromium/third_party/skia/include/gpu/GrTypes.h 2018-09-11 14:38:11.464821183 +0200 +@@ -348,9 +348,6 @@ + static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; + + // Aliases for pixel configs that match skia's byte order. +-#ifndef SK_CPU_LENDIAN +- #error "Skia gpu currently assumes little endian" +-#endif + #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) + static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; + #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) diff --git a/srcpkgs/qt5/patches/0028-webrtc-be.patch b/srcpkgs/qt5/patches/0028-webrtc-be.patch new file mode 100644 index 00000000000..c71c65c926b --- /dev/null +++ b/srcpkgs/qt5/patches/0028-webrtc-be.patch @@ -0,0 +1,12 @@ +--- qtwebengine/src/3rdparty/chromium/third_party/webrtc/typedefs.h 2018-06-15 09:47:20.000000000 +0200 ++++ qtwebengine/src/3rdparty/chromium/third_party/webrtc/typedefs.h 2018-09-14 17:50:45.198153942 +0200 +@@ -47,6 +47,9 @@ + #elif defined(__pnacl__) + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN ++#elif defined(__MIPSEB__) ++#define WEBRTC_ARCH_MIPS_FAMILY ++#define WEBRTC_ARCH_BIG_ENDIAN + #else + #error Please add support for your architecture in typedefs.h + #endif diff --git a/srcpkgs/qt5/patches/qt-musl-libevent.patch b/srcpkgs/qt5/patches/0029-musl-libevent.patch similarity index 98% rename from srcpkgs/qt5/patches/qt-musl-libevent.patch rename to srcpkgs/qt5/patches/0029-musl-libevent.patch index 3bb4baba890..62265b63994 100644 --- a/srcpkgs/qt5/patches/qt-musl-libevent.patch +++ b/srcpkgs/qt5/patches/0029-musl-libevent.patch @@ -15,7 +15,7 @@ is_win = sys.platform.startswith('win') is_linux = sys.platform.startswith('linux') -+is_gnu_linux = is_linux and os.path.exists('/lib/libc.so.6') ++is_gnu_linux = is_linux and platform.libc_ver()[0].startswith('glibc') is_mac = sys.platform.startswith('darwin') is_aix = sys.platform.startswith('aix') is_posix = is_linux or is_mac or is_aix diff --git a/srcpkgs/qt5/patches/0030-qtscript-fastmalloc-stacksize.patch b/srcpkgs/qt5/patches/0030-qtscript-fastmalloc-stacksize.patch new file mode 100644 index 00000000000..78a72e9c236 --- /dev/null +++ b/srcpkgs/qt5/patches/0030-qtscript-fastmalloc-stacksize.patch @@ -0,0 +1,16 @@ +--- qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp 2018-10-07 21:25:14.377211462 +0200 ++++ qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp 2018-10-07 21:26:13.987214537 +0200 +@@ -1456,7 +1456,12 @@ + pthread_cond_init(&m_scavengeCondition, 0); + m_scavengeThreadActive = true; + pthread_t thread; ++ pthread_attr_t attr; ++ pthread_attr_init(&attr); ++#if !defined(__GLIBC__) ++ pthread_attr_setstacksize(&attr, 2 * 1024 * 1024); ++#endif +- pthread_create(&thread, 0, runScavengerThread, this); ++ pthread_create(&thread, &attr, runScavengerThread, this); + } + + void* TCMalloc_PageHeap::runScavengerThread(void* context) diff --git a/srcpkgs/qt5/patches/0031-qtscript-threading-stacksize.patch b/srcpkgs/qt5/patches/0031-qtscript-threading-stacksize.patch new file mode 100644 index 00000000000..dab5e2b35cd --- /dev/null +++ b/srcpkgs/qt5/patches/0031-qtscript-threading-stacksize.patch @@ -0,0 +1,31 @@ +--- qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/ThreadingPthreads.cpp.orig 2018-10-07 21:27:22.340218063 +0200 ++++ qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/ThreadingPthreads.cpp 2018-10-07 21:29:30.743224688 +0200 +@@ -168,8 +168,12 @@ + ThreadData* threadData = new ThreadData(); + threadData->entryPoint = entryPoint; + threadData->arg = data; +- +- if (pthread_create(&threadHandle, 0, runThreadWithRegistration, static_cast(threadData))) { ++ pthread_attr_t attr; ++ pthread_attr_init(&attr); ++#if !defined(__GLIBC__) ++ pthread_attr_setstacksize(&attr, 2 * 1024 * 1024); ++#endif ++ if (pthread_create(&threadHandle, &attr, runThreadWithRegistration, static_cast(threadData))) { + LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data); + delete threadData; + return 0; +@@ -180,7 +184,12 @@ + ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*) + { + pthread_t threadHandle; +- if (pthread_create(&threadHandle, 0, entryPoint, data)) { ++ pthread_attr_t attr; ++ pthread_attr_init(&attr); ++#if !defined(__GLIBC__) ++ pthread_attr_setstacksize(&attr, 2 * 1024 * 1024); ++#endif ++ if (pthread_create(&threadHandle, &attr, entryPoint, data)) { + LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data); + return 0; + } diff --git a/srcpkgs/qt5/patches/arm-void-is-not-android.patch b/srcpkgs/qt5/patches/arm-void-is-not-android.patch deleted file mode 100644 index 6ae86dde371..00000000000 --- a/srcpkgs/qt5/patches/arm-void-is-not-android.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- 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/srcpkgs/qt5/patches/hack-compiler_version_echo.patch b/srcpkgs/qt5/patches/hack-compiler_version_echo.patch deleted file mode 100644 index e7e2fe17c9a..00000000000 --- a/srcpkgs/qt5/patches/hack-compiler_version_echo.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- qtwebengine/src/3rdparty/chromium/build/compiler_version.py 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine/src/3rdparty/chromium/build/compiler_version.py 2016-12-21 17:11:17.027999078 +0100 -@@ -116,6 +116,9 @@ - if mode == 'host': - environments = ['CXX_host'] + environments; - compiler = GetEnvironFallback(environments, 'c++') -+ # Hack: remove leading "@echo compiling xyz && " from compiler string -+ if compiler.startswith("@echo"): -+ compiler = compiler[compiler.find("&&")+3:] - - if compiler: - compiler_version = GetVersion(compiler, tool) diff --git a/srcpkgs/qt5/patches/libressl-disable-1.1-APIs.patch b/srcpkgs/qt5/patches/libressl-disable-1.1-APIs.patch deleted file mode 100644 index ef2120b9c96..00000000000 --- a/srcpkgs/qt5/patches/libressl-disable-1.1-APIs.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- ./qtbase/config.tests/unix/openssl11/openssl.cpp.orig 2018-04-24 09:59:45.918038335 +0200 -+++ ./qtbase/config.tests/unix/openssl11/openssl.cpp 2018-04-24 10:01:21.255182441 +0200 -@@ -42,6 +42,9 @@ - #if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L - # error "OpenSSL >= 1.1 is required" - #endif -+#ifdef LIBRESSL_VERSION_NUMBER -+# error "LibreSSL does not support all used OpenSSL-1.1 APIs yet." -+#endif - - int main() - { ---- ./qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h.orig 2018-04-24 10:40:49.121761681 +0200 -+++ ./qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h 2018-04-24 10:41:43.082843248 +0200 -@@ -232,7 +232,7 @@ BIO *q_BIO_new_mem_buf(void *a, int b); - int q_BIO_read(BIO *a, void *b, int c); - Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c); - int q_BN_num_bits(const BIGNUM *a); --#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) - int q_BN_is_word(BIGNUM *a, BN_ULONG w); - #else - // BN_is_word is implemented purely as a diff --git a/srcpkgs/qt5/patches/no-linux_stat_h.patch b/srcpkgs/qt5/patches/no-linux_stat_h.patch deleted file mode 100644 index ec9d2423600..00000000000 --- a/srcpkgs/qt5/patches/no-linux_stat_h.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- qtbase/src/corelib/io/qfilesystemengine_unix.cpp.orig 2018-11-11 14:00:30.431950676 +0100 -+++ qtbase/src/corelib/io/qfilesystemengine_unix.cpp 2018-11-11 14:02:57.134958244 +0100 -@@ -104,11 +104,6 @@ - # endif - # endif - --# if !QT_CONFIG(statx) && defined(SYS_statx) && QT_HAS_INCLUDE() --# include --static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf) --{ return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); } --# endif - #endif - - #ifndef STATX_BASIC_STATS diff --git a/srcpkgs/qt5/patches/qt-cross-enable_tools.patch b/srcpkgs/qt5/patches/qt-cross-enable_tools.patch deleted file mode 100644 index 1388c764a52..00000000000 --- a/srcpkgs/qt5/patches/qt-cross-enable_tools.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- qttools/src/src.pro 2017-01-02 07:50:13.000000000 +0100 -+++ qttools/src/src.pro 2017-12-21 12:27:33.414867228 +0100 -@@ -1,20 +1,13 @@ - TEMPLATE = subdirs - --qtHaveModule(widgets) { -- no-png { -- message("Some graphics-related tools are unavailable without PNG support") -- } else { -- SUBDIRS = assistant \ -- pixeltool \ -- designer -+SUBDIRS = assistant \ -+ pixeltool \ -+ designer \ -+ linguist \ -+ qdoc \ -+ qtattributionsscanner - -- linguist.depends = designer -- } --} -- --SUBDIRS += linguist \ -- qdoc \ -- qtattributionsscanner -+linguist.depends = designer - - !android|android_app: SUBDIRS += qtplugininfo - diff --git a/srcpkgs/qt5/patches/qtwebengine-ffmpeg4.patch b/srcpkgs/qt5/patches/qtwebengine-ffmpeg4.patch deleted file mode 100644 index 868b7bdb1af..00000000000 --- a/srcpkgs/qt5/patches/qtwebengine-ffmpeg4.patch +++ /dev/null @@ -1,86 +0,0 @@ -source: https://git.archlinux.org/svntogit/packages.git/plain/trunk/qtwebengine-ffmpeg4.patch?h=packages/qt5-webengine&id=421103a8798335f7788498e56b5eef3f33ecba26 - ---- qtwebengine/src/3rdparty/chromium/media/base/decoder_buffer.h -+++ qtwebengine/src/3rdparty/chromium/media/base/decoder_buffer.h -@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer - : public base::RefCountedThreadSafe { - public: - enum { -- kPaddingSize = 32, -+ kPaddingSize = 64, - #if defined(ARCH_CPU_ARM_FAMILY) - kAlignmentSize = 16 - #else - ---- qtwebengine/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc -+++ qtwebengine/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc -@@ -30,10 +30,10 @@ EncryptionScheme GetEncryptionScheme(const AVStream* stream) { - - } // 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 -@@ -444,11 +444,11 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config, - } else { - codec_context->extradata_size = config.extra_data().size(); - codec_context->extradata = reinterpret_cast( -- av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE)); -+ av_malloc(config.extra_data().size() + AV_INPUT_BUFFER_PADDING_SIZE)); - memcpy(codec_context->extradata, &config.extra_data()[0], - config.extra_data().size()); - memset(codec_context->extradata + config.extra_data().size(), '\0', -- FF_INPUT_BUFFER_PADDING_SIZE); -+ AV_INPUT_BUFFER_PADDING_SIZE); - } - } - -@@ -585,11 +585,11 @@ void VideoDecoderConfigToAVCodecContext( - } else { - codec_context->extradata_size = config.extra_data().size(); - codec_context->extradata = reinterpret_cast( -- av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE)); -+ av_malloc(config.extra_data().size() + AV_INPUT_BUFFER_PADDING_SIZE)); - memcpy(codec_context->extradata, &config.extra_data()[0], - config.extra_data().size()); - memset(codec_context->extradata + config.extra_data().size(), '\0', -- FF_INPUT_BUFFER_PADDING_SIZE); -+ AV_INPUT_BUFFER_PADDING_SIZE); - } - } - ---- qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -+++ qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -@@ -368,7 +368,7 @@ void FFmpegAudioDecoder::ResetTimestampState(const AudioDecoderConfig& config) { - int FFmpegAudioDecoder::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 - ---- qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc -+++ qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc -@@ -427,12 +427,11 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config, - 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) { - diff --git a/srcpkgs/qt5/patches/qtwebkit-chartype.patch b/srcpkgs/qt5/patches/qtwebkit-chartype.patch deleted file mode 100644 index 3b621db1aa8..00000000000 --- a/srcpkgs/qt5/patches/qtwebkit-chartype.patch +++ /dev/null @@ -1,157 +0,0 @@ ---- 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(unistr.getBuffer()), - static_cast(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(find_this_.data()), -+ find_this_.size(), -+ reinterpret_cast(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(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(text.length()), 0, &error); - if (U_FAILURE(error)) - return false; -- ubidi_setPara(bidi_, text.data(), static_cast(text.length()), -+ ubidi_setPara(bidi_, reinterpret_cast(text.data()), static_cast(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(rules_.length()), -- string_.data(), -+ iter_ = ubrk_openRules(reinterpret_cast(rules_.c_str()), -+ static_cast(rules_.length()), -+ reinterpret_cast(string_.data()), - static_cast(string_.size()), -@@ -72,7 +72,7 @@ - } else { - iter_ = ubrk_open(break_type, - NULL, -- string_.data(), -+ reinterpret_cast(string_.data()), - static_cast(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(iter_), -- text, length, &status); -+ reinterpret_cast(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(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(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(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(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(utf16.c_str()), - static_cast(utf16.length()), on_error, encoded); - } - -@@ -178,7 +178,7 @@ - - SetUpErrorHandlerForToUChars(on_error, converter, &status); - std::unique_ptr buffer(new char16[uchar_max_length]); -- int actual_size = ucnv_toUChars(converter, buffer.get(), -+ int actual_size = ucnv_toUChars(converter, reinterpret_cast(buffer.get()), - static_cast(uchar_max_length), encoded.data(), - static_cast(encoded.length()), &status); - ucnv_close(converter); -@@ -205,8 +205,8 @@ - string16 normalized_utf16; - std::unique_ptr buffer(new char16[max_length]); - int actual_length = unorm_normalize( -- utf16.c_str(), utf16.length(), UNORM_NFC, 0, -- buffer.get(), static_cast(max_length), &status); -+ reinterpret_cast(utf16.c_str()), utf16.length(), UNORM_NFC, 0, -+ reinterpret_cast(buffer.get()), static_cast(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(dest.size()), -- string.data(), saturated_cast(string.size()), -+ reinterpret_cast(&dest[0]), saturated_cast(dest.size()), -+ reinterpret_cast(string.data()), saturated_cast(string.size()), - &error); - dest.resize(new_length); - } while (error == U_BUFFER_OVERFLOW_ERROR); diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index b70f1503034..2b6d14b846e 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -1,51 +1,43 @@ # Template file for 'qt5' pkgname=qt5 -version=5.10.1 -revision=14 +version=5.11.2 +revision=1 wrksrc="qt-everywhere-src-${version}" build_style=gnu-configure -hostmakedepends="flex ruby gperf git python perl pkg-config protobuf re2c ninja" -makedepends="libressl-devel libpng-devel libXrender-devel unixodbc-devel - fontconfig-devel libXi-devel libXv-devel libXinerama-devel libXrandr-devel - libXcursor-devel libXScrnSaver-devel dbus-devel glib-devel icu-devel - cups-devel libjpeg-turbo-devel sqlite-devel alsa-lib-devel tiff-devel SDL2-devel - pcre2-devel libmng-devel libevent-devel ffmpeg-devel jsoncpp-devel - libsrtp-devel libvpx-devel protobuf-devel snappy-devel minizip-devel - libxshmfence-devel libSM-devel xcb-util-keysyms-devel libvpx-devel - xcb-util-image-devel xcb-util-renderutil-devel xcb-util-wm-devel - libXcomposite-devel libwebp-devel libxkbcommon-devel harfbuzz-devel gtk+3-devel - mtdev-devel freetds-devel libmysqlclient-devel postgresql-libs-devel - pulseaudio-devel libbluetooth-devel gst-plugins-base1-devel libxslt-devel - opus-devel pciutils-devel nss-devel libcap-devel libinput-devel libproxy-devel - libxcb-devel libxkbcommon-devel tslib-devel wayland-devel libwayland-egl - libGLES MesaLib-devel" +hostmakedepends="cmake clang flex git glib-devel gperf ninja pkg-config + protobuf python re2c ruby" +makedepends="SDL2-devel Vulkan-Headers alsa-lib-devel double-conversion-devel + eudev-libudev-devel ffmpeg-devel freetds-devel glib-devel gst-plugins-base1-devel + gtk+3-devel icu-devel jsoncpp-devel libXv-devel libbluetooth-devel libcap-devel + libevent-devel libinput-devel libmng-devel libmysqlclient-devel libproxy-devel + libvpx-devel libwebp-devel libxslt-devel minizip-devel nss-devel + opus-devel pciutils-devel pcre2-devel postgresql-libs-devel + protobuf-devel pulseaudio-devel snappy-devel tslib-devel + unixodbc-devel xcb-util-image-devel xcb-util-keysyms-devel + xcb-util-renderutil-devel xcb-util-wm-devel" depends="qtchooser" replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0 qt5-webkit-devel<5.6.0 qt5-enginio<5.7.1 qt5-enginio-devel<5.7.1 qt5-plugin-gtk<5.7.1" -homepage="http://qt.io/" +homepage="https://qt.io/" short_desc="Cross-platform application and UI framework (QT5)" -maintainer="Juan RP " -license="GPL-3, LGPL-2.1" +maintainer="Jürgen Buchmüller " +license="GPL-3.0-or-later, LGPL-2.1-or-later" distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/single/qt-everywhere-src-${version}.tar.xz" -checksum=05ffba7b811b854ed558abf2be2ddbd3bb6ddd0b60ea4b5da75d277ac15e740a - -case "$XBPS_TARGET_MACHINE" in - armv5*|mips*) broken="qtwebengine cannot be built for $XBPS_TARGET_MACHINE" ;; -esac +checksum=c6104b840b6caee596fa9a35bc5f57f67ed5a99d6a36497b6fe66f990a53ca81 if [ "${XBPS_MACHINE%%-musl}" = i686 ]; then nodebug=yes # prevent OOM fi # Work around SSLv3_{client,server}_method missing in libressl-2.3.3 CFLAGS="-DOPENSSL_NO_PSK -DOPENSSL_NO_NEXTPROTONEG" -CXXFLAGS="${CFLAGS} -Wno-deprecated-declarations -fno-delete-null-pointer-checks" +CXXFLAGS="${CFLAGS} -Wno-deprecated-declarations -Wno-class-memaccess -Wno-packed-not-aligned" # Required for musl libc LDFLAGS="-pthread -ldl -fPIE" -if [ -n "$CROSS_BUILD" ]; then +if [ "$CROSS_BUILD" ]; then # Need some devel packages in the host to build qmake, moc, uic, rcc # wayland-devel contains /usr/bin/wayland-scanner - hostmakedepends+=" zlib-devel wayland-devel icu-devel" + hostmakedepends+=" icu-devel wayland-devel zlib-devel" # Cross building qtwebengine requires some more host packages hostmakedepends+=" nss-devel libevent-devel" fi @@ -177,9 +169,6 @@ do_configure() { # Compatibility functions res_ninit() and res_nclose() for musl libc cp ${FILESDIR}/resolv_compat.h ${wrksrc}/qtwebengine/src/3rdparty/chromium/net/dns - # Fix missing private includes https://bugreports.qt.io/browse/QTBUG-37417 - sed -i qtbase/mkspecs/features/create_cmake.prf -e "/CMAKE_NO_PRIVATE_INCLUDES = true/d" - case "$XBPS_TARGET_MACHINE" in armv5*|armv6*) # Disable "yield" assembler instruction sed -i qtwebengine/src/3rdparty/chromium/base/allocator/partition_allocator/spin_lock.cc \ @@ -195,10 +184,11 @@ do_configure() { for config in $(find ${chromium}/third_party/ffmpeg/chromium/config -name "config\.*" | grep linux); do sed -i ${config} -e "s;HAVE_SYSCTL 1;HAVE_SYSCTL 0;" done - # Do not use experimental allocator shim (incompatible with musl libc) - sed -i qtwebengine/src/3rdparty/chromium/build/common.gypi \ - -e"s;\('use_experimental_allocator_shim%':\) 1,;\1 0,;" - patch -Np0 -d "${wrksrc}/qtwebengine/src/3rdparty/chromium" -i "${FILESDIR}/musl-sandbox.patch" + # Do not use allocator shim (incompatible with musl libc) + sed -i qtwebengine/src/3rdparty/chromium/build/config/allocator.gni \ + -e "s;\(use_allocator_shim\) = .*;\1 = false;" + # Define to set 2 MiB stack size for qthread + export CXXFLAGS+=" -D_POSIX_THREAD_ATTR_STACKSIZE=2097152" ;; esac @@ -216,7 +206,6 @@ do_configure() { done # Bootstrap gn (generate ninja) - _msg_cross "Bootstrapping 'gn'" cd ${wrksrc}/qtwebengine/src/3rdparty/chromium/tools/gn conf='is_clang=false' @@ -235,9 +224,13 @@ do_configure() { conf+=' use_sysroot=false' conf+=' use_allocator="none"' conf+=' is_android=false' + + sed -i ${wrksrc}/qtwebengine/src/core/config/linux.pri \ + -e "/equals(MARMV/s;true;false;" case "$XBPS_TARGET_MACHINE" in armv[56]*) conf+=' arm_use_neon=false arm_optionally_use_neon=false';; - aarch64*|armv7*) conf+=' arm_use_neon=true arm_optionally_use_neon=false';; + armv7*) conf+=' arm_use_neon=true arm_optionally_use_neon=false';; + aarch64*) conf+=' arm_use_neon=true arm_optionally_use_neon=false';; esac AR="$AR_host" CC="$CC_host" CXX="$CXX_host" LD="$CXX_host" \ @@ -256,8 +249,20 @@ do_configure() { case "$XBPS_TARGET_MACHINE" in mips*) # sgidefs.h is in /usr/include/asm - find ${wrksrc} -name Platform.h -exec sed -i "{}" \ - -e "s;;;" \; + 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 + sed -i $f -e "s;;;" + done + # Assume that RGBA order is correct for big endian CPUs + sed -i qtwebengine/src/3rdparty/chromium/skia/config/SkUserConfig.h \ + -e '/#error Read the comment at this location/d' + ;; esac else @@ -296,22 +301,28 @@ do_configure() { opts+=" -no-strip" opts+=" -nomake examples" opts+=" -optimized-qmake" + # opts+=" -opengl dynamic" opts+=" -no-use-gold-linker" opts+=" -system-libjpeg" opts+=" -system-libpng" opts+=" -system-zlib" opts+=" -system-sqlite" opts+=" -system-harfbuzz" - opts+=" -webengine-alsa" - opts+=" -webengine-pulseaudio" + # Rely on auto detection (fails if forced for cross builds) + # opts+=" -webengine-alsa" opts+=" -no-webengine-embedded-build" + opts+=" -webengine-icu" opts+=" -webengine-ffmpeg" opts+=" -webengine-opus" opts+=" -webengine-webp" opts+=" -webengine-pepper-plugins" opts+=" -webengine-printing-and-pdf" opts+=" -webengine-proprietary-codecs" + opts+=" -webengine-pulseaudio" opts+=" -webengine-spellchecker" + opts+=" -webengine-webrtc" + opts+=" -webengine-geolocation" + opts+=" -webengine-v8-snapshot" opts+=" -silent" # opts+=" -v" @@ -321,29 +332,13 @@ do_configure() { _create_config ${spec} opts+=" -device ${spec}" opts+=" -device-option CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-" - opts+=" -opengl es2" opts+=" -sysroot ${XBPS_CROSS_BASE}" opts+=" -hostprefix host" opts+=" -extprefix /usr" case "$XBPS_TARGET_MACHINE" in - armv7*) # V8 snapshot can't be built with a 64 bit host compiler + arm*|mips*) + # V8 snapshot can't be built with a 64 bit host compiler opts+=" -no-webengine-v8-snapshot" - opts+=" -no-webengine-webrtc" - ;; - arm*) # V8 snapshot can't be built with a 64 bit host compiler - opts+=" -no-webengine-v8-snapshot" - opts+=" -no-webengine-webrtc" - # The machine code used here does not work for armv5* or armv6* - sed -i qtwebengine/src/3rdparty/chromium/third_party/skia/include/private/SkFixed.h \ - -e"s;defined(SK_CPU_ARM32);0;" - ;; - mips*) # V8 snapshot can't be built with a 64 bit host compiler - opts+=" -no-webengine-v8-snapshot" - # webrtc has no provision for mips* architecture in typedefs.h - opts+=" -no-webengine-webrtc" - ;; - *) # webrtc is ok - opts+=" -webengine-webrtc" ;; esac @@ -352,8 +347,6 @@ do_configure() { cp -v ${FILESDIR}/designer_src.pro qttools/src/designer/src/src.pro cp -v ${FILESDIR}/assistant.pro qttools/src/assistant/assistant.pro cp -v ${FILESDIR}/linguist.pro qttools/src/linguist/linguist.pro - else - opts+=" -webengine-webrtc" fi CC="cc" CXX="c++" CPP="cpp" LD="c++" AR="ar" AS="as" NM="nm" \ @@ -395,6 +388,9 @@ do_install() { vmkdir usr/bin vmkdir usr/lib/qt5/bin + # + # Build qmake for the target + # _msg_cross "Building qmake" cd ${wrksrc}/qtbase/qmake sed Makefile \ @@ -411,7 +407,31 @@ do_install() { ln -sf ../lib/qt5/bin/qmake ${PKGDESTDIR}/usr/bin/qmake-qt5 cp -ar ${wrksrc}/qtbase/mkspecs ${PKGDESTDIR}/usr/lib/qt5 - dirs+=" qtdeclarative/src/qmldevtools" + # + # Build qmldevtools for the target + # + base=qmldevtools + dir=qtdeclarative/src + _msg_cross " Building ${base}" + cd ${wrksrc}/${dir}/${base} + [ -f "${base}.pro" ] && cp -a ${base}.pro{,.orig} + sed -i ${base}.pro \ + -e "/option(host_build)/d" \ + -e "/include(..\/3rdparty\/masm\/masm-defs.pri)/i include(../3rdparty/masm/masm.pri)" + make clean + # Create the Makefile + mv -v Makefile{,.orig} + ${wrksrc}/qtbase/bin/qmake -o Makefile ${base}.pro + make ${makejobs} + # Restore profile, if any + [ -f "${base}.pro.orig" ] && mv -v ${base}.pro{.orig,} + mv -v Makefile{.orig,} + # Avoid rebuilding the Makefile by changing the rule + sed -i Makefile -e "s;^Makefile:;Makefile.host:;" + + # + # Build various tools for the target + # dirs+=" qtdeclarative/tools/qmlmin" dirs+=" qtdeclarative/tools/qmllint" dirs+=" qtdeclarative/tools/qmlimportscanner" @@ -428,7 +448,8 @@ do_install() { dirs+=" qttools/src/linguist/lconvert" dirs+=" qttools/src/linguist/lrelease" dirs+=" qttools/src/linguist/lupdate" - dirs+=" qttools/src/qdoc" + # Cannot be cross compiled (target clang issue) + # dirs+=" qttools/src/qdoc" for f in ${dirs}; do base=${f##*/} @@ -440,7 +461,7 @@ do_install() { if [ -x "${wrksrc}/${dir}/bin/${base}" ]; then mv -v ${wrksrc}/${dir}/bin/${base}{,-host} fi - make clean + [ -f Makefile ] && make clean [ -f "${base}.pro" ] && cp -a ${base}.pro{,.orig} if [ -f "${FILESDIR}/${base}.pro" ]; then # A specific *.pro file is available, use it. @@ -450,7 +471,7 @@ do_install() { sed -i ${base}.pro -e "/option(host_build)/d" fi # Create the Makefile - mv -v Makefile{,.orig} + [ -f Makefile ] && mv -v Makefile{,.orig} ${wrksrc}/qtbase/bin/qmake -o Makefile ${base}.pro # Now patch the Makefile(s) to not use the bootstrap libs and @@ -466,16 +487,14 @@ do_install() { -e "s;^\(AR\\s*=\).*;\1 $AR cqs;" \ -e "s;^\(RANLIB\\s*=\).*;\1 $RANLIB;" \ \; - if [ "${base}" != "qmldevtools" ]; then - # Set a different destination directory and target name - sed -i Makefile \ - -e "s;^\(DESTDIR\\s*=\).*;\1 ${DESTDIR}/usr/lib/qt5/bin/;" \ - -e "s;^\(TARGET\\s*=\).*;\1 ${DESTDIR}/usr/lib/qt5/bin/${base}-target;" - fi + # Set a different destination directory and target name + sed -i Makefile \ + -e "s;^\(DESTDIR\\s*=\).*;\1 ${DESTDIR}/usr/lib/qt5/bin/;" \ + -e "s;^\(TARGET\\s*=\).*;\1 ${DESTDIR}/usr/lib/qt5/bin/${base}-target;" make ${makejobs} # Restore profile, if any [ -f "${base}.pro.orig" ] && mv -v ${base}.pro{.orig,} - mv -v Makefile{.orig,} + [ -f Makefile.orig ] && mv -v Makefile{.orig,} # Avoid rebuilding the Makefile by changing the rule sed -i Makefile -e "s;^Makefile:;Makefile.host:;" if [ -x "${wrksrc}/${dir}/bin/${base}-host" ]; then