mesa_9.1.5.bbappend 1.54 KB
Newer Older
1 2 3
# FIXME: We may need to disable EGL, GL ES1 and GL ES2
python __anonymous () {
    import re
4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
    # SoC families to work on
    families = ['mx5', 'mx6']
    cur_soc_families = d.getVar('SOC_FAMILY', True)
    if cur_soc_families and \
        any(map(lambda x: x in cur_soc_families.split(':'), families)):
        # Remove egl gles1 and gles2 configure options
        extra_oeconf = d.getVar('EXTRA_OECONF', True).split()
        take_out = ['--enable-egl', '--enable-gles1', '--enable-gles2']
        put_in = ['--disable-egl', '--disable-gles1', '--disable-gles2']
        pattern = re.compile("--with-egl-platforms")
        new_extra_oeconf = []
        for i in extra_oeconf:
            if i not in take_out and not pattern.match(i):
                new_extra_oeconf.append(i)
        for i in put_in:
            new_extra_oeconf.append(i)

        d.setVar('EXTRA_OECONF', ' '.join(new_extra_oeconf))

        # Remove itens from provides
25
        provides = d.getVar('PROVIDES', True).split()
26 27 28
        take_out = ['virtual/libgles1', 'virtual/libgles2', 'virtual/egl']
        if 'mx6' in cur_soc_families.split(':'):
            take_out.append('virtual/libgl')
29 30 31 32 33 34 35 36 37 38
        new_provides = []
        for i in provides:
            if i not in take_out:
                new_provides.append(i)

        d.setVar('PROVIDES', ' '.join(new_provides))

        # We are now machine specific
        d.setVar('PACKAGE_ARCH', d.getVar('MACHINE_ARCH'))
}
39 40 41 42 43

# FIXME: Dirty hack to allow use of Vivante GPU libGL binary
do_install_append_mx6 () {
    rm ${D}${libdir}/libGL.*
}