diff options
| -rw-r--r-- | meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb b/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb new file mode 100644 index 0000000000..b3aa1e559c --- /dev/null +++ b/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | DESCRIPTION = "Set 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 | QT_GRAPHICS_SYSTEM ?= "raster" | ||
| 7 | |||
| 8 | # xserver-common, x11-common | ||
| 9 | VIRTUAL-RUNTIME_xserver_common ?= "x11-common" | ||
| 10 | |||
| 11 | def _get_extra_rdepends(d): | ||
| 12 | gs = d.getVar('QT_GRAPHICS_SYSTEM', 1) | ||
| 13 | if gs == "opengl": | ||
| 14 | return "qt4-plugin-graphicssystems-glgraphicssystem" | ||
| 15 | |||
| 16 | return "" | ||
| 17 | |||
| 18 | do_install () { | ||
| 19 | install -d ${D}/${sysconfdir}/X11/Xsession.d/ | ||
| 20 | cfg_file=${D}/${sysconfdir}/X11/Xsession.d/85xqt-graphicssystem | ||
| 21 | echo "export QT_GRAPHICSSYSTEM=${QT_GRAPHICS_SYSTEM}" > $cfg_file | ||
| 22 | chmod +x $cfg_file | ||
| 23 | } | ||
| 24 | |||
| 25 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_xserver_common} ${@_get_extra_rdepends(d)}" | ||
| 26 | |||
| 27 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
