summaryrefslogtreecommitdiff
path: root/meta/recipes-qt/qt4/qt4_arch.inc
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-05-08 13:28:30 +0800
committerScott Garman <scott.a.garman@intel.com>2012-05-15 15:20:00 -0700
commit98cb2efe4e9f3092d531c9fc809406c3ef559725 (patch)
tree4924107ce82480beee70ea1a9211b245c7e881d0 /meta/recipes-qt/qt4/qt4_arch.inc
parent36634e16c0a0c80674bacf20f9841e3b042bd5fd (diff)
downloadopenembedded-core-98cb2efe4e9f3092d531c9fc809406c3ef559725.tar.gz
openembedded-core-98cb2efe4e9f3092d531c9fc809406c3ef559725.tar.bz2
openembedded-core-98cb2efe4e9f3092d531c9fc809406c3ef559725.zip
qt4: move functions from python to shell style
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> [SG: Resolve merge conflicts for 1.2.1] Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'meta/recipes-qt/qt4/qt4_arch.inc')
-rw-r--r--meta/recipes-qt/qt4/qt4_arch.inc36
1 files changed, 16 insertions, 20 deletions
diff --git a/meta/recipes-qt/qt4/qt4_arch.inc b/meta/recipes-qt/qt4/qt4_arch.inc
index bde68dc2e0..c1d35ab726 100644
--- a/meta/recipes-qt/qt4/qt4_arch.inc
+++ b/meta/recipes-qt/qt4/qt4_arch.inc
@@ -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
+}