Patchwork [2/2] add meta-toolchain-qt

login
register
mail settings
Submitter Eric BENARD
Date Jan. 11, 2013, 1:51 p.m.
Message ID <1357912285-8308-2-git-send-email-eric@eukrea.com>
Download mbox | patch
Permalink /patch/42493/
State Accepted
Commit cc803b06841e75aa6591abaeda0a788e888e208b
Headers show

Comments

Eric BENARD - Jan. 11, 2013, 1:51 p.m.
- this allows the creation of a SDK containing all the needed
libraries to develop QT4 for X applications
- the recipes were factorized to share as much code as possible
- binaries generated using the toolchain were run tested on an
ARMv7 target
- both qt & qte toolchains were build tested for qemuarm target
and for an ARMv7 target

Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
---
 meta/recipes-qt/meta/meta-toolchain-qt.bb          |    5 +++
 meta/recipes-qt/meta/meta-toolchain-qt.inc         |   31 ++++++++++++++++++
 meta/recipes-qt/meta/meta-toolchain-qte.bb         |   32 ++-----------------
 .../nativesdk-packagegroup-qt-toolchain-host.bb    |    3 ++
 .../nativesdk-packagegroup-qt-toolchain-host.inc   |    6 ++++
 .../nativesdk-packagegroup-qte-toolchain-host.bb   |    5 +--
 .../packagegroup-qt-toolchain-target.bb            |   11 +++++++
 .../packagegroup-qt-toolchain-target.inc           |   33 ++++++++++++++++++++
 .../packagegroup-qte-toolchain-target.bb           |   32 ++-----------------
 9 files changed, 94 insertions(+), 64 deletions(-)
 create mode 100644 meta/recipes-qt/meta/meta-toolchain-qt.bb
 create mode 100644 meta/recipes-qt/meta/meta-toolchain-qt.inc
 create mode 100644 meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.bb
 create mode 100644 meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.inc
 create mode 100644 meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
 create mode 100644 meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc

Patch

diff --git a/meta/recipes-qt/meta/meta-toolchain-qt.bb b/meta/recipes-qt/meta/meta-toolchain-qt.bb
new file mode 100644
index 0000000..a10103a
--- /dev/null
+++ b/meta/recipes-qt/meta/meta-toolchain-qt.bb
@@ -0,0 +1,5 @@ 
+# Qt toolchain
+QTNAME = "qt"
+QT_DIR_NAME = "qt4"
+
+require meta-toolchain-qt.inc
diff --git a/meta/recipes-qt/meta/meta-toolchain-qt.inc b/meta/recipes-qt/meta/meta-toolchain-qt.inc
new file mode 100644
index 0000000..107ba19
--- /dev/null
+++ b/meta/recipes-qt/meta/meta-toolchain-qt.inc
@@ -0,0 +1,31 @@ 
+TOOLCHAIN_HOST_TASK = "nativesdk-packagegroup-${QTNAME}-toolchain-host packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+TOOLCHAIN_TARGET_TASK = "packagegroup-${QTNAME}-toolchain-target"
+TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${QTNAME}-${DISTRO_VERSION}"
+
+require recipes-core/meta/meta-toolchain.bb
+
+QT_TOOLS_PREFIX = "${SDKPATHNATIVE}${bindir_nativesdk}"
+
+toolchain_create_sdk_env_script_append() {
+    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=$LD' >> $script
+    echo 'export OE_QMAKE_AR=$AR' >> $script
+    echo 'export OE_QMAKE_LIBDIR_QT=${SDKTARGETSYSROOT}/${libdir}' >> $script
+    echo 'export OE_QMAKE_INCDIR_QT=${SDKTARGETSYSROOT}/${includedir}/${QT_DIR_NAME}' >> $script
+    echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc4' >> $script
+    echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic4' >> $script
+    echo 'export OE_QMAKE_UIC3=${QT_TOOLS_PREFIX}/uic34' >> $script
+    echo 'export OE_QMAKE_RCC=${QT_TOOLS_PREFIX}/rcc4' >> $script
+    echo 'export OE_QMAKE_QDBUSCPP2XML=${QT_TOOLS_PREFIX}/qdbuscpp2xml4' >> $script
+    echo 'export OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script
+    echo 'export OE_QMAKE_QT_CONFIG=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
+    echo 'export QMAKESPEC=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
+
+    # make a symbolic link to mkspecs for compatibility with Nokia's SDK
+    # and QTCreator
+    (cd ${SDK_OUTPUT}/${QT_TOOLS_PREFIX}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;)
+}
diff --git a/meta/recipes-qt/meta/meta-toolchain-qte.bb b/meta/recipes-qt/meta/meta-toolchain-qte.bb
index 7c2ae49..9113f48 100644
--- a/meta/recipes-qt/meta/meta-toolchain-qte.bb
+++ b/meta/recipes-qt/meta/meta-toolchain-qte.bb
@@ -1,34 +1,6 @@ 
 # Qt Embedded toolchain
 PR = "r6"
