Skip to content

Commit

Permalink
package/usbutils: select libiconv if needed
Browse files Browse the repository at this point in the history
Since upstream commit 7c7fed30f7553b551fce3151fe315cf69e602065, which
first appeared in usbutils version 007, iconv is used when available.
Since then, the package has been failing to build when libiconv needs to
be provided by a library external to the C library. This commit fixes
that by selecting BR2_PACKAGE_LIBICONV when libiconv is not provided by
the toolchain.

Fixes:
 http://autobuild.buildroot.net/results/d7d/d7dedb754804242d020d1a0d34dd95c7c1074710//
 http://autobuild.buildroot.net/results/bca/bca14ce4fe05f087e1d8821670ba3165e9820a7f//
 http://autobuild.buildroot.net/results/665/665c064bf28a325a8bc4d9fe16f453be48472e57//
 http://autobuild.buildroot.net/results/b54/b543a3713949571b04dbd9c94f063fa0a186765b//
 http://autobuild.buildroot.net/results/6ea/6ea6cde91c2c6c49f56a08f37fef0c134eda40a0//

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
  • Loading branch information
sebszymanski authored and jolivain committed Feb 4, 2025
1 parent fc503c2 commit 9fb56e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions package/usbutils/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config BR2_PACKAGE_USBUTILS
depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
depends on BR2_PACKAGE_HAS_UDEV # needs hwdb
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
select BR2_PACKAGE_LIBUSB
help
USB enumeration utilities
Expand Down
5 changes: 5 additions & 0 deletions package/usbutils/usbutils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ USBUTILS_DEPENDENCIES = host-pkgconf libusb udev
USBUTILS_LICENSE = GPL-2.0+ (utils) GPL-2.0 or GPL-3.0 (lsusb.py)
USBUTILS_LICENSE_FILES = LICENSES/GPL-2.0-only.txt LICENSES/GPL-3.0-only.txt

ifeq ($(BR2_PACKAGE_LIBICONV),y)
USBUTILS_DEPENDENCIES += libiconv
USBUTILS_LDFLAGS += -liconv
endif

# Nice lsusb.py script only if there's python 3.x
ifeq ($(BR2_PACKAGE_PYTHON3),)
define USBUTILS_REMOVE_PYTHON
Expand Down

0 comments on commit 9fb56e0

Please sign in to comment.