Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Sets default Qt4 Graphics System to ${QT_GRAPHICS_SYSTEM}" |
| 2 | SECTION = "x11/base" |
| 3 | LICENSE = "MIT-X" |
| 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
| 5 | |
| 6 | PR = "r1" |
| 7 | |
| 8 | QT_GRAPHICS_SYSTEM ?= "raster" |
| 9 | |
| 10 | def _get_extra_rdepends(d): |
| 11 | gs = d.getVar('QT_GRAPHICS_SYSTEM', True) |
| 12 | if gs == "opengl": |
| 13 | return "qt4-plugin-graphicssystems-glgraphicssystem" |
| 14 | |
| 15 | return "" |
| 16 | |
| 17 | do_install () { |
| 18 | install -d ${D}/${sysconfdir}/profile.d/ |
| 19 | cfg_file=${D}/${sysconfdir}/profile.d/qt-graphicssystem |
| 20 | echo "export QT_GRAPHICSSYSTEM=${QT_GRAPHICS_SYSTEM}" > $cfg_file |
| 21 | } |
| 22 | |
| 23 | RDEPENDS_${PN} = "${@_get_extra_rdepends(d)}" |
| 24 | |
| 25 | PACKAGE_ARCH = "${MACHINE_ARCH}" |