From 8554506b3b1f3557cea92bea6dfd7eae41efa29a Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 2 Sep 2017 00:17:42 +0200 Subject: [PATCH 1/6] asterisk11 + asterisk13: use system libedit libedit now includes a pkgconfig file, meaning asterisk can detect it. So use the system libedit instead having asterisk include an internal copy. Signed-off-by: Sebastian Kemper --- net/asterisk-11.x/Makefile | 3 ++- net/asterisk-13.x/Makefile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/asterisk-11.x/Makefile b/net/asterisk-11.x/Makefile index f03bc82..b856fb4 100644 --- a/net/asterisk-11.x/Makefile +++ b/net/asterisk-11.x/Makefile @@ -99,7 +99,7 @@ define Package/asterisk11 $(call Package/asterisk11/Default) TITLE:=Complete open source PBX, v$(PKG_VERSION) MENU:=1 - DEPENDS:=+libopenssl +libncurses +libpopt +libpthread +libsqlite3 +librt +libuuid +zlib @!TARGET_avr32 + DEPENDS:=+libopenssl +libedit +libncurses +libpopt +libpthread +libsqlite3 +librt +libuuid +zlib @!TARGET_avr32 CONFLICTS:=asterisk13 endef @@ -255,6 +255,7 @@ CONFIGURE_ARGS+= \ --with-ilbc=internal \ --without-isdnnet \ --without-libxml2 \ + --with-libedit="$(STAGING_DIR)/usr" \ --without-misdn \ --without-nbs \ --with-ncurses="$(STAGING_DIR)/usr" \ diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile index 1d6ef14..ed07221 100644 --- a/net/asterisk-13.x/Makefile +++ b/net/asterisk-13.x/Makefile @@ -99,7 +99,7 @@ define Package/asterisk13 $(call Package/asterisk13/Default) TITLE:=Complete open source PBX, v$(PKG_VERSION) MENU:=1 - DEPENDS:=+jansson +libncurses +libopenssl +libpopt +libsqlite3 +libstdcpp +libuuid +libxml2 +libxslt +zlib + DEPENDS:=+jansson +libedit +libncurses +libopenssl +libpopt +libsqlite3 +libstdcpp +libuuid +libxml2 +libxslt +zlib endef define Package/asterisk13/description @@ -198,6 +198,7 @@ CONFIGURE_ARGS+= \ --without-nbs \ --without-neon \ --without-neon29 \ + --with-libedit="$(STAGING_DIR)/usr" \ --with-libxml2 \ --with-ncurses="$(STAGING_DIR)/usr" \ --without-netsnmp \ From 9e13de48f09f7336660cd06181708ff062109892 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 2 Sep 2017 00:21:13 +0200 Subject: [PATCH 2/6] asterisk13: add missing commas to module definitions Only a cosmetic change. Signed-off-by: Sebastian Kemper --- net/asterisk-13.x/Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile index ed07221..5cec32b 100644 --- a/net/asterisk-13.x/Makefile +++ b/net/asterisk-13.x/Makefile @@ -323,7 +323,7 @@ $(eval $(call BuildAsterisk13Module,app-minivm,Minimal voicemail system,a voicem $(eval $(call BuildAsterisk13Module,app-mixmonitor,Record a call and mix the audio,record a call and mix the audio during the recording,,,app_mixmonitor,,)) $(eval $(call BuildAsterisk13Module,app-originate,Originate a call,originating an outbound call and connecting it to a specified extension or application,,,app_originate,,)) $(eval $(call BuildAsterisk13Module,app-playtones,Playtones application,play a tone list,,,app_playtones,,)) -$(eval $(call BuildAsterisk13Module,app-queue,True Call Queueing,support for ACD,,queues.conf queuerules.conf,app_queue,)) +$(eval $(call BuildAsterisk13Module,app-queue,True Call Queueing,support for ACD,,queues.conf queuerules.conf,app_queue,,)) $(eval $(call BuildAsterisk13Module,app-read,Variable read,a trivial application to read a variable,,,app_read,,)) $(eval $(call BuildAsterisk13Module,app-readexten,Extension to variable,a trivial application to read an extension into a variable,,,app_readexten,,)) $(eval $(call BuildAsterisk13Module,app-record,Record sound file,to record a sound file,,,app_record,,)) @@ -337,12 +337,12 @@ $(eval $(call BuildAsterisk13Module,app-talkdetect,File playback with audio dete $(eval $(call BuildAsterisk13Module,app-verbose,Verbose logging,Verbose logging application,,,app_verbose,,)) $(eval $(call BuildAsterisk13Module,app-waituntil,Sleep,support sleeping until the given epoch,,,app_waituntil,,)) $(eval $(call BuildAsterisk13Module,app-while,While loop,a while loop implementation,,,app_while,,)) -$(eval $(call BuildAsterisk13Module,bridge-builtin-features,Bridging features,built in bridging features,,,bridge_builtin_features)) -$(eval $(call BuildAsterisk13Module,bridge-builtin-interval-features,Built in bridging interval features,built in bridging interval features,,,bridge_builtin_interval_features)) -$(eval $(call BuildAsterisk13Module,bridge-holding,Bridging for storing channels in a bridge,bridging technology for storing channels in a bridge,,,bridge_holding)) -$(eval $(call BuildAsterisk13Module,bridge-native-rtp,Native RTP bridging technology module,native RTP bridging technology module,,,bridge_native_rtp)) -$(eval $(call BuildAsterisk13Module,bridge-simple,Simple two channel bridging module,simple two channel bridging module,,,bridge_simple)) -$(eval $(call BuildAsterisk13Module,bridge-softmix,Multi-party software based channel mixing,multi-party software based channel mixing,,,bridge_softmix)) +$(eval $(call BuildAsterisk13Module,bridge-builtin-features,Bridging features,built in bridging features,,,bridge_builtin_features,,)) +$(eval $(call BuildAsterisk13Module,bridge-builtin-interval-features,Built in bridging interval features,built in bridging interval features,,,bridge_builtin_interval_features,,)) +$(eval $(call BuildAsterisk13Module,bridge-holding,Bridging for storing channels in a bridge,bridging technology for storing channels in a bridge,,,bridge_holding,,)) +$(eval $(call BuildAsterisk13Module,bridge-native-rtp,Native RTP bridging technology module,native RTP bridging technology module,,,bridge_native_rtp,,)) +$(eval $(call BuildAsterisk13Module,bridge-simple,Simple two channel bridging module,simple two channel bridging module,,,bridge_simple,,)) +$(eval $(call BuildAsterisk13Module,bridge-softmix,Multi-party software based channel mixing,multi-party software based channel mixing,,,bridge_softmix,,)) $(eval $(call BuildAsterisk13Module,cdr,Provides CDR,Call Detail Record,,cdr.conf cdr_custom.conf cdr_manager.conf cdr_syslog.conf,app_cdr app_forkcdr cdr_custom cdr_manager cdr_syslog func_cdr,,)) $(eval $(call BuildAsterisk13Module,cdr-csv,Provides CDR CSV,Call Detail Record with CSV support,,,cdr_csv,,)) $(eval $(call BuildAsterisk13Module,cdr-sqlite3,Provides CDR SQLITE3,Call Detail Record with SQLITE3 support,libsqlite3,,cdr_sqlite3_custom,,)) @@ -382,15 +382,15 @@ $(eval $(call BuildAsterisk13Module,func-base64,base64 support,support of base64 $(eval $(call BuildAsterisk13Module,func-blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted,,,func_blacklist,,)) $(eval $(call BuildAsterisk13Module,func-channel,Channel info,Channel info dialplan function,,,func_channel,,)) $(eval $(call BuildAsterisk13Module,func-cut,CUT function,CUT function,,,func_cut,,)) -$(eval $(call BuildAsterisk13Module,func-db,Database interaction,functions for interaction with the database,,,func_db app_db,)) +$(eval $(call BuildAsterisk13Module,func-db,Database interaction,functions for interaction with the database,,,func_db app_db,,)) $(eval $(call BuildAsterisk13Module,func-devstate,Blinky lights control,functions for manually controlled blinky lights,,,func_devstate,,)) -$(eval $(call BuildAsterisk13Module,func-enum,ENUM,ENUM,,enum.conf,func_enum,)) -$(eval $(call BuildAsterisk13Module,func-env,Environment functions,Environment dialplan functions,,,func_env,)) +$(eval $(call BuildAsterisk13Module,func-enum,ENUM,ENUM,,enum.conf,func_enum,,)) +$(eval $(call BuildAsterisk13Module,func-env,Environment functions,Environment dialplan functions,,,func_env,,)) $(eval $(call BuildAsterisk13Module,func-extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control,,,func_extstate,,)) $(eval $(call BuildAsterisk13Module,func-global,Global variable,global variable dialplan functions,,,func_global,,)) $(eval $(call BuildAsterisk13Module,func-groupcount,Group count,for counting number of channels in the specified group,,,func_groupcount,,)) -$(eval $(call BuildAsterisk13Module,func-math,Math functions,Math functions,,,func_math,)) -$(eval $(call BuildAsterisk13Module,func-module,Simple module check function,Simple module check function,,,func_module,)) +$(eval $(call BuildAsterisk13Module,func-math,Math functions,Math functions,,,func_math,,)) +$(eval $(call BuildAsterisk13Module,func-module,Simple module check function,Simple module check function,,,func_module,,)) $(eval $(call BuildAsterisk13Module,func-periodic-hook,Periodic dialplan hooks,Execute a periodic dialplan hook into the audio of a call,,,func_periodic_hook,,)) $(eval $(call BuildAsterisk13Module,func-presencestate,Hinted presence state,Gets or sets a presence state in the dialplan,,,func_presencestate,,)) $(eval $(call BuildAsterisk13Module,func-rand,RAND dialplan function,RAND dialplan function,,,func_rand,,)) From eb3c046f03ad9a2cd046eb6a4cfe77ba7038016f Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 2 Sep 2017 00:22:42 +0200 Subject: [PATCH 3/6] asterisk13: add func_iconv Add new module. Iconv is available in the toolchain, so it doesn't cost anything. Don't add it when uclibc is used, because there an external libiconv would be needed. Signed-off-by: Sebastian Kemper --- net/asterisk-13.x/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile index 5cec32b..cbf7f3d 100644 --- a/net/asterisk-13.x/Makefile +++ b/net/asterisk-13.x/Makefile @@ -389,6 +389,7 @@ $(eval $(call BuildAsterisk13Module,func-env,Environment functions,Environment d $(eval $(call BuildAsterisk13Module,func-extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control,,,func_extstate,,)) $(eval $(call BuildAsterisk13Module,func-global,Global variable,global variable dialplan functions,,,func_global,,)) $(eval $(call BuildAsterisk13Module,func-groupcount,Group count,for counting number of channels in the specified group,,,func_groupcount,,)) +$(eval $(call BuildAsterisk13Module,func-iconv,Charset conversion,charset conversion,@!USE_UCLIBC,,func_iconv,,)) $(eval $(call BuildAsterisk13Module,func-math,Math functions,Math functions,,,func_math,,)) $(eval $(call BuildAsterisk13Module,func-module,Simple module check function,Simple module check function,,,func_module,,)) $(eval $(call BuildAsterisk13Module,func-periodic-hook,Periodic dialplan hooks,Execute a periodic dialplan hook into the audio of a call,,,func_periodic_hook,,)) From fa7b0c6cae36b874d3aebb737e8144ea684f0e7b Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 2 Sep 2017 00:24:51 +0200 Subject: [PATCH 4/6] asterisk-chan-dongle: change project URL Change the upstream URL to the one where we get the source from to avoid confusion. Signed-off-by: Sebastian Kemper --- net/asterisk-chan-dongle/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/asterisk-chan-dongle/Makefile b/net/asterisk-chan-dongle/Makefile index 822dbbf..891d799 100644 --- a/net/asterisk-chan-dongle/Makefile +++ b/net/asterisk-chan-dongle/Makefile @@ -31,7 +31,7 @@ define Package/asterisk-chan-dongle/Default SUBMENU:=Telephony SECTION:=net CATEGORY:=Network - URL:=https://code.google.com/p/asterisk-chan-dongle + URL:=https://github.com/wdoekes/asterisk-chan-dongle DEPENDS:=+kmod-usb-acm +kmod-usb-serial +kmod-usb-serial-option +libusb-1.0 +usb-modeswitch TITLE:=Huawei UMTS 3G dongle support endef From 0835ad378be725ca84998a5866a119023c48618a Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 2 Sep 2017 00:28:16 +0200 Subject: [PATCH 5/6] asterisk-chan-dongle: fix uclibc build uclibc doesn't include iconv, so we need to use libiconv-full. This fixes the ARC builds as they still default to uclibc. Signed-off-by: Sebastian Kemper --- net/asterisk-chan-dongle/Makefile | 14 ++++++++++---- .../patches/200-fix-iconv-detection.patch | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/net/asterisk-chan-dongle/Makefile b/net/asterisk-chan-dongle/Makefile index 891d799..43ed2d3 100644 --- a/net/asterisk-chan-dongle/Makefile +++ b/net/asterisk-chan-dongle/Makefile @@ -32,7 +32,7 @@ define Package/asterisk-chan-dongle/Default SECTION:=net CATEGORY:=Network URL:=https://github.com/wdoekes/asterisk-chan-dongle - DEPENDS:=+kmod-usb-acm +kmod-usb-serial +kmod-usb-serial-option +libusb-1.0 +usb-modeswitch + DEPENDS:=+USE_UCLIBC:libiconv-full +kmod-usb-acm +kmod-usb-serial +kmod-usb-serial-option +libusb-1.0 +usb-modeswitch TITLE:=Huawei UMTS 3G dongle support endef @@ -73,6 +73,12 @@ CONFIGURE_ARGS+= \ TARGET_CFLAGS+= \ -I$(CHAN_DONGLE_AST_HEADERS) +# musl and glibc include their own iconv, but uclibc does not +ifneq ($(CONFIG_USE_UCLIBC),) +TARGET_CPPFLAGS+= \ + -I$(STAGING_DIR)/usr/lib/libiconv-full/include +endif + # -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self to fix Asterisk 14 # compile issues CHAN_DONGLE_EXTRA_CFLAGS:= \ @@ -88,11 +94,11 @@ MAKE_ARGS:= \ CC="$(TARGET_CC)" \ LD="$(TARGET_CC)" \ CFLAGS="$(TARGET_CFLAGS) $(CHAN_DONGLE_EXTRA_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" + LDFLAGS="$(TARGET_LDFLAGS) $(if $(CONFIG_USE_UCLIBC),-L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv)" -# $TOOLCHAIN_DIR used by 200-fix-iconv-detection.patch +# $CHAN_DONGLE_ICONV_INC used by 200-fix-iconv-detection.patch CONFIGURE_VARS += \ - TOOLCHAIN_DIR=$(TOOLCHAIN_DIR) \ + CHAN_DONGLE_ICONV_INC="$(TOOLCHAIN_DIR)/include $(STAGING_DIR)/usr/lib/libiconv-full/include" \ 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 bc9d94d..211764f 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 @@ 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], "${TOOLCHAIN_DIR}/include") ++AC_HEADER_FIND([iconv.h], ${CHAN_DONGLE_ICONV_INC}) AC_DEFINE([ICONV_CONST],[], [Define to const if you has iconv() const declaration of input buffer]) AC_MSG_CHECKING([for iconv use const inbuf]) From da51da8c91477587d4700d239f06dc9ac4a966bf Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 2 Sep 2017 00:30:28 +0200 Subject: [PATCH 6/6] chan-sccp-b: fix uclibc build uclibc doesn't include iconv, so we need to use libiconv-full. This fixes the ARC builds as they still default to uclibc. Signed-off-by: Sebastian Kemper --- net/chan-sccp-b/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/chan-sccp-b/Makefile b/net/chan-sccp-b/Makefile index 1961af8..fcb04e3 100644 --- a/net/chan-sccp-b/Makefile +++ b/net/chan-sccp-b/Makefile @@ -30,13 +30,21 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSI include $(INCLUDE_DIR)/package.mk +# musl and glibc include their own iconv, but uclibc does not +ifneq ($(CONFIG_USE_UCLIBC),) +TARGET_CPPFLAGS+= \ + -I$(STAGING_DIR)/usr/lib/libiconv-full/include +TARGET_LDFLAGS+= \ + -L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv +endif + define Package/chan-sccp-b/Default SUBMENU:=Telephony SECTION:=net CATEGORY:=Network TITLE:=SCCP channel provider support URL:=http://chan-sccp-b.sourceforge.net/ - DEPENDS:=+libltdl + DEPENDS:=+USE_UCLIBC:libiconv-full +libltdl PKG_BUILD_DEPENDS:=libiconv endef