From c4ca2801215853fffdbdfe543427b1f559e2d508 Mon Sep 17 00:00:00 2001 From: craig Date: Fri, 9 Feb 2007 23:44:27 +0000 Subject: [PATCH] Update asterisk with patches from Brandon Weeks git-svn-id: http://svn.gumstix.com/gumstix-buildroot/trunk@1266 440079d4-f5dc-0310-964d-94f3b09ad5cf --- package/asterisk/Config.in | 2 -- package/asterisk/asterisk-getloadavg.patch | 11 +++++++ ...asterisk-gsm-codec.patch => asterisk-gsm.patch} | 6 ++-- package/asterisk/asterisk-no-glob.patch | 13 +++++++++ package/asterisk/asterisk-no-res-ninit.patch | 11 +++++++ package/asterisk/asterisk-uclibc-compat.patch | 34 ++++++++++------------ package/asterisk/asterisk-utils-getloadavg.patch | 18 ------------ package/asterisk/asterisk.mk | 4 +-- package/asterisk/asterisk_no_res_ninit.patch | 12 -------- 9 files changed, 55 insertions(+), 56 deletions(-) create mode 100644 package/asterisk/asterisk-getloadavg.patch rename package/asterisk/{asterisk-gsm-codec.patch => asterisk-gsm.patch} (57%) create mode 100644 package/asterisk/asterisk-no-glob.patch create mode 100644 package/asterisk/asterisk-no-res-ninit.patch rewrite package/asterisk/asterisk-uclibc-compat.patch (84%) delete mode 100644 package/asterisk/asterisk-utils-getloadavg.patch delete mode 100644 package/asterisk/asterisk_no_res_ninit.patch diff --git a/package/asterisk/Config.in b/package/asterisk/Config.in index 0f27975..721f77c 100644 --- a/package/asterisk/Config.in +++ b/package/asterisk/Config.in @@ -4,7 +4,5 @@ config BR2_PACKAGE_ASTERISK select BR2_PACKAGE_NCURSES select BR2_PACKAGE_ZLIB select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_MPG123 help Asterisk - the Open Source PBX - diff --git a/package/asterisk/asterisk-getloadavg.patch b/package/asterisk/asterisk-getloadavg.patch new file mode 100644 index 0000000..d20701a --- /dev/null +++ b/package/asterisk/asterisk-getloadavg.patch @@ -0,0 +1,11 @@ +--- asterisk-1.2.14/utils.c 2006-10-30 23:18:36.000000000 -0700 ++++ buildroot/build_arm_nofpu/asterisk-1.2.14/utils.c 2006-12-18 06:45:40.000000000 -0700 +@@ -835,7 +835,7 @@ + } + #endif /* !HAVE_STRTOQ */ + +-#ifndef HAVE_GETLOADAVG ++#if !defined(HAVE_GETLOADAVG) || defined(__UCLIBC__) + #ifdef linux + /* Alternative method of getting load avg on Linux only */ + int getloadavg(double *list, int nelem) diff --git a/package/asterisk/asterisk-gsm-codec.patch b/package/asterisk/asterisk-gsm.patch similarity index 57% rename from package/asterisk/asterisk-gsm-codec.patch rename to package/asterisk/asterisk-gsm.patch index ed2c81b..d78c74d 100644 --- a/package/asterisk/asterisk-gsm-codec.patch +++ b/package/asterisk/asterisk-gsm.patch @@ -1,10 +1,10 @@ ---- Makefile.old 2006-10-11 12:57:35.000000000 -0500 -+++ asterisk-1.2.12.1/codecs/gsm/Makefile 2006-10-11 12:58:10.000000000 -0500 +--- asterisk-1.2.14/codecs/gsm/Makefile 2006-07-24 10:05:56.000000000 -0700 ++++ buildroot/build_arm_nofpu/asterisk-1.2.14/codecs/gsm/Makefile 2006-12-18 06:36:44.000000000 -0700 @@ -310,6 +310,7 @@ ifneq ($(shell uname -m), armv4l) ifneq ($(shell uname -m), parisc) ifneq ($(shell uname -m),s390) -+ifneq (${PROC},arm) ++ifneq (${PROC}, arm) GSM_OBJECTS+= $(SRC)/k6opt.o endif endif diff --git a/package/asterisk/asterisk-no-glob.patch b/package/asterisk/asterisk-no-glob.patch new file mode 100644 index 0000000..e9fb721 --- /dev/null +++ b/package/asterisk/asterisk-no-glob.patch @@ -0,0 +1,13 @@ +--- asterisk-1.2.14/config.c 2006-11-15 12:58:46.000000000 -0700 ++++ buildroot/build_arm_nofpu/asterisk-1.2.14/config.c 2006-12-18 06:41:24.000000000 -0700 +@@ -31,7 +31,9 @@ + #include + #include + #include +-#define AST_INCLUDE_GLOB 1 ++#ifndef __UCLIBC__ ++#define AST_INCLUDE_GLOB ++#endif + #ifdef AST_INCLUDE_GLOB + #if defined(__Darwin__) || defined(__CYGWIN__) + #define GLOB_ABORTED GLOB_ABEND diff --git a/package/asterisk/asterisk-no-res-ninit.patch b/package/asterisk/asterisk-no-res-ninit.patch new file mode 100644 index 0000000..d94e638 --- /dev/null +++ b/package/asterisk/asterisk-no-res-ninit.patch @@ -0,0 +1,11 @@ +--- asterisk-1.2.14/dns.c 2005-11-29 11:24:39.000000000 -0700 ++++ buildroot/build_arm_nofpu/asterisk-1.2.14/dns.c 2006-12-18 06:29:50.000000000 -0700 +@@ -173,7 +173,7 @@ + return 0; + } + +-#if defined(res_ninit) ++#if defined(res_ninit) && !defined(__UCLIBC__) + #define HAS_RES_NINIT + #else + AST_MUTEX_DEFINE_STATIC(res_lock); diff --git a/package/asterisk/asterisk-uclibc-compat.patch b/package/asterisk/asterisk-uclibc-compat.patch dissimilarity index 84% index 30227f2..ebbf5cd 100644 --- a/package/asterisk/asterisk-uclibc-compat.patch +++ b/package/asterisk/asterisk-uclibc-compat.patch @@ -1,19 +1,15 @@ ---- asterisk-1.2.12.1/Makefile.orig 2006-02-24 09:31:16.000000000 -0800 -+++ asterisk-1.2.12.1/Makefile 2006-02-24 09:31:32.000000000 -0800 -@@ -345,16 +345,6 @@ - netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \ - cryptostub.o - --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),) -- OBJS+= poll.o -- ASTCFLAGS+=-DPOLLCOMPAT --endif -- --ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) -- OBJS+= dlfcn.o -- ASTCFLAGS+=-DDLFCNCOMPAT --endif -- - ifeq ($(OSARCH),Linux) - LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd - else +--- asterisk-1.2.14/Makefile 2006-12-11 14:55:43.000000000 -0700 ++++ buildroot/build_arm_nofpu/asterisk-1.2.14/Makefile 2006-12-18 07:11:16.000000000 -0700 +@@ -361,10 +361,12 @@ + ASTCFLAGS+=-DPOLLCOMPAT + endif + ++ifneq (${PROC}, arm) + ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),) + OBJS+= dlfcn.o + ASTCFLAGS+=-DDLFCNCOMPAT + endif ++endif + + ifeq ($(OSARCH),Linux) + LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd diff --git a/package/asterisk/asterisk-utils-getloadavg.patch b/package/asterisk/asterisk-utils-getloadavg.patch deleted file mode 100644 index 4df3c52..0000000 --- a/package/asterisk/asterisk-utils-getloadavg.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- asterisk-1.2.12.1/utils.c.orig 2006-02-24 09:48:45.000000000 -0800 -+++ asterisk-1.2.12.1/utils.c 2006-02-24 09:49:00.000000000 -0800 -@@ -842,7 +842,6 @@ - } - #endif /* !HAVE_STRTOQ */ - --#ifndef HAVE_GETLOADAVG - #ifdef linux - /* Alternative method of getting load avg on Linux only */ - int getloadavg(double *list, int nelem) -@@ -876,7 +875,6 @@ - return -1; - } - #endif /* linux */ --#endif /* !defined(_BSD_SOURCE) */ - - char *ast_process_quotes_and_slashes(char *start, char find, char replace_with) - { diff --git a/package/asterisk/asterisk.mk b/package/asterisk/asterisk.mk index c7ae5f6..202f118 100644 --- a/package/asterisk/asterisk.mk +++ b/package/asterisk/asterisk.mk @@ -3,7 +3,7 @@ # asterisk # ############################################################## -ASTERISK_VERSION := 1.2.12.1 +ASTERISK_VERSION := 1.2.14 ASTERISK_SOURCE := asterisk-$(ASTERISK_VERSION).tar.gz ASTERISK_SITE := ftp://ftp.digium.com/pub/asterisk ASTERISK_DIR := $(BUILD_DIR)/asterisk-$(ASTERISK_VERSION) @@ -40,7 +40,7 @@ $(TARGET_DIR)/$(ASTERISK_TARGET_BINARY): $(ASTERISK_DIR)/$(ASTERISK_BINARY) rm -f $(TARGET_DIR)/usr/sbin/astgenkey touch -c $(TARGET_DIR)/$(ASTERISK_TARGET_BINARY) -asterisk: uclibc ncurses zlib openssl mpg123 $(TARGET_DIR)/$(ASTERISK_TARGET_BINARY) +asterisk: uclibc ncurses zlib openssl $(TARGET_DIR)/$(ASTERISK_TARGET_BINARY) asterisk-source: $(DL_DIR)/$(ASTERISK_SOURCE) diff --git a/package/asterisk/asterisk_no_res_ninit.patch b/package/asterisk/asterisk_no_res_ninit.patch deleted file mode 100644 index b2e5161..0000000 --- a/package/asterisk/asterisk_no_res_ninit.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur /tmp/asterisk-1.2.0-beta1/dns.c asterisk-1.2.0-beta1/dns.c ---- /tmp/asterisk-1.2.0-beta1/dns.c 2005-08-14 04:23:33.000000000 +0200 -+++ asterisk-1.2.12.1/dns.c 2005-08-31 09:42:36.000000000 +0200 -@@ -157,7 +157,7 @@ - return 0; - } - --#if defined(res_ninit) -+#if (defined(res_ninit) && !defined(__UCLIBC__)) - #define HAS_RES_NINIT - #else - AST_MUTEX_DEFINE_STATIC(res_lock); -- 2.11.4.GIT