From d7acc3744d12d3ffba5a528a97f521c6283434c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Mon, 14 Jan 2019 12:34:06 +0100 Subject: [PATCH] qt5-webkit: update to 5.212.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: #6638 Signed-off-by: Jürgen Buchmüller --- srcpkgs/qt5-webkit/patches/armv6l-asm.patch | 23 ++++++ srcpkgs/qt5-webkit/patches/icu59.patch | 73 ------------------ .../qt5-webkit/patches/musl-mcontext.patch | 65 ++++++++++++++++ .../qt5-webkit/patches/qt-musl-execinfo.patch | 25 +++--- .../qt5-webkit/patches/qt5-webkit-gcc7.patch | 33 -------- srcpkgs/qt5-webkit/template | 77 +++++++++---------- 6 files changed, 134 insertions(+), 162 deletions(-) create mode 100644 srcpkgs/qt5-webkit/patches/armv6l-asm.patch delete mode 100644 srcpkgs/qt5-webkit/patches/icu59.patch create mode 100644 srcpkgs/qt5-webkit/patches/musl-mcontext.patch delete mode 100644 srcpkgs/qt5-webkit/patches/qt5-webkit-gcc7.patch diff --git a/srcpkgs/qt5-webkit/patches/armv6l-asm.patch b/srcpkgs/qt5-webkit/patches/armv6l-asm.patch new file mode 100644 index 0000000000..284929f035 --- /dev/null +++ b/srcpkgs/qt5-webkit/patches/armv6l-asm.patch @@ -0,0 +1,23 @@ +Fix code emitted for armv6l to not use movw/movt but ldr. +See https://bugs.webkit.org/show_bug.cgi?id=131612 +and https://bugs.webkit.org/show_bug.cgi?id=141288 + +--- Source/JavaScriptCore/offlineasm/arm.rb 2015-07-22 14:37:57.000000000 +0200 ++++ Source/JavaScriptCore/offlineasm/arm.rb 2015-08-08 00:31:21.011824644 +0200 +@@ -473,8 +473,16 @@ + $asm.puts "mov #{armFlippedOperands(operands)}" + end + when "mvlbl" ++ if isARMv7 or isARMv7Traditional + $asm.puts "movw #{operands[1].armOperand}, \#:lower16:#{operands[0].value}" + $asm.puts "movt #{operands[1].armOperand}, \#:upper16:#{operands[0].value}" ++ else ++ $mvlbl_counter ||= 0 ++ $mvlbl_counter += 1 ++ const_label = "_mvlbl_const_label#{$mvlbl_counter}" ++ $asm.puts ".equ #{const_label}, (#{operands[0].value})" ++ $asm.puts "ldr #{operands[1].armOperand}, =#{const_label}" ++ end + when "nop" + $asm.puts "nop" + when "bieq", "bpeq", "bbeq" diff --git a/srcpkgs/qt5-webkit/patches/icu59.patch b/srcpkgs/qt5-webkit/patches/icu59.patch deleted file mode 100644 index 503a106217..0000000000 --- a/srcpkgs/qt5-webkit/patches/icu59.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h -index ead844f..e62cfd4 100644 ---- Source/WTF/wtf/Compiler.h -+++ Source/WTF/wtf/Compiler.h -@@ -61,6 +61,7 @@ - #define WTF_COMPILER_SUPPORTS_HAS_TRIVIAL_DESTRUCTOR __has_feature(has_trivial_destructor) - #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums) - #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions) -+#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES !defined(_LIBCPP_HAS_NO_UNICODE_CHARS) - - #endif - -@@ -142,6 +143,7 @@ - #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1 - #endif - #if GCC_VERSION_AT_LEAST(4, 5, 0) -+#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES 1 - #define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1 - #endif - #if GCC_VERSION_AT_LEAST(4, 6, 0) -diff --git a/Source/WTF/wtf/TypeTraits.h b/Source/WTF/wtf/TypeTraits.h -index b9e46bc..876fa45 100644 ---- Source/WTF/wtf/TypeTraits.h -+++ Source/WTF/wtf/TypeTraits.h -@@ -75,6 +75,10 @@ namespace WTF { - #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED) - template<> struct IsInteger { static const bool value = true; }; - #endif -+#if COMPILER_SUPPORTS(CXX_NEW_CHAR_TYPES) -+ template<> struct IsInteger { static const bool value = true; }; -+ template<> struct IsInteger { static const bool value = true; }; -+#endif - - template struct IsFloatingPoint { static const bool value = false; }; - template<> struct IsFloatingPoint { static const bool value = true; }; ---- Source/JavaScriptCore/API/JSStringRef.h.orig 2015-10-13 06:37:10.000000000 +0200 -+++ Source/JavaScriptCore/API/JSStringRef.h 2017-04-24 12:26:42.495345570 +0200 -@@ -32,6 +32,7 @@ - #include - #endif - #include /* for size_t */ -+#include - - #ifdef __cplusplus - extern "C" { -@@ -43,7 +44,7 @@ - @typedef JSChar - @abstract A Unicode character. - */ -- typedef unsigned short JSChar; -+ typedef char16_t JSChar; - #else - typedef wchar_t JSChar; - #endif ---- Source/WebKit2/Shared/API/c/WKString.h.orig 2015-10-13 06:37:12.000000000 +0200 -+++ Source/WebKit2/Shared/API/c/WKString.h 2017-04-24 12:27:33.432011867 +0200 -@@ -31,6 +31,7 @@ - #ifndef __cplusplus - #include - #endif -+#include - - #ifdef __cplusplus - extern "C" { -@@ -38,7 +39,7 @@ - - #if !defined(WIN32) && !defined(_WIN32) \ - && !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */ -- typedef unsigned short WKChar; -+ typedef char16_t WKChar; - #else - typedef wchar_t WKChar; - #endif diff --git a/srcpkgs/qt5-webkit/patches/musl-mcontext.patch b/srcpkgs/qt5-webkit/patches/musl-mcontext.patch new file mode 100644 index 0000000000..c15587f199 --- /dev/null +++ b/srcpkgs/qt5-webkit/patches/musl-mcontext.patch @@ -0,0 +1,65 @@ +--- Source/JavaScriptCore/heap/MachineStackMarker.cppg 2019-01-12 19:48:12.801137040 +0100 ++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp 2019-01-12 20:09:03.662201571 +0100 +@@ -681,7 +681,19 @@ + #endif + + #else +-#error Need a way to get the frame pointer for another thread on this platform ++ ++// The following sequence depends on musl libc's sys/ucontext.h. ++#if CPU(X86) ++ return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_EBP]); ++#elif CPU(X86_64) ++ return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_RBP]); ++#elif CPU(ARM) ++ return reinterpret_cast((uintptr_t) regs.machineContext.arm_fp); ++#elif CPU(ARM64) ++ return reinterpret_cast((uintptr_t) regs.machineContext.regs[29]); ++#elif CPU(MIPS) ++ return reinterpret_cast((uintptr_t) regs.machineContext.gregs[30]); ++#endif + #endif + } + +@@ -761,7 +773,19 @@ + #endif + + #else +-#error Need a way to get the instruction pointer for another thread on this platform ++ ++// The following sequence depends on musl libc's sys/ucontext.h. ++#if CPU(X86) ++ return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_EIP]); ++#elif CPU(X86_64) ++ return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_RIP]); ++#elif CPU(ARM) ++ return reinterpret_cast((uintptr_t) regs.machineContext.arm_pc); ++#elif CPU(ARM64) ++ return reinterpret_cast((uintptr_t) regs.machineContext.pc); ++#elif CPU(MIPS) ++ return reinterpret_cast((uintptr_t) regs.machineContext.pc); ++#endif + #endif + } + void* MachineThreads::Thread::Registers::llintPC() const +@@ -850,7 +874,19 @@ + #endif + + #else +-#error Need a way to get the LLIntPC for another thread on this platform ++ ++// The following sequence depends on musl libc's sys/ucontext.h. ++#if CPU(X86) ++ return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_ESI]); ++#elif CPU(X86_64) ++ return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_R8]); ++#elif CPU(ARM) ++ return reinterpret_cast((uintptr_t) regs.machineContext.arm_r8); ++#elif CPU(ARM64) ++ return reinterpret_cast((uintptr_t) regs.machineContext.regs[4]); ++#elif CPU(MIPS) ++ return reinterpret_cast((uintptr_t) regs.machineContext.gregs[12]); ++#endif + #endif + } + #endif // ENABLE(SAMPLING_PROFILER) diff --git a/srcpkgs/qt5-webkit/patches/qt-musl-execinfo.patch b/srcpkgs/qt5-webkit/patches/qt-musl-execinfo.patch index b6acce4e5d..d3adbba9c3 100644 --- a/srcpkgs/qt5-webkit/patches/qt-musl-execinfo.patch +++ b/srcpkgs/qt5-webkit/patches/qt-musl-execinfo.patch @@ -1,20 +1,13 @@ ---- Source/WTF/wtf/Assertions.cpp 2016-02-04 13:58:47.000000000 +0100 -+++ Source/WTF/wtf/Assertions.cpp 2016-03-17 17:42:38.194682870 +0100 -@@ -61,7 +61,7 @@ - #include - #endif - --#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID) -+#if (OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))) && !OS(ANDROID) +--- Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp 2018-01-20 16:53:35.000000000 +0100 ++++ Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp 2019-01-12 18:56:04.698975664 +0100 +@@ -51,8 +51,10 @@ #include + #if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK)) #include ++#if defined(__GLIBC__) #include -@@ -245,7 +245,7 @@ + #endif ++#endif - void WTFGetBacktrace(void** stack, int* size) - { --#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID) -+#if (OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))) && !OS(ANDROID) - *size = backtrace(stack, *size); - #elif OS(WINDOWS) && !OS(WINCE) - // The CaptureStackBackTrace function is available in XP, but it is not defined + #if ENABLE(REMOTE_INSPECTOR) + #include "JSGlobalObjectDebuggable.h" diff --git a/srcpkgs/qt5-webkit/patches/qt5-webkit-gcc7.patch b/srcpkgs/qt5-webkit/patches/qt5-webkit-gcc7.patch deleted file mode 100644 index f5ceb175f0..0000000000 --- a/srcpkgs/qt5-webkit/patches/qt5-webkit-gcc7.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- Source/WTF/wtf/text/StringImpl.h 2017-04-18 22:15:27.000000000 +0200 -+++ Source/WTF/wtf/text/StringImpl.h 2018-01-20 11:34:19.280270335 +0100 -@@ -625,29 +625,7 @@ - // FIXME: Does this really belong in StringImpl? - template static void copyChars(T* destination, const T* source, unsigned numCharacters) - { -- if (numCharacters == 1) { -- *destination = *source; -- return; -- } -- -- if (numCharacters <= s_copyCharsInlineCutOff) { -- unsigned i = 0; --#if (CPU(X86) || CPU(X86_64)) -- const unsigned charsPerInt = sizeof(uint32_t) / sizeof(T); -- -- if (numCharacters > charsPerInt) { -- unsigned stopCount = numCharacters & ~(charsPerInt - 1); -- -- const uint32_t* srcCharacters = reinterpret_cast(source); -- uint32_t* destCharacters = reinterpret_cast(destination); -- for (unsigned j = 0; i < stopCount; i += charsPerInt, ++j) -- destCharacters[j] = srcCharacters[j]; -- } --#endif -- for (; i < numCharacters; ++i) -- destination[i] = source[i]; -- } else -- memcpy(destination, source, numCharacters * sizeof(T)); -+ memcpy(destination, source, numCharacters * sizeof(T)); - } - - ALWAYS_INLINE static void copyChars(UChar* destination, const LChar* source, unsigned numCharacters) diff --git a/srcpkgs/qt5-webkit/template b/srcpkgs/qt5-webkit/template index c2f4ac2aa3..a4719bc900 100644 --- a/srcpkgs/qt5-webkit/template +++ b/srcpkgs/qt5-webkit/template @@ -1,51 +1,47 @@ # Template file for 'qt5-webkit' pkgname=qt5-webkit -reverts="5.212.0_1" -version=5.9.0 -revision=6 -wrksrc=qtwebkit-opensource-src-${version} -hostmakedepends="bison flex gperf perl python ruby pkg-config" -makedepends="libwebp-devel libxslt-devel libXcomposite-devel sqlite-devel libjpeg-turbo-devel - gst-plugins-base1-devel qt5-declarative-devel qt5-location-devel - qt5-sensors-devel qt5-webchannel-devel" +version=5.212.0 +revision=2 +_v=${version%.*} +wrksrc=qtwebkit-everywhere-src-${_v} +build_style=cmake +configure_args="-DPORT=Qt -DUSE_LD_GOLD=OFF" +hostmakedepends="flex gperf perl pkg-config python qt5-qmake ruby" +makedepends="libwebp-devel libxslt-devel libXcomposite-devel sqlite-devel + libjpeg-turbo-devel gst-plugins-base1-devel qt5-declarative-devel + qt5-location-devel qt5-sensors-devel qt5-webchannel-devel hyphen-devel + ruby-devel" short_desc="A cross-platform application and UI framework (Qt5) - WebKit2 component" maintainer="Juan RP " -license="GPL-3, LGPL-2.1" +license="LGPL-2.1-or-later" homepage="https://www.qt.io/" -distfiles="https://download.qt.io/community_releases/${version%.*}/${version}-final/qtwebkit-opensource-src-${version}.tar.xz" -checksum=8dad193b740055a998312e04a040f2e32a923c0823b2d239b24eab08276a4e04 +distfiles="https://download.qt.io/snapshots/ci/qtwebkit/${_v}/latest/src/submodules/qtwebkit-everywhere-src-${_v}.tar.xz" +checksum=283b907ea324a2c734e3983c73fc27dbd8b33e2383c583de41842ee84d648a3e + +CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include" +CXXFLAGS="-fpermissive -Wno-class-memaccess" -CXXFLAGS="-std=c++11 -fno-delete-null-pointer-checks" -LDFLAGS="-ldl" if [ -n "$CROSS_BUILD" ]; then - hostmakedepends+=" qt5-host-tools qt5-declarative-devel libjpeg-turbo-devel" + hostmakedepends+=" qt5-host-tools qt5-declarative-devel ruby-devel" + configure_args+=" -DRUBY_CONFIG_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/ruby-*" fi -do_configure() { - mkdir -p build - cd build - # Generate headers - syncqt.pl-qt5 -version ${version} ${wrksrc}/Source/sync.profile - # Patch to enable video - sed -i ${wrksrc}/Tools/qmake/mkspecs/features/features.pri \ - -e"s;\(ENABLE_VIDEO\)=0;\1=1;" \ - -e"s;\(ENABLE_WEB_AUDIO\)=0;\1=1;" - # Patch for QtWebProcess LFLAGS - sed -i ${wrksrc}/Source/WebKit2/WebProcess.pro \ - -e"/TARGET = QtWebProcess/i QMAKE_LFLAGS = $LDFLAGS" - qmake PREFIX=/usr LIB=/usr/lib QMAKE_LFLAGS_USE_GOLD= ${wrksrc} -} -do_build() { - cd build - make ${makejobs} CC=$CC CXX=$CXX LINK=$CXX LD=$CXX \ - AR="$AR cru" RANLIB=$RANLIB -} -do_install() { - cd build - make PREFIX=/usr INSTALL_ROOT=${DESTDIR} install - # QMAKE_PRL_BUILD_DIR contains a reference to the build dir; drop it - find ${DESTDIR}/usr/lib -type f -name '*.prl' -exec \ - sed -i "{}" -e "/^QMAKE_PRL_BUILD_DIR/d" \; +case "$XBPS_TARGET_MACHINE" in + armv6*) # Need libatomic for __atomic_fetch_add_8 etc. + makedepends+=" libatomic-devel" + LIBS+=" -latomic" + ;; + ppc64*) # no JIT on ppc64 and other build workarounds + configure_args+=" ENABLE_JIT=OFF USE_SYSTEM_MALLOC=ON ENABLE_ALLINONE_BUILD=OFF" + ;; +esac + +pre_configure() { + if [ "$CROSS_BUILD" ]; then + # XXX: disable failing check for private headers and assume they are available + sed -i Source/cmake/OptionsQt.cmake \ + -e 's;check_cxx_source_compiles("${INCLUDE_TEST_SOURCE}" \(Qt5${_qt_component}_PRIVATE_HEADER_FOUND\));set(\1 1);' + fi } qt5-webkit-devel_package() { @@ -54,7 +50,8 @@ qt5-webkit-devel_package() { pkg_install() { vmove usr/include vmove usr/lib/*.so - vmove usr/lib/*.prl + vmove usr/lib/cmake vmove usr/lib/pkgconfig + vmove usr/lib/qt5/mkspecs } }