From: Otavio Salvador Date: Thu, 9 Oct 2014 15:45:06 +0000 (-0300) Subject: Fix SDK environment setting X-Git-Tag: rev_ivi_2015_02_04~852 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d6c865151c956f4d479b0da480e4cc4327cae70;p=scm%2Fbb%2Ftizen-distro.git Fix SDK environment setting Since the change to use a meta-environment canadian package in the OE-Core, the SDK environment setting has been broken. This uses the new subscript environment to fix it and also move the environment generation to the nativesdk-qtbase recipe. (From meta-qt5 rev: 2f1b8fe630ac76c8ff5d184f109449b10fde5a92) Signed-off-by: Otavio Salvador Signed-off-by: Patrick Ohly --- diff --git a/meta-qt5/classes/populate_sdk_qt5.bbclass b/meta-qt5/classes/populate_sdk_qt5.bbclass index 7b31bbb..79df489 100644 --- a/meta-qt5/classes/populate_sdk_qt5.bbclass +++ b/meta-qt5/classes/populate_sdk_qt5.bbclass @@ -6,26 +6,7 @@ TOOLCHAIN_TARGET_TASK += "packagegroup-qt5-toolchain-target" # This allow reuse of Qt paths inherit qmake5_paths -toolchain_create_sdk_env_script_append () { - echo 'export PATH=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}:$PATH' >> $script - echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script - echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script - echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script - echo 'export OE_QMAKE_CC=$CC' >> $script - echo 'export OE_QMAKE_CXX=$CXX' >> $script - echo 'export OE_QMAKE_LINK=$CXX' >> $script - echo 'export OE_QMAKE_AR=$AR' >> $script - echo 'export OE_QMAKE_LIBDIR_QT=${SDKTARGETSYSROOT}${OE_QMAKE_PATH_LIBS}' >> $script - echo 'export OE_QMAKE_INCDIR_QT=${SDKTARGETSYSROOT}${OE_QMAKE_PATH_QT_HEADERS}' >> $script - echo 'export OE_QMAKE_MOC=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/moc' >> $script - echo 'export OE_QMAKE_UIC=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/uic' >> $script - echo 'export OE_QMAKE_RCC=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/rcc' >> $script - echo 'export OE_QMAKE_QDBUSCPP2XML=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qdbuscpp2xml' >> $script - echo 'export OE_QMAKE_QDBUSXML2CPP=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qdbusxml2cpp' >> $script - echo 'export OE_QMAKE_QT_CONFIG=${SDKTARGETSYSROOT}${OE_QMAKE_PATH_LIBS}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script - echo 'export QMAKESPEC=${SDKTARGETSYSROOT}${OE_QMAKE_PATH_LIBS}/${QT_DIR_NAME}/mkspecs/linux-oe-g++' >> $script - echo 'export QT_CONF_PATH=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qt.conf' >> $script - +create_sdk_files_prepend () { # make a symbolic link to mkspecs for compatibility with QTCreator (cd ${SDK_OUTPUT}/${SDKPATHNATIVE}; \ ln -sf ${SDKTARGETSYSROOT}${libdir}/${QT_DIR_NAME}/mkspecs mkspecs;) diff --git a/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc b/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc index faecc64..12f5a54 100644 --- a/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc +++ b/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc @@ -57,6 +57,7 @@ FILES_${PN}-tools-dbg = " \ FILES_${PN}-tools = " \ ${libdir}/lib*${SOLIBS} \ ${OE_QMAKE_PATH_BINS}/* \ + ${SDKPATHNATIVE}/environment-setup.d \ " # qttools binaries are placed in a subdir of bin in order to avoid @@ -218,3 +219,32 @@ do_install() { -not -name 'libQt5Bootstrap.a' \ -exec rm '{}' ';' } + +do_generate_qt_environment_file() { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d/ + script=${D}${SDKPATHNATIVE}/environment-setup.d/qt5.sh + + echo 'export PATH=${OE_QMAKE_PATH_HOST_BINS}:$PATH' > $script + echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script + echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script + echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script + echo 'export OE_QMAKE_CC=$CC' >> $script + echo 'export OE_QMAKE_CXX=$CXX' >> $script + echo 'export OE_QMAKE_LINK=$CXX' >> $script + echo 'export OE_QMAKE_AR=$AR' >> $script + echo 'export QT_CONF_PATH=${OE_QMAKE_PATH_HOST_BINS}/qt.conf' >> $script + echo 'export OE_QMAKE_LIBDIR_QT=`qmake -query QT_INSTALL_LIBS`' >> $script + echo 'export OE_QMAKE_INCDIR_QT=`qmake -query QT_INSTALL_HEADERS`' >> $script + echo 'export OE_QMAKE_MOC=${OE_QMAKE_PATH_HOST_BINS}/moc' >> $script + echo 'export OE_QMAKE_UIC=${OE_QMAKE_PATH_HOST_BINS}/uic' >> $script + echo 'export OE_QMAKE_RCC=${OE_QMAKE_PATH_HOST_BINS}/rcc' >> $script + echo 'export OE_QMAKE_QDBUSCPP2XML=${OE_QMAKE_PATH_HOST_BINS}/qdbuscpp2xml' >> $script + echo 'export OE_QMAKE_QDBUSXML2CPP=${OE_QMAKE_PATH_HOST_BINS}/qdbusxml2cpp' >> $script + echo 'export OE_QMAKE_QT_CONFIG=${OE_QMAKE_PATH_TARGET_LIBS}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script + echo 'export QMAKESPEC=`qmake -query QT_INSTALL_LIBS`/mkspecs/linux-oe-g++' >> $script + + # Use relocable sysroot + sed -i -e 's:${SDKPATHNATIVE}:$OECORE_NATIVE_SYSROOT:g' $script +} + +addtask generate_qt_environment_file after do_install before do_package