]> code.ossystems Code Review - openembedded-core.git/commitdiff
x11-common: Add PACKAGECONFIG for screen blanking
authorJussi Kukkonen <jussi.kukkonen@intel.com>
Thu, 7 Apr 2016 11:49:44 +0000 (14:49 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Apr 2016 06:56:02 +0000 (07:56 +0100)
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).

Also remove a unneeded "find -exec rm" from do_install.

Partly fixes [YOCTO #7278].

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/x11-common/x11-common/Xserver.in [moved from meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver with 81% similarity]
meta/recipes-graphics/x11-common/x11-common_0.1.bb

similarity index 81%
rename from meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
rename to meta/recipes-graphics/x11-common/x11-common/Xserver.in
index 73570dfeb50413c083efc8d1e7a61e44dc0743ee..b8eed7610faaf5becc36151098b399405d2a82c1 100644 (file)
@@ -5,7 +5,7 @@ XSERVER=/usr/bin/Xorg
 
 . /etc/profile
 
-ARGS=" -br -pn"
+ARGS=" -br -pn @BLANK_ARGS@"
 
 DISPLAY=':0'
 
index 156b329486a47b77dde3db5f0f35096a5351c87a..6d7c347c001b2f0adb96be3ccd4f9a422c9bd773 100644 (file)
@@ -9,14 +9,21 @@ inherit distro_features_check
 REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "file://etc \
+           file://Xserver.in \
            file://gplv2-license.patch"
 
 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}
+       sed -e 's/@BLANK_ARGS@/${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}/' \
+               ${S}/Xserver.in > ${D}${sysconfdir}/X11/Xserver
+
        chmod -R 755 ${D}${sysconfdir}
-       find ${D}${sysconfdir} -type f -name \*~ -exec rm -rf {} \;
 }
 
 RDEPENDS_${PN} = "dbus-x11 xmodmap xdpyinfo xtscal xinit formfactor"