mirror of
https://git.openwrt.org/feed/telephony.git
synced 2025-01-09 12:17:28 +08:00
Add freeswitch package.
Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
This commit is contained in:
parent
4f7f701646
commit
845f3322f5
1086
freeswitch/Makefile
Normal file
1086
freeswitch/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
11
freeswitch/files/freeswitch.config
Normal file
11
freeswitch/files/freeswitch.config
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
config 'global' 'state'
|
||||||
|
option 'started' '0'
|
||||||
|
|
||||||
|
config 'profile_top' 'internal_top'
|
||||||
|
|
||||||
|
config 'profile_top' 'external_top'
|
||||||
|
|
||||||
|
config 'external_gateway' 'external_example'
|
||||||
|
|
||||||
|
|
11
freeswitch/files/freeswitch.default
Normal file
11
freeswitch/files/freeswitch.default
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#FS_DIR="/opt"
|
||||||
|
FS_DIR_ETC="$FS_DIR/etc/freeswitch"
|
||||||
|
FS_DIR_MOD="$FS_DIR/usr/lib/freeswitch"
|
||||||
|
FS_DIR_DB="$FS_DIR/tmp/freeswitch/db"
|
||||||
|
FS_DIR_LOG="$FS_DIR/tmp/freeswitch/log"
|
||||||
|
FS_DIR_SCRIPTS="$FS_DIR/usr/share/freeswitch/scripts"
|
||||||
|
FS_DIR_HTDOCS="$FS_DIR/usr/share/freeswitch/htdocs"
|
||||||
|
FS_DIR_RECORDINGS="/var/lib/freeswitch/recordings" # NOTE: must be changed in config as well
|
||||||
|
FS_DIR_VM_STORAGE="/var/lib/freeswitch/storage" # NOTE: must be changed in config as well
|
||||||
|
|
||||||
|
OPTIONS="-conf $FS_DIR_ETC -log $FS_DIR_LOG -db $FS_DIR_DB -mod $FS_DIR_MOD -htdocs $FS_DIR_HTDOCS -scripts $FS_DIR_SCRIPTS"
|
65
freeswitch/files/freeswitch.hotplug
Normal file
65
freeswitch/files/freeswitch.hotplug
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
|
LOAD_STATE=1
|
||||||
|
|
||||||
|
if [ "$ACTION" = "ifup" ]; then
|
||||||
|
/etc/init.d/freeswitch enabled && {
|
||||||
|
local not_all_up="$(sh -c '
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
LOAD_STATE=1
|
||||||
|
local if_is_down=0
|
||||||
|
local network_ignore=""
|
||||||
|
|
||||||
|
check_if_down () {
|
||||||
|
local cfg="$1"
|
||||||
|
local up
|
||||||
|
local proto
|
||||||
|
config_get_bool up "$1" up 0
|
||||||
|
config_get proto "$1" proto
|
||||||
|
if [ "$proto" != "none" ] && [ "$up" -ne 1 ]; then
|
||||||
|
local new_down=1
|
||||||
|
local oIFS="$IFS"
|
||||||
|
local ignore
|
||||||
|
IFS=" "
|
||||||
|
for ignore in $network_ignore; do
|
||||||
|
[ "$cfg" = "$ignore" ] && new_down=0
|
||||||
|
done
|
||||||
|
IFS="$oIFS"
|
||||||
|
[ "$new_down" = "1" ] && if_is_down=1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
append_ignore() {
|
||||||
|
local cfg="$1"
|
||||||
|
local network
|
||||||
|
config_get network "$1" network
|
||||||
|
append network_ignore "$network"
|
||||||
|
}
|
||||||
|
|
||||||
|
LOAD_STATE=1
|
||||||
|
config_load freeswitch
|
||||||
|
config_foreach append_ignore network_ignore
|
||||||
|
config_load network
|
||||||
|
config_foreach check_if_down interface
|
||||||
|
|
||||||
|
echo "$if_is_down"
|
||||||
|
')"
|
||||||
|
[ "$not_all_up" = "0" ] && {
|
||||||
|
local started
|
||||||
|
{
|
||||||
|
mkdir -p /tmp/freeswitch
|
||||||
|
lock /tmp/freeswitch/.start.lck
|
||||||
|
config_load freeswitch
|
||||||
|
config_get started "state" started
|
||||||
|
[ "$started" != "1" ] && {
|
||||||
|
/etc/init.d/freeswitch start
|
||||||
|
uci_set_state freeswitch global state started 1
|
||||||
|
}
|
||||||
|
lock -u /tmp/freeswitch/.start.lck
|
||||||
|
} &
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
40
freeswitch/files/freeswitch.init
Normal file
40
freeswitch/files/freeswitch.init
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
START=90
|
||||||
|
|
||||||
|
DEFAULT=/etc/default/freeswitch
|
||||||
|
OPTIONS=""
|
||||||
|
|
||||||
|
boot() {
|
||||||
|
# Do nothing on boot
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
|
mkdir -p $FS_DIR_DB
|
||||||
|
mkdir -p $FS_DIR_LOG
|
||||||
|
mkdir -p $FS_DIR_RECORDINGS
|
||||||
|
mkdir -p $FS_DIR_VM_STORAGE
|
||||||
|
ulimit -s 240
|
||||||
|
$FS_DIR/usr/bin/freeswitch $OPTIONS -nc
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
|
$FS_DIR/usr/bin/freeswitch $OPTIONS -stop
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
# stopping freeswitch is non-blocking, so we wait until freeswitch's
|
||||||
|
# event socket is down, and then wait an additional ten seconds so that
|
||||||
|
# freeswitch should be completely shutdown before we start it again
|
||||||
|
local retval
|
||||||
|
stop
|
||||||
|
fs_cli -x status >/dev/null 2>&1
|
||||||
|
retval=$?
|
||||||
|
while [ $retval -eq 0 ]; do sleep 1; fs_cli -x status >/dev/null 2>&1; retval=$?; done
|
||||||
|
sleep 10
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
10
freeswitch/patches/000-build-openwrt_rules.mk.patch
Normal file
10
freeswitch/patches/000-build-openwrt_rules.mk.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- /dev/null
|
||||||
|
+++ b/build/openwrt_rules.mk
|
||||||
|
@@ -0,0 +1,7 @@
|
||||||
|
+OPENWRT_DIR=$(shell (cd $(BASE)/../../..;pwd))
|
||||||
|
+STAGING_PREFIX=$(OPENWRT_DIR)/staging_dir/host
|
||||||
|
+STAGING_DIR=$(OPENWRT_DIR)/staging_dir/$(shell (cd $(BASE)/..;basename `pwd`))
|
||||||
|
+ARCH="$(shell grep CONFIG_ARCH $(OPENWRT_DIR)/.config|cut -d= -d'"' -f2)"
|
||||||
|
+GNU_TARGET_NAME=$(ARCH)-openwrt-linux
|
||||||
|
+
|
||||||
|
+include $(OPENWRT_DIR)/rules.mk
|
65
freeswitch/patches/001-build-modules_conf_in.patch
Normal file
65
freeswitch/patches/001-build-modules_conf_in.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
--- a/build/modules.conf.in
|
||||||
|
+++ b/build/modules.conf.in
|
||||||
|
@@ -3,6 +3,9 @@
|
||||||
|
#applications/mod_blacklist
|
||||||
|
#applications/mod_callcenter
|
||||||
|
#applications/mod_cidlookup
|
||||||
|
+#applications/mod_skel
|
||||||
|
+#applications/mod_mp4
|
||||||
|
+#applications/mod_protovm
|
||||||
|
applications/mod_cluechoo
|
||||||
|
applications/mod_commands
|
||||||
|
applications/mod_conference
|
||||||
|
@@ -27,6 +30,7 @@ applications/mod_httapi
|
||||||
|
#applications/mod_memcache
|
||||||
|
#applications/mod_mongo
|
||||||
|
#applications/mod_nibblebill
|
||||||
|
+#applications/mod_oreka
|
||||||
|
#applications/mod_osp
|
||||||
|
#applications/mod_redis
|
||||||
|
#applications/mod_rss
|
||||||
|
@@ -34,6 +38,7 @@ applications/mod_sms
|
||||||
|
#applications/mod_snapshot
|
||||||
|
#applications/mod_snipe_hunt
|
||||||
|
#applications/mod_snom
|
||||||
|
+#applications/mod_sonar
|
||||||
|
#applications/mod_soundtouch
|
||||||
|
applications/mod_spandsp
|
||||||
|
#applications/mod_spy
|
||||||
|
@@ -61,17 +66,20 @@ codecs/mod_h26x
|
||||||
|
codecs/mod_vp8
|
||||||
|
#codecs/mod_ilbc
|
||||||
|
#codecs/mod_isac
|
||||||
|
+#codecs/mod_mp4v
|
||||||
|
#codecs/mod_opus
|
||||||
|
#codecs/mod_sangoma_codec
|
||||||
|
#codecs/mod_silk
|
||||||
|
#codecs/mod_siren
|
||||||
|
codecs/mod_speex
|
||||||
|
+#codecs/mod_theora
|
||||||
|
dialplans/mod_dialplan_asterisk
|
||||||
|
#dialplans/mod_dialplan_directory
|
||||||
|
dialplans/mod_dialplan_xml
|
||||||
|
#directories/mod_ldap
|
||||||
|
#endpoints/mod_alsa
|
||||||
|
#endpoints/mod_dingaling
|
||||||
|
+#endpoints/mod_gsmopen
|
||||||
|
#endpoints/mod_h323
|
||||||
|
#endpoints/mod_html5
|
||||||
|
#endpoints/mod_khomp
|
||||||
|
@@ -88,6 +96,7 @@ event_handlers/mod_cdr_csv
|
||||||
|
event_handlers/mod_cdr_sqlite
|
||||||
|
#event_handlers/mod_erlang_event
|
||||||
|
#event_handlers/mod_event_multicast
|
||||||
|
+#event_handlers/mod_json_cdr
|
||||||
|
event_handlers/mod_event_socket
|
||||||
|
#event_handlers/mod_event_zmq
|
||||||
|
#event_handlers/mod_radius_cdr
|
||||||
|
@@ -113,6 +122,7 @@ loggers/mod_syslog
|
||||||
|
#say/mod_say_de
|
||||||
|
say/mod_say_en
|
||||||
|
#say/mod_say_es
|
||||||
|
+#say/mod_say_fa
|
||||||
|
#say/mod_say_fr
|
||||||
|
#say/mod_say_he
|
||||||
|
#say/mod_say_hu
|
20
freeswitch/patches/002-configure_in.patch
Normal file
20
freeswitch/patches/002-configure_in.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -152,7 +152,7 @@ if test "${enable_optimizer}" = "yes" ;
|
||||||
|
AX_CC_MAXOPT
|
||||||
|
fi
|
||||||
|
|
||||||
|
-AX_PATH_LIBGNUTLS()
|
||||||
|
+#AX_PATH_LIBGNUTLS()
|
||||||
|
|
||||||
|
# set defaults for use on all platforms
|
||||||
|
SWITCH_AM_CFLAGS="-I${switch_srcdir}/src/include -I${switch_builddir}/src/include -I${switch_srcdir}/libs/libteletone/src -I${switch_srcdir}/libs/stfu"
|
||||||
|
@@ -581,7 +581,7 @@ AC_CHECK_LIB(pthread, pthread_setschedpa
|
||||||
|
|
||||||
|
AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
|
||||||
|
|
||||||
|
-AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])])
|
||||||
|
+# AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])])
|
||||||
|
AC_CHECK_LIB(util, openpty, [AC_DEFINE(HAVE_OPENPTY, 1, [Define if you have openpty()])])
|
||||||
|
|
||||||
|
AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[
|
48
freeswitch/patches/003-Makefile.am.patch
Normal file
48
freeswitch/patches/003-Makefile.am.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -1,3 +1,7 @@
|
||||||
|
+BASE=.
|
||||||
|
+
|
||||||
|
+include $(BASE)/build/openwrt_rules.mk
|
||||||
|
+
|
||||||
|
EXTRA_DIST =
|
||||||
|
SUBDIRS = . src
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
@@ -164,7 +168,6 @@ ZRTP_LIBS = -lbn -lzrtp
|
||||||
|
libfreeswitch_la_LDFLAGS += $(ZRTP_LDFLAGS)
|
||||||
|
libfreeswitch_la_LIBADD += $(ZRTP_LIBS)
|
||||||
|
CORE_LIBS += libs/libzrtp/libzrtp.a
|
||||||
|
-LIBS += libs/libzrtp/third_party/bnlib/libbn.a
|
||||||
|
endif
|
||||||
|
|
||||||
|
library_includedir = $(includedir)
|
||||||
|
@@ -422,7 +425,7 @@ $(switch_builddir)/quiet_libtool: $(swit
|
||||||
|
@cat libtool | sed -e 's|$$show "$$command"|if test -z "$$suppress_output" ; then $$show "Compiling $$srcfile ..." ; fi|' > $(switch_builddir)/quiet_libtool
|
||||||
|
|
||||||
|
build/print_git_revision: build/print_git_revision.c
|
||||||
|
- $(CC) -o $@ $<
|
||||||
|
+ $(HOSTCC) -o $@ $<
|
||||||
|
|
||||||
|
src/include/switch_version.h: src/include/switch_version.h.in Makefile build/print_git_revision $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
|
||||||
|
@cat $< > $@; \
|
||||||
|
@@ -648,7 +651,9 @@ sndfile-reconf:
|
||||||
|
|
||||||
|
tiff-reconf:
|
||||||
|
cd libs/tiff-4.0.2 && autoreconf -fi
|
||||||
|
- cd libs/tiff-4.0.2 && sh ./configure.gnu
|
||||||
|
+ cd libs/tiff-4.0.2 && sh ./configure.gnu --host="$(GNU_TARGET_NAME)" --prefix="/usr"
|
||||||
|
+ cd libs/spandsp && autoreconf -fi
|
||||||
|
+ cd libs/spandsp && sh ./configure.gnu --host="$(GNU_TARGET_NAME)" --prefix="/usr"
|
||||||
|
cd libs/tiff-4.0.2 && make
|
||||||
|
|
||||||
|
python-reconf:
|
||||||
|
@@ -673,9 +678,6 @@ iks-reconf:
|
||||||
|
$(MAKE) mod_dingaling-clean
|
||||||
|
|
||||||
|
spandsp-reconf: tiff-reconf
|
||||||
|
- cd libs/spandsp && $(MAKE) clean || echo
|
||||||
|
- cd libs/spandsp && autoreconf -fi
|
||||||
|
- cd libs/spandsp && sh ./configure.gnu --prefix=$(prefix)
|
||||||
|
cd libs/spandsp && $(MAKE)
|
||||||
|
|
||||||
|
sofia-reconf:
|
22
freeswitch/patches/100-libs-esl-Makefile.patch
Normal file
22
freeswitch/patches/100-libs-esl-Makefile.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- a/libs/esl/Makefile
|
||||||
|
+++ b/libs/esl/Makefile
|
||||||
|
@@ -7,7 +7,7 @@ PICKY=-O2
|
||||||
|
CFLAGS=$(BASE_FLAGS) $(PICKY)
|
||||||
|
CXXFLAGS=$(BASE_FLAGS)
|
||||||
|
MYLIB=libesl.a
|
||||||
|
-LIBS=-lncurses -lesl -lpthread -lm
|
||||||
|
+LIBS=-L$(STAGING_DIR)/usr/lib -lncurses -lesl -lpthread -lm
|
||||||
|
LDFLAGS=-L.
|
||||||
|
OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o src/esl_json.o src/esl_buffer.o
|
||||||
|
SRC=src/esl.c src/esl_json.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_oop.cpp src/esl_json.c src/esl_buffer.c
|
||||||
|
@@ -19,8 +19,8 @@ OBJS += src/esl_oop.o
|
||||||
|
all: $(MYLIB) fs_cli testclient testserver ivrd
|
||||||
|
|
||||||
|
$(MYLIB): $(OBJS) $(HEADERS) $(SRC)
|
||||||
|
- ar rcs $(MYLIB) $(OBJS)
|
||||||
|
- ranlib $(MYLIB)
|
||||||
|
+ $(AR) rcs $(MYLIB) $(OBJS)
|
||||||
|
+ $(RANLIB) $(MYLIB)
|
||||||
|
|
||||||
|
testserver: $(MYLIB) testserver.c
|
||||||
|
$(CC) $(CC_CFLAGS) $(CFLAGS) testserver.c -o testserver $(LDFLAGS) $(LIBS)
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/libs/spandsp/src/spandsp/fast_convert.h
|
||||||
|
+++ b/libs/spandsp/src/spandsp/fast_convert.h
|
||||||
|
@@ -195,7 +195,7 @@ extern "C"
|
||||||
|
{
|
||||||
|
return (long int) (x);
|
||||||
|
}
|
||||||
|
-#elif defined(__ppc__) || defined(__powerpc__)
|
||||||
|
+#elif 0 /* defined(__ppc__) || defined(__powerpc__) */
|
||||||
|
static __inline__ long int lfastrint(register double x)
|
||||||
|
{
|
||||||
|
int res[2];
|
11
freeswitch/patches/103-libs-spandsp-src-t4_rx_c.patch
Normal file
11
freeswitch/patches/103-libs-spandsp-src-t4_rx_c.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/libs/spandsp/src/t4_rx.c
|
||||||
|
+++ b/libs/spandsp/src/t4_rx.c
|
||||||
|
@@ -45,7 +45,7 @@
|
||||||
|
#include <math.h>
|
||||||
|
#endif
|
||||||
|
#include "floating_fudge.h"
|
||||||
|
-#include <tiffio.h>
|
||||||
|
+#include <tiffiop.h>
|
||||||
|
|
||||||
|
#include "spandsp/telephony.h"
|
||||||
|
#include "spandsp/logging.h"
|
11
freeswitch/patches/104-libs-spandsp-src-t4_tx_c.patch
Normal file
11
freeswitch/patches/104-libs-spandsp-src-t4_tx_c.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/libs/spandsp/src/t4_tx.c
|
||||||
|
+++ b/libs/spandsp/src/t4_tx.c
|
||||||
|
@@ -45,7 +45,7 @@
|
||||||
|
#include <math.h>
|
||||||
|
#endif
|
||||||
|
#include "floating_fudge.h"
|
||||||
|
-#include <tiffio.h>
|
||||||
|
+#include <tiffiop.h>
|
||||||
|
|
||||||
|
#include "spandsp/telephony.h"
|
||||||
|
#include "spandsp/logging.h"
|
13
freeswitch/patches/105-libs-xmlrpc-c-config_mk_in.patch
Normal file
13
freeswitch/patches/105-libs-xmlrpc-c-config_mk_in.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- a/libs/xmlrpc-c/config.mk.in
|
||||||
|
+++ b/libs/xmlrpc-c/config.mk.in
|
||||||
|
@@ -335,8 +335,8 @@ endif
|
||||||
|
# The cross compiling user can update config.mk or override
|
||||||
|
# BUILDTOOL_CC on a make command.
|
||||||
|
|
||||||
|
-BUILDTOOL_CC = $(CC)
|
||||||
|
-BUILDTOOL_CCLD = $(CCLD)
|
||||||
|
+BUILDTOOL_CC = $(HOSTCC)
|
||||||
|
+BUILDTOOL_CCLD = $(HOSTCC)
|
||||||
|
|
||||||
|
# Here are the commands 'make install' uses to install various kinds of files:
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
--- a/libs/xmlrpc-c/lib/expat/gennmtab/Makefile
|
||||||
|
+++ b/libs/xmlrpc-c/lib/expat/gennmtab/Makefile
|
||||||
|
@@ -1,3 +1,5 @@
|
||||||
|
+TOPDIR=$(shell (cd $(SRCDIR)/../../../../..; pwd))
|
||||||
|
+
|
||||||
|
ifeq ($(SRCDIR),)
|
||||||
|
updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
|
||||||
|
EXPATDIR := $(call updir,$(CURDIR))
|
||||||
|
@@ -7,6 +9,7 @@ ifeq ($(SRCDIR),)
|
||||||
|
endif
|
||||||
|
SUBDIR := lib/expat/gennmtab
|
||||||
|
|
||||||
|
+include $(TOPDIR)/rules.mk
|
||||||
|
include $(BLDDIR)/config.mk
|
||||||
|
|
||||||
|
LDFLAGS = $(LADD)
|
@ -0,0 +1,20 @@
|
|||||||
|
--- a/libs/libzrtp/include/zrtp_config.h
|
||||||
|
+++ b/libs/libzrtp/include/zrtp_config.h
|
||||||
|
@@ -66,8 +66,16 @@
|
||||||
|
* If the byte order is not specified manually in zrtp_config_user.h - try to detect it automatically
|
||||||
|
*/
|
||||||
|
#if !defined(ZRTP_BYTE_ORDER)
|
||||||
|
+#if defined(linux) || defined(__linux)
|
||||||
|
|
||||||
|
-#if defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \
|
||||||
|
+#include <endian.h>
|
||||||
|
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
+#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
|
||||||
|
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
+#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#elif defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \
|
||||||
|
defined(__i386) || defined(_M_IX86) || defined(__I86__)
|
||||||
|
/*
|
||||||
|
* Generic i386 processor family, little-endian
|
27
freeswitch/patches/200-src-include-timerfd_wrap_h.patch
Normal file
27
freeswitch/patches/200-src-include-timerfd_wrap_h.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
--- a/src/include/timerfd_wrap.h
|
||||||
|
+++ b/src/include/timerfd_wrap.h
|
||||||
|
@@ -55,20 +55,12 @@ SWITCH_BEGIN_EXTERN_C
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __NR_timerfd
|
||||||
|
-#if defined(__x86_64__)
|
||||||
|
-#define __NR_timerfd_create 283
|
||||||
|
-#define __NR_timerfd_settime 286
|
||||||
|
-#define __NR_timerfd_gettime 287
|
||||||
|
-#elif defined(__i386__)
|
||||||
|
-#define __NR_timerfd_create 322
|
||||||
|
-#define __NR_timerfd_settime 325
|
||||||
|
-#define __NR_timerfd_gettime 326
|
||||||
|
-#else
|
||||||
|
-#error invalid system
|
||||||
|
-#endif
|
||||||
|
+#include <linux/unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#define TFD_TIMER_ABSTIME (1 << 0)
|
||||||
|
+#ifndef TFD_TIMER_ABSTIME
|
||||||
|
+#include <sys/timerfd.h>
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
int timerfd_create(int clockid, int flags)
|
||||||
|
{
|
@ -0,0 +1,13 @@
|
|||||||
|
--- a/src/mod/applications/mod_mp4/mp4_helper.hpp
|
||||||
|
+++ b/src/mod/applications/mod_mp4/mp4_helper.hpp
|
||||||
|
@@ -22,8 +22,9 @@ the Initial Developer. All Rights Reserv
|
||||||
|
#ifndef MP4_HELPER_HPP_
|
||||||
|
#define MP4_HELPER_HPP_
|
||||||
|
|
||||||
|
+#include <string.h>
|
||||||
|
+#include <sys/types.h>
|
||||||
|
#include <mp4.h>
|
||||||
|
-#include <string>
|
||||||
|
#include <exception>
|
||||||
|
#include <string>
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
--- a/src/mod/codecs/mod_opus/Makefile
|
||||||
|
+++ b/src/mod/codecs/mod_opus/Makefile
|
||||||
|
@@ -12,12 +12,13 @@ OPUS_LA=$(OPUS_BUILDDIR)/.libs/libopus.l
|
||||||
|
LOCAL_LIBADD=$(OPUS_LA)
|
||||||
|
|
||||||
|
include $(BASE)/build/modmake.rules
|
||||||
|
+include $(BASE)/build/openwrt_rules.mk
|
||||||
|
|
||||||
|
$(OPUS_DIR):
|
||||||
|
$(GETLIB) $(OPUS).tar.gz
|
||||||
|
|
||||||
|
$(OPUS_DIR)/Makefile: $(OPUS_DIR)
|
||||||
|
- cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure --disable-shared --with-pic --srcdir=$(OPUS_DIR)
|
||||||
|
+ cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure --host=$(GNU_TARGET_NAME) --disable-shared --with-pic --srcdir=$(OPUS_DIR)
|
||||||
|
$(TOUCH_TARGET)
|
||||||
|
|
||||||
|
$(OPUS_LA): $(OPUS_DIR)/Makefile
|
@ -0,0 +1,15 @@
|
|||||||
|
--- a/src/mod/codecs/mod_silk/Makefile
|
||||||
|
+++ b/src/mod/codecs/mod_silk/Makefile
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
BASE=../../../..
|
||||||
|
+include $(BASE)/build/openwrt_rules.mk
|
||||||
|
SILK_DIR=$(switch_srcdir)/libs/silk
|
||||||
|
SILK_BUILDDIR=$(switch_builddir)/libs/silk
|
||||||
|
LOCAL_CFLAGS=-I$(SILK_DIR)/src -I$(SILK_DIR)/interface
|
||||||
|
@@ -8,5 +9,5 @@ LOCAL_OBJS=$(BASE)/libs/stfu/stfu.o
|
||||||
|
include $(BASE)/build/modmake.rules
|
||||||
|
|
||||||
|
$(SILK_LA): $(SILK_DIR)/.update
|
||||||
|
- cd $(SILK_BUILDDIR) && ./configure --disable-shared && make clean && $(MAKE)
|
||||||
|
+ cd $(SILK_BUILDDIR) && ./configure --host=$(GNU_TARGET_NAME) --disable-shared && make clean && $(MAKE)
|
||||||
|
$(TOUCH_TARGET)
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/mod/directories/mod_ldap/Makefile
|
||||||
|
+++ b/src/mod/directories/mod_ldap/Makefile
|
||||||
|
@@ -21,7 +21,7 @@ $(LDAP_DIR):
|
||||||
|
|
||||||
|
$(LDAP_BUILDDIR)/Makefile: $(LDAP_DIR)
|
||||||
|
mkdir -p $(LDAP_BUILDDIR)
|
||||||
|
- cd $(LDAP_BUILDDIR) && $(DEFAULT_VARS) $(LDAP_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(LDAP_DIR)
|
||||||
|
+ cd $(LDAP_BUILDDIR) && $(DEFAULT_VARS) $(LDAP_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(LDAP_DIR) --with-yielding_select=yes
|
||||||
|
$(TOUCH_TARGET)
|
||||||
|
|
||||||
|
$(LDAPLA) $(LIBLBERLA): $(LDAP_BUILDDIR)/Makefile
|
@ -0,0 +1,20 @@
|
|||||||
|
--- a/src/mod/endpoints/mod_gsmopen/Makefile
|
||||||
|
+++ b/src/mod/endpoints/mod_gsmopen/Makefile
|
||||||
|
@@ -1,5 +1,15 @@
|
||||||
|
+BASE=../../../..
|
||||||
|
MODNAME=mod_gsmopen
|
||||||
|
-LOCAL_CFLAGS += -I../../../../libs/spandsp/src -I../../../..//libs/tiff-4.0.2/libtiff -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\"
|
||||||
|
-LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16 -lgsmme
|
||||||
|
+SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
|
||||||
|
+
|
||||||
|
+TIFF_DIR="$(shell ls -d $(switch_srcdir)/libs/tiff*)"
|
||||||
|
+TIFF_BUILDDIR=$(TIFF_DIR)
|
||||||
|
+TIFF_LA=$(TIFF_BUILDDIR)/libtiff/libtiff.la
|
||||||
|
+
|
||||||
|
+SPANDSP_DIR=$(switch_srcdir)/libs/spandsp
|
||||||
|
+SPANDSP_BUILDDIR=$(switch_builddir)/libs/spandsp
|
||||||
|
+SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
|
||||||
|
+LOCAL_CFLAGS += $(SVNDEF) -I$(BASE)/libs/spandsp/src -I$(TIFF_DIR)/libtiff -I$(BASE)/src/mod/endpoints/mod_gsmopen/libctb-0.16/include -fpermissive
|
||||||
|
+LOCAL_LDFLAGS=-L$(BASE)/libs/spandsp/src -lspandsp -L$(BASE)/src/mod/endpoints/mod_gsmopen/libctb-0.16/lib -lctb-0.16
|
||||||
|
LOCAL_OBJS=gsmopen_protocol.o
|
||||||
|
include ../../../../build/modmake.rules
|
@ -0,0 +1,16 @@
|
|||||||
|
--- a/src/mod/event_handlers/mod_snmp/Makefile
|
||||||
|
+++ b/src/mod/event_handlers/mod_snmp/Makefile
|
||||||
|
@@ -1,7 +1,10 @@
|
||||||
|
-include ../../../../build/modmake.rules
|
||||||
|
+BASE=../../../..
|
||||||
|
+
|
||||||
|
+include $(BASE)/build/modmake.rules
|
||||||
|
+include $(BASE)/build/openwrt_rules.mk
|
||||||
|
+
|
||||||
|
+LOCAL_CFLAGS=$(shell $(STAGING_DIR)/host/bin/net-snmp-config --cflags --agent-libs) -DNETSNMP_NO_INLINE
|
||||||
|
|
||||||
|
-LOCAL_CFLAGS=`net-snmp-config --cflags`
|
||||||
|
-LOCAL_LDFLAGS=`net-snmp-config --agent-libs`
|
||||||
|
LOCAL_OBJS=subagent.o
|
||||||
|
|
||||||
|
local_depend: $(LOCAL_OBJS)
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/mod/xml_int/mod_xml_ldap/Makefile
|
||||||
|
+++ b/src/mod/xml_int/mod_xml_ldap/Makefile
|
||||||
|
@@ -14,7 +14,7 @@ LOCAL_LIBADD=$(LDAPLA) $(LIBLBERLA) $(LI
|
||||||
|
|
||||||
|
include $(BASE)/build/modmake.rules
|
||||||
|
|
||||||
|
-DEFAULT_ARGS+= --disable-slapd --disable-slurpd --disable-relay --disable-bdb --disable-hdb
|
||||||
|
+DEFAULT_ARGS+= --disable-slapd --disable-slurpd --disable-relay --disable-bdb --disable-hdb --with-yielding_select=yes
|
||||||
|
|
||||||
|
$(LDAP_DIR):
|
||||||
|
$(GETLIB) $(LDAP).tar.gz
|
@ -0,0 +1,10 @@
|
|||||||
|
--- a/src/mod/xml_int/mod_xml_rpc/Makefile
|
||||||
|
+++ b/src/mod/xml_int/mod_xml_rpc/Makefile
|
||||||
|
@@ -14,7 +14,6 @@ $(XMLRPC_DIR)/lib/abyss/src/date.o\
|
||||||
|
$(XMLRPC_DIR)/src/double.o\
|
||||||
|
$(XMLRPC_DIR)/lib/libutil/error.o\
|
||||||
|
$(XMLRPC_DIR)/lib/abyss/src/file.o\
|
||||||
|
-$(XMLRPC_DIR)/lib/expat/gennmtab/gennmtab.o\
|
||||||
|
$(XMLRPC_DIR)/lib/util/getoptx.o\
|
||||||
|
$(XMLRPC_DIR)/lib/abyss/src/handler.o\
|
||||||
|
$(XMLRPC_DIR)/lib/abyss/src/http.o\
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/mod/codecs/mod_isac/typedefs.h
|
||||||
|
+++ b/src/mod/codecs/mod_isac/typedefs.h
|
||||||
|
@@ -66,7 +66,7 @@
|
||||||
|
#define WEBRTC_ARCH_X86
|
||||||
|
#define WEBRTC_ARCH_32_BITS
|
||||||
|
#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||||
|
-#elif defined(__ARMEL__)
|
||||||
|
+#elif defined(__ARMEL__) || defined(__mips__)
|
||||||
|
// TODO(andrew): We'd prefer to control platform defines here, but this is
|
||||||
|
// currently provided by the Android makefiles. Commented to avoid duplicate
|
||||||
|
// definition warnings.
|
@ -0,0 +1,10 @@
|
|||||||
|
--- a/src/mod/endpoints/mod_dingaling/Makefile
|
||||||
|
+++ b/src/mod/endpoints/mod_dingaling/Makefile
|
||||||
|
@@ -10,7 +10,6 @@ DING_DIR=$(BASE)/libs/libdingaling
|
||||||
|
LOCAL_CFLAGS += -I$(DING_DIR)/src -I$(BASE)/libs/iksemel/include
|
||||||
|
LOCAL_OBJS=$(DING_DIR)/src/libdingaling.o $(DING_DIR)/src/sha1.o $(IKS_LA)
|
||||||
|
LOCAL_SOURCES=$(DING_DIR)/src/libdingaling.c $(DING_DIR)/src/sha1.c $(DING_DIR)/src/libdingaling.h
|
||||||
|
-LOCAL_LDFLAGS=$(LIBGNUTLS_LIBS)
|
||||||
|
include $(BASE)/build/modmake.rules
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user