diff mbox

[v2] package/bluez5_utils: Allow user to enable disabled plugins

Message ID 20170321160237.31058-1-andriy.shevchenko@linux.intel.com
State Superseded
Headers show

Commit Message

Andy Shevchenko March 21, 2017, 4:02 p.m. UTC
Disregard to increase just minor version BlueZ 5.44 is drastically different in
a way what tools and plugins are enabled and installed by default.

Extend Buildroot package to cover these changes.

Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 package/bluez5_utils/Config.in       | 28 +++++++++++++++++++++++++++-
 package/bluez5_utils/bluez5_utils.mk | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)

Comments

Peter Korsgaard March 21, 2017, 5:01 p.m. UTC | #1
>>>>> "Andy" == Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

 > Disregard to increase just minor version BlueZ 5.44 is drastically different in
 > a way what tools and plugins are enabled and installed by default.

 > Extend Buildroot package to cover these changes.

 > Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
 > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 > ---
 >  package/bluez5_utils/Config.in       | 28 +++++++++++++++++++++++++++-
 >  package/bluez5_utils/bluez5_utils.mk | 36 ++++++++++++++++++++++++++++++++++++
 >  2 files changed, 63 insertions(+), 1 deletion(-)

 > diff --git a/package/bluez5_utils/Config.in b/package/bluez5_utils/Config.in
 > index a7c0ee4ba..e99f0f69f 100644
 > --- a/package/bluez5_utils/Config.in
 > +++ b/package/bluez5_utils/Config.in
 > @@ -48,6 +48,11 @@ config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
 >  comment "bluez5-utils client needs a glibc or musl toolchain"
 >  	depends on BR2_TOOLCHAIN_USES_UCLIBC
 
 > +config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
 > +	bool "build deprecated tools"
 > +	help
 > +	  Build BlueZ 5.x deprecated tools (hciattach, gatttool, ...).
 > +
 >  config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
 >  	bool "install GATT tool"
 >  	depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT

Then _UTILS_GATTTOOL should depend on _UTILS_DEPRECATED. Or perhaps it
doesn't make sense to have a dedicated option for this and it should
just be automatically installed when deprecated is enabled.

It would also be good to add the autobuilder failures:

http://autobuild.buildroot.net/?reason=bluez5_utils-5.44
Andy Shevchenko March 21, 2017, 5:06 p.m. UTC | #2
On Tue, 2017-03-21 at 18:01 +0100, Peter Korsgaard wrote:

>  > +config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
>  > +	bool "build deprecated tools"
>  > +	help
>  > +	  Build BlueZ 5.x deprecated tools (hciattach, gatttool,
> ...).
>  > +
>  >  config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
>  >  	bool "install GATT tool"
>  >  	depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
> 
> Then _UTILS_GATTTOOL should depend on _UTILS_DEPRECATED.

There is a patch flying around (from Bernd) to fix build and add --
enable-deprecated to GATTTOOL in bluez5_utils.mk.

>  Or perhaps it
> doesn't make sense to have a dedicated option for this and it should
> just be automatically installed when deprecated is enabled.

Note, gatttool is left in noinst list, meaning the option should be
still here.

> It would also be good to add the autobuilder failures:
> 
> http://autobuild.buildroot.net/?reason=bluez5_utils-5.44

Makes sense.
diff mbox

Patch

diff --git a/package/bluez5_utils/Config.in b/package/bluez5_utils/Config.in
index a7c0ee4ba..e99f0f69f 100644
--- a/package/bluez5_utils/Config.in
+++ b/package/bluez5_utils/Config.in
@@ -48,6 +48,11 @@  config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
 comment "bluez5-utils client needs a glibc or musl toolchain"
 	depends on BR2_TOOLCHAIN_USES_UCLIBC
 
+config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
+	bool "build deprecated tools"
+	help
+	  Build BlueZ 5.x deprecated tools (hciattach, gatttool, ...).
+
 config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
 	bool "install GATT tool"
 	depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
@@ -62,7 +67,28 @@  config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
 config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL
 	bool "build experimental plugins"
 	help
-	  Build BlueZ 5.x experimental plugins (SAP, NFC, ...).
+	  Build BlueZ 5.x experimental plugins (PCSuite, ...).
+
+config BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH
+	bool "build health plugin"
+	help
+	  Build BlueZ 5.x health plugin
+
+config BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI
+	bool "build midi plugin"
+	select BR2_PACKAGE_ALSA_LIB
+	help
+	  Build BlueZ 5.x midi plugin
+
+config BR2_PACKAGE_BLUEZ5_PLUGINS_NFC
+	bool "build nfc plugin"
+	help
+	  Build BlueZ 5.x nfc plugin
+
+config BR2_PACKAGE_BLUEZ5_PLUGINS_SAP
+	bool "build sap plugin"
+	help
+	  Build BlueZ 5.x sap plugin
 
 config BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS
 	bool "build sixaxis plugin"
diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
index 4d31a187b..4eae3d01d 100644
--- a/package/bluez5_utils/bluez5_utils.mk
+++ b/package/bluez5_utils/bluez5_utils.mk
@@ -38,6 +38,35 @@  else
 BLUEZ5_UTILS_CONF_OPTS += --disable-experimental
 endif
 
+# enable health plugin
+ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-health
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-health
+endif
+
+# enable midi plugin
+ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-midi
+BLUEZ5_UTILS_DEPENDENCIES += alsa-lib
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-midi
+endif
+
+# enable nfc plugin
+ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_NFC),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-nfc
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-nfc
+endif
+
+# enable sap plugin
+ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_SAP),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-sap
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-sap
+endif
+
 # enable sixaxis plugin
 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS),y)
 BLUEZ5_UTILS_CONF_OPTS += --enable-sixaxis
@@ -45,6 +74,13 @@  else
 BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis
 endif
 
+# build deprecated tools
+ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-deprecated
+endif
+
 # install gatttool (For some reason upstream choose not to do it by default)
 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL),y)
 define BLUEZ5_UTILS_INSTALL_GATTTOOL