hidapi: add libiconv handling
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 30 Dec 2015 21:17:00 +0000 (22:17 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 30 Dec 2015 21:18:11 +0000 (22:18 +0100)
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>
package/hidapi/Config.in
package/hidapi/hidapi.mk

index c48a096d99ddcb7b42d6c880c270a0930ecbfed4..5119aac93d58d4bbaa7b7d1cf031d6bbfc50926d 100644 (file)
@@ -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
index b16e4ae5494ed7c9b5156b82e619c35e6a458c78..270836c6c139a97cab8b87fbc0ec13da1980196a 100644 (file)
@@ -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))