diff options
author | Rene Wagner <rw@handhelds.org> | 2006-07-05 01:06:04 +0200 |
---|---|---|
committer | Rene Wagner <rw@handhelds.org> | 2006-07-05 01:06:04 +0200 |
commit | b9e36eeaf3939ed48933178fcb74d1463c64b79e (patch) | |
tree | aa34a2b89536d057d54ef0672542c4da0bf435eb | |
parent | 9e4023efa7601ec01bcf096fa5cfb7ad43b0b95f (diff) |
qemu-native: error out if no GCC 3.{3,4}.x is installed.
Signed-off-by: Rene Wagner <rw@handhelds.org>
-rw-r--r-- | org.handhelds.familiar/packages/qemu/qemu-native_0.7.0.bb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/org.handhelds.familiar/packages/qemu/qemu-native_0.7.0.bb b/org.handhelds.familiar/packages/qemu/qemu-native_0.7.0.bb index 9e58b5f..23ad9b0 100644 --- a/org.handhelds.familiar/packages/qemu/qemu-native_0.7.0.bb +++ b/org.handhelds.familiar/packages/qemu/qemu-native_0.7.0.bb @@ -3,13 +3,33 @@ inherit native S = "${WORKDIR}/qemu-${PV}" prefix = "${STAGING_DIR}/${BUILD_SYS}" -python __anonymous() { +python do_check_gcc () { from bb import which, data + cc = 'gcc' path = data.getVar('PATH', d) if len(which(path, 'gcc-3.4')) != 0: + cc = 'gcc-3.4' data.setVar('EXTRA_OECONF', " --cc=gcc-3.4", d) elif len(which(path, 'gcc-3.3')) != 0: + cc = 'gcc-3.3' data.setVar('EXTRA_OECONF', " --cc=gcc-3.3", d) + import os + + f = os.popen ("%s --version" % cc, 'r') + line = f.readline() + if f.close() or not line: + raise bb.build.FuncFailed("Failed to run %s" % cc) + + import re + + m = re.match("^.* \(.*\) (.\..\..).*$", line) + if not m: + raise bb.build.FuncFailed("Failed to parse gcc version output") + v = m.group(1).split('.') + if not (v[0] == '3' and v[1] in ['3', '4']): + raise bb.build.FuncFailed("qemu requires GCC 3.3.x or 3.4.x. Please install either version to build\nthis package.\nIf you haven't explicitely asked for this package to be built, it is likely\nthat ENABLE_BINARY_LOCALE_GENERATION is set. To work around the problem set it\nto \"0\" (but note that this will break internationalization).") } + +addtask check_gcc before do_configure after do_patch |