blob: 732667320e8b17cef4f480d4ef73562d1fe44964 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
# New ports collection makefile for: asterisk
# Date created: 17 October 2003
# Whom: Maxim Sobolev <sobomax@portaone.com>
#
# $FreeBSD$
#
PORTNAME= asterisk
PORTVERSION= 1.4.8
CATEGORIES= net
MASTER_SITES= http://ftp.digium.com/pub/asterisk/ \
http://ftp.digium.com/pub/asterisk/old-releases/
MAINTAINER= sobomax@FreeBSD.org
COMMENT= An Open Source PBX and telephony toolkit
BUILD_DEPENDS= mpg123:${PORTSDIR}/audio/mpg123
LIB_DEPENDS= speex.1:${PORTSDIR}/audio/speex \
newt.51:${PORTSDIR}/devel/newt \
curl.4:${PORTSDIR}/ftp/curl
RUN_DEPENDS= mpg123:${PORTSDIR}/audio/mpg123
ONLY_FOR_ARCHS= i386 sparc64 amd64
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/openh323" \
LDFLAGS="-L${LOCALBASE}/lib"
CPPFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/openh323
USE_GMAKE= yes
USE_BISON= yes
USE_RC_SUBR= asterisk.sh
MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}" \
MKDIR="${MKDIR}" \
PWLIBDIR=${LOCALBASE}/share/pwlib \
OPENH323DIR=${LOCALBASE}/share/openh323 \
OSVERSION=${OSVERSION} \
CXX="${CXX}"
MAN8= asterisk.8 astgenkey.8 autosupport.8 safe_asterisk.8
OPTIONS= OGGVORBIS "Enable Ogg Vorbis support" on \
ODBC "Enable ODBC support" on \
POSTGRES "Enable PostgreSQL support" on \
RADIUS "Enable RADIUS accounting support" on \
SNMP "Enable SNMP support" on \
H323 "Enable H.323 support" on \
FREETDS "Enable FreeTDS support" on \
JABBER "Enable Jabber and Gtalk support" on
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386" || ${ARCH} == "amd64"
OPTIONS+= ZAPTEL "Enable Zaptel support" off
.else
WITHOUT_ZAPTEL= yes
.endif
.if defined(WITHOUT_H323)
PLIST_SUB+= WITH_H323="@comment "
CONFIGURE_ARGS+= --without-h323
.else
PLIST_SUB+= WITH_H323=""
CONFIGURE_ARGS+= --with-h323=${LOCALBASE}
LIB_DEPENDS+= pt_r.1:${PORTSDIR}/devel/pwlib \
h323_r.1:${PORTSDIR}/net/openh323
.endif
.if defined(WITHOUT_ZAPTEL)
PLIST_SUB+= WITH_ZAPTEL="@comment "
CONFIGURE_ARGS+= --without-zaptel
.else
PLIST_SUB+= WITH_ZAPTEL=""
CONFIGURE_ARGS+= --with-zaptel
BUILD_DEPENDS+= libpri>=1.2.0:${PORTSDIR}/misc/libpri \
${LOCALBASE}/include/zaptel/zaptel.h:${PORTSDIR}/misc/zaptel
LIB_DEPENDS+= pri.1:${PORTSDIR}/misc/libpri
RUN_DEPENDS+= ${LOCALBASE}/include/zaptel/zaptel.h:${PORTSDIR}/misc/zaptel
.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 "
CONFIGURE_ARGS+= --without-odbc
.else
PLIST_SUB+= WITH_ODBC=""
CONFIGURE_ARGS+= --with-odbc --with-ltdl
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC \
ltdl.4:${PORTSDIR}/devel/libltdl15
.endif
.if defined(WITHOUT_FREETDS)
PLIST_SUB+= WITH_FREETDS="@comment "
CONFIGURE_ARGS+= --without-tds
.else
PLIST_SUB+= WITH_FREETDS=""
CONFIGURE_ARGS+= --with-tds=${LOCALBASE}
LIB_DEPENDS+= tds.5:${PORTSDIR}/databases/freetds
.endif
.if defined(WITHOUT_POSTGRES)
PLIST_SUB+= WITH_POSTGRES="@comment "
CONFIGURE_ARGS+= --without-postgres
.else
PLIST_SUB+= WITH_POSTGRES=""
USE_PGSQL= yes
CONFIGURE_ARGS+= --with-postgres
.endif
.if defined(WITHOUT_OGGVORBIS)
PLIST_SUB+= WITH_OGGVORBIS="@comment "
CONFIGURE_ARGS+= --without-ogg
.else
PLIST_SUB+= WITH_OGGVORBIS=""
CONFIGURE_ARGS+= --with-ogg
LIB_DEPENDS+= vorbis.3:${PORTSDIR}/audio/libvorbis
.endif
.if defined(WITHOUT_RADIUS)
PLIST_SUB+= WITH_RADIUS="@comment "
CONFIGURE_ARGS+= --without-radius
.else
PLIST_SUB+= WITH_RADIUS=""
CONFIGURE_ARGS+= --with-radius
LIB_DEPENDS+= radiusclient-ng.2:${PORTSDIR}/net/radiusclient
.endif
.if defined(WITHOUT_SNMP)
PLIST_SUB+= WITH_SNMP="@comment "
CONFIGURE_ARGS+= --without-netsnmp
.else
PLIST_SUB+= WITH_SNMP=""
CONFIGURE_ARGS+= --with-netsnmp
LIB_DEPENDS+= netsnmp.10:${PORTSDIR}/net-mgmt/net-snmp
.endif
.if defined(WITHOUT_JABBER)
PLIST_SUB+= WITH_JABBER="@comment "
CONFIGURE_ARGS+= --without-iksemel
.else
PLIST_SUB+= WITH_JABBER=""
CONFIGURE_ARGS+= --with-iksemel
LIB_DEPENDS+= iksemel.3:${PORTSDIR}/textproc/iksemel
.endif
post-patch:
${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/musiconhold.conf.sample
.include <bsd.port.post.mk>
|