qt5: fix webengine+ppc64le, disable webengine where needed

This allows qt5 to be built with webengine on ppc64 little
endian. Since webengine is broken on a lot of other archs,
this also adds code to disable webengine where otherwise
broken, so we can allow building qt5 on every architecture
instead of marking it broken.

[ci skip]

Closes: #7642 [via git-merge-pr]
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
q66 2018-12-13 20:02:21 +01:00 committed by Jürgen Buchmüller
parent 271543413b
commit 1a92b3e566
No known key found for this signature in database
GPG key ID: 6764EC32352D0647
3 changed files with 2196 additions and 6 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,41 @@
This adds the necessary bits to make qt attempt building webengine on ppc64.
Since the patch is only sufficient for ppc64le, keep it commented out and
let the packaging template remove the comment later, as there is no good
way to check endianness directly in the file.
We also have to disable jumbo build for the time being because it results
in build failures otherwise, most likely because of compiler miscompiling
the code.
--- qtwebengine/mkspecs/features/functions.prf
+++ qtwebengine/mkspecs/features/functions.prf
@@ -95,6 +95,7 @@
contains(qtArch, "arm64"): return(arm64)
contains(qtArch, "mips"): return(mipsel)
contains(qtArch, "mips64"): return(mips64el)
+ contains(qtArch, "power64"): return(ppc64)
return(unknown)
}
--- qtwebengine/mkspecs/features/platform.prf
+++ qtwebengine/mkspecs/features/platform.prf
@@ -82,6 +82,7 @@
contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true)
contains(QT_ARCH, "mips"): return(true)
# contains(QT_ARCH, "mips64"): return(true)
+#ppc64le contains(QT_ARCH, "power64"): return(true)
skipBuild("QtWebEngine can only be built for x86, x86-64, ARM, Aarch64, and MIPSel architectures.")
return(false)
--- qtwebengine/src/core/config/linux.pri
+++ qtwebengine/src/core/config/linux.pri
@@ -90,6 +90,10 @@
else: contains(QMAKE_CFLAGS, "-mdsp"): gn_args += mips_dsp_rev=1
}
+contains(QT_ARCH, "power64") {
+ gn_args += use_jumbo_build=false
+}
+
host_build {
gn_args += custom_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\"
GN_HOST_CPU = $$gnArch($$QT_ARCH)

View file

@ -16,20 +16,47 @@ makedepends="SDL2-devel Vulkan-Headers alsa-lib-devel double-conversion-devel
unixodbc-devel xcb-util-image-devel xcb-util-keysyms-devel
xcb-util-renderutil-devel xcb-util-wm-devel"
depends="qtchooser"
replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0 qt5-webkit-devel<5.6.0
qt5-enginio<5.7.1 qt5-enginio-devel<5.7.1 qt5-plugin-gtk<5.7.1"
homepage="https://qt.io/"
short_desc="Cross-platform application and UI framework (QT5)"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-3.0-or-later, LGPL-2.1-or-later"
homepage="https://qt.io/"
distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/single/qt-everywhere-src-${version}.tar.xz"
checksum=859417642713cee2493ee3646a7fee782c9f1db39e41d7bb1322bba0c5f0ff4d
replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0 qt5-webkit-devel<5.6.0
qt5-enginio<5.7.1 qt5-enginio-devel<5.7.1 qt5-plugin-gtk<5.7.1"
build_options="webengine"
desc_option_webengine="Build Chromium-based WebEngine component"
case "$XBPS_TARGET_MACHINE" in
armv5tel*) broken="qtwebengine use VSM assembler commands";;
mips*) broken="qtwebengine fails to build";;
x86_64*|i686*|ppc64le*) build_options_default="webengine";;
armv5tel*) ;; # qtwebengine uses VSM assembler commands
arm*|aarch64*) build_options_default="webengine";;
*) ;; # assume no webengine
esac
subpackages="qt5-3d qt5-3d-devel qt5-canvas3d qt5-charts qt5-charts-devel
qt5-connectivity qt5-connectivity-devel qt5-datavis3d qt5-datavis3d-devel
qt5-declarative qt5-declarative-devel qt5-devel qt5-examples qt5-gamepad
qt5-gamepad-devel qt5-graphicaleffects qt5-host-tools qt5-imageformats
qt5-location qt5-location-devel qt5-multimedia qt5-multimedia-devel
qt5-networkauth qt5-networkauth-devel qt5-plugin-mysql qt5-plugin-odbc
qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-purchasing
qt5-purchasing-devel qt5-qmake qt5-quickcontrols qt5-quickcontrols2
qt5-quickcontrols2-devel qt5-remoteobjects qt5-remoteobjects-devel
qt5-script qt5-script-devel qt5-scxml qt5-scxml-devel qt5-sensors
qt5-sensors-devel qt5-serialbus qt5-serialbus-devel qt5-serialport
qt5-serialport-devel qt5-speech qt5-speech-devel qt5-svg qt5-svg-devel
qt5-tools qt5-tools-devel qt5-translations qt5-virtualkeyboard
qt5-virtualkeyboard-devel qt5-wayland qt5-wayland-devel qt5-webchannel
qt5-webchannel-devel qt5-webglplugin qt5-webglplugin-devel qt5-websockets
qt5-websockets-devel qt5-webview qt5-webview-devel qt5-x11extras
qt5-x11extras-devel qt5-xmlpatterns qt5-xmlpatterns-devel"
if [ "$build_option_webengine" ]; then
subpackages+=" qt5-webengine qt5-webengine-devel"
fi
if [ "${XBPS_MACHINE%%-musl}" = i686 ]; then
nodebug=yes # prevent OOM
fi
@ -44,7 +71,9 @@ if [ "$CROSS_BUILD" ]; then
# wayland-devel contains /usr/bin/wayland-scanner
hostmakedepends+=" icu-devel wayland-devel zlib-devel"
# Cross building qtwebengine requires some more host packages
hostmakedepends+=" nss-devel libevent-devel"
if [ "$build_option_webengine" ]; then
hostmakedepends+=" nss-devel libevent-devel"
fi
fi
_cleanup_wrksrc_leak() {
@ -180,6 +209,9 @@ do_configure() {
qtwebengine/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/spin_lock.cc \
-e 's;"yield";"nop";'
;;
ppc64le*) # enable webengine but not on BE ppc64 for now
sed -i qtwebengine/mkspecs/features/platform.prf -e 's;#ppc64le;;'
;;
esac
case "$XBPS_TARGET_MACHINE" in
@ -331,6 +363,11 @@ do_configure() {
opts+=" -silent"
# opts+=" -v"
# make sure to disable webengine on platforms that we don't build it for
if [ -z "$build_option_webengine" ]; then
opts+=" -skip qtwebengine"
fi
LDFLAGS+=" -Wl,--no-keep-memory" # needs more than 8GB RAM else
if [ -n "$CROSS_BUILD" ]; then
spec=void-${XBPS_CROSS_TRIPLET}-g++