* fix paralel build
* default make does good job, cleans mkspecs, installs all headers and
libs needed for qtjsbackend-native
* move native tools to QT_DIR_NAME prefix, this way qt4 and qt5 can be
staged at the same time
* only variables referencing WORKDIR are now QMAKE_PRL_BUILD_DIR
./x86_64-linux/usr/lib/libQt5Network.prl:QMAKE_PRL_BUILD_DIR = /OE/oe-core/tmp-eglibc/work/x86_64-linux/qt5-native/5.0.1-r0.0/qtbase-opensource-src-5.0.1/src/network/
./x86_64-linux/usr/lib/libQt5Xml.prl:QMAKE_PRL_BUILD_DIR = /OE/oe-core/tmp-eglibc/work/x86_64-linux/qt5-native/5.0.1-r0.0/qtbase-opensource-src-5.0.1/src/xml/
./x86_64-linux/usr/lib/libQt5Bootstrap.prl:QMAKE_PRL_BUILD_DIR = /OE/oe-core/tmp-eglibc/work/x86_64-linux/qt5-native/5.0.1-r0.0/qtbase-opensource-src-5.0.1/src/tools/bootstrap/
./x86_64-linux/usr/lib/libQt5Concurrent.prl:QMAKE_PRL_BUILD_DIR = /OE/oe-core/tmp-eglibc/work/x86_64-linux/qt5-native/5.0.1-r0.0/qtbase-opensource-src-5.0.1/src/concurrent/
./x86_64-linux/usr/lib/libQt5Core.prl:QMAKE_PRL_BUILD_DIR = /OE/oe-core/tmp-eglibc/work/x86_64-linux/qt5-native/5.0.1-r0.0/qtbase-opensource-src-5.0.1/src/corelib/
./x86_64-linux/usr/lib/libQt5Test.prl:QMAKE_PRL_BUILD_DIR = /OE/oe-core/tmp-eglibc/work/x86_64-linux/qt5-native/5.0.1-r0.0/qtbase-opensource-src-5.0.1/src/testlib/
./x86_64-linux/usr/lib/libQt5Sql.prl:QMAKE_PRL_BUILD_DIR = /OE/oe-core/tmp-eglibc/work/x86_64-linux/qt5-native/5.0.1-r0.0/qtbase-opensource-src-5.0.1/src/sql/
./x86_64-linux/usr/lib/libQt5DBus.prl:QMAKE_PRL_BUILD_DIR = /OE/oe-core/tmp-eglibc/work/x86_64-linux/qt5-native/5.0.1-r0.0/qtbase-opensource-src-5.0.1/src/dbus/
(From meta-qt5 rev:
70b1b233b20c4128cd068c35244c1a97934edf1d)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
QT5TOOLSDEPENDS ?= "qtbase-native "
DEPENDS_prepend = "${QT5TOOLSDEPENDS}"
-export QMAKESPEC = "${STAGING_DATADIR}/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"
+QMAKE_MKSPEC_PATH ?= "${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs"
+OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
+QMAKESPEC := "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
-# We override this completely to eliminate the -e normally passed in
-EXTRA_OEMAKE = ' MAKEFLAGS= '
+EXTRA_OEMAKE = ' MAKEFLAGS=${PARALLEL_MAKE} '
-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,"
+EXTRA_ENV = 'QMAKE="${OE_QMAKE_QMAKE} -d -after \
+ INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
+ LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
+ AR="${TARGET_PREFIX}ar cqs" \
+ MOC="${OE_QMAKE_MOC}" \
+ UIC="${OE_QMAKE_UIC}" \
+ RCC="${OE_QMAKE_RCC}" \
+ MAKE="make -e ${PARALLEL_MAKE}"'
+
+export QMAKESPEC = "${QMAKE_MKSPEC_PATH}/${TARGET_OS}-oe-g++"
+export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}/qmake"
+export OE_QMAKE_UIC = "${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}/uic"
+export OE_QMAKE_MOC = "${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}/moc"
+export OE_QMAKE_RCC = "${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}/rcc"
+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,"
+export OE_QMAKE_CONF_COMPILER = "g++"
+export QT_CONF_PATH = "${WORKDIR}/qt.conf"
+export QT_DIR_NAME ?= "qt5"
# 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]
Binaries = ${bindir}
-Headers = ${STAGING_INCDIR}/qt5
-Plugins = ${libdir}/qt5/plugins
-Libraries = ${STAGING_LIBDIR}
-Imports = ${datadir}/qt5/imports
-Qml2Imports = ${libdir}/qt5/qml
-Documentation=${docdir}/qt5
-Data = ${datadir}/qt5
-HostData = ${STAGING_DATADIR}/qt5
-HostBinaries = ${STAGING_BINDIR_NATIVE}
+Libraries = ${libdir}
+Prefix = ${prefix}
+Headers = ${includedir}/${QT_DIR_NAME}
+Data = ${datadir}/${QT_DIR_NAME}
+ArchData = ${libdir}/${QT_DIR_NAME}
+Documentation = ${docdir}/${QT_DIR_NAME}
+HostData = ${STAGING_DATADIR}/${QT_DIR_NAME}
+HostSpecPath = ${QMAKE_MKSPEC_PATH}
+HostBinaries = ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}
EOF
-
}
addtask generate_qt_config_file after do_patch before do_configure
${QT_DEMOS} \
"
-EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake -d -after \
- INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
- LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
- AR="${TARGET_PREFIX}ar cqs" \
- MOC="${STAGING_BINDIR_NATIVE}/moc" UIC="${STAGING_BINDIR_NATIVE}/uic" MAKE="make -e ${PARALLEL_MAKE}"'
-
-export QT_CONF_PATH="${S}/qt.conf"
-
do_configure() {
set_endian
if [ ! -e bin/qmake ]; then
- ln -sf ${STAGING_BINDIR_NATIVE}/qmake bin/qmake
+ ln -sf ${OE_QMAKE_QMAKE} bin/qmake
fi
# Avoid problems with the linkers, since we want the linker to be g++
SECTION = "libs"
HOMEPAGE = "http://qt-project.org"
-INC_PR = "r0"
+INC_PR = "r1"
inherit native
QT_MODULE = "qtbase"
+SSTATE_SCAN_FILES += "*.pri *.prl"
+QT_DIR_NAME ?= "qt5"
+
SRC_URI += " \
file://0001-qlibraryinfo-Allow-the-specification-of-where-to-loa.patch \
file://0003-qtbase-Allow-qt.conf-override-when-bootstrapping.patch \
file://0001-Always-build-uic.patch \
"
+EXTRA_ENV = 'MAKE="make -e ${PARALLEL_MAKE}"'
+EXTRA_OEMAKE = ' MAKEFLAGS=${PARALLEL_MAKE} '
+
EXTRA_OECONF = " \
-prefix ${prefix} \
-L ${STAGING_LIBDIR_NATIVE} \
-no-openssl \
-no-xcb \
-verbose -release \
- -headerdir ${includedir}/qt5 \
- -datadir ${datadir}/qt5 \
- -docdir ${docdir}/qt5 \
+ -prefix ${prefix} \
+ -bindir ${bindir}/${QT_DIR_NAME} \
+ -headerdir ${includedir}/${QT_DIR_NAME} \
+ -archdatadir ${libdir}/${QT_DIR_NAME} \
+ -datadir ${datadir}/${QT_DIR_NAME} \
+ -docdir ${docdir}/${QT_DIR_NAME} \
+ -hostdatadir ${datadir}/${QT_DIR_NAME} \
+ -hostbindir ${bindir}/${QT_DIR_NAME} \
-no-glib \
-no-iconv \
-silent \
}
do_install() {
- install -d ${D}${bindir}/
- for i in findtr fixqt4headers.pl moc qdoc qmake rcc qdbuscpp2xml qdbusxml2cpp syncqt uic; do
- install -v -m 0755 bin/${i} ${D}${bindir}/${i}
- done
- install -d ${D}${datadir}/qt5/
- cp -PfR mkspecs ${D}${datadir}/qt5/
+ oe_runmake install INSTALL_ROOT=${D}
+ ln -sf linux-g++ ${D}${datadir}/${QT_DIR_NAME}/mkspecs/${BUILD_OS}-oe-g++
+
+ # replace common files with our version
+ cp -f ${WORKDIR}/g++.conf ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/g++-unix.conf
+ cp -f ${WORKDIR}/linux.conf ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/linux.conf
}
echo "Translations=${datadir}/${QT_DIR_NAME}/translations" >> $QT_CONF_PATH
echo "Settings=${sysconfdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH
echo "Examples=${bindir}/${QT_DIR_NAME}/examples" >> $QT_CONF_PATH
- echo "HostBinaries=${STAGING_BINDIR_NATIVE}" >> $QT_CONF_PATH
+ echo "HostBinaries=${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}" >> $QT_CONF_PATH
echo "HostData=${STAGING_DATADIR}/${QT_DIR_NAME}" >> $QT_CONF_PATH
./configure -v \
INC_PR = "r0"
-inherit native
+inherit native qmake5_base
SRC_URI += "\
- file://module_qmake.conf \
file://0001-Install-the-mkv8snapshot-tool-to-the-native-side.patch \
"
# Bitbake will not respect the make order set by qmake and at times it will try to compile
# parts of the source tree with out the 'mkv8snapshot' tool if it is enabled and that will fail
-PARALLEL_MAKE = ""
-
-export QT_CONF_PATH="${WORKDIR}/qt.conf"
+#PARALLEL_MAKE = ""
do_configure() {
# Avoid setting QMAKE_LINK from LD (since we want the linker to be g++)
unset LD
- cat > ${WORKDIR}/qt.conf <<EOF
-[Paths]
-Prefix = ${prefix}
-Binaries = ${bindir}
-Headers = ${includedir}/qt5
-Plugins = ${libdir}/qt5/plugins
-Libraries = ${libdir}
-Imports = ${datadir}/qt5/imports
-Qml2Imports = ${libdir}/qt5/qml
-Documentation=${docdir}/qt5
-Data = ${datadir}/qt5
-HostPrefix = ${STAGING_DATADIR}
-HostData = ${STAGING_DATADIR}/qt5
-HostBinaries = ${STAGING_BINDIR_NATIVE}
-EOF
-
- # This should not be needed. Perhaps the lack of this file is an indication
- # of an error on the native recipe...
- cp ${WORKDIR}/module_qmake.conf ${S}/.qmake.conf
-
- ${STAGING_BINDIR_NATIVE}/qmake -d -r
+ ${OE_QMAKE_QMAKE} -d -r
}
do_install() {