aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk11/files
diff options
context:
space:
mode:
authorFlorian Smeets <flo@FreeBSD.org>2012-11-26 23:20:41 +0000
committerFlorian Smeets <flo@FreeBSD.org>2012-11-26 23:20:41 +0000
commit8d1ed531dafb86924486f0b2832509e8b3593939 (patch)
treeab8cec59d46a303db6f96244ace6f2dea4cb67eb /net/asterisk11/files
parentb2604ab826691c6c66f1207b0e0f50a00d7321ff (diff)
downloadports-8d1ed531dafb86924486f0b2832509e8b3593939.tar.gz
ports-8d1ed531dafb86924486f0b2832509e8b3593939.zip
Add Asterisk 11 a new LTS version.
Tested by: wishmaster <artemrts@ukr.net> Feature safe: yes
Notes
Notes: svn path=/head/; revision=307810
Diffstat (limited to 'net/asterisk11/files')
-rw-r--r--net/asterisk11/files/asterisk.in43
-rw-r--r--net/asterisk11/files/patch-Makefile95
-rw-r--r--net/asterisk11/files/patch-agi::Makefile13
-rw-r--r--net/asterisk11/files/patch-channels-chan_dahdi.c33
-rw-r--r--net/asterisk11/files/patch-channels::Makefile29
-rw-r--r--net/asterisk11/files/patch-channels__sip__include__sip.h11
-rw-r--r--net/asterisk11/files/patch-channels_h323_Makefile.in11
-rw-r--r--net/asterisk11/files/patch-configure41
-rw-r--r--net/asterisk11/files/patch-main::utils.c13
-rw-r--r--net/asterisk11/files/patch-main__asterisk.exports.in11
-rw-r--r--net/asterisk11/files/patch-main__lock.c13
11 files changed, 313 insertions, 0 deletions
diff --git a/net/asterisk11/files/asterisk.in b/net/asterisk11/files/asterisk.in
new file mode 100644
index 000000000000..a612850c5603
--- /dev/null
+++ b/net/asterisk11/files/asterisk.in
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: asterisk
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable asterisk:
+#
+# asterisk_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=asterisk
+rcvar=asterisk_enable
+
+extra_commands="reload"
+
+stop_cmd="asterisk_stop"
+reload_cmd="asterisk_reload"
+
+command="%%PREFIX%%/sbin/asterisk"
+command_args="-n -U %%ASTERISK_USER%%"
+pidfile=${asterisk_pidfile:-"/var/run/asterisk/asterisk.pid"}
+
+asterisk_stop() {
+ echo 'Stopping asterisk'
+ $command -nqrx 'core stop now'
+}
+
+asterisk_reload() {
+ echo 'Reloading asterisk'
+ $command -nqrx 'reload'
+}
+
+load_rc_config $name
+
+asterisk_enable=${asterisk_enable:-"NO"}
+
+run_rc_command "$1"
diff --git a/net/asterisk11/files/patch-Makefile b/net/asterisk11/files/patch-Makefile
new file mode 100644
index 000000000000..e0f27c8cccea
--- /dev/null
+++ b/net/asterisk11/files/patch-Makefile
@@ -0,0 +1,95 @@
+--- Makefile.orig 2012-06-13 16:30:34.000000000 +0200
++++ Makefile 2012-08-02 00:12:13.812569306 +0200
+@@ -123,7 +123,7 @@
+ OVERWRITE=y
+
+ # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
+-DEBUG=-g3
++#DEBUG=-g3
+
+ # Asterisk.conf is located in ASTETCDIR or by using the -C flag
+ # when starting Asterisk
+@@ -192,7 +192,7 @@
+
+ ifeq ($(OSARCH),FreeBSD)
+ # -V is understood by BSD Make, not by GNU make.
+- BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
++ BSDVERSION=$(OSVERSION)
+ _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
+ endif
+
+@@ -425,8 +425,12 @@
+ $(INSTALL) -m 644 $$n "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
+ done \
+ fi
++ if [ ! -d $(DESTDIR)$(DOCSDIR)/images ]; then \
++ $(MKDIR) $(DESTDIR)$(DOCSDIR)/images; \
++ fi
++
+ for x in images/*.jpg; do \
+- $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/images" ; \
++ $(INSTALL) -m 644 $$x "$(DESTDIR)$(DOCSDIR)/images" ; \
+ done
+ $(MAKE) -C sounds install
+
+@@ -485,7 +489,7 @@
+ "$(ASTDATADIR)/documentation/thirdparty" "$(ASTDATADIR)/firmware" \
+ "$(ASTDATADIR)/firmware/iax" "$(ASTDATADIR)/images" "$(ASTDATADIR)/keys" \
+ "$(ASTDATADIR)/phoneprov" "$(ASTDATADIR)/static-http" "$(ASTDATADIR)/sounds" \
+- "$(ASTDATADIR)/moh" "$(ASTMANDIR)/man8" "$(AGI_DIR)" "$(ASTDBDIR)"
++ "$(ASTDATADIR)/moh" "$(ASTMANDIR)/man8" "$(AGI_DIR)" "$(ASTDBDIR)" "$(ASTSPOOLDIR)/outgoing"
+
+ installdirs:
+ @for i in $(INSTALLDIRS); do \
+@@ -552,7 +556,7 @@
+ @exit 1
+ endif
+
+-install: badshell bininstall datafiles
++install: badshell bininstall datafiles samples
+ @if [ -x /usr/sbin/asterisk-post-install ]; then \
+ /usr/sbin/asterisk-post-install "$(DESTDIR)" . ; \
+ fi
+@@ -594,29 +598,18 @@
+ else \
+ echo "Installing $$x" ; \
+ fi ; \
+- $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
++ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`-dist ; \
+ done
+
+ samples: adsi
+ @echo Installing other config files...
+ @for x in configs/*.sample; do \
+- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`" ; \
+- if [ -f "$${dst}" ]; then \
+- if [ "$(OVERWRITE)" = "y" ]; then \
+- if cmp -s "$${dst}" "$$x" ; then \
+- echo "Config file $$x is unchanged"; \
+- continue; \
+- fi ; \
+- mv -f "$${dst}" "$${dst}.old" ; \
+- else \
+- echo "Skipping config file $$x"; \
+- continue; \
+- fi ;\
++ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`-dist ; \
++ if [ ! -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \
++ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`; \
+ fi ; \
+- echo "Installing file $$x"; \
+- $(INSTALL) -m 644 "$$x" "$${dst}" ;\
+ done
+- if [ "$(OVERWRITE)" = "y" ]; then \
++ @if true; then \
+ echo "Updating asterisk.conf" ; \
+ sed -e 's|^astetcdir.*$$|astetcdir => $(ASTETCDIR)|' \
+ -e 's|^astmoddir.*$$|astmoddir => $(MODULES_DIR)|' \
+@@ -630,6 +623,7 @@
+ -e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
+ "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
+ $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \
++ $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)-dist" ; \
+ rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
+ fi ; \
+ $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX"
diff --git a/net/asterisk11/files/patch-agi::Makefile b/net/asterisk11/files/patch-agi::Makefile
new file mode 100644
index 000000000000..277e18e70b08
--- /dev/null
+++ b/net/asterisk11/files/patch-agi::Makefile
@@ -0,0 +1,13 @@
+--- ./agi/Makefile.orig 2010-07-23 15:26:41.000000000 +0200
++++ ./agi/Makefile 2010-11-06 14:54:36.000000000 +0100
+@@ -16,7 +16,9 @@
+
+ .PHONY: clean all uninstall
+
+-AGIS=$(MENUSELECT_AGIS)
++AGIS_BIN=eagi-test eagi-sphinx-test
++AGIS_SCR=agi-test.agi jukebox.agi
++AGIS=$(AGIS_SCR) $(AGIS_BIN)
+
+ ifeq ($(OSARCH),SunOS)
+ LIBS+=-lsocket -lnsl
diff --git a/net/asterisk11/files/patch-channels-chan_dahdi.c b/net/asterisk11/files/patch-channels-chan_dahdi.c
new file mode 100644
index 000000000000..ef904b48472e
--- /dev/null
+++ b/net/asterisk11/files/patch-channels-chan_dahdi.c
@@ -0,0 +1,33 @@
+--- channels/chan_dahdi.c.orig 2010-11-09 11:18:39.000000000 +0100
++++ channels/chan_dahdi.c 2010-11-09 11:22:15.000000000 +0100
+@@ -4688,6 +4688,8 @@
+ return;
+ }
+ if (p->echocancel.head.tap_length) {
++ struct dahdi_echocanparams *pecp;
++
+ #if defined(HAVE_PRI) || defined(HAVE_SS7)
+ switch (p->sig) {
+ #if defined(HAVE_PRI)
+@@ -4718,7 +4720,9 @@
+ break;
+ }
+ #endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
+- res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &p->echocancel);
++
++ pecp = &p->echocancel.head;
++ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);
+ if (res) {
+ ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d (%s)\n", p->channel, strerror(errno));
+ } else {
+@@ -4752,8 +4756,9 @@
+
+ if (p->echocanon) {
+ struct dahdi_echocanparams ecp = { .tap_length = 0 };
++ struct dahdi_echocanparams *pecp = &ecp;
+
+- res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &ecp);
++ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);
+
+ if (res)
+ ast_log(LOG_WARNING, "Unable to disable echo cancellation on channel %d: %s\n", p->channel, strerror(errno));
diff --git a/net/asterisk11/files/patch-channels::Makefile b/net/asterisk11/files/patch-channels::Makefile
new file mode 100644
index 000000000000..323c78d86f9a
--- /dev/null
+++ b/net/asterisk11/files/patch-channels::Makefile
@@ -0,0 +1,29 @@
+--- ./channels/Makefile.orig 2010-06-07 22:04:42.000000000 +0200
++++ ./channels/Makefile 2010-11-06 14:54:36.000000000 +0100
+@@ -27,9 +27,10 @@
+ endif
+
+ ifeq ($(OSARCH),FreeBSD)
+- PTLIB=-lpt_FreeBSD_x86_r
+- H323LIB=-lh323_FreeBSD_x86_r
++ PTLIB=-lpt_r
++ H323LIB=-lh323_r
+ CHANH323LIB=-pthread
++ H323LDLIBS=$(PTLIB) $(H323LIB) $(CHANH323LIB)
+ endif
+
+ ifeq ($(OSARCH),NetBSD)
+@@ -86,9 +87,13 @@
+ else
+ chan_h323.so: chan_h323.o h323/libchanh323.a
+ $(ECHO_PREFIX) echo " [LD] $^ -> $@"
++ifeq ($(OSARCH),FreeBSD)
++ $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) -L$(LOCALBASE)/lib $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) $(CHANH323LIB)
++else
+ $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
+ endif
+ endif
++endif
+
+ chan_misdn.o: _ASTCFLAGS+=-Imisdn
+
diff --git a/net/asterisk11/files/patch-channels__sip__include__sip.h b/net/asterisk11/files/patch-channels__sip__include__sip.h
new file mode 100644
index 000000000000..f19fbf763646
--- /dev/null
+++ b/net/asterisk11/files/patch-channels__sip__include__sip.h
@@ -0,0 +1,11 @@
+--- ./channels/sip/include/sip.h.orig 2010-11-08 04:46:46.000000000 +0100
++++ ./channels/sip/include/sip.h 2010-11-08 04:47:07.000000000 +0100
+@@ -180,7 +180,7 @@
+ #define DEFAULT_MOHINTERPRET "default" /*!< The default music class */
+ #define DEFAULT_MOHSUGGEST ""
+ #define DEFAULT_VMEXTEN "asterisk" /*!< Default voicemail extension */
+-#define DEFAULT_CALLERID "asterisk" /*!< Default caller ID */
++#define DEFAULT_CALLERID "Unknown" /*!< Default caller ID */
+ #define DEFAULT_MWI_FROM ""
+ #define DEFAULT_NOTIFYMIME "application/simple-message-summary"
+ #define DEFAULT_ALLOWGUEST TRUE
diff --git a/net/asterisk11/files/patch-channels_h323_Makefile.in b/net/asterisk11/files/patch-channels_h323_Makefile.in
new file mode 100644
index 000000000000..d5d5c99300c1
--- /dev/null
+++ b/net/asterisk11/files/patch-channels_h323_Makefile.in
@@ -0,0 +1,11 @@
+--- ./channels/h323/Makefile.in.orig 2010-06-03 16:48:09.000000000 +0200
++++ ./channels/h323/Makefile.in 2010-11-06 14:54:36.000000000 +0100
+@@ -13,7 +13,7 @@
+ STDCCFLAGS += -I../../include -include ../../include/asterisk/autoconfig.h
+ STDCCFLAGS += -fPIC
+ #OPTCCFLAGS +=
+-CFLAGS = -pipe
++CFLAGS = -pipe @CXXFLAGS@
+ TARGET = libchanh323.a
+ TARGET += Makefile.ast
+ SOURCES = ast_h323.cxx compat_h323.cxx cisco-h225.cxx caps_h323.cxx
diff --git a/net/asterisk11/files/patch-configure b/net/asterisk11/files/patch-configure
new file mode 100644
index 000000000000..298cba379fe6
--- /dev/null
+++ b/net/asterisk11/files/patch-configure
@@ -0,0 +1,41 @@
+--- configure.orig 2012-09-20 20:18:47.000000000 +0200
++++ configure 2012-11-05 14:23:17.172817463 +0100
+@@ -4576,9 +4576,9 @@
+ astlibdir='${libdir}'
+ astmoddir='${libdir}/asterisk/modules'
+ astmandir='${mandir}'
+-astvarlibdir='${localstatedir}/lib/asterisk'
++astvarlibdir='${prefix}/share/asterisk'
+ astdatadir='${astvarlibdir}'
+-astdbdir='${astvarlibdir}'
++astdbdir='${localstatedir}/db/asterisk'
+ astkeydir='${astvarlibdir}'
+ astspooldir='${localstatedir}/spool/asterisk'
+ astlogdir='${localstatedir}/log/asterisk'
+@@ -4601,8 +4601,6 @@
+ case "${host_os}" in
+ freebsd*)
+ ac_default_prefix=/usr/local
+- CPPFLAGS=-I/usr/local/include
+- LDFLAGS=-L/usr/local/lib
+ ;;
+ openbsd*)
+ ac_default_prefix=/usr/local
+@@ -17763,6 +17761,8 @@
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++ #include <sys/types.h>
++ #include <sys/socket.h>
+ #include <ifaddrs.h>
+ int
+ main ()
+@@ -25968,7 +25968,7 @@
+
+ fi
+
+- PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
++ PLATFORM_OPENH323="h323_${OPENH323_SUFFIX}"
+
+ if test "${HAS_OPENH323:-unset}" != "unset"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 installation validity" >&5
diff --git a/net/asterisk11/files/patch-main::utils.c b/net/asterisk11/files/patch-main::utils.c
new file mode 100644
index 000000000000..7440848a1521
--- /dev/null
+++ b/net/asterisk11/files/patch-main::utils.c
@@ -0,0 +1,13 @@
+--- ./main/utils.c.orig 2010-08-06 20:57:10.000000000 +0200
++++ ./main/utils.c 2010-11-06 14:54:37.000000000 +0100
+@@ -990,8 +990,8 @@
+ pthread_attr_init(attr);
+ }
+
+-#ifdef __linux__
+- /* On Linux, pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
++#ifdef __linux__ || defined(__FreeBSD__)
++ /* On Linux and FreeBSD, pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
+ which is kind of useless. Change this here to
+ PTHREAD_INHERIT_SCHED; that way the -p option to set realtime
+ priority will propagate down to new threads by default.
diff --git a/net/asterisk11/files/patch-main__asterisk.exports.in b/net/asterisk11/files/patch-main__asterisk.exports.in
new file mode 100644
index 000000000000..438dd1034eca
--- /dev/null
+++ b/net/asterisk11/files/patch-main__asterisk.exports.in
@@ -0,0 +1,11 @@
+--- main/asterisk.exports.in.orig 2012-04-10 21:44:03.532803004 +0200
++++ main/asterisk.exports.in 2012-04-10 21:44:41.134621539 +0200
+@@ -44,6 +44,8 @@
+ LINKER_SYMBOL_PREFIXres_srtp;
+ LINKER_SYMBOL_PREFIXres_srtp_policy;
+ LINKER_SYMBOL_PREFIXsecure_call_info;
++ LINKER_SYMBOL_PREFIX__progname;
++ LINKER_SYMBOL_PREFIXenviron;
+ local:
+ *;
+ };
diff --git a/net/asterisk11/files/patch-main__lock.c b/net/asterisk11/files/patch-main__lock.c
new file mode 100644
index 000000000000..a802d8817a1e
--- /dev/null
+++ b/net/asterisk11/files/patch-main__lock.c
@@ -0,0 +1,13 @@
+--- ./main/lock.c.orig 2010-11-06 15:00:15.000000000 +0100
++++ ./main/lock.c 2010-11-06 15:00:23.000000000 +0100
+@@ -679,10 +679,6 @@
+
+ pthread_rwlockattr_init(&attr);
+
+-#ifdef HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP
+- pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NP);
+-#endif
+-
+ res = pthread_rwlock_init(&t->lock, &attr);
+ pthread_rwlockattr_destroy(&attr);
+ return res;