From aa45c75df989302ba8ae9deaf136b0046f0b4f84 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Thu, 7 Apr 2016 14:49:44 +0300 Subject: 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]. (From OE-Core rev: 32ac0bfb0167cb350be5d4b8faca490956dd7d93) Signed-off-by: Jussi Kukkonen Signed-off-by: Richard Purdie --- meta/recipes-graphics/x11-common/x11-common/Xserver.in | 12 ++++++++++++ meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver | 12 ------------ meta/recipes-graphics/x11-common/x11-common_0.1.bb | 9 ++++++++- 3 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 meta/recipes-graphics/x11-common/x11-common/Xserver.in delete mode 100644 meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver (limited to 'meta/recipes-graphics') diff --git a/meta/recipes-graphics/x11-common/x11-common/Xserver.in b/meta/recipes-graphics/x11-common/x11-common/Xserver.in new file mode 100644 index 0000000000..b8eed7610f --- /dev/null +++ b/meta/recipes-graphics/x11-common/x11-common/Xserver.in @@ -0,0 +1,12 @@ +#!/bin/sh +# + +XSERVER=/usr/bin/Xorg + +. /etc/profile + +ARGS=" -br -pn @BLANK_ARGS@" + +DISPLAY=':0' + +exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver deleted file mode 100644 index 73570dfeb5..0000000000 --- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# - -XSERVER=/usr/bin/Xorg - -. /etc/profile - -ARGS=" -br -pn" - -DISPLAY=':0' - -exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* 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 156b329486..6d7c347c00 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" -- cgit v1.2.3-54-g00ecf