include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk11
-PKG_VERSION:=11.17.1
+PKG_VERSION:=11.18.0
PKG_RELEASE:=1
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
-PKG_MD5SUM:=2c6cd0f499152d0d5ff32f36e274fc2e
+PKG_MD5SUM:=3ddb42b54db200faccd68906df210a40
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING LICENSE
endef
define Build/Compile
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
+ ( retry=""; while [ ! "$$$$retry" ] && ! $(MAKE) -C "$(PKG_BUILD_DIR)" \
include/asterisk/version.h \
include/asterisk/buildopts.h defaults.h \
- makeopts.embed_rules
+ makeopts.embed_rules; do retry=1; done )
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY"
ASTLDFLAGS="$(EXTRA_LDFLAGS)"
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
+ ( retry=""; while [ ! "$$$$retry" ] && ! $(MAKE) -C "$(PKG_BUILD_DIR)" \
ASTVARLIBDIR="/usr/lib/asterisk" \
ASTDATADIR="/usr/lib/asterisk" \
ASTKEYDIR="/usr/lib/asterisk" \
DEBUG="" \
OPTIMIZE="" \
DESTDIR="$(PKG_INSTALL_DIR)" \
- all install samples
+ all install samples; do retry=1; done )
endef
define Build/InstallDev
--- a/res/Makefile
+++ b/res/Makefile
-@@ -75,7 +75,7 @@ dist-clean::
+@@ -78,7 +78,7 @@ distclean::
rm -f pjproject/build.mak
pjproject/build.mak: pjproject/aconfigure
--- a/configure
+++ b/configure
-@@ -16533,7 +16533,6 @@ if ac_fn_c_try_link "$LINENO"; then :
+@@ -16606,7 +16606,6 @@ if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -901,7 +901,7 @@ nmenuselect: menuselect/nmenuselect menu
- -@menuselect/nmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
-
- # options for make in menuselect/
--MAKE_MENUSELECT=CC="$(CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" \
-+MAKE_MENUSELECT=CC="$(BUILD_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" \
- CFLAGS="$(BUILD_CFLAGS)" LDFLAGS="$(BUILD_LDFLAGS)" \
- $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
-
--- /dev/null
+--- a/res/ael/ael.flex
++++ b/res/ael/ael.flex
+@@ -595,7 +595,7 @@ includes { STORE_POS; return KW_INCLUDES
+ snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
+ ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
+ }
+-#ifdef SOLARIS
++#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU)
+ glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
+ #else
+ glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
+--- a/res/ael/ael_lex.c
++++ b/res/ael/ael_lex.c
+@@ -1976,7 +1967,7 @@ YY_RULE_SETUP
+ snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
+ ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
+ }
+-#ifdef SOLARIS
++#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU)
+ glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
+ #else
+ glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
--- /dev/null
+Index: asterisk-11.18.0/res/pjproject/pjlib/src/pj/os_core_unix.c
+===================================================================
+--- asterisk-11.18.0.orig/res/pjproject/pjlib/src/pj/os_core_unix.c
++++ asterisk-11.18.0/res/pjproject/pjlib/src/pj/os_core_unix.c
+@@ -1091,7 +1091,7 @@ static pj_status_t init_mutex(pj_mutex_t
+ return PJ_RETURN_OS_ERROR(rc);
+
+ if (type == PJ_MUTEX_SIMPLE) {
+-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
++#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \
+ defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
+ rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP);
+ #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
+@@ -1101,10 +1101,10 @@ static pj_status_t init_mutex(pj_mutex_t
+ rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
+ #endif
+ } else {
+-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
++#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \
+ defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
+ rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+-#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
++#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0 && defined(__GLIBC__)) || \
+ defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE)
+ // Phil Torre <ptorre@zetron.com>:
+ // The RTEMS implementation of POSIX mutexes doesn't include