Patchwork [meta-opie,6/6] opie: fix SDK generation

login
register
mail settings
Submitter lumag
Date Dec. 13, 2011, 4:44 p.m.
Message ID <1323794683-24233-7-git-send-email-dbaryshkov@gmail.com>
Download mbox | patch
Permalink /patch/16847/
State Accepted
Headers show

Comments

lumag - Dec. 13, 2011, 4:44 p.m.
Fix SDK generation. Include correct version of tools, set up environment
for the linux-oe-g++ qmake spec. qmake still has some room for
improvement to add automatic handling of (e.g.) thread/non-threaded
config, opie-related defines, etc.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 recipes-opie/meta/meta-toolchain-opie.bb           |   30 ++++++++++++++++---
 .../tasks/task-opie-toolchain-host-nativesdk.bb    |    8 +++++
 recipes-opie/tasks/task-opie-toolchain-target.bb   |   16 ++++++++++
 3 files changed, 49 insertions(+), 5 deletions(-)
 create mode 100644 recipes-opie/tasks/task-opie-toolchain-host-nativesdk.bb
 create mode 100644 recipes-opie/tasks/task-opie-toolchain-target.bb

Patch

diff --git a/recipes-opie/meta/meta-toolchain-opie.bb b/recipes-opie/meta/meta-toolchain-opie.bb
index 6a941c3..3238b37 100644
--- a/recipes-opie/meta/meta-toolchain-opie.bb
+++ b/recipes-opie/meta/meta-toolchain-opie.bb
@@ -1,8 +1,28 @@ 
-PR = "r1"
-TOOLCHAIN_TARGET_TASK = "\
-    task-sdk-base \
-    task-sdk-opie"
+PR = "r3"
+TOOLCHAIN_HOST_TASK = "task-opie-toolchain-host-nativesdk task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+TOOLCHAIN_TARGET_TASK = "task-opie-toolchain-target"
+TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-opie-${DISTRO_VERSION}"
 
 require recipes-core/meta/meta-toolchain.bb
 
-SDK_SUFFIX = "toolchain-opie"
+QT_TOOLS_PREFIX = "${SDKPATHNATIVE}${bindir_nativesdk}"
+
+toolchain_create_sdk_env_script_append() {
+
+    echo 'export OE_QMAKE_CC=${TARGET_PREFIX}gcc' >> $script
+    echo 'export OE_QMAKE_CFLAGS="-DQWS $CFLAGS"' >> $script
+    echo 'export OE_QMAKE_CXX=${TARGET_PREFIX}g++' >> $script
+    echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script
+    echo 'export OE_QMAKE_AR=${TARGET_PREFIX}ar' >> $script
+    echo 'export OE_QMAKE_STRIP="echo"' >> $script
+    echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic2' >> $script
+    echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc2' >> $script
+    echo 'export OE_QMAKE_CXXFLAGS="-fno-exceptions -fno-rtti -DQWS $CXXFLAGS"' >> $script
+    echo 'export OE_QMAKE_LINK="${TARGET_PREFIX}g++"' >> $script
+    echo 'export OE_QMAKE_INCDIR_QT="${SDKTARGETSYSROOT}${includedir}/qte"' >> $script
+    echo 'export OE_QMAKE_LIBDIR_QT="${SDKTARGETSYSROOT}${libdir}"' >> $script
+    echo 'export OE_QMAKE_LIBS_QT="qte"' >> $script
+    echo 'export OE_QMAKE_LIBS_X11=""' >> $script
+
+    echo 'export QMAKESPEC=${SDKPATHNATIVE}${datadir}/qmake/linux-oe-g++' >> $script
+}
diff --git a/recipes-opie/tasks/task-opie-toolchain-host-nativesdk.bb b/recipes-opie/tasks/task-opie-toolchain-host-nativesdk.bb
new file mode 100644
index 0000000..5ca80e6
--- /dev/null
+++ b/recipes-opie/tasks/task-opie-toolchain-host-nativesdk.bb
@@ -0,0 +1,8 @@ 
+require recipes-core/tasks/task-sdk-host-nativesdk.bb
+
+DESCRIPTION = "Host packages for Opie SDK"
+PR = "r2"
+LICENSE = "MIT"
+ALLOW_EMPTY = "1"
+
+RDEPENDS_${PN} += "qmake-nativesdk uicmoc-nativesdk"
diff --git a/recipes-opie/tasks/task-opie-toolchain-target.bb b/recipes-opie/tasks/task-opie-toolchain-target.bb
new file mode 100644
index 0000000..b9ea713
--- /dev/null
+++ b/recipes-opie/tasks/task-opie-toolchain-target.bb
@@ -0,0 +1,16 @@ 
+DESCRIPTION = "Target packages for Opie SDK"
+PR = "r7"
+LICENSE = "MIT"
+ALLOW_EMPTY = "1"
+
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+
+RDEPENDS_${PN} = "\
+    task-core-standalone-sdk-target \
+    libopie2-dev \
+    libqpe-opie-dev \
+    ${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte", d)}-dev \
+    libqtaux2-dev \
+    libmailwrapper-dev"