summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-02-28 20:07:49 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2019-03-01 10:24:37 +0100
commit1b4c9f2dbdb4fb32ab0250f0f5904a6985881059 (patch)
treebf72c58aa1c524fd65380ffa26b406148449b0ec /dev-qt/qtwebengine
parentqt5-build.eclass: Relocate QT5_DOCDIR to /usr/share/qt5-doc (diff)
downloadgentoo-1b4c9f2dbdb4fb32ab0250f0f5904a6985881059.tar.gz
gentoo-1b4c9f2dbdb4fb32ab0250f0f5904a6985881059.tar.bz2
gentoo-1b4c9f2dbdb4fb32ab0250f0f5904a6985881059.zip
dev-qt: Add Qt 5.12.1
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt/qtwebengine')
-rw-r--r--dev-qt/qtwebengine/Manifest1
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.12.0-nouveau-disable-gpu.patch98
-rw-r--r--dev-qt/qtwebengine/qtwebengine-5.12.1.ebuild139
3 files changed, 238 insertions, 0 deletions
diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest
index b38c1314d377..fabe4299a273 100644
--- a/dev-qt/qtwebengine/Manifest
+++ b/dev-qt/qtwebengine/Manifest
@@ -1 +1,2 @@
DIST qtwebengine-everywhere-src-5.11.3.tar.xz 233678844 BLAKE2B 451a2f8361b158835f7f565aea9e7e372ea5670f56a5eef918d0340857e1b336d7147c5f87417a21ea225c248cfda8248869c2023b2e359aa9216ec472dea4b9 SHA512 323179244187b075836101eec15fc96569e31dee7ca0b28d51833cf02a55439ca0ab8e3e14acf970eb0258e1f5187b6b33fc1a35bf9056e4941a2b20be9b0431
+DIST qtwebengine-everywhere-src-5.12.1.tar.xz 249191844 BLAKE2B 5ef1f62658d3e268348344b06117924e62eb5f852d98cc5b7a7e98434625bd69c8dca59dafdf36b9d092d841b62b813155eaa13254a504aa71f450413bcd4d4f SHA512 91ecd3fb474d53af06a66bf3e04d066d09b3ab9f867ef44c1d54690691ba00f5cf851c0d923d3465b8551baa0458e09122dd3a1e71d3a493d74ba020665a226c
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.12.0-nouveau-disable-gpu.patch b/dev-qt/qtwebengine/files/qtwebengine-5.12.0-nouveau-disable-gpu.patch
new file mode 100644
index 000000000000..ec315ca210e8
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.12.0-nouveau-disable-gpu.patch
@@ -0,0 +1,98 @@
+From: Antonio Larrosa <alarrosa@suse.com>
+Subject: Disable GPU when using nouveau or running on wayland
+References: boo#1005323, boo#1060990
+
+Qt WebEngine uses multi-threaded OpenGL, which nouveau does not support.
+It also crashes when running on wayland, the cause is not yet known.
+Work around these issues by not doing GPU-accelerated rendering in such
+cases.
+
+Index: qtwebengine-everywhere-src-5.12.0-alpha/src/core/web_engine_context.cpp
+===================================================================
+--- qtwebengine-everywhere-src-5.12.0-alpha.orig/src/core/web_engine_context.cpp
++++ qtwebengine-everywhere-src-5.12.0-alpha/src/core/web_engine_context.cpp
+@@ -101,6 +101,7 @@
+ #include <QOffscreenSurface>
+ #ifndef QT_NO_OPENGL
+ # include <QOpenGLContext>
++# include <QOpenGLFunctions>
+ #endif
+ #include <QQuickWindow>
+ #include <QStringList>
+@@ -162,6 +163,39 @@ void dummyGetPluginCallback(const std::v
+ }
+ #endif
+
++#ifndef QT_NO_OPENGL
++QString openGLVendor()
++{
++ QString vendor;
++
++ QOpenGLContext *oldContext = QOpenGLContext::currentContext();
++ QSurface *oldSurface = 0;
++ if (oldContext)
++ oldSurface = oldContext->surface();
++
++ QScopedPointer<QOffscreenSurface> surface( new QOffscreenSurface );
++ surface->create();
++ QOpenGLContext context;
++ if (!context.create()) {
++ qDebug() << "Error creating openGL context";
++ }
++ else if (!context.makeCurrent(surface.data())) {
++ qDebug() << "Error making openGL context current context";
++ } else {
++ const GLubyte *p;
++ QOpenGLFunctions *f = context.functions();
++ if ((p = f->glGetString(GL_VENDOR)))
++ vendor = QString::fromLatin1(reinterpret_cast<const char *>(p));
++ }
++
++ context.doneCurrent();
++ if (oldContext && oldSurface)
++ oldContext->makeCurrent(oldSurface);
++
++ return vendor;
++}
++#endif
++
+ } // namespace
+
+ namespace QtWebEngineCore {
+@@ -440,6 +474,27 @@ WebEngineContext::WebEngineContext()
+ const char *glType = 0;
+ #ifndef QT_NO_OPENGL
+
++ bool disableGpu = qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_GPU");
++
++ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND") && qApp->platformName().startsWith("wayland", Qt::CaseInsensitive))
++ {
++ qWarning() << "Running on wayland. Qt WebEngine will disable usage of the GPU.\n"
++ "Note: you can set the QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND\n"
++ "environment variable before running this application, but this is \n"
++ "not recommended since this usually causes applications to crash.";
++ disableGpu = true;
++ }
++
++ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND") && openGLVendor() == QStringLiteral("nouveau"))
++ {
++ qWarning() << "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.\n"
++ "Note: you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND\n"
++ "environment variable before running this application, but this is \n"
++ "not recommended since this usually causes applications to crash as\n"
++ "Nouveau openGL drivers don't support multithreaded rendering";
++ disableGpu = true;
++ }
++
+ bool tryGL =
+ !usingANGLE()
+ && (!usingSoftwareDynamicGL()
+@@ -450,7 +505,7 @@ WebEngineContext::WebEngineContext()
+ || enableWebGLSoftwareRendering
+ #endif
+ )
+- && !usingQtQuick2DRenderer();
++ && !usingQtQuick2DRenderer() && !disableGpu;
+
+ if (tryGL) {
+ if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) {
diff --git a/dev-qt/qtwebengine/qtwebengine-5.12.1.ebuild b/dev-qt/qtwebengine/qtwebengine-5.12.1.ebuild
new file mode 100644
index 000000000000..48fcb535fce5
--- /dev/null
+++ b/dev-qt/qtwebengine/qtwebengine-5.12.1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+inherit multiprocessing pax-utils python-any-r1 qt5-build
+
+DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+
+IUSE="alsa bindist designer geolocation jumbo-build pax_kernel pulseaudio
+ +system-ffmpeg +system-icu widgets"
+REQUIRED_USE="designer? ( widgets )"
+
+RDEPEND="
+ app-arch/snappy:=
+ dev-libs/glib:2
+ dev-libs/nspr
+ dev-libs/nss
+ ~dev-qt/qtcore-${PV}
+ ~dev-qt/qtdeclarative-${PV}
+ ~dev-qt/qtgui-${PV}
+ ~dev-qt/qtnetwork-${PV}
+ ~dev-qt/qtprintsupport-${PV}
+ ~dev-qt/qtwebchannel-${PV}[qml]
+ dev-libs/expat
+ dev-libs/libevent:=
+ dev-libs/libxml2[icu]
+ dev-libs/libxslt
+ dev-libs/re2:=
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/harfbuzz:=
+ media-libs/lcms:2
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:0=
+ >=media-libs/libvpx-1.5:=[svc]
+ media-libs/libwebp:=
+ media-libs/mesa[egl]
+ media-libs/opus
+ sys-apps/dbus
+ sys-apps/pciutils
+ sys-libs/libcap
+ sys-libs/zlib[minizip]
+ virtual/libudev
+ x11-libs/libdrm
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXScrnSaver
+ x11-libs/libXtst
+ alsa? ( media-libs/alsa-lib )
+ designer? ( ~dev-qt/designer-${PV} )
+ geolocation? ( ~dev-qt/qtpositioning-${PV} )
+ pulseaudio? ( media-sound/pulseaudio:= )
+ system-ffmpeg? ( media-video/ffmpeg:0= )
+ system-icu? ( >=dev-libs/icu-60.2:= )
+ widgets? (
+ ~dev-qt/qtdeclarative-${PV}[widgets]
+ ~dev-qt/qtwidgets-${PV}
+ )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ >=app-arch/gzip-1.7
+ dev-util/gperf
+ dev-util/ninja
+ dev-util/re2c
+ sys-devel/bison
+ pax_kernel? ( sys-apps/elfix )
+"
+
+PATCHES+=(
+ "${FILESDIR}/${PN}-5.12.0-nouveau-disable-gpu.patch" # bug 609752
+)
+
+src_prepare() {
+ use pax_kernel && PATCHES+=( "${FILESDIR}/${PN}-5.11.2-paxmark-mksnapshot.patch" )
+
+ if ! use jumbo-build; then
+ sed -i -e 's|use_jumbo_build=true|use_jumbo_build=false|' \
+ src/core/config/common.pri || die
+ fi
+
+ # bug 620444 - ensure local headers are used
+ find "${S}" -type f -name "*.pr[fio]" | xargs sed -i -e 's|INCLUDEPATH += |&$$QTWEBENGINE_ROOT/include |' || die
+
+ qt_use_disable_config alsa webengine-alsa src/core/config/linux.pri
+ qt_use_disable_config pulseaudio webengine-pulseaudio src/core/config/linux.pri
+
+ qt_use_disable_mod designer webenginewidgets src/plugins/plugins.pro
+
+ qt_use_disable_mod geolocation positioning \
+ mkspecs/features/configure.prf \
+ src/core/core_chromium.pri \
+ src/core/core_common.pri
+
+ qt_use_disable_mod widgets widgets src/src.pro
+
+ qt5-build_src_prepare
+}
+
+src_configure() {
+ export NINJA_PATH=/usr/bin/ninja
+ export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}"
+
+ local myqmakeargs=(
+ --
+ -opus
+ -printing-and-pdf
+ -webp
+ $(usex alsa '-alsa' '')
+ $(usex bindist '' '-proprietary-codecs')
+ $(usex pulseaudio '-pulseaudio' '')
+ $(usex system-ffmpeg '-ffmpeg' '')
+ $(usex system-icu '-webengine-icu' '')
+ )
+ qt5-build_src_configure
+}
+
+src_install() {
+ qt5-build_src_install
+
+ # bug 601472
+ if [[ ! -f ${D%/}${QT5_LIBDIR}/libQt5WebEngine.so ]]; then
+ die "${CATEGORY}/${PF} failed to build anything. Please report to https://bugs.gentoo.org/"
+ fi
+
+ pax-mark m "${D%/}${QT5_LIBEXECDIR}"/QtWebEngineProcess
+}