diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile index 05a3583..ab3fcbe 100644 --- a/net/asterisk-13.x/Makefile +++ b/net/asterisk-13.x/Makefile @@ -1,6 +1,6 @@ # -# Copyright (C) 2015 OpenWrt.org -# Copyright (C) 2015 Cesnet, z.s.p.o. +# Copyright (C) 2016 OpenWrt.org +# Copyright (C) 2016 Cesnet, z.s.p.o. # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk13 -PKG_VERSION:=13.6.0 +PKG_VERSION:=13.8.0 PKG_RELEASE:=1 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/ -PKG_MD5SUM:=66355aec4336c068f25e7df739786e72 +PKG_MD5SUM:=ad48eb4a01df72c8e30d3aec524b1a02 -PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/asterisk-$(PKG_VERSION) PKG_BUILD_DEPENDS:=libxml2/host PKG_LICENSE:=GPL-2.0 @@ -242,13 +242,13 @@ define Build/Configure $(HOST_CONFIGURE_ARGS) \ $(AST_MENUSELECT_OPTS) \ LDFLAGS="$(HOST_LDFLAGS) -lxml2" \ - CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOST)/include/libxml2" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR)/host/include/libxml2" \ ); endef define Build/Compile $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" \ - CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOST)/include/libxml2" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR)/host/include/libxml2" \ LDFLAGS="$(HOST_LDFLAGS) -lxml2" $(MAKE) -C "$(PKG_BUILD_DIR)" \ include/asterisk/version.h \ @@ -325,8 +325,10 @@ $(eval $(call BuildAsterisk13Module,bridge-softmix,Multi-party software based ch $(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,,)) +$(eval $(call BuildAsterisk13Module,chan-alsa,ALSA channel,the channel chan_alsa,+alsa-lib,,chan_alsa,,)) $(eval $(call BuildAsterisk13Module,chan-dahdi,DAHDI channel,DAHDI channel support,+dahdi-tools-libtonezone +kmod-dahdi +libpri,chan_dahdi.conf,chan_dahdi,,)) $(eval $(call BuildAsterisk13Module,chan-iax2,IAX2 channel,IAX support,+asterisk13-res-timing-timerfd,iax.conf iaxprov.conf,chan_iax2,,)) +$(eval $(call BuildAsterisk13Module,chan-oss,OSS channel,the channel chan_oss,,oss.conf,chan_oss,,)) $(eval $(call BuildAsterisk13Module,chan-sip,SIP channel,the channel chan_sip,+asterisk13-app-confbridge,sip.conf sip_notify.conf,chan_sip,,)) $(eval $(call BuildAsterisk13Module,chan-skinny,Skinny channel,the channel chan_skinny,,skinny.conf,chan_skinny,,)) $(eval $(call BuildAsterisk13Module,chan-unistim,Unistim channel,channel driver for the UNISTIM (Unified Networks IP Stimulus) protocol,,unistim.conf,chan_unistim,,)) diff --git a/net/asterisk-13.x/patches/001-disable-semaphores-check.patch b/net/asterisk-13.x/patches/001-disable-semaphores-check.patch index f946b56..6256fd8 100644 --- a/net/asterisk-13.x/patches/001-disable-semaphores-check.patch +++ b/net/asterisk-13.x/patches/001-disable-semaphores-check.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -900,19 +900,6 @@ AC_LINK_IFELSE( +@@ -927,19 +927,6 @@ AC_LINK_IFELSE( ] ) diff --git a/net/asterisk-13.x/patches/002-undef-res-ninit.patch b/net/asterisk-13.x/patches/002-undef-res-ninit.patch index 42b4cbc..1d01bb8 100644 --- a/net/asterisk-13.x/patches/002-undef-res-ninit.patch +++ b/net/asterisk-13.x/patches/002-undef-res-ninit.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -1170,7 +1170,6 @@ AC_LINK_IFELSE( +@@ -1261,7 +1261,6 @@ AC_LINK_IFELSE( #include ], [int foo = res_ninit(NULL);])], AC_MSG_RESULT(yes) diff --git a/net/asterisk-13.x/patches/040-fix-config-options.patch b/net/asterisk-13.x/patches/040-fix-config-options.patch new file mode 100644 index 0000000..092f0a5 --- /dev/null +++ b/net/asterisk-13.x/patches/040-fix-config-options.patch @@ -0,0 +1,12 @@ +--- asterisk-13.8.0/main/config_options.c 2016-03-29 21:39:33.000000000 +0200 ++++ ast1380/main/config_options.c 2016-04-04 13:07:25.331238309 +0200 +@@ -198,8 +198,8 @@ static int link_option_to_types(struct a + #ifdef AST_DEVMODE + opt->doc_unavailable = 1; + #endif +-#endif + } ++#endif + } + /* The container(s) should hold the only ref to opt */ + ao2_ref(opt, -1); diff --git a/net/asterisk-13.x/patches/050-musl-glob-compat.patch b/net/asterisk-13.x/patches/050-musl-glob-compat.patch new file mode 100644 index 0000000..429babb --- /dev/null +++ b/net/asterisk-13.x/patches/050-musl-glob-compat.patch @@ -0,0 +1,31 @@ +--- asterisk-11.7.0.orig/res/ael/ael.flex ++++ asterisk-11.7.0/res/ael/ael.flex +@@ -79,6 +79,12 @@ + #if !defined(GLOB_ABORTED) + #define GLOB_ABORTED GLOB_ABEND + #endif ++#if !defined(GLOB_BRACE) ++#define GLOB_BRACE 0 ++#endif ++#if !defined(GLOB_NOMAGIC) ++#define GLOB_NOMAGIC 0 ++#endif + + #include "asterisk/logger.h" + #include "asterisk/utils.h" +Only in asterisk-11.7.0: res/ael/ael.tab.o +--- asterisk-11.7.0.orig/res/ael/ael_lex.c ++++ asterisk-11.7.0/res/ael/ael_lex.c +@@ -838,6 +838,12 @@ + #if !defined(GLOB_ABORTED) + #define GLOB_ABORTED GLOB_ABEND + #endif ++#if !defined(GLOB_BRACE) ++#define GLOB_BRACE 0 ++#endif ++#if !defined(GLOB_NOMAGIC) ++#define GLOB_NOMAGIC 0 ++#endif + + #include "asterisk/logger.h" + #include "asterisk/utils.h" diff --git a/net/asterisk-13.x/patches/051-musl-includes.patch b/net/asterisk-13.x/patches/051-musl-includes.patch new file mode 100644 index 0000000..a45f710 --- /dev/null +++ b/net/asterisk-13.x/patches/051-musl-includes.patch @@ -0,0 +1,46 @@ +diff -ru asterisk-13.0.0.orig/include/asterisk/compat.h asterisk-13.0.0/include/asterisk/compat.h +--- asterisk-13.0.0.orig/include/asterisk/compat.h 2014-10-31 08:48:56.000000000 -0200 ++++ asterisk-13.0.0/include/asterisk/compat.h 2014-10-31 08:49:10.163808393 -0200 +@@ -68,7 +68,7 @@ + #endif + + #ifndef AST_POLL_COMPAT +-#include ++#include + #else + #include "asterisk/poll-compat.h" + #endif +diff -ru asterisk-13.0.0.orig/include/asterisk/poll-compat.h asterisk-13.0.0/include/asterisk/poll-compat.h +--- asterisk-13.0.0.orig/include/asterisk/poll-compat.h 2014-10-31 08:48:56.000000000 -0200 ++++ asterisk-13.0.0/include/asterisk/poll-compat.h 2014-10-31 08:49:10.163808393 -0200 +@@ -83,7 +83,7 @@ + + #ifndef AST_POLL_COMPAT + +-#include ++#include + + #define ast_poll(a, b, c) poll(a, b, c) + +diff -ru asterisk-13.0.0.orig/main/ast_expr2.c asterisk-13.0.0/main/ast_expr2.c +--- asterisk-13.0.0.orig/main/ast_expr2.c 2014-10-31 08:48:56.000000000 -0200 ++++ asterisk-13.0.0/main/ast_expr2.c 2014-10-31 08:49:10.163808393 -0200 +@@ -93,6 +93,7 @@ + + #include "asterisk.h" + ++#include + #include + #include + +diff -ru asterisk-13.0.0.orig/main/ast_expr2.y asterisk-13.0.0/main/ast_expr2.y +--- asterisk-13.0.0.orig/main/ast_expr2.y 2014-10-31 08:48:56.000000000 -0200 ++++ asterisk-13.0.0/main/ast_expr2.y 2014-10-31 08:49:10.163808393 -0200 +@@ -14,6 +14,7 @@ + + #include "asterisk.h" + ++#include + #include + #include + diff --git a/net/asterisk-13.x/patches/052-musl-libcap.patch b/net/asterisk-13.x/patches/052-musl-libcap.patch new file mode 100644 index 0000000..2b824de --- /dev/null +++ b/net/asterisk-13.x/patches/052-musl-libcap.patch @@ -0,0 +1,39 @@ +diff -rupN asterisk-13.8.0/configure.ac ast13/configure.ac +--- asterisk-13.8.0/configure.ac 2016-04-04 14:41:26.398129246 +0200 ++++ ast13/configure.ac 2016-04-04 14:40:48.421815607 +0200 +@@ -181,6 +181,9 @@ case "${host_os}" in + linux-gnueabi* | linux-gnuspe) + OSARCH=linux-gnu + ;; ++ linux-musl*) ++ OSARCH=linux-musl ++ ;; + kfreebsd*-gnu) + OSARCH=kfreebsd-gnu + ;; +@@ -1373,9 +1376,11 @@ if test "${PBX_BFD}" = "0"; then + AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_check_format], [bfd.h], [-ldl -liberty -lz]) + fi + +-if test "x${OSARCH}" = "xlinux-gnu" ; then ++case "${OSARCH}" in ++linux*) + AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h]) +-fi ++ ;; ++esac + + AST_C_DEFINE_CHECK([DAHDI], [DAHDI_RESET_COUNTERS], [dahdi/user.h], [230]) + AST_C_DEFINE_CHECK([DAHDI], [DAHDI_DEFAULT_MTU_MRU], [dahdi/user.h], [220]) +diff -rupN asterisk-13.8.0/main/Makefile ast13/main/Makefile +--- asterisk-13.8.0/main/Makefile 2016-03-29 21:39:33.000000000 +0200 ++++ ast13/main/Makefile 2016-04-04 14:40:48.421815607 +0200 +@@ -45,7 +45,7 @@ AST_LIBS+=$(UUID_LIB) + AST_LIBS+=$(CRYPT_LIB) + AST_LIBS+=$(AST_CLANG_BLOCKS_LIBS) + +-ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc kfreebsd-gnu),) ++ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc linux-musl kfreebsd-gnu),) + ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),) + AST_LIBS+=-ldl + endif diff --git a/net/asterisk-13.x/patches/053-musl-mutex-init.patch b/net/asterisk-13.x/patches/053-musl-mutex-init.patch new file mode 100644 index 0000000..4b720ee --- /dev/null +++ b/net/asterisk-13.x/patches/053-musl-mutex-init.patch @@ -0,0 +1,12 @@ +diff -ru asterisk-12.4.0.orig/include/asterisk/lock.h asterisk-12.4.0/include/asterisk/lock.h +--- asterisk-12.4.0.orig/include/asterisk/lock.h 2013-11-02 06:05:24.000000000 -0200 ++++ asterisk-12.4.0/include/asterisk/lock.h 2014-08-04 16:00:29.811967599 -0300 +@@ -68,7 +68,7 @@ + #define AST_PTHREADT_NULL (pthread_t) -1 + #define AST_PTHREADT_STOP (pthread_t) -2 + +-#if (defined(SOLARIS) || defined(BSD)) ++#if (defined(SOLARIS) || defined(BSD) || !defined(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)) + #define AST_MUTEX_INIT_W_CONSTRUCTORS + #endif /* SOLARIS || BSD */ +