diff options
Diffstat (limited to 'recipes-graphics/wayland/weston-init.bbappend')
| -rw-r--r-- | recipes-graphics/wayland/weston-init.bbappend | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 13818bc38..ce6c4c7ca 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend | |||
| @@ -11,10 +11,35 @@ SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file | |||
| 11 | HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" | 11 | HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" |
| 12 | HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" | 12 | HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" |
| 13 | 13 | ||
| 14 | # To customize weston.ini, start by setting the desired assignment in weston.ini, | ||
| 15 | # commented out. Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. | ||
| 16 | INI_UNCOMMENT_ASSIGNMENTS = "" | ||
| 17 | INI_UNCOMMENT_ASSIGNMENTS_append_mx7ulp = " \ | ||
| 18 | use-g2d=1 \ | ||
| 19 | " | ||
| 20 | INI_UNCOMMENT_ASSIGNMENTS_append_mx8mm = " \ | ||
| 21 | use-g2d=1 \ | ||
| 22 | " | ||
| 23 | INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \ | ||
| 24 | gbm-format=argb8888 \ | ||
| 25 | \\[shell\\] \ | ||
| 26 | size=1920x1080 \ | ||
| 27 | " | ||
| 28 | |||
| 29 | uncomment() { | ||
| 30 | if ! (grep "^#$1" $2); then | ||
| 31 | bbfatal "Commented setting '#$1' not found in file $2" | ||
| 32 | fi | ||
| 33 | sed -i -e 's,^#'"$1"','"$1"',g' $2 | ||
| 34 | } | ||
| 35 | |||
| 14 | do_install_append() { | 36 | do_install_append() { |
| 15 | if ${HAS_SYSTEMD}; then | 37 | if ${HAS_SYSTEMD}; then |
| 16 | if ${HAS_XWAYLAND}; then | 38 | if ${HAS_XWAYLAND}; then |
| 17 | install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston | 39 | install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston |
| 18 | fi | 40 | fi |
| 19 | fi | 41 | fi |
| 42 | for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do | ||
| 43 | uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini | ||
| 44 | done | ||
| 20 | } | 45 | } |
