diff options
Diffstat (limited to 'recipes-graphics')
-rw-r--r-- | recipes-graphics/wayland/weston-init.bbappend | 20 |
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}" | |||
9 | SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" | 9 | SRC_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. |
19 | INI_COMMENT_ASSIGNMENTS:append:imx-mainline-bsp = " \ | ||
20 | xwayland=true \ | ||
21 | " | ||
22 | |||
15 | INI_UNCOMMENT_ASSIGNMENTS:append:mx8-nxp-bsp = " \ | 23 | INI_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 | ||
44 | comment() { | ||
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 | |||
36 | uncomment() { | 51 | uncomment() { |
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 |