--- /dev/null
+#
+# QMake variables for Qt
+#
+inherit qmake5_base
+
+QT5TOOLSDEPENDS ?= "qt5-native "
+DEPENDS_prepend = "${QT5TOOLSDEPENDS}"
+
+export QMAKESPEC = "${STAGING_DATADIR_NATIVE}/qt5/mkspecs/${TARGET_OS}-oe-g++"
+export OE_QMAKE_UIC = "${STAGING_BINDIR_NATIVE}/uic"
+export OE_QMAKE_MOC = "${STAGING_BINDIR_NATIVE}/moc"
+export OE_QMAKE_RCC = "${STAGING_BINDIR_NATIVE}/rcc"
+export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/qmake"
+export OE_QMAKE_LINK = "${CXX}"
+export OE_QMAKE_CXXFLAGS = "${CXXFLAGS}"
+export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qt5"
+export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
+export OE_QMAKE_LIBS_QT = "qt"
+export OE_QMAKE_LIBS_X11 = "-lXext -lX11 -lm"
+export OE_QMAKE_LIBS_X11SM = "-lSM -lICE"
+export OE_QMAKE_LRELEASE = "${STAGING_BINDIR_NATIVE}/lrelease5"
+export OE_QMAKE_LUPDATE = "${STAGING_BINDIR_NATIVE}/lupdate5"
--- /dev/null
+
+# We override this completely to eliminate the -e normally passed in
+EXTRA_OEMAKE = ' MAKEFLAGS= '
+
+export OE_QMAKE_CC="${CC}"
+export OE_QMAKE_CFLAGS="${CFLAGS}"
+export OE_QMAKE_CXX="${CXX}"
+export OE_QMAKE_LDFLAGS="${LDFLAGS}"
+export OE_QMAKE_AR="${AR} cqs"
+export OE_QMAKE_STRIP="echo"
+export OE_QMAKE_RPATH="-Wl,-rpath-link,"
+
+# do not export STRIP to the environment
+STRIP[unexport] = "1"
+
+do_generate_qt_config_file() {
+ export QT_CONF_PATH=${WORKDIR}/qt.conf
+ cat > ${WORKDIR}/qt.conf <<EOF
+[Paths]
+Prefix =
+Binaries = ${STAGING_BINDIR_NATIVE}
+Headers = ${STAGING_INCDIR}/qt5
+Plugins = ${STAGING_LIBDIR}/qt5/plugins/
+Libraries = ${STAGING_LIBDIR}/qt5-test
+Mkspecs = ${STAGING_DATADIR}/qt5/mkspecs/
+HostData = ${STAGING_DATADIR_NATIVE}/qt5
+HostBinaries = ${STAGING_BINDIR_NATIVE}/
+EOF
+}
+
+addtask generate_qt_config_file after do_patch before do_configure
+
+#EXPORT_FUNCTIONS do_configure
+
+#addtask configure after do_unpack do_patch before do_compile
--- /dev/null
+#cat <<EOF
+#
+# qmake configuration for building with openembedded
+#
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
+
+QMAKE_AR = ${OE_QMAKE_AR} cqs
+#QMAKE_AR = ${BUILD_AR} cqs
+QMAKE_STRIP = ${BUILD_STRIP}
+QMAKE_CFLAGS += ${BUILD_CFLAGS}
+QMAKE_CXXFLAGS += \$\$QMAKE_CFLAGS ${BUILD_CXXFLAGS}
+#QMAKE_LFLAGS += ${BUILD_LDFLAGS}
+QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
+QMAKE_CC = ${BUILD_CC}
+QMAKE_LINK_C = ${BUILD_CCLD}
+QMAKE_LINK_C_SHLIB = ${BUILD_CCLD}
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += ${OE_QMAKE_CFLAGS}
+QMAKE_CXX = ${BUILD_CXX}
+QMAKE_LINK = ${BUILD_CXX} ${BUILD_LDFLAGS}
+QMAKE_LINK_SHLIB = ${BUILD_CXX} ${BUILD_LDFLAGS}
+QMAKE_RANLIB = ${BUILD_RANLIB}
--- /dev/null
+cat <<EOF
+#
+# qmake configuration for building with openembedded
+#
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
+
+QMAKE_INCDIR_QT = ${OE_QMAKE_INCDIR_QT}
+QMAKE_LIBDIR_QT = ${OE_QMAKE_LIBDIR_QT}
+QMAKE_LIBS_X11 = ${OE_QMAKE_LIBS_X11}
+QMAKE_LIBS_X11SM = ${OE_QMAKE_LIBS_X11SM}
+QMAKE_MOC = ${OE_QMAKE_MOC}
+QMAKE_UIC = ${OE_QMAKE_UIC}
+QMAKE_RCC = ${OE_QMAKE_RCC}
+#QMAKE_AR = ${OE_QMAKE_AR} cqs
+QMAKE_AR = ${OE_QMAKE_AR}
+QMAKE_STRIP = ${OE_QMAKE_STRIP}
+QMAKE_CFLAGS += ${OE_QMAKE_CFLAGS}
+QMAKE_CXXFLAGS += \$\$QMAKE_CFLAGS ${OE_QMAKE_CXXFLAGS}
+QMAKE_LFLAGS += ${OE_QMAKE_LDFLAGS}
+QMAKE_CC = ${OE_QMAKE_CC}
+QMAKE_LINK_C = ${OE_QMAKE_LINK}
+QMAKE_LINK_C_SHLIB = ${OE_QMAKE_LINK}
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += ${OE_QMAKE_CFLAGS}
+QMAKE_CXX = ${OE_QMAKE_CXX}
+QMAKE_LINK = ${OE_QMAKE_LINK}
+QMAKE_LINK_SHLIB = ${OE_QMAKE_LINK}
+
+load(qt_config)
+EOF
\ No newline at end of file
--- /dev/null
+#include "../linux-g++/qplatformdefs.h"
# Copyright (C) 2012 O.S. Systems Software LTDA.
+inherit qmake5_base
+
+SRC_URI += " \
+ file://qmake-build.conf.sh \
+ file://qmake.conf.sh \
+ file://qplatformdefs.h \
+"
+
+# Qt5 is dependent on icu for localization
+ICU = "icu "
+ICU_powerpc = "pango"
+
+DEPENDS += "qt5-tools-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU}"
+
+require qt5_arch.inc
+
QT_MODULE ?= "${PN}"
-QT_VERSION ?= "${PV}-beta1"
-SRC_URI = "http://releases.qt-project.org/qt5.0/beta1/split_sources/${QT_MODULE}-opensource-src-${QT_VERSION}.tar.xz"
+QT_CONFIG_FLAGS ?= ""
+
+QT_TESTS ?= "-nomake tests"
+QT_EXAMPLES ?= "-nomake examples"
+QT_DEMOS ?= "-nomake demos"
+
+
+EXTRA_OEMAKE = "-e"
+
+do_configure() {
+ set_endian
+
+ if [ ! -e bin/qmake ]; then
+ ln -sf ${STAGING_BINDIR_NATIVE}/qmake bin/qmake
+ fi
+
+ # Avoid problems with the linkers, since we want the linker to be g++
+ unset LD
+
+ mkdir -p mkspecs/${TARGET_OS}-oe-g++
+ cp -f ${WORKDIR}/qplatformdefs.h mkspecs/${TARGET_OS}-oe-g++
+ bash ${WORKDIR}/qmake.conf.sh > mkspecs/${TARGET_OS}-oe-g++/qmake.conf
+
+ mkdir -p mkspecs/build-oe-g++
+ cp -f ${WORKDIR}/qplatformdefs.h mkspecs/build-oe-g++
+
+ ## FIXME, the file nameing is dumb...
+ cp ${WORKDIR}/qmake-build.conf.sh mkspecs/build-oe-g++/qmake.conf
+
+ ./configure -v \
+ -opensource -confirm-license \
+ -prefix ${prefix} \
+ -bindir ${bindir} \
+ -libdir ${libdir} \
+ -datadir ${datadir}/${QT_DIR_NAME} \
+ -sysconfdir ${sysconfdir}/${QT_DIR_NAME} \
+ -docdir ${docdir}/${QT_DIR_NAME} \
+ -headerdir ${includedir}/${QT_DIR_NAME} \
+ -plugindir ${libdir}/${QT_DIR_NAME}/plugins \
+ -importdir ${libdir}/${QT_DIR_NAME}/imports \
+ -translationdir ${datadir}/${QT_DIR_NAME}/translations \
+ -examplesdir ${bindir}/${QT_DIR_NAME}/examples \
+ -shared \
+ -no-rpath \
+ -platform build-oe-g++ \
+ -xplatform ${TARGET_OS}-oe-g++ \
+ ${QT_TESTS} \
+ ${QT_EXAMPLES} \
+ ${QT_DEMOS} \
+ ${QT_CONFIG_FLAGS} -no-fast
+}
+
+do_compile() {
+ unset CFLAGS CXXFLAGS AR
+
+ export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
+
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake install INSTALL_ROOT=${D}
+}
-S = "${WORKDIR}/${QT_MODULE}-opensource-src-${QT_VERSION}"
+FILES_${PN} = "${libdir}/*.so.*"
+FILES_${PN}-dbg = "${libdir}/.debug/*.so.*"
+FILES_${PN}-dev = "${libdir}/cmake/* ${libdir}/pkgconfig/*.pc ${libdir}/*.la ${libdir}/*.prl ${includedir}/qt5/*"
+FILES_${PN}-staticdev = "${libdir}/libQt*.a"
--- /dev/null
+inherit siteinfo
+
+set_arch() {
+ case ${TARGET_ARCH} in
+ arm*) QT_ARCH=arm ;;
+ i*86*) QT_ARCH=i386 ;;
+ mips*) QT_ARCH=mips ;;
+ powerpc*) QT_ARCH=powerpc ;;
+ x86_64*) QT_ARCH=x86_64 ;;
+ esac
+}
+
+set_endian() {
+ if [ ${SITEINFO_ENDIANNESS} = "le" ] ; then
+ QT_ENDIAN="-little-endian"
+ elif [ ${SITEINFO_ENDIANNESS} = "be" ] ; then
+ QT_ENDIAN="-big-endian"
+ fi
+}
--- /dev/null
+require qt5.inc
+
+SRC_URI += " \
+ file://0001-Allowing-the-customization-of-the-paths.patch \
+ file://0002-qmake-is-already-built-in-qt5-tools-native.patch \
+ file://0003-Allow-building-a-separate-qmake-for-the-target.patch \
+"
+#file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
+
+# to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h
+DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms"
+
+INC_PR = "r0"
+
+QT_BASE_NAME = "qt5"
+QT_DIR_NAME = "qt5"
+
+export QMAKESPEC = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++"
+
+# Qt uses atomic instructions not supported in thumb mode
+ARM_INSTRUCTION_SET = "arm"
+
+inherit qmake5
--- /dev/null
+From 183cf66e2770f7fbc420cf7aa94a9a8564785044 Mon Sep 17 00:00:00 2001
+From: Mikko Levonmaa <mikko.levonmaa@palm.com>
+Date: Wed, 7 Nov 2012 14:48:46 -0800
+Subject: [PATCH] Allowing the customization of the paths
+
+Signed-off-by: Mikko Levonmaa <mikko.levonmaa@palm.com>
+---
+ src/corelib/global/qlibraryinfo.cpp | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
+index ccf0718..487b8eb 100644
+--- a/src/corelib/global/qlibraryinfo.cpp
++++ b/src/corelib/global/qlibraryinfo.cpp
+@@ -49,6 +49,7 @@
+ QT_BEGIN_NAMESPACE
+ extern QString qt_libraryInfoFile();
+ QT_END_NAMESPACE
++#include <stdlib.h>
+ #elif defined(QT_BOOTSTRAPPED)
+ QString qt_libraryInfoFile()
+ {
+@@ -164,6 +165,11 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
+ }
+ }
+ #endif
++ if (!QFile::exists(qtconfig)) {
++ QByteArray config = getenv("QT_CONF_PATH");
++ qtconfig = QFile::decodeName(config);
++ printf("Using qt.conf from: %s\n", qtconfig.toLatin1().data());
++ }
+ if (QFile::exists(qtconfig))
+ return new QSettings(qtconfig, QSettings::IniFormat);
+ return 0; //no luck
+--
+1.7.4.1
+
--- /dev/null
+From d5a0cf45ebbd6a5911f8bd208fe355eb990b5388 Mon Sep 17 00:00:00 2001
+From: Holger Freyther <zecke@selfish.org>
+Date: Wed, 26 Sep 2012 17:22:30 +0200
+Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the environment
+
+Allow to set a qt.conf from the outside using the environment. This allows
+to inject new prefixes and other paths into qmake. This is needed when using
+the same qmake binary to build qt/x11 and qt/embedded
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/corelib/global/qlibraryinfo.cpp | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
+index ccf0718..497e72e 100644
+--- a/src/corelib/global/qlibraryinfo.cpp
++++ b/src/corelib/global/qlibraryinfo.cpp
+@@ -49,6 +49,8 @@
+ QT_BEGIN_NAMESPACE
+ extern QString qt_libraryInfoFile();
+ QT_END_NAMESPACE
++#include <stdlib.h>
++#include <stdio.h>
+ #elif defined(QT_BOOTSTRAPPED)
+ QString qt_libraryInfoFile()
+ {
+@@ -142,6 +143,11 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
+ #ifdef QT_BOOTSTRAPPED
+ if(!QFile::exists(qtconfig))
+ qtconfig = qt_libraryInfoFile();
++ if (!QFile::exists(qtconfig)) {
++ QByteArray config = getenv("QT_CONF_PATH");
++ qtconfig = QFile::decodeName(config);
++ printf("using qt.conf %s", qtconfig.toLatin1().data());
++ }
+ #else
+ if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {
+ #ifdef Q_OS_MAC
+--
+1.7.4.1
+
--- /dev/null
+From aab01049543f4508f1dc92fb62b980d1d0c3bcc0 Mon Sep 17 00:00:00 2001
+From: Michael Krelin <hacker@klever.net>
+Date: Mon, 29 Oct 2012 20:07:49 -0700
+Subject: [PATCH] qmake is already built in qt5-tools-native
+
+Ported from OE by: Yu Ke <ke.yu@intel.com>
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com>
+---
+ configure | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure b/configure
+index c3e61d6..5e43a19 100755
+--- a/configure
++++ b/configure
+@@ -3594,7 +3594,7 @@ setBootstrapVariable()
+ }
+
+ # build qmake
+-if true; then ###[ '!' -f "$outpath/bin/qmake" ];
++if false; then ###[ '!' -f "$outpath/bin/qmake" ];
+ echo "Creating qmake. Please wait..."
+
+ #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
+--
+1.7.4.1
+
--- /dev/null
+From a2a01e1fd975e8e616b580423c3bf30db9c11b6d Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Mon, 29 Oct 2012 20:26:36 -0700
+Subject: [PATCH] Allow building a separate qmake for the target
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com>
+---
+ qmake/qmake.pro | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/qmake/qmake.pro b/qmake/qmake.pro
+index 0d92ac2..07fa80e 100644
+--- a/qmake/qmake.pro
++++ b/qmake/qmake.pro
+@@ -9,6 +9,7 @@ CONFIG -= qt shared app_bundle uic
+ DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED \
+ PROEVALUATOR_FULL PROEVALUATOR_DEBUG
+ DESTDIR = ../bin/
++TARGET = qmake2
+
+ OBJECTS_DIR = .
+ MOC_DIR = .
+--
+1.7.4.1
+
--- /dev/null
+require qtbase.inc
+require qt5-4.999+git.inc
+
+PR = "${INC_PR}.0"
+
+SRCREV = "f7d99ad50f11ee7c263d4c2bdbe024355a1ab3e9"