From d5f36f53941641e3be9874f9bfd93f44dda8b7a7 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Wed, 18 Jul 2018 22:07:48 +0200 Subject: [PATCH] asterisk-chan-dongle: remove iconv hack Remove the hack for iconv on uclibc. Instead include nls.mk which will sort out the iconv depends. This changes the iconv patch. AC_SEARCH_LIB doesn't work properly for openwrt/lede. Instead use AC_CHECK_LIB. Signed-off-by: Sebastian Kemper --- net/asterisk-chan-dongle/Makefile | 10 +++------- .../patches/200-fix-iconv-detection.patch | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/net/asterisk-chan-dongle/Makefile b/net/asterisk-chan-dongle/Makefile index 643359f..0dea448 100644 --- a/net/asterisk-chan-dongle/Makefile +++ b/net/asterisk-chan-dongle/Makefile @@ -29,13 +29,15 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSI MODULES_DIR:=/usr/lib/asterisk/modules include $(INCLUDE_DIR)/package.mk +# asterisk-chan-dongle needs iconv +include $(INCLUDE_DIR)/nls.mk define Package/asterisk-chan-dongle/Default SUBMENU:=Telephony SECTION:=net CATEGORY:=Network URL:=https://github.com/wdoekes/asterisk-chan-dongle - DEPENDS:=+USE_UCLIBC:libiconv-full +kmod-usb-acm +kmod-usb-serial +kmod-usb-serial-option +libusb-1.0 +usb-modeswitch + DEPENDS:=$(ICONV_DEPENDS) +kmod-usb-acm +kmod-usb-serial +kmod-usb-serial-option +libusb-1.0 +usb-modeswitch TITLE:=Huawei UMTS 3G dongle support endef @@ -78,13 +80,7 @@ TARGET_CFLAGS+= \ MAKE_FLAGS+=LD="$(TARGET_CC)" -# musl and glibc include their own iconv, but uclibc does not -TARGET_CPPFLAGS+=$(if $(CONFIG_USE_UCLIBC),-I$(STAGING_DIR)/usr/lib/libiconv-full/include) -TARGET_LDFLAGS+=$(if $(CONFIG_USE_UCLIBC),-L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv) - -# $CHAN_DONGLE_ICONV_INC used by 200-fix-iconv-detection.patch CONFIGURE_VARS += \ - CHAN_DONGLE_ICONV_INC="$(TOOLCHAIN_DIR)/include $(STAGING_DIR)/usr/lib/libiconv-full/include" \ DESTDIR="$(MODULES_DIR)" \ ac_cv_type_size_t=yes \ ac_cv_type_ssize_t=yes 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 211764f..5419884 100644 --- a/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch +++ b/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch @@ -1,11 +1,21 @@ --- a/configure.ac +++ b/configure.ac -@@ -102,7 +102,7 @@ AC_DEFUN([AC_HEADER_FIND], [ +@@ -77,7 +77,8 @@ fi + dnl Checks for libraries. + dnl AC_CHECK_LIB([pthread], [pthread_create]) + dnl AC_CHECK_LIB([iconv], [iconv]) +-AC_SEARCH_LIBS([iconv], [c iconv]) ++dnl AC_SEARCH_LIBS([iconv], [c iconv]) ++AC_CHECK_LIB([iconv], [libiconv]) + + dnl Checks for header files. + AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h termios.h]) +@@ -102,7 +103,7 @@ AC_DEFUN([AC_HEADER_FIND], [ ) AC_HEADER_FIND([asterisk.h], $with_asterisk) -AC_HEADER_FIND([iconv.h], /usr/include /usr/local/include /opt/local/include) -+AC_HEADER_FIND([iconv.h], ${CHAN_DONGLE_ICONV_INC}) ++dnl AC_HEADER_FIND([iconv.h], /usr/include /usr/local/include /opt/local/include) AC_DEFINE([ICONV_CONST],[], [Define to const if you has iconv() const declaration of input buffer]) AC_MSG_CHECKING([for iconv use const inbuf]) -- 2.30.2