diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index 7012d0d741..09cb3ea535 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass @@ -14,21 +14,22 @@ export OE_QMAKE_RPATH="-Wl,-rpath-link," STRIP[unexport] = "1" do_generate_qt_config_file() { - export QT_CONF_PATH=${WORKDIR}/qt.conf - cat > ${WORKDIR}/qt.conf < ${WORKDIR}/qt.conf < mkspecs/${TARGET_OS}-oe-g++/qmake.conf + ### Stage the base mkspecs so that 'HostData' will find them mkdir -p ${STAGING_DATADIR}/${QT_DIR_NAME} - cp -r ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs + cp -r ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs ${STAGING_DATADIR}/${QT_DIR_NAME}/ + ### Make sure that modules are installed correctly. During configure they will pick this one + ### instead of the one from ${S}/mkspecs... + sed -i '/pritarget/s/QT_HOST_DATA/OE_CROSS_INSTALL_DATA/' \ + ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/features/qt_installs.prf + rm -rf ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/modules* + + ### Remove the old pri files + rm ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/*.pri + echo "[Paths]" > $QT_CONF_PATH echo "Binaries=${bindir}" >> $QT_CONF_PATH @@ -98,9 +118,10 @@ do_configure() { 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 "HostData=${STAGING_DATADIR}/${QT_DIR_NAME}" >> $QT_CONF_PATH + echo "HostData=${STAGING_DATADIR}/${QT_DIR_NAME}" >> $QT_CONF_PATH ./configure -v \ + -dont-process \ -opensource -confirm-license \ -prefix ${prefix} \ -bindir ${bindir} \ @@ -117,16 +138,21 @@ do_configure() { -xplatform ${TARGET_OS}-oe-g++ \ ${QT_CONFIG_FLAGS} - ### Since we are pointing our host data we need to get them there before compile + ### Since we are pointing our host data we need to get them there before compilation if [ ! -e ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++ ]; then cp -rf mkspecs/${TARGET_OS}-oe-g++ ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++ fi ### qmodule.pri and qconfig.pri contain target specific stuff copy them over as well cp -f mkspecs/qmodule.pri ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/qmodule.pri cp -f mkspecs/qconfig.pri ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/qconfig.pri + + ### As we provided the '-dont-process' switch inorder to allow us to stage a few files + ### generated by the configure we need to manually run qmake the generate _all_ the Makefiles (-r) + ${OE_QMAKE_QMAKE} -r -d } do_compile() { + unset CFLAGS CXXFLAGS AR oe_runmake ${EXTRA_ENV} @@ -141,7 +167,8 @@ do_compile() { do_install() { oe_runmake install INSTALL_ROOT=${D} - # Fix up the binaries to the right location + ### Fix up the binaries to the right location + ### TODO: FIX install -d ${D}${bindir}/ mv ${D}/${STAGING_BINDIR_NATIVE}/* ${D}${bindir}/ rm -rf ${D}/${STAGING_BINDIR_NATIVE}/ @@ -153,11 +180,17 @@ do_install() { FILES_${PN} = "${libdir}/*.so.*" FILES_${PN}-dbg = "${libdir}/.debug/*.so.*" -FILES_${PN}-plugins = "${libdir}/${QT_DIR_NAME}/platforms/*" -FILES_${PN}-plugins-dbg = "${libdir}/${QT_DIR_NAME}/platforms/.debug/*" +FILES_${PN}-plugins = "${libdir}/${QT_DIR_NAME}/plugins/*" +FILES_${PN}-plugins-dbg = "${libdir}/${QT_DIR_NAME}/plugins/.debug/*" -FILES_${PN}-dev = "${libdir}/cmake/* ${libdir}/pkgconfig/*.pc ${libdir}/*.la ${libdir}/*.prl ${includedir}/qt5/*" +FILES_${PN}-dev = " \ + ${libdir}/cmake/* \ + ${libdir}/pkgconfig/*.pc \ + ${libdir}/*.la \ + ${libdir}/*.prl \ + ${includedir}/qt5/* \ + ${datadir}/qt5/* \ +" FILES_${PN}-staticdev = "${libdir}/libQt*.a" FILES_${PN}-tools = "${bindir}/*" -FILES_${PN}-mkspecs = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/*" -FILES_${PN}-doc = "${STAGING_DATADIR}/doc/*" +FILES_${PN}-doc = "${datadir}/doc/*" diff --git a/recipes-qt/qt5/qtbase_4.999+git.bb b/recipes-qt/qt5/qtbase_4.999+git.bb index fe8fd1e571..0477df2474 100644 --- a/recipes-qt/qt5/qtbase_4.999+git.bb +++ b/recipes-qt/qt5/qtbase_4.999+git.bb @@ -3,4 +3,4 @@ require qt5-4.999+git.inc PR = "${INC_PR}.0" -SRCREV = "f7d99ad50f11ee7c263d4c2bdbe024355a1ab3e9" +SRCREV = "b9321a1a5f1b255e5e5860edb42c63a4e4da6804" \ No newline at end of file diff --git a/recipes-qt/qt5/qtdeclarative.inc b/recipes-qt/qt5/qtdeclarative.inc new file mode 100644 index 0000000000..bf904753cb --- /dev/null +++ b/recipes-qt/qt5/qtdeclarative.inc @@ -0,0 +1,45 @@ +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780" + +DEPENDS = "qtbase qtjsbackend" + +INC_PR = "r0" + +inherit qmake5 + +SRC_URI += " \ + file://module_qmake.conf \ + " + +export QT_CONF_PATH="${WORKDIR}/qt.conf" + +do_configure () { + # Avoid setting QMAKE_LINK from LD (since we want the linker to be g++) + unset LD + + # 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 + + ${OE_QMAKE_QMAKE} -r -d +} + +do_install() { + oe_runmake install INSTALL_ROOT=${D} +} + +FILES_${PN}-dev = "\ + ${includedir}/qt5/* \ + ${datadir}/qt5/mkspecs/* \ + ${libdir}/*.prl \ + ${libdir}/cmake/* \ + ${libdir}/pkgconfig/*.pc \ +" + +FILES_${PN}-staticdev = "${libdir}/*.la" +FILES_${PN}-tools = "${bindir}/*" +FILES_${PN}-qmlplugins = "${libdir}/qt5/qml/*" +FILES_${PN}-qmltooling = "${libdir}/qt5/plugins/qmltooling/*" +FILES_${PN}-qmltooling-dbg = "${libdir}/qt5/plugins/qmltooling/.debug/*" + +PACAKGES += "FILES_${PN}-tools FILES_${PN}-qmlplugins FILES_${PN}-qmltooling FILES_${PN}-qmltooling-dbg" \ No newline at end of file diff --git a/recipes-qt/qt5/qtdeclarative_4.999+git.bb b/recipes-qt/qt5/qtdeclarative_4.999+git.bb new file mode 100644 index 0000000000..8551d74c4c --- /dev/null +++ b/recipes-qt/qt5/qtdeclarative_4.999+git.bb @@ -0,0 +1,7 @@ +SRCREV = "425260c2b2a60c0c145a5e76a3b7835eadd0fd0d" +SRC_URI += "git://gitorious.org/qt/qtdeclarative.git;protocol=git" +S = "${WORKDIR}/git" + +require qtdeclarative.inc + +PR = "${INC_PR}.0" diff --git a/recipes-qt/qt5/qtjsbackend-native.inc b/recipes-qt/qt5/qtjsbackend-native.inc new file mode 100644 index 0000000000..7595e53d5b --- /dev/null +++ b/recipes-qt/qt5/qtjsbackend-native.inc @@ -0,0 +1,32 @@ +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780" + +DEPENDS = "qt5-native" + +INC_PR = "r0" + +inherit native + +SRC_URI += "\ + file://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 = "" + +do_configure() { + # Avoid setting QMAKE_LINK from LD (since we want the linker to be g++) + unset LD + + # This should not be needed. Perhaps the lack of this file is an indication + # of an error on the native recipe... + cp ${WORKDIR}/qmake.conf ${S}/.qmake.conf + + ${STAGING_BINDIR_NATIVE}/qmake -d +} + +do_install() { + oe_runmake install INSTALL_ROOT=${D} +} diff --git a/recipes-qt/qt5/qtjsbackend-native_4.999+git.bb b/recipes-qt/qt5/qtjsbackend-native_4.999+git.bb new file mode 100644 index 0000000000..54dd21a76d --- /dev/null +++ b/recipes-qt/qt5/qtjsbackend-native_4.999+git.bb @@ -0,0 +1,8 @@ +SRCREV = "b41c2151fdfca3f63a6cd45f6c69ae678694b63e" +SRC_URI += "git://gitorious.org/qt/qtjsbackend.git;protocol=git" + +S = "${WORKDIR}/git" + +require qtjsbackend-native.inc + +PR = "${INC_PR}.0" diff --git a/recipes-qt/qt5/qtjsbackend.inc b/recipes-qt/qt5/qtjsbackend.inc new file mode 100644 index 0000000000..c9a5db913f --- /dev/null +++ b/recipes-qt/qt5/qtjsbackend.inc @@ -0,0 +1,40 @@ +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780" + +DEPENDS = "qtbase" + +INC_PR = "r0" + +inherit qmake5 + +SRC_URI += " \ + file://module_qmake.conf \ + file://0002-Make-sure-that-we-pick-up-the-mkv8snapshot-tool.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" + +do_configure () { + # Avoid setting QMAKE_LINK from LD (since we want the linker to be g++) + unset LD + + # 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 + + ${OE_QMAKE_QMAKE} -r -d +} + +do_install() { + oe_runmake install INSTALL_ROOT=${D} +} + +FILES_${PN}-dev += "\ + ${incdir}/qt5/* \ + ${datadir}/qt5/* \ + ${libdir}/*.prl \ +" diff --git a/recipes-qt/qt5/qtjsbackend/0001-Install-the-mkv8snapshot-tool-to-the-native-side.patch b/recipes-qt/qt5/qtjsbackend/0001-Install-the-mkv8snapshot-tool-to-the-native-side.patch new file mode 100644 index 0000000000..556ece1470 --- /dev/null +++ b/recipes-qt/qt5/qtjsbackend/0001-Install-the-mkv8snapshot-tool-to-the-native-side.patch @@ -0,0 +1,32 @@ +From d962ede7b874be21af636e07205cbb3866d82b27 Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Tue, 4 Dec 2012 11:20:13 -0800 +Subject: [PATCH] Install the mkv8snapshot tool to the native side + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Mikko Levonmaa +--- + src/tools/mkv8snapshot/mkv8snapshot.pro | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/tools/mkv8snapshot/mkv8snapshot.pro b/src/tools/mkv8snapshot/mkv8snapshot.pro +index 16beb02..5e327f7 100644 +--- a/src/tools/mkv8snapshot/mkv8snapshot.pro ++++ b/src/tools/mkv8snapshot/mkv8snapshot.pro +@@ -24,5 +24,10 @@ unix:LIBS += -lpthread + + # We don't need to install this tool, it's only used for building v8. + # However we do have to make sure that 'make install' builds it. +-dummytarget.CONFIG = dummy_install +-INSTALLS += dummytarget ++#dummytarget.CONFIG = dummy_install ++#INSTALLS += dummytarget ++ ++# Install the tool so that during target cross compilation we have access to the native side binary ++target.path = $$[QT_HOST_BINS] ++INSTALLS += target ++ +-- +1.7.4.1 + diff --git a/recipes-qt/qt5/qtjsbackend/0002-Make-sure-that-we-pick-up-the-mkv8snapshot-tool.patch b/recipes-qt/qt5/qtjsbackend/0002-Make-sure-that-we-pick-up-the-mkv8snapshot-tool.patch new file mode 100644 index 0000000000..8ec57ebac2 --- /dev/null +++ b/recipes-qt/qt5/qtjsbackend/0002-Make-sure-that-we-pick-up-the-mkv8snapshot-tool.patch @@ -0,0 +1,30 @@ +From 3e07a136f42db68390cb9e20f5476e896f3bcd63 Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Tue, 4 Dec 2012 11:25:22 -0800 +Subject: [PATCH 2/2] Make sure that we pick up the mkv8snapshot tool + from the native sysroot + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Mikko Levonmaa +--- + src/v8/v8.pro | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/src/v8/v8.pro b/src/v8/v8.pro +index 2be6a19..2478e5f 100644 +--- a/src/v8/v8.pro ++++ b/src/v8/v8.pro +@@ -25,7 +25,8 @@ INCLUDEPATH -= $$MODULE_INCLUDES $$MODULE_INCLUDES/.. + include(v8.pri) + + contains(QT_CONFIG, v8snapshot) { +- mkv8snapshot.commands = ../../bin/mkv8snapshot$$qtPlatformTargetSuffix() ${QMAKE_FILE_OUT} ++ #mkv8snapshot.commands = ../../bin/mkv8snapshot$$qtPlatformTargetSuffix() ${QMAKE_FILE_OUT} ++ mkv8snapshot.commands = mkv8snapshot$$qtPlatformTargetSuffix() ${QMAKE_FILE_OUT} + DUMMY_FILE = v8.pro + mkv8snapshot.input = DUMMY_FILE + mkv8snapshot.output = $$V8_GENERATED_SOURCES_DIR/snapshot.cpp +-- +1.7.4.1 + diff --git a/recipes-qt/qt5/qtjsbackend_4.999+git.bb b/recipes-qt/qt5/qtjsbackend_4.999+git.bb new file mode 100644 index 0000000000..de19fb3182 --- /dev/null +++ b/recipes-qt/qt5/qtjsbackend_4.999+git.bb @@ -0,0 +1,7 @@ +SRCREV = "b41c2151fdfca3f63a6cd45f6c69ae678694b63e" +SRC_URI += "git://gitorious.org/qt/qtjsbackend.git;protocol=git" +S = "${WORKDIR}/git" + +require qtjsbackend.inc + +PR = "${INC_PR}.0"