freeswitch-stable: move folder
authorSebastian Kemper <sebastian_ml@gmx.net>
Sat, 23 May 2020 17:46:12 +0000 (19:46 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sat, 23 May 2020 17:46:12 +0000 (19:46 +0200)
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
62 files changed:
net/freeswitch-stable/Config.in [deleted file]
net/freeswitch-stable/Makefile [deleted file]
net/freeswitch-stable/files/freeswitch.conf [deleted file]
net/freeswitch-stable/files/freeswitch.hotplug [deleted file]
net/freeswitch-stable/files/freeswitch.init [deleted file]
net/freeswitch-stable/patches/003-modmake-fix.patch [deleted file]
net/freeswitch-stable/patches/010-fix-zrtp-cflags.patch [deleted file]
net/freeswitch-stable/patches/030-fix-configure-ac.patch [deleted file]
net/freeswitch-stable/patches/040-gentls_cert_update_message_digest.patch [deleted file]
net/freeswitch-stable/patches/110-apr-add-cache-for-strerror_r.patch [deleted file]
net/freeswitch-stable/patches/120-fix-copts.patch [deleted file]
net/freeswitch-stable/patches/130-fix-iksemel-copts.patch [deleted file]
net/freeswitch-stable/patches/140-libvpx-cross.patch [deleted file]
net/freeswitch-stable/patches/150-erlang-m4.patch [deleted file]
net/freeswitch-stable/patches/170-mod_random.patch [deleted file]
net/freeswitch-stable/patches/180-mod_perl.patch [deleted file]
net/freeswitch-stable/patches/190-mod_pocketsphinx.patch [deleted file]
net/freeswitch-stable/patches/200-mod_verto-fix-copts.patch [deleted file]
net/freeswitch-stable/patches/210-esl-perl-fix-copts.patch [deleted file]
net/freeswitch-stable/patches/230-mod_radius_cdr.patch [deleted file]
net/freeswitch-stable/patches/260-mod_event_zmq-fix-build-with-fortify-headers.patch [deleted file]
net/freeswitch-stable/patches/270-fix-uclibc-iconv-in-gsmopen.patch [deleted file]
net/freeswitch-stable/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch [deleted file]
net/freeswitch-stable/patches/290-fix-mod_freetdm-copts.patch [deleted file]
net/freeswitch-stable/patches/320-workaround-format-truncation-error-in-mod_cdr_mongodb.patch [deleted file]
net/freeswitch-stable/patches/330-do-not-install-freetdm-twice.patch [deleted file]
net/freeswitch-stable/patches/360-fix-APR_TRY_COMPILE_NO_WARNING.patch [deleted file]
net/freeswitch-stable/patches/370-procd-compat.patch [deleted file]
net/freeswitch-stable/patches/380-disable-luajit.patch [deleted file]
net/freeswitch-stable/patches/390-t38-reinvite-488-fix.patch [deleted file]
net/freeswitch-stable/patches/400-disable-sofia-sip-tests.patch [deleted file]
net/freeswitch/Config.in [new file with mode: 0644]
net/freeswitch/Makefile [new file with mode: 0644]
net/freeswitch/files/freeswitch.conf [new file with mode: 0644]
net/freeswitch/files/freeswitch.hotplug [new file with mode: 0644]
net/freeswitch/files/freeswitch.init [new file with mode: 0644]
net/freeswitch/patches/003-modmake-fix.patch [new file with mode: 0644]
net/freeswitch/patches/010-fix-zrtp-cflags.patch [new file with mode: 0644]
net/freeswitch/patches/030-fix-configure-ac.patch [new file with mode: 0644]
net/freeswitch/patches/040-gentls_cert_update_message_digest.patch [new file with mode: 0644]
net/freeswitch/patches/110-apr-add-cache-for-strerror_r.patch [new file with mode: 0644]
net/freeswitch/patches/120-fix-copts.patch [new file with mode: 0644]
net/freeswitch/patches/130-fix-iksemel-copts.patch [new file with mode: 0644]
net/freeswitch/patches/140-libvpx-cross.patch [new file with mode: 0644]
net/freeswitch/patches/150-erlang-m4.patch [new file with mode: 0644]
net/freeswitch/patches/170-mod_random.patch [new file with mode: 0644]
net/freeswitch/patches/180-mod_perl.patch [new file with mode: 0644]
net/freeswitch/patches/190-mod_pocketsphinx.patch [new file with mode: 0644]
net/freeswitch/patches/200-mod_verto-fix-copts.patch [new file with mode: 0644]
net/freeswitch/patches/210-esl-perl-fix-copts.patch [new file with mode: 0644]
net/freeswitch/patches/230-mod_radius_cdr.patch [new file with mode: 0644]
net/freeswitch/patches/260-mod_event_zmq-fix-build-with-fortify-headers.patch [new file with mode: 0644]
net/freeswitch/patches/270-fix-uclibc-iconv-in-gsmopen.patch [new file with mode: 0644]
net/freeswitch/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch [new file with mode: 0644]
net/freeswitch/patches/290-fix-mod_freetdm-copts.patch [new file with mode: 0644]
net/freeswitch/patches/320-workaround-format-truncation-error-in-mod_cdr_mongodb.patch [new file with mode: 0644]
net/freeswitch/patches/330-do-not-install-freetdm-twice.patch [new file with mode: 0644]
net/freeswitch/patches/360-fix-APR_TRY_COMPILE_NO_WARNING.patch [new file with mode: 0644]
net/freeswitch/patches/370-procd-compat.patch [new file with mode: 0644]
net/freeswitch/patches/380-disable-luajit.patch [new file with mode: 0644]
net/freeswitch/patches/390-t38-reinvite-488-fix.patch [new file with mode: 0644]
net/freeswitch/patches/400-disable-sofia-sip-tests.patch [new file with mode: 0644]

diff --git a/net/freeswitch-stable/Config.in b/net/freeswitch-stable/Config.in
deleted file mode 100644 (file)
index 8e200ef..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-menu "Advanced configuration"
-       depends on PACKAGE_freeswitch-stable
-
-config FS_STABLE_WITH_DEBUG
-       bool "Compile with debug information"
-       default n
-       help
-         Enable extra debug codepaths, like asserts and extra output. If you
-         want to get meaningful backtraces see
-         https://wiki.openwrt.org/doc/devel/debugging for starting points.
-
-config FS_STABLE_WITH_FREETYPE
-       bool "Compile with FreeType support"
-       default y if x86_64
-       help
-         Add FreeType support to FreeSWITCH
-
-config FS_STABLE_WITH_LIBYUV
-       bool "Compile with libyuv support"
-       default y if x86_64
-       help
-         Add libyuv support to FreeSWITCH
-
-config FS_STABLE_WITH_ODBC
-       bool "Compile with ODBC support"
-       default y if x86_64
-       help
-         Enable ODBC support.
-
-config FS_STABLE_WITH_PNG
-       bool "Compile with PNG support"
-       default y if x86_64
-       help
-         Add PNG support to FreeSWITCH
-
-config FS_STABLE_WITH_SRTP
-       bool "Compile with SRTP support"
-       default y
-       help
-         Compile with SRTP support.
-
-config FS_STABLE_WITH_VPX
-       bool "Compile with VPx support"
-       depends on FS_STABLE_WITH_LIBYUV
-       default y if x86_64
-       help
-         Compile with VPx video codec support
-
-config FS_STABLE_WITH_ZRTP
-       bool "Compile with ZRTP support"
-       depends on aarch64||aarch64_be||arm||armeb||i386||mips||mips64||mips64el||mipsel||powerpc||powerpc64||powerpcle||sparc||x86_64
-       default y if x86_64
-       help
-         Compile with ZRTP support.
-
-config FS_STABLE_WITH_MODCONF
-       bool "Include module examples"
-       default y if x86_64
-       help
-         Some modules include examples in their source directory, e.g. xml
-         snippets. Select y to include them.
-
-endmenu
diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile
deleted file mode 100644 (file)
index b6b4bd8..0000000
+++ /dev/null
@@ -1,1094 +0,0 @@
-#
-# Copyright (C) 2017 Sebastian Kemper <sebastian_ml@gmx.net>
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PRG_NAME:=freeswitch
-PKG_NAME:=$(PRG_NAME)-stable
-PKG_VERSION:=1.10.3
-PKG_RELEASE:=1
-PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
-
-PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).-release.tar.xz
-PKG_SOURCE_URL:=https://files.$(PRG_NAME).org/releases/$(PRG_NAME)
-PKG_HASH:=2d7db07a64ee2f19f9b6e3a4ce76fa42e0fe46c29d95edf1b690a3df3729f307
-
-PKG_CPE_ID:=cpe:/a:freeswitch:freeswitch
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PRG_NAME)-$(PKG_VERSION).-release
-
-# configure in libs/spandsp fails without libjpeg and tiff
-PKG_BUILD_DEPENDS:= \
-       libjpeg \
-       tiff \
-       perl/host
-
-PKG_FIXUP:=autoreconf
-
-# With mod_ssml and mod_rayo enabled the parallel compiles always failed
-PKG_BUILD_PARALLEL:=0
-PKG_INSTALL:=1
-
-PKG_LICENSE:= \
-       AGPL-3.0 \
-       Apache-2.0 \
-       BSD-2-Clause \
-       BSD-3-Clause \
-       BSD-4-Clause \
-       BSD-like \
-       Beerware \
-       GPL-1.0+ \
-       GPL-2.0 \
-       GPL-2.0+ \
-       GPL-3.0 \
-       ISC \
-       LGPL-2.0+ \
-       LGPL-2.1 \
-       LGPL-2.1+ \
-       MIT/X11 (BSD like) \
-       MPL-1.1 \
-       OpenLDAP \
-       RSA-MD \
-       zlib-acknowledgement
-
-PKG_LICENSE_FILES:=debian/copyright
-
-FS_STABLE_DATA_DIR:=/usr/share/$(PRG_NAME)
-
-FS_STABLE_BIN_DIR:=/usr/bin
-FS_STABLE_EXAMPLES_DIR:=$(FS_STABLE_DATA_DIR)/examples
-FS_STABLE_FONTS_DIR:=$(FS_STABLE_DATA_DIR)/fonts
-FS_STABLE_GRAMMAR_DIR:=$(FS_STABLE_DATA_DIR)/grammar
-FS_STABLE_HTDOCS_DIR:=$(FS_STABLE_DATA_DIR)/htdocs
-FS_STABLE_IMAGES_DIR:=$(FS_STABLE_DATA_DIR)/images
-FS_STABLE_INCLUDES_DIR:=/usr/include/$(PRG_NAME)
-FS_STABLE_LANG_DIR:=$(FS_STABLE_DATA_DIR)/lang
-FS_STABLE_LIB_DIR:=/usr/lib
-FS_STABLE_MOD_DIR:=$(FS_STABLE_LIB_DIR)/$(PRG_NAME)/mod
-FS_STABLE_PKGCONFIG_DIR:=$(FS_STABLE_LIB_DIR)/pkgconfig
-FS_STABLE_SCRIPTS_DIR:=$(FS_STABLE_DATA_DIR)/scripts
-FS_STABLE_SOUNDS_DIR:=$(FS_STABLE_DATA_DIR)/sounds
-FS_STABLE_SYSCONF_DIR:=/etc
-FS_STABLE_TLS_DIR:=$(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)/tls
-FS_STABLE_TZ_DIR:=$(FS_STABLE_DATA_DIR)/tz
-
-FTDM:=freetdm
-PKG_LIBFTDM:=lib$(FTDM)-stable
-
-FS_STABLE_MOD_AVAILABLE:= \
-       abstraction \
-       alsa \
-       amr \
-       amrwb \
-       av \
-       avmd \
-       b64 \
-       basic \
-       bert \
-       blacklist \
-       callcenter \
-       cdr_csv \
-       cdr_mongodb \
-       cdr_pg_csv \
-       cdr_sqlite \
-       cidlookup \
-       clearmode \
-       cluechoo \
-       commands \
-       conference \
-       console \
-       curl \
-       dahdi_codec \
-       db \
-       dialplan_asterisk \
-       dialplan_directory \
-       dialplan_xml \
-       dingaling \
-       directory \
-       distributor \
-       dptools \
-       easyroute \
-       enum \
-       erlang_event \
-       esf \
-       esl \
-       event_multicast \
-       event_socket \
-       event_test \
-       event_zmq \
-       expr \
-       fail2ban \
-       fifo \
-       format_cdr \
-       $(FTDM) \
-       fsk \
-       fsv \
-       g723_1 \
-       g729 \
-       graylog2 \
-       gsmopen \
-       h26x \
-       hash \
-       hiredis \
-       httapi \
-       http_cache \
-       isac \
-       json_cdr \
-       kazoo \
-       lcr \
-       ldap \
-       local_stream \
-       logfile \
-       loopback \
-       lua \
-       mariadb \
-       mp4v \
-       native_file \
-       nibblebill \
-       odbc_cdr \
-       opus \
-       opusfile \
-       oreka \
-       perl \
-       pgsql \
-       png \
-       pocketsphinx \
-       portaudio \
-       portaudio_stream \
-       posix_timer \
-       prefix \
-       radius_cdr \
-       random \
-       raven \
-       rayo \
-       redis \
-       rss \
-       rtc \
-       rtmp \
-       say_de \
-       say_en \
-       say_es \
-       say_es_ar \
-       say_fa \
-       say_fr \
-       say_he \
-       say_hr \
-       say_hu \
-       say_it \
-       say_ja \
-       say_nl \
-       say_pl \
-       say_pt \
-       say_ru \
-       say_sv \
-       say_th \
-       say_zh \
-       shell_stream \
-       shout \
-       signalwire \
-       skinny \
-       sms \
-       snapshot \
-       sndfile \
-       snmp \
-       snom \
-       sofia \
-       sonar \
-       spandsp \
-       spy \
-       ssml \
-       stress \
-       syslog \
-       theora \
-       tone_stream \
-       translate \
-       tts_commandline \
-       unimrcp \
-       valet_parking \
-       verto \
-       video_filter \
-       vmd \
-       voicemail \
-       voicemail_ivr \
-       xml_cdr \
-       xml_curl \
-       xml_ldap \
-       xml_rpc \
-       xml_scgi \
-       yaml \
-       yuv
-
-PKG_CONFIG_DEPENDS:= \
-       $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(subst _,-,$(FS_STABLE_MOD_AVAILABLE))) \
-       CONFIG_FS_STABLE_WITH_DEBUG \
-       CONFIG_FS_STABLE_WITH_FREETYPE \
-       CONFIG_FS_STABLE_WITH_LIBYUV \
-       CONFIG_FS_STABLE_WITH_ODBC \
-       CONFIG_FS_STABLE_WITH_PNG \
-       CONFIG_FS_STABLE_WITH_SRTP \
-       CONFIG_FS_STABLE_WITH_VPX \
-       CONFIG_FS_STABLE_WITH_ZRTP \
-       CONFIG_LIBC \
-       CONFIG_PACKAGE_$(PKG_LIBFTDM) \
-       CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-libpri \
-       CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-pritap \
-       CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl \
-       CONFIG_SOFT_FLOAT
-
-include $(INCLUDE_DIR)/uclibc++.mk
-include $(INCLUDE_DIR)/package.mk
-# iconv support
-include $(INCLUDE_DIR)/nls.mk
-#######################################################
-# mod_gsmopen can't detect if iconv's inbuf is const. #
-#                                                     #
-#                  musl    uclibc                     #
-# libiconv-stub    -       -                          #
-# libiconv-full    -       const                      #
-#                                                     #
-#######################################################
-ifeq ($(ICONV_FULL)$(CONFIG_USE_UCLIBC),1y)
-TARGET_CFLAGS+=-DFS_STABLE_ICONV_INBUF_CONST
-endif
-
-FS_STABLE_PERL_FEED:=$(TOPDIR)/feeds/packages/lang/perl
-
-include $(FS_STABLE_PERL_FEED)/perlver.mk
-
-PERL_SITELIB:=/usr/lib/perl$(PERL_MAJOR)/$(PERL_VERSION2)
-
-FS_STABLE_PERL_LIBS:=$(shell grep "^libs=" \
-       $(FS_STABLE_PERL_FEED)/files/base.config | \
-                       sed "s/^libs=//;s/'//g")
-
-define Download/files
-define Download/$(1)
-  FILE:=$(2)
-  URL:=$(3)
-  HASH:=$(4)
-endef
-$$(eval $$(call Download,$(1)))
-endef
-
-define Package/$(PKG_NAME)/install/bin
-       $(INSTALL_DIR) $(1)$(FS_STABLE_BIN_DIR)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_BIN_DIR)/$(2) \
-                                       $(1)$(FS_STABLE_BIN_DIR)
-endef
-
-define Package/$(PKG_NAME)/install/dir
-       if [ -d $(2) ]; then $(INSTALL_DIR) $(1); fi
-       for dir in $$$$(shell [ -d $(2) ] && cd $(2) && $(FIND) -type d -print | sed 's|^./\?||'); \
-       do \
-               $(INSTALL_DIR) $(1)/$$$$$$$$dir; \
-       done
-       for file in $$$$(shell [ -d $(2) ] && cd $(2) && $(FIND) -type f -print | sed 's|^./||'); \
-       do \
-               $(INSTALL_DATA) $(2)/$$$$$$$$file $(1)/$$$$$$$$file; \
-       done
-endef
-
-define Package/$(PKG_LIBFTDM)/install/ftmod
-       $(INSTALL_DIR) $(1)$(FS_STABLE_MOD_DIR)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_MOD_DIR)/ftmod_$(2).so \
-                                               $(1)$(FS_STABLE_MOD_DIR)
-endef
-
-define Package/$(PKG_NAME)/install/lib
-       $(INSTALL_DIR) $(1)$(FS_STABLE_LIB_DIR)
-       $(CP) $(PKG_INSTALL_DIR)$(FS_STABLE_LIB_DIR)/$(2).so.* \
-                                       $(1)$(FS_STABLE_LIB_DIR)
-endef
-
-define Package/$(PKG_NAME)/install/mod
-       $(INSTALL_DIR) $(1)$(FS_STABLE_MOD_DIR)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_MOD_DIR)/mod_$(2).so \
-                                               $(1)$(FS_STABLE_MOD_DIR)
-endef
-
-define Package/$(PKG_NAME)/config
-       source "$(SOURCE)/Config.in"
-endef
-
-define Package/$(PKG_LIBFTDM)/Default
-  SECTION:=libs
-  CATEGORY:=Libraries
-  SUBMENU:=Telephony
-  URL:=https://www.$(PRG_NAME).org
-endef
-
-define Package/$(PKG_LIBFTDM)
-$(call Package/$(PKG_LIBFTDM)/Default)
-  DEPENDS:=
-  TITLE:=TDM signaling and media API
-  MENU:=1
-  URL:=https://www.$(PRG_NAME).org
-endef
-
-define Package/$(PKG_LIBFTDM)/description
-Provides a unified interface to hardware TDM cards and SS7 stacks.
-endef
-
-define Package/$(PKG_LIBFTDM)/install
-$(call Package/$(PKG_NAME)/install/lib,$(1),lib$(FTDM))
-endef
-
-define Package/$(PKG_LIBFTDM)/FTModule
-define Package/$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))
-$(call Package/$(PKG_LIBFTDM)/Default)
-  DEPENDS:=PACKAGE_$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1)):$(PKG_LIBFTDM) \
-         $(patsubst +%,+PACKAGE_$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1)):%,$(4))
-  TITLE:=$(2) FreeTDM module
-endef
-define Package/$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))/description
-$(subst \n,$(newline),$(3))
-endef
-define Package/$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))/install
-$(call Package/$(PKG_LIBFTDM)/install/ftmod,$$(1),$(1))
-endef
-$$(eval $$(call BuildPackage,$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))))
-endef
-
-define Package/$(PKG_NAME)/Default
-  SUBMENU:=Telephony
-  SECTION:=net
-  CATEGORY:=Network
-  URL:=https://www.$(PRG_NAME).org
-endef
-
-define Package/$(PKG_NAME)
-$(call Package/$(PKG_NAME)/Default)
-  TITLE:=Open source telephony platform, v$(PKG_VERSION)
-  MENU:=1
-  USERID:=$(PRG_NAME)=372:$(PRG_NAME)=372
-  DEPENDS:= \
-         $(CXX_DEPENDS) \
-         $(ICONV_DEPENDS) \
-         +!BUSYBOX_DEFAULT_SU:shadow-su \
-         +@OPENSSL_WITH_DEPRECATED \
-         +FS_STABLE_WITH_FREETYPE:libfreetype \
-         +FS_STABLE_WITH_ODBC:unixodbc \
-         +FS_STABLE_WITH_PNG:libpng \
-         +libcurl \
-         +libedit \
-         +libopenssl \
-         +libpcre \
-         +libpthread \
-         +librt \
-         +libspeex \
-         +libspeexdsp \
-         +libsqlite3 \
-         +libuuid \
-         +zlib
-  CONFLICTS:=$(PRG_NAME)
-endef
-
-define Package/$(PKG_NAME)/description
-FreeSWITCH is a scalable open source cross-platform telephony platform
-designed to route and interconnect popular communication protocols
-using audio, video, text or any other form of media.
-endef
-
-define Package/$(PKG_NAME)/conffiles
-$(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)
-$(FS_STABLE_SYSCONF_DIR)/config/$(PRG_NAME)
-$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
-endef
-
-define Package/$(PKG_NAME)/install
-$(call Package/$(PKG_NAME)/install/bin,$(1),$(PRG_NAME))
-$(call Package/$(PKG_NAME)/install/lib,$(1),lib$(PRG_NAME))
-       $(INSTALL_DIR) $(1)$(FS_STABLE_FONTS_DIR)
-       $(INSTALL_DIR) $(1)$(FS_STABLE_GRAMMAR_DIR)
-       $(INSTALL_DIR) $(1)$(FS_STABLE_HTDOCS_DIR)
-       $(INSTALL_DIR) $(1)$(FS_STABLE_IMAGES_DIR)
-       $(INSTALL_DIR) $(1)$(FS_STABLE_SCRIPTS_DIR)
-       $(INSTALL_DIR) $(1)$(FS_STABLE_SOUNDS_DIR)
-       $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/config
-       $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface
-       $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/init.d
-       $(INSTALL_DIR) $(1)$(FS_STABLE_TLS_DIR)
-       $(INSTALL_BIN) ./files/$(PRG_NAME).init \
-               $(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
-       $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \
-               $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface/90-$(PRG_NAME)
-       $(INSTALL_CONF) ./files/$(PRG_NAME).conf \
-               $(1)$(FS_STABLE_SYSCONF_DIR)/config/$(PRG_NAME)
-endef
-
-define Package/$(PKG_NAME)/postinst
-#!/bin/sh
-if [ -z "$${IPKG_INSTROOT}" ]; then
-  echo
-  echo "o-------------------------------------------------------------------o"
-  echo "| FreeSWITCH note                                                   |"
-  echo "o-------------------------------------------------------------------o"
-  echo "| Edit /etc/config/freeswitch to change basic init configuration.   |"
-  echo "|                                                                   |"
-  echo "| Also visit the Wiki at:                                           |"
-  echo "| https://openwrt.org/docs/guide-user/services/voip/freeswitch      |"
-  echo "o-------------------------------------------------------------=^_^=-o"
-  echo
-fi
-exit 0
-endef
-
-define Package/$(PKG_NAME)-misc-perl-esl
-$(call Package/$(PKG_NAME)/Default)
-  TITLE:=Perl ESL
-  DEPENDS:=$(PKG_NAME) \
-         +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-autoloader \
-         +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-data \
-         +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-dynaloader \
-         @PERL_THREADS
-endef
-
-define Package/$(PKG_NAME)-misc-perl-esl/description
-This package contains the Perl binding for FreeSWITCH's Event Socket
-Library (ESL).
-endef
-
-define Package/$(PKG_NAME)-misc-perl-esl/install
-       $(INSTALL_DIR) $(1)$(PERL_SITELIB)/ESL
-       $(INSTALL_DIR) $(1)$(PERL_SITELIB)/auto/ESL
-       $(INSTALL_BIN) \
-               $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL.so \
-                                       $(1)$(PERL_SITELIB)/auto/ESL
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL.pm \
-                                       $(1)$(PERL_SITELIB)
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL/Dispatch.pm \
-                                       $(1)$(PERL_SITELIB)/ESL
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL/IVR.pm \
-                                       $(1)$(PERL_SITELIB)/ESL
-endef
-
-define Package/$(PKG_NAME)-misc-timezones
-$(call Package/$(PKG_NAME)/Default)
-  TITLE:=Timezones file
-  DEPENDS:=$(PKG_NAME)
-  PKGARCH:=all
-endef
-
-define Package/$(PKG_NAME)-misc-timezones/description
-This package includes a timezones file for FreeSWITCH.
-endef
-
-define Package/$(PKG_NAME)-misc-timezones/install
-       $(INSTALL_DIR) $(1)$(FS_STABLE_TZ_DIR)
-       $(INSTALL_DATA) \
-       $(PKG_BUILD_DIR)/conf/vanilla/autoload_configs/timezones.conf.xml \
-                                               $(1)$(FS_STABLE_TZ_DIR)
-endef
-
-define Package/$(PKG_NAME)/Example
-define Package/$(PKG_NAME)-example-$(subst _,-,$(1))
-$(call Package/$(PKG_NAME)/Default)
-  TITLE:=Example configuration
-  DEPENDS:=$(PKG_NAME)
-  PKGARCH:=all
-endef
-define Package/$(PKG_NAME)-example-$(subst _,-,$(1))/description
-This package does not install any configuration for FreeSWITCH into
-/etc/freeswitch. The system administrator is completely responsible
-for that directory. If you install one of the example configuration
-packages, it will install the corresponding sample configuration to
-/usr/share/freeswitch/examples where you can take a look at it.
-endef
-define Package/$(PKG_NAME)-example-$(subst _,-,$(1))/install
-$(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_EXAMPLES_DIR)/$(1),$(PKG_BUILD_DIR)/conf/$(1))
-endef
-$$(eval $$(call BuildPackage,$(PKG_NAME)-example-$(subst _,-,$(1))))
-endef
-
-define Package/$(PKG_NAME)/Language
-define Package/$(PKG_NAME)-lang-$(subst _,-,$(1))
-$(call Package/$(PKG_NAME)/Default)
-  TITLE:=$(2) language files
-  DEPENDS:=$(PKG_NAME)
-  PKGARCH:=all
-endef
-define Package/$(PKG_NAME)-lang-$(subst _,-,$(1))/description
-This package includes the $(2) language files for FreeSWITCH.
-endef
-define Package/$(PKG_NAME)-lang-$(subst _,-,$(1))/install
-$(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_LANG_DIR)/$(1),$(PKG_BUILD_DIR)/conf/vanilla/lang/$(1))
-endef
-$$(eval $$(call BuildPackage,$(PKG_NAME)-lang-$(subst _,-,$(1))))
-endef
-
-# The next package generator is for miscellaneous files that only
-# require being copied from PKG_INSTALL_DIR to the ipkg.
-define Package/$(PKG_NAME)/Misc
-define Package/$(PKG_NAME)-$(subst _,-,$(1))
-$(call Package/$(PKG_NAME)/Default)
-  TITLE:=$(2)
-  DEPENDS:=$(PKG_NAME)
-  ifeq ($(6),y)
-  PKGARCH:=all
-  endif
-endef
-define Package/$(PKG_NAME)-$(subst _,-,$(1))/description
-$(subst \n,$(newline),$(3))
-endef
-define Package/$(PKG_NAME)-$(subst _,-,$(1))/install
-$(call Package/$(PKG_NAME)/install/dir,$$(1)$(5),$(PKG_INSTALL_DIR)$(4))
-endef
-$$(eval $$(call BuildPackage,$(PKG_NAME)-$(subst _,-,$(1))))
-endef
-
-define Package/$(PKG_NAME)/Module
-define Package/$(PKG_NAME)-mod-$(subst _,-,$(1))
-$(call Package/$(PKG_NAME)/Default)
-  TITLE:=$(2) module
-  DEPENDS:=$(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-mod-$(subst _,-,$(1)):%,$(4))
-endef
-define Package/$(PKG_NAME)-mod-$(subst _,-,$(1))/description
-$(subst \n,$(newline),$(3))
-endef
-define Package/$(PKG_NAME)-mod-$(subst _,-,$(1))/install
-$(call Package/$(PKG_NAME)/install/mod,$$(1),$(1))
-ifeq ($(CONFIG_FS_STABLE_WITH_MODCONF),y)
-$(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_EXAMPLES_DIR)/mod_$(1),$(PKG_BUILD_DIR)/src/mod/*/mod_$(1)/conf)
-endif
-ifeq ($(1),perl)
-       $(INSTALL_DIR) $$(1)$(PERL_SITELIB)/auto/$(PRG_NAME)
-       $(INSTALL_BIN) \
-               $(PKG_INSTALL_DIR)/usr/perl/$(PRG_NAME).so \
-                                       $$(1)$(PERL_SITELIB)/auto/$(PRG_NAME)
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)/usr/perl/$(PRG_NAME).pm \
-                                                       $$(1)$(PERL_SITELIB)
-endif
-endef
-$$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(subst _,-,$(1))))
-endef
-
-define Package/$(PKG_NAME)/Util
-define Package/$(PKG_NAME)-util-$(subst _,-,$(1))
-$(call Package/$(PKG_NAME)/Default)
-  TITLE:=$(2) utility
-  DEPENDS:=$(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-util-$(subst _,-,$(1)):%,$(4))
-  ifeq ($(5),y)
-  PKGARCH:=all
-  endif
-endef
-define Package/$(PKG_NAME)-util-$(subst _,-,$(1))/description
-$(subst \n,$(newline),$(3))
-endef
-define Package/$(PKG_NAME)-util-$(subst _,-,$(1))/install
-$(call Package/$(PKG_NAME)/install/bin,$$(1),$(1))
-endef
-$$(eval $$(call BuildPackage,$(PKG_NAME)-util-$(subst _,-,$(1))))
-endef
-
-CONFIGURE_ARGS+= \
-       --srcdir=$(PKG_BUILD_DIR) \
-       --disable-dependency-tracking \
-       --disable-static \
-       --disable-system-xmlrpc-c \
-       --enable-core-libedit-support \
-       --enable-fhs \
-       --with-cachedir=/tmp/$(PRG_NAME)/cache \
-       --with-dbdir=/tmp/$(PRG_NAME)/db \
-       --with-imagesdir=$(FS_STABLE_IMAGES_DIR) \
-       --with-logfiledir=/tmp/$(PRG_NAME)/log \
-       --with-python=no \
-       --with-recordingsdir=/tmp/$(PRG_NAME)/recordings \
-       --with-storagedir=/tmp/$(PRG_NAME)/storage \
-       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_DEBUG,debug) \
-       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_LIBYUV,libyuv) \
-       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ODBC,core-odbc-support) \
-       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_SRTP,srtp) \
-       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_VPX,libvpx) \
-       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ZRTP,zrtp) \
-       $(if $(CONFIG_FS_STABLE_WITH_FREETYPE),,--without-freetype) \
-       $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)$(FS_STABLE_LIB_DIR)") \
-       $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
-       $(if $(CONFIG_FS_STABLE_WITH_PNG),,--without-png) \
-       $(if $(CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \
-       $(if $(CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-pritap),--with-pritap,--without-pritap)
-
-ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang-event)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-kazoo),)
-CONFIGURE_ARGS+= \
-       --with-erlang=no
-endif
-
-# Make mod_spandsp use fixed point math when soft float support is
-# enabled on target devices.
-ifeq ($(CONFIG_SOFT_FLOAT),y)
-CONFIGURE_ARGS+= \
-       --enable-fixed-point
-endif
-
-# FreeSWITCH dropped postgresql support from the core. postgresql
-# support is now available via mod_pgsql. We still need to pass
-# '--without-pgsql', otherwise apr-util links to libpq and we still
-# would have the core link to it.
-CONFIGURE_ARGS+= \
-       --without-pgsql
-
-# Don't want host-php
-CONFIGURE_VARS+= \
-       ac_cv_have_php=no \
-       ac_cv_have_php_config=no \
-       ac_cv_prog_PHP=false \
-       ac_cv_prog_PHP_CONFIG=false
-
-# The autoconf variables in this block are OK for both musl and glibc
-CONFIGURE_VARS+= \
-       ac_cv_dev_urandom=yes \
-       ac_cv_file__dev_ptmx=yes \
-       ac_cv_file__dev_urandom=yes \
-       ac_cv_file_dbd_apr_dbd_mysql_c=no \
-       ac_cv_free_null=yes \
-       ac_cv_func_mmap_fixed_mapped=yes \
-       ac_cv_func_pthread_rwlock_init=yes \
-       ac_cv_func_sem_open=yes \
-       ac_cv_have_working_memmove=yes \
-       ac_cv_negative_eai=yes \
-       ac_cv_o_nonblock_inherited=no \
-       ac_cv_struct_rlimit=yes \
-       apr_cv_epoll=yes \
-       apr_cv_gai_addrconfig=yes \
-       apr_cv_mutex_recursive=yes \
-       apr_cv_process_shared_works=yes \
-       apr_cv_pthreads_lib=-lpthread \
-       apr_cv_tcp_nodelay_with_cork=yes \
-       apr_cv_type_rwlock_t=yes
-
-# fs_cli
-CONFIGURE_VARS+= \
-       disable_cc=yes
-
-# Regarding apr_cv_mutex_robust_shared=no see
-# http://www.openwall.com/lists/musl/2016/11/26/1
-ifeq ($(call qstrip,$(CONFIG_LIBC)),musl)
-CONFIGURE_VARS+= \
-       apr_cv_mutex_robust_shared=no \
-       ac_cv_strerror_r_rc_int=yes
-else
-CONFIGURE_VARS+= \
-       apr_cv_mutex_robust_shared=yes
-endif
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),)
-CONFIGURE_VARS+= \
-       PERL="$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION)" \
-       PERL_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -I$(STAGING_DIR)$(PERL_SITELIB)/CORE" \
-       PERL_INC="-I$(STAGING_DIR)$(PERL_SITELIB)/CORE" \
-       PERL_LDFLAGS="-Wl,-rpath,$(PERL_SITELIB)/CORE -L$(STAGING_DIR)$(PERL_SITELIB)/CORE -lperl" \
-       PERL_LIBDIR="-L$(PERL_SITELIB)/CORE" \
-       PERL_LIBS="$(FS_STABLE_PERL_LIBS) $(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%)" \
-       PERL_SITEDIR="$(PERL_SITELIB)"
-else
-CONFIGURE_VARS+= \
-       ac_cv_have_perl=no \
-       ac_cv_prog_PERL=false
-endif
-
-# mod_radius_cdr runs configure in libs/freeradius-client. Let
-# freeradius-client know /dev/urandom is available on target devices.
-MAKE_VARS+= \
-       ac_cv_dev_urandom=yes
-
-# Make sphinxbase use fixed point math when soft float support is
-# enabled on target devices.
-ifeq ($(CONFIG_SOFT_FLOAT),y)
-MAKE_VARS+= \
-       FS_STABLE_USE_FIXED_POINT="--enable-fixed"
-endif
-
-# Some common URLs
-FS_STABLE_LIBS_URL:=https://files.$(PRG_NAME).org/downloads/libs
-FS_STABLE_SPHINX_URL:=@SF/cmusphinx
-
-# mod_event_zmq
-FS_STABLE_ZEROMQ_FILE:=zeromq-2.1.9.tar.gz
-FS_STABLE_ZEROMQ_HASH:=f3542f756687e622beef3a75c8e027fe2d95d4654350cbca4c070ffc58d9ace0
-FS_STABLE_ZEROMQ_URL:=http://download.zeromq.org
-
-# mod_pocketsphinx
-FS_STABLE_POCKETSPHINX_FILE:=pocketsphinx-0.8.tar.gz
-FS_STABLE_POCKETSPHINX_HASH:=874c4c083d91c8ff26a2aec250b689e537912ff728923c141c4dac48662cce7a
-
-FS_STABLE_SPHINXBASE_FILE:=sphinxbase-0.8.tar.gz
-FS_STABLE_SPHINXBASE_HASH:=55708944872bab1015b8ae07b379bf463764f469163a8fd114cbb16c5e486ca8
-
-FS_STABLE_SPHINXMODEL_FILE:=communicator_semi_6000_20080321.tar.gz
-FS_STABLE_SPHINXMODEL_HASH:=dbb5e9fb85000a7cb97d6958a3ef8d77532dc55fc730ac6979705e8645cb0c18
-
-# mod_radius_cdr
-FS_STABLE_FREERADIUS_CLIENT_FILE:=freeradius-client-1.1.7.tar.gz
-FS_STABLE_FREERADIUS_CLIENT_HASH:=eada2861b8f4928e3ac6b5bbfe11e92cd6cdcacfce40cae1085e77c1b6add0e9
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
-$(eval $(call Download/files,zmq,$(FS_STABLE_ZEROMQ_FILE),$(FS_STABLE_ZEROMQ_URL),$(FS_STABLE_ZEROMQ_HASH)))
-endif
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx)$(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
-$(eval $(call Download/files,pocketsphinx,$(FS_STABLE_POCKETSPHINX_FILE),$(FS_STABLE_SPHINX_URL),$(FS_STABLE_POCKETSPHINX_HASH)))
-$(eval $(call Download/files,sphinxbase,$(FS_STABLE_SPHINXBASE_FILE),$(FS_STABLE_SPHINX_URL),$(FS_STABLE_SPHINXBASE_HASH)))
-$(eval $(call Download/files,communicator,$(FS_STABLE_SPHINXMODEL_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_SPHINXMODEL_HASH)))
-endif
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius-cdr),)
-$(eval $(call Download/files,freeradius-client,$(FS_STABLE_FREERADIUS_CLIENT_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_FREERADIUS_CLIENT_HASH)))
-endif
-
-# Need to update LDFLAGS for libs/unimrcp, otherwise it will try to link to a
-# different apr/apr-util if found.
-# FS_STABLE_ANCHOR: string in build/acmacros/apr.m4 that will be replaced
-FS_STABLE_ANCHOR:=dnl Get build information from APR
-FS_STABLE_APR_LIBS:=-L$(PKG_BUILD_DIR)/libs/apr -L$(PKG_BUILD_DIR)/libs/apr-util
-
-define Build/Prepare
-       $(call Build/Prepare/Default)
-
-       echo '#applications/mod_random' >> $(PKG_BUILD_DIR)/modules.conf
-       echo '#codecs/mod_yuv' >> $(PKG_BUILD_DIR)/modules.conf
-       echo '#event_handlers/mod_event_test' >> $(PKG_BUILD_DIR)/modules.conf
-
-       $(SED) 's|$(FS_STABLE_ANCHOR)|APR_SETVAR(LDFLAGS,[$(FS_STABLE_APR_LIBS) $(TARGET_LDFLAGS)])|' \
-               $(PKG_BUILD_DIR)/libs/unimrcp/build/acmacros/apr.m4
-endef
-
-define Build/Configure
-       $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/modules.conf
-       $(foreach m,$(FS_STABLE_MOD_AVAILABLE),
-               $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(subst _,-,$(m))),
-               $(SED) '/mod_$(m)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
-
-# Hack for misc-grammar - needs mod_pocketsphinx to provide grammar files
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
-ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx),)
-       $(SED) '/mod_pocketsphinx$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
-endif
-endif
-
-# Hack for mod_gsmopen - it has a build-time dep on mod_spandsp
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-gsmopen),)
-ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp),)
-       $(SED) '/mod_spandsp$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
-endif
-endif
-
-# Hack for mod_unimrcp - it has a build-time dep on mod_sofia
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-unimrcp),)
-ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-sofia),)
-       $(SED) '/mod_sofia$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
-endif
-endif
-
-       $(call Build/Configure/Default)
-endef
-
-define Build/Compile
-# Copy some source files if certain modules are selected
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
-       $(CP) $(DL_DIR)/$(FS_STABLE_ZEROMQ_FILE) $(PKG_BUILD_DIR)/libs
-endif
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx)$(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
-       $(CP) $(DL_DIR)/$(FS_STABLE_POCKETSPHINX_FILE) $(PKG_BUILD_DIR)/libs
-       $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXBASE_FILE) $(PKG_BUILD_DIR)/libs
-       $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXMODEL_FILE) $(PKG_BUILD_DIR)/libs
-endif
-
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius-cdr),)
-       $(CP) $(DL_DIR)/$(FS_STABLE_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
-endif
-
-# Compile FreeTDM first
-ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
-       $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM))
-endif
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),)
-       $(call Build/Compile/Default)
-endif
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
-       $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod)
-endif
-endef
-
-define Build/Install
-# Again, FreeTDM first
-ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
-       $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM) install)
-endif
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),)
-       $(call Build/Install/Default)
-endif
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
-       $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install)
-endif
-endef
-
-define Build/InstallDev/$(PKG_LIBFTDM)
-       $(INSTALL_DIR) $(1)/usr/include
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(FTDM).pc \
-                                               $(1)$(FS_STABLE_PKGCONFIG_DIR)
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
-endef
-
-define Build/InstallDev/$(PKG_NAME)
-       $(INSTALL_DIR) $(1)$(FS_STABLE_INCLUDES_DIR)
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(FS_STABLE_INCLUDES_DIR)/*.h \
-                                               $(1)$(FS_STABLE_INCLUDES_DIR)
-       $(INSTALL_DATA) \
-               $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(PRG_NAME).pc \
-                                               $(1)$(FS_STABLE_PKGCONFIG_DIR)
-endef
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)$(FS_STABLE_PKGCONFIG_DIR)
-ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
-       $(call Build/InstallDev/$(PKG_LIBFTDM),$(1))
-endif
-ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),)
-       $(call Build/InstallDev/$(PKG_NAME),$(1))
-endif
-endef
-
-$(eval $(call BuildPackage,$(PKG_LIBFTDM)))
-$(eval $(call BuildPackage,$(PKG_NAME)))
-$(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl))
-$(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones))
-
-################################
-# FreeSWITCH example configs
-# Params:
-# 1 - Package subname
-################################
-
-$(eval $(call Package/$(PKG_NAME)/Example,curl))
-$(eval $(call Package/$(PKG_NAME)/Example,insideout))
-$(eval $(call Package/$(PKG_NAME)/Example,minimal))
-$(eval $(call Package/$(PKG_NAME)/Example,rayo))
-$(eval $(call Package/$(PKG_NAME)/Example,sbc))
-$(eval $(call Package/$(PKG_NAME)/Example,softphone))
-$(eval $(call Package/$(PKG_NAME)/Example,testing))
-$(eval $(call Package/$(PKG_NAME)/Example,vanilla))
-
-################################
-# FreeTDM modules
-# Params:
-# 1 - Package subname
-# 2 - Package title
-# 3 - Module description
-# 4 - Module dependencies
-################################
-
-$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,analog,Analog,Offers generic FXO/FXS support for any type of card supported by FreeTDM.,))
-$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,analog_em,Analog EM,Offers generic E&M signaling for any type of card supported by FreeTDM.,))
-$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,libpri,LibPRI,Offers support for PRI lines using the open source libpri stack for any\ntype of card supported by FreeTDM. Supports both PRI and BRI signalling.,+libpri @!aarch64))
-$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,pritap,PRI tapping,This module is used to tap PRI lines.,+$(PKG_LIBFTDM)-ftmod-libpri))
-$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,skel,Skeleton,ftmod_skel is an example module.,))
-$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,zt,DAHDI I/O,This module supports the DAHDI interface. The DAHDI interface is used by\nseveral hardware vendors.,))
-
-################################
-# FreeSWITCH language files
-# Params:
-# 1 - Language code
-# 2 - Language
-################################
-
-$(eval $(call Package/$(PKG_NAME)/Language,de,German))
-$(eval $(call Package/$(PKG_NAME)/Language,en,English))
-$(eval $(call Package/$(PKG_NAME)/Language,es,Spanish))
-$(eval $(call Package/$(PKG_NAME)/Language,fr,French))
-$(eval $(call Package/$(PKG_NAME)/Language,he,Hebrew))
-$(eval $(call Package/$(PKG_NAME)/Language,pt,Portuguese))
-$(eval $(call Package/$(PKG_NAME)/Language,ru,Russian))
-$(eval $(call Package/$(PKG_NAME)/Language,sv,Swedish))
-
-################################
-# FreeSWITCH misc packages
-# Params:
-# 1 - Package subname
-# 2 - Package title
-# 3 - Package description
-# 4 - Source dir relative to
-#     PKG_INSTALL_DIR
-# 5 - Dest dir relative to ipkg
-# 6 - Arch independent files
-################################
-
-$(eval $(call Package/$(PKG_NAME)/Misc,misc-fonts,Fonts,This package includes the fonts bundled with FreeSWITCH.,$(FS_STABLE_FONTS_DIR),$(FS_STABLE_FONTS_DIR),y))
-$(eval $(call Package/$(PKG_NAME)/Misc,misc-grammar,Grammar,This package contains grammar files. mod_pocketsphinx would be a\npotential user.,$(FS_STABLE_GRAMMAR_DIR),$(FS_STABLE_GRAMMAR_DIR),y))
-$(eval $(call Package/$(PKG_NAME)/Misc,misc-images,Images,This package includes the images bundled with FreeSWITCH.,$(FS_STABLE_IMAGES_DIR),$(FS_STABLE_IMAGES_DIR),y))
-
-################################
-# FreeSWITCH modules
-# Params:
-# 1 - Package subname
-# 2 - Package title
-# 3 - Module description
-# 4 - Module dependencies
-################################
-
-$(eval $(call Package/$(PKG_NAME)/Module,abstraction,API abstraction,This module provides a way to create new API functions via regex\nrewriting.,))
-$(eval $(call Package/$(PKG_NAME)/Module,alsa,ALSA endpoint,ALSA endpoint module.,+alsa-lib))
-$(eval $(call Package/$(PKG_NAME)/Module,amr,AMR passthrough,Passthrough AMR codec support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,amrwb,AMR wideband passthrough,Passthrough AMR wideband codec support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,av,AV,Video codec and format support via FFmpeg.,+libffmpeg-full @x86_64))
-$(eval $(call Package/$(PKG_NAME)/Module,avmd,Voicemail detection,This module attempts to determine when a voicemail system has answered\nthe call.,))
-$(eval $(call Package/$(PKG_NAME)/Module,b64,Base64,Transfers data Base64 encoded.,))
-$(eval $(call Package/$(PKG_NAME)/Module,basic,BASIC,BASIC module for FreeSWITCH.,))
-$(eval $(call Package/$(PKG_NAME)/Module,bert,BERT,Line testing tool.,))
-$(eval $(call Package/$(PKG_NAME)/Module,blacklist,Blacklist helper,This module provides tools to blacklist callers.,))
-$(eval $(call Package/$(PKG_NAME)/Module,callcenter,Call center,This module implements Automated Call Distribution queues.,))
-$(eval $(call Package/$(PKG_NAME)/Module,cdr_csv,CSV CDR,CSV Call Detail Record handler.,))
-$(eval $(call Package/$(PKG_NAME)/Module,cdr_mongodb,MongoDB CDR,MongoDB Call Detail Record handler.,))
-$(eval $(call Package/$(PKG_NAME)/Module,cdr_pg_csv,PostgreSQL CDR,PostgreSQL Call Detail Record handler.,+libpq))
-$(eval $(call Package/$(PKG_NAME)/Module,cdr_sqlite,SQLite CDR,SQLite Call Detail Record handler.,))
-$(eval $(call Package/$(PKG_NAME)/Module,cidlookup,Caller ID lookup,This module provides an API for querying caller ID name and location\ndata.,))
-$(eval $(call Package/$(PKG_NAME)/Module,clearmode,Clearmode,Clearmode codec passthrough support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,cluechoo,Clue Choo,This demo module renders a Clue Choo train on the FreeSWITCH console.,+libncurses))
-$(eval $(call Package/$(PKG_NAME)/Module,commands,Commands,This module provides miscellaneous API commands.,))
-$(eval $(call Package/$(PKG_NAME)/Module,conference,Conference,This module provides multi-party conferencing.,))
-$(eval $(call Package/$(PKG_NAME)/Module,console,Console logger,Allows control over what messages get logged to the console.,))
-$(eval $(call Package/$(PKG_NAME)/Module,curl,cURL,This module provides an API for making HTTP requests with cURL.,))
-$(eval $(call Package/$(PKG_NAME)/Module,dahdi_codec,DAHDI codec,DAHDI codec module.,))
-$(eval $(call Package/$(PKG_NAME)/Module,db,DB,This module implements a simple db API with group support. Also can be\nused as a limit db backend.,))
-$(eval $(call Package/$(PKG_NAME)/Module,dialplan_asterisk,Asterisk dialplan,Asterisk extensions.conf style dialplan parser.,))
-$(eval $(call Package/$(PKG_NAME)/Module,dialplan_directory,Directory dialplan,Directory dialplan support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,dialplan_xml,XML dialplan,Standard FreeSWITCH XML dialplan support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,dingaling,Generic XMPP,Allows FreeSWITCH to be used as a client for XMPP Servers.,))
-$(eval $(call Package/$(PKG_NAME)/Module,directory,Dial-by-name directory,This module implements a dial-by-name directory IVR.,))
-$(eval $(call Package/$(PKG_NAME)/Module,distributor,Load distributor,This module implements a mechanism for performing load balancing.,))
-$(eval $(call Package/$(PKG_NAME)/Module,dptools,Dialplan tools,This module implements basic dialplan tools.,))
-$(eval $(call Package/$(PKG_NAME)/Module,easyroute,DID routing,This module does destination lookup based on DID.,))
-$(eval $(call Package/$(PKG_NAME)/Module,enum,ENUM routing,This module implements ENUM support.,+libldns))
-$(eval $(call Package/$(PKG_NAME)/Module,erlang_event,Erlang event,Erlang event module.,+erlang))
-$(eval $(call Package/$(PKG_NAME)/Module,esf,Multicast,This module adds multi-cast support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,esl,Single ESL,This module adds an API for generating one-off ESL requests.,))
-$(eval $(call Package/$(PKG_NAME)/Module,event_multicast,Multicast Event,Multicast Event System for FreeSWITCH.,))
-$(eval $(call Package/$(PKG_NAME)/Module,event_socket,Event socket,Sends events via a single socket. Needed for fs_cli.,))
-$(eval $(call Package/$(PKG_NAME)/Module,event_test,Event test,Event demo module.,))
-$(eval $(call Package/$(PKG_NAME)/Module,event_zmq,ZMQ event,ZMQ event module.,@!USE_UCLIBCXX))
-$(eval $(call Package/$(PKG_NAME)/Module,expr,Expr,This module adds expr support for expression evaluation.,))
-$(eval $(call Package/$(PKG_NAME)/Module,fail2ban,Fail2ban logging,Provides support for Fail2ban logging.,))
-$(eval $(call Package/$(PKG_NAME)/Module,fifo,FIFO,This module adds a first-in first-out queue system.,))
-$(eval $(call Package/$(PKG_NAME)/Module,format_cdr,Multiformat CDR,A superset of mod_json_cdr and mod_xml_cdr.,))
-$(eval $(call Package/$(PKG_NAME)/Module,$(FTDM),FreeTDM endpoint,This module is the glue between FreeSWITCH and FreeTDM.,+$(PKG_LIBFTDM)))
-$(eval $(call Package/$(PKG_NAME)/Module,fsk,FSK,This module adds frequency-shift keying support which can be used to\nsend and receive caller ID.,))
-$(eval $(call Package/$(PKG_NAME)/Module,fsv,FSV,This module provides dialplan applications for recording and playing\nvideos.,))
-$(eval $(call Package/$(PKG_NAME)/Module,g723_1,G.723.1 passthrough,G.723.1 codec passthrough.,))
-$(eval $(call Package/$(PKG_NAME)/Module,g729,G.729 passthrough,G.729 codec passthrough.,))
-$(eval $(call Package/$(PKG_NAME)/Module,graylog2,Graylog2 logger,GELF logger for Graylog2 and Logstash.,))
-$(eval $(call Package/$(PKG_NAME)/Module,gsmopen,GSM endpoint,GSMopen is a channel driver that allows an SMS to be sent to and from\nFreeSWITCH as well as incoming and outgoing GSM voice calls.,+gsmlib +libctb +libjpeg +libtiff))
-$(eval $(call Package/$(PKG_NAME)/Module,h26x,H.26x passthrough,H.26x video codec passthrough.,))
-$(eval $(call Package/$(PKG_NAME)/Module,hash,Hash,This module provides a key-value in-memory datastore. Usable as a\nlimit backend.,))
-$(eval $(call Package/$(PKG_NAME)/Module,hiredis,Redis client,This module provides a mechanism to use Redis as a datastore.,+libhiredis))
-$(eval $(call Package/$(PKG_NAME)/Module,httapi,HT-TAPI,This module provides an API for controlling the switch by responding\nto HTTP requests.,))
-$(eval $(call Package/$(PKG_NAME)/Module,http_cache,HTTP GET with caching,This module provides an API for making HTTP GET requests where the\nresult is cached.,))
-$(eval $(call Package/$(PKG_NAME)/Module,isac,iSAC,iSAC codec support.,@arm||i386||mips||mips64||mips64el||mipsel||x86_64))
-$(eval $(call Package/$(PKG_NAME)/Module,json_cdr,JSON CDR,JSON-based Call Detail Record handler.,))
-$(eval $(call Package/$(PKG_NAME)/Module,kazoo,Kazoo,Kazoo module for FreeSWITCH.,+erlang))
-$(eval $(call Package/$(PKG_NAME)/Module,lcr,LCR,This module adds a facility for least-cost routing.,))
-$(eval $(call Package/$(PKG_NAME)/Module,ldap,LDAP,LDAP module for FreeSWITCH.,+libopenldap))
-$(eval $(call Package/$(PKG_NAME)/Module,local_stream,Local stream,Connects multiple channels to a looped stream.,))
-$(eval $(call Package/$(PKG_NAME)/Module,logfile,File logger,Logs FreeSWITCH output to a file.,))
-$(eval $(call Package/$(PKG_NAME)/Module,loopback,Loopback,A loopback channel driver.,))
-$(eval $(call Package/$(PKG_NAME)/Module,lua,Lua,Lua language interface for FreeSWITCH.,+liblua))
-$(eval $(call Package/$(PKG_NAME)/Module,mariadb,MariaDB,Adds MariaDB support.,+libmariadb @!USE_UCLIBCXX))
-$(eval $(call Package/$(PKG_NAME)/Module,mp4v,MP4 video passthrough,MP4 video passthrough.,))
-$(eval $(call Package/$(PKG_NAME)/Module,native_file,Native file,Plays files that are already encoded in the right format.,))
-$(eval $(call Package/$(PKG_NAME)/Module,nibblebill,Nibblebill,This module allows for real-time accounting of a cash balance and\nusing that information for call routing.,))
-$(eval $(call Package/$(PKG_NAME)/Module,odbc_cdr,ODBC CDR,ODBC Call Detail Record handler.,))
-$(eval $(call Package/$(PKG_NAME)/Module,opus,Opus,Opus codec support.,+libopus))
-$(eval $(call Package/$(PKG_NAME)/Module,opusfile,Opus file,Read and Write OGG/Opus files.,+libopusenc +libopusfile))
-$(eval $(call Package/$(PKG_NAME)/Module,oreka,Oreka,This module provides media recording with the Oreka cross-platform\naudio stream recording and retrieval system.,))
-$(eval $(call Package/$(PKG_NAME)/Module,perl,Perl,This package contains mod_perl for FreeSWITCH.,+libdb47 +libgdbm +perlbase-essential @PERL_THREADS))
-$(eval $(call Package/$(PKG_NAME)/Module,pgsql,PostgreSQL,Adds PostgreSQL support.,+libpq))
-$(eval $(call Package/$(PKG_NAME)/Module,png,PNG,Allows playback of video using PNG files.,@FS_STABLE_WITH_PNG))
-$(eval $(call Package/$(PKG_NAME)/Module,pocketsphinx,Pocketsphinx,This module allows speech recognition. You might want to install\n$(PKG_NAME)-misc-grammar as well.,+libsamplerate)) # When libsamplerate is found it'll be linked against, there is no switch to turn it off
-$(eval $(call Package/$(PKG_NAME)/Module,portaudio,Portaudio,Voice through a local soundcard.,+portaudio))
-$(eval $(call Package/$(PKG_NAME)/Module,portaudio_stream,Portaudio streaming,Stream from an external audio source for Music on Hold.,+portaudio))
-$(eval $(call Package/$(PKG_NAME)/Module,posix_timer,POSIX timer,Add POSIX timer support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,prefix,Prefix match,This module provides a data store with fast lookups by the longest\nprefix match rule.,))
-$(eval $(call Package/$(PKG_NAME)/Module,radius_cdr,Radius CDR,Radius Call Detail Record handler.,))
-$(eval $(call Package/$(PKG_NAME)/Module,random,Entropy,This module extracts entropy from FreeSWITCH and feeds it into\n/dev/random.,))
-$(eval $(call Package/$(PKG_NAME)/Module,raven,Raven logging,Adds support for logging to Raven instances.,))
-$(eval $(call Package/$(PKG_NAME)/Module,rayo,Rayo,Rayo/XMPP 3PCC server for FreeSWITCH.,+$(PKG_NAME)-mod-ssml))
-$(eval $(call Package/$(PKG_NAME)/Module,redis,Redis limit backend,This module provides a mechanism to use Redis as a limit backend data\nstore.,))
-$(eval $(call Package/$(PKG_NAME)/Module,rss,RSS,Parses and reads XML based RSS feeds and reads the entries aloud via a TTS engine.,))
-$(eval $(call Package/$(PKG_NAME)/Module,rtc,Media streaming,Media streaming as used by WebRTC and mod_verto.,))
-$(eval $(call Package/$(PKG_NAME)/Module,rtmp,RTMP endpoint,RTMP endpoint support. Allows FreeSWITCH to be used from RTMP clients.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_de,German Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_en,English Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_es,Spanish Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_es_ar,Argentinian Spanish Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_fa,Persian Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_fr,French Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_he,Hebrew Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_hr,Croatian Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_hu,Hungarian Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_it,Italian Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_ja,Japanese Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_nl,Dutch Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_pl,Polish Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_pt,Portuguese Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_ru,Russian Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_sv,Swedish Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_th,Thai Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,say_zh,Chinese Say,Uses prerecorded sounds to read or say various things.,))
-$(eval $(call Package/$(PKG_NAME)/Module,shell_stream,Shell stream,Allows to stream audio from an arbitrary shell command.,))
-$(eval $(call Package/$(PKG_NAME)/Module,shout,Shout,Allows to stream audio from MP3s or Shoutcast streams.,+lame-lib +libmpg123 +libshout))
-$(eval $(call Package/$(PKG_NAME)/Module,signalwire,SignalWire,SignalWire CLOUD - FreeSWITCH connector.,+signalwire-client-c))
-$(eval $(call Package/$(PKG_NAME)/Module,skinny,Skinny,Skinny Call Control Protocol endpoint support.,))
-$(eval $(call Package/$(PKG_NAME)/Module,sms,SMS,This module provides an abstract facility for interfacing with SMS\nsystems.,))
-$(eval $(call Package/$(PKG_NAME)/Module,snapshot,Snapshot,This module can record a sliding window of audio and take snapshots\nto disk.,))
-$(eval $(call Package/$(PKG_NAME)/Module,sndfile,Soundfile,Adds sound format support via libsndfile.,+libsndfile))
-$(eval $(call Package/$(PKG_NAME)/Module,snmp,SNMP,An SNMP stats reporter.,+libnetsnmp))
-$(eval $(call Package/$(PKG_NAME)/Module,snom,SNOM,This module implements features specific to SNOM phones.,))
-$(eval $(call Package/$(PKG_NAME)/Module,sofia,Sofia SIP,SIP module.,))
-$(eval $(call Package/$(PKG_NAME)/Module,sonar,Sonar,This module measures the latency on an audio link by sending audible\naudio sonar pings.,))
-$(eval $(call Package/$(PKG_NAME)/Module,spandsp,SpanDSP,This module implements SpanDSP fax. It includes DSP and codec\nfunctionality.,+libjpeg +liblzma +libtiff))
-$(eval $(call Package/$(PKG_NAME)/Module,spy,User Spy,This module adds the ability to monitor the audio of a channel.,))
-$(eval $(call Package/$(PKG_NAME)/Module,ssml,SSML,mod_ssml is a FreeSWITCH module that renders SSML into audio. This\nmodule requires a text-to-speech module for speech synthesis.,))
-$(eval $(call Package/$(PKG_NAME)/Module,stress,Stress,This module attempts to detect voice stress on an audio channel.,))
-$(eval $(call Package/$(PKG_NAME)/Module,syslog,Syslog logger,Logs FreeSWITCH output to the syslog.,))
-$(eval $(call Package/$(PKG_NAME)/Module,theora,Theora passthrough,Theora video codec passthrough.,))
-$(eval $(call Package/$(PKG_NAME)/Module,tone_stream,Tone stream,Tone generation stream.,))
-$(eval $(call Package/$(PKG_NAME)/Module,translate,Number translation,This module implements number translation.,))
-$(eval $(call Package/$(PKG_NAME)/Module,tts_commandline,TTS command-line,Run a command-line and play the output file.,))
-$(eval $(call Package/$(PKG_NAME)/Module,unimrcp,UniMRCP,Allows communication with Media Resource Control Protocol servers.,))
-$(eval $(call Package/$(PKG_NAME)/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
-$(eval $(call Package/$(PKG_NAME)/Module,verto,Verto,Verto signaling protocol.,))
-$(eval $(call Package/$(PKG_NAME)/Module,video_filter,Video filter chromakey,This module provides a media bug for chromakey functionality.,))
-$(eval $(call Package/$(PKG_NAME)/Module,vmd,Voicemail detection,This module detects voicemail beeps.,))
-$(eval $(call Package/$(PKG_NAME)/Module,voicemail,Voicemail,This module provides a voicemail system.,))
-$(eval $(call Package/$(PKG_NAME)/Module,voicemail_ivr,Voicemail IVR,This module provides an extensible voicemail IVR system.,))
-$(eval $(call Package/$(PKG_NAME)/Module,xml_cdr,XML CDR,XML Call Detail Record handler.,))
-$(eval $(call Package/$(PKG_NAME)/Module,xml_curl,XML cURL,Provides an XML cURL interfaces to pull dynamic XML configuration for\nFreeSWITCH over HTTP.,))
-$(eval $(call Package/$(PKG_NAME)/Module,xml_ldap,XML LDAP,LDAP XML gateway.,+libopenldap))
-$(eval $(call Package/$(PKG_NAME)/Module,xml_rpc,XML RPC,Allows using the webapi to control FreeSWITCH.,))
-$(eval $(call Package/$(PKG_NAME)/Module,xml_scgi,XML SCGI,SCGI XML Gateway.,))
-$(eval $(call Package/$(PKG_NAME)/Module,yaml,YAML,YAML language module.,+libyaml))
-$(eval $(call Package/$(PKG_NAME)/Module,yuv,Raw YUV,Raw YUV I420 video codec support.,@FS_STABLE_WITH_LIBYUV))
-
-################################
-# FreeSWITCH utilities
-# Params:
-# 1 - Package subname
-# 2 - Package title
-# 3 - Utility description
-# 4 - Utility dependencies
-# 5 - Utility is a script (y/n)
-################################
-
-$(eval $(call Package/$(PKG_NAME)/Util,fs_cli,CLI,The fs_cli program is a Command-Line Interface that allows a user to\nconnect to a FreeSWITCH instance running on the local or a remote\nsystem.,,n))
-$(eval $(call Package/$(PKG_NAME)/Util,fs_encode,Sound file conversion,Format conversion of sound files so the result can be used by\nmod_native_file.,+$(PKG_NAME)-mod-native-file +$(PKG_NAME)-mod-sndfile +$(PKG_NAME)-mod-spandsp,n))
-$(eval $(call Package/$(PKG_NAME)/Util,fs_ivrd,IVR daemon,The FreeSWITCH IVR daemon is an abstraction layer that sits on top of\nthe ESL. The basic idea is that the ivrd will allow the user to have\na STDIN/STDOUT interface for simple call control.,,n))
-$(eval $(call Package/$(PKG_NAME)/Util,fs_tts,TTS to sound file,Use TTS to generate a sound file.,,n))
-$(eval $(call Package/$(PKG_NAME)/Util,gentls_cert,TLS certificate,Can be used to create TLS certificates and setup CAs.,+openssl-util,y))
-$(eval $(call Package/$(PKG_NAME)/Util,tone2wav,Sound file generation,Generates a sound file from a teletone script. The output can be in\nany format that is supported by libsndfile.,+$(PKG_NAME)-mod-sndfile,n))
diff --git a/net/freeswitch-stable/files/freeswitch.conf b/net/freeswitch-stable/files/freeswitch.conf
deleted file mode 100644 (file)
index c2e48ca..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-config freeswitch 'general'
-       option enabled '0'
-       option log_stderr '1'
-       option log_stdout '1'
-       option options '-nonat -np'
-
-config freeswitch 'directories'
-       option cache '/tmp/freeswitch/cache'
-       option db '/tmp/freeswitch/db'
-       option log '/tmp/freeswitch/log'
-       option recordings '/tmp/freeswitch/recordings'
-       option storage '/tmp/freeswitch/storage'
-       option temp '/tmp/freeswitch/temp'
-
-config freeswitch 'hotplug'
-       #option interface 'wan'
-       #option mount_point '/mnt/usb'
-       option ntpd '0'
-       option timeout '60'
-
diff --git a/net/freeswitch-stable/files/freeswitch.hotplug b/net/freeswitch-stable/files/freeswitch.hotplug
deleted file mode 100644 (file)
index 68fc3b0..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/bin/sh
-
-NAME=freeswitch
-COMMAND=/etc/init.d/$NAME
-
-LOGGER="/usr/bin/logger -t $NAME-hotplug"
-LOG_ERR="$LOGGER -p user.err --"
-LOG_NOTICE="$LOGGER -p user.notice --"
-
-[ "$ACTION" = ifup ] || exit 0
-
-. /lib/functions.sh
-config_load $NAME
-
-config_get interface hotplug interface
-
-[ "$INTERFACE" = "$interface" ] || exit 0
-
-pidof $NAME &> /dev/null
-if [ $? -eq 0 ]; then
-  $LOG_NOTICE stopping $NAME
-  $COMMAND stop &> /dev/null
-fi
-
-config_get timeout hotplug timeout 60
-
-[ "$timeout" -gt 0 ] 2> /dev/null || unset timeout
-timeout="${timeout:-60}"
-
-config_get mount_point hotplug mount_point
-
-# Mount condition, idea lifted from OpenWrt Wiki
-[ -n "$mount_point" ] && {
-
-  if ! [ -d "$mount_point" ]; then
-    $LOG_ERR "$mount_point" not a valid mount point
-    exit 1
-  fi
-
-  mnt="$mount_point"
-  notReady=start
-  tmp_timeout=$timeout
-
-  while [ -n "$notReady" -a $tmp_timeout -gt 0 ]; do
-    if [ "$notReady" != start ]; then
-      $LOG_NOTICE "$mnt" not yet mounted, timeout in $tmp_timeout s
-      sleep 5
-      tmp_timeout=$(($tmp_timeout-5))
-    fi
-
-    notReady=
-
-    result=$(cat /proc/mounts | awk '{print $2}' | grep "^$mnt\$")
-    if [ -z "$result" ]; then
-      notReady="$mnt not ready yet"
-    fi
-  done
-
-  if [ -n "$notReady" ]; then
-    $LOG_ERR "$mnt" still not mounted
-    $LOG_ERR not starting $NAME
-    exit 1
-  else
-    $LOG_NOTICE "$mnt" mounted
-  fi
-
-}
-
-config_get_bool ntpd hotplug ntpd 0
-
-# ntpd condition
-[ $ntpd -eq 1 ] && {
-
-  type ntpq &> /dev/null
-  [ $? -eq 0 ] || {
-    $LOG_ERR ntpq utility not found
-    exit 1
-  }
-
-  pidof ntpd &> /dev/null || {
-    $LOG_ERR ntpd not running
-    exit 1
-  }
-
-  notReady=start
-  tmp_timeout=$timeout
-
-  while [ -n "$notReady" -a $tmp_timeout -gt 0 ]; do
-    if [ "$notReady" != start ]; then
-      $LOG_NOTICE system time not in sync yet, timeout in $tmp_timeout s
-      sleep 5
-      tmp_timeout=$(($tmp_timeout-5))
-    fi
-
-    notReady=
-
-    result=$(ntpq -c 'timeout 300' -c 'rv 0 stratum' 2> /dev/null | \
-                    awk -F '=' '{print $2}' | grep -o -E '^[0-9]+')
-    if [ -z $result ]; then
-      $LOG_ERR failed to extract stratum from ntpd
-      notReady="unable to extract stratum"
-    else
-      $LOG_NOTICE ntpd stratum $result
-      if [ $result -lt 16 ] 2> /dev/null; then
-        result=$(ntpq -c 'timeout 300' -c 'rv 0 offset' 2> /dev/null \
-                 | awk -F '=' '{print $2}' | grep -o -E '^-?[0-9]+')
-        if [ -z $result ]; then
-          $LOG_ERR failed to extract offset from ntpd
-          notReady="unable to extract offset"
-        else
-          # "-0" looks stupid, so remove "-"
-          result=$(echo $result | grep -o '[0-9]*')
-          $LOG_NOTICE ntpd to system time offset \+\/\- $result ms
-          # If offset < 100 ms consider system time in sync
-          [ $result -lt 100 ] || notReady="system time not in sync yet"
-        fi
-      else
-        notReady="ntpd not in sync yet"
-      fi
-    fi
-  done
-
-  if [ -n "$notReady" ]; then
-    $LOG_ERR system time still not in sync
-    $LOG_ERR not starting $NAME
-    exit 1
-  else
-    $LOG_NOTICE system time in sync
-  fi
-
-}
-
-$COMMAND start &> /dev/null
-sleep 1
-pidof $NAME &>/dev/null
-if [ $? -eq 0 ]; then
-  $LOG_NOTICE started $NAME due to \"ifup "$INTERFACE"\" event
-else
-  $LOG_ERR start of $NAME due to \"ifup "$INTERFACE"\" event failed
-  exit 1
-fi
diff --git a/net/freeswitch-stable/files/freeswitch.init b/net/freeswitch-stable/files/freeswitch.init
deleted file mode 100644 (file)
index 12d7ec6..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2017 - 2018 OpenWrt.org
-
-START=90
-
-USE_PROCD=1
-
-#PROCD_DEBUG=1
-
-NAME=freeswitch
-COMMAND=/usr/bin/$NAME
-
-LOGGER="/usr/bin/logger -p user.err -s -t $NAME --"
-
-start_service() {
-  dir_etc=/etc/$NAME
-  dir_localstate=/var/lib/$NAME
-  dir_run=/var/run/$NAME
-
-  config_load $NAME
-
-  config_get_bool enabled general enabled 0
-  if [ $enabled -eq 0 ]; then
-    $LOGGER service not enabled in /etc/config/$NAME
-    exit 1
-  fi
-
-  config_get_bool log_stderr general log_stderr 1
-  config_get_bool log_stdout general log_stdout 1
-
-  config_get dir_cache      directories cache      /tmp/$NAME/cache
-  config_get dir_db         directories db         /tmp/$NAME/db
-  config_get dir_log        directories log        /tmp/$NAME/log
-  config_get dir_recordings directories recordings /tmp/$NAME/recordings
-  config_get dir_storage    directories storage    /tmp/$NAME/storage
-  config_get dir_temp       directories temp       /tmp/$NAME/temp
-
-  config_get options general options
-
-  for i in "$dir_localstate" "$dir_run"; do
-    if ! [ -e "$i" ]; then
-      mkdir -m 0750 -p "$i"
-      [ -d "$i" ] && chown $NAME:$NAME "$i"
-    fi
-  done
-
-  command -v su >/dev/null
-  ret=$?
-  if [ 0 != "$ret" ]; then
-    $LOGGER utility \"su\" not available
-    $LOGGER will not attempt to create directories
-  else
-    for i in "$dir_cache" \
-             "$dir_db" \
-             "$dir_log" \
-             "$dir_recordings" \
-             "$dir_storage" \
-             "$dir_temp";
-    do
-      if ! [ -e "$i" ]; then
-        su -s /bin/sh -c "mkdir -m 0750 -p \"$i\"" $NAME
-      fi
-    done
-  fi
-
-  procd_open_instance
-  # starting with full path seems cleaner judging by 'ps' output
-  procd_set_param command $COMMAND
-  # need to specify all or none of -conf, -log, and -db
-  procd_append_param command \
-    -cache "$dir_cache" \
-    -conf "$dir_etc" \
-    -db "$dir_db" \
-    -g "$NAME" \
-    -log "$dir_log" \
-    -recordings "$dir_recordings" \
-    -run "$dir_run" \
-    -storage "$dir_storage" \
-    -temp "$dir_temp" \
-    -u "$NAME" \
-    $options \
-    -c
-  # forward stderr to logd
-  procd_set_param stderr $log_stderr
-  # same for stdout
-  procd_set_param stdout $log_stdout
-  procd_close_instance
-}
diff --git a/net/freeswitch-stable/patches/003-modmake-fix.patch b/net/freeswitch-stable/patches/003-modmake-fix.patch
deleted file mode 100644 (file)
index d0cf333..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/build/modmake.rulesam
-+++ b/build/modmake.rulesam
-@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = foreign subdir-object
- AM_CFLAGS   = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
- AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS)
- AM_LDFLAGS  = $(SWITCH_AM_LDFLAGS)
--DEFAULT_VARS = CFLAGS="$(CFLAGS)" CPPFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
-+DEFAULT_VARS = CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
- DEFAULT_ARGS = --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --disable-shared --with-pic
- moddir=@modulesdir@
diff --git a/net/freeswitch-stable/patches/010-fix-zrtp-cflags.patch b/net/freeswitch-stable/patches/010-fix-zrtp-cflags.patch
deleted file mode 100644 (file)
index 00b959f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libs/libzrtp/configure.ac
-+++ b/libs/libzrtp/configure.ac
-@@ -34,7 +34,7 @@ esac
- AM_INIT_AUTOMAKE
- AX_PREFIX_CONFIG_H(include/zrtp_config_unix.h,ZRTP,config/config.h)
--CFLAGS="$CFLAGS -std=c99 -O2 -g3 -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -fPIC -DZRTP_AUTOMAKE=1"
-+CFLAGS="$CFLAGS -std=c99 -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -fPIC -DZRTP_AUTOMAKE=1"
- # Configuring external libraries
- echo "========================= configuring bnlib =============================="
diff --git a/net/freeswitch-stable/patches/030-fix-configure-ac.patch b/net/freeswitch-stable/patches/030-fix-configure-ac.patch
deleted file mode 100644 (file)
index fa633e9..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -256,30 +256,6 @@ AX_COMPILER_VENDOR
- # Set CC_FOR_BUILD
- if test "x${cross_compiling}" = "xyes"; then
-     CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
--    case "$host" in
--       arm*-linux-gnueabi*|arm*-*-linux-gnueabi*)
--              # spandsp modem
--              ac_cv_file__dev_ptmx=yes
--              # libjs
--              export ac_cv_va_copy=yes
--              # srtp
--              export ac_cv_file__dev_urandom=yes
--              # rpl_malloc
--              export ac_cv_func_realloc_0_nonnull=yes
--              export ac_cv_func_malloc_0_nonnull=yes
--              # apr
--              export ac_cv_func_setpgrp_void=yes
--              export ac_cv_file__dev_zero=yes
--              export apr_cv_tcp_nodelay_with_cork=yes
--              export ac_cv_file_dbd_apr_dbd_mysql_c=no
--              export ac_cv_sizeof_ssize_t=4
--              export apr_cv_mutex_recursive=yes
--              export ac_cv_func_pthread_rwlock_init=yes
--              export apr_cv_type_rwlock_t=yes
--              export apr_cv_process_shared_works=yes
--              export apr_cv_mutex_robust_shared=yes
--       ;;
--    esac
- else
-     CC_FOR_BUILD='$(CC)'
- fi
-@@ -659,7 +635,7 @@ path_push_unique () {
-   fi
- }
--AC_PATH_PROG([PG_CONFIG], [pg_config], [no])
-+AC_PATH_PROG([PG_CONFIG], [pg_config], [no], ["${STAGING_DIR}"/usr/bin])
- AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
- case $host in
-@@ -1627,13 +1603,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
- # -a "x$ac_cv_have_EXTERN_h" != "xno"
- if test "x$ac_cv_have_perl" != "xno"; then
--   PERL=perl
--   PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlib}'`"
--   PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE"
--   PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`"
--   PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts | sed -e 's|-arch x86_64 -arch i386||'` -DEMBED_PERL"
--   PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e 's|-arch x86_64 -arch i386||'`"
--   PERL_INC="`$PERL -MExtUtils::Embed -e perl_inc`"
-+   PERL_CFLAGS="-w -DMULTIPLICITY ${PERL_CFLAGS} -DEMBED_PERL"
-    save_CFLAGS="$CFLAGS"
-    CFLAGS="$PERL_CFLAGS"
diff --git a/net/freeswitch-stable/patches/040-gentls_cert_update_message_digest.patch b/net/freeswitch-stable/patches/040-gentls_cert_update_message_digest.patch
deleted file mode 100644 (file)
index ff5226d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-commit 70d1cbafe4ab0176cd9fc01f740e34cd1bae326b
-Author: Sebastian Kemper <sebastian_ml@gmx.net>
-Date:   Wed Nov 13 20:29:50 2019 +0100
-
-    [gentls_cert] Update message digest
-    
-    Debian Buster updated /etc/ssl/openssl.cnf to default to
-    
-    MinProtocol = TLSv1.2
-    CipherString = DEFAULT@SECLEVEL=2
-    
-    gentls_cert currently uses SHA1 as message digest. According to OpenSSL
-    documentation this only offers 80 bit of security. 80 bits is enough for
-    security level 1, but not 2.
-    
-    The OpenSSL default MD nowadays is SHA256. This commit updates
-    gentls_cert to use it.
-    
-    Issue was reported on the FS mailing list. The certificates created by
-    gentls_cert caused "md too weak" errors and clients were unable to
-    connect.
-    
-    Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
-
-diff --git a/scripts/gentls_cert.in b/scripts/gentls_cert.in
-index 43aa8ac605..dd56c9f6dc 100644
---- a/scripts/gentls_cert.in
-+++ b/scripts/gentls_cert.in
-@@ -89,7 +89,7 @@ setup_ca() {
-       openssl req -out "${CONFDIR}/CA/cacert.pem" \
-               -new -x509 -keyout "${CONFDIR}/CA/cakey.pem" \
--              -config "${TMPFILE}.cfg" -nodes -days ${DAYS} -sha1 >/dev/null || exit 1
-+              -config "${TMPFILE}.cfg" -nodes -days ${DAYS} -sha256 >/dev/null || exit 1
-       cat "${CONFDIR}/CA/cacert.pem" > "${CONFDIR}/cafile.pem"
-       cp $TMPFILE.cfg /tmp/ssl.cfg
-       rm "${TMPFILE}.cfg"
-@@ -131,11 +131,11 @@ generate_cert() {
-       openssl req -new -out "${TMPFILE}.req" \
-               -newkey rsa:${KEY_SIZE} -keyout "${TMPFILE}.key" \
--              -config "${TMPFILE}.cfg" -nodes -sha1 >/dev/null || exit 1
-+              -config "${TMPFILE}.cfg" -nodes -sha256 >/dev/null || exit 1
-       openssl x509 -req -CAkey "${CONFDIR}/CA/cakey.pem" -CA "${CONFDIR}/CA/cacert.pem" -CAcreateserial \
-               -in "${TMPFILE}.req" -out "${TMPFILE}.crt" -extfile "${TMPFILE}.cfg" \
--              -extensions "${EXTENSIONS}" -days ${DAYS} -sha1 >/dev/null || exit 1
-+              -extensions "${EXTENSIONS}" -days ${DAYS} -sha256 >/dev/null || exit 1
-       cat "${TMPFILE}.crt" "${TMPFILE}.key" > "${CONFDIR}/${OUTFILE}"
diff --git a/net/freeswitch-stable/patches/110-apr-add-cache-for-strerror_r.patch b/net/freeswitch-stable/patches/110-apr-add-cache-for-strerror_r.patch
deleted file mode 100644 (file)
index a753697..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
---- a/libs/apr-util/build/apr_common.m4
-+++ b/libs/apr-util/build/apr_common.m4
-@@ -514,8 +514,9 @@ dnl  string.
- dnl
- dnl
- AC_DEFUN([APR_CHECK_STRERROR_R_RC],[
--AC_MSG_CHECKING(for type of return code from strerror_r)
--AC_TRY_RUN([
-+AC_CACHE_CHECK([whether return code from strerror_r has type int],
-+[ac_cv_strerror_r_rc_int],
-+[AC_TRY_RUN([
- #include <errno.h>
- #include <string.h>
- #include <stdio.h>
-@@ -531,14 +532,10 @@ int main(void)
- }], [
-     ac_cv_strerror_r_rc_int=yes ], [
-     ac_cv_strerror_r_rc_int=no ], [
--    ac_cv_strerror_r_rc_int=no ] )
-+    ac_cv_strerror_r_rc_int=no ] ) ] )
- if test "x$ac_cv_strerror_r_rc_int" = xyes; then
-   AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
--  msg="int"
--else
--  msg="pointer"
- fi
--AC_MSG_RESULT([$msg])
- ] )
- dnl
---- a/libs/apr/build/apr_common.m4
-+++ b/libs/apr/build/apr_common.m4
-@@ -514,8 +514,9 @@ dnl  string.
- dnl
- dnl
- AC_DEFUN([APR_CHECK_STRERROR_R_RC],[
--AC_MSG_CHECKING(for type of return code from strerror_r)
--AC_TRY_RUN([
-+AC_CACHE_CHECK([whether return code from strerror_r has type int],
-+[ac_cv_strerror_r_rc_int],
-+[AC_TRY_RUN([
- #include <errno.h>
- #include <string.h>
- #include <stdio.h>
-@@ -531,14 +532,10 @@ int main(void)
- }], [
-     ac_cv_strerror_r_rc_int=yes ], [
-     ac_cv_strerror_r_rc_int=no ], [
--    ac_cv_strerror_r_rc_int=no ] )
-+    ac_cv_strerror_r_rc_int=no ] ) ] )
- if test "x$ac_cv_strerror_r_rc_int" = xyes; then
-   AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
--  msg="int"
--else
--  msg="pointer"
- fi
--AC_MSG_RESULT([$msg])
- ] )
- dnl
---- a/libs/unimrcp/build/acmacros/apr_common.m4
-+++ b/libs/unimrcp/build/acmacros/apr_common.m4
-@@ -526,8 +526,9 @@ dnl  string.
- dnl
- dnl
- AC_DEFUN([APR_CHECK_STRERROR_R_RC], [
--AC_MSG_CHECKING(for type of return code from strerror_r)
--AC_TRY_RUN([
-+AC_CACHE_CHECK([whether return code from strerror_r has type int],
-+[ac_cv_strerror_r_rc_int],
-+[AC_TRY_RUN([
- #include <errno.h>
- #include <string.h>
- #include <stdio.h>
-@@ -543,14 +544,10 @@ main()
- }], [
-     ac_cv_strerror_r_rc_int=yes ], [
-     ac_cv_strerror_r_rc_int=no ], [
--    ac_cv_strerror_r_rc_int=no ] )
-+    ac_cv_strerror_r_rc_int=no ] ) ] )
- if test "x$ac_cv_strerror_r_rc_int" = xyes; then
-   AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
--  msg="int"
--else
--  msg="pointer"
- fi
--AC_MSG_RESULT([$msg])
- ] )
- dnl
diff --git a/net/freeswitch-stable/patches/120-fix-copts.patch b/net/freeswitch-stable/patches/120-fix-copts.patch
deleted file mode 100644 (file)
index 4582de6..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -2058,7 +2058,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
- AC_SUBST(OUR_DISABLED_UNINSTALL_MODS)
- AC_SUBST(AM_MAKEFLAGS)
--ac_configure_args="$ac_configure_args --with-modinstdir=${modulesdir} CONFIGURE_CFLAGS='$CFLAGS $CPPFLAGS' CONFIGURE_CXXFLAGS='$CXXFLAGS $CPPFLAGS' CONFIGURE_LDFLAGS='$LDFLAGS' "
-+APR_ADDTO(CONFIGURE_CFLAGS, [$CFLAGS])
-+APR_ADDTO(CONFIGURE_CPPFLAGS, [$CPPFLAGS])
-+APR_ADDTO(CONFIGURE_CXXFLAGS, [$CXXFLAGS])
-+APR_ADDTO(CONFIGURE_LDFLAGS, [$LDFLAGS])
-+
-+ac_configure_args="$ac_configure_args --with-modinstdir=${modulesdir} CONFIGURE_CFLAGS='$CONFIGURE_CFLAGS' CONFIGURE_CPPFLAGS='$CONFIGURE_CPPFLAGS' CONFIGURE_CXXFLAGS='$CONFIGURE_CXXFLAGS' CONFIGURE_LDFLAGS='$CONFIGURE_LDFLAGS' "
- #     --prefix='$prefix' --exec_prefix='$exec_prefix' --libdir='$libdir' --libexecdir='$libexecdir' --bindir='$bindir' --sbindir='$sbindir' \
- #     --localstatedir='$localstatedir' --datadir='$datadir'"
---- a/libs/apr-util/configure.ac
-+++ b/libs/apr-util/configure.ac
-@@ -20,9 +20,10 @@ dnl Generate ./config.nice for reproduci
- dnl 
- APR_CONFIG_NICE(config.nice)
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- dnl # Some initial steps for configuration.  We setup the default directory
- dnl # and which files are to be configured.
---- a/libs/apr/configure.ac
-+++ b/libs/apr/configure.ac
-@@ -20,9 +20,10 @@ sinclude(build/apr_hints.m4)
- sinclude(build/libtool.m4)
- sinclude(build/ltsugar.m4)
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- dnl Hard-coded inclusion at the tail end of apr_private.h:
- AH_BOTTOM([
---- a/libs/iksemel/configure.ac
-+++ b/libs/iksemel/configure.ac
-@@ -6,9 +6,12 @@ AC_CONFIG_SRCDIR([configure.ac])
- AM_INIT_AUTOMAKE
- AC_CONFIG_HEADERS(include/config.h)
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+m4_include(../apr/build/apr_common.m4)
-+
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- AC_CANONICAL_HOST
---- a/libs/libdingaling/configure.ac
-+++ b/libs/libdingaling/configure.ac
-@@ -8,9 +8,12 @@ AM_INIT_AUTOMAKE
- AC_CONFIG_SRCDIR([src])
- AC_CONFIG_HEADERS([src/config.h])
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+m4_include(../apr/build/apr_common.m4)
-+
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- #Set default language
- AC_LANG_C
---- a/libs/sofia-sip/configure.ac
-+++ b/libs/sofia-sip/configure.ac
-@@ -13,9 +13,12 @@ dnl ---------------------------
- dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
- AC_INIT([sofia-sip], [1.12.10devel])
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+m4_include(../apr/build/apr_common.m4)
-+
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
- AC_CONFIG_MACRO_DIR([m4])
---- a/libs/spandsp/configure.ac
-+++ b/libs/spandsp/configure.ac
-@@ -21,9 +21,12 @@
- AC_PREREQ([2.59])
- AC_INIT([spandsp], [1.99.0])
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+m4_include(../apr/build/apr_common.m4)
-+
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- SPANDSP_LT_CURRENT=3
- SPANDSP_LT_REVISION=0
---- a/libs/srtp/configure.ac
-+++ b/libs/srtp/configure.ac
-@@ -3,9 +3,12 @@ AC_INIT(srtp, 1.4.2, mcgrew@cisco.com)
- AC_CONFIG_AUX_DIR(build)
- AM_INIT_AUTOMAKE
--CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
--CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
--LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-+m4_include(../apr/build/apr_common.m4)
-+
-+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
-+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
-+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
-+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
- #Set default language
- AC_LANG_C
diff --git a/net/freeswitch-stable/patches/130-fix-iksemel-copts.patch b/net/freeswitch-stable/patches/130-fix-iksemel-copts.patch
deleted file mode 100644 (file)
index 005b7a4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/libs/iksemel/src/Makefile.am
-+++ b/libs/iksemel/src/Makefile.am
-@@ -25,5 +25,5 @@ libiksemel_la_SOURCES = \
-       base64.c
- libiksemel_la_LDFLAGS = -version-info 4:0:1 -no-undefined
--libiksemel_la_CFLAGS = $(CFLAGS) $(LIBGNUTLS_CFLAGS)  
-+libiksemel_la_CFLAGS = $(LIBGNUTLS_CFLAGS)  
- libiksemel_la_LIBADD = $(LIBGNUTLS_LIBS)  
diff --git a/net/freeswitch-stable/patches/140-libvpx-cross.patch b/net/freeswitch-stable/patches/140-libvpx-cross.patch
deleted file mode 100644 (file)
index 15a78c3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -587,8 +587,15 @@ libs/libedit/src/.libs/libedit.a:
- libs/libzrtp/libzrtp.a:
-       cd libs/libzrtp && $(MAKE)
-+# !!! OpenWrt was here !!!
-+# - added CROSS and set target to generic-gnu for cross-compile
-+# - added CPPFLAGS to CFLAGS, otherwise they would be ignored
-+# - disabled optimizations that would override OpenWrt's CFLAGS
-+# - disabled the building of tools (because they fail to build and we
-+#   don't need them anyway)
-+
- libs/libvpx/Makefile: libs/libvpx/.update
--      cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(VISIBILITY_FLAG)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --size-limit=16384x16384
-+      cd libs/libvpx && CROSS="$(CROSS)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(CPPFLAGS) $(VISIBILITY_FLAG)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --disable-optimizations --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-tools --disable-unit-tests --size-limit=16384x16384
- libs/libvpx/libvpx.a: libs/libvpx/Makefile libs/libvpx/.update
-       @cd libs/libvpx && $(MAKE)
diff --git a/net/freeswitch-stable/patches/150-erlang-m4.patch b/net/freeswitch-stable/patches/150-erlang-m4.patch
deleted file mode 100644 (file)
index 893af86..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/build/config/erlang.m4
-+++ b/build/config/erlang.m4
-@@ -43,9 +43,20 @@ then
-                       ERLANG_LDFLAGS="-L$ERLANG_LIBDIR $ERLANG_LDFLAGS"
-                       LIBS="-L$ERLANG_LIBDIR $LIBS"
-               fi
-+
-+              #
-+              # Don't use the above ERLANG_LDFLAGS
-+              #
-+              ERLANG_LIBDIR="$STAGING_DIR/usr/lib"
-+              ERLANG_LDFLAGS="-L$ERLANG_LIBDIR"
-+              LIBS="-L$ERLANG_LIBDIR $LIBS"
-               AC_MSG_RESULT([$ERLANG_LIBDIR])
-               ERLANG_INCDIR=`$ERLANG -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1`
-+              #
-+              # Don't use the above ERLANG_INCDIR
-+              #
-+              ERLANG_INCDIR="$STAGING_DIR/usr/include"
-               AC_MSG_CHECKING([erlang incdir])
-               if test -z "`echo $ERLANG_INCDIR`" ; then
-                       AC_MSG_ERROR([failed])
diff --git a/net/freeswitch-stable/patches/170-mod_random.patch b/net/freeswitch-stable/patches/170-mod_random.patch
deleted file mode 100644 (file)
index ea85965..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/mod/applications/mod_random/Makefile.am
-+++ b/src/mod/applications/mod_random/Makefile.am
-@@ -3,6 +3,6 @@ MODNAME=mod_random
- mod_LTLIBRARIES = mod_random.la
- mod_random_la_SOURCES  = mod_random.c
--mod_random_la_CFLAGS   = $(AM_CFLAGS)
-+mod_random_la_CFLAGS   = $(AM_CFLAGS) -Wno-cpp
- mod_random_la_LIBADD   = $(switch_builddir)/libfreeswitch.la
- mod_random_la_LDFLAGS  = -avoid-version -module -no-undefined -shared
diff --git a/net/freeswitch-stable/patches/180-mod_perl.patch b/net/freeswitch-stable/patches/180-mod_perl.patch
deleted file mode 100644 (file)
index cc036ea..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/src/mod/languages/mod_perl/Makefile.am
-+++ b/src/mod/languages/mod_perl/Makefile.am
-@@ -1,8 +1,5 @@
- include $(top_srcdir)/build/modmake.rulesam
- MODNAME=mod_perl
--PERL        = perl
--PERL_LIBDIR =-L`perl -MConfig -e 'print $$Config{archlib}'`/CORE
--PERL_LIBS   =`perl -MConfig -e 'print $$Config{libs}'`
- perldir=$(prefix)/perl
- mod_LTLIBRARIES = mod_perl.la
-@@ -10,13 +7,13 @@ perl_LTLIBRARIES = freeswitch.la
- mod_perl_la_SOURCES  = mod_perl.c freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
- mod_perl_la_CFLAGS   = $(SWITCH_AM_CFLAGS)
- mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
--mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/ 
-+mod_perl_la_CPPFLAGS = @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
- mod_perl_la_LIBADD   = $(switch_builddir)/libfreeswitch.la
--mod_perl_la_LDFLAGS  = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'`
-+mod_perl_la_LDFLAGS  = -avoid-version -module -no-undefined -shared @PERL_LDFLAGS@ @PERL_LIBS@
- freeswitch_la_SOURCES = freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
- freeswitch_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(LDFLAGS)
--freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/ 
-+freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
- reswig:       swigclean mod_perl_wrap.cpp
- swigclean: clean
-@@ -31,7 +28,7 @@ orig: mod_perl_wrap.cpp
-       patch -R -s -p0 -i hack.diff
- .perlok:
--      @(${PERL} -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
-+      @(@PERL@ -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
-       || ((echo Sorry, you need to compile perl with threads and multiplicity.&& exit 1))
-       @touch .perlok
diff --git a/net/freeswitch-stable/patches/190-mod_pocketsphinx.patch b/net/freeswitch-stable/patches/190-mod_pocketsphinx.patch
deleted file mode 100644 (file)
index cb1d5bb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/mod/asr_tts/mod_pocketsphinx/Makefile.am
-+++ b/src/mod/asr_tts/mod_pocketsphinx/Makefile.am
-@@ -27,7 +27,7 @@ $(SPHINXBASE_DIR):
- $(SPHINXBASE_BUILDDIR)/Makefile: $(SPHINXBASE_DIR)
-       mkdir -p $(SPHINXBASE_BUILDDIR)
--      (cd $(SPHINXBASE_BUILDDIR) && $(DEFAULT_VARS) $(SPHINXBASE_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(SPHINXBASE_DIR) --without-python CFLAGS=)
-+      (cd $(SPHINXBASE_BUILDDIR) && sed -i 's|$$(srcdir)/||g' test/regression/Makefile.am && autoreconf -v -f -i -s && $(DEFAULT_VARS) ac_cv_header_alsa_asoundlib_h=no ac_cv_header_jack_jack_h=no ac_cv_header_pulse_pulseaudio_h=no $(SPHINXBASE_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(SPHINXBASE_DIR) --without-python $(FS_STABLE_USE_FIXED_POINT))
-       $(TOUCH_TARGET)
- $(SPHINXBASE_BUILDDIR)/buildstamp: $(SPHINXBASE_BUILDDIR)/Makefile
-@@ -45,7 +45,7 @@ $(POCKETSPHINX_DIR):
- $(POCKETSPHINX_BUILDDIR)/Makefile: $(POCKETSPHINX_DIR) $(SPHINXBASE_LA) $(SPHINXBASE_LA2)
-       mkdir -p $(POCKETSPHINX_BUILDDIR)
--      (cd $(POCKETSPHINX_BUILDDIR) && $(DEFAULT_VARS) $(POCKETSPHINX_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(POCKETSPHINX_DIR) --without-python --with-sphinxbase=$(SPHINXBASE_DIR) --with-sphinxbase-build=$(SPHINXBASE_BUILDDIR) CFLAGS=-Wno-return-type)
-+      (cd $(POCKETSPHINX_BUILDDIR) && autoreconf -v -f -i -s && $(DEFAULT_VARS) $(POCKETSPHINX_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(POCKETSPHINX_DIR) --without-python --with-sphinxbase=$(SPHINXBASE_DIR) --with-sphinxbase-build=$(SPHINXBASE_BUILDDIR))
-       $(TOUCH_TARGET)
- $(POCKETSPHINX_BUILDDIR)/buildstamp: $(POCKETSPHINX_BUILDDIR)/Makefile
diff --git a/net/freeswitch-stable/patches/200-mod_verto-fix-copts.patch b/net/freeswitch-stable/patches/200-mod_verto-fix-copts.patch
deleted file mode 100644 (file)
index bb8f48d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/mod/endpoints/mod_verto/Makefile.am
-+++ b/src/mod/endpoints/mod_verto/Makefile.am
-@@ -12,8 +12,8 @@ if HAVE_PERL
- #perldir = $(PERL_SITEDIR)
- noinst_LTLIBRARIES = MCAST.la
- MCAST_la_SOURCES   = mcast/mcast_wrap.cpp mcast/perlxsi.c mcast/mcast.c mcast/mcast_cpp.cpp
--MCAST_la_CFLAGS    = $(CC_CFLAGS) $(CFLAGS) $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
--MCAST_la_CXXFLAGS  = $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC)
-+MCAST_la_CFLAGS    = $(CC_CFLAGS) $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
-+MCAST_la_CXXFLAGS  = $(SWITCH_AM_CXXFLAGS) -w $(PERL_INC)
- MCAST_la_CPPFLAGS  = -I$(switch_srcdir)/src/mod/endpoints/mod_verto/mcast
- MCAST_la_LDFLAGS   = -avoid-version -module -no-undefined -shared $(PERL_LDFLAGS)
diff --git a/net/freeswitch-stable/patches/210-esl-perl-fix-copts.patch b/net/freeswitch-stable/patches/210-esl-perl-fix-copts.patch
deleted file mode 100644 (file)
index d9f71d8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/libs/esl/perl/Makefile.am
-+++ b/libs/esl/perl/Makefile.am
-@@ -2,8 +2,8 @@ if HAVE_PERL
- perldir = $(PERL_SITEDIR)
- perl_LTLIBRARIES = ESL.la
- ESL_la_SOURCES   = esl_wrap.cpp perlxsi.c
--ESL_la_CFLAGS    = $(CC_CFLAGS) $(CFLAGS) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
--ESL_la_CXXFLAGS  = -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC)
-+ESL_la_CFLAGS    = $(CC_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
-+ESL_la_CXXFLAGS  = -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) -w $(PERL_INC)
- ESL_la_LDFLAGS   = -avoid-version -module -no-undefined -shared $(PERL_LDFLAGS)
- ESL_la_LIBADD    = ../libesl.la
diff --git a/net/freeswitch-stable/patches/230-mod_radius_cdr.patch b/net/freeswitch-stable/patches/230-mod_radius_cdr.patch
deleted file mode 100644 (file)
index 2fa58ee..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
---- a/src/mod/event_handlers/mod_radius_cdr/Makefile.am
-+++ b/src/mod/event_handlers/mod_radius_cdr/Makefile.am
-@@ -20,7 +20,7 @@ $(RADCLIENT_DIR):
- $(RADCLIENT_BUILDDIR)/Makefile: $(RADCLIENT_DIR)
-       mkdir -p $(RADCLIENT_BUILDDIR)
--      cd $(RADCLIENT_BUILDDIR) && $(DEFAULT_VARS) $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
-+      cd $(RADCLIENT_BUILDDIR) && patch -p1 < ../../src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff && autoreconf -v -f -i -s && $(DEFAULT_VARS) CFLAGS+="-Wno-cpp" $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
-       $(TOUCH_TARGET)
- $(RADCLIENT_LA): $(RADCLIENT_BUILDDIR)/Makefile
---- /dev/null
-+++ b/src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff
-@@ -0,0 +1,32 @@
-+diff --git a/configure.in b/configure.in
-+index 4f194bd..647e9b9 100644
-+--- a/configure.in
-++++ b/configure.in
-+@@ -209,7 +209,7 @@ AC_CHECK_FUNCS(stricmp random rand snprintf vsnprintf)
-+ if test "$ac_cv_func_uname" = 'yes'
-+ then
-+      AC_MSG_CHECKING([for field domainname in struct utsname])
-+-     AC_TRY_RUN([
-++     AC_COMPILE_IFELSE([
-+      #include <sys/utsname.h>
-+      
-+      main(int argc, char **argv)
-+@@ -224,13 +224,11 @@ then
-+      )
-+ fi
-+ 
-+-AC_MSG_CHECKING([for /dev/urandom])
-+-if test -c /dev/urandom
-+-then
-+-     AC_MSG_RESULT(yes)
-+-     AC_DEFINE(HAVE_DEV_URANDOM)
-+-else
-+-     AC_MSG_RESULT(no)
-++AC_CACHE_CHECK([/dev/urandom], [ac_cv_dev_urandom],
-++  [ac_cv_dev_urandom=no
-++   if test -c /dev/urandom; then ac_cv_dev_urandom=yes; fi])
-++if test $ac_cv_dev_urandom = yes; then
-++  AC_DEFINE(HAVE_DEV_URANDOM)
-+ fi
-+ 
-+ dnl Determine PATH setting
diff --git a/net/freeswitch-stable/patches/260-mod_event_zmq-fix-build-with-fortify-headers.patch b/net/freeswitch-stable/patches/260-mod_event_zmq-fix-build-with-fortify-headers.patch
deleted file mode 100644 (file)
index a2df8e7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/mod/event_handlers/mod_event_zmq/Makefile.am
-+++ b/src/mod/event_handlers/mod_event_zmq/Makefile.am
-@@ -22,6 +22,7 @@ $(ZMQ_DIR):
-       $(GETLIB) $(ZMQ_BASEURL) $(ZMQ).tar.gz || $(GETLIB) $(ZMQ_BASEURL_ALT) $(ZMQ).tar.gz
-       sed -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' $(ZMQ_DIR)/configure.in > $(ZMQ_DIR)/configure.in.tmp && \
-               mv $(ZMQ_DIR)/configure.in.tmp $(ZMQ_DIR)/configure.in
-+      sed -i '/^libzmq_pedantic="yes"/s/yes/no/' $(ZMQ_DIR)/configure.in
-       cd $(ZMQ_DIR) && ./autogen.sh
- $(ZMQ_BUILDDIR)/Makefile: $(ZMQ_DIR)
diff --git a/net/freeswitch-stable/patches/270-fix-uclibc-iconv-in-gsmopen.patch b/net/freeswitch-stable/patches/270-fix-uclibc-iconv-in-gsmopen.patch
deleted file mode 100644 (file)
index c4a9cd4..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
---- a/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
-+++ b/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
-@@ -104,6 +104,12 @@ int gettimeofday(struct timeval *tv, str
- /***************/
- #endif /* WIN32 */
-+#if defined(FS_STABLE_ICONV_INBUF_CONST)
-+#define ICONV_INBUF_TYPE const char **
-+#else
-+#define ICONV_INBUF_TYPE char **
-+#endif
-+
- int gsmopen_serial_init(private_t *tech_pvt, int controldevice_speed)
- {
-       if (!tech_pvt)
-@@ -2521,11 +2527,7 @@ int ucs2_to_utf8(private_t *tech_pvt, ch
-       DEBUGA_GSMOPEN("1 ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
-                                  GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
--#ifdef WIN32
--      iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
--#else // WIN32
--      iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
--#endif // WIN32
-+      iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
-       if (iconv_res == (size_t) -1) {
-               DEBUGA_GSMOPEN("2 ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
-                                          GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
-@@ -2560,11 +2562,7 @@ int utf8_to_iso_8859_1(private_t *tech_p
-       DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf8_in=%s, iso_8859_1_out=%s\n",
-                                  GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_in, iso_8859_1_out);
--#ifdef WIN32
--      iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
--#else // WIN32
--      iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
--#endif // WIN32
-+      iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
-       if (iconv_res == (size_t) -1) {
-               DEBUGA_GSMOPEN("cannot translate in iso_8859_1 error: %s (errno: %d)\n", GSMOPEN_P_LOG, strerror(errno), errno);
-               return -1;
-@@ -2597,11 +2595,7 @@ int iso_8859_1_to_utf8(private_t *tech_p
-       }
-       inbytesleft = strlen(iso_8859_1_in) * 2;
--#ifdef WIN32
--      iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
--#else // WIN32
--      iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
--#endif // WIN32
-+      iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
-       if (iconv_res == (size_t) -1) {
-               DEBUGA_GSMOPEN("ciao in=%s, inleft=%d, out=%s, outleft=%d, utf8_out=%s\n",
-                                          GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_out);
-@@ -2642,11 +2636,7 @@ int utf8_to_ucs2(private_t *tech_pvt, ch
-       DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf8_in=%s, converted=%s\n",
-                                  GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_in, converted);
--#ifdef WIN32
--      iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
--#else // WIN32
--      iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
--#endif // WIN32
-+      iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
-       if (iconv_res == (size_t) -1) {
-               ERRORA("error: %s %d\n", GSMOPEN_P_LOG, strerror(errno), errno);
-               return -1;
diff --git a/net/freeswitch-stable/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch b/net/freeswitch-stable/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch
deleted file mode 100644 (file)
index 7e29e94..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libs/freetdm/configure.ac
-+++ b/libs/freetdm/configure.ac
-@@ -88,7 +88,7 @@ AC_ARG_ENABLE([enable_64],
- case "${ax_cv_c_compiler_vendor}" in
- gnu)
--      COMP_VENDOR_CFLAGS="-ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0"
-+      COMP_VENDOR_CFLAGS="-ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
-       ;;
- sun)
-       COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -xvpara"
diff --git a/net/freeswitch-stable/patches/290-fix-mod_freetdm-copts.patch b/net/freeswitch-stable/patches/290-fix-mod_freetdm-copts.patch
deleted file mode 100644 (file)
index 0cde4d1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
---- a/libs/freetdm/mod_freetdm/Makefile.in
-+++ b/libs/freetdm/mod_freetdm/Makefile.in
-@@ -1,4 +1,4 @@
--FT_CFLAGS=@CFLAGS@ @COMP_VENDOR_CFLAGS@ @DEFS@
-+FT_CFLAGS=@COMP_VENDOR_CFLAGS@ @DEFS@
- BASE=../../..
- FT_DIR=..
diff --git a/net/freeswitch-stable/patches/320-workaround-format-truncation-error-in-mod_cdr_mongodb.patch b/net/freeswitch-stable/patches/320-workaround-format-truncation-error-in-mod_cdr_mongodb.patch
deleted file mode 100644 (file)
index 2a93821..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -363,6 +363,16 @@ if test "$ax_cv_c_compiler_vendor" = "gn
-         [ac_cv_gcc_supports_w_no_misleading_indentation=no])])
-   CFLAGS="$saved_CFLAGS"
-   AC_MSG_RESULT($ac_cv_gcc_supports_w_no_misleading_indentation)
-+
-+  saved_CFLAGS="$CFLAGS"
-+  AC_CACHE_CHECK([whether compiler supports -Wno-error=format-truncation],
-+    [ac_cv_gcc_supports_w_no_err_format_truncation], [
-+      CFLAGS="$CFLAGS -Wno-error=format-truncation"
-+      AC_TRY_COMPILE([],[return 0;],
-+        [ac_cv_gcc_supports_w_no_err_format_truncation=yes],
-+        [ac_cv_gcc_supports_w_no_err_format_truncation=no])])
-+  CFLAGS="$saved_CFLAGS"
-+  AC_MSG_RESULT($ac_cv_gcc_supports_w_no_err_format_truncation)
- fi
- # tweak compiler specific flags
-@@ -402,6 +412,9 @@ elif test "x${ax_cv_c_compiler_vendor}"
-     if test "$ac_cv_gcc_supports_w_no_misleading_indentation" = yes; then
-       APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-misleading-indentation)
-     fi
-+    if test "$ac_cv_gcc_supports_w_no_err_format_truncation" = yes; then
-+      APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-error=format-truncation)
-+    fi
-     if test "${enable_64}" = "yes"; then
-       case "$host" in
-              *darwin*)
diff --git a/net/freeswitch-stable/patches/330-do-not-install-freetdm-twice.patch b/net/freeswitch-stable/patches/330-do-not-install-freetdm-twice.patch
deleted file mode 100644 (file)
index a81d60b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/libs/freetdm/mod_freetdm/Makefile.in
-+++ b/libs/freetdm/mod_freetdm/Makefile.in
-@@ -15,7 +15,6 @@ $(FTLA): $(FT_DIR)/.update
-       cd $(FT_DIR) && $(MAKE)
- local_install:
--      cd $(FT_DIR) && $(MAKE) install
-       [ -f $(DESTDIR)@confdir@/autoload_configs/freetdm.conf.xml ] || cp -f $(FT_DIR)/conf/freetdm.conf.xml  $(DESTDIR)@confdir@/autoload_configs
- local_clean:
diff --git a/net/freeswitch-stable/patches/360-fix-APR_TRY_COMPILE_NO_WARNING.patch b/net/freeswitch-stable/patches/360-fix-APR_TRY_COMPILE_NO_WARNING.patch
deleted file mode 100644 (file)
index 245e327..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/libs/apr-util/build/apr_common.m4
-+++ b/libs/apr-util/build/apr_common.m4
-@@ -493,13 +493,15 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
-  if test "$ac_cv_prog_gcc" = "yes"; then 
-    CFLAGS="$CFLAGS -Werror"
-  fi
-- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
--  [#include "confdefs.h"
--  ]
--  [[$1]]
--  [int main(int argc, const char *const *argv) {]
--  [[$2]]
--  [   return 0; }]])],
-+ AC_COMPILE_IFELSE(
-+  [AC_LANG_SOURCE(
-+   [#include "confdefs.h"
-+   ]
-+   [[$1]]
-+   [int main(int argc, const char *const *argv) {]
-+   [[$2]]
-+   [   return 0; }]
-+  )],
-   [$3], [$4])
-  CFLAGS=$apr_save_CFLAGS
- ])
---- a/libs/apr/build/apr_common.m4
-+++ b/libs/apr/build/apr_common.m4
-@@ -493,13 +493,15 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
-  if test "$ac_cv_prog_gcc" = "yes"; then 
-    CFLAGS="$CFLAGS -Werror"
-  fi
-- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
--  [#include "confdefs.h"
--  ]
--  [[$1]]
--  [int main(int argc, const char *const *argv) {]
--  [[$2]]
--  [   return 0; }]])],
-+ AC_COMPILE_IFELSE(
-+  [AC_LANG_SOURCE(
-+   [#include "confdefs.h"
-+   ]
-+   [[$1]]
-+   [int main(int argc, const char *const *argv) {]
-+   [[$2]]
-+   [   return 0; }]
-+  )],
-   [$3], [$4])
-  CFLAGS=$apr_save_CFLAGS
- ])
diff --git a/net/freeswitch-stable/patches/370-procd-compat.patch b/net/freeswitch-stable/patches/370-procd-compat.patch
deleted file mode 100644 (file)
index 5bab0f2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/src/switch_console.c
-+++ b/src/switch_console.c
-@@ -1051,10 +1051,12 @@ static void *SWITCH_THREAD_FUNC console_
-       while (running) {
-               int32_t arg = 0;
--              if (getppid() == 1) {
--                      switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "We've become an orphan, no more console for us.\n");
--                      break;
--              }
-+              // Parent PID is 1 when started by procd - so FS is not an orphan.
-+              // Plus we still want the output.
-+              //if (getppid() == 1) {
-+              //      switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "We've become an orphan, no more console for us.\n");
-+              //      break;
-+              //}
-               switch_core_session_ctl(SCSC_CHECK_RUNNING, &arg);
-               if (!arg) {
diff --git a/net/freeswitch-stable/patches/380-disable-luajit.patch b/net/freeswitch-stable/patches/380-disable-luajit.patch
deleted file mode 100644 (file)
index f384b3a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -571,7 +571,7 @@ AC_SUBST(SYS_XMLRPC_CFLAGS)
- AC_SUBST(SYS_XMLRPC_LDFLAGS)
- AM_CONDITIONAL([SYSTEM_XMLRPCC],[test "${enable_xmlrpcc}" = "yes"])
--for luaversion in luajit lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua; do
-+for luaversion in lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua; do
-   PKG_CHECK_MODULES([LUA],[${luaversion}],[have_lua=yes],[have_lua=no])
-   if test ${have_lua} = yes; then
-     break
diff --git a/net/freeswitch-stable/patches/390-t38-reinvite-488-fix.patch b/net/freeswitch-stable/patches/390-t38-reinvite-488-fix.patch
deleted file mode 100644 (file)
index 3492936..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-commit 167294ea2649afd0ffedf4520b0f308979c3ca2a
-Author: Sebastian Kemper <sebastian_ml@gmx.net>
-Date:   Fri Oct 18 18:28:07 2019 +0200
-
-    [mod-sofia] Fix reINVITE after T38 is rejected
-    
-    From FS-11833.
-    
-    After FS sends a reINVITE to T38 which gets rejected by peer it is no
-    longer in a state where it can properly answer a reINVITE which requests
-    a change of the media setup.
-    
-    1. FS sends INVITE (destination is a fax machine)
-    2. Call connects with "8 101"
-    3. FS sends reINVITE to T38
-    4. T38 rejected (488)
-    5. FS receives INVITE to "8"
-    6. FS replies with 200 OK without SDP
-    7. Call fails
-    
-    The bug is related to TFLAG_SDP. This flag is set when a media session
-    is established. And when there's a reINVITE sofia_glue_do_invite() from
-    sofia_glue.c is called and clears the flag again:
-    
-    sofia_clear_flag_locked(tech_pvt, TFLAG_SDP);
-    
-    So when FS sends a reINVITE to T38 the flag gets cleared. But when the
-    reINVITE is rejected with 488 the flag is not set again. It stays
-    cleared. So the call continues with the previously negotiated media, fax
-    passthrough (8 101 in this case), but TFLAG_SDP is not set.
-    
-    So when FS receives a reINVITE at this point it doesn't see the need to
-    renegotiate anything, even though it realizes that 2833 DTMF is now off:
-    
-    2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5478 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
-    2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5533 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
-    2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5802 No 2833 in SDP. Disable 2833 dtmf and switch to INFO
-    
-    When FS doesn't send a reINVITE (fax_enable_t38_request=false) and the
-    reINVITE to "8" is received, TFLAG_SDP is still set and then FS
-    understands that it needs to renegotiate and replies with a 200 OK that
-    includes SDP:
-    
-    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5478 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
-    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5533 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
-    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5802 No 2833 in SDP. Disable 2833 dtmf and switch to INFO
-    2019-04-30 16:41:19.358028 [DEBUG] sofia.c:8237 skemper was here in line 8232
-    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:8390 skemper was here in line 8390.
-    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:8496 Audio params are unchanged for sofia/external/+called_number.
-    2019-04-30 16:41:19.358028 [DEBUG] sofia.c:8243 Processing updated SDP
-    
-    This fixes the state problem after a rejected T38 reINVITE by setting
-    TFLAG_SDP.
-    
-    Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
-
---- a/src/mod/endpoints/mod_sofia/sofia.c
-+++ b/src/mod/endpoints/mod_sofia/sofia.c
-@@ -6536,6 +6536,7 @@ static void sofia_handle_sip_r_invite(sw
-                       switch_channel_clear_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_REQ);
-                       switch_channel_set_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_FAIL);
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s T38 invite failed\n", switch_channel_get_name(tech_pvt->channel));
-+                      sofia_set_flag(tech_pvt, TFLAG_SDP);
-               }
diff --git a/net/freeswitch-stable/patches/400-disable-sofia-sip-tests.patch b/net/freeswitch-stable/patches/400-disable-sofia-sip-tests.patch
deleted file mode 100644 (file)
index 6e7891c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libs/sofia-sip/Makefile.am
-+++ b/libs/sofia-sip/Makefile.am
-@@ -7,7 +7,7 @@
- AUTOMAKE_OPTIONS = foreign 1.7
--SUBDIRS =  libsofia-sip-ua $(GLIB_SUBDIRS) packages tests s2check utils
-+SUBDIRS =  libsofia-sip-ua $(GLIB_SUBDIRS) packages # tests s2check utils
- DIST_SUBDIRS = s2check libsofia-sip-ua libsofia-sip-ua-glib utils packages \
-       tests win32 open_c
diff --git a/net/freeswitch/Config.in b/net/freeswitch/Config.in
new file mode 100644 (file)
index 0000000..8e200ef
--- /dev/null
@@ -0,0 +1,63 @@
+menu "Advanced configuration"
+       depends on PACKAGE_freeswitch-stable
+
+config FS_STABLE_WITH_DEBUG
+       bool "Compile with debug information"
+       default n
+       help
+         Enable extra debug codepaths, like asserts and extra output. If you
+         want to get meaningful backtraces see
+         https://wiki.openwrt.org/doc/devel/debugging for starting points.
+
+config FS_STABLE_WITH_FREETYPE
+       bool "Compile with FreeType support"
+       default y if x86_64
+       help
+         Add FreeType support to FreeSWITCH
+
+config FS_STABLE_WITH_LIBYUV
+       bool "Compile with libyuv support"
+       default y if x86_64
+       help
+         Add libyuv support to FreeSWITCH
+
+config FS_STABLE_WITH_ODBC
+       bool "Compile with ODBC support"
+       default y if x86_64
+       help
+         Enable ODBC support.
+
+config FS_STABLE_WITH_PNG
+       bool "Compile with PNG support"
+       default y if x86_64
+       help
+         Add PNG support to FreeSWITCH
+
+config FS_STABLE_WITH_SRTP
+       bool "Compile with SRTP support"
+       default y
+       help
+         Compile with SRTP support.
+
+config FS_STABLE_WITH_VPX
+       bool "Compile with VPx support"
+       depends on FS_STABLE_WITH_LIBYUV
+       default y if x86_64
+       help
+         Compile with VPx video codec support
+
+config FS_STABLE_WITH_ZRTP
+       bool "Compile with ZRTP support"
+       depends on aarch64||aarch64_be||arm||armeb||i386||mips||mips64||mips64el||mipsel||powerpc||powerpc64||powerpcle||sparc||x86_64
+       default y if x86_64
+       help
+         Compile with ZRTP support.
+
+config FS_STABLE_WITH_MODCONF
+       bool "Include module examples"
+       default y if x86_64
+       help
+         Some modules include examples in their source directory, e.g. xml
+         snippets. Select y to include them.
+
+endmenu
diff --git a/net/freeswitch/Makefile b/net/freeswitch/Makefile
new file mode 100644 (file)
index 0000000..b6b4bd8
--- /dev/null
@@ -0,0 +1,1094 @@
+#
+# Copyright (C) 2017 Sebastian Kemper <sebastian_ml@gmx.net>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PRG_NAME:=freeswitch
+PKG_NAME:=$(PRG_NAME)-stable
+PKG_VERSION:=1.10.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
+
+PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).-release.tar.xz
+PKG_SOURCE_URL:=https://files.$(PRG_NAME).org/releases/$(PRG_NAME)
+PKG_HASH:=2d7db07a64ee2f19f9b6e3a4ce76fa42e0fe46c29d95edf1b690a3df3729f307
+
+PKG_CPE_ID:=cpe:/a:freeswitch:freeswitch
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PRG_NAME)-$(PKG_VERSION).-release
+
+# configure in libs/spandsp fails without libjpeg and tiff
+PKG_BUILD_DEPENDS:= \
+       libjpeg \
+       tiff \
+       perl/host
+
+PKG_FIXUP:=autoreconf
+
+# With mod_ssml and mod_rayo enabled the parallel compiles always failed
+PKG_BUILD_PARALLEL:=0
+PKG_INSTALL:=1
+
+PKG_LICENSE:= \
+       AGPL-3.0 \
+       Apache-2.0 \
+       BSD-2-Clause \
+       BSD-3-Clause \
+       BSD-4-Clause \
+       BSD-like \
+       Beerware \
+       GPL-1.0+ \
+       GPL-2.0 \
+       GPL-2.0+ \
+       GPL-3.0 \
+       ISC \
+       LGPL-2.0+ \
+       LGPL-2.1 \
+       LGPL-2.1+ \
+       MIT/X11 (BSD like) \
+       MPL-1.1 \
+       OpenLDAP \
+       RSA-MD \
+       zlib-acknowledgement
+
+PKG_LICENSE_FILES:=debian/copyright
+
+FS_STABLE_DATA_DIR:=/usr/share/$(PRG_NAME)
+
+FS_STABLE_BIN_DIR:=/usr/bin
+FS_STABLE_EXAMPLES_DIR:=$(FS_STABLE_DATA_DIR)/examples
+FS_STABLE_FONTS_DIR:=$(FS_STABLE_DATA_DIR)/fonts
+FS_STABLE_GRAMMAR_DIR:=$(FS_STABLE_DATA_DIR)/grammar
+FS_STABLE_HTDOCS_DIR:=$(FS_STABLE_DATA_DIR)/htdocs
+FS_STABLE_IMAGES_DIR:=$(FS_STABLE_DATA_DIR)/images
+FS_STABLE_INCLUDES_DIR:=/usr/include/$(PRG_NAME)
+FS_STABLE_LANG_DIR:=$(FS_STABLE_DATA_DIR)/lang
+FS_STABLE_LIB_DIR:=/usr/lib
+FS_STABLE_MOD_DIR:=$(FS_STABLE_LIB_DIR)/$(PRG_NAME)/mod
+FS_STABLE_PKGCONFIG_DIR:=$(FS_STABLE_LIB_DIR)/pkgconfig
+FS_STABLE_SCRIPTS_DIR:=$(FS_STABLE_DATA_DIR)/scripts
+FS_STABLE_SOUNDS_DIR:=$(FS_STABLE_DATA_DIR)/sounds
+FS_STABLE_SYSCONF_DIR:=/etc
+FS_STABLE_TLS_DIR:=$(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)/tls
+FS_STABLE_TZ_DIR:=$(FS_STABLE_DATA_DIR)/tz
+
+FTDM:=freetdm
+PKG_LIBFTDM:=lib$(FTDM)-stable
+
+FS_STABLE_MOD_AVAILABLE:= \
+       abstraction \
+       alsa \
+       amr \
+       amrwb \
+       av \
+       avmd \
+       b64 \
+       basic \
+       bert \
+       blacklist \
+       callcenter \
+       cdr_csv \
+       cdr_mongodb \
+       cdr_pg_csv \
+       cdr_sqlite \
+       cidlookup \
+       clearmode \
+       cluechoo \
+       commands \
+       conference \
+       console \
+       curl \
+       dahdi_codec \
+       db \
+       dialplan_asterisk \
+       dialplan_directory \
+       dialplan_xml \
+       dingaling \
+       directory \
+       distributor \
+       dptools \
+       easyroute \
+       enum \
+       erlang_event \
+       esf \
+       esl \
+       event_multicast \
+       event_socket \
+       event_test \
+       event_zmq \
+       expr \
+       fail2ban \
+       fifo \
+       format_cdr \
+       $(FTDM) \
+       fsk \
+       fsv \
+       g723_1 \
+       g729 \
+       graylog2 \
+       gsmopen \
+       h26x \
+       hash \
+       hiredis \
+       httapi \
+       http_cache \
+       isac \
+       json_cdr \
+       kazoo \
+       lcr \
+       ldap \
+       local_stream \
+       logfile \
+       loopback \
+       lua \
+       mariadb \
+       mp4v \
+       native_file \
+       nibblebill \
+       odbc_cdr \
+       opus \
+       opusfile \
+       oreka \
+       perl \
+       pgsql \
+       png \
+       pocketsphinx \
+       portaudio \
+       portaudio_stream \
+       posix_timer \
+       prefix \
+       radius_cdr \
+       random \
+       raven \
+       rayo \
+       redis \
+       rss \
+       rtc \
+       rtmp \
+       say_de \
+       say_en \
+       say_es \
+       say_es_ar \
+       say_fa \
+       say_fr \
+       say_he \
+       say_hr \
+       say_hu \
+       say_it \
+       say_ja \
+       say_nl \
+       say_pl \
+       say_pt \
+       say_ru \
+       say_sv \
+       say_th \
+       say_zh \
+       shell_stream \
+       shout \
+       signalwire \
+       skinny \
+       sms \
+       snapshot \
+       sndfile \
+       snmp \
+       snom \
+       sofia \
+       sonar \
+       spandsp \
+       spy \
+       ssml \
+       stress \
+       syslog \
+       theora \
+       tone_stream \
+       translate \
+       tts_commandline \
+       unimrcp \
+       valet_parking \
+       verto \
+       video_filter \
+       vmd \
+       voicemail \
+       voicemail_ivr \
+       xml_cdr \
+       xml_curl \
+       xml_ldap \
+       xml_rpc \
+       xml_scgi \
+       yaml \
+       yuv
+
+PKG_CONFIG_DEPENDS:= \
+       $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(subst _,-,$(FS_STABLE_MOD_AVAILABLE))) \
+       CONFIG_FS_STABLE_WITH_DEBUG \
+       CONFIG_FS_STABLE_WITH_FREETYPE \
+       CONFIG_FS_STABLE_WITH_LIBYUV \
+       CONFIG_FS_STABLE_WITH_ODBC \
+       CONFIG_FS_STABLE_WITH_PNG \
+       CONFIG_FS_STABLE_WITH_SRTP \
+       CONFIG_FS_STABLE_WITH_VPX \
+       CONFIG_FS_STABLE_WITH_ZRTP \
+       CONFIG_LIBC \
+       CONFIG_PACKAGE_$(PKG_LIBFTDM) \
+       CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-libpri \
+       CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-pritap \
+       CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl \
+       CONFIG_SOFT_FLOAT
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+# iconv support
+include $(INCLUDE_DIR)/nls.mk
+#######################################################
+# mod_gsmopen can't detect if iconv's inbuf is const. #
+#                                                     #
+#                  musl    uclibc                     #
+# libiconv-stub    -       -                          #
+# libiconv-full    -       const                      #
+#                                                     #
+#######################################################
+ifeq ($(ICONV_FULL)$(CONFIG_USE_UCLIBC),1y)
+TARGET_CFLAGS+=-DFS_STABLE_ICONV_INBUF_CONST
+endif
+
+FS_STABLE_PERL_FEED:=$(TOPDIR)/feeds/packages/lang/perl
+
+include $(FS_STABLE_PERL_FEED)/perlver.mk
+
+PERL_SITELIB:=/usr/lib/perl$(PERL_MAJOR)/$(PERL_VERSION2)
+
+FS_STABLE_PERL_LIBS:=$(shell grep "^libs=" \
+       $(FS_STABLE_PERL_FEED)/files/base.config | \
+                       sed "s/^libs=//;s/'//g")
+
+define Download/files
+define Download/$(1)
+  FILE:=$(2)
+  URL:=$(3)
+  HASH:=$(4)
+endef
+$$(eval $$(call Download,$(1)))
+endef
+
+define Package/$(PKG_NAME)/install/bin
+       $(INSTALL_DIR) $(1)$(FS_STABLE_BIN_DIR)
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_BIN_DIR)/$(2) \
+                                       $(1)$(FS_STABLE_BIN_DIR)
+endef
+
+define Package/$(PKG_NAME)/install/dir
+       if [ -d $(2) ]; then $(INSTALL_DIR) $(1); fi
+       for dir in $$$$(shell [ -d $(2) ] && cd $(2) && $(FIND) -type d -print | sed 's|^./\?||'); \
+       do \
+               $(INSTALL_DIR) $(1)/$$$$$$$$dir; \
+       done
+       for file in $$$$(shell [ -d $(2) ] && cd $(2) && $(FIND) -type f -print | sed 's|^./||'); \
+       do \
+               $(INSTALL_DATA) $(2)/$$$$$$$$file $(1)/$$$$$$$$file; \
+       done
+endef
+
+define Package/$(PKG_LIBFTDM)/install/ftmod
+       $(INSTALL_DIR) $(1)$(FS_STABLE_MOD_DIR)
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_MOD_DIR)/ftmod_$(2).so \
+                                               $(1)$(FS_STABLE_MOD_DIR)
+endef
+
+define Package/$(PKG_NAME)/install/lib
+       $(INSTALL_DIR) $(1)$(FS_STABLE_LIB_DIR)
+       $(CP) $(PKG_INSTALL_DIR)$(FS_STABLE_LIB_DIR)/$(2).so.* \
+                                       $(1)$(FS_STABLE_LIB_DIR)
+endef
+
+define Package/$(PKG_NAME)/install/mod
+       $(INSTALL_DIR) $(1)$(FS_STABLE_MOD_DIR)
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_MOD_DIR)/mod_$(2).so \
+                                               $(1)$(FS_STABLE_MOD_DIR)
+endef
+
+define Package/$(PKG_NAME)/config
+       source "$(SOURCE)/Config.in"
+endef
+
+define Package/$(PKG_LIBFTDM)/Default
+  SECTION:=libs
+  CATEGORY:=Libraries
+  SUBMENU:=Telephony
+  URL:=https://www.$(PRG_NAME).org
+endef
+
+define Package/$(PKG_LIBFTDM)
+$(call Package/$(PKG_LIBFTDM)/Default)
+  DEPENDS:=
+  TITLE:=TDM signaling and media API
+  MENU:=1
+  URL:=https://www.$(PRG_NAME).org
+endef
+
+define Package/$(PKG_LIBFTDM)/description
+Provides a unified interface to hardware TDM cards and SS7 stacks.
+endef
+
+define Package/$(PKG_LIBFTDM)/install
+$(call Package/$(PKG_NAME)/install/lib,$(1),lib$(FTDM))
+endef
+
+define Package/$(PKG_LIBFTDM)/FTModule
+define Package/$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))
+$(call Package/$(PKG_LIBFTDM)/Default)
+  DEPENDS:=PACKAGE_$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1)):$(PKG_LIBFTDM) \
+         $(patsubst +%,+PACKAGE_$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1)):%,$(4))
+  TITLE:=$(2) FreeTDM module
+endef
+define Package/$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))/description
+$(subst \n,$(newline),$(3))
+endef
+define Package/$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))/install
+$(call Package/$(PKG_LIBFTDM)/install/ftmod,$$(1),$(1))
+endef
+$$(eval $$(call BuildPackage,$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))))
+endef
+
+define Package/$(PKG_NAME)/Default
+  SUBMENU:=Telephony
+  SECTION:=net
+  CATEGORY:=Network
+  URL:=https://www.$(PRG_NAME).org
+endef
+
+define Package/$(PKG_NAME)
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=Open source telephony platform, v$(PKG_VERSION)
+  MENU:=1
+  USERID:=$(PRG_NAME)=372:$(PRG_NAME)=372
+  DEPENDS:= \
+         $(CXX_DEPENDS) \
+         $(ICONV_DEPENDS) \
+         +!BUSYBOX_DEFAULT_SU:shadow-su \
+         +@OPENSSL_WITH_DEPRECATED \
+         +FS_STABLE_WITH_FREETYPE:libfreetype \
+         +FS_STABLE_WITH_ODBC:unixodbc \
+         +FS_STABLE_WITH_PNG:libpng \
+         +libcurl \
+         +libedit \
+         +libopenssl \
+         +libpcre \
+         +libpthread \
+         +librt \
+         +libspeex \
+         +libspeexdsp \
+         +libsqlite3 \
+         +libuuid \
+         +zlib
+  CONFLICTS:=$(PRG_NAME)
+endef
+
+define Package/$(PKG_NAME)/description
+FreeSWITCH is a scalable open source cross-platform telephony platform
+designed to route and interconnect popular communication protocols
+using audio, video, text or any other form of media.
+endef
+
+define Package/$(PKG_NAME)/conffiles
+$(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)
+$(FS_STABLE_SYSCONF_DIR)/config/$(PRG_NAME)
+$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
+endef
+
+define Package/$(PKG_NAME)/install
+$(call Package/$(PKG_NAME)/install/bin,$(1),$(PRG_NAME))
+$(call Package/$(PKG_NAME)/install/lib,$(1),lib$(PRG_NAME))
+       $(INSTALL_DIR) $(1)$(FS_STABLE_FONTS_DIR)
+       $(INSTALL_DIR) $(1)$(FS_STABLE_GRAMMAR_DIR)
+       $(INSTALL_DIR) $(1)$(FS_STABLE_HTDOCS_DIR)
+       $(INSTALL_DIR) $(1)$(FS_STABLE_IMAGES_DIR)
+       $(INSTALL_DIR) $(1)$(FS_STABLE_SCRIPTS_DIR)
+       $(INSTALL_DIR) $(1)$(FS_STABLE_SOUNDS_DIR)
+       $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/config
+       $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface
+       $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/init.d
+       $(INSTALL_DIR) $(1)$(FS_STABLE_TLS_DIR)
+       $(INSTALL_BIN) ./files/$(PRG_NAME).init \
+               $(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
+       $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \
+               $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface/90-$(PRG_NAME)
+       $(INSTALL_CONF) ./files/$(PRG_NAME).conf \
+               $(1)$(FS_STABLE_SYSCONF_DIR)/config/$(PRG_NAME)
+endef
+
+define Package/$(PKG_NAME)/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+  echo
+  echo "o-------------------------------------------------------------------o"
+  echo "| FreeSWITCH note                                                   |"
+  echo "o-------------------------------------------------------------------o"
+  echo "| Edit /etc/config/freeswitch to change basic init configuration.   |"
+  echo "|                                                                   |"
+  echo "| Also visit the Wiki at:                                           |"
+  echo "| https://openwrt.org/docs/guide-user/services/voip/freeswitch      |"
+  echo "o-------------------------------------------------------------=^_^=-o"
+  echo
+fi
+exit 0
+endef
+
+define Package/$(PKG_NAME)-misc-perl-esl
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=Perl ESL
+  DEPENDS:=$(PKG_NAME) \
+         +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-autoloader \
+         +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-data \
+         +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-dynaloader \
+         @PERL_THREADS
+endef
+
+define Package/$(PKG_NAME)-misc-perl-esl/description
+This package contains the Perl binding for FreeSWITCH's Event Socket
+Library (ESL).
+endef
+
+define Package/$(PKG_NAME)-misc-perl-esl/install
+       $(INSTALL_DIR) $(1)$(PERL_SITELIB)/ESL
+       $(INSTALL_DIR) $(1)$(PERL_SITELIB)/auto/ESL
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL.so \
+                                       $(1)$(PERL_SITELIB)/auto/ESL
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL.pm \
+                                       $(1)$(PERL_SITELIB)
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL/Dispatch.pm \
+                                       $(1)$(PERL_SITELIB)/ESL
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL/IVR.pm \
+                                       $(1)$(PERL_SITELIB)/ESL
+endef
+
+define Package/$(PKG_NAME)-misc-timezones
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=Timezones file
+  DEPENDS:=$(PKG_NAME)
+  PKGARCH:=all
+endef
+
+define Package/$(PKG_NAME)-misc-timezones/description
+This package includes a timezones file for FreeSWITCH.
+endef
+
+define Package/$(PKG_NAME)-misc-timezones/install
+       $(INSTALL_DIR) $(1)$(FS_STABLE_TZ_DIR)
+       $(INSTALL_DATA) \
+       $(PKG_BUILD_DIR)/conf/vanilla/autoload_configs/timezones.conf.xml \
+                                               $(1)$(FS_STABLE_TZ_DIR)
+endef
+
+define Package/$(PKG_NAME)/Example
+define Package/$(PKG_NAME)-example-$(subst _,-,$(1))
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=Example configuration
+  DEPENDS:=$(PKG_NAME)
+  PKGARCH:=all
+endef
+define Package/$(PKG_NAME)-example-$(subst _,-,$(1))/description
+This package does not install any configuration for FreeSWITCH into
+/etc/freeswitch. The system administrator is completely responsible
+for that directory. If you install one of the example configuration
+packages, it will install the corresponding sample configuration to
+/usr/share/freeswitch/examples where you can take a look at it.
+endef
+define Package/$(PKG_NAME)-example-$(subst _,-,$(1))/install
+$(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_EXAMPLES_DIR)/$(1),$(PKG_BUILD_DIR)/conf/$(1))
+endef
+$$(eval $$(call BuildPackage,$(PKG_NAME)-example-$(subst _,-,$(1))))
+endef
+
+define Package/$(PKG_NAME)/Language
+define Package/$(PKG_NAME)-lang-$(subst _,-,$(1))
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=$(2) language files
+  DEPENDS:=$(PKG_NAME)
+  PKGARCH:=all
+endef
+define Package/$(PKG_NAME)-lang-$(subst _,-,$(1))/description
+This package includes the $(2) language files for FreeSWITCH.
+endef
+define Package/$(PKG_NAME)-lang-$(subst _,-,$(1))/install
+$(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_LANG_DIR)/$(1),$(PKG_BUILD_DIR)/conf/vanilla/lang/$(1))
+endef
+$$(eval $$(call BuildPackage,$(PKG_NAME)-lang-$(subst _,-,$(1))))
+endef
+
+# The next package generator is for miscellaneous files that only
+# require being copied from PKG_INSTALL_DIR to the ipkg.
+define Package/$(PKG_NAME)/Misc
+define Package/$(PKG_NAME)-$(subst _,-,$(1))
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=$(2)
+  DEPENDS:=$(PKG_NAME)
+  ifeq ($(6),y)
+  PKGARCH:=all
+  endif
+endef
+define Package/$(PKG_NAME)-$(subst _,-,$(1))/description
+$(subst \n,$(newline),$(3))
+endef
+define Package/$(PKG_NAME)-$(subst _,-,$(1))/install
+$(call Package/$(PKG_NAME)/install/dir,$$(1)$(5),$(PKG_INSTALL_DIR)$(4))
+endef
+$$(eval $$(call BuildPackage,$(PKG_NAME)-$(subst _,-,$(1))))
+endef
+
+define Package/$(PKG_NAME)/Module
+define Package/$(PKG_NAME)-mod-$(subst _,-,$(1))
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=$(2) module
+  DEPENDS:=$(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-mod-$(subst _,-,$(1)):%,$(4))
+endef
+define Package/$(PKG_NAME)-mod-$(subst _,-,$(1))/description
+$(subst \n,$(newline),$(3))
+endef
+define Package/$(PKG_NAME)-mod-$(subst _,-,$(1))/install
+$(call Package/$(PKG_NAME)/install/mod,$$(1),$(1))
+ifeq ($(CONFIG_FS_STABLE_WITH_MODCONF),y)
+$(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_EXAMPLES_DIR)/mod_$(1),$(PKG_BUILD_DIR)/src/mod/*/mod_$(1)/conf)
+endif
+ifeq ($(1),perl)
+       $(INSTALL_DIR) $$(1)$(PERL_SITELIB)/auto/$(PRG_NAME)
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/perl/$(PRG_NAME).so \
+                                       $$(1)$(PERL_SITELIB)/auto/$(PRG_NAME)
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/perl/$(PRG_NAME).pm \
+                                                       $$(1)$(PERL_SITELIB)
+endif
+endef
+$$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(subst _,-,$(1))))
+endef
+
+define Package/$(PKG_NAME)/Util
+define Package/$(PKG_NAME)-util-$(subst _,-,$(1))
+$(call Package/$(PKG_NAME)/Default)
+  TITLE:=$(2) utility
+  DEPENDS:=$(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-util-$(subst _,-,$(1)):%,$(4))
+  ifeq ($(5),y)
+  PKGARCH:=all
+  endif
+endef
+define Package/$(PKG_NAME)-util-$(subst _,-,$(1))/description
+$(subst \n,$(newline),$(3))
+endef
+define Package/$(PKG_NAME)-util-$(subst _,-,$(1))/install
+$(call Package/$(PKG_NAME)/install/bin,$$(1),$(1))
+endef
+$$(eval $$(call BuildPackage,$(PKG_NAME)-util-$(subst _,-,$(1))))
+endef
+
+CONFIGURE_ARGS+= \
+       --srcdir=$(PKG_BUILD_DIR) \
+       --disable-dependency-tracking \
+       --disable-static \
+       --disable-system-xmlrpc-c \
+       --enable-core-libedit-support \
+       --enable-fhs \
+       --with-cachedir=/tmp/$(PRG_NAME)/cache \
+       --with-dbdir=/tmp/$(PRG_NAME)/db \
+       --with-imagesdir=$(FS_STABLE_IMAGES_DIR) \
+       --with-logfiledir=/tmp/$(PRG_NAME)/log \
+       --with-python=no \
+       --with-recordingsdir=/tmp/$(PRG_NAME)/recordings \
+       --with-storagedir=/tmp/$(PRG_NAME)/storage \
+       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_DEBUG,debug) \
+       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_LIBYUV,libyuv) \
+       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ODBC,core-odbc-support) \
+       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_SRTP,srtp) \
+       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_VPX,libvpx) \
+       $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ZRTP,zrtp) \
+       $(if $(CONFIG_FS_STABLE_WITH_FREETYPE),,--without-freetype) \
+       $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)$(FS_STABLE_LIB_DIR)") \
+       $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
+       $(if $(CONFIG_FS_STABLE_WITH_PNG),,--without-png) \
+       $(if $(CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \
+       $(if $(CONFIG_PACKAGE_$(PKG_LIBFTDM)-ftmod-pritap),--with-pritap,--without-pritap)
+
+ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang-event)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-kazoo),)
+CONFIGURE_ARGS+= \
+       --with-erlang=no
+endif
+
+# Make mod_spandsp use fixed point math when soft float support is
+# enabled on target devices.
+ifeq ($(CONFIG_SOFT_FLOAT),y)
+CONFIGURE_ARGS+= \
+       --enable-fixed-point
+endif
+
+# FreeSWITCH dropped postgresql support from the core. postgresql
+# support is now available via mod_pgsql. We still need to pass
+# '--without-pgsql', otherwise apr-util links to libpq and we still
+# would have the core link to it.
+CONFIGURE_ARGS+= \
+       --without-pgsql
+
+# Don't want host-php
+CONFIGURE_VARS+= \
+       ac_cv_have_php=no \
+       ac_cv_have_php_config=no \
+       ac_cv_prog_PHP=false \
+       ac_cv_prog_PHP_CONFIG=false
+
+# The autoconf variables in this block are OK for both musl and glibc
+CONFIGURE_VARS+= \
+       ac_cv_dev_urandom=yes \
+       ac_cv_file__dev_ptmx=yes \
+       ac_cv_file__dev_urandom=yes \
+       ac_cv_file_dbd_apr_dbd_mysql_c=no \
+       ac_cv_free_null=yes \
+       ac_cv_func_mmap_fixed_mapped=yes \
+       ac_cv_func_pthread_rwlock_init=yes \
+       ac_cv_func_sem_open=yes \
+       ac_cv_have_working_memmove=yes \
+       ac_cv_negative_eai=yes \
+       ac_cv_o_nonblock_inherited=no \
+       ac_cv_struct_rlimit=yes \
+       apr_cv_epoll=yes \
+       apr_cv_gai_addrconfig=yes \
+       apr_cv_mutex_recursive=yes \
+       apr_cv_process_shared_works=yes \
+       apr_cv_pthreads_lib=-lpthread \
+       apr_cv_tcp_nodelay_with_cork=yes \
+       apr_cv_type_rwlock_t=yes
+
+# fs_cli
+CONFIGURE_VARS+= \
+       disable_cc=yes
+
+# Regarding apr_cv_mutex_robust_shared=no see
+# http://www.openwall.com/lists/musl/2016/11/26/1
+ifeq ($(call qstrip,$(CONFIG_LIBC)),musl)
+CONFIGURE_VARS+= \
+       apr_cv_mutex_robust_shared=no \
+       ac_cv_strerror_r_rc_int=yes
+else
+CONFIGURE_VARS+= \
+       apr_cv_mutex_robust_shared=yes
+endif
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),)
+CONFIGURE_VARS+= \
+       PERL="$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION)" \
+       PERL_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -I$(STAGING_DIR)$(PERL_SITELIB)/CORE" \
+       PERL_INC="-I$(STAGING_DIR)$(PERL_SITELIB)/CORE" \
+       PERL_LDFLAGS="-Wl,-rpath,$(PERL_SITELIB)/CORE -L$(STAGING_DIR)$(PERL_SITELIB)/CORE -lperl" \
+       PERL_LIBDIR="-L$(PERL_SITELIB)/CORE" \
+       PERL_LIBS="$(FS_STABLE_PERL_LIBS) $(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%)" \
+       PERL_SITEDIR="$(PERL_SITELIB)"
+else
+CONFIGURE_VARS+= \
+       ac_cv_have_perl=no \
+       ac_cv_prog_PERL=false
+endif
+
+# mod_radius_cdr runs configure in libs/freeradius-client. Let
+# freeradius-client know /dev/urandom is available on target devices.
+MAKE_VARS+= \
+       ac_cv_dev_urandom=yes
+
+# Make sphinxbase use fixed point math when soft float support is
+# enabled on target devices.
+ifeq ($(CONFIG_SOFT_FLOAT),y)
+MAKE_VARS+= \
+       FS_STABLE_USE_FIXED_POINT="--enable-fixed"
+endif
+
+# Some common URLs
+FS_STABLE_LIBS_URL:=https://files.$(PRG_NAME).org/downloads/libs
+FS_STABLE_SPHINX_URL:=@SF/cmusphinx
+
+# mod_event_zmq
+FS_STABLE_ZEROMQ_FILE:=zeromq-2.1.9.tar.gz
+FS_STABLE_ZEROMQ_HASH:=f3542f756687e622beef3a75c8e027fe2d95d4654350cbca4c070ffc58d9ace0
+FS_STABLE_ZEROMQ_URL:=http://download.zeromq.org
+
+# mod_pocketsphinx
+FS_STABLE_POCKETSPHINX_FILE:=pocketsphinx-0.8.tar.gz
+FS_STABLE_POCKETSPHINX_HASH:=874c4c083d91c8ff26a2aec250b689e537912ff728923c141c4dac48662cce7a
+
+FS_STABLE_SPHINXBASE_FILE:=sphinxbase-0.8.tar.gz
+FS_STABLE_SPHINXBASE_HASH:=55708944872bab1015b8ae07b379bf463764f469163a8fd114cbb16c5e486ca8
+
+FS_STABLE_SPHINXMODEL_FILE:=communicator_semi_6000_20080321.tar.gz
+FS_STABLE_SPHINXMODEL_HASH:=dbb5e9fb85000a7cb97d6958a3ef8d77532dc55fc730ac6979705e8645cb0c18
+
+# mod_radius_cdr
+FS_STABLE_FREERADIUS_CLIENT_FILE:=freeradius-client-1.1.7.tar.gz
+FS_STABLE_FREERADIUS_CLIENT_HASH:=eada2861b8f4928e3ac6b5bbfe11e92cd6cdcacfce40cae1085e77c1b6add0e9
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
+$(eval $(call Download/files,zmq,$(FS_STABLE_ZEROMQ_FILE),$(FS_STABLE_ZEROMQ_URL),$(FS_STABLE_ZEROMQ_HASH)))
+endif
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx)$(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
+$(eval $(call Download/files,pocketsphinx,$(FS_STABLE_POCKETSPHINX_FILE),$(FS_STABLE_SPHINX_URL),$(FS_STABLE_POCKETSPHINX_HASH)))
+$(eval $(call Download/files,sphinxbase,$(FS_STABLE_SPHINXBASE_FILE),$(FS_STABLE_SPHINX_URL),$(FS_STABLE_SPHINXBASE_HASH)))
+$(eval $(call Download/files,communicator,$(FS_STABLE_SPHINXMODEL_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_SPHINXMODEL_HASH)))
+endif
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius-cdr),)
+$(eval $(call Download/files,freeradius-client,$(FS_STABLE_FREERADIUS_CLIENT_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_FREERADIUS_CLIENT_HASH)))
+endif
+
+# Need to update LDFLAGS for libs/unimrcp, otherwise it will try to link to a
+# different apr/apr-util if found.
+# FS_STABLE_ANCHOR: string in build/acmacros/apr.m4 that will be replaced
+FS_STABLE_ANCHOR:=dnl Get build information from APR
+FS_STABLE_APR_LIBS:=-L$(PKG_BUILD_DIR)/libs/apr -L$(PKG_BUILD_DIR)/libs/apr-util
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+
+       echo '#applications/mod_random' >> $(PKG_BUILD_DIR)/modules.conf
+       echo '#codecs/mod_yuv' >> $(PKG_BUILD_DIR)/modules.conf
+       echo '#event_handlers/mod_event_test' >> $(PKG_BUILD_DIR)/modules.conf
+
+       $(SED) 's|$(FS_STABLE_ANCHOR)|APR_SETVAR(LDFLAGS,[$(FS_STABLE_APR_LIBS) $(TARGET_LDFLAGS)])|' \
+               $(PKG_BUILD_DIR)/libs/unimrcp/build/acmacros/apr.m4
+endef
+
+define Build/Configure
+       $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/modules.conf
+       $(foreach m,$(FS_STABLE_MOD_AVAILABLE),
+               $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(subst _,-,$(m))),
+               $(SED) '/mod_$(m)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
+
+# Hack for misc-grammar - needs mod_pocketsphinx to provide grammar files
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
+ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx),)
+       $(SED) '/mod_pocketsphinx$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
+endif
+endif
+
+# Hack for mod_gsmopen - it has a build-time dep on mod_spandsp
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-gsmopen),)
+ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp),)
+       $(SED) '/mod_spandsp$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
+endif
+endif
+
+# Hack for mod_unimrcp - it has a build-time dep on mod_sofia
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-unimrcp),)
+ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-sofia),)
+       $(SED) '/mod_sofia$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
+endif
+endif
+
+       $(call Build/Configure/Default)
+endef
+
+define Build/Compile
+# Copy some source files if certain modules are selected
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
+       $(CP) $(DL_DIR)/$(FS_STABLE_ZEROMQ_FILE) $(PKG_BUILD_DIR)/libs
+endif
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx)$(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
+       $(CP) $(DL_DIR)/$(FS_STABLE_POCKETSPHINX_FILE) $(PKG_BUILD_DIR)/libs
+       $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXBASE_FILE) $(PKG_BUILD_DIR)/libs
+       $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXMODEL_FILE) $(PKG_BUILD_DIR)/libs
+endif
+
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius-cdr),)
+       $(CP) $(DL_DIR)/$(FS_STABLE_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
+endif
+
+# Compile FreeTDM first
+ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
+       $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM))
+endif
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),)
+       $(call Build/Compile/Default)
+endif
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
+       $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod)
+endif
+endef
+
+define Build/Install
+# Again, FreeTDM first
+ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
+       $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM) install)
+endif
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),)
+       $(call Build/Install/Default)
+endif
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
+       $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install)
+endif
+endef
+
+define Build/InstallDev/$(PKG_LIBFTDM)
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(FTDM).pc \
+                                               $(1)$(FS_STABLE_PKGCONFIG_DIR)
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
+endef
+
+define Build/InstallDev/$(PKG_NAME)
+       $(INSTALL_DIR) $(1)$(FS_STABLE_INCLUDES_DIR)
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(FS_STABLE_INCLUDES_DIR)/*.h \
+                                               $(1)$(FS_STABLE_INCLUDES_DIR)
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(PRG_NAME).pc \
+                                               $(1)$(FS_STABLE_PKGCONFIG_DIR)
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)$(FS_STABLE_PKGCONFIG_DIR)
+ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
+       $(call Build/InstallDev/$(PKG_LIBFTDM),$(1))
+endif
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)),)
+       $(call Build/InstallDev/$(PKG_NAME),$(1))
+endif
+endef
+
+$(eval $(call BuildPackage,$(PKG_LIBFTDM)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl))
+$(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones))
+
+################################
+# FreeSWITCH example configs
+# Params:
+# 1 - Package subname
+################################
+
+$(eval $(call Package/$(PKG_NAME)/Example,curl))
+$(eval $(call Package/$(PKG_NAME)/Example,insideout))
+$(eval $(call Package/$(PKG_NAME)/Example,minimal))
+$(eval $(call Package/$(PKG_NAME)/Example,rayo))
+$(eval $(call Package/$(PKG_NAME)/Example,sbc))
+$(eval $(call Package/$(PKG_NAME)/Example,softphone))
+$(eval $(call Package/$(PKG_NAME)/Example,testing))
+$(eval $(call Package/$(PKG_NAME)/Example,vanilla))
+
+################################
+# FreeTDM modules
+# Params:
+# 1 - Package subname
+# 2 - Package title
+# 3 - Module description
+# 4 - Module dependencies
+################################
+
+$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,analog,Analog,Offers generic FXO/FXS support for any type of card supported by FreeTDM.,))
+$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,analog_em,Analog EM,Offers generic E&M signaling for any type of card supported by FreeTDM.,))
+$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,libpri,LibPRI,Offers support for PRI lines using the open source libpri stack for any\ntype of card supported by FreeTDM. Supports both PRI and BRI signalling.,+libpri @!aarch64))
+$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,pritap,PRI tapping,This module is used to tap PRI lines.,+$(PKG_LIBFTDM)-ftmod-libpri))
+$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,skel,Skeleton,ftmod_skel is an example module.,))
+$(eval $(call Package/$(PKG_LIBFTDM)/FTModule,zt,DAHDI I/O,This module supports the DAHDI interface. The DAHDI interface is used by\nseveral hardware vendors.,))
+
+################################
+# FreeSWITCH language files
+# Params:
+# 1 - Language code
+# 2 - Language
+################################
+
+$(eval $(call Package/$(PKG_NAME)/Language,de,German))
+$(eval $(call Package/$(PKG_NAME)/Language,en,English))
+$(eval $(call Package/$(PKG_NAME)/Language,es,Spanish))
+$(eval $(call Package/$(PKG_NAME)/Language,fr,French))
+$(eval $(call Package/$(PKG_NAME)/Language,he,Hebrew))
+$(eval $(call Package/$(PKG_NAME)/Language,pt,Portuguese))
+$(eval $(call Package/$(PKG_NAME)/Language,ru,Russian))
+$(eval $(call Package/$(PKG_NAME)/Language,sv,Swedish))
+
+################################
+# FreeSWITCH misc packages
+# Params:
+# 1 - Package subname
+# 2 - Package title
+# 3 - Package description
+# 4 - Source dir relative to
+#     PKG_INSTALL_DIR
+# 5 - Dest dir relative to ipkg
+# 6 - Arch independent files
+################################
+
+$(eval $(call Package/$(PKG_NAME)/Misc,misc-fonts,Fonts,This package includes the fonts bundled with FreeSWITCH.,$(FS_STABLE_FONTS_DIR),$(FS_STABLE_FONTS_DIR),y))
+$(eval $(call Package/$(PKG_NAME)/Misc,misc-grammar,Grammar,This package contains grammar files. mod_pocketsphinx would be a\npotential user.,$(FS_STABLE_GRAMMAR_DIR),$(FS_STABLE_GRAMMAR_DIR),y))
+$(eval $(call Package/$(PKG_NAME)/Misc,misc-images,Images,This package includes the images bundled with FreeSWITCH.,$(FS_STABLE_IMAGES_DIR),$(FS_STABLE_IMAGES_DIR),y))
+
+################################
+# FreeSWITCH modules
+# Params:
+# 1 - Package subname
+# 2 - Package title
+# 3 - Module description
+# 4 - Module dependencies
+################################
+
+$(eval $(call Package/$(PKG_NAME)/Module,abstraction,API abstraction,This module provides a way to create new API functions via regex\nrewriting.,))
+$(eval $(call Package/$(PKG_NAME)/Module,alsa,ALSA endpoint,ALSA endpoint module.,+alsa-lib))
+$(eval $(call Package/$(PKG_NAME)/Module,amr,AMR passthrough,Passthrough AMR codec support.,))
+$(eval $(call Package/$(PKG_NAME)/Module,amrwb,AMR wideband passthrough,Passthrough AMR wideband codec support.,))
+$(eval $(call Package/$(PKG_NAME)/Module,av,AV,Video codec and format support via FFmpeg.,+libffmpeg-full @x86_64))
+$(eval $(call Package/$(PKG_NAME)/Module,avmd,Voicemail detection,This module attempts to determine when a voicemail system has answered\nthe call.,))
+$(eval $(call Package/$(PKG_NAME)/Module,b64,Base64,Transfers data Base64 encoded.,))
+$(eval $(call Package/$(PKG_NAME)/Module,basic,BASIC,BASIC module for FreeSWITCH.,))
+$(eval $(call Package/$(PKG_NAME)/Module,bert,BERT,Line testing tool.,))
+$(eval $(call Package/$(PKG_NAME)/Module,blacklist,Blacklist helper,This module provides tools to blacklist callers.,))
+$(eval $(call Package/$(PKG_NAME)/Module,callcenter,Call center,This module implements Automated Call Distribution queues.,))
+$(eval $(call Package/$(PKG_NAME)/Module,cdr_csv,CSV CDR,CSV Call Detail Record handler.,))
+$(eval $(call Package/$(PKG_NAME)/Module,cdr_mongodb,MongoDB CDR,MongoDB Call Detail Record handler.,))
+$(eval $(call Package/$(PKG_NAME)/Module,cdr_pg_csv,PostgreSQL CDR,PostgreSQL Call Detail Record handler.,+libpq))
+$(eval $(call Package/$(PKG_NAME)/Module,cdr_sqlite,SQLite CDR,SQLite Call Detail Record handler.,))
+$(eval $(call Package/$(PKG_NAME)/Module,cidlookup,Caller ID lookup,This module provides an API for querying caller ID name and location\ndata.,))
+$(eval $(call Package/$(PKG_NAME)/Module,clearmode,Clearmode,Clearmode codec passthrough support.,))
+$(eval $(call Package/$(PKG_NAME)/Module,cluechoo,Clue Choo,This demo module renders a Clue Choo train on the FreeSWITCH console.,+libncurses))
+$(eval $(call Package/$(PKG_NAME)/Module,commands,Commands,This module provides miscellaneous API commands.,))
+$(eval $(call Package/$(PKG_NAME)/Module,conference,Conference,This module provides multi-party conferencing.,))
+$(eval $(call Package/$(PKG_NAME)/Module,console,Console logger,Allows control over what messages get logged to the console.,))
+$(eval $(call Package/$(PKG_NAME)/Module,curl,cURL,This module provides an API for making HTTP requests with cURL.,))
+$(eval $(call Package/$(PKG_NAME)/Module,dahdi_codec,DAHDI codec,DAHDI codec module.,))
+$(eval $(call Package/$(PKG_NAME)/Module,db,DB,This module implements a simple db API with group support. Also can be\nused as a limit db backend.,))
+$(eval $(call Package/$(PKG_NAME)/Module,dialplan_asterisk,Asterisk dialplan,Asterisk extensions.conf style dialplan parser.,))
+$(eval $(call Package/$(PKG_NAME)/Module,dialplan_directory,Directory dialplan,Directory dialplan support.,))
+$(eval $(call Package/$(PKG_NAME)/Module,dialplan_xml,XML dialplan,Standard FreeSWITCH XML dialplan support.,))
+$(eval $(call Package/$(PKG_NAME)/Module,dingaling,Generic XMPP,Allows FreeSWITCH to be used as a client for XMPP Servers.,))
+$(eval $(call Package/$(PKG_NAME)/Module,directory,Dial-by-name directory,This module implements a dial-by-name directory IVR.,))
+$(eval $(call Package/$(PKG_NAME)/Module,distributor,Load distributor,This module implements a mechanism for performing load balancing.,))
+$(eval $(call Package/$(PKG_NAME)/Module,dptools,Dialplan tools,This module implements basic dialplan tools.,))
+$(eval $(call Package/$(PKG_NAME)/Module,easyroute,DID routing,This module does destination lookup based on DID.,))
+$(eval $(call Package/$(PKG_NAME)/Module,enum,ENUM routing,This module implements ENUM support.,+libldns))
+$(eval $(call Package/$(PKG_NAME)/Module,erlang_event,Erlang event,Erlang event module.,+erlang))
+$(eval $(call Package/$(PKG_NAME)/Module,esf,Multicast,This module adds multi-cast support.,))
+$(eval $(call Package/$(PKG_NAME)/Module,esl,Single ESL,This module adds an API for generating one-off ESL requests.,))
+$(eval $(call Package/$(PKG_NAME)/Module,event_multicast,Multicast Event,Multicast Event System for FreeSWITCH.,))
+$(eval $(call Package/$(PKG_NAME)/Module,event_socket,Event socket,Sends events via a single socket. Needed for fs_cli.,))
+$(eval $(call Package/$(PKG_NAME)/Module,event_test,Event test,Event demo module.,))
+$(eval $(call Package/$(PKG_NAME)/Module,event_zmq,ZMQ event,ZMQ event module.,@!USE_UCLIBCXX))
+$(eval $(call Package/$(PKG_NAME)/Module,expr,Expr,This module adds expr support for expression evaluation.,))
+$(eval $(call Package/$(PKG_NAME)/Module,fail2ban,Fail2ban logging,Provides support for Fail2ban logging.,))
+$(eval $(call Package/$(PKG_NAME)/Module,fifo,FIFO,This module adds a first-in first-out queue system.,))
+$(eval $(call Package/$(PKG_NAME)/Module,format_cdr,Multiformat CDR,A superset of mod_json_cdr and mod_xml_cdr.,))
+$(eval $(call Package/$(PKG_NAME)/Module,$(FTDM),FreeTDM endpoint,This module is the glue between FreeSWITCH and FreeTDM.,+$(PKG_LIBFTDM)))
+$(eval $(call Package/$(PKG_NAME)/Module,fsk,FSK,This module adds frequency-shift keying support which can be used to\nsend and receive caller ID.,))
+$(eval $(call Package/$(PKG_NAME)/Module,fsv,FSV,This module provides dialplan applications for recording and playing\nvideos.,))
+$(eval $(call Package/$(PKG_NAME)/Module,g723_1,G.723.1 passthrough,G.723.1 codec passthrough.,))
+$(eval $(call Package/$(PKG_NAME)/Module,g729,G.729 passthrough,G.729 codec passthrough.,))
+$(eval $(call Package/$(PKG_NAME)/Module,graylog2,Graylog2 logger,GELF logger for Graylog2 and Logstash.,))
+$(eval $(call Package/$(PKG_NAME)/Module,gsmopen,GSM endpoint,GSMopen is a channel driver that allows an SMS to be sent to and from\nFreeSWITCH as well as incoming and outgoing GSM voice calls.,+gsmlib +libctb +libjpeg +libtiff))
+$(eval $(call Package/$(PKG_NAME)/Module,h26x,H.26x passthrough,H.26x video codec passthrough.,))
+$(eval $(call Package/$(PKG_NAME)/Module,hash,Hash,This module provides a key-value in-memory datastore. Usable as a\nlimit backend.,))
+$(eval $(call Package/$(PKG_NAME)/Module,hiredis,Redis client,This module provides a mechanism to use Redis as a datastore.,+libhiredis))
+$(eval $(call Package/$(PKG_NAME)/Module,httapi,HT-TAPI,This module provides an API for controlling the switch by responding\nto HTTP requests.,))
+$(eval $(call Package/$(PKG_NAME)/Module,http_cache,HTTP GET with caching,This module provides an API for making HTTP GET requests where the\nresult is cached.,))
+$(eval $(call Package/$(PKG_NAME)/Module,isac,iSAC,iSAC codec support.,@arm||i386||mips||mips64||mips64el||mipsel||x86_64))
+$(eval $(call Package/$(PKG_NAME)/Module,json_cdr,JSON CDR,JSON-based Call Detail Record handler.,))
+$(eval $(call Package/$(PKG_NAME)/Module,kazoo,Kazoo,Kazoo module for FreeSWITCH.,+erlang))
+$(eval $(call Package/$(PKG_NAME)/Module,lcr,LCR,This module adds a facility for least-cost routing.,))
+$(eval $(call Package/$(PKG_NAME)/Module,ldap,LDAP,LDAP module for FreeSWITCH.,+libopenldap))
+$(eval $(call Package/$(PKG_NAME)/Module,local_stream,Local stream,Connects multiple channels to a looped stream.,))
+$(eval $(call Package/$(PKG_NAME)/Module,logfile,File logger,Logs FreeSWITCH output to a file.,))
+$(eval $(call Package/$(PKG_NAME)/Module,loopback,Loopback,A loopback channel driver.,))
+$(eval $(call Package/$(PKG_NAME)/Module,lua,Lua,Lua language interface for FreeSWITCH.,+liblua))
+$(eval $(call Package/$(PKG_NAME)/Module,mariadb,MariaDB,Adds MariaDB support.,+libmariadb @!USE_UCLIBCXX))
+$(eval $(call Package/$(PKG_NAME)/Module,mp4v,MP4 video passthrough,MP4 video passthrough.,))
+$(eval $(call Package/$(PKG_NAME)/Module,native_file,Native file,Plays files that are already encoded in the right format.,))
+$(eval $(call Package/$(PKG_NAME)/Module,nibblebill,Nibblebill,This module allows for real-time accounting of a cash balance and\nusing that information for call routing.,))
+$(eval $(call Package/$(PKG_NAME)/Module,odbc_cdr,ODBC CDR,ODBC Call Detail Record handler.,))
+$(eval $(call Package/$(PKG_NAME)/Module,opus,Opus,Opus codec support.,+libopus))
+$(eval $(call Package/$(PKG_NAME)/Module,opusfile,Opus file,Read and Write OGG/Opus files.,+libopusenc +libopusfile))
+$(eval $(call Package/$(PKG_NAME)/Module,oreka,Oreka,This module provides media recording with the Oreka cross-platform\naudio stream recording and retrieval system.,))
+$(eval $(call Package/$(PKG_NAME)/Module,perl,Perl,This package contains mod_perl for FreeSWITCH.,+libdb47 +libgdbm +perlbase-essential @PERL_THREADS))
+$(eval $(call Package/$(PKG_NAME)/Module,pgsql,PostgreSQL,Adds PostgreSQL support.,+libpq))
+$(eval $(call Package/$(PKG_NAME)/Module,png,PNG,Allows playback of video using PNG files.,@FS_STABLE_WITH_PNG))
+$(eval $(call Package/$(PKG_NAME)/Module,pocketsphinx,Pocketsphinx,This module allows speech recognition. You might want to install\n$(PKG_NAME)-misc-grammar as well.,+libsamplerate)) # When libsamplerate is found it'll be linked against, there is no switch to turn it off
+$(eval $(call Package/$(PKG_NAME)/Module,portaudio,Portaudio,Voice through a local soundcard.,+portaudio))
+$(eval $(call Package/$(PKG_NAME)/Module,portaudio_stream,Portaudio streaming,Stream from an external audio source for Music on Hold.,+portaudio))
+$(eval $(call Package/$(PKG_NAME)/Module,posix_timer,POSIX timer,Add POSIX timer support.,))
+$(eval $(call Package/$(PKG_NAME)/Module,prefix,Prefix match,This module provides a data store with fast lookups by the longest\nprefix match rule.,))
+$(eval $(call Package/$(PKG_NAME)/Module,radius_cdr,Radius CDR,Radius Call Detail Record handler.,))
+$(eval $(call Package/$(PKG_NAME)/Module,random,Entropy,This module extracts entropy from FreeSWITCH and feeds it into\n/dev/random.,))
+$(eval $(call Package/$(PKG_NAME)/Module,raven,Raven logging,Adds support for logging to Raven instances.,))
+$(eval $(call Package/$(PKG_NAME)/Module,rayo,Rayo,Rayo/XMPP 3PCC server for FreeSWITCH.,+$(PKG_NAME)-mod-ssml))
+$(eval $(call Package/$(PKG_NAME)/Module,redis,Redis limit backend,This module provides a mechanism to use Redis as a limit backend data\nstore.,))
+$(eval $(call Package/$(PKG_NAME)/Module,rss,RSS,Parses and reads XML based RSS feeds and reads the entries aloud via a TTS engine.,))
+$(eval $(call Package/$(PKG_NAME)/Module,rtc,Media streaming,Media streaming as used by WebRTC and mod_verto.,))
+$(eval $(call Package/$(PKG_NAME)/Module,rtmp,RTMP endpoint,RTMP endpoint support. Allows FreeSWITCH to be used from RTMP clients.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_de,German Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_en,English Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_es,Spanish Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_es_ar,Argentinian Spanish Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_fa,Persian Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_fr,French Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_he,Hebrew Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_hr,Croatian Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_hu,Hungarian Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_it,Italian Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_ja,Japanese Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_nl,Dutch Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_pl,Polish Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_pt,Portuguese Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_ru,Russian Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_sv,Swedish Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_th,Thai Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,say_zh,Chinese Say,Uses prerecorded sounds to read or say various things.,))
+$(eval $(call Package/$(PKG_NAME)/Module,shell_stream,Shell stream,Allows to stream audio from an arbitrary shell command.,))
+$(eval $(call Package/$(PKG_NAME)/Module,shout,Shout,Allows to stream audio from MP3s or Shoutcast streams.,+lame-lib +libmpg123 +libshout))
+$(eval $(call Package/$(PKG_NAME)/Module,signalwire,SignalWire,SignalWire CLOUD - FreeSWITCH connector.,+signalwire-client-c))
+$(eval $(call Package/$(PKG_NAME)/Module,skinny,Skinny,Skinny Call Control Protocol endpoint support.,))
+$(eval $(call Package/$(PKG_NAME)/Module,sms,SMS,This module provides an abstract facility for interfacing with SMS\nsystems.,))
+$(eval $(call Package/$(PKG_NAME)/Module,snapshot,Snapshot,This module can record a sliding window of audio and take snapshots\nto disk.,))
+$(eval $(call Package/$(PKG_NAME)/Module,sndfile,Soundfile,Adds sound format support via libsndfile.,+libsndfile))
+$(eval $(call Package/$(PKG_NAME)/Module,snmp,SNMP,An SNMP stats reporter.,+libnetsnmp))
+$(eval $(call Package/$(PKG_NAME)/Module,snom,SNOM,This module implements features specific to SNOM phones.,))
+$(eval $(call Package/$(PKG_NAME)/Module,sofia,Sofia SIP,SIP module.,))
+$(eval $(call Package/$(PKG_NAME)/Module,sonar,Sonar,This module measures the latency on an audio link by sending audible\naudio sonar pings.,))
+$(eval $(call Package/$(PKG_NAME)/Module,spandsp,SpanDSP,This module implements SpanDSP fax. It includes DSP and codec\nfunctionality.,+libjpeg +liblzma +libtiff))
+$(eval $(call Package/$(PKG_NAME)/Module,spy,User Spy,This module adds the ability to monitor the audio of a channel.,))
+$(eval $(call Package/$(PKG_NAME)/Module,ssml,SSML,mod_ssml is a FreeSWITCH module that renders SSML into audio. This\nmodule requires a text-to-speech module for speech synthesis.,))
+$(eval $(call Package/$(PKG_NAME)/Module,stress,Stress,This module attempts to detect voice stress on an audio channel.,))
+$(eval $(call Package/$(PKG_NAME)/Module,syslog,Syslog logger,Logs FreeSWITCH output to the syslog.,))
+$(eval $(call Package/$(PKG_NAME)/Module,theora,Theora passthrough,Theora video codec passthrough.,))
+$(eval $(call Package/$(PKG_NAME)/Module,tone_stream,Tone stream,Tone generation stream.,))
+$(eval $(call Package/$(PKG_NAME)/Module,translate,Number translation,This module implements number translation.,))
+$(eval $(call Package/$(PKG_NAME)/Module,tts_commandline,TTS command-line,Run a command-line and play the output file.,))
+$(eval $(call Package/$(PKG_NAME)/Module,unimrcp,UniMRCP,Allows communication with Media Resource Control Protocol servers.,))
+$(eval $(call Package/$(PKG_NAME)/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
+$(eval $(call Package/$(PKG_NAME)/Module,verto,Verto,Verto signaling protocol.,))
+$(eval $(call Package/$(PKG_NAME)/Module,video_filter,Video filter chromakey,This module provides a media bug for chromakey functionality.,))
+$(eval $(call Package/$(PKG_NAME)/Module,vmd,Voicemail detection,This module detects voicemail beeps.,))
+$(eval $(call Package/$(PKG_NAME)/Module,voicemail,Voicemail,This module provides a voicemail system.,))
+$(eval $(call Package/$(PKG_NAME)/Module,voicemail_ivr,Voicemail IVR,This module provides an extensible voicemail IVR system.,))
+$(eval $(call Package/$(PKG_NAME)/Module,xml_cdr,XML CDR,XML Call Detail Record handler.,))
+$(eval $(call Package/$(PKG_NAME)/Module,xml_curl,XML cURL,Provides an XML cURL interfaces to pull dynamic XML configuration for\nFreeSWITCH over HTTP.,))
+$(eval $(call Package/$(PKG_NAME)/Module,xml_ldap,XML LDAP,LDAP XML gateway.,+libopenldap))
+$(eval $(call Package/$(PKG_NAME)/Module,xml_rpc,XML RPC,Allows using the webapi to control FreeSWITCH.,))
+$(eval $(call Package/$(PKG_NAME)/Module,xml_scgi,XML SCGI,SCGI XML Gateway.,))
+$(eval $(call Package/$(PKG_NAME)/Module,yaml,YAML,YAML language module.,+libyaml))
+$(eval $(call Package/$(PKG_NAME)/Module,yuv,Raw YUV,Raw YUV I420 video codec support.,@FS_STABLE_WITH_LIBYUV))
+
+################################
+# FreeSWITCH utilities
+# Params:
+# 1 - Package subname
+# 2 - Package title
+# 3 - Utility description
+# 4 - Utility dependencies
+# 5 - Utility is a script (y/n)
+################################
+
+$(eval $(call Package/$(PKG_NAME)/Util,fs_cli,CLI,The fs_cli program is a Command-Line Interface that allows a user to\nconnect to a FreeSWITCH instance running on the local or a remote\nsystem.,,n))
+$(eval $(call Package/$(PKG_NAME)/Util,fs_encode,Sound file conversion,Format conversion of sound files so the result can be used by\nmod_native_file.,+$(PKG_NAME)-mod-native-file +$(PKG_NAME)-mod-sndfile +$(PKG_NAME)-mod-spandsp,n))
+$(eval $(call Package/$(PKG_NAME)/Util,fs_ivrd,IVR daemon,The FreeSWITCH IVR daemon is an abstraction layer that sits on top of\nthe ESL. The basic idea is that the ivrd will allow the user to have\na STDIN/STDOUT interface for simple call control.,,n))
+$(eval $(call Package/$(PKG_NAME)/Util,fs_tts,TTS to sound file,Use TTS to generate a sound file.,,n))
+$(eval $(call Package/$(PKG_NAME)/Util,gentls_cert,TLS certificate,Can be used to create TLS certificates and setup CAs.,+openssl-util,y))
+$(eval $(call Package/$(PKG_NAME)/Util,tone2wav,Sound file generation,Generates a sound file from a teletone script. The output can be in\nany format that is supported by libsndfile.,+$(PKG_NAME)-mod-sndfile,n))
diff --git a/net/freeswitch/files/freeswitch.conf b/net/freeswitch/files/freeswitch.conf
new file mode 100644 (file)
index 0000000..c2e48ca
--- /dev/null
@@ -0,0 +1,21 @@
+
+config freeswitch 'general'
+       option enabled '0'
+       option log_stderr '1'
+       option log_stdout '1'
+       option options '-nonat -np'
+
+config freeswitch 'directories'
+       option cache '/tmp/freeswitch/cache'
+       option db '/tmp/freeswitch/db'
+       option log '/tmp/freeswitch/log'
+       option recordings '/tmp/freeswitch/recordings'
+       option storage '/tmp/freeswitch/storage'
+       option temp '/tmp/freeswitch/temp'
+
+config freeswitch 'hotplug'
+       #option interface 'wan'
+       #option mount_point '/mnt/usb'
+       option ntpd '0'
+       option timeout '60'
+
diff --git a/net/freeswitch/files/freeswitch.hotplug b/net/freeswitch/files/freeswitch.hotplug
new file mode 100644 (file)
index 0000000..68fc3b0
--- /dev/null
@@ -0,0 +1,141 @@
+#!/bin/sh
+
+NAME=freeswitch
+COMMAND=/etc/init.d/$NAME
+
+LOGGER="/usr/bin/logger -t $NAME-hotplug"
+LOG_ERR="$LOGGER -p user.err --"
+LOG_NOTICE="$LOGGER -p user.notice --"
+
+[ "$ACTION" = ifup ] || exit 0
+
+. /lib/functions.sh
+config_load $NAME
+
+config_get interface hotplug interface
+
+[ "$INTERFACE" = "$interface" ] || exit 0
+
+pidof $NAME &> /dev/null
+if [ $? -eq 0 ]; then
+  $LOG_NOTICE stopping $NAME
+  $COMMAND stop &> /dev/null
+fi
+
+config_get timeout hotplug timeout 60
+
+[ "$timeout" -gt 0 ] 2> /dev/null || unset timeout
+timeout="${timeout:-60}"
+
+config_get mount_point hotplug mount_point
+
+# Mount condition, idea lifted from OpenWrt Wiki
+[ -n "$mount_point" ] && {
+
+  if ! [ -d "$mount_point" ]; then
+    $LOG_ERR "$mount_point" not a valid mount point
+    exit 1
+  fi
+
+  mnt="$mount_point"
+  notReady=start
+  tmp_timeout=$timeout
+
+  while [ -n "$notReady" -a $tmp_timeout -gt 0 ]; do
+    if [ "$notReady" != start ]; then
+      $LOG_NOTICE "$mnt" not yet mounted, timeout in $tmp_timeout s
+      sleep 5
+      tmp_timeout=$(($tmp_timeout-5))
+    fi
+
+    notReady=
+
+    result=$(cat /proc/mounts | awk '{print $2}' | grep "^$mnt\$")
+    if [ -z "$result" ]; then
+      notReady="$mnt not ready yet"
+    fi
+  done
+
+  if [ -n "$notReady" ]; then
+    $LOG_ERR "$mnt" still not mounted
+    $LOG_ERR not starting $NAME
+    exit 1
+  else
+    $LOG_NOTICE "$mnt" mounted
+  fi
+
+}
+
+config_get_bool ntpd hotplug ntpd 0
+
+# ntpd condition
+[ $ntpd -eq 1 ] && {
+
+  type ntpq &> /dev/null
+  [ $? -eq 0 ] || {
+    $LOG_ERR ntpq utility not found
+    exit 1
+  }
+
+  pidof ntpd &> /dev/null || {
+    $LOG_ERR ntpd not running
+    exit 1
+  }
+
+  notReady=start
+  tmp_timeout=$timeout
+
+  while [ -n "$notReady" -a $tmp_timeout -gt 0 ]; do
+    if [ "$notReady" != start ]; then
+      $LOG_NOTICE system time not in sync yet, timeout in $tmp_timeout s
+      sleep 5
+      tmp_timeout=$(($tmp_timeout-5))
+    fi
+
+    notReady=
+
+    result=$(ntpq -c 'timeout 300' -c 'rv 0 stratum' 2> /dev/null | \
+                    awk -F '=' '{print $2}' | grep -o -E '^[0-9]+')
+    if [ -z $result ]; then
+      $LOG_ERR failed to extract stratum from ntpd
+      notReady="unable to extract stratum"
+    else
+      $LOG_NOTICE ntpd stratum $result
+      if [ $result -lt 16 ] 2> /dev/null; then
+        result=$(ntpq -c 'timeout 300' -c 'rv 0 offset' 2> /dev/null \
+                 | awk -F '=' '{print $2}' | grep -o -E '^-?[0-9]+')
+        if [ -z $result ]; then
+          $LOG_ERR failed to extract offset from ntpd
+          notReady="unable to extract offset"
+        else
+          # "-0" looks stupid, so remove "-"
+          result=$(echo $result | grep -o '[0-9]*')
+          $LOG_NOTICE ntpd to system time offset \+\/\- $result ms
+          # If offset < 100 ms consider system time in sync
+          [ $result -lt 100 ] || notReady="system time not in sync yet"
+        fi
+      else
+        notReady="ntpd not in sync yet"
+      fi
+    fi
+  done
+
+  if [ -n "$notReady" ]; then
+    $LOG_ERR system time still not in sync
+    $LOG_ERR not starting $NAME
+    exit 1
+  else
+    $LOG_NOTICE system time in sync
+  fi
+
+}
+
+$COMMAND start &> /dev/null
+sleep 1
+pidof $NAME &>/dev/null
+if [ $? -eq 0 ]; then
+  $LOG_NOTICE started $NAME due to \"ifup "$INTERFACE"\" event
+else
+  $LOG_ERR start of $NAME due to \"ifup "$INTERFACE"\" event failed
+  exit 1
+fi
diff --git a/net/freeswitch/files/freeswitch.init b/net/freeswitch/files/freeswitch.init
new file mode 100644 (file)
index 0000000..12d7ec6
--- /dev/null
@@ -0,0 +1,88 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2017 - 2018 OpenWrt.org
+
+START=90
+
+USE_PROCD=1
+
+#PROCD_DEBUG=1
+
+NAME=freeswitch
+COMMAND=/usr/bin/$NAME
+
+LOGGER="/usr/bin/logger -p user.err -s -t $NAME --"
+
+start_service() {
+  dir_etc=/etc/$NAME
+  dir_localstate=/var/lib/$NAME
+  dir_run=/var/run/$NAME
+
+  config_load $NAME
+
+  config_get_bool enabled general enabled 0
+  if [ $enabled -eq 0 ]; then
+    $LOGGER service not enabled in /etc/config/$NAME
+    exit 1
+  fi
+
+  config_get_bool log_stderr general log_stderr 1
+  config_get_bool log_stdout general log_stdout 1
+
+  config_get dir_cache      directories cache      /tmp/$NAME/cache
+  config_get dir_db         directories db         /tmp/$NAME/db
+  config_get dir_log        directories log        /tmp/$NAME/log
+  config_get dir_recordings directories recordings /tmp/$NAME/recordings
+  config_get dir_storage    directories storage    /tmp/$NAME/storage
+  config_get dir_temp       directories temp       /tmp/$NAME/temp
+
+  config_get options general options
+
+  for i in "$dir_localstate" "$dir_run"; do
+    if ! [ -e "$i" ]; then
+      mkdir -m 0750 -p "$i"
+      [ -d "$i" ] && chown $NAME:$NAME "$i"
+    fi
+  done
+
+  command -v su >/dev/null
+  ret=$?
+  if [ 0 != "$ret" ]; then
+    $LOGGER utility \"su\" not available
+    $LOGGER will not attempt to create directories
+  else
+    for i in "$dir_cache" \
+             "$dir_db" \
+             "$dir_log" \
+             "$dir_recordings" \
+             "$dir_storage" \
+             "$dir_temp";
+    do
+      if ! [ -e "$i" ]; then
+        su -s /bin/sh -c "mkdir -m 0750 -p \"$i\"" $NAME
+      fi
+    done
+  fi
+
+  procd_open_instance
+  # starting with full path seems cleaner judging by 'ps' output
+  procd_set_param command $COMMAND
+  # need to specify all or none of -conf, -log, and -db
+  procd_append_param command \
+    -cache "$dir_cache" \
+    -conf "$dir_etc" \
+    -db "$dir_db" \
+    -g "$NAME" \
+    -log "$dir_log" \
+    -recordings "$dir_recordings" \
+    -run "$dir_run" \
+    -storage "$dir_storage" \
+    -temp "$dir_temp" \
+    -u "$NAME" \
+    $options \
+    -c
+  # forward stderr to logd
+  procd_set_param stderr $log_stderr
+  # same for stdout
+  procd_set_param stdout $log_stdout
+  procd_close_instance
+}
diff --git a/net/freeswitch/patches/003-modmake-fix.patch b/net/freeswitch/patches/003-modmake-fix.patch
new file mode 100644 (file)
index 0000000..d0cf333
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/build/modmake.rulesam
++++ b/build/modmake.rulesam
+@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = foreign subdir-object
+ AM_CFLAGS   = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
+ AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS)
+ AM_LDFLAGS  = $(SWITCH_AM_LDFLAGS)
+-DEFAULT_VARS = CFLAGS="$(CFLAGS)" CPPFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
++DEFAULT_VARS = CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" CXX="$(CXX)"
+ DEFAULT_ARGS = --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --disable-shared --with-pic
+ moddir=@modulesdir@
diff --git a/net/freeswitch/patches/010-fix-zrtp-cflags.patch b/net/freeswitch/patches/010-fix-zrtp-cflags.patch
new file mode 100644 (file)
index 0000000..00b959f
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/libs/libzrtp/configure.ac
++++ b/libs/libzrtp/configure.ac
+@@ -34,7 +34,7 @@ esac
+ AM_INIT_AUTOMAKE
+ AX_PREFIX_CONFIG_H(include/zrtp_config_unix.h,ZRTP,config/config.h)
+-CFLAGS="$CFLAGS -std=c99 -O2 -g3 -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -fPIC -DZRTP_AUTOMAKE=1"
++CFLAGS="$CFLAGS -std=c99 -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -fPIC -DZRTP_AUTOMAKE=1"
+ # Configuring external libraries
+ echo "========================= configuring bnlib =============================="
diff --git a/net/freeswitch/patches/030-fix-configure-ac.patch b/net/freeswitch/patches/030-fix-configure-ac.patch
new file mode 100644 (file)
index 0000000..fa633e9
--- /dev/null
@@ -0,0 +1,57 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -256,30 +256,6 @@ AX_COMPILER_VENDOR
+ # Set CC_FOR_BUILD
+ if test "x${cross_compiling}" = "xyes"; then
+     CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
+-    case "$host" in
+-       arm*-linux-gnueabi*|arm*-*-linux-gnueabi*)
+-              # spandsp modem
+-              ac_cv_file__dev_ptmx=yes
+-              # libjs
+-              export ac_cv_va_copy=yes
+-              # srtp
+-              export ac_cv_file__dev_urandom=yes
+-              # rpl_malloc
+-              export ac_cv_func_realloc_0_nonnull=yes
+-              export ac_cv_func_malloc_0_nonnull=yes
+-              # apr
+-              export ac_cv_func_setpgrp_void=yes
+-              export ac_cv_file__dev_zero=yes
+-              export apr_cv_tcp_nodelay_with_cork=yes
+-              export ac_cv_file_dbd_apr_dbd_mysql_c=no
+-              export ac_cv_sizeof_ssize_t=4
+-              export apr_cv_mutex_recursive=yes
+-              export ac_cv_func_pthread_rwlock_init=yes
+-              export apr_cv_type_rwlock_t=yes
+-              export apr_cv_process_shared_works=yes
+-              export apr_cv_mutex_robust_shared=yes
+-       ;;
+-    esac
+ else
+     CC_FOR_BUILD='$(CC)'
+ fi
+@@ -659,7 +635,7 @@ path_push_unique () {
+   fi
+ }
+-AC_PATH_PROG([PG_CONFIG], [pg_config], [no])
++AC_PATH_PROG([PG_CONFIG], [pg_config], [no], ["${STAGING_DIR}"/usr/bin])
+ AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
+ case $host in
+@@ -1627,13 +1603,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
+ # -a "x$ac_cv_have_EXTERN_h" != "xno"
+ if test "x$ac_cv_have_perl" != "xno"; then
+-   PERL=perl
+-   PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlib}'`"
+-   PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE"
+-   PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`"
+-   PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts | sed -e 's|-arch x86_64 -arch i386||'` -DEMBED_PERL"
+-   PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e 's|-arch x86_64 -arch i386||'`"
+-   PERL_INC="`$PERL -MExtUtils::Embed -e perl_inc`"
++   PERL_CFLAGS="-w -DMULTIPLICITY ${PERL_CFLAGS} -DEMBED_PERL"
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$PERL_CFLAGS"
diff --git a/net/freeswitch/patches/040-gentls_cert_update_message_digest.patch b/net/freeswitch/patches/040-gentls_cert_update_message_digest.patch
new file mode 100644 (file)
index 0000000..ff5226d
--- /dev/null
@@ -0,0 +1,51 @@
+commit 70d1cbafe4ab0176cd9fc01f740e34cd1bae326b
+Author: Sebastian Kemper <sebastian_ml@gmx.net>
+Date:   Wed Nov 13 20:29:50 2019 +0100
+
+    [gentls_cert] Update message digest
+    
+    Debian Buster updated /etc/ssl/openssl.cnf to default to
+    
+    MinProtocol = TLSv1.2
+    CipherString = DEFAULT@SECLEVEL=2
+    
+    gentls_cert currently uses SHA1 as message digest. According to OpenSSL
+    documentation this only offers 80 bit of security. 80 bits is enough for
+    security level 1, but not 2.
+    
+    The OpenSSL default MD nowadays is SHA256. This commit updates
+    gentls_cert to use it.
+    
+    Issue was reported on the FS mailing list. The certificates created by
+    gentls_cert caused "md too weak" errors and clients were unable to
+    connect.
+    
+    Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
+
+diff --git a/scripts/gentls_cert.in b/scripts/gentls_cert.in
+index 43aa8ac605..dd56c9f6dc 100644
+--- a/scripts/gentls_cert.in
++++ b/scripts/gentls_cert.in
+@@ -89,7 +89,7 @@ setup_ca() {
+       openssl req -out "${CONFDIR}/CA/cacert.pem" \
+               -new -x509 -keyout "${CONFDIR}/CA/cakey.pem" \
+-              -config "${TMPFILE}.cfg" -nodes -days ${DAYS} -sha1 >/dev/null || exit 1
++              -config "${TMPFILE}.cfg" -nodes -days ${DAYS} -sha256 >/dev/null || exit 1
+       cat "${CONFDIR}/CA/cacert.pem" > "${CONFDIR}/cafile.pem"
+       cp $TMPFILE.cfg /tmp/ssl.cfg
+       rm "${TMPFILE}.cfg"
+@@ -131,11 +131,11 @@ generate_cert() {
+       openssl req -new -out "${TMPFILE}.req" \
+               -newkey rsa:${KEY_SIZE} -keyout "${TMPFILE}.key" \
+-              -config "${TMPFILE}.cfg" -nodes -sha1 >/dev/null || exit 1
++              -config "${TMPFILE}.cfg" -nodes -sha256 >/dev/null || exit 1
+       openssl x509 -req -CAkey "${CONFDIR}/CA/cakey.pem" -CA "${CONFDIR}/CA/cacert.pem" -CAcreateserial \
+               -in "${TMPFILE}.req" -out "${TMPFILE}.crt" -extfile "${TMPFILE}.cfg" \
+-              -extensions "${EXTENSIONS}" -days ${DAYS} -sha1 >/dev/null || exit 1
++              -extensions "${EXTENSIONS}" -days ${DAYS} -sha256 >/dev/null || exit 1
+       cat "${TMPFILE}.crt" "${TMPFILE}.key" > "${CONFDIR}/${OUTFILE}"
diff --git a/net/freeswitch/patches/110-apr-add-cache-for-strerror_r.patch b/net/freeswitch/patches/110-apr-add-cache-for-strerror_r.patch
new file mode 100644 (file)
index 0000000..a753697
--- /dev/null
@@ -0,0 +1,90 @@
+--- a/libs/apr-util/build/apr_common.m4
++++ b/libs/apr-util/build/apr_common.m4
+@@ -514,8 +514,9 @@ dnl  string.
+ dnl
+ dnl
+ AC_DEFUN([APR_CHECK_STRERROR_R_RC],[
+-AC_MSG_CHECKING(for type of return code from strerror_r)
+-AC_TRY_RUN([
++AC_CACHE_CHECK([whether return code from strerror_r has type int],
++[ac_cv_strerror_r_rc_int],
++[AC_TRY_RUN([
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
+@@ -531,14 +532,10 @@ int main(void)
+ }], [
+     ac_cv_strerror_r_rc_int=yes ], [
+     ac_cv_strerror_r_rc_int=no ], [
+-    ac_cv_strerror_r_rc_int=no ] )
++    ac_cv_strerror_r_rc_int=no ] ) ] )
+ if test "x$ac_cv_strerror_r_rc_int" = xyes; then
+   AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
+-  msg="int"
+-else
+-  msg="pointer"
+ fi
+-AC_MSG_RESULT([$msg])
+ ] )
+ dnl
+--- a/libs/apr/build/apr_common.m4
++++ b/libs/apr/build/apr_common.m4
+@@ -514,8 +514,9 @@ dnl  string.
+ dnl
+ dnl
+ AC_DEFUN([APR_CHECK_STRERROR_R_RC],[
+-AC_MSG_CHECKING(for type of return code from strerror_r)
+-AC_TRY_RUN([
++AC_CACHE_CHECK([whether return code from strerror_r has type int],
++[ac_cv_strerror_r_rc_int],
++[AC_TRY_RUN([
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
+@@ -531,14 +532,10 @@ int main(void)
+ }], [
+     ac_cv_strerror_r_rc_int=yes ], [
+     ac_cv_strerror_r_rc_int=no ], [
+-    ac_cv_strerror_r_rc_int=no ] )
++    ac_cv_strerror_r_rc_int=no ] ) ] )
+ if test "x$ac_cv_strerror_r_rc_int" = xyes; then
+   AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
+-  msg="int"
+-else
+-  msg="pointer"
+ fi
+-AC_MSG_RESULT([$msg])
+ ] )
+ dnl
+--- a/libs/unimrcp/build/acmacros/apr_common.m4
++++ b/libs/unimrcp/build/acmacros/apr_common.m4
+@@ -526,8 +526,9 @@ dnl  string.
+ dnl
+ dnl
+ AC_DEFUN([APR_CHECK_STRERROR_R_RC], [
+-AC_MSG_CHECKING(for type of return code from strerror_r)
+-AC_TRY_RUN([
++AC_CACHE_CHECK([whether return code from strerror_r has type int],
++[ac_cv_strerror_r_rc_int],
++[AC_TRY_RUN([
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
+@@ -543,14 +544,10 @@ main()
+ }], [
+     ac_cv_strerror_r_rc_int=yes ], [
+     ac_cv_strerror_r_rc_int=no ], [
+-    ac_cv_strerror_r_rc_int=no ] )
++    ac_cv_strerror_r_rc_int=no ] ) ] )
+ if test "x$ac_cv_strerror_r_rc_int" = xyes; then
+   AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
+-  msg="int"
+-else
+-  msg="pointer"
+ fi
+-AC_MSG_RESULT([$msg])
+ ] )
+ dnl
diff --git a/net/freeswitch/patches/120-fix-copts.patch b/net/freeswitch/patches/120-fix-copts.patch
new file mode 100644 (file)
index 0000000..4582de6
--- /dev/null
@@ -0,0 +1,138 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2058,7 +2058,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
+ AC_SUBST(OUR_DISABLED_UNINSTALL_MODS)
+ AC_SUBST(AM_MAKEFLAGS)
+-ac_configure_args="$ac_configure_args --with-modinstdir=${modulesdir} CONFIGURE_CFLAGS='$CFLAGS $CPPFLAGS' CONFIGURE_CXXFLAGS='$CXXFLAGS $CPPFLAGS' CONFIGURE_LDFLAGS='$LDFLAGS' "
++APR_ADDTO(CONFIGURE_CFLAGS, [$CFLAGS])
++APR_ADDTO(CONFIGURE_CPPFLAGS, [$CPPFLAGS])
++APR_ADDTO(CONFIGURE_CXXFLAGS, [$CXXFLAGS])
++APR_ADDTO(CONFIGURE_LDFLAGS, [$LDFLAGS])
++
++ac_configure_args="$ac_configure_args --with-modinstdir=${modulesdir} CONFIGURE_CFLAGS='$CONFIGURE_CFLAGS' CONFIGURE_CPPFLAGS='$CONFIGURE_CPPFLAGS' CONFIGURE_CXXFLAGS='$CONFIGURE_CXXFLAGS' CONFIGURE_LDFLAGS='$CONFIGURE_LDFLAGS' "
+ #     --prefix='$prefix' --exec_prefix='$exec_prefix' --libdir='$libdir' --libexecdir='$libexecdir' --bindir='$bindir' --sbindir='$sbindir' \
+ #     --localstatedir='$localstatedir' --datadir='$datadir'"
+--- a/libs/apr-util/configure.ac
++++ b/libs/apr-util/configure.ac
+@@ -20,9 +20,10 @@ dnl Generate ./config.nice for reproduci
+ dnl 
+ APR_CONFIG_NICE(config.nice)
+-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
+-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
++APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
++APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
++APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
++APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
+ dnl # Some initial steps for configuration.  We setup the default directory
+ dnl # and which files are to be configured.
+--- a/libs/apr/configure.ac
++++ b/libs/apr/configure.ac
+@@ -20,9 +20,10 @@ sinclude(build/apr_hints.m4)
+ sinclude(build/libtool.m4)
+ sinclude(build/ltsugar.m4)
+-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
+-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
++APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
++APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
++APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
++APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
+ dnl Hard-coded inclusion at the tail end of apr_private.h:
+ AH_BOTTOM([
+--- a/libs/iksemel/configure.ac
++++ b/libs/iksemel/configure.ac
+@@ -6,9 +6,12 @@ AC_CONFIG_SRCDIR([configure.ac])
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS(include/config.h)
+-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
+-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
++m4_include(../apr/build/apr_common.m4)
++
++APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
++APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
++APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
++APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
+ AC_CANONICAL_HOST
+--- a/libs/libdingaling/configure.ac
++++ b/libs/libdingaling/configure.ac
+@@ -8,9 +8,12 @@ AM_INIT_AUTOMAKE
+ AC_CONFIG_SRCDIR([src])
+ AC_CONFIG_HEADERS([src/config.h])
+-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
+-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
++m4_include(../apr/build/apr_common.m4)
++
++APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
++APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
++APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
++APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
+ #Set default language
+ AC_LANG_C
+--- a/libs/sofia-sip/configure.ac
++++ b/libs/sofia-sip/configure.ac
+@@ -13,9 +13,12 @@ dnl ---------------------------
+ dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
+ AC_INIT([sofia-sip], [1.12.10devel])
+-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
+-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
++m4_include(../apr/build/apr_common.m4)
++
++APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
++APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
++APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
++APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
+ AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
+ AC_CONFIG_MACRO_DIR([m4])
+--- a/libs/spandsp/configure.ac
++++ b/libs/spandsp/configure.ac
+@@ -21,9 +21,12 @@
+ AC_PREREQ([2.59])
+ AC_INIT([spandsp], [1.99.0])
+-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
+-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
++m4_include(../apr/build/apr_common.m4)
++
++APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
++APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
++APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
++APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
+ SPANDSP_LT_CURRENT=3
+ SPANDSP_LT_REVISION=0
+--- a/libs/srtp/configure.ac
++++ b/libs/srtp/configure.ac
+@@ -3,9 +3,12 @@ AC_INIT(srtp, 1.4.2, mcgrew@cisco.com)
+ AC_CONFIG_AUX_DIR(build)
+ AM_INIT_AUTOMAKE
+-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
+-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
++m4_include(../apr/build/apr_common.m4)
++
++APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
++APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
++APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
++APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
+ #Set default language
+ AC_LANG_C
diff --git a/net/freeswitch/patches/130-fix-iksemel-copts.patch b/net/freeswitch/patches/130-fix-iksemel-copts.patch
new file mode 100644 (file)
index 0000000..005b7a4
--- /dev/null
@@ -0,0 +1,9 @@
+--- a/libs/iksemel/src/Makefile.am
++++ b/libs/iksemel/src/Makefile.am
+@@ -25,5 +25,5 @@ libiksemel_la_SOURCES = \
+       base64.c
+ libiksemel_la_LDFLAGS = -version-info 4:0:1 -no-undefined
+-libiksemel_la_CFLAGS = $(CFLAGS) $(LIBGNUTLS_CFLAGS)  
++libiksemel_la_CFLAGS = $(LIBGNUTLS_CFLAGS)  
+ libiksemel_la_LIBADD = $(LIBGNUTLS_LIBS)  
diff --git a/net/freeswitch/patches/140-libvpx-cross.patch b/net/freeswitch/patches/140-libvpx-cross.patch
new file mode 100644 (file)
index 0000000..15a78c3
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -587,8 +587,15 @@ libs/libedit/src/.libs/libedit.a:
+ libs/libzrtp/libzrtp.a:
+       cd libs/libzrtp && $(MAKE)
++# !!! OpenWrt was here !!!
++# - added CROSS and set target to generic-gnu for cross-compile
++# - added CPPFLAGS to CFLAGS, otherwise they would be ignored
++# - disabled optimizations that would override OpenWrt's CFLAGS
++# - disabled the building of tools (because they fail to build and we
++#   don't need them anyway)
++
+ libs/libvpx/Makefile: libs/libvpx/.update
+-      cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(VISIBILITY_FLAG)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --size-limit=16384x16384
++      cd libs/libvpx && CROSS="$(CROSS)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(CPPFLAGS) $(VISIBILITY_FLAG)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --disable-optimizations --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-tools --disable-unit-tests --size-limit=16384x16384
+ libs/libvpx/libvpx.a: libs/libvpx/Makefile libs/libvpx/.update
+       @cd libs/libvpx && $(MAKE)
diff --git a/net/freeswitch/patches/150-erlang-m4.patch b/net/freeswitch/patches/150-erlang-m4.patch
new file mode 100644 (file)
index 0000000..893af86
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/build/config/erlang.m4
++++ b/build/config/erlang.m4
+@@ -43,9 +43,20 @@ then
+                       ERLANG_LDFLAGS="-L$ERLANG_LIBDIR $ERLANG_LDFLAGS"
+                       LIBS="-L$ERLANG_LIBDIR $LIBS"
+               fi
++
++              #
++              # Don't use the above ERLANG_LDFLAGS
++              #
++              ERLANG_LIBDIR="$STAGING_DIR/usr/lib"
++              ERLANG_LDFLAGS="-L$ERLANG_LIBDIR"
++              LIBS="-L$ERLANG_LIBDIR $LIBS"
+               AC_MSG_RESULT([$ERLANG_LIBDIR])
+               ERLANG_INCDIR=`$ERLANG -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1`
++              #
++              # Don't use the above ERLANG_INCDIR
++              #
++              ERLANG_INCDIR="$STAGING_DIR/usr/include"
+               AC_MSG_CHECKING([erlang incdir])
+               if test -z "`echo $ERLANG_INCDIR`" ; then
+                       AC_MSG_ERROR([failed])
diff --git a/net/freeswitch/patches/170-mod_random.patch b/net/freeswitch/patches/170-mod_random.patch
new file mode 100644 (file)
index 0000000..ea85965
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/mod/applications/mod_random/Makefile.am
++++ b/src/mod/applications/mod_random/Makefile.am
+@@ -3,6 +3,6 @@ MODNAME=mod_random
+ mod_LTLIBRARIES = mod_random.la
+ mod_random_la_SOURCES  = mod_random.c
+-mod_random_la_CFLAGS   = $(AM_CFLAGS)
++mod_random_la_CFLAGS   = $(AM_CFLAGS) -Wno-cpp
+ mod_random_la_LIBADD   = $(switch_builddir)/libfreeswitch.la
+ mod_random_la_LDFLAGS  = -avoid-version -module -no-undefined -shared
diff --git a/net/freeswitch/patches/180-mod_perl.patch b/net/freeswitch/patches/180-mod_perl.patch
new file mode 100644 (file)
index 0000000..cc036ea
--- /dev/null
@@ -0,0 +1,37 @@
+--- a/src/mod/languages/mod_perl/Makefile.am
++++ b/src/mod/languages/mod_perl/Makefile.am
+@@ -1,8 +1,5 @@
+ include $(top_srcdir)/build/modmake.rulesam
+ MODNAME=mod_perl
+-PERL        = perl
+-PERL_LIBDIR =-L`perl -MConfig -e 'print $$Config{archlib}'`/CORE
+-PERL_LIBS   =`perl -MConfig -e 'print $$Config{libs}'`
+ perldir=$(prefix)/perl
+ mod_LTLIBRARIES = mod_perl.la
+@@ -10,13 +7,13 @@ perl_LTLIBRARIES = freeswitch.la
+ mod_perl_la_SOURCES  = mod_perl.c freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
+ mod_perl_la_CFLAGS   = $(SWITCH_AM_CFLAGS)
+ mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
+-mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/ 
++mod_perl_la_CPPFLAGS = @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
+ mod_perl_la_LIBADD   = $(switch_builddir)/libfreeswitch.la
+-mod_perl_la_LDFLAGS  = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'`
++mod_perl_la_LDFLAGS  = -avoid-version -module -no-undefined -shared @PERL_LDFLAGS@ @PERL_LIBS@
+ freeswitch_la_SOURCES = freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
+ freeswitch_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(LDFLAGS)
+-freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/ 
++freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
+ reswig:       swigclean mod_perl_wrap.cpp
+ swigclean: clean
+@@ -31,7 +28,7 @@ orig: mod_perl_wrap.cpp
+       patch -R -s -p0 -i hack.diff
+ .perlok:
+-      @(${PERL} -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
++      @(@PERL@ -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
+       || ((echo Sorry, you need to compile perl with threads and multiplicity.&& exit 1))
+       @touch .perlok
diff --git a/net/freeswitch/patches/190-mod_pocketsphinx.patch b/net/freeswitch/patches/190-mod_pocketsphinx.patch
new file mode 100644 (file)
index 0000000..cb1d5bb
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/src/mod/asr_tts/mod_pocketsphinx/Makefile.am
++++ b/src/mod/asr_tts/mod_pocketsphinx/Makefile.am
+@@ -27,7 +27,7 @@ $(SPHINXBASE_DIR):
+ $(SPHINXBASE_BUILDDIR)/Makefile: $(SPHINXBASE_DIR)
+       mkdir -p $(SPHINXBASE_BUILDDIR)
+-      (cd $(SPHINXBASE_BUILDDIR) && $(DEFAULT_VARS) $(SPHINXBASE_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(SPHINXBASE_DIR) --without-python CFLAGS=)
++      (cd $(SPHINXBASE_BUILDDIR) && sed -i 's|$$(srcdir)/||g' test/regression/Makefile.am && autoreconf -v -f -i -s && $(DEFAULT_VARS) ac_cv_header_alsa_asoundlib_h=no ac_cv_header_jack_jack_h=no ac_cv_header_pulse_pulseaudio_h=no $(SPHINXBASE_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(SPHINXBASE_DIR) --without-python $(FS_STABLE_USE_FIXED_POINT))
+       $(TOUCH_TARGET)
+ $(SPHINXBASE_BUILDDIR)/buildstamp: $(SPHINXBASE_BUILDDIR)/Makefile
+@@ -45,7 +45,7 @@ $(POCKETSPHINX_DIR):
+ $(POCKETSPHINX_BUILDDIR)/Makefile: $(POCKETSPHINX_DIR) $(SPHINXBASE_LA) $(SPHINXBASE_LA2)
+       mkdir -p $(POCKETSPHINX_BUILDDIR)
+-      (cd $(POCKETSPHINX_BUILDDIR) && $(DEFAULT_VARS) $(POCKETSPHINX_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(POCKETSPHINX_DIR) --without-python --with-sphinxbase=$(SPHINXBASE_DIR) --with-sphinxbase-build=$(SPHINXBASE_BUILDDIR) CFLAGS=-Wno-return-type)
++      (cd $(POCKETSPHINX_BUILDDIR) && autoreconf -v -f -i -s && $(DEFAULT_VARS) $(POCKETSPHINX_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(POCKETSPHINX_DIR) --without-python --with-sphinxbase=$(SPHINXBASE_DIR) --with-sphinxbase-build=$(SPHINXBASE_BUILDDIR))
+       $(TOUCH_TARGET)
+ $(POCKETSPHINX_BUILDDIR)/buildstamp: $(POCKETSPHINX_BUILDDIR)/Makefile
diff --git a/net/freeswitch/patches/200-mod_verto-fix-copts.patch b/net/freeswitch/patches/200-mod_verto-fix-copts.patch
new file mode 100644 (file)
index 0000000..bb8f48d
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/src/mod/endpoints/mod_verto/Makefile.am
++++ b/src/mod/endpoints/mod_verto/Makefile.am
+@@ -12,8 +12,8 @@ if HAVE_PERL
+ #perldir = $(PERL_SITEDIR)
+ noinst_LTLIBRARIES = MCAST.la
+ MCAST_la_SOURCES   = mcast/mcast_wrap.cpp mcast/perlxsi.c mcast/mcast.c mcast/mcast_cpp.cpp
+-MCAST_la_CFLAGS    = $(CC_CFLAGS) $(CFLAGS) $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
+-MCAST_la_CXXFLAGS  = $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC)
++MCAST_la_CFLAGS    = $(CC_CFLAGS) $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
++MCAST_la_CXXFLAGS  = $(SWITCH_AM_CXXFLAGS) -w $(PERL_INC)
+ MCAST_la_CPPFLAGS  = -I$(switch_srcdir)/src/mod/endpoints/mod_verto/mcast
+ MCAST_la_LDFLAGS   = -avoid-version -module -no-undefined -shared $(PERL_LDFLAGS)
diff --git a/net/freeswitch/patches/210-esl-perl-fix-copts.patch b/net/freeswitch/patches/210-esl-perl-fix-copts.patch
new file mode 100644 (file)
index 0000000..d9f71d8
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/libs/esl/perl/Makefile.am
++++ b/libs/esl/perl/Makefile.am
+@@ -2,8 +2,8 @@ if HAVE_PERL
+ perldir = $(PERL_SITEDIR)
+ perl_LTLIBRARIES = ESL.la
+ ESL_la_SOURCES   = esl_wrap.cpp perlxsi.c
+-ESL_la_CFLAGS    = $(CC_CFLAGS) $(CFLAGS) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
+-ESL_la_CXXFLAGS  = -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC)
++ESL_la_CFLAGS    = $(CC_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS)
++ESL_la_CXXFLAGS  = -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) -w $(PERL_INC)
+ ESL_la_LDFLAGS   = -avoid-version -module -no-undefined -shared $(PERL_LDFLAGS)
+ ESL_la_LIBADD    = ../libesl.la
diff --git a/net/freeswitch/patches/230-mod_radius_cdr.patch b/net/freeswitch/patches/230-mod_radius_cdr.patch
new file mode 100644 (file)
index 0000000..2fa58ee
--- /dev/null
@@ -0,0 +1,46 @@
+--- a/src/mod/event_handlers/mod_radius_cdr/Makefile.am
++++ b/src/mod/event_handlers/mod_radius_cdr/Makefile.am
+@@ -20,7 +20,7 @@ $(RADCLIENT_DIR):
+ $(RADCLIENT_BUILDDIR)/Makefile: $(RADCLIENT_DIR)
+       mkdir -p $(RADCLIENT_BUILDDIR)
+-      cd $(RADCLIENT_BUILDDIR) && $(DEFAULT_VARS) $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
++      cd $(RADCLIENT_BUILDDIR) && patch -p1 < ../../src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff && autoreconf -v -f -i -s && $(DEFAULT_VARS) CFLAGS+="-Wno-cpp" $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
+       $(TOUCH_TARGET)
+ $(RADCLIENT_LA): $(RADCLIENT_BUILDDIR)/Makefile
+--- /dev/null
++++ b/src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff
+@@ -0,0 +1,32 @@
++diff --git a/configure.in b/configure.in
++index 4f194bd..647e9b9 100644
++--- a/configure.in
+++++ b/configure.in
++@@ -209,7 +209,7 @@ AC_CHECK_FUNCS(stricmp random rand snprintf vsnprintf)
++ if test "$ac_cv_func_uname" = 'yes'
++ then
++      AC_MSG_CHECKING([for field domainname in struct utsname])
++-     AC_TRY_RUN([
+++     AC_COMPILE_IFELSE([
++      #include <sys/utsname.h>
++      
++      main(int argc, char **argv)
++@@ -224,13 +224,11 @@ then
++      )
++ fi
++ 
++-AC_MSG_CHECKING([for /dev/urandom])
++-if test -c /dev/urandom
++-then
++-     AC_MSG_RESULT(yes)
++-     AC_DEFINE(HAVE_DEV_URANDOM)
++-else
++-     AC_MSG_RESULT(no)
+++AC_CACHE_CHECK([/dev/urandom], [ac_cv_dev_urandom],
+++  [ac_cv_dev_urandom=no
+++   if test -c /dev/urandom; then ac_cv_dev_urandom=yes; fi])
+++if test $ac_cv_dev_urandom = yes; then
+++  AC_DEFINE(HAVE_DEV_URANDOM)
++ fi
++ 
++ dnl Determine PATH setting
diff --git a/net/freeswitch/patches/260-mod_event_zmq-fix-build-with-fortify-headers.patch b/net/freeswitch/patches/260-mod_event_zmq-fix-build-with-fortify-headers.patch
new file mode 100644 (file)
index 0000000..a2df8e7
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/mod/event_handlers/mod_event_zmq/Makefile.am
++++ b/src/mod/event_handlers/mod_event_zmq/Makefile.am
+@@ -22,6 +22,7 @@ $(ZMQ_DIR):
+       $(GETLIB) $(ZMQ_BASEURL) $(ZMQ).tar.gz || $(GETLIB) $(ZMQ_BASEURL_ALT) $(ZMQ).tar.gz
+       sed -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' $(ZMQ_DIR)/configure.in > $(ZMQ_DIR)/configure.in.tmp && \
+               mv $(ZMQ_DIR)/configure.in.tmp $(ZMQ_DIR)/configure.in
++      sed -i '/^libzmq_pedantic="yes"/s/yes/no/' $(ZMQ_DIR)/configure.in
+       cd $(ZMQ_DIR) && ./autogen.sh
+ $(ZMQ_BUILDDIR)/Makefile: $(ZMQ_DIR)
diff --git a/net/freeswitch/patches/270-fix-uclibc-iconv-in-gsmopen.patch b/net/freeswitch/patches/270-fix-uclibc-iconv-in-gsmopen.patch
new file mode 100644 (file)
index 0000000..c4a9cd4
--- /dev/null
@@ -0,0 +1,67 @@
+--- a/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
++++ b/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
+@@ -104,6 +104,12 @@ int gettimeofday(struct timeval *tv, str
+ /***************/
+ #endif /* WIN32 */
++#if defined(FS_STABLE_ICONV_INBUF_CONST)
++#define ICONV_INBUF_TYPE const char **
++#else
++#define ICONV_INBUF_TYPE char **
++#endif
++
+ int gsmopen_serial_init(private_t *tech_pvt, int controldevice_speed)
+ {
+       if (!tech_pvt)
+@@ -2521,11 +2527,7 @@ int ucs2_to_utf8(private_t *tech_pvt, ch
+       DEBUGA_GSMOPEN("1 ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
+                                  GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
+-#ifdef WIN32
+-      iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+-#else // WIN32
+-      iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+-#endif // WIN32
++      iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
+       if (iconv_res == (size_t) -1) {
+               DEBUGA_GSMOPEN("2 ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
+                                          GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
+@@ -2560,11 +2562,7 @@ int utf8_to_iso_8859_1(private_t *tech_p
+       DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf8_in=%s, iso_8859_1_out=%s\n",
+                                  GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_in, iso_8859_1_out);
+-#ifdef WIN32
+-      iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+-#else // WIN32
+-      iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+-#endif // WIN32
++      iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
+       if (iconv_res == (size_t) -1) {
+               DEBUGA_GSMOPEN("cannot translate in iso_8859_1 error: %s (errno: %d)\n", GSMOPEN_P_LOG, strerror(errno), errno);
+               return -1;
+@@ -2597,11 +2595,7 @@ int iso_8859_1_to_utf8(private_t *tech_p
+       }
+       inbytesleft = strlen(iso_8859_1_in) * 2;
+-#ifdef WIN32
+-      iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+-#else // WIN32
+-      iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+-#endif // WIN32
++      iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
+       if (iconv_res == (size_t) -1) {
+               DEBUGA_GSMOPEN("ciao in=%s, inleft=%d, out=%s, outleft=%d, utf8_out=%s\n",
+                                          GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_out);
+@@ -2642,11 +2636,7 @@ int utf8_to_ucs2(private_t *tech_pvt, ch
+       DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf8_in=%s, converted=%s\n",
+                                  GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_in, converted);
+-#ifdef WIN32
+-      iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+-#else // WIN32
+-      iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+-#endif // WIN32
++      iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
+       if (iconv_res == (size_t) -1) {
+               ERRORA("error: %s %d\n", GSMOPEN_P_LOG, strerror(errno), errno);
+               return -1;
diff --git a/net/freeswitch/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch b/net/freeswitch/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch
new file mode 100644 (file)
index 0000000..7e29e94
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/libs/freetdm/configure.ac
++++ b/libs/freetdm/configure.ac
+@@ -88,7 +88,7 @@ AC_ARG_ENABLE([enable_64],
+ case "${ax_cv_c_compiler_vendor}" in
+ gnu)
+-      COMP_VENDOR_CFLAGS="-ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0"
++      COMP_VENDOR_CFLAGS="-ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+       ;;
+ sun)
+       COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -xvpara"
diff --git a/net/freeswitch/patches/290-fix-mod_freetdm-copts.patch b/net/freeswitch/patches/290-fix-mod_freetdm-copts.patch
new file mode 100644 (file)
index 0000000..0cde4d1
--- /dev/null
@@ -0,0 +1,8 @@
+--- a/libs/freetdm/mod_freetdm/Makefile.in
++++ b/libs/freetdm/mod_freetdm/Makefile.in
+@@ -1,4 +1,4 @@
+-FT_CFLAGS=@CFLAGS@ @COMP_VENDOR_CFLAGS@ @DEFS@
++FT_CFLAGS=@COMP_VENDOR_CFLAGS@ @DEFS@
+ BASE=../../..
+ FT_DIR=..
diff --git a/net/freeswitch/patches/320-workaround-format-truncation-error-in-mod_cdr_mongodb.patch b/net/freeswitch/patches/320-workaround-format-truncation-error-in-mod_cdr_mongodb.patch
new file mode 100644 (file)
index 0000000..2a93821
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -363,6 +363,16 @@ if test "$ax_cv_c_compiler_vendor" = "gn
+         [ac_cv_gcc_supports_w_no_misleading_indentation=no])])
+   CFLAGS="$saved_CFLAGS"
+   AC_MSG_RESULT($ac_cv_gcc_supports_w_no_misleading_indentation)
++
++  saved_CFLAGS="$CFLAGS"
++  AC_CACHE_CHECK([whether compiler supports -Wno-error=format-truncation],
++    [ac_cv_gcc_supports_w_no_err_format_truncation], [
++      CFLAGS="$CFLAGS -Wno-error=format-truncation"
++      AC_TRY_COMPILE([],[return 0;],
++        [ac_cv_gcc_supports_w_no_err_format_truncation=yes],
++        [ac_cv_gcc_supports_w_no_err_format_truncation=no])])
++  CFLAGS="$saved_CFLAGS"
++  AC_MSG_RESULT($ac_cv_gcc_supports_w_no_err_format_truncation)
+ fi
+ # tweak compiler specific flags
+@@ -402,6 +412,9 @@ elif test "x${ax_cv_c_compiler_vendor}"
+     if test "$ac_cv_gcc_supports_w_no_misleading_indentation" = yes; then
+       APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-misleading-indentation)
+     fi
++    if test "$ac_cv_gcc_supports_w_no_err_format_truncation" = yes; then
++      APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-error=format-truncation)
++    fi
+     if test "${enable_64}" = "yes"; then
+       case "$host" in
+              *darwin*)
diff --git a/net/freeswitch/patches/330-do-not-install-freetdm-twice.patch b/net/freeswitch/patches/330-do-not-install-freetdm-twice.patch
new file mode 100644 (file)
index 0000000..a81d60b
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/libs/freetdm/mod_freetdm/Makefile.in
++++ b/libs/freetdm/mod_freetdm/Makefile.in
+@@ -15,7 +15,6 @@ $(FTLA): $(FT_DIR)/.update
+       cd $(FT_DIR) && $(MAKE)
+ local_install:
+-      cd $(FT_DIR) && $(MAKE) install
+       [ -f $(DESTDIR)@confdir@/autoload_configs/freetdm.conf.xml ] || cp -f $(FT_DIR)/conf/freetdm.conf.xml  $(DESTDIR)@confdir@/autoload_configs
+ local_clean:
diff --git a/net/freeswitch/patches/360-fix-APR_TRY_COMPILE_NO_WARNING.patch b/net/freeswitch/patches/360-fix-APR_TRY_COMPILE_NO_WARNING.patch
new file mode 100644 (file)
index 0000000..245e327
--- /dev/null
@@ -0,0 +1,50 @@
+--- a/libs/apr-util/build/apr_common.m4
++++ b/libs/apr-util/build/apr_common.m4
+@@ -493,13 +493,15 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
+  if test "$ac_cv_prog_gcc" = "yes"; then 
+    CFLAGS="$CFLAGS -Werror"
+  fi
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+-  [#include "confdefs.h"
+-  ]
+-  [[$1]]
+-  [int main(int argc, const char *const *argv) {]
+-  [[$2]]
+-  [   return 0; }]])],
++ AC_COMPILE_IFELSE(
++  [AC_LANG_SOURCE(
++   [#include "confdefs.h"
++   ]
++   [[$1]]
++   [int main(int argc, const char *const *argv) {]
++   [[$2]]
++   [   return 0; }]
++  )],
+   [$3], [$4])
+  CFLAGS=$apr_save_CFLAGS
+ ])
+--- a/libs/apr/build/apr_common.m4
++++ b/libs/apr/build/apr_common.m4
+@@ -493,13 +493,15 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
+  if test "$ac_cv_prog_gcc" = "yes"; then 
+    CFLAGS="$CFLAGS -Werror"
+  fi
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+-  [#include "confdefs.h"
+-  ]
+-  [[$1]]
+-  [int main(int argc, const char *const *argv) {]
+-  [[$2]]
+-  [   return 0; }]])],
++ AC_COMPILE_IFELSE(
++  [AC_LANG_SOURCE(
++   [#include "confdefs.h"
++   ]
++   [[$1]]
++   [int main(int argc, const char *const *argv) {]
++   [[$2]]
++   [   return 0; }]
++  )],
+   [$3], [$4])
+  CFLAGS=$apr_save_CFLAGS
+ ])
diff --git a/net/freeswitch/patches/370-procd-compat.patch b/net/freeswitch/patches/370-procd-compat.patch
new file mode 100644 (file)
index 0000000..5bab0f2
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/src/switch_console.c
++++ b/src/switch_console.c
+@@ -1051,10 +1051,12 @@ static void *SWITCH_THREAD_FUNC console_
+       while (running) {
+               int32_t arg = 0;
+-              if (getppid() == 1) {
+-                      switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "We've become an orphan, no more console for us.\n");
+-                      break;
+-              }
++              // Parent PID is 1 when started by procd - so FS is not an orphan.
++              // Plus we still want the output.
++              //if (getppid() == 1) {
++              //      switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "We've become an orphan, no more console for us.\n");
++              //      break;
++              //}
+               switch_core_session_ctl(SCSC_CHECK_RUNNING, &arg);
+               if (!arg) {
diff --git a/net/freeswitch/patches/380-disable-luajit.patch b/net/freeswitch/patches/380-disable-luajit.patch
new file mode 100644 (file)
index 0000000..f384b3a
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -571,7 +571,7 @@ AC_SUBST(SYS_XMLRPC_CFLAGS)
+ AC_SUBST(SYS_XMLRPC_LDFLAGS)
+ AM_CONDITIONAL([SYSTEM_XMLRPCC],[test "${enable_xmlrpcc}" = "yes"])
+-for luaversion in luajit lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua; do
++for luaversion in lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua; do
+   PKG_CHECK_MODULES([LUA],[${luaversion}],[have_lua=yes],[have_lua=no])
+   if test ${have_lua} = yes; then
+     break
diff --git a/net/freeswitch/patches/390-t38-reinvite-488-fix.patch b/net/freeswitch/patches/390-t38-reinvite-488-fix.patch
new file mode 100644 (file)
index 0000000..3492936
--- /dev/null
@@ -0,0 +1,66 @@
+commit 167294ea2649afd0ffedf4520b0f308979c3ca2a
+Author: Sebastian Kemper <sebastian_ml@gmx.net>
+Date:   Fri Oct 18 18:28:07 2019 +0200
+
+    [mod-sofia] Fix reINVITE after T38 is rejected
+    
+    From FS-11833.
+    
+    After FS sends a reINVITE to T38 which gets rejected by peer it is no
+    longer in a state where it can properly answer a reINVITE which requests
+    a change of the media setup.
+    
+    1. FS sends INVITE (destination is a fax machine)
+    2. Call connects with "8 101"
+    3. FS sends reINVITE to T38
+    4. T38 rejected (488)
+    5. FS receives INVITE to "8"
+    6. FS replies with 200 OK without SDP
+    7. Call fails
+    
+    The bug is related to TFLAG_SDP. This flag is set when a media session
+    is established. And when there's a reINVITE sofia_glue_do_invite() from
+    sofia_glue.c is called and clears the flag again:
+    
+    sofia_clear_flag_locked(tech_pvt, TFLAG_SDP);
+    
+    So when FS sends a reINVITE to T38 the flag gets cleared. But when the
+    reINVITE is rejected with 488 the flag is not set again. It stays
+    cleared. So the call continues with the previously negotiated media, fax
+    passthrough (8 101 in this case), but TFLAG_SDP is not set.
+    
+    So when FS receives a reINVITE at this point it doesn't see the need to
+    renegotiate anything, even though it realizes that 2833 DTMF is now off:
+    
+    2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5478 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
+    2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5533 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
+    2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5802 No 2833 in SDP. Disable 2833 dtmf and switch to INFO
+    
+    When FS doesn't send a reINVITE (fax_enable_t38_request=false) and the
+    reINVITE to "8" is received, TFLAG_SDP is still set and then FS
+    understands that it needs to renegotiate and replies with a 200 OK that
+    includes SDP:
+    
+    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5478 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
+    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5533 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
+    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5802 No 2833 in SDP. Disable 2833 dtmf and switch to INFO
+    2019-04-30 16:41:19.358028 [DEBUG] sofia.c:8237 skemper was here in line 8232
+    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:8390 skemper was here in line 8390.
+    2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:8496 Audio params are unchanged for sofia/external/+called_number.
+    2019-04-30 16:41:19.358028 [DEBUG] sofia.c:8243 Processing updated SDP
+    
+    This fixes the state problem after a rejected T38 reINVITE by setting
+    TFLAG_SDP.
+    
+    Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
+
+--- a/src/mod/endpoints/mod_sofia/sofia.c
++++ b/src/mod/endpoints/mod_sofia/sofia.c
+@@ -6536,6 +6536,7 @@ static void sofia_handle_sip_r_invite(sw
+                       switch_channel_clear_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_REQ);
+                       switch_channel_set_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_FAIL);
+                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s T38 invite failed\n", switch_channel_get_name(tech_pvt->channel));
++                      sofia_set_flag(tech_pvt, TFLAG_SDP);
+               }
diff --git a/net/freeswitch/patches/400-disable-sofia-sip-tests.patch b/net/freeswitch/patches/400-disable-sofia-sip-tests.patch
new file mode 100644 (file)
index 0000000..6e7891c
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/libs/sofia-sip/Makefile.am
++++ b/libs/sofia-sip/Makefile.am
+@@ -7,7 +7,7 @@
+ AUTOMAKE_OPTIONS = foreign 1.7
+-SUBDIRS =  libsofia-sip-ua $(GLIB_SUBDIRS) packages tests s2check utils
++SUBDIRS =  libsofia-sip-ua $(GLIB_SUBDIRS) packages # tests s2check utils
+ DIST_SUBDIRS = s2check libsofia-sip-ua libsofia-sip-ua-glib utils packages \
+       tests win32 open_c