-TOOLCHAIN_HOST_TASK = "nativesdk-packagegroup-qte-toolchain-host packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-TOOLCHAIN_TARGET_TASK = "packagegroup-qte-toolchain-target"
-TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-qte-${DISTRO_VERSION}"
-
-require recipes-core/meta/meta-toolchain.bb
-
+QTNAME = "qte"
 QT_DIR_NAME = "qtopia"
-QT_TOOLS_PREFIX = "${SDKPATHNATIVE}${bindir_nativesdk}"
-
-toolchain_create_sdk_env_script_append() {
-    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=$LD' >> $script
-    echo 'export OE_QMAKE_AR=$AR' >> $script
-    echo 'export OE_QMAKE_LIBDIR_QT=${SDKTARGETSYSROOT}/${libdir}' >> $script
-    echo 'export OE_QMAKE_INCDIR_QT=${SDKTARGETSYSROOT}/${includedir}/${QT_DIR_NAME}' >> $script
-    echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc4' >> $script
-    echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic4' >> $script
-    echo 'export OE_QMAKE_UIC3=${QT_TOOLS_PREFIX}/uic34' >> $script
-    echo 'export OE_QMAKE_RCC=${QT_TOOLS_PREFIX}/rcc4' >> $script
-    echo 'export OE_QMAKE_QDBUSCPP2XML=${QT_TOOLS_PREFIX}/qdbuscpp2xml4' >> $script
-    echo 'export OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script
-    echo 'export OE_QMAKE_QT_CONFIG=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
-    echo 'export QMAKESPEC=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
 
-    # make a symbolic link to mkspecs for compatibility with Nokia's SDK
-    # and QTCreator
-    (cd ${SDK_OUTPUT}/${QT_TOOLS_PREFIX}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/qtopia/mkspecs mkspecs;)
-}
+require meta-toolchain-qt.inc
diff --git a/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.bb b/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.bb
new file mode 100644
index 0000000..994462d
--- /dev/null
+++ b/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.bb
@@ -0,0 +1,3 @@ 
+require nativesdk-packagegroup-qt-toolchain-host.inc
+
+DESCRIPTION = "Host packages for Qt SDK"
diff --git a/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.inc b/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.inc
new file mode 100644
index 0000000..a3c275f
--- /dev/null
+++ b/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.inc
@@ -0,0 +1,6 @@ 
+require recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+
+DESCRIPTION = "Host packages for Qt Embedded SDK"
+LICENSE = "MIT"
+
+RDEPENDS_${PN} += "nativesdk-qt4-tools"
diff --git a/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qte-toolchain-host.bb b/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qte-toolchain-host.bb
index a3c275f..eadecf5 100644
--- a/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qte-toolchain-host.bb
+++ b/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qte-toolchain-host.bb
@@ -1,6 +1,3 @@ 
-require recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+require nativesdk-packagegroup-qt-toolchain-host.inc
 
 DESCRIPTION = "Host packages for Qt Embedded SDK"
