summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@theqtcompany.com>2016-01-12 10:05:17 +0200
committerSamuli Piippo <samuli.piippo@theqtcompany.com>2016-01-14 14:19:00 +0000
commitad6dfe6b1474da24884c469f78bdab8c080e936d (patch)
treef6ce47f93a2ab23d3aba2470394cee2b13bb8da9
parent3b0f70a63d303af37dc1a77670eea12cfc364975 (diff)
downloadmeta-boot2qt-ad6dfe6b1474da24884c469f78bdab8c080e936d.tar.gz
qt5: use qmake built-in variables instead of patching
Change the host paths during SDK build to qmake build-in variables, so that we don't need to patch anything during SDK installation. Change-Id: I9273d85f10da5aa1897f35f1866abb4d80a625fd Reviewed-by: Teemu Holappa <teemu.holappa@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
-rw-r--r--recipes-qt/meta/b2qt-sdk.inc15
-rw-r--r--recipes-qt/qt5/qtbase_git.bbappend7
2 files changed, 11 insertions, 11 deletions
diff --git a/recipes-qt/meta/b2qt-sdk.inc b/recipes-qt/meta/b2qt-sdk.inc
index 87ceb96..4a3a00b 100644
--- a/recipes-qt/meta/b2qt-sdk.inc
+++ b/recipes-qt/meta/b2qt-sdk.inc
@@ -50,20 +50,13 @@ create_sdk_files_append () {
50 static_cxxflags=$(echo $static_cxxflags | sed -e "s/$i //") 50 static_cxxflags=$(echo $static_cxxflags | sed -e "s/$i //")
51 done 51 done
52 echo "MACHINE = ${MACHINE}" > ${SDK_DEVICE_PRI} 52 echo "MACHINE = ${MACHINE}" > ${SDK_DEVICE_PRI}
53 echo "CROSS_COMPILE = ${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}/${TARGET_PREFIX}" >> ${SDK_DEVICE_PRI} 53 echo "CROSS_COMPILE = \$\$[QT_HOST_PREFIX]${bindir_nativesdk}/${TARGET_SYS}/${TARGET_PREFIX}" >> ${SDK_DEVICE_PRI}
54 echo "QMAKE_CFLAGS *= ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT} ${static_cflags}" >> ${SDK_DEVICE_PRI} 54 echo "QMAKE_CFLAGS *= ${TARGET_CC_ARCH} --sysroot=\$\$[QT_SYSROOT] ${static_cflags}" >> ${SDK_DEVICE_PRI}
55 echo "QMAKE_CXXFLAGS *= ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT} ${static_cxxflags}" >> ${SDK_DEVICE_PRI} 55 echo "QMAKE_CXXFLAGS *= ${TARGET_CC_ARCH} --sysroot=\$\$[QT_SYSROOT] ${static_cxxflags}" >> ${SDK_DEVICE_PRI}
56 echo "QMAKE_LFLAGS *= ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT} ${TARGET_LDFLAGS}" >> ${SDK_DEVICE_PRI} 56 echo "QMAKE_LFLAGS *= ${TARGET_CC_ARCH} --sysroot=\$\$[QT_SYSROOT] ${TARGET_LDFLAGS}" >> ${SDK_DEVICE_PRI}
57 57
58 # Setup qt.conf to point at the device mkspec by default 58 # Setup qt.conf to point at the device mkspec by default
59 qtconf=${SDK_OUTPUT}/${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qt.conf 59 qtconf=${SDK_OUTPUT}/${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qt.conf
60 echo 'HostSpec = linux-g++' >> $qtconf 60 echo 'HostSpec = linux-g++' >> $qtconf
61 echo 'TargetSpec = devices/linux-oe-generic-g++' >> $qtconf 61 echo 'TargetSpec = devices/linux-oe-generic-g++' >> $qtconf
62
63 # change staging paths to target sdk paths, so they can be relocated at install time
64 sed -i -e 's:${STAGING_DIR_NATIVE}:${SDKPATHNATIVE}:g' ${SDK_MKSPEC_DIR}/*.pri
65 sed -i -e 's:${STAGING_DIR}/[^/]*:${SDKTARGETSYSROOT}:g' ${SDK_MKSPEC_DIR}/*.pri
66} 62}
67
68SDK_POST_INSTALL_COMMAND += "$SUDO_EXEC sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" \
69 $target_sdk_dir/sysroots/@REAL_MULTIMACH_TARGET_SYS@/usr/lib/${QT_DIR_NAME}/mkspecs/*.pri ;"
diff --git a/recipes-qt/qt5/qtbase_git.bbappend b/recipes-qt/qt5/qtbase_git.bbappend
index 4e9057a..d83db2e 100644
--- a/recipes-qt/qt5/qtbase_git.bbappend
+++ b/recipes-qt/qt5/qtbase_git.bbappend
@@ -49,3 +49,10 @@ SRCREV = "3880f41e683f02b905c8cbc3c578c3f3a0a1eb2e"
49 49
50# Temporarily here, until merged upstream 50# Temporarily here, until merged upstream
51PACKAGECONFIG[openssl] = "-openssl,-no-openssl,openssl,libssl" 51PACKAGECONFIG[openssl] = "-openssl,-no-openssl,openssl,libssl"
52
53do_install_append() {
54 # Temporarily here, until merged upstream
55 sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX]|g' \
56 -e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' \
57 ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/*.pri
58}