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 <sebastian_ml@gmx.net>
87 lines
2.2 KiB
Makefile
87 lines
2.2 KiB
Makefile
#
|
|
# Copyright (C) 2017 - 2018 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=asterisk-chan-dongle
|
|
|
|
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:=2
|
|
PKG_MIRROR_HASH:=b0af444840340722ecee111a7b1f819de441acf290799ae11bc18e16569c6388
|
|
|
|
PKG_FIXUP:=autoreconf
|
|
|
|
PKG_LICENSE:=GPL-2.0
|
|
PKG_LICENSE_FILES:=COPYRIGHT.txt LICENSE.txt
|
|
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
|
|
|
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:=$(ICONV_DEPENDS) +libsqlite3
|
|
TITLE:=Huawei UMTS 3G dongle support
|
|
endef
|
|
|
|
define Package/asterisk16-chan-dongle
|
|
$(call Package/asterisk-chan-dongle/Default)
|
|
DEPENDS+=asterisk16
|
|
VARIANT:=asterisk16
|
|
endef
|
|
|
|
define Package/description/Default
|
|
Asterisk channel driver for Huawei UMTS 3G dongle.
|
|
endef
|
|
|
|
Package/asterisk16-chan-dongle/description = $(Package/description/Default)
|
|
|
|
ifeq ($(BUILD_VARIANT),asterisk16)
|
|
CHAN_DONGLE_AST_HEADERS:=$(STAGING_DIR)/usr/include/asterisk-16/include
|
|
CONFIGURE_ARGS+= \
|
|
--with-astversion=16
|
|
endif
|
|
|
|
CONFIGURE_ARGS+= \
|
|
--with-asterisk=$(CHAN_DONGLE_AST_HEADERS) \
|
|
--with-iconv=$(ICONV_PREFIX)/include
|
|
|
|
TARGET_CFLAGS+= \
|
|
-I$(CHAN_DONGLE_AST_HEADERS)
|
|
|
|
MAKE_FLAGS+=LD="$(TARGET_CC)"
|
|
|
|
CONFIGURE_VARS += \
|
|
DESTDIR="$(MODULES_DIR)" \
|
|
ac_cv_type_size_t=yes \
|
|
ac_cv_type_ssize_t=yes
|
|
|
|
define Package/conffiles/Default
|
|
/etc/asterisk/dongle.conf
|
|
endef
|
|
|
|
Package/asterisk16-chan-dongle/conffiles = $(Package/conffiles/Default)
|
|
|
|
define Package/Install/Default
|
|
$(INSTALL_DIR) $(1)/etc/asterisk
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/dongle.conf $(1)/etc/asterisk
|
|
$(INSTALL_DIR) $(1)$(MODULES_DIR)
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/chan_dongle.so $(1)$(MODULES_DIR)
|
|
endef
|
|
|
|
Package/asterisk16-chan-dongle/install = $(Package/Install/Default)
|
|
|
|
$(eval $(call BuildPackage,asterisk16-chan-dongle))
|