diff --git a/srcpkgs/qt5-webkit/patches/icu59.patch b/srcpkgs/qt5-webkit/patches/icu59.patch new file mode 100644 index 00000000000..503a1062174 --- /dev/null +++ b/srcpkgs/qt5-webkit/patches/icu59.patch @@ -0,0 +1,73 @@ +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/include_functional.diff b/srcpkgs/qt5-webkit/patches/include_functional.diff deleted file mode 100644 index 542cb19f90b..00000000000 --- a/srcpkgs/qt5-webkit/patches/include_functional.diff +++ /dev/null @@ -1,14 +0,0 @@ -Description: add missing #include -Origin: upstream, https://github.com/annulen/webkit/commit/4ce8ebc4094512b9 -Last-Update: 2018-04-15 - ---- Source/WebCore/dom/SlotAssignment.h -+++ Source/WebCore/dom/SlotAssignment.h -@@ -28,6 +28,7 @@ - - #if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT) - -+#include - #include - #include - #include diff --git a/srcpkgs/qt5-webkit/patches/qt-musl-execinfo.patch b/srcpkgs/qt5-webkit/patches/qt-musl-execinfo.patch new file mode 100644 index 00000000000..b6acce4e5d6 --- /dev/null +++ b/srcpkgs/qt5-webkit/patches/qt-musl-execinfo.patch @@ -0,0 +1,20 @@ +--- 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) + #include + #include + #include +@@ -245,7 +245,7 @@ + + 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 diff --git a/srcpkgs/qt5-webkit/patches/qt5-webkit-gcc7.patch b/srcpkgs/qt5-webkit/patches/qt5-webkit-gcc7.patch new file mode 100644 index 00000000000..f5ceb175f03 --- /dev/null +++ b/srcpkgs/qt5-webkit/patches/qt5-webkit-gcc7.patch @@ -0,0 +1,33 @@ +--- 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 0be70e06158..b40b86fa893 100644 --- a/srcpkgs/qt5-webkit/template +++ b/srcpkgs/qt5-webkit/template @@ -1,39 +1,59 @@ # Template file for 'qt5-webkit' pkgname=qt5-webkit -version=5.212.0 -revision=1 -wrksrc=qtwebkit-everywhere-src-${version%.0} -build_style=cmake -configure_args="-DPORT=Qt -DUSE_LD_GOLD=OFF" +version=5.9.0 +revision=5 +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 hyphen-devel" -short_desc="Cross-platform application and UI framework (Qt5) - WebKit2 component" +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" +short_desc="A cross-platform application and UI framework (Qt5) - WebKit2 component" maintainer="Juan RP " -license="LGPL-2.1-or-later" +license="GPL-3, LGPL-2.1" homepage="https://www.qt.io/" -distfiles="http://download.qt.io/snapshots/ci/qtwebkit/${version%.0}/latest/src/submodules/${wrksrc}.tar.xz" -checksum=283b907ea324a2c734e3983c73fc27dbd8b33e2383c583de41842ee84d648a3e +distfiles="https://download.qt.io/community_releases/${version%.*}/${version}-final/qtwebkit-opensource-src-${version}.tar.xz" +checksum=8dad193b740055a998312e04a040f2e32a923c0823b2d239b24eab08276a4e04 +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" fi -# no JIT on ppc64, also other build workarounds -case "$XBPS_TARGET_MACHINE" in - ppc64*) - configure_args+=" -DENABLE_JIT=OFF -DUSE_SYSTEM_MALLOC=ON -DENABLE_ALLINONE_BUILD=OFF" - ;; - *) ;; -esac +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" \; +} qt5-webkit-devel_package() { - short_desc+=" - development files" - depends="qt5-devel ${sourcepkg}>=${version}_${revision}" + short_desc+=" (development)" + depends="${sourcepkg}>=${version}_${revision}" pkg_install() { vmove usr/include vmove usr/lib/*.so + vmove usr/lib/*.prl vmove usr/lib/pkgconfig } }