From edbeb1b9a30153b06cbb8120cdd718e1ac0ba7d2 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Thu, 11 Jun 2020 19:27:48 +0200 Subject: [PATCH] asterisk-chan-dongle: fix iconv lib detection A small but important oversight crept into the last asterisk-chan-dongle update. The iconv library detection was changed to look for iconv() instead of libiconv(). Reminder: the autoconf macros for finding libraries do _not_ include any extra headers when testing the compile. So the redefinitions done in iconv.h provided by any libiconv (stub or regular) aren't visible during the test the macros execute. This means that when testing for iconv() the only iconv that can be detected is the one from libc. Moreover, if the libc doesn't provide iconv, the check will fail. Below example is with uclibc: checking for iconv in -liconv... no configure: error: iconv library missing Makefile:87: recipe for target '/builder/shared-workdir/build/sdk/build_dir/target-arc_archs_uClibc/asterisk-chan-dongle-asterisk16/asterisk-chan-dongle-2020-05-28-328b2b7d/.configured_a17fb5ef857664f03cd0ce37cc5ea591' failed So, this changes the patch to look for libiconv(), again. Also, instead of using AC_CHECK_LIB this uses AC_SEARCH_LIBS, like upstream does. There apparently was a problem with that in the past, but now it works fine. checking for rm... rm checking for library containing libiconv... -liconv checking for sqlite3_open in -lsqlite3... yes Signed-off-by: Sebastian Kemper --- net/asterisk-chan-dongle/Makefile | 2 +- net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/asterisk-chan-dongle/Makefile b/net/asterisk-chan-dongle/Makefile index 7e9368d..873b678 100644 --- a/net/asterisk-chan-dongle/Makefile +++ b/net/asterisk-chan-dongle/Makefile @@ -13,7 +13,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/wdoekes/asterisk-chan-dongle.git PKG_SOURCE_VERSION:=328b2b7ded3b3c59c2e6c7e7afca6b0ac6f146ce PKG_SOURCE_DATE=2020-05-28 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MIRROR_HASH:=b0af444840340722ecee111a7b1f819de441acf290799ae11bc18e16569c6388 PKG_FIXUP:=autoreconf diff --git a/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch b/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch index f72d8d2..be7d933 100644 --- a/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch +++ b/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch @@ -5,7 +5,7 @@ dnl Checks for libraries. dnl AC_CHECK_LIB([pthread], [pthread_create]) # should use ast_pthread_join everywhere? -AC_SEARCH_LIBS([iconv], [c iconv],,AC_MSG_ERROR([iconv library missing])) -+AC_CHECK_LIB([iconv], [iconv],,AC_MSG_ERROR([iconv library missing])) ++AC_SEARCH_LIBS([libiconv], [iconv],,AC_MSG_ERROR([iconv library missing])) AC_CHECK_LIB([sqlite3], [sqlite3_open],,AC_MSG_ERROR([sqlite3 library missing])) dnl Checks for header files.