Provide Bluetooth and BlueZ 5 41/4141/1
authorManuel Bachmann <mbc@iot.bzh>
Wed, 21 Oct 2015 01:21:46 +0000 (01:21 +0000)
committerManuel Bachmann <mbc@iot.bzh>
Wed, 21 Oct 2015 01:27:04 +0000 (01:27 +0000)
Add "bluetooth" as an explicit DISTRO_FEATURE and,
as "bluez4" is the default choice, specify "bluez5"
which allows more modern features.

PulseAudio from Poky 1.7 always pulls BlueZ 4 if
Bluetooth is specified, thus creating build errors
unless we add a workaround for it.

Change-Id: I3e9f86c77f5971c0d71666f8decb7d3d3a0fdcb4
Signed-off-by: Manuel Bachmann <mbc@iot.bzh>
meta-agl/conf/distro/poky-agl.conf
meta-agl/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend [new file with mode: 0644]

index 0f5a191..58abfcd 100644 (file)
@@ -19,7 +19,7 @@ VIRTUAL-RUNTIME_init_manager = "systemd"
 VIRTUAL-RUNTIME_initscripts = ""
 
 # Override these in poky based distros
-AGL_DEFAULT_DISTRO_FEATURES = "systemd opengl wayland pam"
+AGL_DEFAULT_DISTRO_FEATURES = "systemd opengl wayland pam bluetooth bluez5"
 AGL_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
 AGL_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
 
diff --git a/meta-agl/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-agl/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
new file mode 100644 (file)
index 0000000..2d9f558
--- /dev/null
@@ -0,0 +1,6 @@
+# Prevent BlueZ 4 from being always pulled
+PACKAGECONFIG_remove = "bluez4"
+
+# If Bluetooth is asked in DISTRO_FEATURES, verify if Bluez 5 is also
+# explicitly specified. If it is not, fall back to BlueZ 4
+PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5', 'bluez4', d), '', d)}"