op_bluetooth: update for new kernel
[openpandora.oe.git] / recipes / meta / meta-toolchain-pandora.bb
1 # OpenPandora Sample toolchain/SDK scripts.
2
3 PR = "r4"
4 TOOLCHAIN_HOST_TASK = "task-pandora-toolchain-host"
5 TOOLCHAIN_TARGET_TASK = "task-pandora-toolchain-target"
6
7 require meta-toolchain.bb
8
9 SDK_SUFFIX = "toolchain-openpandora"
10
11 PANDORA_VERSION_FILE = "${SDK_OUTPUT}/${SDKPATH}/op-toolchain-version"
12
13 QT_DIR_NAME = "qt4"
14
15 do_populate_sdk_append() {
16
17        # SED out incorrect paths in SDK support *-config files so tools can use the files to find libs to cross compile.
18        # not ready to commit.
19
20        # Tweak the environment-setup script to try get Qt4 X11 dev working.
21        # Based on Koen's mods to create the Qte SDK.
22        
23        script = "${SDK_OUTPUT}/${SDKPATH}/environment-setup"
24        touch $script
25        echo 'export OE_QMAKE_CC=${TARGET_SYS}-gcc' >> $script
26        echo 'export OE_QMAKE_CXX=${TARGET_SYS}-g++' >> $script
27        echo 'export OE_QMAKE_LINK=${TARGET_SYS}-g++' >> $script
28        echo 'export OE_QMAKE_LIBDIR_QT=${SDKPATH}/${TARGET_SYS}/${libdir}' >> $script
29        echo 'export OE_QMAKE_INCDIR_QT=${SDKPATH}/${TARGET_SYS}/${includedir}/${QT_DIR_NAME}' >> $script
30        echo 'export OE_QMAKE_MOC=${SDKPATH}/bin/moc4' >> $script
31        echo 'export OE_QMAKE_UIC=${SDKPATH}/bin/uic4' >> $script
32        echo 'export OE_QMAKE_UIC3=${SDKPATH}/bin/uic34' >> $script
33        echo 'export OE_QMAKE_RCC=${SDKPATH}/bin/rcc4' >> $script
34        echo 'export OE_QMAKE_QDBUSCPP2XML=${SDKPATH}/bin/qdbuscpp2xml4' >> $script
35        echo 'export OE_QMAKE_QDBUSXML2CPP=${SDKPATH}/bin/qdbusxml2cpp4' >> $script
36        echo 'export OE_QMAKE_QT_CONFIG=${SDKPATH}/${TARGET_SYS}/${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
37        echo 'export QMAKESPEC=${SDKPATH}/${TARGET_SYS}/${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
38
39
40        # Helper to say what toolchain we built, include GIT tag etc.
41
42        OLD_PWD=$PWD; cd `dirname '${FILE_DIRNAME}'`; echo Tag Name: `git tag|tail -n 1`> ${PANDORA_VERSION_FILE};cd $OLD_PWD;
43        OLD_PWD=$PWD; cd `dirname '${FILE_DIRNAME}'`; echo VERSION: `git-log -n1 --pretty=oneline|awk '{print $1}'` >> ${PANDORA_VERSION_FILE}; cd $OLD_PWD;
44        OLD_PWD=$PWD; cd `dirname '${FILE_DIRNAME}'`; echo Branch: ` git branch |awk '/*/{print $2}'` >> ${PANDORA_VERSION_FILE}; cd $OLD_PWD;
45        echo Toolchain Builder: '${LOGNAME}'@`cat /etc/hostname` >> ${PANDORA_VERSION_FILE};
46        echo Time Stamp: `date -R` >> ${PANDORA_VERSION_FILE};
47        echo Toolchain Name: '${TOOLCHAIN_OUTPUTNAME}' >> ${PANDORA_VERSION_FILE};
48
49        # Repack SDK after 'munging'
50        cd ${SDK_OUTPUT}
51        fakeroot tar cfj ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
52 }