Import Asterisk 10.0.0:

The Asterisk Development Team is proud to announce the release of
Asterisk 10.0.0. This release is available for immediate download
at http://downloads.asterisk.org/pub/telephony/asterisk/

Asterisk 10 is the next major release series of Asterisk. It will
be a Standard support release, similar to Asterisk 1.6.2. For more
information about support time lines for Asterisk releases, see
the Asterisk versions page:

   https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

With the release of the Asterisk 10 branch, the preceding '1.' has
been removed from the version number per the blog post available
at

http://blogs.digium.com/2011/07/21/the-evolution-of-asterisk-or-how-we-arrived-at-asterisk-10/

The release of Asterisk 10 would not have been possible without
the support and contributions of the community.

You can find an overview of the work involved with the 10.0.0
release in the summary:

http://svn.asterisk.org/svn/asterisk/tags/10.0.0/asterisk-10.0.0-summary.txt

A short list of available features includes:

* T.38 gateway functionality has been added to res_fax.
* Protocol independent out-of-call messaging support. Text messages not
   associated with an active call can now be routed through the Asterisk
   dialplan. SIP and XMPP are supported so far.
* New highly optimized and customizable ConfBridge application capable
   of mixing audio at sample rates ranging from 8kHz-192kHz
* Addition of video_mode option in confbridge.conf to provide basic video
   conferencing in the ConfBridge() dialplan application.
* Support for defining hints has been added to pbx_lua.
* Replacement of Berkeley DB with SQLite for the Asterisk Database (AstDB).
* Much, much more!

A full list of new features can be found in the CHANGES file.

   http://svn.asterisk.org/svn/asterisk/branches/10/CHANGES

Also, when upgrading a system between major versions, it is imperative
that you read and understand the contents of the UPGRADE.txt file,
which is located at:

   http://svn.asterisk.org/svn/asterisk/branches/10/UPGRADE.txt

Thank you for your continued support of Asterisk!
This commit is contained in:
jnemeth 2012-01-15 18:36:18 +00:00
parent cb17fa799a
commit 9d8621036c
37 changed files with 4485 additions and 0 deletions

14
comms/asterisk10/DESCR Normal file
View file

@ -0,0 +1,14 @@
Asterisk is a complete PBX in software. It provides all of the
features you would expect from a PBX and more. Asterisk does voice
over IP in three protocols, and can interoperate with almost all
standards-based telephony equipment using relatively inexpensive
hardware.
Asterisk provides Voicemail services with Directory, Call Conferencing,
Interactive Voice Response, Call Queuing. It has support for
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
client and gateway).
NOTE: This version does not work with the zaptel drivers. It
requires the newer DAHDI drivers which are still being ported.
So, there is no hardware support available at this moment.

12
comms/asterisk10/MESSAGE Normal file
View file

@ -0,0 +1,12 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2012/01/15 18:36:18 jnemeth Exp $
${PKGBASE} now runs as ${ASTERISK_USER}:${ASTERISK_GROUP} instead of ${ROOT_USER}:${ROOT_GROUP} by default.
If you are upgrading from an older version, you should execute the
following commands to correct permissions on existing files:
chown -R ${ASTERISK_USER}:${ASTERISK_GROUP} ${PKG_SYSCONFDIR} ${ASTDBDIR}
chown -R ${ASTERISK_USER}:${ASTERISK_GROUP} ${ASTSPOOLDIR} ${ASTLOGDIR}
===========================================================================

219
comms/asterisk10/Makefile Normal file
View file

@ -0,0 +1,219 @@
# $NetBSD: Makefile,v 1.1.1.1 2012/01/15 18:36:18 jnemeth Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked
DISTNAME= asterisk-10.0.0
DIST_SUBDIR= ${PKGNAME_NOREV}
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DISTNAME}.tar.gz
CATEGORIES= comms net audio
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
http://downloads.asterisk.org/pub/telephony/sounds/releases/
OWNER= jnemeth@NetBSD.org
HOMEPAGE= http://www.asterisk.org/
COMMENT= The Asterisk Software PBX
LICENSE= gnu-gpl-v2
CONFLICTS+= asterisk-sounds-extra-[0-9]*
PKG_DESTDIR_SUPPORT= user-destdir
.include "../../mk/bsd.prefs.mk"
USE_TOOLS+= bison gmake perl:run pkg-config tar
USE_LANGUAGES= c c++
REPLACE_PERL+= agi/DialAnMp3.agi agi/agi-test.agi
REPLACE_PERL+= agi/fastagi-test agi/jukebox.agi agi/numeralize
REPLACE_PERL+= contrib/scripts/vmail.cgi
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/libdata
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --without-gtk2
# XXX remove when lang/lua gets builtin.mk
CONFIGURE_ARGS+= --without-lua
INSTALL_TARGET= install samples
INSTALLATION_DIRS+= lib/pkgconfig share/doc/${PKGBASE}
INSTALLATION_DIRS+= share/examples/asterisk share/examples/rc.d
INSTALLATION_DIRS+= ${ASTDATADIR}/sounds/en ${ASTDATADIR}/moh
BUILD_DEFS+= VARBASE
ASTERISK_USER?= asterisk
ASTERISK_GROUP?= asterisk
PKG_GROUPS= ${ASTERISK_GROUP}
PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
PKG_GECOS.${ASTERISK_USER}= Asterisk PBX
PKG_GROUPS_VARS= ASTERISK_GROUP
PKG_USERS_VARS= ASTERISK_USER
FILES_SUBST+= ASTERISK_USER=${ASTERISK_USER}
FILES_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
MESSAGE_SUBST+= ASTERISK_USER=${ASTERISK_USER}
MESSAGE_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
# Various path settings for Asterisk
PKG_SYSCONFSUBDIR= asterisk
PKG_SYSCONFDIR_PERMS= ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
ASTETCDIR= ${PKG_SYSCONFDIR}
ASTEXAMPLEDIR= ${PREFIX}/share/examples/asterisk
ASTDBDIR= ${VARBASE}/db/asterisk
ASTSPOOLDIR= ${VARBASE}/spool/asterisk
ASTLOGDIR= ${VARBASE}/log/asterisk
MESSAGE_SUBST+= ASTDBDIR=${ASTDBDIR}
MESSAGE_SUBST+= ASTSPOOLDIR=${ASTSPOOLDIR}
MESSAGE_SUBST+= ASTLOGDIR=${ASTLOGDIR}
ASTVARRUNDIR= ${VARBASE}/run/asterisk
FILES_SUBST+= ASTVARRUNDIR=${ASTVARRUNDIR}
ASTDATADIR= ${PREFIX}/libdata/asterisk
MAKE_FLAGS+= ASTLIBDIR=${PREFIX}/lib/asterisk
MAKE_FLAGS+= ASTVARLIBDIR=${ASTDATADIR}
MAKE_FLAGS+= ASTKEYDIR=${ASTDATADIR}
MAKE_FLAGS+= ASTDATADIR=${ASTDATADIR}
MAKE_FLAGS+= ASTSPOOLDIR=${ASTSPOOLDIR}
MAKE_FLAGS+= ASTLOGDIR=${ASTLOGDIR}
MAKE_FLAGS+= ASTHEADERDIR=${PREFIX}/include/asterisk
MAKE_FLAGS+= ASTCONFPATH=${ASTETCDIR}/asterisk.conf
MAKE_FLAGS+= ASTBINDIR=${PREFIX}/bin
MAKE_FLAGS+= ASTSBINDIR=${PREFIX}/sbin
MAKE_FLAGS+= ASTVARRUNDIR=${ASTVARRUNDIR}
MAKE_FLAGS+= ASTMANDIR=${PREFIX}/${PKGMANDIR}
MAKE_FLAGS+= ASTETCDIR=${ASTETCDIR}
MAKE_FLAGS+= ASTDBDIR=${ASTDBDIR}
MAKE_FLAGS+= AGI_DIR=${PREFIX}/libexec/agi-bin
MAKE_FLAGS+= ASTEXAMPLEDIR=${ASTEXAMPLEDIR}
MAKE_FLAGS+= WRKSRC=${WRKSRC}
MAKE_FLAGS+= LDOPTS=${LDFLAGS:M*:Q}
MAKE_FLAGS+= HTTP_DOCSDIR=${PREFIX}/share/httpd/htdocs
MAKE_FLAGS+= HTTP_CGIDIR=${PREFIX}/libexec/cgi-bin
.include "options.mk"
# check sounds/Makefile for current version when upgrading package
DISTFILES+= asterisk-extra-sounds-en-gsm-1.4.11.tar.gz
# Override default paths in config files
SUBST_CLASSES+= configs
SUBST_STAGE.configs= pre-configure
SUBST_FILES.configs= configs/cli_aliases.conf.sample
SUBST_FILES.configs+= configs/festival.conf.sample
SUBST_FILES.configs+= configs/http.conf.sample
SUBST_FILES.configs+= configs/iax.conf.sample
SUBST_FILES.configs+= configs/musiconhold.conf.sample
SUBST_FILES.configs+= configs/osp.conf.sample
SUBST_FILES.configs+= configs/phoneprov.conf.sample
SUBST_FILES.configs+= configs/res_config_sqlite.conf.sample
SUBST_FILES.configs+= configs/sla.conf.sample
SUBST_SED.configs+= -e 's|doc/|${PREFIX}/share/doc/${PKGBASE}/|'
SUBST_SED.configs+= -e 's|/etc/asterisk|${ASTETCDIR}|'
SUBST_SED.configs+= -e 's|/var/lib/asterisk|${ASTVARLIBDIR}|'
SUBST_SED.configs+= -e "s|/usr/local/man|${ASTMANDIR}|"
SUBST_SED.configs+= -e "s|/usr/local|${PREFIX}|"
SUBST_SED.configs+= -e "s|/var|${VARBASE}|"
# XXX gross hack, remove when atomics properly implemented
.if (${OPSYS} == "NetBSD")
SUBST_CLASSES+= atomics
SUBST_STAGE.atomics= post-configure
SUBST_FILES.atomics= include/asterisk/autoconfig.h
SUBST_SED.atomics= -e "s|^\#define HAVE_GCC_ATOMICS 1|\#undef HAVE_GCC_ATOMICS|"
.endif
RCD_SCRIPTS= asterisk
OWN_DIRS_PERMS+= ${ASTDBDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/dictate ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/meetme ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/monitor ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/outgoing ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/system ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/tmp ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234 ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/INBOX ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
SPECIAL_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en/busy.gsm ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
SPECIAL_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en/unavail.gsm ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/INBOX ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/en ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR}/cdr-csv ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTLOGDIR}/cdr-custom ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
CONF_FILES_PERMS= # empty
.for f in asterisk.conf extensions.conf
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.endfor
# if we put all the files in $CONF_FILES, the message is _way_ too long.
.for f in adsi.conf agents.conf ais.conf alarmreceiver.conf alsa.conf \
amd.conf app_mysql.conf asterisk.adsi calendar.conf ccss.conf \
cdr.conf cdr_adaptive_odbc.conf cdr_custom.conf \
cdr_manager.conf cdr_mysql.conf cdr_odbc.conf cdr_pgsql.conf \
cdr_sqlite3_custom.conf cdr_syslog.conf cdr_tds.conf cel.conf \
cel_custom.conf cel_odbc.conf cel_pgsql.conf \
cel_sqlite3_custom.conf cel_tds.conf chan_dahdi.conf \
chan_mobile.conf chan_ooh323.conf cli.conf cli_aliases.conf \
cli_permissions.conf codecs.conf confbridge.conf console.conf \
dbsep.conf dnsmgr.conf dsp.conf dundi.conf enum.conf \
extconfig.conf extensions.ael extensions.conf extensions.lua \
extensions_minivm.conf features.conf festival.conf \
followme.conf func_odbc.conf gtalk.conf h323.conf http.conf \
iax.conf iaxprov.conf indications.conf jabber.conf jingle.conf \
logger.conf manager.conf meetme.conf mgcp.conf minivm.conf \
misdn.conf modules.conf musiconhold.conf muted.conf osp.conf \
oss.conf phone.conf phoneprov.conf queuerules.conf queues.conf \
res_config_mysql.conf res_config_sqlite.conf res_curl.conf \
res_fax.conf res_ldap.conf res_odbc.conf res_pgsql.conf \
res_pktccops.conf res_snmp.conf res_stun_monitor.conf rpt.conf \
rtp.conf say.conf sip.conf sip_notify.conf skinny.conf sla.conf \
smdi.conf telcordia-1.adsi udptl.conf unistim.conf \
usbradio.conf users.conf voicemail.conf vpb.conf
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
.endfor
PTHREAD_OPTS+= require native
.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
post-patch:
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
.endif
post-install:
# check sounds directory for current versions when upgrading package
${TAR} xzf ${WRKSRC}/sounds/asterisk-core-sounds-en-gsm-1.4.21.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${TAR} xzf ${WRKSRC}/sounds/asterisk-moh-opsound-wav-2.03.tar.gz -C ${DESTDIR}${ASTDATADIR}/moh
${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
${INSTALL_DATA} ${WRKSRC}/BUGS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/CREDITS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/README-SERIOUSLY.bestpractices.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.2.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.4.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.6.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.8.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/UPGRADE.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/Zaptel-to-DAHDI.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/Asterisk-Admin-Guide.pdf ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/IAX2-security.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/IAX2-security.pdf ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/README.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
${INSTALL_DATA} ${WRKSRC}/doc/api-1.6.2-changes.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
cp -r ${WRKSRC}/doc/Asterisk-Admin-Guide ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/Asterisk-Admin-Guide
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

2777
comms/asterisk10/PLIST Normal file

File diff suppressed because it is too large Load diff

44
comms/asterisk10/distinfo Normal file
View file

@ -0,0 +1,44 @@
$NetBSD: distinfo,v 1.1.1.1 2012/01/15 18:36:20 jnemeth Exp $
SHA1 (asterisk-10.0.0/asterisk-10.0.0.tar.gz) = ffe8c67ce7b34ea5ad098bb06ed8e55e08a291ab
RMD160 (asterisk-10.0.0/asterisk-10.0.0.tar.gz) = 9f9e4a9a9e5785ffd846f26c331b62dcceafd5bb
Size (asterisk-10.0.0/asterisk-10.0.0.tar.gz) = 24873318 bytes
SHA1 (asterisk-10.0.0/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz) = 8692fa61423b4769dc8bfa78faf9ed5ef7a259b9
RMD160 (asterisk-10.0.0/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz) = 68170c769d739d6b5b35b00f999ad6bbf876f9f6
Size (asterisk-10.0.0/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz) = 3349898 bytes
SHA1 (asterisk-10.0.0/extract-cfile.txt) = b22874814c83a53bcd1a8d96b5911304f304971e
RMD160 (asterisk-10.0.0/extract-cfile.txt) = e7205fe7e95793f3ca6e384edeef1ad5713485e0
Size (asterisk-10.0.0/extract-cfile.txt) = 643 bytes
SHA1 (asterisk-10.0.0/rfc3951.txt) = 1a6c769be750fb02456d60db2470909254496017
RMD160 (asterisk-10.0.0/rfc3951.txt) = 15f7ec61653ec9953172f8f2150e7d8f6f620926
Size (asterisk-10.0.0/rfc3951.txt) = 373442 bytes
SHA1 (patch-Makefile) = 900252eff84bda22d2cbe09e0f22505531284cbb
SHA1 (patch-apps_app__dial.c) = 2109ed50406dedc90a300981a3a7500b1397ff3a
SHA1 (patch-apps_app__followme.c) = a0a507986ec9722337d46fdaaac0a79d23a634e4
SHA1 (patch-apps_app__queue.c) = e035995563eb5533d5261568fdb43e8adcf2fe35
SHA1 (patch-apps_app__sms.c) = 8013727b495dc0ac038eb28b84e9d3839d0bc23d
SHA1 (patch-build__tools_mkpkgconfig) = 2bd3c0e24bc6d721cc234feb19b64a57106fcbe4
SHA1 (patch-channels_chan__oss.c) = 78095d744a44b2e173de036f45a3b3d652cba311
SHA1 (patch-codecs_lpc10_Makefile) = 0c9955e87eb453d70517951114d335d91b3ee73a
SHA1 (patch-configure) = e1c6507a9ba2758c565043596d0314eabce2ef7d
SHA1 (patch-configure.ac) = 27ac6fd657c490689ec06cddf7cd10e9cc8a7927
SHA1 (patch-contrib_scripts_autosupport) = 3426d7c2c8fc6342ffecde57ce9530c233a51409
SHA1 (patch-contrib_scripts_vmail.cgi) = 650b9bbf3e322d1ad351932cfe6f747baa8f35e4
SHA1 (patch-include_asterisk_autoconfig.h.in) = 7d6e3443ce3f0741c72a5f2178895598e79e83c9
SHA1 (patch-include_asterisk_endian.h) = 41c1a9a9e02fe394bc9261f5559e931b1378ea28
SHA1 (patch-include_asterisk_lock.h) = fc7b4934e5f53a09066802daa054300895cf7bcf
SHA1 (patch-main_Makefile) = 4b80898802c75937510acf5252c5e82d379f578e
SHA1 (patch-main_acl.c) = 85cea968f3c3a2651a687661bba2d8131c342d5a
SHA1 (patch-main_asterisk.c) = 9670f68f5496a74ee359ba45c85757fa894775b6
SHA1 (patch-main_features.c) = a63520c329df3192ee1b8bc4e2d36070ce450528
SHA1 (patch-main_manager.c) = 305204b2602b5775d97e72852859ce793a96df0a
SHA1 (patch-main_netsock.c) = 68721f0b1e8ed6744d467a39a82473c5d4946f0f
SHA1 (patch-main_sched.c) = fac7764ef00c05057730b24fcdf833fe77d23ade
SHA1 (patch-main_utils.c) = c79c65a6f81cb8e15edcb680d478c4085233d427
SHA1 (patch-pbx_pbx__dundi.c) = 190aaa60584cd81eea9b3bba3b5686668564d772
SHA1 (patch-sounds_Makefile) = 960aa87eb38abf92f4f681456c2a32db40180361
SHA1 (patch-tests_test__locale.c) = 37ba5fbf7cd3b0c4db4bf1872eb098aef440eeb9
SHA1 (patch-utils_Makefile) = 0d8c38b1a9450f4f0e364fc0213b9a8e56afce55
SHA1 (patch-utils_db1-ast_include_db.h) = 94ec413fe6a6154d65c43bdde2b26644d8bb5dac
SHA1 (patch-utils_extconf.c) = 11ace2372a1aa1e5130c41a41704acab10c18624
SHA1 (patch-utils_streamplayer.c) = fd83c3063f19405fdac3fb4640e42d62f55c7593

View file

@ -0,0 +1,43 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: asterisk.sh,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
#
# PROVIDE: asterisk
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# You will need to set some variables in /etc/rc.conf to start Asterisk:
#
# asterisk=YES
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
name="asterisk"
rcvar=$name
command="@PREFIX@/sbin/asterisk"
pidfile=@ASTVARRUNDIR@/${name}.pid
required_files="@PKG_SYSCONFDIR@/asterisk.conf"
extra_commands="reload"
start_precmd=asterisk_prestart
auser="@ASTERISK_USER@"
agroup="@ASTERISK_GROUP@"
command_args="-U $auser -G $agroup -n"
asterisk_prestart() {
if test ! -d @ASTVARRUNDIR@; then
mkdir @ASTVARRUNDIR@
fi
chown $auser:$agroup @ASTVARRUNDIR@
chmod 0755 @ASTVARRUNDIR@
}
stop_cmd="$command -nr -x 'core stop gracefully' >/dev/null"
reload_cmd="$command -nr -x 'core reload' >/dev/null"
asterisk_nice="-20"
load_rc_config $name
run_rc_command "$1"

110
comms/asterisk10/options.mk Normal file
View file

@ -0,0 +1,110 @@
# $NetBSD: options.mk,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.asterisk
PKG_SUPPORTED_OPTIONS= zaptel x11 unixodbc ilbc webvmail ldap spandsp
PKG_SUPPORTED_OPTIONS+= jabber
PKG_OPTIONS_LEGACY_OPTS+= gtk:x11
PKG_SUGGESTED_OPTIONS= ldap jabber
.include "../../mk/bsd.options.mk"
PLIST_VARS+= zaptel x11 unixodbc ilbc webvmail ldap spandsp jabber
# Asterisk now uses DAHDI, not zaptel; not implemented yet...
#.if !empty(PKG_OPTIONS:Mzaptel)
## zaptel only supported under NetBSD at the moment
#. include "../../comms/zaptel-netbsd/buildlink3.mk"
#PLIST.zaptel= yes
#.else
#MAKE_FLAGS+= WITHOUT_ZAPTEL=1
#.endif
# gtkconsole depends on GTK 2.x
.if !empty(PKG_OPTIONS:Mx11)
. include "../../x11/gtk2/buildlink3.mk"
. include "../../devel/SDL/buildlink3.mk"
CONFIGURE_ARGS+= --with-sdl
CONFIGURE_ARGS+= --with-gtk2
PLIST.x11= yes
.else
CONFIGURE_ARGS+= --without-sdl
CONFIGURE_ARGS+= --without-gtk2
.endif
.if !empty(PKG_OPTIONS:Munixodbc)
. include "../../databases/unixodbc/buildlink3.mk"
. include "../../devel/libltdl/buildlink3.mk"
CONFIGURE_ARGS+= --with-ltdl
CONFIGURE_ARGS+= --with-unixodbc
PLIST.unixodbc= yes
.else
CONFIGURE_ARGS+= --without-ltdl
CONFIGURE_ARGS+= --without-unixodbc
.endif
.if !empty(PKG_OPTIONS:Milbc)
DISTFILES+= rfc3951.txt
SITES.rfc3951.txt= http://www.ietf.org/rfc/
DISTFILES+= extract-cfile.txt
SITES.extract-cfile.txt= http://www.ilbcfreeware.org/documentation/
USE_TOOLS+= awk tr
PLIST.ilbc= yes
.endif
.if !empty(PKG_OPTIONS:Mspandsp)
. include "../../comms/spandsp/buildlink3.mk"
CONFIGURE_ARGS+= --with-spandsp
PLIST.spandsp= yes
.else
CONFIGURE_ARGS+= --without-spandsp
.endif
.if !empty(PKG_OPTIONS:Mjabber)
. include "../../textproc/iksemel/buildlink3.mk"
CONFIGURE_ARGS+= --with-iksemel=${PREFIX}
PLIST.jabber= yes
.else
CONFIGURE_ARGS+= --without-iksemel
.endif
MAKE_FLAGS+= GLOBAL_MAKEOPTS=${WRKSRC}/pkgsrc.makeopts
post-configure:
.if !empty(PKG_OPTIONS:Mx11)
${ECHO} "MENUSELECT_PBX=-pbx_gtkconsole" >> ${WRKSRC}/pkgsrc.makeopts
.endif
.if !empty(PKG_OPTIONS:Munixodbc)
${ECHO} "MENUSELECT_OPTS_app_voicemail=ODBC_STORAGE" >> ${WRKSRC}/pkgsrc.makeopts
.endif
.if !empty(PKG_OPTIONS:Milbc)
${ECHO} "MENUSELECT_CODECS=-codec_ilbc" >> ${WRKSRC}/pkgsrc.makeopts
.endif
# this is a hack to work around a bug in menuselect
${ECHO} "MENUSELECT_AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi" >> ${WRKSRC}/pkgsrc.makeopts
cd ${WRKSRC} && make menuselect.makeopts
post-extract:
.if !empty(PKG_OPTIONS:Milbc)
cp ${DISTDIR}/${DIST_SUBDIR}/rfc3951.txt ${WRKSRC}/codecs/ilbc
cp ${DISTDIR}/${DIST_SUBDIR}/extract-cfile.txt ${WRKSRC}/codecs/ilbc
cd ${WRKSRC}/codecs/ilbc && ${TR} -d '\r' < extract-cfile.txt | ${AWK} -f - rfc3951.txt
.endif
.if !empty(PKG_OPTIONS:Mwebvmail)
DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI
SUBST_CLASSES+= webvmail
SUBST_STAGE.webvmail= post-patch
SUBST_FILES.webvmail= contrib/scripts/vmail.cgi
SUBST_SED.webvmail+= -e 's|@ASTETCDIR@|${ASTETCDIR}|'
SUBST_SED.webvmail+= -e "s|@ASTSPOOLDIR@|${ASTSPOOLDIR}|"
INSTALLATION_DIRS+= ${PREFIX}/libexec/cgi-bin ${PREFIX}/share/httpd/htdocs
SPECIAL_PERMS+= ${PREFIX}/libexec/cgi-bin/vmail ${ASTERISK_USER} ${ASTERISK_GROUP} 04555
INSTALL_TARGET+= webvmail
PLIST.webvmail= yes
.endif
.if !empty(PKG_OPTIONS:Mldap)
.include "../../databases/openldap-client/buildlink3.mk"
PLIST.ldap= yes
.else
CONFIGURE_ARGS+= --without-ldap
.endif

View file

@ -0,0 +1,124 @@
$NetBSD: patch-Makefile,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- Makefile.orig 2011-12-08 23:20:44.000000000 +0000
+++ Makefile
@@ -128,7 +128,7 @@ DEBUG=-g3
# Asterisk.conf is located in ASTETCDIR or by using the -C flag
# when starting Asterisk
-ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
+ASTCONFPATH=$(ASTEXAMPLEDIR)/asterisk.conf
MODULES_DIR=$(ASTLIBDIR)/modules
AGI_DIR=$(ASTDATADIR)/agi-bin
@@ -220,10 +220,6 @@ ifeq ($(AST_DEVMODE),yes)
ADDL_TARGETS+=validate-docs
endif
-ifneq ($(findstring BSD,$(OSARCH)),)
- _ASTCFLAGS+=-isystem /usr/local/include
-endif
-
ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),)
ifneq ($(AST_MARCH_NATIVE),)
_ASTCFLAGS+=$(AST_MARCH_NATIVE)
@@ -452,7 +448,6 @@ dist-clean: distclean
distclean: $(SUBDIRS_DIST_CLEAN) _clean
@$(MAKE) -C menuselect dist-clean
- @$(MAKE) -C sounds dist-clean
rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
rm -f makeopts.embed_rules
rm -f config.log config.status config.cache
@@ -462,7 +457,7 @@ distclean: $(SUBDIRS_DIST_CLEAN) _clean
rm -rf doc/api
rm -f build_tools/menuselect-deps
-datafiles: _all doc/core-en_US.xml
+datafiles: doc/core-en_US.xml
CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig "$(DESTDIR)$(libdir)/pkgconfig";
# Should static HTTP be installed during make samples or even with its own target ala
# webvoicemail? There are portions here that *could* be customized but might also be
@@ -533,7 +528,7 @@ OLDHEADERS=$(filter-out $(NEWHEADERS) $(
installdirs:
$(INSTALL) -d "$(DESTDIR)$(MODULES_DIR)"
$(INSTALL) -d "$(DESTDIR)$(ASTSBINDIR)"
- $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
+ $(INSTALL) -d "$(DESTDIR)$(ASTEXAMPLEDIR)"
$(INSTALL) -d "$(DESTDIR)$(ASTVARRUNDIR)"
$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)"
$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/dictate"
@@ -563,7 +558,7 @@ installdirs:
$(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
$(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)"
-bininstall: _all installdirs $(SUBDIRS_INSTALL)
+bininstall: installdirs $(SUBDIRS_INSTALL)
$(INSTALL) -m 755 main/asterisk "$(DESTDIR)$(ASTSBINDIR)/"
$(LN) -sf asterisk "$(DESTDIR)$(ASTSBINDIR)/rasterisk"
$(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
@@ -655,21 +650,21 @@ upgrade: bininstall
# XXX why *.adsi is installed first ?
adsi:
@echo Installing adsi config files...
- $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
+ $(INSTALL) -d "$(DESTDIR)$(ASTEXAMPLEDIR)"
@for x in configs/*.adsi; do \
- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
+ dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x`" ; \
if [ -f "$${dst}" ] ; then \
echo "Overwriting $$x" ; \
else \
echo "Installing $$x" ; \
fi ; \
- $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
+ $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x`" ; \
done
samples: adsi
@echo Installing other config files...
@for x in configs/*.sample; do \
- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`" ; \
+ dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x .sample`" ; \
if [ -f "$${dst}" ]; then \
if [ "$(OVERWRITE)" = "y" ]; then \
if cmp -s "$${dst}" "$$x" ; then \
@@ -697,9 +692,9 @@ samples: adsi
-e 's|^astspooldir.*$$|astspooldir => $(ASTSPOOLDIR)|' \
-e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
-e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
- "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
- $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \
- rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
+ "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf" > "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" ; \
+ $(INSTALL) -m 644 "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf" ; \
+ rm -f "$(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp" ; \
fi ; \
$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX"
build_tools/make_sample_voicemail "$(DESTDIR)/$(ASTDATADIR)" "$(DESTDIR)/$(ASTSPOOLDIR)"
@@ -725,7 +720,7 @@ samples: adsi
webvmail:
@[ -d "$(DESTDIR)$(HTTP_DOCSDIR)/" ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
@[ -d "$(DESTDIR)$(HTTP_CGIDIR)" ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
- $(INSTALL) -m 4755 contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi"
+ $(INSTALL) contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail"
$(INSTALL) -d "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk"
for x in images/*.gif; do \
$(INSTALL) -m 644 $$x "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/"; \
@@ -879,7 +874,7 @@ uninstall-all: _uninstall
rm -rf "$(DESTDIR)$(ASTVARLIBDIR)"
rm -rf "$(DESTDIR)$(ASTDATADIR)"
rm -rf "$(DESTDIR)$(ASTSPOOLDIR)"
- rm -rf "$(DESTDIR)$(ASTETCDIR)"
+ rm -rf "$(DESTDIR)$(ASTEXAMPLEDIR)"
rm -rf "$(DESTDIR)$(ASTLOGDIR)"
menuconfig: menuselect
@@ -948,6 +943,7 @@ menuselect-tree: $(foreach dir,$(filter-
@echo "</menu>" >> $@
.PHONY: menuselect
+.PHONY: menuselect.makeopts
.PHONY: main
.PHONY: sounds
.PHONY: clean

View file

@ -0,0 +1,19 @@
$NetBSD: patch-apps_app__dial.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- apps/app_dial.c.orig 2011-10-05 17:01:46.000000000 +0000
+++ apps/app_dial.c
@@ -1816,12 +1816,12 @@ static void end_bridge_callback(void *da
ast_channel_lock(chan);
if (chan->cdr->answer.tv_sec) {
- snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t) ((long) end - chan->cdr->answer.tv_sec));
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
}
if (chan->cdr->start.tv_sec) {
- snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t) ((long) end - chan->cdr->start.tv_sec));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
}
ast_channel_unlock(chan);

View file

@ -0,0 +1,19 @@
$NetBSD: patch-apps_app__followme.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- apps/app_followme.c.orig 2011-09-20 22:49:36.000000000 +0000
+++ apps/app_followme.c
@@ -1011,12 +1011,12 @@ static void end_bridge_callback(void *da
ast_channel_lock(chan);
if (chan->cdr->answer.tv_sec) {
- snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t) ((long) end - chan->cdr->answer.tv_sec));
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
}
if (chan->cdr->start.tv_sec) {
- snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t) ((long) end - chan->cdr->start.tv_sec));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
}
ast_channel_unlock(chan);

View file

@ -0,0 +1,165 @@
$NetBSD: patch-apps_app__queue.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- apps/app_queue.c.orig 2011-10-25 21:10:02.000000000 +0000
+++ apps/app_queue.c
@@ -3406,8 +3406,8 @@ static void record_abandoned(struct queu
"Uniqueid: %s\r\n"
"Position: %d\r\n"
"OriginalPosition: %d\r\n"
- "HoldTime: %d\r\n",
- qe->parent->name, qe->chan->uniqueid, qe->pos, qe->opos, (int)(time(NULL) - qe->start));
+ "HoldTime: %jd\r\n",
+ qe->parent->name, qe->chan->uniqueid, qe->pos, qe->opos, (intmax_t)(time(NULL) - qe->start));
qe->parent->callsabandoned++;
ao2_unlock(qe->parent);
@@ -4010,7 +4010,7 @@ static int wait_our_turn(struct queue_en
if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty))) {
*reason = QUEUE_LEAVEEMPTY;
- ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
+ ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
leave_queue(qe);
break;
}
@@ -4216,12 +4216,12 @@ static void send_agent_complete(const st
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
- "HoldTime: %ld\r\n"
- "TalkTime: %ld\r\n"
+ "HoldTime: %jd\r\n"
+ "TalkTime: %jd\r\n"
"Reason: %s\r\n"
"%s",
queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername,
- (long)(callstart - qe->start), (long)(time(NULL) - callstart), reason,
+ (intmax_t)(callstart - qe->start), (intmax_t)(time(NULL) - callstart), reason,
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, vars_len) : "");
}
@@ -4264,9 +4264,9 @@ static void queue_transfer_fixup(void *d
int callcompletedinsl = qtds->callcompletedinsl;
struct ast_datastore *datastore;
- ast_queue_log(qe->parent->name, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%ld|%ld|%d",
- new_chan->exten, new_chan->context, (long) (callstart - qe->start),
- (long) (time(NULL) - callstart), qe->opos);
+ ast_queue_log(qe->parent->name, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%jd|%jd|%d",
+ new_chan->exten, new_chan->context, (intmax_t) (callstart - qe->start),
+ (intmax_t) (time(NULL) - callstart), qe->opos);
update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart));
@@ -4744,7 +4744,7 @@ static int try_calling(struct queue_ent
} else if (res2) {
/* Caller must have hung up just before being connected*/
ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", peer->name);
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
record_abandoned(qe);
ast_hangup(peer);
ao2_ref(member, -1);
@@ -4791,8 +4791,8 @@ static int try_calling(struct queue_ent
/* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
/* use pbx_builtin_setvar to set a load of variables with one call */
if (qe->parent->setqueueentryvar) {
- snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%ld,QEORIGINALPOS=%d",
- (long) time(NULL) - qe->start, qe->opos);
+ snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%jd,QEORIGINALPOS=%d",
+ (intmax_t) time(NULL) - qe->start, qe->opos);
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -5050,8 +5050,8 @@ static int try_calling(struct queue_ent
ast_log(LOG_WARNING, "Asked to execute an AGI on this channel, but could not find application (agi)!\n");
}
qe->handled++;
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, peer->uniqueid,
- (long)(orig - to > 0 ? (orig - to) / 1000 : 0));
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%jd|%s|%jd", (intmax_t) time(NULL) - qe->start, peer->uniqueid,
+ (intmax_t)(orig - to > 0 ? (orig - to) / 1000 : 0));
if (qe->chan->cdr) {
struct ast_cdr *cdr;
@@ -5087,12 +5087,12 @@ static int try_calling(struct queue_ent
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
- "Holdtime: %ld\r\n"
+ "Holdtime: %jd\r\n"
"BridgedChannel: %s\r\n"
- "Ringtime: %ld\r\n"
+ "Ringtime: %jd\r\n"
"%s",
queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername,
- (long) time(NULL) - qe->start, peer->uniqueid, (long)(orig - to > 0 ? (orig - to) / 1000 : 0),
+ (intmax_t) time(NULL) - qe->start, peer->uniqueid, (intmax_t)(orig - to > 0 ? (orig - to) / 1000 : 0),
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
ast_copy_string(oldcontext, qe->chan->context, sizeof(oldcontext));
ast_copy_string(oldexten, qe->chan->exten, sizeof(oldexten));
@@ -5124,17 +5124,17 @@ static int try_calling(struct queue_ent
/* detect a blind transfer */
if (!(qe->chan->_softhangup | peer->_softhangup) && (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten))) {
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%ld|%ld|%d",
- qe->chan->exten, qe->chan->context, (long) (callstart - qe->start),
- (long) (time(NULL) - callstart), qe->opos);
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%jd|%jd|%d",
+ qe->chan->exten, qe->chan->context, (intmax_t) (callstart - qe->start),
+ (intmax_t) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), TRANSFER);
} else if (ast_check_hangup(qe->chan)) {
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETECALLER", "%ld|%ld|%d",
- (long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETECALLER", "%jd|%jd|%d",
+ (intmax_t) (callstart - qe->start), (intmax_t) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), CALLER);
} else {
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETEAGENT", "%ld|%ld|%d",
- (long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETEAGENT", "%jd|%jd|%d",
+ (intmax_t) (callstart - qe->start), (intmax_t) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
}
if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) {
@@ -6025,8 +6025,8 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
- ast_queue_log(args.queuename, chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld",
- qe.pos, qe.opos, (long) time(NULL) - qe.start);
+ ast_queue_log(args.queuename, chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd",
+ qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
break;
}
@@ -6068,7 +6068,7 @@ check_turns:
if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty))) {
record_abandoned(&qe);
reason = QUEUE_LEAVEEMPTY;
- ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
+ ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t)(time(NULL) - qe.start));
res = 0;
break;
}
@@ -6090,7 +6090,7 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
- ast_queue_log(qe.parent->name, qe.chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld", qe.pos, qe.opos, (long) time(NULL) - qe.start);
+ ast_queue_log(qe.parent->name, qe.chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
break;
}
@@ -6117,8 +6117,8 @@ stop:
if (!qe.handled) {
record_abandoned(&qe);
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "ABANDON",
- "%d|%d|%ld", qe.pos, qe.opos,
- (long) time(NULL) - qe.start);
+ "%d|%d|%jd", qe.pos, qe.opos,
+ (intmax_t) time(NULL) - qe.start);
res = -1;
} else if (qcontinue) {
reason = QUEUE_CONTINUE;

View file

@ -0,0 +1,13 @@
$NetBSD: patch-apps_app__sms.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- apps/app_sms.c.orig 2011-07-14 20:25:31.000000000 +0000
+++ apps/app_sms.c
@@ -553,7 +553,7 @@ static void packdate(unsigned char *o, t
int z;
ast_localtime(&topack, &t, NULL);
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__DragonFly__)
z = -t.tm_gmtoff / 60 / 15;
#else
z = timezone / 60 / 15;

View file

@ -0,0 +1,21 @@
$NetBSD: patch-build__tools_mkpkgconfig,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- build_tools/mkpkgconfig.orig 2011-08-25 15:29:56.000000000 +0000
+++ build_tools/mkpkgconfig
@@ -21,12 +21,15 @@ else
fi
## Clean out CFLAGS for the spec file.
+## pkgsrc -- the regex below isn't sed compatible, so always use perl
+EXTREGEX="perl -pe"
LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/\s*-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
${EXTREGEX} 's/-I(include|\.\.\/include) //g' | \
${EXTREGEX} 's/-DINSTALL_PREFIX=\S* //g' | \
${EXTREGEX} 's/-DASTERISK_VERSION=\S* //g' | \
- ${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
+ ${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g' | \
+ ${EXTREGEX} "s;${WRKSRC};${PREFIX};g"`
cat <<EOF > "$PPATH/asterisk.pc"

View file

@ -0,0 +1,13 @@
$NetBSD: patch-channels_chan__oss.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- channels/chan_oss.c.orig 2011-09-09 16:27:01.000000000 +0000
+++ channels/chan_oss.c
@@ -48,7 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#ifdef __linux
#include <linux/soundcard.h>
-#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__GLIBC__)
+#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__DragonFly__) || defined(__GLIBC__)
#include <sys/soundcard.h>
#else
#include <soundcard.h>

View file

@ -0,0 +1,34 @@
$NetBSD: patch-codecs_lpc10_Makefile,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- codecs/lpc10/Makefile.orig 2011-03-11 15:09:23.000000000 +0000
+++ codecs/lpc10/Makefile
@@ -35,19 +35,21 @@ ifeq ($(findstring -march,$(_ASTCFLAGS)
ifneq ($(OSARCH),Darwin)
ifneq ($(findstring BSD,${OSARCH}),BSD)
ifneq ($(PROC),ppc)
- ifneq ($(PROC),x86_64)
- ifneq ($(PROC),alpha)
+ ifneq ($(PROC),powerpc)
+ ifneq ($(PROC),x86_64)
+ ifneq ($(PROC),alpha)
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
#This works for even old (2.96) versions of gcc and provides a small boost either way.
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
#So we go lowest common available by gcc and go a step down, still a step up from
#the default as we now have a better instruction set to work with. - Belgarath
- ifeq ($(PROC),ultrasparc)
- CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
- else
- ifneq ($(OSARCH),SunOS)
- ifneq ($(OSARCH),arm)
- # CFLAGS+= -march=$(PROC)
+ ifeq ($(PROC),ultrasparc)
+ CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
+ else
+ ifneq ($(OSARCH),SunOS)
+ ifneq ($(OSARCH),arm)
+ # CFLAGS+= -march=$(PROC)
+ endif
endif
endif
endif

View file

@ -0,0 +1,174 @@
$NetBSD: patch-configure,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- configure.orig 2011-10-06 22:58:40.000000000 +0000
+++ configure
@@ -24271,6 +24271,148 @@ fi
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
+$as_echo_n "checking for sys/atomic.h... " >&6; }
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
+$as_echo "$ac_cv_header_sys_atomic_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking sys/atomic.h usability" >&5
+$as_echo_n "checking sys/atomic.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/atomic.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking sys/atomic.h presence" >&5
+$as_echo_n "checking sys/atomic.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/atomic.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/atomic.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: sys/atomic.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to https://issues.asterisk.org ##
+## ------------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
+$as_echo_n "checking for sys/atomic.h... " >&6; }
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_sys_atomic_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
+$as_echo "$ac_cv_header_sys_atomic_h" >&6; }
+
+fi
+if test "x$ac_cv_header_sys_atomic_h" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_ATOMIC_H 1
+_ACEOF
+
+fi
+
+
+
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -28575,6 +28717,8 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/socket.h>
#include <ifaddrs.h>
int
main ()
@@ -55532,10 +55676,9 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_SBIN_LAUNCHD 1
_ACEOF
-fi
-
PBX_LAUNCHD=1
fi
+fi
PBX_GTK2=0

View file

@ -0,0 +1,14 @@
$NetBSD: patch-configure.ac,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- configure.ac.orig 2011-10-06 22:58:40.000000000 +0000
+++ configure.ac
@@ -1051,6 +1051,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
AC_CHECK_HEADER([libkern/OSAtomic.h],
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
+AC_CHECK_HEADER([sys/atomic.h],
+ [AC_DEFINE_UNQUOTED([HAVE_SYS_ATOMIC_H], 1, [Define to 1 if sys/atomic.h atomic operations are supported.])])
+
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([long long])

View file

@ -0,0 +1,13 @@
$NetBSD: patch-contrib_scripts_autosupport,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- contrib/scripts/autosupport.orig 2011-01-04 21:00:36.000000000 +0000
+++ contrib/scripts/autosupport
@@ -32,7 +32,7 @@ files="n";
# If a prefix is specified on command-line, add it.
if (set -u; : $1) 2> /dev/null
then
- if [ $1 == "-h" ] || [ $1 == "--help" ]; then
+ if [ $1 = "-h" ] || [ $1 = "--help" ]; then
echo
echo "Digium autosupport script"
echo "Copyright (C) 2005-2010, Digium, Inc."

View file

@ -0,0 +1,187 @@
$NetBSD: patch-contrib_scripts_vmail.cgi,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- contrib/scripts/vmail.cgi.orig 2008-09-20 00:52:20.000000000 +0000
+++ contrib/scripts/vmail.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/pkg/bin/perl
#
# Web based Voicemail for Asterisk
#
@@ -145,7 +145,7 @@ sub check_login($$)
$context = "default";
}
if (!$filename) {
- $filename = "/etc/asterisk/voicemail.conf";
+ $filename = "@ASTETCDIR@/voicemail.conf";
}
# print header;
# print "Including <h2>$filename</h2> while in <h2>$category</h2>...\n";
@@ -153,7 +153,7 @@ sub check_login($$)
while(<VMAIL>) {
chomp;
if (/include\s\"([^\"]+)\"$/) {
- ($tmp, $category) = &check_login("/etc/asterisk/$1", $category);
+ ($tmp, $category) = &check_login("@ASTETCDIR@/$1", $category);
if (length($tmp)) {
# print "Got '$tmp'\n";
return ($tmp, $category);
@@ -200,7 +200,7 @@ sub check_login_users {
my ($mbox, $context) = split(/\@/, param('mailbox'));
my $pass = param('password');
my ($found, $fullname) = (0, "");
- open VMAIL, "</etc/asterisk/users.conf";
+ open VMAIL, "<@ASTETCDIR@/users.conf";
while (<VMAIL>) {
chomp;
if (m/\[(.*)\]/) {
@@ -242,7 +242,7 @@ sub validmailbox($$$$)
$context = "default";
}
if (!$filename) {
- $filename = "/etc/asterisk/voicemail.conf";
+ $filename = "@ASTETCDIR@/voicemail.conf";
}
if (!$category) {
$category = "general";
@@ -251,7 +251,7 @@ sub validmailbox($$$$)
while (<VMAIL>) {
chomp;
if (/include\s\"([^\"]+)\"$/) {
- ($tmp, $category) = &validmailbox($mbox, $context, "/etc/asterisk/$1");
+ ($tmp, $category) = &validmailbox($mbox, $context, "@ASTETCDIR@/$1");
if ($tmp) {
return ($tmp, $category);
}
@@ -298,7 +298,7 @@ sub mailbox_options()
local $tmp2;
local $tmp;
if (!$filename) {
- $filename = "/etc/asterisk/voicemail.conf";
+ $filename = "@ASTETCDIR@/voicemail.conf";
}
if (!$category) {
$category = "general";
@@ -386,7 +386,7 @@ sub mailbox_list()
sub msgcount()
{
my ($context, $mailbox, $folder) = @_;
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder";
if (opendir(DIR, $path)) {
my @msgs = grep(/^msg....\.txt$/, readdir(DIR));
closedir(DIR);
@@ -410,7 +410,7 @@ sub msgcountstr()
sub messages()
{
my ($context, $mailbox, $folder) = @_;
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder";
if (opendir(DIR, $path)) {
my @msgs = sort grep(/^msg....\.txt$/, readdir(DIR));
closedir(DIR);
@@ -435,7 +435,7 @@ sub getfields()
{
my ($context, $mailbox, $folder, $msg) = @_;
my $fields;
- if (open(MSG, "</var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msg}.txt")) {
+ if (open(MSG, "<@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder/msg${msg}.txt")) {
while(<MSG>) {
s/\#.*$//g;
if (/^(\w+)\s*\=\s*(.*)$/) {
@@ -560,7 +560,7 @@ _EOH
<input name="action" type=submit value="download">
</td></tr>
<tr><td colspan=2 align=center>
-<embed width=400 height=40 src="vmail.cgi?action=audio&folder=$folder&mailbox=$mbox&context=$context&password=$passwd&msgid=$msgid&format=$format&dontcasheme=$$.$format" autostart=yes loop=false></embed>
+<embed width=400 height=40 src="vmail?action=audio&folder=$folder&mailbox=$mbox&context=$context&password=$passwd&msgid=$msgid&format=$format&dontcasheme=$$.$format" autostart=yes loop=false></embed>
</td></tr></table>
</td></tr>
</table>
@@ -588,7 +588,7 @@ sub message_audio()
}
&untaint($format);
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msgid}.$format";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder/msg${msgid}.$format";
$msgid =~ /^\d\d\d\d$/ || die("Msgid Liar ($msgid)!");
grep(/^${format}$/, keys %formats) || die("Format Liar ($format)!");
@@ -809,11 +809,11 @@ sub message_rename()
die("Invalid old Message<BR>\n");
}
- my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$newfolder";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$newfolder";
$path =~ /^(.*)$/;
$path = $1;
mkdir $path, 0770;
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder";
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$oldfolder";
opendir(DIR, $path) || die("Unable to open directory\n");
my @files = grep /^msg${old}\.\w+$/, readdir(DIR);
closedir(DIR);
@@ -823,7 +823,7 @@ sub message_rename()
$tmp = $1;
$oldfile = $path . "/$tmp";
$tmp =~ s/msg${old}/msg${new}/;
- $newfile = "/var/spool/asterisk/voicemail/$context/$mbox/$newfolder/$tmp";
+ $newfile = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$newfolder/$tmp";
# print "Renaming $oldfile to $newfile<BR>\n";
rename($oldfile, $newfile);
}
@@ -884,15 +884,15 @@ sub message_copy()
die("Invalid old Message<BR>\n");
}
- my $path = "/var/spool/asterisk/voicemail/$context/$newmbox";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox";
$path =~ /^(.*)$/;
$path = $1;
mkdir $path, 0770;
- $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX";
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX";
$path =~ /^(.*)$/;
$path = $1;
mkdir $path, 0770;
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder";
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$oldfolder";
opendir(DIR, $path) || die("Unable to open directory\n");
my @files = grep /^msg${old}\.\w+$/, readdir(DIR);
closedir(DIR);
@@ -902,7 +902,7 @@ sub message_copy()
$tmp = $1;
$oldfile = $path . "/$tmp";
$tmp =~ s/msg${old}/msg${new}/;
- $newfile = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX/$tmp";
+ $newfile = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX/$tmp";
# print "Copying $oldfile to $newfile<BR>\n";
&file_copy($oldfile, $newfile);
}
@@ -932,7 +932,7 @@ sub message_delete()
} else {
die("Invalid Message<BR>\n");
}
- my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$folder";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$folder";
opendir(DIR, $path) || die("Unable to open directory\n");
my @files = grep /^msg${msg}\.\w+$/, readdir(DIR);
closedir(DIR);
@@ -968,7 +968,7 @@ sub message_forward()
my $txt;
$context = &untaint($context);
$newmbox = &untaint($newmbox);
- my $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX";
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX";
if ($msgs[0]) {
if (&lock_path($path) == 0) {
$msgcount = &msgcount($context, $newmbox, "INBOX");
@@ -1018,7 +1018,7 @@ sub message_delete_or_move()
$context = &untaint($context);
$mbox = &untaint($mbox);
$folder = &untaint($folder);
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$folder";
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$folder";
if ($msgs[0]) {
if (&lock_path($path) == 0) {
my $msgcount = &msgcount($context, $mbox, $folder);

View file

@ -0,0 +1,14 @@
$NetBSD: patch-include_asterisk_autoconfig.h.in,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- include/asterisk/autoconfig.h.in.orig 2011-10-06 22:58:40.000000000 +0000
+++ include/asterisk/autoconfig.h.in
@@ -896,6 +896,9 @@
/* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
+/* Define to 1 if sys/atomic.h atomic operations are supported. */
+#undef HAVE_SYS_ATOMIC_H
+
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H

View file

@ -0,0 +1,16 @@
$NetBSD: patch-include_asterisk_endian.h,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- include/asterisk/endian.h.orig 2008-10-09 17:48:53.000000000 +0000
+++ include/asterisk/endian.h
@@ -31,6 +31,11 @@
#ifndef __BYTE_ORDER
#ifdef __linux__
#include <endian.h>
+#elif defined(__DragonFly__)
+#include <sys/endian.h>
+#define __BYTE_ORDER BYTE_ORDER
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
#if defined(__OpenBSD__)
#include "asterisk/compat.h"

View file

@ -0,0 +1,50 @@
$NetBSD: patch-include_asterisk_lock.h,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- include/asterisk/lock.h.orig 2011-01-31 07:52:48.000000000 +0000
+++ include/asterisk/lock.h
@@ -569,7 +569,7 @@ static void __attribute__((destructor))
#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__DragonFly__)
#define pthread_create __use_ast_pthread_create_instead__
#endif
@@ -591,6 +591,10 @@ int ast_atomic_fetchadd_int_slow(volatil
#include "libkern/OSAtomic.h"
#endif
+#if defined(HAVE_SYS_ATOMIC_H)
+#include <sys/atomic.h>
+#endif
+
/*! \brief Atomically add v to *p and return * the previous value of *p.
* This can be used to handle reference counts, and the return value
* can be used to generate unique identifiers.
@@ -610,6 +614,12 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
return OSAtomicAdd64(v, (int64_t *) p) - v;
+})
+#elif defined(HAVE_SYS_ATOMIC_H)
+AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
+{
+ return atomic_add_int_nv((unsigned int *)p, v) - v;
+})
#elif defined (__i386__) || defined(__x86_64__)
#ifdef sun
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
@@ -656,6 +666,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{
return OSAtomicAdd64( -1, (int64_t *) p) == 0;
+})
+#elif defined(HAVE_SYS_ATOMIC_H)
+AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
+{
+ return atomic_dec_uint_nv((unsigned int *)p) == 0;
+})
#else
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{

View file

@ -0,0 +1,15 @@
$NetBSD: patch-main_Makefile,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- main/Makefile.orig 2011-09-19 20:29:40.000000000 +0000
+++ main/Makefile
@@ -88,6 +88,10 @@ ifeq ($(OSARCH),OpenBSD)
AST_LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)
endif
+ifeq ($(OSARCH),dragonfly)
+ AST_LIBS+=-lpthread
+endif
+
ifeq ($(OSARCH),SunOS)
AST_LIBS+=-lpthread -ldl -lrt -lnsl -lsocket -lresolv -L/opt/ssl/lib -L/usr/local/ssl/lib
ASTLINK=

View file

@ -0,0 +1,40 @@
$NetBSD: patch-main_acl.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- main/acl.c.orig 2011-11-08 18:01:11.000000000 +0000
+++ main/acl.c
@@ -123,7 +123,7 @@ static int get_local_address(struct ast_
char *buf = NULL;
int bufsz, x;
#endif /* SOLARIS */
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__) || defined(__GLIBC__)
struct ifaddrs *ifap, *ifaphead;
int rtnerr;
const struct sockaddr_in *sin;
@@ -132,7 +132,7 @@ static int get_local_address(struct ast_
int best_score = -100;
memset(&best_addr, 0, sizeof(best_addr));
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__) || defined(__GLIBC__)
rtnerr = getifaddrs(&ifaphead);
if (rtnerr) {
perror(NULL);
@@ -143,7 +143,7 @@ static int get_local_address(struct ast_
s = socket(AF_INET, SOCK_STREAM, 0);
if (s > 0) {
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__GLIBC__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__) || defined(__GLIBC__)
for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) {
if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_INET) {
@@ -202,7 +202,7 @@ static int get_local_address(struct ast_
close(s);
}
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__) || defined(__DragonFly__)
freeifaddrs(ifaphead);
#endif /* BSD_OR_LINUX */

View file

@ -0,0 +1,13 @@
$NetBSD: patch-main_asterisk.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- main/asterisk.c.orig 2011-12-08 23:20:44.000000000 +0000
+++ main/asterisk.c
@@ -85,7 +85,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <sys/sysctl.h>
#if !defined(__OpenBSD__)
#include <sys/vmmeter.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <vm/vm_param.h>
#endif
#endif

View file

@ -0,0 +1,88 @@
$NetBSD: patch-main_features.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- main/features.c.orig 2011-10-20 21:58:39.000000000 +0000
+++ main/features.c
@@ -1494,14 +1494,14 @@ static int park_call_full(struct ast_cha
"Channel: %s\r\n"
"Parkinglot: %s\r\n"
"From: %s\r\n"
- "Timeout: %ld\r\n"
+ "Timeout: %jd\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
"ConnectedLineNum: %s\r\n"
"ConnectedLineName: %s\r\n"
"Uniqueid: %s\r\n",
pu->parkingexten, pu->chan->name, pu->parkinglot->name, event_from ? event_from : "",
- (long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL),
+ (intmax_t)pu->start.tv_sec + (intmax_t)(pu->parkingtime/1000) - (intmax_t)time(NULL),
S_COR(pu->chan->caller.id.number.valid, pu->chan->caller.id.number.str, "<unknown>"),
S_COR(pu->chan->caller.id.name.valid, pu->chan->caller.id.name.str, "<unknown>"),
S_COR(pu->chan->connected.id.number.valid, pu->chan->connected.id.number.str, "<unknown>"),
@@ -2053,7 +2053,7 @@ static int builtin_automonitor(struct as
len = strlen(touch_monitor) + 50;
args = alloca(len);
touch_filename = alloca(len);
- snprintf(touch_filename, len, "%s-%ld-%s", S_OR(touch_monitor_prefix, "auto"), (long)time(NULL), touch_monitor);
+ snprintf(touch_filename, len, "%s-%jd-%s", S_OR(touch_monitor_prefix, "auto"), (intmax_t)time(NULL), touch_monitor);
snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
} else {
caller_chan_id = ast_strdupa(S_COR(caller_chan->caller.id.number.valid,
@@ -2063,7 +2063,7 @@ static int builtin_automonitor(struct as
len = strlen(caller_chan_id) + strlen(callee_chan_id) + 50;
args = alloca(len);
touch_filename = alloca(len);
- snprintf(touch_filename, len, "%s-%ld-%s-%s", S_OR(touch_monitor_prefix, "auto"), (long)time(NULL), caller_chan_id, callee_chan_id);
+ snprintf(touch_filename, len, "%s-%jd-%s-%s", S_OR(touch_monitor_prefix, "auto"), (intmax_t)time(NULL), caller_chan_id, callee_chan_id);
snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
}
@@ -2169,7 +2169,7 @@ static int builtin_automixmonitor(struct
len = strlen(touch_monitor) + 50;
args = alloca(len);
touch_filename = alloca(len);
- snprintf(touch_filename, len, "auto-%ld-%s", (long)time(NULL), touch_monitor);
+ snprintf(touch_filename, len, "auto-%jd-%s", (intmax_t)time(NULL), touch_monitor);
snprintf(args, len, "%s.%s,b", touch_filename, (touch_format) ? touch_format : "wav");
} else {
caller_chan_id = ast_strdupa(S_COR(caller_chan->caller.id.number.valid,
@@ -2179,7 +2179,7 @@ static int builtin_automixmonitor(struct
len = strlen(caller_chan_id) + strlen(callee_chan_id) + 50;
args = alloca(len);
touch_filename = alloca(len);
- snprintf(touch_filename, len, "auto-%ld-%s-%s", (long)time(NULL), caller_chan_id, callee_chan_id);
+ snprintf(touch_filename, len, "auto-%jd-%s-%s", (intmax_t)time(NULL), caller_chan_id, callee_chan_id);
snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav"));
}
@@ -6922,10 +6922,10 @@ static char *handle_parkedcalls(struct a
AST_LIST_LOCK(&curlot->parkings);
AST_LIST_TRAVERSE(&curlot->parkings, cur, list) {
- ast_cli(a->fd, "%-10.10s %-25s (%-15s %-12s %4d) %6lds\n",
+ ast_cli(a->fd, "%-10.10s %-25s (%-15s %-12s %4d) %6jds\n",
cur->parkingexten, cur->chan->name, cur->context, cur->exten,
cur->priority,
- (long) (cur->start.tv_sec + (cur->parkingtime / 1000) - time(NULL)));
+ (intmax_t) (cur->start.tv_sec + (cur->parkingtime / 1000) - time(NULL)));
++lotparked;
}
AST_LIST_UNLOCK(&curlot->parkings);
@@ -6981,7 +6981,7 @@ static int manager_parking_status(struct
"Exten: %d\r\n"
"Channel: %s\r\n"
"From: %s\r\n"
- "Timeout: %ld\r\n"
+ "Timeout: %jd\r\n"
"CallerIDNum: %s\r\n"
"CallerIDName: %s\r\n"
"ConnectedLineNum: %s\r\n"
@@ -6990,7 +6990,7 @@ static int manager_parking_status(struct
"\r\n",
curlot->name,
cur->parkingnum, cur->chan->name, cur->peername,
- (long) cur->start.tv_sec + (long) (cur->parkingtime / 1000) - (long) time(NULL),
+ (intmax_t) cur->start.tv_sec + (intmax_t) (cur->parkingtime / 1000) - (intmax_t) time(NULL),
S_COR(cur->chan->caller.id.number.valid, cur->chan->caller.id.number.str, ""), /* XXX in other places it is <unknown> */
S_COR(cur->chan->caller.id.name.valid, cur->chan->caller.id.name.str, ""),
S_COR(cur->chan->connected.id.number.valid, cur->chan->connected.id.number.str, ""), /* XXX in other places it is <unknown> */

View file

@ -0,0 +1,22 @@
$NetBSD: patch-main_manager.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- main/manager.c.orig 2011-10-11 18:53:34.000000000 +0000
+++ main/manager.c
@@ -1690,7 +1690,7 @@ static char *handle_showmanconn(struct a
struct mansession_session *session;
time_t now = time(NULL);
#define HSMCONN_FORMAT1 " %-15.15s %-15.15s %-10.10s %-10.10s %-8.8s %-8.8s %-5.5s %-5.5s\n"
-#define HSMCONN_FORMAT2 " %-15.15s %-15.15s %-10d %-10d %-8d %-8d %-5.5d %-5.5d\n"
+#define HSMCONN_FORMAT2 " %-15.15s %-15.15s %-10jd %-10jd %-8d %-8d %-5.5d %-5.5d\n"
int count = 0;
struct ao2_iterator i;
@@ -1711,7 +1711,7 @@ static char *handle_showmanconn(struct a
i = ao2_iterator_init(sessions, 0);
while ((session = ao2_iterator_next(&i))) {
ao2_lock(session);
- ast_cli(a->fd, HSMCONN_FORMAT2, session->username, ast_inet_ntoa(session->sin.sin_addr), (int)(session->sessionstart), (int)(now - session->sessionstart), session->fd, session->inuse, session->readperm, session->writeperm);
+ ast_cli(a->fd, HSMCONN_FORMAT2, session->username, ast_inet_ntoa(session->sin.sin_addr), (intmax_t)(session->sessionstart), (intmax_t)(now - session->sessionstart), session->fd, session->inuse, session->readperm, session->writeperm);
count++;
ao2_unlock(session);
unref_mansession(session);

View file

@ -0,0 +1,11 @@
$NetBSD: patch-main_netsock.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- main/netsock.c.orig 2010-12-10 16:28:14.000000000 +0000
+++ main/netsock.c
@@ -31,5 +31,5 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#ifndef __linux__
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Darwin__) || defined(__GLIBC__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Darwin__) || defined(__DragonFly__) || defined(__GLIBC__)
#include <net/if_dl.h>
#endif

View file

@ -0,0 +1,20 @@
$NetBSD: patch-main_sched.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- main/sched.c.orig 2010-12-20 17:15:54.000000000 +0000
+++ main/sched.c
@@ -553,12 +553,12 @@ void ast_sched_dump(struct ast_sched_con
struct timeval delta;
q = ast_heap_peek(con->sched_heap, x);
delta = ast_tvsub(q->when, when);
- ast_debug(1, "|%.4d | %-15p | %-15p | %.6ld : %.6ld |\n",
+ ast_debug(1, "|%.4d | %-15p | %-15p | %.6jd : %.6jd |\n",
q->id,
q->callback,
q->data,
- (long)delta.tv_sec,
- (long int)delta.tv_usec);
+ (intmax_t)delta.tv_sec,
+ (intmax_t)delta.tv_usec);
}
ast_mutex_unlock(&con->lock);
ast_debug(1, "=============================================================\n");

View file

@ -0,0 +1,31 @@
$NetBSD: patch-main_utils.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- main/utils.c.orig 2011-11-02 21:37:11.000000000 +0000
+++ main/utils.c
@@ -484,7 +484,7 @@ const char *ast_inet_ntoa(struct in_addr
static int dev_urandom_fd;
#endif
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__DragonFly__)
#undef pthread_create /* For ast_pthread_create function only */
#endif /* !__linux__ */
@@ -1392,13 +1392,13 @@ int ast_false(const char *s)
static struct timeval tvfix(struct timeval a)
{
if (a.tv_usec >= ONE_MILLION) {
- ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n",
- (long)a.tv_sec, (long int) a.tv_usec);
+ ast_log(LOG_WARNING, "warning too large timestamp %jd.%ld\n",
+ (intmax_t)a.tv_sec, (long int) a.tv_usec);
a.tv_sec += a.tv_usec / ONE_MILLION;
a.tv_usec %= ONE_MILLION;
} else if (a.tv_usec < 0) {
- ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n",
- (long)a.tv_sec, (long int) a.tv_usec);
+ ast_log(LOG_WARNING, "warning negative timestamp %jd.%ld\n",
+ (intmax_t)a.tv_sec, (long int) a.tv_usec);
a.tv_usec = 0;
}
return a;

View file

@ -0,0 +1,13 @@
$NetBSD: patch-pbx_pbx__dundi.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- pbx/pbx_dundi.c.orig 2011-07-14 20:25:31.000000000 +0000
+++ pbx/pbx_dundi.c
@@ -38,7 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include <pthread.h>
#include <net/if.h>
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__DragonFly__)
#include <net/if_dl.h>
#include <ifaddrs.h>
#include <signal.h>

View file

@ -0,0 +1,25 @@
$NetBSD: patch-sounds_Makefile,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- sounds/Makefile.orig 2011-08-25 15:29:56.000000000 +0000
+++ sounds/Makefile
@@ -119,20 +119,6 @@ endef # sound_format_lang_rule
all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
have_download:
- @if test "$(DOWNLOAD)" = ":" ; then \
- echo "**************************************************"; \
- echo "*** ***"; \
- echo "*** You must have either wget or fetch to be ***"; \
- echo "*** able to automatically download and install ***"; \
- echo "*** the requested sound packages. ***"; \
- echo "*** ***"; \
- echo "*** Please install one of these, or remove any ***"; \
- echo "*** extra sound package selections in ***"; \
- echo "*** menuselect before installing Asterisk. ***"; \
- echo "*** ***"; \
- echo "**************************************************"; \
- exit 1; \
- fi
$(eval $(call sound_format_lang_rule,$(SOUNDS_DIR),core-sounds,en,$(CORE_SOUNDS_VERSION)))

View file

@ -0,0 +1,13 @@
$NetBSD: patch-tests_test__locale.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- tests/test_locale.c.orig 2011-09-29 21:14:34.000000000 +0000
+++ tests/test_locale.c
@@ -81,7 +81,7 @@ static char *handle_cli_test_locales(str
/* First we run a set of tests with the global locale, which isn't thread-safe. */
if (!(localedir = opendir(
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__DragonFly__)
"/usr/share/locale"
#else /* Linux */
"/usr/lib/locale"

View file

@ -0,0 +1,24 @@
$NetBSD: patch-utils_Makefile,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- utils/Makefile.orig 2011-10-10 22:38:06.000000000 +0000
+++ utils/Makefile
@@ -41,6 +41,10 @@ ifeq ($(OSARCH),SunOS)
UTILS:=$(filter-out muted,$(UTILS))
endif
+ifeq ($(OSARCH),NetBSD)
+ UTILS:=$(filter-out muted,$(UTILS))
+endif
+
ifeq ($(OSARCH),OpenBSD)
UTILS:=$(filter-out muted,$(UTILS))
endif
@@ -75,7 +79,7 @@ all: $(UTILS)
install:
for x in $(UTILS); do \
if [ "$$x" != "none" ]; then \
- $(INSTALL) -m 755 $$x "$(DESTDIR)$(ASTSBINDIR)/$$x"; \
+ $(BSD_INSTALL_PROGRAM) -m 755 $$x "$(DESTDIR)$(ASTSBINDIR)/$$x"; \
fi; \
done

View file

@ -0,0 +1,13 @@
$NetBSD: patch-utils_db1-ast_include_db.h,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- utils/db1-ast/include/db.h.orig 2011-07-06 20:58:12.000000000 +0000
+++ utils/db1-ast/include/db.h
@@ -55,7 +55,7 @@
#ifndef __BIT_TYPES_DEFINED__
#define __BIT_TYPES_DEFINED__
-#if (!defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__))
+#if (!defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(__DragonFly__))
typedef __signed char int8_t;
typedef short int16_t;
typedef int int32_t;

View file

@ -0,0 +1,49 @@
$NetBSD: patch-utils_extconf.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- utils/extconf.c.orig 2011-07-14 20:25:31.000000000 +0000
+++ utils/extconf.c
@@ -795,6 +795,10 @@ static void __attribute__((destructor))
#include "libkern/OSAtomic.h"
#endif
+#if defined(HAVE_SYS_ATOMIC_H)
+#include <sys/atomic.h>
+#endif
+
/*! \brief Atomically add v to *p and return * the previous value of *p.
* This can be used to handle reference counts, and the return value
* can be used to generate unique identifiers.
@@ -808,12 +812,18 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
#elif defined(HAVE_OSX_ATOMICS) && (SIZEOF_INT == 4)
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
- return OSAtomicAdd32(v, (int32_t *) p);
+ return OSAtomicAdd32(v, (int32_t *) p) - v;
})
#elif defined(HAVE_OSX_ATOMICS) && (SIZEOF_INT == 8)
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
- return OSAtomicAdd64(v, (int64_t *) p);
+ return OSAtomicAdd64(v, (int64_t *) p) - v;
+})
+#elif defined(HAVE_SYS_ATOMIC_H)
+AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
+{
+ return atomic_add_int_nv((unsigned int *)p, v) - v;
+})
#elif defined (__i386__) || defined(__x86_64__)
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
@@ -855,6 +865,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{
return OSAtomicAdd64( -1, (int64_t *) p) == 0;
+})
+#elif defined(HAVE_SYS_ATOMIC_H)
+AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
+{
+ return atomic_dec_uint_nv((unsigned int *)p) == 0;
+})
#else
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
{

View file

@ -0,0 +1,13 @@
$NetBSD: patch-utils_streamplayer.c,v 1.1.1.1 2012/01/15 18:36:21 jnemeth Exp $
--- utils/streamplayer.c.orig 2011-07-14 20:25:31.000000000 +0000
+++ utils/streamplayer.c
@@ -53,7 +53,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__CYGWIN__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__CYGWIN__) || defined(__DragonFly__)
#include <netinet/in.h>
#endif
#include <sys/time.h>