]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/qemu/qemu-native_0.7.0.bb
23ad9b02a9a29f2a02966212ac26ff1921314fbb
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / qemu / qemu-native_0.7.0.bb
1 include qemu_${PV}.bb
2 inherit native
3 S = "${WORKDIR}/qemu-${PV}"
4 prefix = "${STAGING_DIR}/${BUILD_SYS}"
5
6 python do_check_gcc () {
7     from bb import which, data
8        
9     cc = 'gcc'
10     path = data.getVar('PATH', d)
11     if len(which(path, 'gcc-3.4')) != 0:
12         cc = 'gcc-3.4'
13         data.setVar('EXTRA_OECONF', " --cc=gcc-3.4", d)
14     elif len(which(path, 'gcc-3.3')) != 0:
15         cc = 'gcc-3.3'
16         data.setVar('EXTRA_OECONF', " --cc=gcc-3.3", d)
17
18     import os
19
20     f = os.popen ("%s --version" % cc, 'r')
21     line = f.readline()
22     if f.close() or not line:
23         raise bb.build.FuncFailed("Failed to run %s" % cc)
24  
25     import re
26  
27     m = re.match("^.* \(.*\) (.\..\..).*$", line)
28     if not m:
29         raise bb.build.FuncFailed("Failed to parse gcc version output")
30     v = m.group(1).split('.')
31     if not (v[0] == '3' and v[1] in ['3', '4']):
32         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).")
33 }
34
35 addtask check_gcc before do_configure after do_patch