[packages] freeswitch: add C++ support for switch_cpp, enable mod_lua, add downloads...
authorNicolas Thill <nico@openwrt.org>
Thu, 17 Dec 2009 13:00:44 +0000 (13:00 +0000)
committerNicolas Thill <nico@openwrt.org>
Thu, 17 Dec 2009 13:00:44 +0000 (13:00 +0000)
SVN-Revision: 18804

net/freeswitch/Makefile
net/freeswitch/patches/101-trim.patch [deleted file]
net/freeswitch/patches/301-modrules_cross.patch

index e7a4f8f55673057b2240165929e0f673b207b8ef..fe7343783271d68d026e3173a6f5de65983435fc 100644 (file)
@@ -120,7 +120,7 @@ endef
 define Package/freeswitch
 $(call Package/freeswitch/Default)
   TITLE:=FreeSWITCH open source telephony platform
-  DEPENDS:=+libopenssl +libreadline +libncurses +libpthread
+  DEPENDS:=+libopenssl +libreadline +libncurses +libpthread +libstdcpp
   MENU:=1
 endef
 
@@ -187,6 +187,31 @@ $(call Package/freeswitch/Default)
 endef
 
 
+define Download/lib
+ define Download/$(1)
+  FILE:=$(2)
+  URL:=http://files.freeswitch.org/downloads/libs/
+  MD5SUM:=$(3)
+ endef
+ define Prepare/$(1)
+  $(CP) $(DL_DIR)/$(2) $(PKG_BUILD_DIR)/libs/
+ endef
+ $$(eval $$(call Download,$(1)))
+endef
+
+ifneq ($(CONFIG_PACKAGE_freeswitch-mod-celt),)
+ $(eval $(call Download/lib,celt,celt-0.6.1.tar.gz,2961ffb6fadb5f905d20de9f0d86e44c))
+endif
+
+ifneq ($(CONFIG_PACKAGE_freeswitch-mod-curl),)
+ $(eval $(call Download/lib,json-c,json-c-0.8.tar.gz,9c7b90dff16eec3063084829c382ebac))
+endif
+
+ifneq ($(CONFIG_PACKAGE_freeswitch-mod-flite),)
+ $(eval $(call Download/lib,flite,flite-1.3.99-latest.tar.gz,f1b144c290893f074376520b447cc07f))
+endif
+
+
 CONFIGURE_ARGS+= \
        --prefix="/usr/freeswitch" \
        --bindir="/usr/bin" \
@@ -231,6 +256,13 @@ CONFIGURE_VARS+= \
        apr_cv_tcp_nodelay_with_cork="yes" \
        apr_cv_type_rwlock_t="yes" \
 
+define Build/Prepare
+$(call Build/Prepare/Default)
+       $(call Prepare/celt)
+       $(call Prepare/flite)
+       $(call Prepare/json-c)
+endef
+
 define Build/Configure
        ( cd $(PKG_BUILD_DIR); ./rebootstrap.sh; )
 $(call Build/Configure/Default)
@@ -354,7 +386,7 @@ $(eval $(call BuildPlugin,limit,Resource limitation,mod_limit,,))
 $(eval $(call BuildPlugin,local-stream,Local streaming,mod_local_stream,,))
 $(eval $(call BuildPlugin,logfile,File logger,mod_logfile,,))
 $(eval $(call BuildPlugin,loopback,Loopback endpoint,mod_loopback,,))
-$(eval $(call BuildPlugin,lua,Lua language interface,mod_lua,,@BROKEN)) # needs C++
+$(eval $(call BuildPlugin,lua,Lua language interface,mod_lua,,+libstdcpp)) # needs C++
 $(eval $(call BuildPlugin,memcache,MemCached interface,mod_memcache,,@BROKEN)) # fails in libmemcached
 $(eval $(call BuildPlugin,native-file,Native files,mod_native_file,,))
 $(eval $(call BuildPlugin,nibblebill,Billing,mod_nibblebill,,))
@@ -380,7 +412,7 @@ $(eval $(call BuildPlugin,skypiax,Skype compatible endpoint,mod_skypiax,,@BROKEN
 $(eval $(call BuildPlugin,sndfile,Multi-Format file transcoder,mod_sndfile,,))
 $(eval $(call BuildPlugin,snom,SNOM specific features,mod_snom,,))
 $(eval $(call BuildPlugin,sofia,SIP,mod_sofia,,))
-$(eval $(call BuildPlugin,soundtouch,Sound effects,mod_soundtouch,,@BROKEN)) # needs C++
+$(eval $(call BuildPlugin,soundtouch,Sound effects,mod_soundtouch,,@BROKEN)) # fails in soundtouch
 $(eval $(call BuildPlugin,speex,Speex codec,mod_speex,,))
 $(eval $(call BuildPlugin,spidermonkey,JavaScript,mod_spidermonkey,,@BROKEN)) # fails in js
 $(eval $(call BuildPlugin,spidermonkey-core_db,JavaScript DB,mod_spidermonkey_core_db,,@BROKEN))
diff --git a/net/freeswitch/patches/101-trim.patch b/net/freeswitch/patches/101-trim.patch
deleted file mode 100644 (file)
index 598269a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -107,7 +107,6 @@ src/switch_config.c\
- src/switch_time.c\
- src/switch_odbc.c \
- libs/stfu/stfu.c\
--src/switch_cpp.cpp\
- src/g711.c\
- src/switch_pcm.c\
- libs/libteletone/src/libteletone_detect.c\
index 0acfc5993e6b5ce6c13c13623c1d993d41b78f6a..e24918627d174bea86c83b323f854b6b396abb19 100644 (file)
  CC=@CC@
  CXX=@CXX@
  AWK=@AWK@
-@@ -36,6 +40,8 @@ DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
+@@ -29,13 +33,13 @@ DEFS=@DEFS@
+ PREFIX = @prefix@
+ MODINSTDIR = @modinstdir@
+-DYLD_LIBRARY_PATH=@libdir@:$DYLD_LIBRARY_PATH
+-LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH
+ OSARCH=`uname -s`
+ DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
  LIBTOOL_LIB_EXTEN = @LIBTOOL_LIB_EXTEN@
  SOLINK = @SOLINK@