aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk-bristuff
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2005-08-14 18:44:06 +0000
committerMax Khon <fjoe@FreeBSD.org>2005-08-14 18:44:06 +0000
commitde04276318391b249cfe2b823c5dd0caaf14d99d (patch)
tree405d8f4085da4115b152e5e73a366191f477336b /net/asterisk-bristuff
parent77414578dfcaf2b0b8b9035e58309f15925a4112 (diff)
downloadports-de04276318391b249cfe2b823c5dd0caaf14d99d.tar.gz
ports-de04276318391b249cfe2b823c5dd0caaf14d99d.zip
Notes
Diffstat (limited to 'net/asterisk-bristuff')
-rw-r--r--net/asterisk-bristuff/Makefile25
-rw-r--r--net/asterisk-bristuff/files/patch-Makefile6
-rw-r--r--net/asterisk-bristuff/files/patch-cdr::Makefile45
-rw-r--r--net/asterisk-bristuff/files/patch-channels::Makefile19
-rw-r--r--net/asterisk-bristuff/files/patch-res::Makefile6
-rw-r--r--net/asterisk-bristuff/pkg-plist2
6 files changed, 77 insertions, 26 deletions
diff --git a/net/asterisk-bristuff/Makefile b/net/asterisk-bristuff/Makefile
index c422a6454243..60a8230c08cd 100644
--- a/net/asterisk-bristuff/Makefile
+++ b/net/asterisk-bristuff/Makefile
@@ -7,7 +7,7 @@
PORTNAME= asterisk
PORTVERSION= 1.0.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ftp://ftp.asterisk.org/pub/telephony/asterisk/ \
ftp://ftp.asterisk.org/pub/telephony/asterisk/old-releases/
@@ -52,34 +52,47 @@ 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=""
+MAKE_ENV+= WITH_H323=1
.endif
.if defined(WITHOUT_ZAPTEL)
-MAKE_ENV+= WITHOUT_ZAPTEL=1
PLIST_SUB+= WITH_ZAPTEL="@comment "
.else
LIB_DEPENDS+= pri.1:${PORTSDIR}/misc/libpri
BUILD_DEPENDS+= ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
RUN_DEPENDS+= ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
PLIST_SUB+= WITH_ZAPTEL=""
+MAKE_ENV+= WITH_ZAPTEL=1
+.endif
+
+#
+# WITH_FREETDS, WITH_PGSQL and WITH_SQLITE can also be added to MAKE_ENV
+# similarly
+.if defined(WITHOUT_ODBC)
+PLIST_SUB+= WITH_ODBC="@comment "
+.else
+LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
+PLIST_SUB+= WITH_ODBC=""
+MAKE_ENV+= WITH_ODBC=1
.endif
.if !defined(WITHOUT_MYSQL)
USE_MYSQL= yes
.endif
-.if !defined(WITHOUT_FAX) && ${OSVERSION} >= 500000
+#
+# FAX apps can't be compiled on RELENG_4 at the moment
+.if defined(WITHOUT_FAX) || ${OSVERSION} < 500000
+PLIST_SUB+= WITH_FAX="@comment "
+.else
MAKE_ENV+= WITH_FAX=1
LIB_DEPENDS+= spandsp.0:${PORTSDIR}/comms/spandsp
PLIST_SUB+= WITH_FAX=""
-.else
-PLIST_SUB+= WITH_FAX="@comment "
.endif
post-patch:
diff --git a/net/asterisk-bristuff/files/patch-Makefile b/net/asterisk-bristuff/files/patch-Makefile
index 176c4ba74d4e..4f02274d20ab 100644
--- a/net/asterisk-bristuff/files/patch-Makefile
+++ b/net/asterisk-bristuff/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Tue Jul 12 00:36:27 2005
-+++ Makefile Tue Jul 12 01:24:50 2005
+--- Makefile.orig Tue Aug 9 17:18:53 2005
++++ Makefile Tue Aug 9 17:33:29 2005
@@ -45,6 +45,15 @@
PROC=$(shell uname -m)
endif
@@ -93,7 +93,7 @@
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
-+ifndef WITHOUT_ZAPTEL
++ifdef WITH_ZAPTEL
+CFLAGS+=-DZAPTEL_OPTIMIZATIONS
+endif
diff --git a/net/asterisk-bristuff/files/patch-cdr::Makefile b/net/asterisk-bristuff/files/patch-cdr::Makefile
index f646d2c9a3dc..1d0fb2049ba2 100644
--- a/net/asterisk-bristuff/files/patch-cdr::Makefile
+++ b/net/asterisk-bristuff/files/patch-cdr::Makefile
@@ -1,8 +1,5 @@
-
-$FreeBSD$
-
---- cdr/Makefile.orig Tue Aug 31 19:33:00 2004
-+++ cdr/Makefile Thu Oct 14 19:13:38 2004
+--- cdr/Makefile.orig Tue Aug 31 23:33:00 2004
++++ cdr/Makefile Tue Aug 9 17:28:11 2005
@@ -21,7 +21,7 @@
OSARCH=$(shell uname -s)
@@ -12,7 +9,43 @@ $FreeBSD$
endif
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
-@@ -71,7 +71,7 @@
+@@ -37,18 +37,23 @@
+ #
+ # unixODBC stuff...
+ #
++ifdef WITH_ODBC
+ MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "cdr_odbc.so"; fi)
+ MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "cdr_odbc.so"; fi)
++endif
+
+ #
+ # FreeTDS stuff...
+ #
++ifdef WITH_FREETDS
+ MODS+=$(shell if [ -f "/usr/include/tds.h" ]; then echo "cdr_tds.so"; fi)
+ MODS+=$(shell if [ -f "/usr/local/include/tds.h" ]; then echo "cdr_tds.so"; fi)
++endif
+
+ #
+ # PGSQL stuff... Autoconf anyone??
+ #
++ifdef WITH_PGSQL
+ MODS+=$(shell if [ -d /usr/local/pgsql/include ] || [ -d /usr/include/pgsql ] || [ -d /usr/local/include/pgsql ] || [ -d /opt/pgsql/include ] || [ -f /usr/include/libpq-fe.h ] ; then echo "cdr_pgsql.so"; fi)
+ CFLAGS+=$(shell if [ -d /usr/local/pgsql/include ]; then echo "-I/usr/local/pgsql/include"; fi)
+ CFLAGS+=$(shell if [ -d /usr/include/pgsql ]; then echo "-I/usr/include/pgsql"; fi)
+@@ -62,16 +67,19 @@
+ MLFLAGS+=$(shell if [ -d /usr/local/lib/pgsql ]; then echo "-L/usr/local/lib/pgsql"; fi)
+ MLFLAGS+=$(shell if [ -d /opt/pgsql/lib ]; then echo "-L/opt/pgsql/lib"; fi)
+ MLFLAGS+=$(shell if [ -f /usr/lib/libpq.so ]; then echo "-L/usr/lib"; fi)
++endif
+
+ #
+ # SQLIte stuff...
+ #
++ifdef WITH_SQLITE
+ MODS+=$(shell if [ -f "/usr/include/sqlite.h" ]; then echo "cdr_sqlite.so"; fi)
++endif
+
all: depend $(MODS)
install: all
diff --git a/net/asterisk-bristuff/files/patch-channels::Makefile b/net/asterisk-bristuff/files/patch-channels::Makefile
index 82896f15e951..7ecab67f9571 100644
--- a/net/asterisk-bristuff/files/patch-channels::Makefile
+++ b/net/asterisk-bristuff/files/patch-channels::Makefile
@@ -1,5 +1,5 @@
--- channels/Makefile.orig Tue Aug 31 23:33:00 2004
-+++ channels/Makefile Mon Feb 28 00:48:27 2005
++++ channels/Makefile Tue Aug 9 17:34:28 2005
@@ -57,10 +57,10 @@
endif
@@ -15,14 +15,14 @@
endif
ifeq (${OSARCH},NetBSD)
PTLIB=-lpt_NetBSD_x86_r
-@@ -72,19 +72,21 @@
+@@ -72,19 +72,23 @@
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
++ifdef WITH_H323
+CHANNEL_LIBS+=chan_h323.so
+endif
@@ -36,22 +36,27 @@
-ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
+ZAPPRI=$(shell [ -f $(LOCALBASE)/lib/libpri.so.1 ] && echo "-lpri")
ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
++ifdef WITH_ZAPTEL
CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
-CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
+CFLAGS+=$(shell [ -f $(LOCALBASE)/include/zaptel.h ] && echo "-DIAX_TRUNKING -I$(LOCALBASE)/include")
++endif
CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
-@@ -107,7 +109,7 @@
+@@ -106,8 +110,10 @@
+
ZAPDIR=/usr/lib
++ifdef WITH_ZAPTEL
CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
-CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
+CHANNEL_LIBS+=$(shell [ -f $(LOCALBASE)/include/zaptel.h ] && echo "chan_zap.so")
++endif
CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
-@@ -156,6 +158,8 @@
+@@ -156,6 +162,8 @@
chan_oss.so: chan_oss.o
$(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
endif
@@ -60,7 +65,7 @@
chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
ifeq ($(USE_MYSQL_FRIENDS),1)
-@@ -175,7 +179,7 @@
+@@ -175,7 +183,7 @@
$(CC) -c $(CFLAGS) -o chan_zap.o chan_zap.c
chan_zap.so: chan_zap.o
@@ -69,7 +74,7 @@
chan_sip.so: chan_sip.o
ifeq ($(USE_SIP_MYSQL_FRIENDS),1)
-@@ -199,15 +203,17 @@
+@@ -199,15 +207,17 @@
chan_vpb.so: chan_vpb.o
$(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
diff --git a/net/asterisk-bristuff/files/patch-res::Makefile b/net/asterisk-bristuff/files/patch-res::Makefile
index 2b920da8ea3f..3e48e84189a2 100644
--- a/net/asterisk-bristuff/files/patch-res::Makefile
+++ b/net/asterisk-bristuff/files/patch-res::Makefile
@@ -1,5 +1,5 @@
---- res/Makefile.orig Tue Jul 12 01:28:04 2005
-+++ res/Makefile Tue Jul 12 01:58:11 2005
+--- res/Makefile.orig Tue Aug 9 17:18:55 2005
++++ res/Makefile Tue Aug 9 17:33:36 2005
@@ -13,15 +13,18 @@
MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
@@ -16,7 +16,7 @@
CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo " -DZAPATA_MOH")
-CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo " -DZAPATA_MOH")
+CFLAGS+=-I$(LOCALBASE)/include
-+ifndef WITHOUT_ZAPTEL
++ifdef WITH_ZAPTEL
+CFLAGS+=-DZAPATA_MOH
+endif
#
diff --git a/net/asterisk-bristuff/pkg-plist b/net/asterisk-bristuff/pkg-plist
index 94f2ce3e15a3..019b270e64cf 100644
--- a/net/asterisk-bristuff/pkg-plist
+++ b/net/asterisk-bristuff/pkg-plist
@@ -256,7 +256,7 @@ lib/asterisk/modules/app_zapateller.so
%%WITH_ZAPTEL%%lib/asterisk/modules/app_zapscan.so
lib/asterisk/modules/cdr_csv.so
lib/asterisk/modules/cdr_manager.so
-lib/asterisk/modules/cdr_odbc.so
+%%WITH_ODBC%%lib/asterisk/modules/cdr_odbc.so
lib/asterisk/modules/chan_agent.so
%%WITH_H323%%lib/asterisk/modules/chan_h323.so
lib/asterisk/modules/chan_iax2.so