]> code.ossystems Code Review - openembedded-core.git/commitdiff
qt4: move functions from python to shell style
authorDongxiao Xu <dongxiao.xu@intel.com>
Tue, 8 May 2012 05:28:30 +0000 (13:28 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 May 2012 12:58:45 +0000 (13:58 +0100)
In qt4's do_configure operation, it will refer to some variables that
are derived from 'd', however these variable values may be not correct
in multilib case since the extraction of these variables happens before
the multilib handler.

The fix is to move these python style functions back to shell style.

This fixes [YOCTO #2355]

[RP: Fix whitepace]
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-qt/qt4/qt4-embedded.inc
meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
meta/recipes-qt/qt4/qt4-x11-free.inc
meta/recipes-qt/qt4/qt4.inc
meta/recipes-qt/qt4/qt4_arch.inc

index 0b304a080b356812fb756df11eedab83df91a8aa..05803d15e789068b96f4eacc6e9ec0adf8959d4a 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is
 SECTION = "libs"
 HOMEPAGE = "http://qt.nokia.com"
 DEPENDS += "directfb tslib"
-INC_PR = "r45"
+INC_PR = "r46"
 
 QT_BASE_LIB  ?= "libqt-embedded"
 
index efb61bf142be406fb728e2d7b34bd6edb5789ca2..a1dd8df0d1a738742e0ec87a3c117bc1241ac03a 100644 (file)
@@ -4,7 +4,7 @@ SECTION = "libs"
 HOMEPAGE = "http://qt.nokia.com"
 LICENSE = "LGPLv2.1 | GPLv3"
 
-INC_PR = "r10"
+INC_PR = "r11"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt-${PV}:"
 
@@ -40,7 +40,7 @@ EXTRA_OECONF = "-prefix ${prefix} \
                 -verbose -release -fast -static \
                 -platform ${TARGET_OS}-oe-g++ \
                 -xplatform ${TARGET_OS}-oe-g++ \
-                -arch ${@qt_arch(d)} \
+                -arch ${QT_ARCH} \
                 -embedded -no-freetype -no-glib -no-iconv \
                 -qt3support \
                 -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/include/dbus-1.0 \
@@ -71,6 +71,7 @@ do_configure() {
     if [ ! -e bin/qmake ]; then
         ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
     fi
+    set_arch
     (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
 }
 
index da989623f1b25c8f36d9d8148df6961d4bdb8244..29bbfc6be0c54d6d65d10aea19b9b9e73cf40c43 100644 (file)
@@ -5,7 +5,7 @@ HOMEPAGE = "http://qt.nokia.com"
 SECTION = "x11/libs"
 DEPENDS += "virtual/libgl virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor"
 
-INC_PR = "r43"
+INC_PR = "r44"
 
 QT_GLFLAGS ?= "${@base_contains('DISTRO_FEATURES', 'opengl', '-opengl', '-no-opengl', d)} "
 QT_GLFLAGS_qemux86 = "-opengl"
index 468a46ff74510ab1b533a124ef0229a662ab4b5d..23fda336b2ef2c11c36e7200473d486ce3bf22cc 100644 (file)
@@ -4,8 +4,6 @@ DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gst
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}"
 
 require qt4_arch.inc
-QT_ARCH := "${@qt_arch(d)}"
-QT_ENDIAN = "${@qt_endian(d)}"
 
 QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm"
 QT_DISTRO_FLAGS_linuxstdbase = "-sm"
@@ -200,6 +198,9 @@ do_configure() {
        unset QMAKESPEC
        unset QTDIR
 
+       set_arch
+       set_endian
+
        if [ ! -e bin/qmake ]; then
                ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
        fi
index bde68dc2e0ec65248f36f5b961a9a69394646288..c1d35ab726caf4b9bbe51ea88a0b997ffbf59edc 100644 (file)
@@ -2,24 +2,20 @@ inherit siteinfo
 
 ARM_INSTRUCTION_SET = "arm"
 
-def qt_arch(d):
-    import bb, re
-    arch = d.getVar('TARGET_ARCH', True)
-    if re.match("^i.86$", arch):
-        arch = "i386"
-    elif re.match("^arm.*", arch):
-        arch = "arm"
-    elif arch == "x86_64":
-        arch = "x86"
-    elif arch == "mipsel":
-        arch = "mips"
-    return arch
+set_arch() {
+   case ${TARGET_ARCH} in
+       arm*)     QT_ARCH=arm ;;
+       i*86*)    QT_ARCH=i386 ;;
+       mips*)    QT_ARCH=mips ;;
+       powerpc*) QT_ARCH=powerpc ;;
+       x86_64*)  QT_ARCH=x86_64 ;;
+   esac
+}
 
-def qt_endian(d):
-    import bb
-    if d.getVar('SITEINFO_ENDIANNESS', True) == "le":
-        return "-little-endian"
-    elif d.getVar('SITEINFO_ENDIANNESS', True) == "be":
-        return "-big-endian"
-    else:
-        assert False
+set_endian() {
+    if [ ${SITEINFO_ENDIANNESS} = "le" ] ; then
+        QT_ENDIAN="-little-endian"
+    elif [ ${SITEINFO_ENDIANNESS} = "be" ] ; then
+        QT_ENDIAN="-big-endian"
+    fi
+}