summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-30 22:17:00 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-30 22:18:11 +0100
commit97f6ba2e7bae5df8ae07b8062a5b80e044cedecb (patch)
treed53c109d9994bc4e2584595dae7ce6c6175ff8b8
parent26e1b249da4f041494f131dc9d1544419b50c87b (diff)
downloadbuildroot-97f6ba2e7bae5df8ae07b8062a5b80e044cedecb.tar.gz
buildroot-97f6ba2e7bae5df8ae07b8062a5b80e044cedecb.zip
hidapi: add libiconv handling
hidapi uses iconv functions, which on uClibc without locale support is provided by the external libiconv library. This commit adds the necessary libiconv handling to make the hidapi package build on !locale toolchains. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/hidapi/Config.in1
-rw-r--r--package/hidapi/hidapi.mk5
2 files changed, 6 insertions, 0 deletions
diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
index c48a096d99..5119aac93d 100644
--- a/package/hidapi/Config.in
+++ b/package/hidapi/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_HIDAPI
depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
select BR2_PACKAGE_LIBUSB
select BR2_PACKAGE_LIBGUDEV
+ select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
help
HIDAPI is a multi-platform library which allows an application
to interface with USB and Bluetooth HID-Class devices on
diff --git a/package/hidapi/hidapi.mk b/package/hidapi/hidapi.mk
index b16e4ae549..270836c6c1 100644
--- a/package/hidapi/hidapi.mk
+++ b/package/hidapi/hidapi.mk
@@ -16,4 +16,9 @@ HIDAPI_LICENSE_FILES = LICENSE.txt LICENSE-gpl3.txt LICENSE-bsd.txt LICENSE-orig
HIDAPI_DEPENDENCIES = libusb libgudev
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+HIDAPI_DEPENDENCIES += libiconv
+HIDAPI_CONF_ENV += LIBS="-liconv"
+endif
+
$(eval $(autotools-package))
OpenPOWER on IntegriCloud