when "blank" is not in PACKAGECONFIG, explicitly set dpms and
screensaver off. The intention here is to make it easier to
create builds that should not blank the screen (just remove
"blank" from x11-common PACKAGECONFIG).

Partly fixes [YOCTO #7278].

Signed-off-by: Jussi Kukkonen <[email protected]>
---


Adding a packageconfig didn't seem like particularly nice way to set
runtime configuration but it was the simplest I could think of.
I can try adding a xorg.conf snippet to xserver-xf86-config if that's
seen as better...

Jussi



 meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver | 3 ++-
 meta/recipes-graphics/x11-common/x11-common_0.1.bb          | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver 
b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
index 73570df..8d5f9b8 100644
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
+++ b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
@@ -5,7 +5,8 @@ XSERVER=/usr/bin/Xorg
 
 . /etc/profile
 
-ARGS=" -br -pn"
+BLANK_ARGS=""
+ARGS=" -br -pn $BLANK_ARGS"
 
 DISPLAY=':0'
 
diff --git a/meta/recipes-graphics/x11-common/x11-common_0.1.bb 
b/meta/recipes-graphics/x11-common/x11-common_0.1.bb
index 156b329..2da178f 100644
--- a/meta/recipes-graphics/x11-common/x11-common_0.1.bb
+++ b/meta/recipes-graphics/x11-common/x11-common_0.1.bb
@@ -13,10 +13,15 @@ SRC_URI = "file://etc \
 
 S = "${WORKDIR}"
 
+PACKAGECONFIG ??= "blank"
+# dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG
+PACKAGECONFIG[blank] = ""
+
 do_install() {
        cp -R ${S}/etc ${D}${sysconfdir}
        chmod -R 755 ${D}${sysconfdir}
        find ${D}${sysconfdir} -type f -name \*~ -exec rm -rf {} \;
+        sed -i -e 
's/^BLANK_ARGS=.*/BLANK_ARGS="${@bb.utils.contains('PACKAGECONFIG', 'blank', 
'', '-s 0 -dpms', d)}"/' ${D}${sysconfdir}/X11/Xserver
 }
 
 RDEPENDS_${PN} = "dbus-x11 xmodmap xdpyinfo xtscal xinit formfactor"
-- 
2.1.4

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to