diff --git a/extra/qt5-webkit/PKGBUILD b/extra/qt5-webkit/PKGBUILD index 9f16aa65a..6614d9ccd 100644 --- a/extra/qt5-webkit/PKGBUILD +++ b/extra/qt5-webkit/PKGBUILD @@ -12,7 +12,7 @@ highmem=1 pkgname=qt5-webkit _qtver=5.212.0-alpha2 pkgver=${_qtver/-/} -pkgrel=2 +pkgrel=3 arch=(i686 x86_64) url='http://qt-project.org/' license=(GPL3 LGPL3 FDL custom) @@ -24,11 +24,17 @@ conflicts=(qt5-webkit-ng) replaces=(qt5-webkit-ng) groups=(qt qt5) _pkgfqn="${pkgname/5-/}-opensource-src-${_qtver}" -source=("https://github.com/annulen/webkit/releases/download/qtwebkit-$_qtver/qtwebkit-$_qtver.tar.xz") -sha256sums=('f8f901de567e11fc5659402b6b827eac75505ff9c5072d8e919aa306003f8f8a') +source=("https://github.com/annulen/webkit/releases/download/qtwebkit-$_qtver/qtwebkit-$_qtver.tar.xz" + qt5-webkit-gcc7.patch) +sha256sums=('f8f901de567e11fc5659402b6b827eac75505ff9c5072d8e919aa306003f8f8a' + 'f108833562d766d4c086026f9202b2ebc8c19e97fddedce952afed78df3c0720') prepare() { mkdir -p build + +# Fix crashes with GCC7 https://bugs.webkit.org/show_bug.cgi?id=173407 + cd qtwebkit-$_qtver + patch -p1 -i ../qt5-webkit-gcc7.patch } build() { diff --git a/extra/qt5-webkit/qt5-webkit-gcc7.patch b/extra/qt5-webkit/qt5-webkit-gcc7.patch new file mode 100644 index 000000000..bddb6fcee --- /dev/null +++ b/extra/qt5-webkit/qt5-webkit-gcc7.patch @@ -0,0 +1,34 @@ +diff -u -r webkitgtk-2.16.5/Source/WTF/wtf/text/StringImpl.h webkitgtk-2.16.5-gcc7/Source/WTF/wtf/text/StringImpl.h +--- webkitgtk-2.16.5/Source/WTF/wtf/text/StringImpl.h 2017-02-20 17:20:15.000000000 +0100 ++++ webkitgtk-2.16.5-gcc7/Source/WTF/wtf/text/StringImpl.h 2017-06-27 13:13:57.801527350 +0200 +@@ -581,29 +581,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)