diff options
author | Donald Carr | 2019-09-16 00:48:07 -0700 |
---|---|---|
committer | Donald Carr | 2019-09-16 01:17:37 -0700 |
commit | b0a831b06c587738f829507322fea81566edc7a3 (patch) | |
tree | d550df391129bdb65a88848fce069620d61eebef | |
parent | 7aef4844a7fccd7797386a54f20b9e6fb9e5854d (diff) | |
download | aur-b0a831b06c587738f829507322fea81566edc7a3.tar.gz |
Patch away qtwebengine hueristics
-rw-r--r-- | 0001-Remove-super-shit-QPA-hueristics.patch | 72 | ||||
-rw-r--r-- | PKGBUILD | 14 |
2 files changed, 80 insertions, 6 deletions
diff --git a/0001-Remove-super-shit-QPA-hueristics.patch b/0001-Remove-super-shit-QPA-hueristics.patch new file mode 100644 index 000000000000..d104fe62f23e --- /dev/null +++ b/0001-Remove-super-shit-QPA-hueristics.patch @@ -0,0 +1,72 @@ +From 77bc37d717d5072e7f8218bc3ec78fafe1117716 Mon Sep 17 00:00:00 2001 +From: Donald Carr <d@chaos-reins.com> +Date: Mon, 16 Sep 2019 00:38:06 -0700 +Subject: [PATCH] Remove super shit QPA hueristics + +Change-Id: I7776958c24822b483de304f7c5d530666b3ae227 +--- + src/core/content_browser_client_qt.cpp | 43 +++++++++++++++----------- + 1 file changed, 25 insertions(+), 18 deletions(-) + +diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp +index 16945020..af34baf3 100644 +--- a/src/core/content_browser_client_qt.cpp ++++ b/src/core/content_browser_client_qt.cpp +@@ -168,29 +168,36 @@ public: + : gl::GLContext(0) + , m_handle(0) + { +- QString platform = qApp->platformName().toLower(); +- QPlatformNativeInterface *pni = QGuiApplication::platformNativeInterface(); +- if (platform == QLatin1String("xcb") || platform == QLatin1String("offscreen")) { ++ if (qEnvironmentVariableIsSet(QT_WEBENGINE_SKIP_QPA_DETECTION)) { + if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) + m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); + else + m_handle = pni->nativeResourceForContext(QByteArrayLiteral("glxcontext"), qtContext); +- } else if (platform == QLatin1String("cocoa")) +- m_handle = pni->nativeResourceForContext(QByteArrayLiteral("cglcontextobj"), qtContext); +- else if (platform == QLatin1String("qnx")) +- m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); +- else if (platform == QLatin1String("eglfs") || platform == QLatin1String("wayland") +- || platform == QLatin1String("wayland-egl")) +- m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); +- else if (platform == QLatin1String("windows")) { +- if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) +- m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglContext"), qtContext); +- else +- m_handle = pni->nativeResourceForContext(QByteArrayLiteral("renderingcontext"), qtContext); + } else { +- qFatal("%s platform not yet supported", platform.toLatin1().constData()); +- // Add missing platforms once they work. +- Q_UNREACHABLE(); ++ QString platform = qApp->platformName().toLower(); ++ QPlatformNativeInterface *pni = QGuiApplication::platformNativeInterface(); ++ if (platform == QLatin1String("xcb") || platform == QLatin1String("offscreen")) { ++ if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) ++ m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); ++ else ++ m_handle = pni->nativeResourceForContext(QByteArrayLiteral("glxcontext"), qtContext); ++ } else if (platform == QLatin1String("cocoa")) ++ m_handle = pni->nativeResourceForContext(QByteArrayLiteral("cglcontextobj"), qtContext); ++ else if (platform == QLatin1String("qnx")) ++ m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); ++ else if (platform == QLatin1String("eglfs") || platform == QLatin1String("wayland") ++ || platform == QLatin1String("wayland-egl")) ++ m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext); ++ else if (platform == QLatin1String("windows")) { ++ if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) ++ m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglContext"), qtContext); ++ else ++ m_handle = pni->nativeResourceForContext(QByteArrayLiteral("renderingcontext"), qtContext); ++ } else { ++ qFatal("%s platform not yet supported", platform.toLatin1().constData()); ++ // Add missing platforms once they work. ++ Q_UNREACHABLE(); ++ } + } + } + +-- +2.23.0 + @@ -29,7 +29,7 @@ _target_host=false _sysroot="" _piver="" _use_mesa=false -_float=true +_float=false _shadow_build=true # automatically disabled if you are building webengine _debug=true @@ -121,6 +121,7 @@ case ${_piver} in 1) _toolchain_name=armv6-rpi-linux-gnueabihf _toolchain="/opt/${_toolchain_name}/bin/${_toolchain_name}-" + _float=true # too problematic for me to care about #_float=true ;; @@ -130,6 +131,7 @@ case ${_piver} in # eats shit when linking artriculate with ltcg _toolchain_name=arm-cortexa9_neon-linux-gnueabihf _toolchain="/opt/x-tools/${_toolchain_name}/bin/${_toolchain_name}-" + _float=true #_mkspec="linux-rpi${_piver}-vc4-g++" #_use_mesa=true ;; @@ -137,7 +139,6 @@ case ${_piver} in _toolchain_name=aarch64-rpi3-linux-gnu _toolchain="/opt/x-tools/${_toolchain_name}/bin/${_toolchain_name}-" _use_mesa=true - _float=false # just for projectmofo! #_opengl_variant="desktop" ;; @@ -209,7 +210,7 @@ fi $_skip_qtwebengine && _additional_configure_flags="$_additional_configure_flags -skip qtwebengine -no-icu" $_skip_qtscript && _additional_configure_flags="$_additional_configure_flags -skip qtscript" $_skip_qtwidgets && _additional_configure_flags="$_additional_configure_flags -no-widgets" -$_static_build && _additional_configure_flags="$_additional_configure_flags -static" +$_static_build && _additional_configure_flags="$_additional_configure_flags -static -ltcg" $_float && _additional_configure_flags="$_additional_configure_flags -qreal float" $_debug && _additional_configure_flags="$_additional_configure_flags -force-debug-info -separate-debug-info" @@ -279,7 +280,6 @@ fi #-journald \ _core_configure_options=" \ - -ltcg \ -qt-freetype \ -qt-harfbuzz \ -qt-libpng \ @@ -294,7 +294,6 @@ _core_configure_options=" \ -qt-sqlite \ -optimized-qmake \ -optimized-tools \ - -optimize-size \ -confirm-license \ -opensource \ -v \ @@ -407,6 +406,8 @@ if $_patching; then echo "Patching source" cd ${_srcdir}/qtdeclarative #patch -p1 < ${startdir}/0005-Fix-qtdeclarative-build-configured-with-qreal-float.patch + cd ${_srcdir}/qtwebengine + patch -p1 < ${startdir}/0001-Remove-super-shit-QPA-hueristics.patch fi rm -Rf ${_bindir} @@ -428,9 +429,9 @@ fi # Prepare for breakage in all your Qt derived projects #-qtnamespace "Pi${_piver}" \ -# -platform linux-clang \ if $_target_host; then local _configure_line="${_srcdir}/configure \ + -platform linux-clang \ ${_core_configure_options} \ ${_additional_configure_flags}" # ${_arch_specific_configure_options} \ @@ -441,6 +442,7 @@ else -qtlibinfix "Pi${_piver}" \ -sysroot ${_sysroot} \ -device ${_mkspec} \ + -optimize-size \ -device-option CROSS_COMPILE=${_toolchain} \ ${_additional_configure_flags}" fi |