-LICENSE = "MIT"
-
-RDEPENDS_${PN} += "nativesdk-qt4-tools"
diff --git a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
new file mode 100644
index 0000000..738ca82
--- /dev/null
+++ b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
@@ -0,0 +1,11 @@ 
+DESCRIPTION = "Target packages for Qt SDK"
+
+QTLIBPREFIX = ""
+
+require packagegroup-qt-toolchain-target.inc
+
+RDEPENDS_${PN} += " \
+        qt4-x11-free-dev \
+        ${@base_contains('DISTRO_FEATURES', 'opengl', 'libqtopengl4-dev', '', d)} \
+        ${@base_contains('DISTRO_FEATURES', 'openvg', 'libqtopenvg4-dev', '', d)} \
+        "
diff --git a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
new file mode 100644
index 0000000..8413eec
--- /dev/null
+++ b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
@@ -0,0 +1,33 @@ 
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
+
+RDEPENDS_${PN} += " \
+        packagegroup-core-standalone-sdk-target \
+        qt4${QTLIBPREFIX}-mkspecs \
+        libqt${QTLIBPREFIX}multimedia4-dev \
+        libqt${QTLIBPREFIX}phonon4-dev \
+        libqt${QTLIBPREFIX}3support4-dev \
+        libqt${QTLIBPREFIX}clucene4-dev \
+        libqt${QTLIBPREFIX}core4-dev \
+        libqt${QTLIBPREFIX}dbus4-dev \
+        libqt${QTLIBPREFIX}designercomponents4-dev \
+        libqt${QTLIBPREFIX}designer4-dev \
+        libqt${QTLIBPREFIX}uitools4-dev \
+        libqt${QTLIBPREFIX}gui4-dev \
+        libqt${QTLIBPREFIX}help4-dev \
+        libqt${QTLIBPREFIX}network4-dev \
+        libqt${QTLIBPREFIX}script4-dev \
+        libqt${QTLIBPREFIX}scripttools4-dev \
+        libqt${QTLIBPREFIX}sql4-dev \
+        libqt${QTLIBPREFIX}svg4-dev \
+        libqt${QTLIBPREFIX}test4-dev \
+        libqt${QTLIBPREFIX}webkit4-dev \
+        libqt${QTLIBPREFIX}xml4-dev \
+        libqt${QTLIBPREFIX}declarative4-dev \
+        libqt${QTLIBPREFIX}xmlpatterns4-dev \
+        libsqlite3-dev \
+        expat-dev \
+        "
diff --git a/meta/recipes-qt/packagegroups/packagegroup-qte-toolchain-target.bb b/meta/recipes-qt/packagegroups/packagegroup-qte-toolchain-target.bb
index 7b65bcc..9c3b22c 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-qte-toolchain-target.bb
+++ b/meta/recipes-qt/packagegroups/packagegroup-qte-toolchain-target.bb
@@ -1,35 +1,7 @@ 
 DESCRIPTION = "Target packages for Qt Embedded SDK"
-LICENSE = "MIT"
 
 PR = "r5"
 
-inherit packagegroup
-
-PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
-
-RDEPENDS_${PN} += " \
-        packagegroup-core-standalone-sdk-target \
-        qt4-embedded-mkspecs \
-        libqt-embeddedmultimedia4-dev \
-        libqt-embeddedphonon4-dev \
-        libqt-embedded3support4-dev \
-        libqt-embeddedclucene4-dev \
-        libqt-embeddedcore4-dev \
-        libqt-embeddeddbus4-dev \
-        libqt-embeddeddesignercomponents4-dev \
-        libqt-embeddeddesigner4-dev \
-        libqt-embeddeduitools4-dev \
-        libqt-embeddedgui4-dev \
-        libqt-embeddedhelp4-dev \
-        libqt-embeddednetwork4-dev \
-        libqt-embeddedscript4-dev \
-        libqt-embeddedscripttools4-dev \
-        libqt-embeddedsql4-dev \
-        libqt-embeddedsvg4-dev \
-        libqt-embeddedtest4-dev \
-        libqt-embeddedwebkit4-dev \
-        libqt-embeddedxml4-dev \
-        libsqlite3-dev \
-        expat-dev \
-        "
+QTLIBPREFIX = "-embedded"
 
+require packagegroup-qt-toolchain-target.inc