diff --git a/desktop/toolkit/qt5/qt5-webkit/actions.py b/desktop/toolkit/qt5/qt5-webkit/actions.py index 54f47eba9f..32e62f2001 100644 --- a/desktop/toolkit/qt5/qt5-webkit/actions.py +++ b/desktop/toolkit/qt5/qt5-webkit/actions.py @@ -7,21 +7,30 @@ from pisi.actionsapi import shelltools from pisi.actionsapi import autotools from pisi.actionsapi import pisitools +from pisi.actionsapi import cmaketools from pisi.actionsapi import qt5 from pisi.actionsapi import get def setup(): - shelltools.system("sed -e '/CONFIG/a QMAKE_CXXFLAGS += -Wno-expansion-to-defined' -i Tools/qmake/mkspecs/features/unix/default_pre.prf") - qt5.configure() + shelltools.makedirs("build") + shelltools.cd("build") + cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_LIBHYPHEN=OFF \ + -DPORT=Qt \ + -DENABLE_TOOLS=OFF", sourceDir="..") def build(): - qt5.make() + shelltools.cd("build") + cmaketools.make() def install(): - qt5.install("INSTALL_ROOT=%s install" % get.installDIR()) - + shelltools.cd("build") + cmaketools.rawInstall("DESTDIR=%s" % get.installDIR()) + #I hope qtchooser will manage this issue for bin in shelltools.ls("%s/usr/lib/qt5/bin" % get.installDIR()): pisitools.dosym("/usr/lib/qt5/bin/%s" % bin, "/usr/bin/%s-qt5" % bin) - + + shelltools.cd("..") pisitools.dodoc("LICENSE*") diff --git a/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-cmake3.10.patch b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-cmake3.10.patch new file mode 100644 index 0000000000..5e21f57e95 --- /dev/null +++ b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-cmake3.10.patch @@ -0,0 +1,31 @@ +From f51554bf104ab0491370f66631fe46143a23d5c2 Mon Sep 17 00:00:00 2001 +From: Konstantin Tokarev +Date: Sat, 7 Oct 2017 17:38:32 +0300 +Subject: [PATCH] [cmake] Fix build with CMake 3.10: -frtti was enabled for + wrong file path + +Change-Id: I65d4f491f21c17f6d99a14259988d2ddb0d67105 +--- + Source/WebKit/PlatformQt.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/WebKit/PlatformQt.cmake b/Source/WebKit/PlatformQt.cmake +index 61433257a767..edfa57e97ac1 100644 +--- a/Source/WebKit/PlatformQt.cmake ++++ b/Source/WebKit/PlatformQt.cmake +@@ -795,6 +795,7 @@ if (COMPILER_IS_GCC_OR_CLANG) + set_source_files_properties( + qt/Api/qwebdatabase.cpp + qt/Api/qwebelement.cpp ++ qt/Api/qwebfullscreenrequest.cpp + qt/Api/qwebhistory.cpp + qt/Api/qwebhistoryinterface.cpp + qt/Api/qwebpluginfactory.cpp +@@ -804,7 +805,6 @@ if (COMPILER_IS_GCC_OR_CLANG) + + qt/WidgetApi/qgraphicswebview.cpp + qt/WidgetApi/qwebframe.cpp +- qt/WidgetApi/qwebfullscreenrequest.cpp + qt/WidgetApi/qwebinspector.cpp + qt/WidgetApi/qwebpage.cpp + qt/WidgetApi/qwebview.cpp diff --git a/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-gcc7.patch b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-gcc7.patch new file mode 100644 index 0000000000..bddb6fcee0 --- /dev/null +++ b/desktop/toolkit/qt5/qt5-webkit/files/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) diff --git a/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-null-pointer-dereference.patch b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-null-pointer-dereference.patch index c71628442f..97b9f9ea1b 100644 --- a/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-null-pointer-dereference.patch +++ b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-null-pointer-dereference.patch @@ -1,7 +1,7 @@ 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 -+++ Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp 2017-10-24 21:44:40.504943501 ++++ 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 @@ diff --git a/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-trojita-1.patch b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-trojita-1.patch new file mode 100644 index 0000000000..b963d5ec4c --- /dev/null +++ b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-trojita-1.patch @@ -0,0 +1,34 @@ +From 6faf11215e1af27d35e921ae669aa0251a01a1ab Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20Br=C3=BCning?= +Date: Wed, 13 Nov 2013 18:13:36 +0100 +Subject: [PATCH] Trigger layout after resizing the FrameView. + +There are problems with QGLWidget based web plugins due to the fact +that WebKit forces us to relayout during paint events, which in turn +might resize widgets, causing the shared backing store's QImages to +be corrupted and hence causing crashed. + +This patch triggers a layout upon resizing the FrameView, which reduces +the likely hood of resizing plugins during a subsequent paintEvent. + +Task-number: QTBUG-34277 +Change-Id: Id35c72a3cc68ac6633a74fba0669c2d8fbfabc88 +Reviewed-by: Allan Sandfeld Jensen +--- + Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp +index e6145b6ffb82..941d8df603d9 100644 +--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp ++++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp +@@ -962,6 +962,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& size) + ASSERT(view); + view->resize(size); + view->adjustViewSize(); ++ ++ if (view->needsLayout()) ++ view->layout(); + } + + diff --git a/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-trojita-2.patch b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-trojita-2.patch new file mode 100644 index 0000000000..51fb78b78e --- /dev/null +++ b/desktop/toolkit/qt5/qt5-webkit/files/qt5-webkit-trojita-2.patch @@ -0,0 +1,33 @@ +From 76420459a13d9440b41864c93cb4ebb404bdab55 Mon Sep 17 00:00:00 2001 +From: Konstantin Tokarev +Date: Thu, 12 Oct 2017 20:15:15 +0300 +Subject: [PATCH] Fix for 451c5a10: run adjustViewSize() after relayout + +Additional note for 451c5a10 + this: + +Since r162515 resize of FrameView that does not have scrollbars (or use +overlay scrollbars) does not lead to automatic re-layout. In Trojita +contentsSize() is called immediately after QWebPage::setViewportSize(), +returning wrong result. + +Change-Id: I543b22d7bbe1514333007e5f99b97a7c12c19c1a +--- + Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp +index 941d8df603d9..df28e9f21f2c 100644 +--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp ++++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp +@@ -961,10 +961,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& size) + FrameView* view = frame->view(); + ASSERT(view); + view->resize(size); +- view->adjustViewSize(); +- + if (view->needsLayout()) + view->layout(); ++ view->adjustViewSize(); + } + + diff --git a/desktop/toolkit/qt5/qt5-webkit/pspec.xml b/desktop/toolkit/qt5/qt5-webkit/pspec.xml index 9b3012f428..7858ff343e 100644 --- a/desktop/toolkit/qt5/qt5-webkit/pspec.xml +++ b/desktop/toolkit/qt5/qt5-webkit/pspec.xml @@ -11,7 +11,7 @@ Classes for a WebKit2 based implementation and a new QML API Classes for a WebKit2 based implementation and a new QML API LGPLv2.1-linking-exception - http://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/qtwebkit-opensource-src-5.9.1.tar.xz + https://github.com/annulen/webkit/releases/download/qtwebkit-5.212.0-alpha2/qtwebkit-5.212.0-alpha2.tar.xz qt5-base-devel qt5-sensors-devel @@ -25,6 +25,7 @@ qt5-assistant-devel qt5-sql-sqlite mesa-devel + cmake libXtst-devel leveldb-devel icu4c-devel @@ -58,11 +59,11 @@ python3-devel - qtwebkit-opensource-src-5.0.1-debuginfo.patch - qtwebkit-opensource-src-5.2.0-save_memory.patch - qtwebkit-opensource-src-5.2.1-no_rpath.patch - webkit_qt_hide_symbols.diff - + qt5-webkit-cmake3.10.patch --> + qt5-webkit-gcc7.patch + qt5-webkit-null-pointer-dereference.patch --> + qt5-webkit-trojita-1.patch --> + qt5-webkit-trojita-2.patch @@ -133,6 +134,13 @@ + + 2018-10-17 + 5.212.0 + First release + Mustafa Cinasal + muscnsl@gmail.com + 2018-10-15 5.9.1