[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCHv2 3/3] pulseaudio: add 'autospawn-for-root' PACKAGECONFIG
From:       kergoth () gmail ! com (Christopher Larson)
Date:       2015-08-31 19:12:03
Message-ID: 00b6da871787d810007054f6a8095fbb44d6cbce.1441048182.git.chris_larson () mentor ! com
[Download RAW message or body]

From: Christopher Larson <chris_larson at mentor.com>

Since many embedded systems don't have non-root users, it's useful to be able
to use pulseaudio autospawn for root as well.

Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc \
b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 6199dcd..bca8e36 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -47,6 +47,9 @@ PACKAGECONFIG[systemd] = "--enable-systemd-daemon \
--enable-systemd-login --enabl  PACKAGECONFIG[x11] = \
"--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb"  \
PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"  PACKAGECONFIG[jack] = \
"--enable-jack,--disable-jack,jack" +# Since many embedded systems don't have \
non-root users, it's useful to be +# able to use pulseaudio autospawn for root as \
well. +PACKAGECONFIG[autospawn-for-root] = ",,,"
 
 EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " \
--enable-neon-opt=no", d)}"  EXTRA_OECONF_append_armeb = \
"${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}" @@ \
-59,6 +62,19 @@ export TARGET_PFPU = "${TARGET_FPU}"  OE_LT_RPATH_ALLOW = "any"
 OE_LT_RPATH_ALLOW[export]="1"
 
+set_cfg_value () {
+	sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1"
+	if ! grep -q "^$2 = $3\$" "$1"; then
+		die "Use of sed to set '$2' to '$3' in '$1' failed"
+	fi
+}
+
+do_compile_append () {
+	if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', \
d)}; then +		set_cfg_value src/client.conf allow-autospawn-for-root yes
+	fi
+}
+
 do_install_append() {
 	install -d ${D}${sysconfdir}/default/volatiles
 	install -m 0644 ${WORKDIR}/volatiles.04_pulse  \
                ${D}${sysconfdir}/default/volatiles/volatiles.04_pulse
-- 
2.2.1


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic