aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-02-27 21:26:09 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-17 16:09:56 +0200
commit70b1b233b20c4128cd068c35244c1a97934edf1d (patch)
tree7ef6af7444accecfd34264a78e07b8db4ad5c147
parent5d5ba83cc6eadbff6d60d5ae4947bc9b48d846f4 (diff)
qt5-native, qtjsbackend-native: fix .pri and .prl pointing to WORKDIR or absolute sysroot
* 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/ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--classes/qmake5.bbclass5
-rw-r--r--classes/qmake5_base.bbclass58
-rw-r--r--recipes-qt/qt5/qt5.inc10
-rw-r--r--recipes-qt/qt5/qtbase-native.inc31
-rw-r--r--recipes-qt/qt5/qtbase.inc2
-rw-r--r--recipes-qt/qt5/qtjsbackend-native.inc29
6 files changed, 63 insertions, 72 deletions
diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass
index 00d6c0ea..68c19f7f 100644
--- a/classes/qmake5.bbclass
+++ b/classes/qmake5.bbclass
@@ -6,11 +6,6 @@ inherit qmake5_base
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"
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index ee5ff780..b9279967 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -1,35 +1,51 @@
+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
diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc
index 97f3ee17..8d5dd81e 100644
--- a/recipes-qt/qt5/qt5.inc
+++ b/recipes-qt/qt5/qt5.inc
@@ -55,19 +55,11 @@ QT_CONFIG_FLAGS += " \
${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++
diff --git a/recipes-qt/qt5/qtbase-native.inc b/recipes-qt/qt5/qtbase-native.inc
index db1292cd..c401c7bd 100644
--- a/recipes-qt/qt5/qtbase-native.inc
+++ b/recipes-qt/qt5/qtbase-native.inc
@@ -3,18 +3,24 @@ DEPENDS = "zlib-native dbus-native"
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} \
@@ -34,9 +40,14 @@ EXTRA_OECONF = " \
-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 \
@@ -54,10 +65,10 @@ do_configure() {
}
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
}
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc
index f420d37a..d4a5652d 100644
--- a/recipes-qt/qt5/qtbase.inc
+++ b/recipes-qt/qt5/qtbase.inc
@@ -70,7 +70,7 @@ do_configure_append() {
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 \
diff --git a/recipes-qt/qt5/qtjsbackend-native.inc b/recipes-qt/qt5/qtjsbackend-native.inc
index 37e2b80d..56bb854c 100644
--- a/recipes-qt/qt5/qtjsbackend-native.inc
+++ b/recipes-qt/qt5/qtjsbackend-native.inc
@@ -7,44 +7,21 @@ QT_MODULE = "qtjsbackend"
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() {