aboutsummaryrefslogtreecommitdiffstats
path: root/net/asterisk16
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2004-12-13 21:35:02 +0800
committersobomax <sobomax@FreeBSD.org>2004-12-13 21:35:02 +0800
commit4a48fd0bf5c1cf4cf5d31ceeec81a12bc41ba2cc (patch)
tree8c86d5c353e7f64ca9f931c6cd03753a5df0ab34 /net/asterisk16
parent207844dd71ba95e550c266309d2938d999badb83 (diff)
downloadfreebsd-ports-gnome-4a48fd0bf5c1cf4cf5d31ceeec81a12bc41ba2cc.tar.gz
freebsd-ports-gnome-4a48fd0bf5c1cf4cf5d31ceeec81a12bc41ba2cc.tar.zst
freebsd-ports-gnome-4a48fd0bf5c1cf4cf5d31ceeec81a12bc41ba2cc.zip
o Update to 1.0.2.
o Add often requested knobs WITHOUT_H323 and WITHOUT_ZAPTEL. o Add untested support for building on sparc64.
Diffstat (limited to 'net/asterisk16')
-rw-r--r--net/asterisk16/Makefile41
-rw-r--r--net/asterisk16/distinfo4
-rw-r--r--net/asterisk16/files/patch-Makefile55
-rw-r--r--net/asterisk16/files/patch-channels::Makefile18
-rw-r--r--net/asterisk16/files/patch-res::Makefile13
-rw-r--r--net/asterisk16/pkg-plist15
6 files changed, 95 insertions, 51 deletions
diff --git a/net/asterisk16/Makefile b/net/asterisk16/Makefile
index 22f733683a8c..b95ae58c2ee6 100644
--- a/net/asterisk16/Makefile
+++ b/net/asterisk16/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= asterisk
-PORTVERSION= 1.0.1
-PORTREVISION= 1
+PORTVERSION= 1.0.2
CATEGORIES= net
MASTER_SITES= ftp://ftp.asterisk.org/pub/telephony/asterisk/ \
ftp://ftp.asterisk.org/pub/telephony/asterisk/old-releases/
@@ -15,20 +14,15 @@ MASTER_SITES= ftp://ftp.asterisk.org/pub/telephony/asterisk/ \
MAINTAINER= sobomax@FreeBSD.org
COMMENT= An Open Source PBX and telephony toolkit
-ONLY_FOR_ARCHS= i386
+ONLY_FOR_ARCHS= i386 sparc64
-BUILD_DEPENDS= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql40-client \
- ${NONEXISTENT}:${PORTSDIR}/devel/pwlib:build \
- ${NONEXISTENT}:${PORTSDIR}/net/openh323:build \
- ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
+BUILD_DEPENDS= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql40-client
LIB_DEPENDS= speex.3:${PORTSDIR}/audio/speex
-RUN_DEPENDS= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql40-client \
- ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
+RUN_DEPENDS= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql40-client
GNU_CONFIGURE= yes
CONFIGURE_WRKSRC= ${WRKSRC}/editline
USE_GMAKE= yes
-USE_OPENLDAP= yes
MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}" \
MKDIR="${MKDIR}" \
@@ -39,4 +33,29 @@ MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
MAN8= asterisk.8
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${MACHINE_ARCH} != "i386"
+WITHOUT_H323= 1
+WITHOUT_ZAPTEL= 1
+.endif
+
+.if defined(WITHOUT_H323)
+MAKE_ENV+= WITHOUT_H323=1
+PLIST_SUB+= WITH_H323="@comment "
+.else
+BUILD_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/devel/pwlib:build \
+ ${NONEXISTENT}:${PORTSDIR}/net/openh323:build
+PLIST_SUB+= WITH_H323=""
+.endif
+
+.if defined(WITHOUT_ZAPTEL)
+MAKE_ENV+= WITHOUT_ZAPTEL=1
+PLIST_SUB+= WITH_ZAPTEL="@comment "
+.else
+BUILD_DEPENDS+= ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
+RUN_DEPENDS+= ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
+PLIST_SUB+= WITH_ZAPTEL=""
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net/asterisk16/distinfo b/net/asterisk16/distinfo
index d7661cced0c6..5fa2ddcf1403 100644
--- a/net/asterisk16/distinfo
+++ b/net/asterisk16/distinfo
@@ -1,2 +1,2 @@
-MD5 (asterisk-1.0.1.tar.gz) = cb55b1a0be8ff6e94179db0cdc7e074d
-SIZE (asterisk-1.0.1.tar.gz) = 9558497
+MD5 (asterisk-1.0.2.tar.gz) = 58b2c912b4e7c1f0438f06eb26c4b369
+SIZE (asterisk-1.0.2.tar.gz) = 9562949
diff --git a/net/asterisk16/files/patch-Makefile b/net/asterisk16/files/patch-Makefile
index 43bf910fe669..77acd5fecf7d 100644
--- a/net/asterisk16/files/patch-Makefile
+++ b/net/asterisk16/files/patch-Makefile
@@ -1,9 +1,25 @@
$FreeBSD$
---- Makefile.orig Tue Sep 28 20:11:30 2004
-+++ Makefile Thu Oct 14 19:48:30 2004
-@@ -62,10 +62,10 @@
+--- Makefile.orig
++++ Makefile
+@@ -44,6 +44,15 @@
+ PROC=$(shell uname -m)
+ endif
+
++ifeq (${OSARCH},FreeBSD)
++ifeq ($(PROC),sparc64)
++PROC=ultrasparc
++OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
++OPTIONS+=$(shell if $(CC) -mcpu=v9 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v9"; fi)
++OPTIONS+=-fomit-frame-pointerendif
++endif
++endif
++
+ # Pentium Pro Optimize
+ #PROC=i686
+
+@@ -62,10 +71,10 @@
#K6OPT = -DK6OPT
#Tell gcc to optimize the asterisk's code
@@ -16,7 +32,7 @@ $FreeBSD$
# If you are running a radio application, define RADIO_RELAX so that the DTMF
# will be received more reliably
-@@ -90,7 +90,7 @@
+@@ -90,7 +99,7 @@
# Where to install asterisk after compiling
# Default -> leave empty
@@ -25,7 +41,7 @@ $FreeBSD$
# Staging directory
# Files are copied here temporarily during the install process
-@@ -110,23 +110,23 @@
+@@ -110,23 +119,23 @@
# Don't use together with -DBUSYDETECT_TONEONLY
BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
@@ -59,7 +75,7 @@ $FreeBSD$
CFLAGS+=$(OPTIMIZE)
ifneq ($(PROC),ultrasparc)
-@@ -137,11 +137,8 @@
+@@ -137,11 +146,8 @@
CFLAGS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "-DOSP_SUPPORT -I/usr/include/osp" ; fi)
ifeq (${OSARCH},FreeBSD)
@@ -73,16 +89,19 @@ $FreeBSD$
endif # FreeBSD
ifeq (${OSARCH},NetBSD)
-@@ -157,7 +154,7 @@
+@@ -157,7 +163,10 @@
#CFLAGS+=-DOLD_DSP_ROUTINES
CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
-CFLAGS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
-+CFLAGS+=-I$(LOCALBASE)/include -DZAPTEL_OPTIMIZATIONS
++CFLAGS+=-I$(LOCALBASE)/include
++ifndef WITHOUT_ZAPTEL
++CFLAGS+=-DZAPTEL_OPTIMIZATIONS
++endif
LIBEDIT=editline/libedit.a
-@@ -219,7 +216,7 @@
+@@ -219,7 +228,7 @@
SOLINK=-shared -Xlinker -x
endif
@@ -91,7 +110,7 @@ $FreeBSD$
INSTALL=install
_all: all
-@@ -231,7 +228,7 @@
+@@ -231,7 +240,7 @@
@echo " + $(MAKE) install +"
@echo " +-------------------------------------------+"
@@ -100,7 +119,7 @@ $FreeBSD$
editline/config.h:
cd editline && unset CFLAGS LIBS && ./configure ; \
-@@ -240,13 +237,13 @@
+@@ -240,13 +249,13 @@
cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
$(MAKE) -C editline libedit.a
@@ -121,7 +140,7 @@ $FreeBSD$
ifneq ($(wildcard .depend),)
include .depend
-@@ -268,13 +265,10 @@
+@@ -268,13 +277,10 @@
asterisk.o: asterisk.c build.h
@@ -138,7 +157,7 @@ $FreeBSD$
ifneq ($(strip $(ASTERISKVERSION)),)
build.h: .version
-@@ -292,8 +286,8 @@
+@@ -292,8 +298,8 @@
exit 1; \
fi
@@ -149,7 +168,7 @@ $FreeBSD$
muted: muted.o
$(CC) -o muted muted.o
-@@ -312,28 +306,28 @@
+@@ -312,28 +318,28 @@
$(MAKE) -C stdtime clean
datafiles: all
@@ -184,7 +203,7 @@ $FreeBSD$
else \
echo "No description for $$x"; \
exit 1; \
-@@ -341,18 +335,18 @@
+@@ -341,18 +347,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-* sounds/queue-*; do \
if grep -q "^%`basename $$x`%" sounds.txt; then \
@@ -208,7 +227,7 @@ $FreeBSD$
update:
@if [ -d CVS ]; then \
-@@ -364,111 +358,86 @@
+@@ -364,111 +370,86 @@
fi
bininstall: all
@@ -369,7 +388,7 @@ $FreeBSD$
:> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm
for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
-@@ -483,7 +452,7 @@
+@@ -483,7 +464,7 @@
@[ -d $(DESTDIR)$(HTTPDIR)/html ] || ( echo "No http directory" && exit 1 )
@[ -d $(DESTDIR)$(HTTPDIR)/cgi-bin ] || ( echo "No cgi-bin directory" && exit 1 )
install -m 4755 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTPDIR)/cgi-bin/vmail.cgi
@@ -378,7 +397,7 @@ $FreeBSD$
for x in images/*.gif; do \
install -m 644 $$x $(DESTDIR)$(HTTPDIR)/html/_asterisk/; \
done
-@@ -503,10 +472,10 @@
+@@ -503,10 +484,10 @@
__rpm: _version
rm -rf /tmp/asterisk ; \
diff --git a/net/asterisk16/files/patch-channels::Makefile b/net/asterisk16/files/patch-channels::Makefile
index f10e4bcbf3eb..e82a0299756d 100644
--- a/net/asterisk16/files/patch-channels::Makefile
+++ b/net/asterisk16/files/patch-channels::Makefile
@@ -1,8 +1,8 @@
$FreeBSD$
---- channels/Makefile.orig Tue Aug 31 19:33:00 2004
-+++ channels/Makefile Sun Oct 10 16:18:05 2004
+--- channels/Makefile.orig
++++ channels/Makefile
@@ -57,10 +57,10 @@
endif
@@ -18,18 +18,20 @@ $FreeBSD$
endif
ifeq (${OSARCH},NetBSD)
PTLIB=-lpt_NetBSD_x86_r
-@@ -72,8 +72,8 @@
+@@ -72,8 +72,10 @@
endif
CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
-CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
-CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
+CHANNEL_LIBS+=$(shell [ -f $(LOCALBASE)/include/ixjuser.h ] && echo chan_phone.so)
++ifndef WITHOUT_H323
+CHANNEL_LIBS+=chan_h323.so
++endif
CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
-@@ -84,7 +84,7 @@
+@@ -84,7 +86,7 @@
ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
@@ -38,7 +40,7 @@ $FreeBSD$
CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
-@@ -107,7 +107,7 @@
+@@ -107,7 +109,7 @@
ZAPDIR=/usr/lib
CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
@@ -47,7 +49,7 @@ $FreeBSD$
CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
-@@ -156,6 +156,8 @@
+@@ -156,6 +158,8 @@
chan_oss.so: chan_oss.o
$(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
endif
@@ -56,7 +58,7 @@ $FreeBSD$
chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
ifeq ($(USE_MYSQL_FRIENDS),1)
-@@ -175,7 +177,7 @@
+@@ -175,7 +179,7 @@
$(CC) -c $(CFLAGS) -o chan_zap.o chan_zap.c
chan_zap.so: chan_zap.o
@@ -65,7 +67,7 @@ $FreeBSD$
chan_sip.so: chan_sip.o
ifeq ($(USE_SIP_MYSQL_FRIENDS),1)
-@@ -199,15 +201,17 @@
+@@ -199,15 +203,17 @@
chan_vpb.so: chan_vpb.o
$(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
diff --git a/net/asterisk16/files/patch-res::Makefile b/net/asterisk16/files/patch-res::Makefile
index 5700f04ea1ef..3377b4aa1c8e 100644
--- a/net/asterisk16/files/patch-res::Makefile
+++ b/net/asterisk16/files/patch-res::Makefile
@@ -1,18 +1,21 @@
$FreeBSD$
---- res/Makefile.orig Sat Jul 17 23:58:01 2004
-+++ res/Makefile Thu Oct 14 19:15:00 2004
-@@ -21,7 +21,7 @@
+--- res/Makefile.orig
++++ res/Makefile
+@@ -21,7 +21,10 @@
CFLAGS+=
CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo " -DZAPATA_MOH")
-CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo " -DZAPATA_MOH")
-+CFLAGS+=-DZAPATA_MOH -I$(LOCALBASE)/include
++CFLAGS+=-I$(LOCALBASE)/include
++ifndef WITHOUT_ZAPTEL
++CFLAGS+=-DZAPATA_MOH
++endif
#
# Work around buggy RedHat 9.0
#
-@@ -34,7 +34,7 @@
+@@ -34,7 +37,7 @@
rm -f $(DESTDIR)$(ASTHEADERDIR)/parking.h
rm -f $(DESTDIR)$(MODULES_DIR)/app_agi.so
rm -f $(DESTDIR)$(MODULES_DIR)/res_parking.so
diff --git a/net/asterisk16/pkg-plist b/net/asterisk16/pkg-plist
index f1519b3f3a39..a5a1722f8d7e 100644
--- a/net/asterisk16/pkg-plist
+++ b/net/asterisk16/pkg-plist
@@ -196,7 +196,7 @@ lib/asterisk/modules/app_enumlookup.so
lib/asterisk/modules/app_eval.so
lib/asterisk/modules/app_exec.so
lib/asterisk/modules/app_festival.so
-lib/asterisk/modules/app_flash.so
+%%WITH_ZAPTEL%%lib/asterisk/modules/app_flash.so
lib/asterisk/modules/app_forkcdr.so
lib/asterisk/modules/app_getcpeid.so
lib/asterisk/modules/app_groupcount.so
@@ -207,7 +207,7 @@ lib/asterisk/modules/app_intercom.so
lib/asterisk/modules/app_lookupblacklist.so
lib/asterisk/modules/app_lookupcidname.so
lib/asterisk/modules/app_macro.so
-lib/asterisk/modules/app_meetme.so
+%%WITH_ZAPTEL%%lib/asterisk/modules/app_meetme.so
lib/asterisk/modules/app_milliwatt.so
lib/asterisk/modules/app_mp3.so
lib/asterisk/modules/app_nbscat.so
@@ -241,13 +241,13 @@ lib/asterisk/modules/app_verbose.so
lib/asterisk/modules/app_voicemail.so
lib/asterisk/modules/app_waitforring.so
lib/asterisk/modules/app_zapateller.so
-lib/asterisk/modules/app_zapbarge.so
-lib/asterisk/modules/app_zapras.so
-lib/asterisk/modules/app_zapscan.so
+%%WITH_ZAPTEL%%lib/asterisk/modules/app_zapbarge.so
+%%WITH_ZAPTEL%%lib/asterisk/modules/app_zapras.so
+%%WITH_ZAPTEL%%lib/asterisk/modules/app_zapscan.so
lib/asterisk/modules/cdr_csv.so
lib/asterisk/modules/cdr_manager.so
lib/asterisk/modules/chan_agent.so
-lib/asterisk/modules/chan_h323.so
+%%WITH_H323%%lib/asterisk/modules/chan_h323.so
lib/asterisk/modules/chan_iax2.so
lib/asterisk/modules/chan_local.so
lib/asterisk/modules/chan_mgcp.so
@@ -258,7 +258,7 @@ lib/asterisk/modules/chan_modem_i4l.so
lib/asterisk/modules/chan_oss.so
lib/asterisk/modules/chan_sip.so
lib/asterisk/modules/chan_skinny.so
-lib/asterisk/modules/chan_zap.so
+%%WITH_ZAPTEL%%lib/asterisk/modules/chan_zap.so
lib/asterisk/modules/codec_a_mu.so
lib/asterisk/modules/codec_adpcm.so
lib/asterisk/modules/codec_alaw.so
@@ -295,6 +295,7 @@ lib/asterisk/modules/res_monitor.so
lib/asterisk/modules/res_musiconhold.so
sbin/asterisk
sbin/astgenkey
+sbin/astman
sbin/safe_asterisk
share/asterisk/agi-bin/agi-test.agi
share/asterisk/agi-bin/eagi-sphinx-test