summaryrefslogtreecommitdiffstats
path: root/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics')
-rw-r--r--recipes-graphics/wayland/weston-init.bbappend20
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend
index 478c7cd6..a742bb86 100644
--- a/recipes-graphics/wayland/weston-init.bbappend
+++ b/recipes-graphics/wayland/weston-init.bbappend
@@ -9,9 +9,17 @@ REQUIRED_DISTRO_FEATURES:remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}"
9SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" 9SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config"
10 10
11# To customize weston.ini, start by setting the desired assignment in weston.ini, 11# To customize weston.ini, start by setting the desired assignment in weston.ini,
12# commented in. For example:
13# xwayland=true
14# Then add the assignment to INI_COMMENT_ASSIGNMENTS.
15#
12# commented out. For example: 16# commented out. For example:
13# #xwayland=true 17# #xwayland=true
14# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. 18# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS.
19INI_COMMENT_ASSIGNMENTS:append:imx-mainline-bsp = " \
20 xwayland=true \
21"
22
15INI_UNCOMMENT_ASSIGNMENTS:append:mx8-nxp-bsp = " \ 23INI_UNCOMMENT_ASSIGNMENTS:append:mx8-nxp-bsp = " \
16 repaint-window=16 \ 24 repaint-window=16 \
17" 25"
@@ -33,6 +41,13 @@ INI_UNCOMMENT_ASSIGNMENTS:append = " \
33 ${INI_UNCOMMENT_USE_G2D} \ 41 ${INI_UNCOMMENT_USE_G2D} \
34" 42"
35 43
44comment() {
45 if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then
46 bbwarn "Commented setting '#$1' not found in file $2"
47 fi
48 sed -i -e 's,^'"$1"',#'"$1"',g' $2
49}
50
36uncomment() { 51uncomment() {
37 if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then 52 if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then
38 bbwarn "Commented setting '#$1' not found in file $2" 53 bbwarn "Commented setting '#$1' not found in file $2"
@@ -44,6 +59,11 @@ do_install:append() {
44 if [ -f "${WORKDIR}/weston.config" ]; then 59 if [ -f "${WORKDIR}/weston.config" ]; then
45 install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston 60 install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston
46 fi 61 fi
62
63 for assignment in ${INI_COMMENT_ASSIGNMENTS}; do
64 comment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini
65 done
66
47 for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do 67 for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do
48 uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini 68 uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini
49 done 69 done