asterisk-11.x: update source and fix build with musl
* update to 11.18.0 * GNU specific glob extenions are not availble on musl, don't use them. * PTHREAD_MUTEX_FAST_NP also isn't available, use fallback mutex types instead. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
73c0b34169
commit
47115a8f30
6 changed files with 56 additions and 19 deletions
|
@ -9,12 +9,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=asterisk11
|
PKG_NAME:=asterisk11
|
||||||
PKG_VERSION:=11.17.1
|
PKG_VERSION:=11.18.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
|
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
|
||||||
PKG_MD5SUM:=2c6cd0f499152d0d5ff32f36e274fc2e
|
PKG_MD5SUM:=3ddb42b54db200faccd68906df210a40
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING LICENSE
|
PKG_LICENSE_FILES:=COPYING LICENSE
|
||||||
|
@ -289,13 +289,13 @@ define Build/Configure
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
( retry=""; while [ ! "$$$$retry" ] && ! $(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||||
include/asterisk/version.h \
|
include/asterisk/version.h \
|
||||||
include/asterisk/buildopts.h defaults.h \
|
include/asterisk/buildopts.h defaults.h \
|
||||||
makeopts.embed_rules
|
makeopts.embed_rules; do retry=1; done )
|
||||||
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY"
|
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY"
|
||||||
ASTLDFLAGS="$(EXTRA_LDFLAGS)"
|
ASTLDFLAGS="$(EXTRA_LDFLAGS)"
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
( retry=""; while [ ! "$$$$retry" ] && ! $(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||||
ASTVARLIBDIR="/usr/lib/asterisk" \
|
ASTVARLIBDIR="/usr/lib/asterisk" \
|
||||||
ASTDATADIR="/usr/lib/asterisk" \
|
ASTDATADIR="/usr/lib/asterisk" \
|
||||||
ASTKEYDIR="/usr/lib/asterisk" \
|
ASTKEYDIR="/usr/lib/asterisk" \
|
||||||
|
@ -304,7 +304,7 @@ define Build/Compile
|
||||||
DEBUG="" \
|
DEBUG="" \
|
||||||
OPTIMIZE="" \
|
OPTIMIZE="" \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
all install samples
|
all install samples; do retry=1; done )
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/res/Makefile
|
--- a/res/Makefile
|
||||||
+++ b/res/Makefile
|
+++ b/res/Makefile
|
||||||
@@ -75,7 +75,7 @@ dist-clean::
|
@@ -78,7 +78,7 @@ distclean::
|
||||||
rm -f pjproject/build.mak
|
rm -f pjproject/build.mak
|
||||||
|
|
||||||
pjproject/build.mak: pjproject/aconfigure
|
pjproject/build.mak: pjproject/aconfigure
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "yes" >&6; }
|
$as_echo "yes" >&6; }
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- 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"
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
--- 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);
|
|
@ -0,0 +1,26 @@
|
||||||
|
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
|
Loading…
Reference in a new issue