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>
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"
--- /dev/null
+# 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)}"