extra/qt5-webkit to qtwebkit+5.212.0alpha2+156+g95401fe3908-1

This commit is contained in:
Kevin Mihelich 2019-05-22 19:31:24 +00:00
parent 5cf10d359e
commit 2474d7ae5d
3 changed files with 14 additions and 78 deletions

View file

@ -5,52 +5,39 @@
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to link with libatomic on v5/v6
# - disable jit on v5/v6
# - use tarball source
highmem=1
pkgname=qt5-webkit
_qtver=5.212.0-alpha2
pkgver=${_qtver/-/}
pkgrel=28
_commit=95401fe3908e0b4eebc9447e678298d768617bc7
pkgver=qtwebkit+5.212.0alpha2+156+g95401fe3908
pkgrel=1
arch=(x86_64)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
pkgdesc='Classes for a WebKit2 based implementation and a new QML API'
depends=(qt5-location qt5-sensors qt5-webchannel libwebp libxslt libxcomposite gst-plugins-base hyphen)
makedepends=(cmake ruby gperf python2 qt5-doc qt5-tools)
makedepends=(cmake ruby gperf python2 qt5-doc qt5-tools git)
optdepends=('gst-plugins-good: Webm codec support')
conflicts=(qt5-webkit-ng qt5-webkit-og)
replaces=(qt5-webkit-ng qt5-webkit-og)
_pkgfqn="${pkgname/5-/}-opensource-src-${_qtver}"
source=("https://github.com/annulen/webkit/releases/download/qtwebkit-$_qtver/qtwebkit-$_qtver.tar.xz"
qt5-webkit-gcc7.patch
qt5-webkit-null-pointer-dereference.patch
qt5-webkit-trojita-1.patch::"https://github.com/annulen/webkit/commit/6faf1121.patch"
qt5-webkit-trojita-2.patch::"https://github.com/annulen/webkit/commit/76420459.patch"
qt5-webkit-cmake3.10.patch::"https://github.com/annulen/webkit/commit/f51554bf.patch"
source=(https://github.com/annulen/webkit/archive/$_commit.tar.gz
atomic.patch)
sha256sums=('f8f901de567e11fc5659402b6b827eac75505ff9c5072d8e919aa306003f8f8a'
'f108833562d766d4c086026f9202b2ebc8c19e97fddedce952afed78df3c0720'
'510e1f78c2bcd76909703a097dbc1d5c9c6ce4cd94883c26138f09cc10121f43'
'bd22bd7842d5ad1cb1f5a4b6acb2674509732274d5f9dc51943144dff76996ae'
'b42b70fd2a4a36b0ff48fc4e0dc386b3dda373e6fec18f3be9f5e2d3b04e0aa3'
'b4e6c85fcb062e7cc141b0e34977bcc4f9c8677c773fc4b310151b85f51e7189'
sha256sums=('abb506f757a195fb92f9ebdc6b4119c3961a1a40b44b1c1b6f8dceab5a2c70d2'
'23fbd785daf116c71b3ce87d40860f0a6c56ab1065ee98ec41634626ca961129')
#pkgver() {
# cd webkit
# git describe --tags | sed -e 's/-/+/g' -e 's/+alpha/alpha/' -e 's/v//'
#}
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
# Fix layout issues in trojita https://github.com/annulen/webkit/issues/511
patch -p1 -i ../qt5-webkit-trojita-1.patch
patch -p1 -i ../qt5-webkit-trojita-2.patch
# Fix null point dereference (Fedora) https://github.com/annulen/webkit/issues/573
patch -p1 -i ../qt5-webkit-null-pointer-dereference.patch
# Fix build with cmake 3.10
patch -p1 -i ../qt5-webkit-cmake3.10.patch
if [[ $CARCH == "arm" || $CARCH == "armv6h" ]]; then
cd webkit-$_commit
patch -p0 -i ../atomic.patch
fi
}
@ -60,7 +47,7 @@ build() {
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && CONFIG="-DENABLE_JIT=OFF"
cmake ../qtwebkit-$_qtver \
cmake ../webkit-$_commit \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DPORT=Qt \

View file

@ -1,34 +0,0 @@
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 <typename T> 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<const uint32_t*>(source);
- uint32_t* destCharacters = reinterpret_cast<uint32_t*>(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)

View file

@ -1,17 +0,0 @@
diff -ur qtwebkit-5.212.0-alpha2/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
qtwebkit-5.212.0-alpha2-fix-null-pointer-dereference/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
--- qtwebkit-5.212.0-alpha2/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp 2017-06-09 16:11:36.000000000 +0200
+++ qtwebkit-5.212.0-alpha2-fix-null-pointer-dereference/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp 2017-10-24 21:44:40.504943501
+0200
@@ -390,7 +390,10 @@
QString QWebPageAdapter::selectedHtml() const
{
- return page->focusController().focusedOrMainFrame().editor().selectedRange()->toHTML();
+ RefPtr<Range> range = page->focusController().focusedOrMainFrame().editor().selectedRange();
+ if (!range)
+ return QString();
+ return range->toHTML();
}
bool QWebPageAdapter::isContentEditable() const