* [PATCH 1/3] gsettings: allow the schemas to be in any package
@ 2019-01-08 14:38 Ross Burton
2019-01-08 14:38 ` [PATCH 2/3] pulseaudio: add PACKAGECONFIGs for GConf and GSettings Ross Burton
2019-01-08 14:38 ` [PATCH 3/3] pulseaudio: switch configuration module from GConf to GSettings Ross Burton
0 siblings, 2 replies; 3+ messages in thread
From: Ross Burton @ 2019-01-08 14:38 UTC (permalink / raw)
To: openembedded-core
Instead of assuming that the schemas are located in ${PN}, add a
GSETTINGS_PACKAGE variable for the package name and default it to ${PN}.
For recipe that can conditionally ship schemas, support GSETTINGS_PACKAGE being
empty gracefully by doing nothing.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/classes/gsettings.bbclass | 48 +++++++++++++++++++++++-------------------
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/meta/classes/gsettings.bbclass b/meta/classes/gsettings.bbclass
index eae3dc7999f..47cf00102ec 100644
--- a/meta/classes/gsettings.bbclass
+++ b/meta/classes/gsettings.bbclass
@@ -7,32 +7,36 @@
# TODO use a trigger so that this runs once per package operation run
-
-RDEPENDS_${PN} += "glib-2.0-utils"
-
-FILES_${PN} += "${datadir}/glib-2.0/schemas"
-
-PACKAGE_WRITE_DEPS += "glib-2.0-native"
+GSETTINGS_PACKAGE ?= "${PN}"
+
+python __anonymous() {
+ pkg = d.getVar("GSETTINGS_PACKAGE")
+ if pkg:
+ d.appendVar("PACKAGE_WRITE_DEPS", " glib-2.0-native")
+ d.appendVar("RDEPENDS_" + pkg, " glib-2.0-utils")
+ d.appendVar("FILES_" + pkg, " ${datadir}/glib-2.0/schemas")
+}
gsettings_postinstrm () {
glib-compile-schemas $D${datadir}/glib-2.0/schemas
}
python populate_packages_append () {
- pkg = d.getVar('PN')
- bb.note("adding gsettings postinst scripts to %s" % pkg)
-
- postinst = d.getVar('pkg_postinst_%s' % pkg) or d.getVar('pkg_postinst')
- if not postinst:
- postinst = '#!/bin/sh\n'
- postinst += d.getVar('gsettings_postinstrm')
- d.setVar('pkg_postinst_%s' % pkg, postinst)
-
- bb.note("adding gsettings postrm scripts to %s" % pkg)
-
- postrm = d.getVar('pkg_postrm_%s' % pkg) or d.getVar('pkg_postrm')
- if not postrm:
- postrm = '#!/bin/sh\n'
- postrm += d.getVar('gsettings_postinstrm')
- d.setVar('pkg_postrm_%s' % pkg, postrm)
+ pkg = d.getVar('GSETTINGS_PACKAGE')
+ if pkg:
+ bb.note("adding gsettings postinst scripts to %s" % pkg)
+
+ postinst = d.getVar('pkg_postinst_%s' % pkg) or d.getVar('pkg_postinst')
+ if not postinst:
+ postinst = '#!/bin/sh\n'
+ postinst += d.getVar('gsettings_postinstrm')
+ d.setVar('pkg_postinst_%s' % pkg, postinst)
+
+ bb.note("adding gsettings postrm scripts to %s" % pkg)
+
+ postrm = d.getVar('pkg_postrm_%s' % pkg) or d.getVar('pkg_postrm')
+ if not postrm:
+ postrm = '#!/bin/sh\n'
+ postrm += d.getVar('gsettings_postinstrm')
+ d.setVar('pkg_postrm_%s' % pkg, postrm)
}
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] pulseaudio: add PACKAGECONFIGs for GConf and GSettings
2019-01-08 14:38 [PATCH 1/3] gsettings: allow the schemas to be in any package Ross Burton
@ 2019-01-08 14:38 ` Ross Burton
2019-01-08 14:38 ` [PATCH 3/3] pulseaudio: switch configuration module from GConf to GSettings Ross Burton
1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2019-01-08 14:38 UTC (permalink / raw)
To: openembedded-core
Behaviour is kept the same.
(From OE-Core rev: b1ea450037b3beacc7da5cbd27ad9ce895f475ff)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 91d9b8ef832..7498185c5f2 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -58,10 +58,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \
DEPENDS = "libatomic-ops libsndfile1 libtool intltool-native"
# optional
-DEPENDS += "udev alsa-lib glib-2.0 gconf"
+DEPENDS += "udev alsa-lib glib-2.0"
DEPENDS += "speexdsp libxml-parser-perl-native libcap"
-inherit autotools bash-completion pkgconfig useradd gettext perlnative bluetooth systemd manpages
+inherit autotools bash-completion pkgconfig useradd gettext perlnative bluetooth systemd manpages gsettings
# *.desktop rules wont be generated during configure and build will fail
# if using --disable-nls
@@ -98,20 +98,18 @@ EXTRA_OECONF += "--without-fftw"
# very good anyway, better alternatives exist (such as the webrtc canceller).
EXTRA_OECONF += "--disable-adrian-aec"
-# FIXME: The gsettings module is temporarily disabled, because adding support
-# for it is a bit complicated.
-EXTRA_OECONF += "--disable-gsettings"
-
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd x11', d)} \
- dbus \
+ dbus gconf \
"
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc"
PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc"
+PACKAGECONFIG[gconf] = "--enable-gconf,--disable-gconf,gconf"
+PACKAGECONFIG[gsettings] = "--enable-gsettings,--disable-gsettings,glib-2.0-native glib-2.0"
PACKAGECONFIG[ofono] = "--enable-bluez5-ofono-headset,--disable-bluez5-ofono-headset,ofono"
PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
PACKAGECONFIG[systemd] = "--enable-systemd-daemon --enable-systemd-login --enable-systemd-journal --with-systemduserunitdir=${systemd_user_unitdir},--disable-systemd-daemon --disable-systemd-login --disable-systemd-journal,systemd"
@@ -251,8 +249,11 @@ RDEPENDS_pulseaudio-server += "alsa-plugins-pulseaudio-conf"
RDEPENDS_pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}"
RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix"
-FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper"
FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
+FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper"
+
+GSETTINGS_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'gsettings', 'pulseaudio-module-gsettings', '', d)}"
+FILES_pulseaudio-module-gsettings += "${libexecdir}/pulse/gsettings-helper ${datadir}/GConf/gsettings ${datadir}/glib-2.0/schemas"
# The console-kit module is good to have on X11 systems (it keeps PulseAudio
# running for the duration of the user login session). The device-manager and
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] pulseaudio: switch configuration module from GConf to GSettings
2019-01-08 14:38 [PATCH 1/3] gsettings: allow the schemas to be in any package Ross Burton
2019-01-08 14:38 ` [PATCH 2/3] pulseaudio: add PACKAGECONFIGs for GConf and GSettings Ross Burton
@ 2019-01-08 14:38 ` Ross Burton
1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2019-01-08 14:38 UTC (permalink / raw)
To: openembedded-core
The only user of the configuration module is paprefs, which as of 1.0 uses GSettings not GConf.
Also GConf is unmaintained, so one less recipe using it is good.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 7498185c5f2..1a23bd1ca1b 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -102,7 +102,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd x11', d)} \
- dbus gconf \
+ dbus gsettings \
"
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-08 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-08 14:38 [PATCH 1/3] gsettings: allow the schemas to be in any package Ross Burton
2019-01-08 14:38 ` [PATCH 2/3] pulseaudio: add PACKAGECONFIGs for GConf and GSettings Ross Burton
2019-01-08 14:38 ` [PATCH 3/3] pulseaudio: switch configuration module from GConf to GSettings Ross Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox