This also purges already back then (v5.9) legacy projects, such as Qt
Quick 1 / QML 1.
We also focus on software rendering only for now, postponing dealing
with messy vendor specific GL(ES) APIs, quirks and proprietary / binary
blobs. Implies certain features and packages being unavailable for the
moment.
Due to the switch from hotplug2 to procd, libudev - which libinput
requires - was rendered unusable on OpenWrt/LEDE.
However since there's libudev-fbsd now which is used as a
drop-in-replacement for libudev, we can now make use of libinput again
and therewith avoid the need of passing platform specific env vars
telling the paths to mouse/touchscreen/keyboard (evdev).
5.9 is a LTS tree so we're gonna stick to that version for a while now.
WARNING: This upgrade introduces a new dependency to pcre2 which is not
available in the lede-17.01 release branch!
Although Qt has the functionality of <host_build>'s,
it's supposed to be used and explicitly stated in
project files, so it can't be switched on from the
outside (e.g. via flags or env vars).
On top of that all builds using the <host_build>
directive get linked against libQtBootstrap.a which
is not always desired.
libQtBootstrap.a is also the only file available for
host builds, which means, <host_build>'s can't just make
use of and and link against e.g. libQtCore, as those
objects only get compiled for the target, not for the
host.
Because of above reasons, we build Qt twice now, once
for the host, once for the target.
When using the pkgconfig macros inside qmake
project files, qmake silently returns since it
detects being run inside a cross-toolchain and
pkgconfig normally doesn't work as expected in
such an environment.
However we patched pkgconfig to work inside
OpenWrt / LEDE (pkgconfig.real), so stop Qt
failing for qmake projects using pkgconfig.
Qt disables all pkg-config tests if it notices itself
being cross-compiled and PKG_CONFIG_SYSROOT_DIR being
unset.
However we do have a working pkg-config (wrapper around
pkg-config.real) which fixes the issues PKG_CONFIG_SYSROOT_DIR
tries to address.
Qt tries to be too smart in our case - force it to use
pkg-config.
Qt5-GUI now gets compiled with support for OpenGL,
however only links against GL stubs provided by the
2d software renderer.
That way we can decide at runtime, whether we want to
use GL or not - with almost no overhead, if not.
This also enables QtQuick2 being built correctly,
which depends on GL support and provides the
possibility of using QtQuick2 with the 2d-sw-renderer
even on hardware without native support for GL.
Both packages share the same source and I'd prefer handling
them in the very same Makefile, but unfortunately that would
create a circular dependency:
`qt5base` depends on `qt5quick2-2d-sw-renderer-GLstubs`, but
`qt5quick2-2d-sw-renderer` depends on `qt5quick2` which
depends on `qt5base`.
`qt5quick2-2d-sw-renderer` and `qt5quick2-2d-sw-renderer-GLstubs`
sharing the same Makefile results in `qt5base` depending on
`qt5quick2` which is meh.
Do not explicitly specify mkspec file when invoking qmake.
qmake itself is aware of the cross mkspec file (compiled in)
AND of the mkspec file for host builds.
Specifying it explicitly doesn't let qmake choose the
correct one and always tries to cross-compile everything.
Do not use strip any more when it is selected because plugin loading
does not work for plugins build stripped with sstrip, use normal strip
instead.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Instead of hard coding the dependency to libiconv-full use the macros
provided by OpenWrt. In the gnu iconv library the second parameter of
iconv(), often called inbuf, is not const, but qt5 assumes that it is
in the gnu version of libiconv. If we make qt5 use the code for the
posix version of libiconv it does not add the -liconv link parameter.
This patch adds the -liconv link parameter.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>