summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/usbutils
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2014-02-14 18:54:37 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-17 15:37:17 +0000
commit94ba45932c2fcd15aa894c8dc4063a261e993b96 (patch)
tree40b78fb5adebd7fc12a560baf7717ae8c2839cb1 /meta/recipes-bsp/usbutils
parentc33c645953bbb95ef3428534f8dbd1672ff10532 (diff)
downloadpoky-94ba45932c2fcd15aa894c8dc4063a261e993b96.tar.gz
usbutils: Patch to detect iconv support
Fixes build failures on uclibc | lsusb-usbmisc.o: In function `usb_string_to_native': | /home/kraj/work/angstrom-repo/build/tmp-angstrom_next-uclibc/work/armv7at2hf-vfp-neon-angstrom-linux-uclibceabi/usbutils/007-r0/usbutils-007/usbmisc.c:190: undefined reference to `libiconv_open' | /home/kraj/work/angstrom-repo/build/tmp-angstrom_next-uclibc/work/armv7at2hf-vfp-neon-angstrom-linux-uclibceabi/usbutils/007-r0/usbutils-007/usbmisc.c:199: undefined reference to `libiconv' | /home/kraj/work/angstrom-repo/build/tmp-angstrom_next-uclibc/work/armv7at2hf-vfp-neon-angstrom-linux-uclibceabi/usbutils/007-r0/usbutils-007/usbmisc.c:202: undefined reference to `libiconv_close' | collect2: error: ld returned 1 exit status | make[2]: *** [lsusb] Error 1 (From OE-Core rev: c782d07597c9839aca755c63c65b46c165d54042) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/usbutils')
-rw-r--r--meta/recipes-bsp/usbutils/usbutils/iconv.patch40
-rw-r--r--meta/recipes-bsp/usbutils/usbutils_007.bb8
2 files changed, 45 insertions, 3 deletions
diff --git a/meta/recipes-bsp/usbutils/usbutils/iconv.patch b/meta/recipes-bsp/usbutils/usbutils/iconv.patch
new file mode 100644
index 0000000000..c557334a75
--- /dev/null
+++ b/meta/recipes-bsp/usbutils/usbutils/iconv.patch
@@ -0,0 +1,40 @@
1This patch adds support for detecting iconv support using autotools
2uclibc does not have iconv implementation inside libc like glibc, therefore
3the existing checks were not sufficient, it worked for glibc but not for
4uclibc. The new patch portably detects the iconv support and adds the
5libiconv to linker cmdline
6
7This patch should be submitted upstream too
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13Index: usbutils-007/configure.ac
14===================================================================
15--- usbutils-007.orig/configure.ac
16+++ usbutils-007/configure.ac
17@@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
18 AC_SYS_LARGEFILE
19
20 AC_CHECK_HEADERS([byteswap.h])
21-AC_CHECK_FUNCS([nl_langinfo iconv])
22+
23+AM_GNU_GETTEXT
24+AM_ICONV
25
26 AC_ARG_ENABLE(zlib,
27 AS_HELP_STRING(--disable-zlib,disable support for zlib))
28Index: usbutils-007/Makefile.am
29===================================================================
30--- usbutils-007.orig/Makefile.am
31+++ usbutils-007/Makefile.am
32@@ -27,7 +27,7 @@ lsusb_CPPFLAGS = \
33 -DDATADIR=\"$(datadir)\"
34
35 lsusb_LDADD = \
36- $(LIBUSB_LIBS)
37+ $(LIBUSB_LIBS) $(LIBICONV)
38
39 if HAVE_ZLIB
40 lsusb_CPPFLAGS += -DHAVE_LIBZ
diff --git a/meta/recipes-bsp/usbutils/usbutils_007.bb b/meta/recipes-bsp/usbutils/usbutils_007.bb
index 45f829fe7f..3cb19c969c 100644
--- a/meta/recipes-bsp/usbutils/usbutils_007.bb
+++ b/meta/recipes-bsp/usbutils/usbutils_007.bb
@@ -6,16 +6,18 @@ SECTION = "base"
6LICENSE = "GPLv2+" 6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" 7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
8 8
9DEPENDS = "libusb zlib" 9DEPENDS = "libusb zlib virtual/libiconv"
10 10
11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ 11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
12 file://usb-devices-avoid-dependency-on-bash.patch \ 12 file://usb-devices-avoid-dependency-on-bash.patch \
13 file://Fix-NULL-pointer-crash.patch" 13 file://Fix-NULL-pointer-crash.patch \
14 file://iconv.patch \
15 "
14 16
15SRC_URI[md5sum] = "be6c42294be5c940f208190d3479d50c" 17SRC_URI[md5sum] = "be6c42294be5c940f208190d3479d50c"
16SRC_URI[sha256sum] = "e65c234cadf7c81b6b1567c440e3b9b31b44f51c27df3e45741b88848d8b37d3" 18SRC_URI[sha256sum] = "e65c234cadf7c81b6b1567c440e3b9b31b44f51c27df3e45741b88848d8b37d3"
17 19
18inherit autotools 20inherit autotools gettext
19 21
20do_install_append() { 22do_install_append() {
21 # We only need the compressed copy, remove the uncompressed version 23 # We only need the compressed copy, remove the uncompressed version