diff options
Diffstat (limited to 'openwrt/package/asterisk')
5 files changed, 57 insertions, 30 deletions
diff --git a/openwrt/package/asterisk/Config.in b/openwrt/package/asterisk/Config.in index 7efaee5771..a78300f59d 100644 --- a/openwrt/package/asterisk/Config.in +++ b/openwrt/package/asterisk/Config.in @@ -26,7 +26,9 @@ config BR2_PACKAGE_ASTERISK_CHAN_H323 tristate default m if CONFIG_DEVEL depends BR2_PACKAGE_ASTERISK - select BR2_PACKAGE_OPENH323 + select BR2_COMPILE_OPENH323 + select BR2_PACKAGE_LIBPTHREAD + select BR2_PACKAGE_UCLIBCXX help H.323 support for Asterisk diff --git a/openwrt/package/asterisk/Makefile b/openwrt/package/asterisk/Makefile index 015f0cc219..194e7eb667 100644 --- a/openwrt/package/asterisk/Makefile +++ b/openwrt/package/asterisk/Makefile @@ -49,6 +49,16 @@ endif ifneq ($(BR2_PACKAGE_ASTERISK_SQLITE),) EXTRA_CDR_MODULES += cdr_sqlite.so endif +ifneq ($(BR2_PACKAGE_ASTERISK_CHAN_BLUETOOTH),) +EXTRA_CHAN_MODULES += chan_bluetooth.so +endif +ifneq ($(BR2_PACKAGE_ASTERISK_CHAN_H323),) +EXTRA_DEFINES += \ + OPENH323DIR="$(BUILD_DIR)/openh323" \ + PWLIBDIR="$(BUILD_DIR)/pwlib" \ + CXXLIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc" +EXTRA_CHAN_MODULES += chan_h323.so +endif ifneq ($(BR2_PACKAGE_ASTERISK_CODEC_SPEEX),) EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/speex EXTRA_CODEC_MODULES += codec_speex.so @@ -58,21 +68,12 @@ $(PKG_BUILD_DIR)/.configured: touch $@ $(PKG_BUILD_DIR)/.built: - (cd $(PKG_BUILD_DIR)/channels/h323/ ; \ - $(MAKE) \ - CROSS_ARCH="Linux" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - CROSS_COMPILE_BIN="/void/" \ - CROSS_COMPILE_TARGET="/void/" \ +ifneq ($(BR2_PACKAGE_ASTERISK_CHAN_H323),) + $(MAKE) -C "$(PKG_BUILD_DIR)/channels/h323" \ $(TARGET_CONFIGURE_OPTS) \ - HOST_CC="$(HOSTCC)" \ - OPTIMIZE="$(TARGET_CFLAGS)" \ - PROC="$(ARCH)" \ - DEBUG="" \ - OPTIONS="-DLOW_MEMORY -Dlinux" \ - OPENH323DIR=$(BUILD_DIR)/openh323-cvs-20051230 \ - opt ; \ - ); + $(EXTRA_DEFINES) \ + optnoshared +endif $(MAKE) -C "$(PKG_BUILD_DIR)" \ CROSS_ARCH="Linux" \ CROSS_COMPILE="$(TARGET_CROSS)" \ @@ -89,12 +90,12 @@ $(PKG_BUILD_DIR)/.built: EXTRA_LDFLAGS="$(EXTRA_LDFLAGS)" \ EXTRA_APP_MODULES="$(EXTRA_APP_MODULES)" \ EXTRA_CDR_MODULES="$(EXTRA_CDR_MODULES)" \ + EXTRA_CHAN_MODULES="$(EXTRA_CHAN_MODULES)" \ EXTRA_CODEC_MODULES="$(EXTRA_CODEC_MODULES)" \ EXTRA_RES_MODULES="$(EXTRA_RES_MODULES)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ ASTVARLIBDIR="/usr/lib/asterisk" \ - OPENH323DIR=$(BUILD_DIR)/openh323-cvs-20051230 \ - PWLIBDIR=$(BUILD_DIR)/pwlib \ + $(EXTRA_DEFINES) \ all install samples rm -f $(PKG_INSTALL_DIR)/etc/asterisk/*.old touch $@ @@ -117,6 +118,7 @@ $(IPKG_ASTERISK): *mp3* *nbscat* *mysql* *postgres* *pgsql* *voicemail* *speex* \ *zapateller* *jpeg*; \ rm -f chan_bluetooth.so ; \ + rm -f chan_h323.so ; \ rm -f chan_mgcp.so ; \ rm -f chan_skinny.so ; \ rm -f {codec,format}_ilbc.so ; \ diff --git a/openwrt/package/asterisk/ipkg/asterisk-chan-h323.control b/openwrt/package/asterisk/ipkg/asterisk-chan-h323.control index 55af6f1421..fe6bf9a48d 100644 --- a/openwrt/package/asterisk/ipkg/asterisk-chan-h323.control +++ b/openwrt/package/asterisk/ipkg/asterisk-chan-h323.control @@ -2,4 +2,4 @@ Package: asterisk-chan-h323 Priority: optional Section: net Description: H.323 support for Asterisk -Depends: asterisk, openh323 +Depends: asterisk, libpthead, uclibc++ diff --git a/openwrt/package/asterisk/patches/asterisk-1.0.9-chan_bluetooth.patch b/openwrt/package/asterisk/patches/asterisk-1.0.9-chan_bluetooth.patch index 7c278a71b4..4f3425db3d 100644 --- a/openwrt/package/asterisk/patches/asterisk-1.0.9-chan_bluetooth.patch +++ b/openwrt/package/asterisk/patches/asterisk-1.0.9-chan_bluetooth.patch @@ -1,23 +1,14 @@ diff -ruN asterisk-1.0.9-old/channels/Makefile asterisk-1.0.9-new/channels/Makefile --- asterisk-1.0.9-old/channels/Makefile 2005-08-22 20:42:22.000000000 +0200 +++ asterisk-1.0.9-new/channels/Makefile 2005-08-22 21:12:14.000000000 +0200 -@@ -37,6 +37,12 @@ - # - #CHANNEL_LIBS+=chan_vofr +@@ -202,6 +202,13 @@ + chan_h323.so: chan_h323.o h323/libchanh323.a + $(CC) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat +# +# Asterisk Bluetooth Support +# http://www.crazygreek.co.uk/content/chan_bluetooth +# -+CHANNEL_LIBS += chan_bluetooth.so -+ - ifeq (${OSARCH},OpenBSD) - MYSQLLIB=-L/usr/local/lib/mysql -lmysqlclient - CFLAGS+=-I/usr/local/include -@@ -202,6 +208,9 @@ - chan_h323.so: chan_h323.o h323/libchanh323.a - $(CC) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat - +chan_bluetooth.so: chan_bluetooth.o + $(CC) $(SOLINK) -o $@ $< $(EXTRA_LDFLAGS) -lbluetooth + diff --git a/openwrt/package/asterisk/patches/asterisk-1.2.1-chan_h323.patch b/openwrt/package/asterisk/patches/asterisk-1.2.1-chan_h323.patch new file mode 100644 index 0000000000..10760de0be --- /dev/null +++ b/openwrt/package/asterisk/patches/asterisk-1.2.1-chan_h323.patch @@ -0,0 +1,32 @@ +diff -ruN asterisk-1.2.1-old/channels/Makefile asterisk-1.2.1-new/channels/Makefile +--- asterisk-1.2.1-old/channels/Makefile 2006-05-07 13:06:06.000000000 +0200 ++++ asterisk-1.2.1-new/channels/Makefile 2006-05-07 15:26:00.000000000 +0200 +@@ -15,6 +15,7 @@ + # + + CHANNEL_LIBS=chan_sip.so chan_agent.so chan_mgcp.so chan_iax2.so chan_local.so chan_skinny.so chan_features.so ++CXXLIBS=-lstdc++ + + ifneq (${OSARCH},CYGWIN) + # if you really, really want to use these drivers, uncomment the line below +@@ -230,7 +231,7 @@ + + ifeq (${OSARCH},Linux) + chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast +- $(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) -lstdc++ ++ $(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) $(CXXLIBS) + else + chan_h323.so: chan_h323.o h323/libchanh323.a + $(CC) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat +diff -ruN asterisk-1.2.1-old/channels/h323/Makefile asterisk-1.2.1-new/channels/h323/Makefile +--- asterisk-1.2.1-old/channels/h323/Makefile 2005-11-29 19:24:39.000000000 +0100 ++++ asterisk-1.2.1-new/channels/h323/Makefile 2006-05-07 13:18:46.000000000 +0200 +@@ -30,7 +30,7 @@ + touch $(SOURCES) + + libchanh323.a: $(OBJS) +- ar crv $@ $(OBJS) ++ $(AR) crv $@ $(OBJS) + + Makefile.ast: FORCE + @echo H323CFLAGS = $(STDCCFLAGS) $(OPTCCFLAGS) $(CFLAGS) >$@.tmp |