[Buildroot] [git commit branch/next] package/sbc: add config option to control tools build
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Mon Nov 14 22:03:06 UTC 2022
commit: https://git.buildroot.net/buildroot/commit/?id=3d8b6e9e253f2abf7469f41093b520da33c28374
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next
libsndfile is only needed by the sbctester utility and the library can
be built without this dependency.
Add a config option to cover not just sbctester but the command-line
utilities as well. While the utilities may be useful for debugging,
normal usage will only need libsbc and these applications can be
omitted.
Signed-off-by: John Keeping <john at metanate.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
package/sbc/Config.in | 11 ++++++++++-
package/sbc/sbc.mk | 12 ++++++++++--
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/package/sbc/Config.in b/package/sbc/Config.in
index f1dbc0ec2c..4d1f6297f7 100644
--- a/package/sbc/Config.in
+++ b/package/sbc/Config.in
@@ -1,8 +1,17 @@
config BR2_PACKAGE_SBC
bool "sbc"
- select BR2_PACKAGE_LIBSNDFILE
help
An audio codec to connect bluetooth high quality audio
devices like headphones or loudspeakers.
http://www.bluez.org/
+
+if BR2_PACKAGE_SBC
+
+config BR2_PACKAGE_SBC_TOOLS
+ bool "tools"
+ select BR2_PACKAGE_LIBSNDFILE
+ help
+ Build the command-line SBC tools as well as the library.
+
+endif
diff --git a/package/sbc/sbc.mk b/package/sbc/sbc.mk
index 744ce5f895..7a37a99643 100644
--- a/package/sbc/sbc.mk
+++ b/package/sbc/sbc.mk
@@ -8,8 +8,16 @@ SBC_VERSION = 2.0
SBC_SOURCE = sbc-$(SBC_VERSION).tar.xz
SBC_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth
SBC_INSTALL_STAGING = YES
-SBC_DEPENDENCIES = libsndfile host-pkgconf
-SBC_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (library)
+SBC_DEPENDENCIES = host-pkgconf
+SBC_LICENSE := LGPL-2.1+ (library)
SBC_LICENSE_FILES = COPYING COPYING.LIB
+ifeq ($(BR2_PACKAGE_SBC_TOOLS),y)
+SBC_DEPENDENCIES += libsndfile
+SBC_CONF_OPTS += --enable-tools --enable-tester
+SBC_LICENSE += , GPL-2.0+ (programs)
+else
+SBC_CONF_OPTS += --disable-tools --disable-tester
+endif
+
$(eval $(autotools-package))
More information about the buildroot
mailing list