[oe-commits] [openembedded-core] 10/20: x11-common: Add PACKAGECONFIG for screen blanking

git at git.openembedded.org git at git.openembedded.org
Fri Apr 8 07:06:04 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 32ac0bfb0167cb350be5d4b8faca490956dd7d93
Author: Jussi Kukkonen <jussi.kukkonen at intel.com>
AuthorDate: Thu Apr 7 14:49:44 2016 +0300

    x11-common: Add PACKAGECONFIG for screen blanking
    
    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 at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../x11-common/x11-common/{etc/X11/Xserver => Xserver.in}        | 2 +-
 meta/recipes-graphics/x11-common/x11-common_0.1.bb               | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver b/meta/recipes-graphics/x11-common/x11-common/Xserver.in
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 73570df..b8eed76 100644
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
+++ b/meta/recipes-graphics/x11-common/x11-common/Xserver.in
@@ -5,7 +5,7 @@ XSERVER=/usr/bin/Xorg
 
 . /etc/profile
 
-ARGS=" -br -pn"
+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..6d7c347 100644
--- a/meta/recipes-graphics/x11-common/x11-common_0.1.bb
+++ b/meta/recipes-graphics/x11-common/x11-common_0.1.bb
@@ -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"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list