qmake5_base: drop default -e from EXTRA_OEMAKE and add variables we want to override

* exports are still needed at least for qtbase configure script (which
  is using our special eval variant of getQ(X)MakeConf functions
  but maybe we should move them only to qtbase now

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qmake5: use QT_CONF_PATH variable in do_generate_qt_config_file

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qtbase: add patch to fix build with LD exported in env

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qt5: drop 'unset LD', qmake should now handle QMAKE_LINK correctly

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qmake5_base: export OE_QMAKE variables only in qtbase recipes

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qmake5: Fix cleaning separate build directory and use it by default

* "${B}/*" in quotes doesn't match anything, better to remove whole directory
  (incluing .files) and recreate it
* not sure why I've added quotes after testing first version, we don't
  expect B with spaces.. but I'm a bit scared with rm -rf ${SOME_VAR}
  after one glibc upgrade cleaned my whole disk and attached NFS array
  when OLD_LOCALE_PATH wasn't detected correctly...
* qmake works well with separate B, use it by default

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qmake5: drop QT_DIR_NAME subdirectory from many OE_QMAKE_PATH_* variables and add it back in qt5.inc

* we're using QT_DIR_NAME subdirectory mostly to prevent conflicts with existing files from qt4
  but setting it in all OE_QMAKE_PATH_* variables causes all apps which are just using qmake to
  build to install e.g. in /qt5 which for stuff like qterminal or something doesn't
  sound right (as long as there isn't qterminal4 and qterminal5 recipe)

* some variables are kept with default QT_DIR_NAME, e.g. qml, imports, plugins we can assume that
  every application which installs some QML files will install them in location shared by all

* add qt5-native.inc which also adds this QT_DIR_NAME and common
  inherits (later will be used also by qtwayland-native.inc)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qtbase: move virtual/libgl dependency to extra variable

* makes it easier to change desktop gl to gles2 in .bbappend

* we cannot explicitly disable opengl with -no-opengl, because then it
  fails to build (probably only when mesa headers are found in sysroot)
  /qtbase-opensource-src-5.0.0/src/platformsupport/eglconvenience/qeglplatformcontext.cpp:62:72: error: 'QPlatformOpenGLContext' has not been declared
  /qtbase-opensource-src-5.0.0/src/platformsupport/eglconvenience/qeglplatformcontext.cpp: In constructor 'QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat&, int*, EGLDisplay, EGLenum)':
  /qtbase-opensource-src-5.0.0/src/platformsupport/eglconvenience/qeglplatformcontext.cpp:69:70: error: invalid static_cast from type 'int*' to type 'QEGLPlatformContext*'
  The same with 5.0.2

Signed-off-by: Simon Busch <morphis@gravedo.de>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qtbase: use EXTRA_OEMAKE also in config.tests executed in do_configure

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qtbase: drop setting arch and endian

* endian option was removed from configure
* arch/host-arch option is now deprecated and configure shows
  warning when it's used
* both are now autodetected

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qmake5: move default do_configure and do_install to qmake5.bbclass

* it's useful for many recipes outside qt5 and easy to overwrite when needed
qmake5_base: Define OE_QMAKE_PATH_QT_* variables

* and move it to separate .bbclass which is easier to
  replace in distro layer when you don't care about
  conflicts with qt4

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>