diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-03-03 13:42:34 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-03-03 13:42:34 +0000 |
commit | 066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (patch) | |
tree | 3cb05783d73b2c33589ba305144a31c718e123cd /dev-qt/qtwebengine | |
parent | 16449a80e28af2209916cc66d19c9a44ca2b90d9 (diff) |
gentoo resync : 03.03.2019
Diffstat (limited to 'dev-qt/qtwebengine')
-rw-r--r-- | dev-qt/qtwebengine/Manifest | 3 | ||||
-rw-r--r-- | dev-qt/qtwebengine/files/qtwebengine-5.12.0-nouveau-disable-gpu.patch | 98 | ||||
-rw-r--r-- | dev-qt/qtwebengine/qtwebengine-5.12.1.ebuild | 139 |
3 files changed, 240 insertions, 0 deletions
diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest index d535debf4502..c1ad8893a972 100644 --- a/dev-qt/qtwebengine/Manifest +++ b/dev-qt/qtwebengine/Manifest @@ -1,6 +1,9 @@ AUX qtwebengine-5.11.1-nouveau-disable-gpu.patch 3710 BLAKE2B 880d63b7552973cf91bb1411f92ab3ee2d88013f144bdfcc6b5e1eec1d886bf76ab2166bc7600212701031da63a69ed2f5e03a4bc15549834a9a770ed68f35ef SHA512 a0b9592201d950ae97b92d5d0161ccc5bc675a37fbf657fe15ea0fe12870a370cf3ce54f5f033c073af23defded5c4ad0b43993c5b559024b285c5341b4673a0 AUX qtwebengine-5.11.2-paxmark-mksnapshot.patch 888 BLAKE2B d44e8772dafd8962805abe412470d94ced2d11e47d3e7e25acbfafa54669677a1e072b435a06ed093f7c9ce27d8d98fab4b042cd49862350d77c944418a335b9 SHA512 893aef4801d1f2a3fad1f4d1ef2c2b122d4004b7966e76d8e1adeb8cc5b03ce8b0ddf30d20690ca6e0b15b76074aa386b46b00d0c828b7684c6fcacc33b2865f +AUX qtwebengine-5.12.0-nouveau-disable-gpu.patch 3740 BLAKE2B fc2745ba0e3ac264d2f59ede3628f6d4d94db8f175c4cf68444e5dabb5fd0266957c804da7e0e761d8f39ddbe2781ae023aef8db1a907907e7db116b48a8cd11 SHA512 fe407c7907e6e9dd09be6e53f4c560ab453e5081fbbac4392b29fdb32cfccd1157e6a9ed2c7839b1aeda2088309e124b7130963175472a660ea46807299e8d9a AUX qtwebengine-5.9.6-gcc8.patch 1184 BLAKE2B aea72fb7563517f6c1f0f1330bad21ae71bbadc7b74e13b5c9280074ba5ae642be1df6c6e3014464f4b9aa26dd5620b5c5ef5b7139256c6a48fe58ed911e54e0 SHA512 21e79c6fc1575728d658c31bc68da66a5b9840c6fee7c442218ec8ac6009d5df1436bea931aa56439965987ec1ccdac32afce2b0a246c3d7bb2d0b0536717be5 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 EBUILD qtwebengine-5.11.3.ebuild 3568 BLAKE2B b28e34024ea8fdddf8cff922ff4c653f0f4839c8e2248edb2e6982319429f5dda4e77feddbd4a15122ba6fe976821087930bf3e1792c6aa31217096a2b06eac9 SHA512 aa530bbaf18ad6f3430b4f3fecb28d49c640b5846ec372242acfe213bf8604267fafb1debf1f7e6cbf19ee32d686a100c3ee420038a1f542d929a99e182318db +EBUILD qtwebengine-5.12.1.ebuild 3494 BLAKE2B 3bbc50ef1bc232b98d9ce626bbc3812de7256798982d246c4913a4d1cb5dfdbc89c3592b24bbd80184f0c0d3431d66d928d76d4acb21d4e8c9a386ca15f4fc76 SHA512 2f041e2c05f500d1a048aee2807d2ec191f94875eee20de4d7bcc1c8ca00045d862a85b63d8488405d618dcb378cce377c70d67a41f50d3f130958cb69eae086 MISC metadata.xml 1178 BLAKE2B 3c9dc86e76a316c93c637b10d9939e95e86bda9bbf3d349575594ab68457b72bc72b9c92ab5650dae9e15cf7726ad904b478b6888744f4cac2382d5f9a9943cd SHA512 20bfcdd36c2f2a6fc95f402bfb6a79982b9fd5e16b659395fef3e41cf475ab76493a93cfa30fca505b0d31c0d2b2d4ef9a297ef8d64fe4d50617b74a7b81c707 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 +} |