diff --git a/net/asterisk/Makefile b/net/asterisk/Makefile index b146b218c7d8..898c75b5ce10 100644 --- a/net/asterisk/Makefile +++ b/net/asterisk/Makefile @@ -1,278 +1,282 @@ # New ports collection makefile for: asterisk # Date created: 17 October 2003 # Whom: Maxim Sobolev # # $FreeBSD$ # PORTNAME= asterisk -PORTVERSION= 1.8.2.4 -PORTREVISION= 1 +PORTVERSION= 1.8.3 CATEGORIES= net MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \ http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ PKGNAMESUFFIX= 18 MAINTAINER= flo@FreeBSD.org COMMENT= An Open Source PBX and telephony toolkit LIB_DEPENDS= speex.1:${PORTSDIR}/audio/speex \ newt.52:${PORTSDIR}/devel/newt \ execinfo:${PORTSDIR}/devel/libexecinfo RUN_DEPENDS= mpg123:${PORTSDIR}/audio/mpg123 ONLY_FOR_ARCHS= i386 amd64 powerpc sparc64 GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/openh323" \ LDFLAGS="-L${LOCALBASE}/lib" CONFIGURE_ARGS= --with-gsm=${LOCALBASE} CPPFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/openh323 USE_GMAKE= yes USE_GNOME= libxml2 USE_BISON= build 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} \ NOISY_BUILD=YES \ DOCSDIR=${DOCSDIR} \ ASTCFLAGS="${CFLAGS}" MAN8= asterisk.8 astgenkey.8 autosupport.8 safe_asterisk.8 CONFLICTS_BUILD= linuxthreads-* CONFLICTS_INSTALL= asterisk*-1.2* asterisk*-1.4* asterisk*-1.6* OPTIONS= OGGVORBIS "Enable Ogg Vorbis support" on \ IODBC "Enable iODBC support" off \ UODBC "Enable unixODBC support" on \ POSTGRES "Enable PostgreSQL support" on \ MYSQL "Enable MySQL support" off \ 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 \ SQLITE "Enable SQLITE support" on \ GSM "Enable GSM codec" on \ CURL "Enable CURL support" on \ ILBC "Enable iLBC codec" off \ SPANDSP "Enable Spandsp faxing support" off \ - EXCHANGE "Enable Exchange calendar support" off + EXCHANGE "Enable Exchange calendar support" off \ + NEWG711 "Enable new G711 Codes" ASTERISK_USER?= asterisk ASTERISK_GROUP?= asterisk USERS= ${ASTERISK_USER} GROUPS= ${ASTERISK_GROUP} dahdi .include .if ${PREFIX} == ${LOCALBASE} VARDIR=/var .else VARDIR=${PREFIX}/var .endif .if ${ARCH} == "i386" || ${ARCH} == "amd64" || ${ARCH} == "sparc64" OPTIONS+= DAHDI "Enable DAHDI support" on .if defined(WITH_IODBC) && defined(WITH_UODBC) IGNORE= please select only one of iodbc or unixODBC .endif # Include this since we have altered OPTIONS. .include .endif SUB_LIST+= ASTERISK_USER=${ASTERISK_USER} PLIST_SUB+= ASTERISK_USER=${ASTERISK_USER} PLIST_SUB+= ASTERISK_GROUP=${ASTERISK_GROUP} PLIST_SUB+= VARDIR=${VARDIR} .if !defined(WITH_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(WITH_DAHDI) PLIST_SUB+= WITH_DAHDI="@comment " CONFIGURE_ARGS+= --without-dahdi .else PLIST_SUB+= WITH_DAHDI="" CONFIGURE_ARGS+= --with-dahdi BUILD_DEPENDS+= libpri>=1.4.10:${PORTSDIR}/misc/libpri \ ${LOCALBASE}/include/dahdi/user.h:${PORTSDIR}/misc/dahdi LIB_DEPENDS+= pri.1:${PORTSDIR}/misc/libpri RUN_DEPENDS+= ${LOCALBASE}/lib/dahdi/dahdi.ko:${PORTSDIR}/misc/dahdi .endif # # WITH_FREETDS, WITH_PGSQL and WITH_SQLITE can also be added to MAKE_ENV # similarly .if !defined(WITH_UODBC) CONFIGURE_ARGS+= --without-unixodbc .endif .if !defined(WITH_IODBC) CONFIGURE_ARGS+= --without-iodbc .endif .if !defined(WITH_UODBC) && !defined(WITH_IODBC) PLIST_SUB+= WITH_ODBC="@comment " .endif .if defined(WITH_UODBC) || defined(WITH_IODBC) PLIST_SUB+= WITH_ODBC="" USE_AUTOTOOLS= libltdl .if defined(WITH_UODBC) CONFIGURE_ARGS+= --with-unixodbc --with-ltdl LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC .elif defined(WITH_IODBC) CONFIGURE_ARGS+= --with-iodbc --with-ltdl LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc .endif .endif .if !defined(WITH_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(WITH_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(WITH_MYSQL) PLIST_SUB+= WITH_MYSQL="@comment " .else PLIST_SUB+= WITH_MYSQL="" USE_MYSQL= yes EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-menuselect-tree-mysql.diff .endif .if !defined(WITH_OGGVORBIS) PLIST_SUB+= WITH_OGGVORBIS="@comment " CONFIGURE_ARGS+= --without-ogg .else PLIST_SUB+= WITH_OGGVORBIS="" CONFIGURE_ARGS+= --with-ogg LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis .endif .if !defined(WITH_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(WITH_SNMP) PLIST_SUB+= WITH_SNMP="@comment " CONFIGURE_ARGS+= --without-netsnmp .else PLIST_SUB+= WITH_SNMP="" CONFIGURE_ARGS+= --with-netsnmp LIB_DEPENDS+= netsnmp:${PORTSDIR}/net-mgmt/net-snmp .endif .if !defined(WITH_JABBER) PLIST_SUB+= WITH_JABBER="@comment " CONFIGURE_ARGS+= --without-iksemel .else PLIST_SUB+= WITH_JABBER="" CONFIGURE_ARGS+= --with-iksemel LIB_DEPENDS+= iksemel.4:${PORTSDIR}/textproc/iksemel .endif .if !defined(WITH_SQLITE) PLIST_SUB+= WITH_SQLITE="@comment " CONFIGURE_ARGS+= --without-sqlite \ --with-sqlite3=no .else PLIST_SUB+= WITH_SQLITE="" CONFIGURE_ARGS+= --with-sqlite LIB_DEPENDS+= sqlite:${PORTSDIR}/databases/sqlite2 \ sqlite3:${PORTSDIR}/databases/sqlite3 .endif .if !defined(WITH_ILBC) PLIST_SUB+= WITH_ILBC="@comment " .else PLIST_SUB+= WITH_ILBC="" EXTRA_PATCHES+= ${PATCHDIR}/ilbc_enable.diff .endif .if !defined(WITH_GSM) PLIST_SUB+= WITH_GSM="@comment " CONFIGURE_ARGS+= --without-gsm .else PLIST_SUB+= WITH_GSM="" CONFIGURE_ARGS+= --with-gsm LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm .endif .if !defined(WITH_CURL) PLIST_SUB+= WITH_CURL="@comment " CONFIGURE_ARGS+= --with-libcurl=no .else PLIST_SUB+= WITH_CURL="" CONFIGURE_ARGS+= --with-libcurl LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl .endif .if !defined(WITH_SPANDSP) PLIST_SUB+= WITH_SPANDSP="@comment " CONFIGURE_ARGS+= --without-spandsp .else PLIST_SUB+= WITH_SPANDSP="" CONFIGURE_ARGS+= --with-spandsp LIB_DEPENDS+= spandsp.2:${PORTSDIR}/comms/spandsp-devel .endif .if !defined(WITH_EXCHANGE) CONFIGURE_ARGS+= --without-neon --without-neon29 PLIST_SUB+= WITH_EXCHANGE="@comment " .else LIB_DEPENDS+= neon.27:${PORTSDIR}/www/neon29 PLIST_SUB+= WITH_EXCHANGE="" .endif +.if defined(WITH_NEWG711) +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-menuselect-tree-g711-new-codec.diff +.endif + .if defined(WITH_MISC_PATCHES) EXTRA_PATCHES+= ${PATCHDIR}/dtmf_debug.diff EXTRA_PATCHES+= ${PATCHDIR}/feature_disconnect.diff EXTRA_PATCHES+= ${PATCHDIR}/sip_force_callid.diff EXTRA_PATCHES+= ${PATCHDIR}/sip_set_auth.diff .if defined(WITH_CODEC_PATCH) EXTRA_PATCHES+= ${PATCHDIR}/rtp_force_dtmf-codecnego.diff .else EXTRA_PATCHES+= ${PATCHDIR}/rtp_force_dtmf-nocodecnego.diff .endif .endif post-extract: ${MKDIR} ${WRKSRC}/codecs/ilbc ${FIND} ${WRKSRC} -name '*.d' -delete post-patch: ${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/musiconhold.conf.sample post-install: @${CHOWN} -R ${ASTERISK_USER}:${ASTERISK_GROUP} ${VARDIR}/db/asterisk ${VARDIR}/log/asterisk ${VARDIR}/spool/asterisk .include diff --git a/net/asterisk/distinfo b/net/asterisk/distinfo index 259d703524f6..e17e3277a6f9 100644 --- a/net/asterisk/distinfo +++ b/net/asterisk/distinfo @@ -1,2 +1,2 @@ -SHA256 (asterisk-1.8.2.4.tar.gz) = 978dc9b1f4585c31fafa23a86e347ad46a75d8b438c059423f804bea088bbb1d -SIZE (asterisk-1.8.2.4.tar.gz) = 26802859 +SHA256 (asterisk-1.8.3.tar.gz) = 976ae6dea0c22033049af8b8d19c9e058f13a04ba49a13b2ce9da9d2d4c07395 +SIZE (asterisk-1.8.3.tar.gz) = 26806503 diff --git a/net/asterisk/files/extra-patch-menuselect-tree-g711-new-codec.diff b/net/asterisk/files/extra-patch-menuselect-tree-g711-new-codec.diff new file mode 100644 index 000000000000..d93e9cb28b17 --- /dev/null +++ b/net/asterisk/files/extra-patch-menuselect-tree-g711-new-codec.diff @@ -0,0 +1,10 @@ +--- menuselect-tree.orig 2011-02-21 09:56:29.000000000 +0100 ++++ menuselect-tree 2011-02-21 09:56:46.000000000 +0100 +@@ -777,7 +777,6 @@ + + + +- no + + + G711_NEW_ALGORITHM diff --git a/net/asterisk/files/patch-Makefile b/net/asterisk/files/patch-Makefile index 20cf399c3504..9dc24fa96ebe 100644 --- a/net/asterisk/files/patch-Makefile +++ b/net/asterisk/files/patch-Makefile @@ -1,115 +1,116 @@ ---- Makefile.orig 2010-12-08 03:51:05.000000000 +0500 -+++ Makefile 2011-01-15 04:05:06.000000000 +0500 +--- Makefile.orig 2011-01-12 16:57:43.000000000 +0100 ++++ Makefile 2011-03-02 11:34:26.000000000 +0100 @@ -122,7 +122,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 @@ -220,11 +220,13 @@ _ASTCFLAGS+=-isystem /usr/local/include endif +ifneq ($(OSARCH),FreeBSD) ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),) ifneq ($(PROC),ultrasparc) _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) endif endif +endif ifeq ($(PROC),ppc) _ASTCFLAGS+=-fsigned-char @@ -235,7 +237,7 @@ _ASTCFLAGS+=-march=i686 endif # -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 -@@ -463,13 +465,17 @@ +@@ -463,13 +465,18 @@ done - $(INSTALL) -m 644 doc/core-en_US.xml $(DESTDIR)$(ASTDATADIR)/static-http; + $(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http"; if [ -d doc/tex/asterisk ] ; then \ -- $(INSTALL) -d $(DESTDIR)$(ASTDATADIR)/static-http/docs ; \ +- $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \ + $(INSTALL) -d $(DESTDIR)$(DOCSDIR) ; \ + $(INSTALL) -d $(DESTDIR)$(DOCSDIR)/images ; \ for n in doc/tex/asterisk/* ; do \ -- $(INSTALL) -m 644 $$n $(DESTDIR)$(ASTDATADIR)/static-http/docs ; \ +- $(INSTALL) -m 644 $$n "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \ + $(INSTALL) -m 644 $$n $(DESTDIR)$(DOCSDIR) ; \ 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)$(ASTDATADIR)/images" ; \ + $(INSTALL) -m 644 $$x $(DESTDIR)$(DOCSDIR)/images ; \ done $(MAKE) -C sounds install -@@ -529,6 +535,7 @@ +@@ -529,6 +536,7 @@ $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/dictate" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/meetme" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/monitor" + $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/outgoing" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/system" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/tmp" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail" -@@ -550,6 +557,7 @@ +@@ -550,6 +558,7 @@ $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http" $(INSTALL) -d "$(DESTDIR)$(ASTMANDIR)/man8" $(INSTALL) -d "$(DESTDIR)$(AGI_DIR)" + $(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)" bininstall: _all installdirs $(SUBDIRS_INSTALL) $(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/ -@@ -609,7 +617,7 @@ +@@ -609,7 +618,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 -@@ -651,29 +659,18 @@ +@@ -651,29 +660,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)|' \ diff --git a/net/asterisk/files/patch-configure b/net/asterisk/files/patch-configure index 1b5bf55ded99..7f9d1a6a71f1 100644 --- a/net/asterisk/files/patch-configure +++ b/net/asterisk/files/patch-configure @@ -1,50 +1,50 @@ ---- configure.orig 2011-01-25 00:37:33.000000000 +0100 -+++ configure 2011-01-25 00:39:33.000000000 +0100 -@@ -621,7 +621,6 @@ +--- configure.orig 2011-01-09 22:40:34.000000000 +0100 ++++ configure 2011-03-02 00:16:16.000000000 +0100 +@@ -600,7 +600,6 @@ ac_default_prefix=/usr/local ac_default_prefix=/usr/local ac_default_prefix=/usr/local -ac_default_prefix=/usr ac_header_list= - ac_subst_vars='SHELL - PATH_SEPARATOR -@@ -4279,9 +4278,9 @@ + ac_subst_vars='LTLIBOBJS + PBX_SYSLOG +@@ -4677,9 +4676,9 @@ astheaderdir='${includedir}/asterisk' astlibdir='${libdir}/asterisk' 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' -@@ -4303,9 +4302,6 @@ +@@ -4701,9 +4700,6 @@ case "${host_os}" in freebsd*) - - CPPFLAGS=-I/usr/local/include - LDFLAGS=-L/usr/local/lib ;; openbsd*) -@@ -27494,6 +27490,8 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF +@@ -17558,6 +17554,8 @@ + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -+#include -+#include - #include ++ #include ++ #include + #include int main () -@@ -45012,7 +45010,7 @@ +@@ -25364,7 +25362,7 @@ fi - PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}" + PLATFORM_OPENH323="h323_${OPENH323_SUFFIX}" if test "${HAS_OPENH323:-unset}" != "unset"; then - { echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 installation validity" >&5 diff --git a/net/asterisk10/Makefile b/net/asterisk10/Makefile index b146b218c7d8..898c75b5ce10 100644 --- a/net/asterisk10/Makefile +++ b/net/asterisk10/Makefile @@ -1,278 +1,282 @@ # New ports collection makefile for: asterisk # Date created: 17 October 2003 # Whom: Maxim Sobolev # # $FreeBSD$ # PORTNAME= asterisk -PORTVERSION= 1.8.2.4 -PORTREVISION= 1 +PORTVERSION= 1.8.3 CATEGORIES= net MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \ http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ PKGNAMESUFFIX= 18 MAINTAINER= flo@FreeBSD.org COMMENT= An Open Source PBX and telephony toolkit LIB_DEPENDS= speex.1:${PORTSDIR}/audio/speex \ newt.52:${PORTSDIR}/devel/newt \ execinfo:${PORTSDIR}/devel/libexecinfo RUN_DEPENDS= mpg123:${PORTSDIR}/audio/mpg123 ONLY_FOR_ARCHS= i386 amd64 powerpc sparc64 GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/openh323" \ LDFLAGS="-L${LOCALBASE}/lib" CONFIGURE_ARGS= --with-gsm=${LOCALBASE} CPPFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/openh323 USE_GMAKE= yes USE_GNOME= libxml2 USE_BISON= build 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} \ NOISY_BUILD=YES \ DOCSDIR=${DOCSDIR} \ ASTCFLAGS="${CFLAGS}" MAN8= asterisk.8 astgenkey.8 autosupport.8 safe_asterisk.8 CONFLICTS_BUILD= linuxthreads-* CONFLICTS_INSTALL= asterisk*-1.2* asterisk*-1.4* asterisk*-1.6* OPTIONS= OGGVORBIS "Enable Ogg Vorbis support" on \ IODBC "Enable iODBC support" off \ UODBC "Enable unixODBC support" on \ POSTGRES "Enable PostgreSQL support" on \ MYSQL "Enable MySQL support" off \ 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 \ SQLITE "Enable SQLITE support" on \ GSM "Enable GSM codec" on \ CURL "Enable CURL support" on \ ILBC "Enable iLBC codec" off \ SPANDSP "Enable Spandsp faxing support" off \ - EXCHANGE "Enable Exchange calendar support" off + EXCHANGE "Enable Exchange calendar support" off \ + NEWG711 "Enable new G711 Codes" ASTERISK_USER?= asterisk ASTERISK_GROUP?= asterisk USERS= ${ASTERISK_USER} GROUPS= ${ASTERISK_GROUP} dahdi .include .if ${PREFIX} == ${LOCALBASE} VARDIR=/var .else VARDIR=${PREFIX}/var .endif .if ${ARCH} == "i386" || ${ARCH} == "amd64" || ${ARCH} == "sparc64" OPTIONS+= DAHDI "Enable DAHDI support" on .if defined(WITH_IODBC) && defined(WITH_UODBC) IGNORE= please select only one of iodbc or unixODBC .endif # Include this since we have altered OPTIONS. .include .endif SUB_LIST+= ASTERISK_USER=${ASTERISK_USER} PLIST_SUB+= ASTERISK_USER=${ASTERISK_USER} PLIST_SUB+= ASTERISK_GROUP=${ASTERISK_GROUP} PLIST_SUB+= VARDIR=${VARDIR} .if !defined(WITH_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(WITH_DAHDI) PLIST_SUB+= WITH_DAHDI="@comment " CONFIGURE_ARGS+= --without-dahdi .else PLIST_SUB+= WITH_DAHDI="" CONFIGURE_ARGS+= --with-dahdi BUILD_DEPENDS+= libpri>=1.4.10:${PORTSDIR}/misc/libpri \ ${LOCALBASE}/include/dahdi/user.h:${PORTSDIR}/misc/dahdi LIB_DEPENDS+= pri.1:${PORTSDIR}/misc/libpri RUN_DEPENDS+= ${LOCALBASE}/lib/dahdi/dahdi.ko:${PORTSDIR}/misc/dahdi .endif # # WITH_FREETDS, WITH_PGSQL and WITH_SQLITE can also be added to MAKE_ENV # similarly .if !defined(WITH_UODBC) CONFIGURE_ARGS+= --without-unixodbc .endif .if !defined(WITH_IODBC) CONFIGURE_ARGS+= --without-iodbc .endif .if !defined(WITH_UODBC) && !defined(WITH_IODBC) PLIST_SUB+= WITH_ODBC="@comment " .endif .if defined(WITH_UODBC) || defined(WITH_IODBC) PLIST_SUB+= WITH_ODBC="" USE_AUTOTOOLS= libltdl .if defined(WITH_UODBC) CONFIGURE_ARGS+= --with-unixodbc --with-ltdl LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC .elif defined(WITH_IODBC) CONFIGURE_ARGS+= --with-iodbc --with-ltdl LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc .endif .endif .if !defined(WITH_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(WITH_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(WITH_MYSQL) PLIST_SUB+= WITH_MYSQL="@comment " .else PLIST_SUB+= WITH_MYSQL="" USE_MYSQL= yes EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-menuselect-tree-mysql.diff .endif .if !defined(WITH_OGGVORBIS) PLIST_SUB+= WITH_OGGVORBIS="@comment " CONFIGURE_ARGS+= --without-ogg .else PLIST_SUB+= WITH_OGGVORBIS="" CONFIGURE_ARGS+= --with-ogg LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis .endif .if !defined(WITH_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(WITH_SNMP) PLIST_SUB+= WITH_SNMP="@comment " CONFIGURE_ARGS+= --without-netsnmp .else PLIST_SUB+= WITH_SNMP="" CONFIGURE_ARGS+= --with-netsnmp LIB_DEPENDS+= netsnmp:${PORTSDIR}/net-mgmt/net-snmp .endif .if !defined(WITH_JABBER) PLIST_SUB+= WITH_JABBER="@comment " CONFIGURE_ARGS+= --without-iksemel .else PLIST_SUB+= WITH_JABBER="" CONFIGURE_ARGS+= --with-iksemel LIB_DEPENDS+= iksemel.4:${PORTSDIR}/textproc/iksemel .endif .if !defined(WITH_SQLITE) PLIST_SUB+= WITH_SQLITE="@comment " CONFIGURE_ARGS+= --without-sqlite \ --with-sqlite3=no .else PLIST_SUB+= WITH_SQLITE="" CONFIGURE_ARGS+= --with-sqlite LIB_DEPENDS+= sqlite:${PORTSDIR}/databases/sqlite2 \ sqlite3:${PORTSDIR}/databases/sqlite3 .endif .if !defined(WITH_ILBC) PLIST_SUB+= WITH_ILBC="@comment " .else PLIST_SUB+= WITH_ILBC="" EXTRA_PATCHES+= ${PATCHDIR}/ilbc_enable.diff .endif .if !defined(WITH_GSM) PLIST_SUB+= WITH_GSM="@comment " CONFIGURE_ARGS+= --without-gsm .else PLIST_SUB+= WITH_GSM="" CONFIGURE_ARGS+= --with-gsm LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm .endif .if !defined(WITH_CURL) PLIST_SUB+= WITH_CURL="@comment " CONFIGURE_ARGS+= --with-libcurl=no .else PLIST_SUB+= WITH_CURL="" CONFIGURE_ARGS+= --with-libcurl LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl .endif .if !defined(WITH_SPANDSP) PLIST_SUB+= WITH_SPANDSP="@comment " CONFIGURE_ARGS+= --without-spandsp .else PLIST_SUB+= WITH_SPANDSP="" CONFIGURE_ARGS+= --with-spandsp LIB_DEPENDS+= spandsp.2:${PORTSDIR}/comms/spandsp-devel .endif .if !defined(WITH_EXCHANGE) CONFIGURE_ARGS+= --without-neon --without-neon29 PLIST_SUB+= WITH_EXCHANGE="@comment " .else LIB_DEPENDS+= neon.27:${PORTSDIR}/www/neon29 PLIST_SUB+= WITH_EXCHANGE="" .endif +.if defined(WITH_NEWG711) +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-menuselect-tree-g711-new-codec.diff +.endif + .if defined(WITH_MISC_PATCHES) EXTRA_PATCHES+= ${PATCHDIR}/dtmf_debug.diff EXTRA_PATCHES+= ${PATCHDIR}/feature_disconnect.diff EXTRA_PATCHES+= ${PATCHDIR}/sip_force_callid.diff EXTRA_PATCHES+= ${PATCHDIR}/sip_set_auth.diff .if defined(WITH_CODEC_PATCH) EXTRA_PATCHES+= ${PATCHDIR}/rtp_force_dtmf-codecnego.diff .else EXTRA_PATCHES+= ${PATCHDIR}/rtp_force_dtmf-nocodecnego.diff .endif .endif post-extract: ${MKDIR} ${WRKSRC}/codecs/ilbc ${FIND} ${WRKSRC} -name '*.d' -delete post-patch: ${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/musiconhold.conf.sample post-install: @${CHOWN} -R ${ASTERISK_USER}:${ASTERISK_GROUP} ${VARDIR}/db/asterisk ${VARDIR}/log/asterisk ${VARDIR}/spool/asterisk .include diff --git a/net/asterisk10/distinfo b/net/asterisk10/distinfo index 259d703524f6..e17e3277a6f9 100644 --- a/net/asterisk10/distinfo +++ b/net/asterisk10/distinfo @@ -1,2 +1,2 @@ -SHA256 (asterisk-1.8.2.4.tar.gz) = 978dc9b1f4585c31fafa23a86e347ad46a75d8b438c059423f804bea088bbb1d -SIZE (asterisk-1.8.2.4.tar.gz) = 26802859 +SHA256 (asterisk-1.8.3.tar.gz) = 976ae6dea0c22033049af8b8d19c9e058f13a04ba49a13b2ce9da9d2d4c07395 +SIZE (asterisk-1.8.3.tar.gz) = 26806503 diff --git a/net/asterisk10/files/extra-patch-menuselect-tree-g711-new-codec.diff b/net/asterisk10/files/extra-patch-menuselect-tree-g711-new-codec.diff new file mode 100644 index 000000000000..d93e9cb28b17 --- /dev/null +++ b/net/asterisk10/files/extra-patch-menuselect-tree-g711-new-codec.diff @@ -0,0 +1,10 @@ +--- menuselect-tree.orig 2011-02-21 09:56:29.000000000 +0100 ++++ menuselect-tree 2011-02-21 09:56:46.000000000 +0100 +@@ -777,7 +777,6 @@ + + + +- no + + + G711_NEW_ALGORITHM diff --git a/net/asterisk10/files/patch-Makefile b/net/asterisk10/files/patch-Makefile index 20cf399c3504..9dc24fa96ebe 100644 --- a/net/asterisk10/files/patch-Makefile +++ b/net/asterisk10/files/patch-Makefile @@ -1,115 +1,116 @@ ---- Makefile.orig 2010-12-08 03:51:05.000000000 +0500 -+++ Makefile 2011-01-15 04:05:06.000000000 +0500 +--- Makefile.orig 2011-01-12 16:57:43.000000000 +0100 ++++ Makefile 2011-03-02 11:34:26.000000000 +0100 @@ -122,7 +122,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 @@ -220,11 +220,13 @@ _ASTCFLAGS+=-isystem /usr/local/include endif +ifneq ($(OSARCH),FreeBSD) ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),) ifneq ($(PROC),ultrasparc) _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) endif endif +endif ifeq ($(PROC),ppc) _ASTCFLAGS+=-fsigned-char @@ -235,7 +237,7 @@ _ASTCFLAGS+=-march=i686 endif # -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 -@@ -463,13 +465,17 @@ +@@ -463,13 +465,18 @@ done - $(INSTALL) -m 644 doc/core-en_US.xml $(DESTDIR)$(ASTDATADIR)/static-http; + $(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http"; if [ -d doc/tex/asterisk ] ; then \ -- $(INSTALL) -d $(DESTDIR)$(ASTDATADIR)/static-http/docs ; \ +- $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \ + $(INSTALL) -d $(DESTDIR)$(DOCSDIR) ; \ + $(INSTALL) -d $(DESTDIR)$(DOCSDIR)/images ; \ for n in doc/tex/asterisk/* ; do \ -- $(INSTALL) -m 644 $$n $(DESTDIR)$(ASTDATADIR)/static-http/docs ; \ +- $(INSTALL) -m 644 $$n "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \ + $(INSTALL) -m 644 $$n $(DESTDIR)$(DOCSDIR) ; \ 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)$(ASTDATADIR)/images" ; \ + $(INSTALL) -m 644 $$x $(DESTDIR)$(DOCSDIR)/images ; \ done $(MAKE) -C sounds install -@@ -529,6 +535,7 @@ +@@ -529,6 +536,7 @@ $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/dictate" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/meetme" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/monitor" + $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/outgoing" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/system" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/tmp" $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail" -@@ -550,6 +557,7 @@ +@@ -550,6 +558,7 @@ $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http" $(INSTALL) -d "$(DESTDIR)$(ASTMANDIR)/man8" $(INSTALL) -d "$(DESTDIR)$(AGI_DIR)" + $(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)" bininstall: _all installdirs $(SUBDIRS_INSTALL) $(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/ -@@ -609,7 +617,7 @@ +@@ -609,7 +618,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 -@@ -651,29 +659,18 @@ +@@ -651,29 +660,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)|' \ diff --git a/net/asterisk10/files/patch-configure b/net/asterisk10/files/patch-configure index 1b5bf55ded99..7f9d1a6a71f1 100644 --- a/net/asterisk10/files/patch-configure +++ b/net/asterisk10/files/patch-configure @@ -1,50 +1,50 @@ ---- configure.orig 2011-01-25 00:37:33.000000000 +0100 -+++ configure 2011-01-25 00:39:33.000000000 +0100 -@@ -621,7 +621,6 @@ +--- configure.orig 2011-01-09 22:40:34.000000000 +0100 ++++ configure 2011-03-02 00:16:16.000000000 +0100 +@@ -600,7 +600,6 @@ ac_default_prefix=/usr/local ac_default_prefix=/usr/local ac_default_prefix=/usr/local -ac_default_prefix=/usr ac_header_list= - ac_subst_vars='SHELL - PATH_SEPARATOR -@@ -4279,9 +4278,9 @@ + ac_subst_vars='LTLIBOBJS + PBX_SYSLOG +@@ -4677,9 +4676,9 @@ astheaderdir='${includedir}/asterisk' astlibdir='${libdir}/asterisk' 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' -@@ -4303,9 +4302,6 @@ +@@ -4701,9 +4700,6 @@ case "${host_os}" in freebsd*) - - CPPFLAGS=-I/usr/local/include - LDFLAGS=-L/usr/local/lib ;; openbsd*) -@@ -27494,6 +27490,8 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF +@@ -17558,6 +17554,8 @@ + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -+#include -+#include - #include ++ #include ++ #include + #include int main () -@@ -45012,7 +45010,7 @@ +@@ -25364,7 +25362,7 @@ fi - PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}" + PLATFORM_OPENH323="h323_${OPENH323_SUFFIX}" if test "${HAS_OPENH323:-unset}" != "unset"; then - { echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 installation validity" >&5