diff options
Diffstat (limited to 'net/asterisk-devel/files')
22 files changed, 739 insertions, 0 deletions
diff --git a/net/asterisk-devel/files/patch-Makefile b/net/asterisk-devel/files/patch-Makefile new file mode 100644 index 000000000000..a11dc52ae1b5 --- /dev/null +++ b/net/asterisk-devel/files/patch-Makefile @@ -0,0 +1,295 @@ + +$FreeBSD$ + +--- Makefile.orig Tue Sep 2 03:33:42 2003 ++++ Makefile Fri Oct 17 13:33:58 2003 +@@ -39,10 +39,10 @@ + #K6OPT = -DK6OPT + + #Tell gcc to optimize the asterisk's code +-OPTIMIZE=-O6 ++#OPTIMIZE=-O6 + + #Include debug symbols in the executables (-g) and profiling info (-pg) +-DEBUG=-g #-pg ++#DEBUG=-g #-pg + + # New hangup routines for chan_zap.c + # If this flag is uncommented then you need to have new libpri code in your system +@@ -64,7 +64,7 @@ + + # Where to install asterisk after compiling + # Default -> leave empty +-INSTALL_PREFIX= ++INSTALL_PREFIX=${PREFIX} + + # Original busydetect routine + BUSYDETECT = #-DBUSYDETECT +@@ -78,28 +78,28 @@ + # Don't use together with -DBUSYDETECT_TONEONLY + BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE + +-ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk +-ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk ++ASTLIBDIR=$(INSTALL_PREFIX)/lib/asterisk ++ASTVARLIBDIR=$(INSTALL_PREFIX)/share/asterisk + ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk +-ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk +-ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk +-ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk ++ASTSPOOLDIR=/var/spool/asterisk ++ASTLOGDIR=/var/log/asterisk ++ASTHEADERDIR=$(INSTALL_PREFIX)/include/asterisk + ASTCONFPATH=$(ASTETCDIR)/asterisk.conf +-ASTBINDIR=$(INSTALL_PREFIX)/usr/bin +-ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin +-ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run ++ASTBINDIR=$(INSTALL_PREFIX)/bin ++ASTSBINDIR=$(INSTALL_PREFIX)/sbin ++ASTVARRUNDIR=/var/run + + + MODULES_DIR=$(ASTLIBDIR)/modules + AGI_DIR=$(ASTVARLIBDIR)/agi-bin + + INCLUDE=-Iinclude -I../include +-CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY ++CFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY + CFLAGS+=$(OPTIMIZE) + CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) +-ifeq (${OSARCH},OpenBSD) +-CFLAGS+=-pthread ++ifeq (${OSARCH},FreeBSD) ++CFLAGS+=${PTHREAD_CFLAGS} + endif + + CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi) +@@ -131,14 +131,14 @@ + ifeq (${OSARCH},Linux) + LIBS=-ldl + endif +-LIBS+=-lpthread -lncurses -lm -lresolv #-lnjamd ++LIBS+=${PTHREAD_LIBS} -lncurses -lm #-lnjamd + OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \ + translate.o file.o say.o pbx.o cli.o md5.o term.o \ + ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \ + cdr.o tdd.o acl.o rtp.o manager.o asterisk.o ast_expr.o \ + dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \ + astmm.o enum.o srv.o +-CC=gcc ++CC?=gcc + INSTALL=install + + _all: all +@@ -163,13 +163,13 @@ + editline/libedit.a: editline/config.h + $(MAKE) -C editline libedit.a + +-db1-ast/libdb1.a: +- @if [ -d db1-ast ]; then \ +- $(MAKE) -C db1-ast libdb1.a ; \ +- else \ +- echo "You need to do a cvs update -d not just cvs update"; \ +- exit 1; \ +- fi ++#db1-ast/libdb1.a: ++# @if [ -d db1-ast ]; then \ ++# $(MAKE) -C db1-ast libdb1.a ; \ ++# else \ ++# echo "You need to do a cvs update -d not just cvs update"; \ ++# exit 1; \ ++# fi + + ifneq ($(wildcard .depend),) + include .depend +@@ -199,8 +199,8 @@ + ./make_build_h + endif + +-asterisk: editline/libedit.a db1-ast/libdb1.a $(OBJS) +- $(CC) $(DEBUG) -o asterisk -rdynamic $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a ++asterisk: editline/libedit.a $(OBJS) ++ $(CC) $(DEBUG) -o asterisk -rdynamic $(OBJS) $(LIBS) $(LIBEDIT) + + subdirs: + for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done +@@ -214,10 +214,10 @@ + $(MAKE) -C db1-ast clean + + datafiles: all +- mkdir -p $(ASTVARLIBDIR)/sounds/digits ++ $(MKDIR) $(ASTVARLIBDIR)/sounds/digits + for x in sounds/digits/*.gsm; do \ + if grep -q "^%`basename $$x`%" sounds.txt; then \ +- install $$x $(ASTVARLIBDIR)/sounds/digits ; \ ++ $(BSD_INSTALL_DATA) $$x $(ASTVARLIBDIR)/sounds/digits ; \ + else \ + echo "No description for $$x"; \ + exit 1; \ +@@ -225,18 +225,18 @@ + done + for x in sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-*; do \ + if grep -q "^%`basename $$x`%" sounds.txt; then \ +- install $$x $(ASTVARLIBDIR)/sounds ; \ ++ $(BSD_INSTALL_DATA) $$x $(ASTVARLIBDIR)/sounds ; \ + else \ + echo "No description for $$x"; \ + exit 1; \ + fi; \ + done +- mkdir -p $(ASTVARLIBDIR)/mohmp3 +- mkdir -p $(ASTVARLIBDIR)/images ++ $(MKDIR) $(ASTVARLIBDIR)/mohmp3 ++ $(MKDIR) $(ASTVARLIBDIR)/images + for x in images/*.jpg; do \ +- install $$x $(ASTVARLIBDIR)/images ; \ ++ $(BSD_INSTALL_DATA) $$x $(ASTVARLIBDIR)/images ; \ + done +- mkdir -p $(AGI_DIR) ++ $(MKDIR) $(AGI_DIR) + + update: + @if [ -d CVS ]; then \ +@@ -248,98 +248,73 @@ + fi + + bininstall: all +- mkdir -p $(MODULES_DIR) +- mkdir -p $(ASTSBINDIR) +- mkdir -p $(ASTETCDIR) +- mkdir -p $(ASTBINDIR) +- mkdir -p $(ASTSBINDIR) +- mkdir -p $(ASTVARRUNDIR) +- mkdir -p $(ASTSPOOLDIR)/voicemail +- install -m 755 asterisk $(ASTSBINDIR)/ +- install -m 755 astgenkey $(ASTSBINDIR)/ +- install -m 755 safe_asterisk $(ASTSBINDIR)/ ++ $(MKDIR) $(MODULES_DIR) ++ $(MKDIR) $(ASTSBINDIR) ++ $(MKDIR) $(ASTETCDIR) ++ $(MKDIR) $(ASTBINDIR) ++ $(MKDIR) $(ASTSBINDIR) ++ $(MKDIR) $(ASTVARRUNDIR) ++ $(MKDIR) $(ASTSPOOLDIR)/voicemail ++ ${BSD_INSTALL_PROGRAM} asterisk $(ASTSBINDIR)/ ++ ${BSD_INSTALL_SCRIPT} astgenkey $(ASTSBINDIR)/ ++ ${BSD_INSTALL_SCRIPT} safe_asterisk $(ASTSBINDIR)/ + for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done +- install -d $(ASTHEADERDIR) +- install include/asterisk/*.h $(ASTHEADERDIR) +- rm -f $(ASTVARLIBDIR)/sounds/vm +- rm -f $(ASTVARLIBDIR)/sounds/voicemail +- if [ ! -h $(ASTSPOOLDIR)/vm ] && [ -d $(ASTSPOOLDIR)/vm ]; then \ +- mv $(ASTSPOOLDIR)/vm $(ASTSPOOLDIR)/voicemail/default; \ +- else \ +- mkdir -p $(ASTSPOOLDIR)/voicemail/default; \ +- rm -f $(ASTSPOOLDIR)/vm; \ +- fi +- ln -s $(ASTSPOOLDIR)/voicemail/default $(ASTSPOOLDIR)/vm +- rm -f $(MODULES_DIR)/chan_ixj.so +- rm -f $(MODULES_DIR)/chan_tor.so +- mkdir -p $(ASTVARLIBDIR)/sounds +- mkdir -p $(ASTLOGDIR)/cdr-csv +- mkdir -p $(ASTVARLIBDIR)/keys +- install -m 644 keys/iaxtel.pub $(ASTVARLIBDIR)/keys +- ( cd $(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/vm . ) +- ( cd $(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . ) +- @echo " +---- Asterisk Installation Complete -------+" +- @echo " + +" +- @echo " + YOU MUST READ THE SECURITY DOCUMENT +" +- @echo " + +" +- @echo " + Asterisk has successfully been installed. +" +- @echo " + If you would like to install the sample +" +- @echo " + configuration files (overwriting any +" +- @echo " + existing config files), run: +" +- @echo " + +" +- @echo " + $(MAKE) samples +" +- @echo " + +" +- @echo " +----------------- or ---------------------+" +- @echo " + +" +- @echo " + You can go ahead and install the asterisk +" +- @echo " + program documentation now or later run: +" +- @echo " + +" +- @echo " + $(MAKE) progdocs +" +- @echo " + +" +- @echo " + **Note** This requires that you have +" +- @echo " + doxygen installed on your local system +" +- @echo " +-------------------------------------------+" ++ $(MKDIR) $(ASTHEADERDIR) ++ ${BSD_INSTALL_DATA} include/asterisk/*.h $(ASTHEADERDIR) ++ $(MKDIR) $(ASTSPOOLDIR)/voicemail/default ++ rm -f $(ASTSPOOLDIR)/vm ++ ln -sf $(ASTSPOOLDIR)/voicemail/default $(ASTSPOOLDIR)/vm ++ $(MKDIR) $(ASTVARLIBDIR)/sounds ++ $(MKDIR) $(ASTLOGDIR)/cdr-csv ++ $(MKDIR) $(ASTVARLIBDIR)/keys ++ ${BSD_INSTALL_DATA} keys/iaxtel.pub $(ASTVARLIBDIR)/keys ++ ( cd $(ASTVARLIBDIR)/sounds; rm -f vm; ln -sf $(ASTSPOOLDIR)/vm . ) ++ ( cd $(ASTVARLIBDIR)/sounds; rm -f voicemail; ln -sf $(ASTSPOOLDIR)/voicemail . ) + +-install: all datafiles bininstall ++install: all datafiles bininstall samples + + upgrade: all bininstall + + adsi: all +- mkdir -p $(ASTETCDIR) ++ $(MKDIR) $(ASTETCDIR) + for x in configs/*.adsi; do \ ++ $(BSD_INSTALL_DATA) $$x $(ASTETCDIR)/`basename $$x`-dist; \ + if ! [ -f $(ASTETCDIRX)/$$x ]; then \ +- install -m 644 $$x $(ASTETCDIR)/`basename $$x` ; \ ++ $(BSD_INSTALL_DATA) $$x $(ASTETCDIR)/`basename $$x` ; \ + fi ; \ + done + + samples: all datafiles adsi +- mkdir -p $(ASTETCDIR) ++ $(MKDIR) $(ASTETCDIR) + for x in configs/*.sample; do \ +- if [ -f $(ASTETCDIR)/`basename $$x .sample` ]; then \ +- mv -f $(ASTETCDIR)/`basename $$x .sample` $(ASTETCDIR)/`basename $$x .sample`.old ; \ ++ $(BSD_INSTALL_DATA) $$x $(ASTETCDIR)/`basename $$x .sample`-dist ;\ ++ if ! [ -f $(ASTETCDIR)/`basename $$x .sample` ]; then \ ++ $(BSD_INSTALL_DATA) $$x $(ASTETCDIR)/`basename $$x .sample` ;\ + fi ; \ +- install $$x $(ASTETCDIR)/`basename $$x .sample` ;\ + done +- echo "[directories]" > $(ASTETCDIR)/asterisk.conf +- echo "astetcdir => $(ASTETCDIR)" >> $(ASTETCDIR)/asterisk.conf +- echo "astmoddir => $(MODULES_DIR)" >> $(ASTETCDIR)/asterisk.conf +- echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(ASTETCDIR)/asterisk.conf +- echo "astagidir => $(AGI_DIR)" >> $(ASTETCDIR)/asterisk.conf +- echo "astspooldir => $(ASTSPOOLDIR)" >> $(ASTETCDIR)/asterisk.conf +- echo "astrundir => $(ASTVARRUNDIR)" >> $(ASTETCDIR)/asterisk.conf +- echo "astlogdir => $(ASTLOGDIR)" >> $(ASTETCDIR)/asterisk.conf ++ echo "[directories]" > $(ASTETCDIR)/asterisk.conf-dist ++ echo "astetcdir => $(ASTETCDIR)" >> $(ASTETCDIR)/asterisk.conf-dist ++ echo "astmoddir => $(MODULES_DIR)" >> $(ASTETCDIR)/asterisk.conf-dist ++ echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(ASTETCDIR)/asterisk.conf-dist ++ echo "astagidir => $(AGI_DIR)" >> $(ASTETCDIR)/asterisk.conf-dist ++ echo "astspooldir => $(ASTSPOOLDIR)" >> $(ASTETCDIR)/asterisk.conf-dist ++ echo "astrundir => $(ASTVARRUNDIR)" >> $(ASTETCDIR)/asterisk.conf-dist ++ echo "astlogdir => $(ASTLOGDIR)" >> $(ASTETCDIR)/asterisk.conf-dist ++ if ! [ -f $(ASTETCDIR)/asterisk.conf ]; then \ ++ $(BSD_INSTALL_DATA) $(ASTETCDIR)/asterisk.conf-dist $(ASTETCDIR)/asterisk.conf; \ ++ fi + for x in sounds/demo-*; do \ + if grep -q "^%`basename $$x`%" sounds.txt; then \ +- install $$x $(ASTVARLIBDIR)/sounds ; \ ++ $(BSD_INSTALL_DATA) $$x $(ASTVARLIBDIR)/sounds ; \ + else \ + echo "No description for $$x"; \ + exit 1; \ + fi; \ + done + for x in sounds/*.mp3; do \ +- install $$x $(ASTVARLIBDIR)/mohmp3 ; \ ++ $(BSD_INSTALL_DATA) $$x $(ASTVARLIBDIR)/mohmp3 ; \ + done +- mkdir -p $(ASTSPOOLDIR)/voicemail/default/1234/INBOX ++ $(MKDIR) $(ASTSPOOLDIR)/voicemail/default/1234/INBOX + :> $(ASTVARLIBDIR)/sounds/voicemail/default/1234/unavail.gsm + for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \ + cat $(ASTVARLIBDIR)/sounds/$$x.gsm >> $(ASTVARLIBDIR)/sounds/voicemail/default/1234/unavail.gsm ; \ diff --git a/net/asterisk-devel/files/patch-agi::Makefile b/net/asterisk-devel/files/patch-agi::Makefile new file mode 100644 index 000000000000..806195bfbb3e --- /dev/null +++ b/net/asterisk-devel/files/patch-agi::Makefile @@ -0,0 +1,33 @@ + +$FreeBSD$ + +--- agi/Makefile.orig Tue Aug 19 19:42:30 2003 ++++ agi/Makefile Fri Oct 17 14:13:14 2003 +@@ -11,20 +11,23 @@ + # the GNU General Public License + # + +-AGIS=agi-test.agi eagi-test eagi-sphinx-test ++AGIS_BIN=eagi-test eagi-sphinx-test ++AGIS_SCR=agi-test.agi ++AGIS=$(AGIS_SCR) $(AGIS_BIN) + + CFLAGS+= + + all: depend $(AGIS) + + install: all +- for x in $(AGIS); do $(INSTALL) -m 755 $$x $(AGI_DIR) ; done ++ for x in $(AGIS_BIN); do $(BSD_INSTALL_PROGRAM) $$x $(AGI_DIR) ; done ++ for x in $(AGIS_SCR); do $(BSD_INSTALL_SCRIPT) $$x $(AGI_DIR) ; done + + eagi-test: eagi-test.o +- $(CC) -o eagi-test eagi-test.o ++ $(CC) $(CFLAGS) -o eagi-test eagi-test.o + + eagi-sphinx-test: eagi-sphinx-test.o +- $(CC) -o eagi-sphinx-test eagi-sphinx-test.o ++ $(CC) $(CFLAGS) -o eagi-sphinx-test eagi-sphinx-test.o + + clean: + rm -f *.so *.o look .depend diff --git a/net/asterisk-devel/files/patch-apps::Makefile b/net/asterisk-devel/files/patch-apps::Makefile new file mode 100644 index 000000000000..66bf2e7524e7 --- /dev/null +++ b/net/asterisk-devel/files/patch-apps::Makefile @@ -0,0 +1,32 @@ + +$FreeBSD$ + +--- apps/Makefile.orig Thu Sep 4 07:40:37 2003 ++++ apps/Makefile Fri Oct 17 12:40:46 2003 +@@ -15,15 +15,8 @@ + + MLFLAGS= + ifeq ($(USE_MYSQL_VM_INTERFACE),1) +-CFLAGS+=-DUSEMYSQLVM +-CFLAGS+=$(shell if [ -d /usr/local/mysql/include ]; then echo "-I/usr/local/mysql/include"; fi) +-CFLAGS+=$(shell if [ -d /usr/include/mysql ]; then echo "-I/usr/include/mysql"; fi) +-CFLAGS+=$(shell if [ -d /usr/local/include/mysql ]; then echo "-I/usr/local/include/mysql"; fi) +-CFLAGS+=$(shell if [ -d /opt/mysql/include/mysql ]; then echo "-I/opt/mysql/include/mysql"; fi) +-MLFLAGS+=$(shell if [ -d /usr/lib/mysql ]; then echo "-L/usr/lib/mysql"; fi) +-MLFLAGS+=$(shell if [ -d /usr/local/mysql/lib ]; then echo "-L/usr/local/mysql/lib"; fi) +-MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo "-L/usr/local/lib/mysql"; fi) +-MLFLAGS+=$(shell if [ -d /opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi) ++CFLAGS+=-DUSEMYSQLVM -I${LOCALBASE}/include/mysql ++MLFLAGS+=-L${LOCALBASE}/lib/mysql + endif + + #APPS=app_dial.so app_playback.so app_directory.so app_intercom.so app_mp3.so +@@ -57,7 +50,7 @@ + $(CC) -shared -Xlinker -x -o $@ $< -ltonezone + + install: all +- for x in $(APPS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done ++ for x in $(APPS); do $(BSD_INSTALL_PROGRAM) $$x $(MODULES_DIR) ; done + + app_todd.o: app_todd.c + gcc -pipe -O6 -g -Iinclude -I../include -D_REENTRANT -march=i586 -DDO_CRASH -c -o app_todd.o app_todd.c diff --git a/net/asterisk-devel/files/patch-apps::app_intercom.c b/net/asterisk-devel/files/patch-apps::app_intercom.c new file mode 100644 index 000000000000..387ddfb36f24 --- /dev/null +++ b/net/asterisk-devel/files/patch-apps::app_intercom.c @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- apps/app_intercom.c.orig Wed Aug 13 18:25:16 2003 ++++ apps/app_intercom.c Fri Oct 17 11:27:30 2003 +@@ -29,7 +29,7 @@ + #ifdef __linux__ + #include <linux/soundcard.h> + #else +-#include <soundcard.h> ++#include <sys/soundcard.h> + #endif + #include <netinet/in.h> + diff --git a/net/asterisk-devel/files/patch-astman::Makefile b/net/asterisk-devel/files/patch-astman::Makefile new file mode 100644 index 000000000000..53c8b316c2df --- /dev/null +++ b/net/asterisk-devel/files/patch-astman::Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- astman/Makefile 2003/10/17 09:43:08 1.1 ++++ astman/Makefile 2003/10/17 09:43:31 +@@ -8,7 +8,7 @@ + install: + if [ "$(TARGET)" != "none" ]; then \ + for x in $(TARGET); do \ +- install -m 755 $$x $(ASTSBINDIR)/astman; \ ++ $(BSD_INSTALL_PROGRAM) $$x $(ASTSBINDIR)/astman; \ + done ; \ + fi + diff --git a/net/asterisk-devel/files/patch-cdr::Makefile b/net/asterisk-devel/files/patch-cdr::Makefile new file mode 100644 index 000000000000..59db17a59b8b --- /dev/null +++ b/net/asterisk-devel/files/patch-cdr::Makefile @@ -0,0 +1,31 @@ + +$FreeBSD$ + +--- cdr/Makefile.orig Tue Aug 19 19:42:30 2003 ++++ cdr/Makefile Fri Oct 17 12:42:54 2003 +@@ -18,21 +18,14 @@ + # + # MySQL stuff... Autoconf anyone?? + # +-MODS+=$(shell if [ -d /usr/local/mysql/include ] || [ -d /usr/include/mysql ] || [ -d /usr/local/include/mysql ] || [ -d /opt/mysql/include ]; then echo "cdr_mysql.so"; fi) +-CFLAGS+=$(shell if [ -d /usr/local/mysql/include ]; then echo "-I/usr/local/mysql/include"; fi) +-CFLAGS+=$(shell if [ -d /usr/include/mysql ]; then echo "-I/usr/include/mysql"; fi) +-CFLAGS+=$(shell if [ -d /usr/local/include/mysql ]; then echo "-I/usr/local/include/mysql"; fi) +-CFLAGS+=$(shell if [ -d /opt/mysql/include/mysql ]; then echo "-I/opt/mysql/include/mysql"; fi) +-MLFLAGS= +-MLFLAGS+=$(shell if [ -d /usr/lib/mysql ]; then echo "-L/usr/lib/mysql"; fi) +-MLFLAGS+=$(shell if [ -d /usr/local/mysql/lib ]; then echo "-L/usr/local/mysql/lib"; fi) +-MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo "-L/usr/local/lib/mysql"; fi) +-MLFLAGS+=$(shell if [ -d /opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi) ++MODS+=cdr_mysql.so ++CFLAGS+=-I${LOCALBASE}/include/mysql ++MLFLAGS+=-L${LOCALBASE}/lib/mysql + + all: depend $(MODS) + + install: all +- for x in $(MODS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done ++ for x in $(MODS); do $(BSD_INSTALL_PROGRAM) $$x $(MODULES_DIR) ; done + + clean: + rm -f *.so *.o .depend diff --git a/net/asterisk-devel/files/patch-channels::Makefile b/net/asterisk-devel/files/patch-channels::Makefile new file mode 100644 index 000000000000..5c04f9ee8533 --- /dev/null +++ b/net/asterisk-devel/files/patch-channels::Makefile @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- channels/Makefile.orig Tue Aug 19 19:42:30 2003 ++++ channels/Makefile Fri Oct 17 12:39:34 2003 +@@ -95,7 +95,7 @@ + ifeq (${OSARCH},Linux) + $(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o + else +- $(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o -lossaudio ++ $(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o + endif + + chan_zap.o: $(CHANZAP) +@@ -127,7 +127,7 @@ + # $(CC) -rdynamic -shared -Xlinker -x -o $@ $< + + install: all +- for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done ++ for x in $(CHANNEL_LIBS); do $(BSD_INSTALL_PROGRAM) $$x $(MODULES_DIR) ; done + + depend: .depend + diff --git a/net/asterisk-devel/files/patch-channels::chan_oss.c b/net/asterisk-devel/files/patch-channels::chan_oss.c new file mode 100644 index 000000000000..10bbc21f9ba7 --- /dev/null +++ b/net/asterisk-devel/files/patch-channels::chan_oss.c @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- channels/chan_oss.c.orig Wed Aug 13 18:25:16 2003 ++++ channels/chan_oss.c Fri Oct 17 11:27:30 2003 +@@ -36,7 +36,7 @@ + #ifdef __linux + #include <linux/soundcard.h> + #else +-#include <soundcard.h> ++#include <sys/soundcard.h> + #endif + #include "busy.h" + #include "ringtone.h" diff --git a/net/asterisk-devel/files/patch-codecs::Makefile b/net/asterisk-devel/files/patch-codecs::Makefile new file mode 100644 index 000000000000..1b2df457265c --- /dev/null +++ b/net/asterisk-devel/files/patch-codecs::Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- codecs/Makefile 2003/10/17 09:41:04 1.1 ++++ codecs/Makefile 2003/10/17 09:41:19 +@@ -95,7 +95,7 @@ + include .depend + + install: all +- for x in $(CODECS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done ++ for x in $(CODECS); do $(BSD_INSTALL_PROGRAM) $$x $(MODULES_DIR) ; done + + depend: .depend + diff --git a/net/asterisk-devel/files/patch-codecs::gsm::Makefile b/net/asterisk-devel/files/patch-codecs::gsm::Makefile new file mode 100644 index 000000000000..0c9a35eecb6d --- /dev/null +++ b/net/asterisk-devel/files/patch-codecs::gsm::Makefile @@ -0,0 +1,25 @@ + +$FreeBSD$ + +--- codecs/gsm/Makefile.orig Sun Apr 27 21:13:11 2003 ++++ codecs/gsm/Makefile Fri Oct 17 11:59:00 2003 +@@ -54,8 +54,8 @@ + # CC = /usr/lang/acc + # CCFLAGS = -c -O + +-CC = gcc -ansi -pedantic $(OPTIMIZE) -march=$(PROC) -fschedule-insns2 -fomit-frame-pointer +-CCFLAGS += -c -DNeedFunctionPrototypes=1 -finline-functions -funroll-loops -fPIC ++CC ?= gcc ++CCFLAGS += -c -DNeedFunctionPrototypes=1 -finline-functions -funroll-loops -fPIC -ansi -pedantic $(OPTIMIZE) -fschedule-insns2 -fomit-frame-pointer + + LD = $(CC) + +@@ -140,7 +140,7 @@ + DEBUG = -DNDEBUG + ######### Remove -DNDEBUG to enable assertions. + +-CFLAGS = $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) \ ++CFLAGS += $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) \ + $(LTP_CUT) $(WAV49) $(K6OPT) $(CCINC) -I$(INC) + ######### It's $(CC) $(CFLAGS) + diff --git a/net/asterisk-devel/files/patch-codecs::ilbc::Makefile b/net/asterisk-devel/files/patch-codecs::ilbc::Makefile new file mode 100644 index 000000000000..1eb6bc1887f6 --- /dev/null +++ b/net/asterisk-devel/files/patch-codecs::ilbc::Makefile @@ -0,0 +1,11 @@ + +$FreeBSD$ + +--- codecs/ilbc/Makefile 2003/10/17 09:04:00 1.1 ++++ codecs/ilbc/Makefile 2003/10/17 09:04:09 +@@ -1,4 +1,4 @@ +-CFLAGS+= -fPIC -O3 ++CFLAGS+= -fPIC + LIB=libilbc.a + + OBJS= anaFilter.o iCBSearch.o packing.o \ diff --git a/net/asterisk-devel/files/patch-codecs::lpc10::Makefile b/net/asterisk-devel/files/patch-codecs::lpc10::Makefile new file mode 100644 index 000000000000..43138eb093d9 --- /dev/null +++ b/net/asterisk-devel/files/patch-codecs::lpc10::Makefile @@ -0,0 +1,29 @@ + +$FreeBSD$ + +--- codecs/lpc10/Makefile.orig Sun Apr 27 21:13:11 2003 ++++ codecs/lpc10/Makefile Fri Oct 17 12:07:20 2003 +@@ -3,7 +3,7 @@ + # + + # default C compiler +-CC= gcc ++CC?= gcc + + # + # These definitions for CFLAGS and LIB_TARGET_DIR are used when one +@@ -22,12 +22,12 @@ + # + + WARNINGS = -Wall -Wno-comment -Wno-error +-CFLAGS = $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC ++CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC + #CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi) + + #fix for PPC processors + ifneq ($(PROC),ppc) +- CFLAGS+= -march=$(PROC) ++ CFLAGS+= + endif + + LIB = $(LIB_TARGET_DIR)/liblpc10.a diff --git a/net/asterisk-devel/files/patch-codecs::lpc10::lpcini.c b/net/asterisk-devel/files/patch-codecs::lpc10::lpcini.c new file mode 100644 index 000000000000..f30f7e4b2b6c --- /dev/null +++ b/net/asterisk-devel/files/patch-codecs::lpc10::lpcini.c @@ -0,0 +1,17 @@ + +$FreeBSD$ + +--- codecs/lpc10/lpcini.c.orig Wed Feb 12 15:59:15 2003 ++++ codecs/lpc10/lpcini.c Fri Oct 17 12:13:04 2003 +@@ -29,9 +29,9 @@ + -lf2c -lm (in that order) + */ + +-#include "f2c.h" ++#include <stdlib.h> + +-#include <malloc.h> ++#include "f2c.h" + + /* Common Block Declarations */ + diff --git a/net/asterisk-devel/files/patch-codecs::mp3::Makefile b/net/asterisk-devel/files/patch-codecs::mp3::Makefile new file mode 100644 index 000000000000..3cd714f7ce62 --- /dev/null +++ b/net/asterisk-devel/files/patch-codecs::mp3::Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- codecs/mp3/Makefile 2003/10/17 09:05:05 1.1 ++++ codecs/mp3/Makefile 2003/10/17 09:05:18 +@@ -1,7 +1,7 @@ + # + # LMC section + +-CFLAGS+= -I../include -Iinclude -O6 -funroll-loops -finline-functions -Wall -Wno-missing-prototypes -Wno-missing-declarations -g -fPIC ++CFLAGS+= -I../include -Iinclude -funroll-loops -finline-functions -Wall -Wno-missing-prototypes -Wno-missing-declarations -fPIC + RANLIB=ranlib + + # the XING decoder objs and dependencies: diff --git a/net/asterisk-devel/files/patch-codecs::mp3::include::L3.h b/net/asterisk-devel/files/patch-codecs::mp3::include::L3.h new file mode 100644 index 000000000000..50d7345c39a4 --- /dev/null +++ b/net/asterisk-devel/files/patch-codecs::mp3::include::L3.h @@ -0,0 +1,20 @@ + +$FreeBSD$ + +--- codecs/mp3/include/L3.h.orig Wed Feb 12 15:59:14 2003 ++++ codecs/mp3/include/L3.h Fri Oct 17 11:27:30 2003 +@@ -49,6 +49,14 @@ + #define LITTLE_ENDIAN 0 + #endif + ++#if BYTE_ORDER == LITTLE_ENDIAN ++#define LITTLE_ENDIAN 1 ++#endif ++ ++#if BYTE_ORDER == BIG_ENDIAN ++#define LITTLE_ENDIAN 0 ++#endif ++ + #ifndef LITTLE_ENDIAN + #error Layer III LITTLE_ENDIAN must be defined 0 or 1 + #endif diff --git a/net/asterisk-devel/files/patch-db.c b/net/asterisk-devel/files/patch-db.c new file mode 100644 index 000000000000..ebe8fedec060 --- /dev/null +++ b/net/asterisk-devel/files/patch-db.c @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- db.c.orig Wed Aug 13 18:25:16 2003 ++++ db.c Fri Oct 17 11:27:30 2003 +@@ -32,7 +32,7 @@ + #include <asterisk/options.h> + #include <asterisk/astdb.h> + #include <asterisk/cli.h> +-#include "db1-ast/include/db.h" ++#include <db.h> + #include "asterisk.h" + #include "astconf.h" + diff --git a/net/asterisk-devel/files/patch-editline::configure b/net/asterisk-devel/files/patch-editline::configure new file mode 100644 index 000000000000..040ab0422c92 --- /dev/null +++ b/net/asterisk-devel/files/patch-editline::configure @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- editline/configure 2003/10/17 09:02:33 1.1 ++++ editline/configure 2003/10/17 09:03:18 +@@ -1906,7 +1906,7 @@ + CPPFLAGS="$CPPFLAGS -DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG" + CPPFLAGS="$CPPFLAGS -DDEBUG_REFRESH -DDEBUG_PASTE" + else +- CFLAGS="$CFLAGS -O" ++ CFLAGS="$CFLAGS" + fi + + diff --git a/net/asterisk-devel/files/patch-enum.c b/net/asterisk-devel/files/patch-enum.c new file mode 100644 index 000000000000..fd5c7f9926af --- /dev/null +++ b/net/asterisk-devel/files/patch-enum.c @@ -0,0 +1,40 @@ + +$FreeBSD$ + +--- enum.c.orig Mon Sep 1 18:36:52 2003 ++++ enum.c Fri Oct 17 11:27:30 2003 +@@ -380,9 +380,14 @@ + struct enum_search *s = NULL; + int version = -1; + struct __res_state enumstate; +- res_ninit(&enumstate); +- if (chan && ast_autoservice_start(chan) < 0) ++ static ast_mutex_t reslock = AST_MUTEX_INITIALIZER; ++ ++ ast_mutex_lock(&reslock); ++ res_init(); ++ if (chan && ast_autoservice_start(chan) < 0) { ++ ast_mutex_unlock(&reslock); + return -1; ++ } + + strncat(naptrinput, number, sizeof(naptrinput) - 2); + +@@ -411,7 +416,7 @@ + ast_mutex_unlock(&enumlock); + if (!s) + break; +- res = res_nsearch(&enumstate, tmp, C_IN, T_NAPTR, answer, sizeof(answer)); ++ res = res_search(tmp, C_IN, T_NAPTR, answer, sizeof(answer)); + if (res > 0) + break; + } +@@ -429,7 +434,7 @@ + } + if (chan) + ret |= ast_autoservice_stop(chan); +- res_nclose(&enumstate); ++ ast_mutex_unlock(&reslock); + return ret; + } + diff --git a/net/asterisk-devel/files/patch-formats::Makefile b/net/asterisk-devel/files/patch-formats::Makefile new file mode 100644 index 000000000000..2b59d3522211 --- /dev/null +++ b/net/asterisk-devel/files/patch-formats::Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- formats/Makefile 2003/10/17 09:41:29 1.1 ++++ formats/Makefile 2003/10/17 09:41:43 +@@ -40,7 +40,7 @@ + $(CC) -shared -Xlinker -x -o $@ $< -lm + + install: all +- for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done ++ for x in $(FORMAT_LIBS); do $(BSD_INSTALL_PROGRAM) $$x $(MODULES_DIR) ; done + + depend: .depend + diff --git a/net/asterisk-devel/files/patch-pbx::Makefile b/net/asterisk-devel/files/patch-pbx::Makefile new file mode 100644 index 000000000000..2725838254dc --- /dev/null +++ b/net/asterisk-devel/files/patch-pbx::Makefile @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- pbx/Makefile.orig Tue Aug 19 19:42:30 2003 ++++ pbx/Makefile Fri Oct 17 14:21:00 2003 +@@ -16,7 +16,7 @@ + PBX_LIBS=pbx_config.so pbx_wilcalu.so pbx_spool.so # pbx_gtkconsole.so pbx_kdeconsole.so + + # Add GTK console if appropriate +-PBX_LIBS+=$(shell gtk-config --cflags >/dev/null 2>/dev/null && echo "pbx_gtkconsole.so") ++#PBX_LIBS+=$(shell gtk-config --cflags >/dev/null 2>/dev/null && echo "pbx_gtkconsole.so") + # Add KDE Console if appropriate + #PBX_LIBS+=$(shell [ "$$QTDIR" != "" ] && echo "pbx_kdeconsole.so") + +@@ -62,7 +62,7 @@ + endif + + install: all +- for x in $(PBX_LIBS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done ++ for x in $(PBX_LIBS); do $(BSD_INSTALL_PROGRAM) $$x $(MODULES_DIR) ; done + + depend: .depend + diff --git a/net/asterisk-devel/files/patch-res::Makefile b/net/asterisk-devel/files/patch-res::Makefile new file mode 100644 index 000000000000..33e2d72cc932 --- /dev/null +++ b/net/asterisk-devel/files/patch-res::Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- res/Makefile 2003/10/17 09:38:22 1.1 ++++ res/Makefile 2003/10/17 09:38:47 +@@ -25,7 +25,7 @@ + all: depend $(MODS) + + install: all +- for x in $(MODS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done ++ for x in $(MODS); do $(BSD_INSTALL_PROGRAM) $$x $(MODULES_DIR) ; done + + res_crypto.so: res_crypto.o + $(CC) -shared -Xlinker -x -o $@ $< $(CRYPTO_LIBS) diff --git a/net/asterisk-devel/files/patch-srv.c b/net/asterisk-devel/files/patch-srv.c new file mode 100644 index 000000000000..3cbb534f1b22 --- /dev/null +++ b/net/asterisk-devel/files/patch-srv.c @@ -0,0 +1,34 @@ + +$FreeBSD$ + +--- srv.c.orig Thu Aug 14 02:56:16 2003 ++++ srv.c Fri Oct 17 11:27:30 2003 +@@ -246,13 +246,17 @@ + int ret = -1; + struct __res_state srvstate; + char answer[MAX_SIZE]; ++ static ast_mutex_t reslock = AST_MUTEX_INITIALIZER; + + if (*port) + *port = 0; +- res_ninit(&srvstate); +- if (chan && ast_autoservice_start(chan) < 0) ++ ast_mutex_lock(&reslock); ++ res_init(); ++ if (chan && ast_autoservice_start(chan) < 0) { ++ ast_mutex_unlock(&reslock); + return -1; +- res = res_nsearch(&srvstate, service, C_IN, T_SRV, answer, sizeof(answer)); ++ } ++ res = res_search(service, C_IN, T_SRV, answer, sizeof(answer)); + if (res > 0) { + if ((res = parse_answer(host, hostlen, port, answer, res))) { + ast_log(LOG_WARNING, "Parse error returned %d\n", res); +@@ -267,6 +271,6 @@ + } + if (chan) + ret |= ast_autoservice_stop(chan); +- res_nclose(&srvstate); ++ ast_mutex_unlock(&reslock); + return ret; + } |