summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2010-08-20 15:16:53 +0000
committerTony Vroon <chainsaw@gentoo.org>2010-08-20 15:16:53 +0000
commit03500f84b22bb321c3928b99d93a486217233869 (patch)
tree6dc00c979140e7605154193eab319c2d5fa3978d /net-misc/asterisk
parentEAPI=2; honor CC and LDFLAGS (bug #333607) (diff)
downloadgentoo-2-03500f84b22bb321c3928b99d93a486217233869.tar.gz
gentoo-2-03500f84b22bb321c3928b99d93a486217233869.tar.bz2
gentoo-2-03500f84b22bb321c3928b99d93a486217233869.zip
As jkroon has confirmed that 1.6.1 is no longer required, initiate a clean-up of unneeded ebuilds & patches.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r--net-misc/asterisk/ChangeLog30
-rw-r--r--net-misc/asterisk/asterisk-1.6.1.20.ebuild319
-rw-r--r--net-misc/asterisk/asterisk-1.6.2.8.ebuild326
-rw-r--r--net-misc/asterisk/asterisk-1.6.2.9-r1.ebuild236
-rw-r--r--net-misc/asterisk/asterisk-1.6.2.9.ebuild326
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1-gsm-pic.patch54
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1-imap-kerberos.patch17
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1-var_rundir.patch11
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch24
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.12-longer-sip-cid.patch15
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.12-parallel-make-v2.patch201
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.14-graceful-restart-segfault.patch75
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.14-parallel-make.patch21
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.19-gsm-pic.patch60
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.20-inband-progress.patch21
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-bt-line-test.patch35
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-lua-includes.patch16
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-transfer-segfault.patch23
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.8-session_expiry.patch12
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk.initd253
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk.initd2261
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk.initd3269
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk.rc6253
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk-1.6.2.0-bt-line-test.patch35
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk-1.6.2.1-parallel-make.patch99
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk-1.6.2.2-graceful-restart-segfault.patch75
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk-1.6.2.2-parallel-make.patch21
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk-1.6.2.7-gsm-pic.patch60
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk-1.6.2.7-pri-missing-keyword.patch12
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk-1.6.2.8-gsm-pic.patch60
30 files changed, 29 insertions, 3191 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index b353662e4a10..54072a8b6ad1 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,34 @@
\# ChangeLog for net-misc/asterisk
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.265 2010/08/10 23:23:48 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.266 2010/08/20 15:16:43 chainsaw Exp $
+
+ 20 Aug 2010; <chainsaw@gentoo.org>
+ -files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch,
+ -files/1.6.1/asterisk-1.6.1.6-bt-line-test.patch,
+ -files/1.6.1/asterisk-1.6.1.6-lua-includes.patch,
+ -files/1.6.1/asterisk-1.6.1.6-transfer-segfault.patch,
+ -files/1.6.1/asterisk-1.6.1.8-session_expiry.patch,
+ -files/1.6.1/asterisk-1.6.1.12-longer-sip-cid.patch,
+ -files/1.6.1/asterisk-1.6.1.12-parallel-make-v2.patch,
+ -files/1.6.1/asterisk-1.6.1.14-graceful-restart-segfault.patch,
+ -files/1.6.1/asterisk-1.6.1.14-parallel-make.patch,
+ -files/1.6.1/asterisk-1.6.1.19-gsm-pic.patch, -asterisk-1.6.1.20.ebuild,
+ -files/1.6.1/asterisk-1.6.1.20-inband-progress.patch,
+ -files/1.6.1/asterisk-1.6.1-gsm-pic.patch,
+ -files/1.6.1/asterisk-1.6.1-imap-kerberos.patch,
+ -files/1.6.1/asterisk-1.6.1-var_rundir.patch,
+ -files/1.6.2/asterisk-1.6.2.7-gsm-pic.patch, -asterisk-1.6.2.8.ebuild,
+ -files/1.6.2/asterisk-1.6.2.8-gsm-pic.patch, -asterisk-1.6.2.9.ebuild,
+ -files/1.6.1/asterisk.initd,
+ -files/1.6.2/asterisk-1.6.2.7-pri-missing-keyword.patch,
+ -asterisk-1.6.2.9-r1.ebuild, -files/1.6.1/asterisk.initd2,
+ -files/1.6.1/asterisk.initd3, -files/1.6.1/asterisk.rc6,
+ -files/1.6.2/asterisk-1.6.2.0-bt-line-test.patch,
+ -files/1.6.2/asterisk-1.6.2.1-parallel-make.patch,
+ -files/1.6.2/asterisk-1.6.2.2-graceful-restart-segfault.patch,
+ -files/1.6.2/asterisk-1.6.2.2-parallel-make.patch:
+ As jkroon has confirmed that 1.6.1 is no longer required, initiate a
+ clean-up of unneeded ebuilds & patches.
*asterisk-1.6.2.11 (10 Aug 2010)
diff --git a/net-misc/asterisk/asterisk-1.6.1.20.ebuild b/net-misc/asterisk/asterisk-1.6.1.20.ebuild
deleted file mode 100644
index c833f98fa0ec..000000000000
--- a/net-misc/asterisk/asterisk-1.6.1.20.ebuild
+++ /dev/null
@@ -1,319 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.1.20.ebuild,v 1.4 2010/06/30 20:42:53 jlec Exp $
-
-EAPI=3
-inherit autotools base eutils linux-info multilib
-
-MY_P="${PN}-${PV/_/-}"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap keepsrc misdn newt +samples oss postgres radius snmp span speex ssl sqlite static vorbis"
-
-RDEPEND="sys-libs/ncurses
- dev-libs/popt
- sys-libs/zlib
- alsa? ( media-libs/alsa-lib )
- caps? ( sys-libs/libcap )
- curl? ( net-misc/curl )
- dahdi? ( >=net-libs/libpri-1.4.7
- net-misc/dahdi-tools )
- freetds? ( dev-db/freetds )
- iconv? ( virtual/libiconv )
- jabber? ( dev-libs/iksemel )
- ldap? ( net-nds/openldap )
- misdn? ( net-dialup/misdnuser )
- newt? ( dev-libs/newt )
- postgres? ( dev-db/postgresql-base )
- radius? ( net-dialup/radiusclient-ng )
- snmp? ( net-analyzer/net-snmp )
- span? ( media-libs/spandsp )
- speex? ( media-libs/speex )
- sqlite? ( dev-db/sqlite )
- ssl? ( dev-libs/openssl )
- vorbis? ( media-libs/libvorbis )"
-
-DEPEND="${RDEPEND}
- !<net-misc/asterisk-addons-1.6
- !net-misc/asterisk-chan_unistim
- !net-misc/zaptel"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/1.6.1/${PN}-1.6.1-var_rundir.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1.19-gsm-pic.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1-uclibc.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch"
- "${FILESDIR}/1.6.1/${P}-inband-progress.patch"
- "${FILESDIR}/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch"
-)
-
-get_available_modules() {
- local modules mod x
-
- # build list of available modules...
- for x in app cdr codec format func pbx res; do
-
- for mod in $(find "${S}" -type f -name "${x}_*.c*" -print)
- do
- modules="${modules} $(basename ${mod/%.c*})"
- done
- done
-
- echo "${modules}"
-}
-
-pkg_setup() {
- if [[ -n "${ASTERISK_MODULES}" ]] ; then
- ewarn "You are overriding ASTERISK_MODULES. We will assume you know what you are doing. There is no support for this option, try without if you see breakage."
- fi
- CONFIG_CHECK="~!NF_CONNTRACK_SIP"
- local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is a module written for a single SIP client talking to a
- remote server. It is not able to track multiple remote SIP clients registering with
- a local server. Critical SIP packets may be dropped."
- check_extra_config
-
- # parse modules list
- if [[ -n "${ASTERISK_MODULES}" ]]; then
- local x modules="$(get_available_modules)"
-
- einfo "Custom list of modules specified, checking..."
-
- use debug && {
- einfo "Available modules: ${modules}"
- einfo " Selected modules: ${ASTERISK_MODULES}"
- }
-
- for x in ${ASTERISK_MODULES}; do
- if [[ "${x}" = "-*" ]]; then
- MODULES_LIST=""
- else
- if has ${x} ${modules}
- then
- MODULES_LIST="${MODULES_LIST} ${x}"
- else
- eerror "Unknown module: ${x}"
- fi
- fi
- done
-
- export MODULES_LIST
- fi
-}
-
-src_prepare() {
- base_src_prepare
- AT_M4DIR=autoconf eautoreconf
-}
-
-src_configure() {
- econf \
- --libdir="/usr/$(get_libdir)" \
- --localstatedir="/var" \
- --with-gsm=internal \
- --with-popt \
- --with-z \
- $(use_with alsa asound) \
- $(use_with caps cap) \
- $(use_with curl) \
- $(use_with dahdi pri) \
- $(use_with dahdi tonezone) \
- $(use_with dahdi) \
- $(use_with freetds tds) \
- $(use_with iconv) \
- $(use_with jabber iksemel) \
- $(use_with misdn isdnnet) \
- $(use_with misdn suppserv) \
- $(use_with misdn) \
- $(use_with newt) \
- $(use_with oss) \
- $(use_with postgres) \
- $(use_with radius) \
- $(use_with snmp netsnmp) \
- $(use_with span spandsp) \
- $(use_with speex) \
- $(use_with speex speexdsp) \
- $(use_with sqlite sqlite3) \
- $(use_with ssl crypto) \
- $(use_with ssl) \
- $(use_with vorbis ogg) \
- $(use_with vorbis) || die "econf failed"
-
- #
- # custom module filter
- # run menuselect to evaluate the list of modules
- # and rewrite the list afterwards
- #
- if [[ -n "${MODULES_LIST}" ]]
- then
- local mod category tmp_list failed_list
-
- ###
- # run menuselect
-
- emake menuselect.makeopts || die "emake menuselect.makeopts failed"
-
- ###
- # get list of modules with failed dependencies
-
- failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)"
-
- ###
- # traverse our list of modules
-
- for category in app cdr codec format func pbx res; do
- tmp_list=""
-
- # search list of modules for matching ones first...
- for mod in ${MODULES_LIST}; do
- # module is from current category?
- if [[ "${mod/%_*}" = "${category}" ]]
- then
- # check menuselect thinks the dependencies are met
- if has ${mod} ${failed_list}
- then
- eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!"
- else
- tmp_list="${tmp_list} ${mod}"
- fi
- fi
- done
-
- use debug && echo "${category} tmp: ${tmp_list}"
-
- # replace the module list for $category with our custom one
- if [[ -n "${tmp_list}" ]]
- then
- category="$(echo ${category} | tr '[:lower:]' '[:upper:]')"
- sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \
- menuselect.makeopts || die "failed to set list of ${category} applications"
- fi
- done
- fi
-}
-
-src_compile() {
- ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
-}
-
-src_install() {
- # setup directory structure
- #
- mkdir -p "${D}"usr/$(get_libdir)/pkgconfig
-
- emake DESTDIR="${D}" install || die "emake install failed"
-
- if use samples; then
- emake DESTDIR="${D}" samples || die "emake samples failed"
- for conffile in "${D}"etc/asterisk/*.*
- do
- fowners asterisk:asterisk $conffile
- fperms 0660 $conffile
- done
- einfo "Sample files have been installed"
- else
- einfo "Skipping installation of sample files..."
- rm -f "${D}"var/lib/asterisk/mohmp3/*
- rm -f "${D}"var/lib/asterisk/sounds/demo-*
- rm -f "${D}"var/lib/asterisk/agi-bin/*
- rm -f "${D}"etc/asterisk/*
- fi
- rm -rf "${D}"var/spool/asterisk/voicemail/default
-
- # keep directories
- diropts -m 0770 -o asterisk -g asterisk
- keepdir /etc/asterisk
- keepdir /var/lib/asterisk
- keepdir /var/run/asterisk
- keepdir /var/spool/asterisk
- keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
- diropts -m 0750 -o asterisk -g asterisk
- keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
-
- newinitd "${FILESDIR}"/1.6.1/asterisk.initd3 asterisk
- newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk
-
- # some people like to keep the sources around for custom patching
- # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there
- if use keepsrc
- then
- dodir /usr/src
-
- ebegin "Copying sources into /usr/src"
- cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources"
- eend $?
-
- ebegin "Cleaning source tree"
- emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources"
- eend $?
-
- einfo "Clean sources are available in "${ROOT}"usr/src/${PF}"
- fi
-
- # install the upgrade documentation
- #
- dodoc README UPGRADE* BUGS CREDITS
-
- # install snmp mib files
- #
- if use snmp
- then
- insinto /usr/share/snmp/mibs/
- doins doc/digium-mib.txt doc/asterisk-mib.txt
- fi
-}
-
-pkg_preinst() {
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
-}
-
-pkg_postinst() {
- #
- # Announcements, warnings, reminders...
- #
- einfo "Asterisk has been installed"
- echo
- elog "If you want to know more about asterisk, visit these sites:"
- elog "http://www.asteriskdocs.org/"
- elog "http://www.voip-info.org/wiki-Asterisk"
- echo
- elog "http://www.automated.it/guidetoasterisk.htm"
- echo
- elog "Gentoo VoIP IRC Channel:"
- elog "#gentoo-voip @ irc.freenode.net"
- echo
- echo
-}
-
-pkg_config() {
- einfo "Do you want to reset file permissions and ownerships (y/N)?"
-
- read tmp
- tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
-
- if [[ "$tmp" = "y" ]] ||\
- [[ "$tmp" = "yes" ]]
- then
- einfo "Resetting permissions to defaults..."
-
- for x in spool run lib log; do
- chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
- chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
- done
-
- chown -R root:asterisk "${ROOT}"etc/asterisk
- chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
-
- einfo "done"
- else
- einfo "skipping"
- fi
-}
diff --git a/net-misc/asterisk/asterisk-1.6.2.8.ebuild b/net-misc/asterisk/asterisk-1.6.2.8.ebuild
deleted file mode 100644
index 105b7ab7bf98..000000000000
--- a/net-misc/asterisk/asterisk-1.6.2.8.ebuild
+++ /dev/null
@@ -1,326 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.8.ebuild,v 1.4 2010/06/30 20:42:53 jlec Exp $
-
-EAPI=3
-inherit autotools base eutils linux-info multilib
-
-MY_P="${PN}-${PV/_/-}"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap lua keepsrc misdn newt +samples oss postgres radius snmp span speex ssl sqlite static vorbis"
-
-RDEPEND="sys-libs/ncurses
- dev-libs/popt
- sys-libs/zlib
- alsa? ( media-libs/alsa-lib )
- caps? ( sys-libs/libcap )
- curl? ( net-misc/curl )
- dahdi? ( >=net-libs/libpri-1.4.7
- net-misc/dahdi-tools )
- freetds? ( dev-db/freetds )
- iconv? ( virtual/libiconv )
- jabber? ( dev-libs/iksemel )
- ldap? ( net-nds/openldap )
- lua? ( dev-lang/lua )
- misdn? ( net-dialup/misdnuser )
- newt? ( dev-libs/newt )
- postgres? ( dev-db/postgresql-base )
- radius? ( net-dialup/radiusclient-ng )
- snmp? ( net-analyzer/net-snmp )
- span? ( media-libs/spandsp )
- speex? ( media-libs/speex )
- sqlite? ( dev-db/sqlite )
- ssl? ( dev-libs/openssl )
- vorbis? ( media-libs/libvorbis )"
-
-DEPEND="${RDEPEND}
- !<net-misc/asterisk-addons-1.6
- !net-misc/asterisk-chan_unistim
- !net-misc/zaptel"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/1.6.2/${P}-gsm-pic.patch"
- "${FILESDIR}/1.6.2/${P}-pri-missing-keyword.patch"
- "${FILESDIR}/1.6.2/${P}-inband-indications.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1-uclibc.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch"
- "${FILESDIR}/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch"
-)
-
-get_available_modules() {
- local modules mod x
-
- # build list of available modules...
- for x in app cdr codec format func pbx res; do
-
- for mod in $(find "${S}" -type f -name "${x}_*.c*" -print)
- do
- modules="${modules} $(basename ${mod/%.c*})"
- done
- done
-
- echo "${modules}"
-}
-
-pkg_setup() {
- if [[ -n "${ASTERISK_MODULES}" ]] ; then
- ewarn "You are overriding ASTERISK_MODULES. We will assume you know what you are doing. There is no support for this option, try without if you see breakage."
- fi
- CONFIG_CHECK="~!NF_CONNTRACK_SIP"
- local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is a module written for a single SIP client talking to a
- remote server. It is not able to track multiple remote SIP clients registering with
- a local server. Critical SIP packets may be dropped."
- check_extra_config
-
- # parse modules list
- if [[ -n "${ASTERISK_MODULES}" ]]; then
- local x modules="$(get_available_modules)"
-
- einfo "Custom list of modules specified, checking..."
-
- use debug && {
- einfo "Available modules: ${modules}"
- einfo " Selected modules: ${ASTERISK_MODULES}"
- }
-
- for x in ${ASTERISK_MODULES}; do
- if [[ "${x}" = "-*" ]]; then
- MODULES_LIST=""
- else
- if has ${x} ${modules}
- then
- MODULES_LIST="${MODULES_LIST} ${x}"
- else
- eerror "Unknown module: ${x}"
- fi
- fi
- done
-
- export MODULES_LIST
- fi
-}
-
-src_prepare() {
- base_src_prepare
- AT_M4DIR=autoconf eautoreconf
-}
-
-src_configure() {
- econf \
- --libdir="/usr/$(get_libdir)" \
- --localstatedir="/var" \
- --with-gsm=internal \
- --with-popt \
- --with-z \
- $(use_with alsa asound) \
- $(use_with caps cap) \
- $(use_with curl) \
- $(use_with dahdi pri) \
- $(use_with dahdi tonezone) \
- $(use_with dahdi) \
- $(use_with freetds tds) \
- $(use_with iconv) \
- $(use_with jabber iksemel) \
- $(use_with lua) \
- $(use_with misdn isdnnet) \
- $(use_with misdn suppserv) \
- $(use_with misdn) \
- $(use_with newt) \
- $(use_with oss) \
- $(use_with postgres) \
- $(use_with radius) \
- $(use_with snmp netsnmp) \
- $(use_with span spandsp) \
- $(use_with speex) \
- $(use_with speex speexdsp) \
- $(use_with sqlite sqlite3) \
- $(use_with ssl crypto) \
- $(use_with ssl) \
- $(use_with vorbis ogg) \
- $(use_with vorbis) || die "econf failed"
-
- #
- # custom module filter
- # run menuselect to evaluate the list of modules
- # and rewrite the list afterwards
- #
- if [[ -n "${MODULES_LIST}" ]]
- then
- local mod category tmp_list failed_list
-
- ###
- # run menuselect
-
- emake menuselect.makeopts || die "emake menuselect.makeopts failed"
-
- ###
- # get list of modules with failed dependencies
-
- failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)"
-
- ###
- # traverse our list of modules
-
- for category in app cdr codec format func pbx res; do
- tmp_list=""
-
- # search list of modules for matching ones first...
- for mod in ${MODULES_LIST}; do
- # module is from current category?
- if [[ "${mod/%_*}" = "${category}" ]]
- then
- # check menuselect thinks the dependencies are met
- if has ${mod} ${failed_list}
- then
- eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!"
- else
- tmp_list="${tmp_list} ${mod}"
- fi
- fi
- done
-
- use debug && echo "${category} tmp: ${tmp_list}"
-
- # replace the module list for $category with our custom one
- if [[ -n "${tmp_list}" ]]
- then
- category="$(echo ${category} | tr '[:lower:]' '[:upper:]')"
- sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \
- menuselect.makeopts || die "failed to set list of ${category} applications"
- fi
- done
- fi
-}
-
-src_compile() {
- ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
-}
-
-src_install() {
- # setup directory structure
- #
- mkdir -p "${D}"usr/$(get_libdir)/pkgconfig
-
- emake DESTDIR="${D}" install || die "emake install failed"
-
- if use samples; then
- emake DESTDIR="${D}" samples || die "emake samples failed"
- for conffile in "${D}"etc/asterisk/*.*
- do
- chown asterisk:asterisk $conffile
- chmod 0660 $conffile
- done
- einfo "Sample files have been installed"
- else
- einfo "Skipping installation of sample files..."
- rm -f "${D}"var/lib/asterisk/mohmp3/*
- rm -f "${D}"var/lib/asterisk/sounds/demo-*
- rm -f "${D}"var/lib/asterisk/agi-bin/*
- rm -f "${D}"etc/asterisk/*
- fi
- rm -rf "${D}"var/spool/asterisk/voicemail/default
-
- # keep directories
- diropts -m 0770 -o asterisk -g asterisk
- keepdir /etc/asterisk
- keepdir /var/lib/asterisk
- keepdir /var/run/asterisk
- keepdir /var/spool/asterisk
- keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
- diropts -m 0750 -o asterisk -g asterisk
- keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
-
- newinitd "${FILESDIR}"/1.6.1/asterisk.initd3 asterisk
- newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk
-
- # some people like to keep the sources around for custom patching
- # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there
- if use keepsrc
- then
- dodir /usr/src
-
- ebegin "Copying sources into /usr/src"
- cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources"
- eend $?
-
- ebegin "Cleaning source tree"
- emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources"
- eend $?
-
- einfo "Clean sources are available in "${ROOT}"usr/src/${PF}"
- fi
-
- # install the upgrade documentation
- #
- dodoc README UPGRADE* BUGS CREDITS
-
- # install snmp mib files
- #
- if use snmp
- then
- insinto /usr/share/snmp/mibs/
- doins doc/digium-mib.txt doc/asterisk-mib.txt
- fi
-}
-
-pkg_preinst() {
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
-}
-
-pkg_postinst() {
- #
- # Announcements, warnings, reminders...
- #
- einfo "Asterisk has been installed"
- echo
- elog "If you want to know more about asterisk, visit these sites:"
- elog "http://www.asteriskdocs.org/"
- elog "http://www.voip-info.org/wiki-Asterisk"
- echo
- elog "http://www.automated.it/guidetoasterisk.htm"
- echo
- elog "Gentoo VoIP IRC Channel:"
- elog "#gentoo-voip @ irc.freenode.net"
- echo
- echo
- elog "1.6.1 -> 1.6.2 changes that you may care about:"
- elog "canreinvite -> directmedia (sip.conf)"
- elog "extensive T.38 (fax) changes"
- elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt"
- elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2"
-}
-
-pkg_config() {
- einfo "Do you want to reset file permissions and ownerships (y/N)?"
-
- read tmp
- tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
-
- if [[ "$tmp" = "y" ]] ||\
- [[ "$tmp" = "yes" ]]
- then
- einfo "Resetting permissions to defaults..."
-
- for x in spool run lib log; do
- chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
- chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
- done
-
- chown -R root:asterisk "${ROOT}"etc/asterisk
- chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
-
- einfo "done"
- else
- einfo "skipping"
- fi
-}
diff --git a/net-misc/asterisk/asterisk-1.6.2.9-r1.ebuild b/net-misc/asterisk/asterisk-1.6.2.9-r1.ebuild
deleted file mode 100644
index eccce288d71d..000000000000
--- a/net-misc/asterisk/asterisk-1.6.2.9-r1.ebuild
+++ /dev/null
@@ -1,236 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.9-r1.ebuild,v 1.1 2010/07/19 15:48:51 chainsaw Exp $
-
-EAPI=3
-inherit autotools base eutils linux-info multilib
-
-MY_P="${PN}-${PV/_/-}"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap lua keepsrc misdn newt +samples oss postgres radius snmp span speex ssl sqlite static vorbis"
-
-RDEPEND="sys-libs/ncurses
- dev-libs/popt
- sys-libs/zlib
- alsa? ( media-libs/alsa-lib )
- caps? ( sys-libs/libcap )
- curl? ( net-misc/curl )
- dahdi? ( >=net-libs/libpri-1.4.7
- net-misc/dahdi-tools )
- freetds? ( dev-db/freetds )
- iconv? ( virtual/libiconv )
- jabber? ( dev-libs/iksemel )
- ldap? ( net-nds/openldap )
- lua? ( dev-lang/lua )
- misdn? ( net-dialup/misdnuser )
- newt? ( dev-libs/newt )
- postgres? ( dev-db/postgresql-base )
- radius? ( net-dialup/radiusclient-ng )
- snmp? ( net-analyzer/net-snmp )
- span? ( media-libs/spandsp )
- speex? ( media-libs/speex )
- sqlite? ( dev-db/sqlite )
- ssl? ( dev-libs/openssl )
- vorbis? ( media-libs/libvorbis )"
-
-DEPEND="${RDEPEND}
- !<net-misc/asterisk-addons-1.6
- !net-misc/asterisk-chan_unistim
- !net-misc/zaptel"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/1.6.2/${P}-gsm-pic.patch"
- "${FILESDIR}/1.6.2/${PN}-1.6.2.8-pri-missing-keyword.patch"
- "${FILESDIR}/1.6.2/${PN}-1.6.2.8-inband-indications.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1-uclibc.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch"
- "${FILESDIR}/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch"
-)
-
-pkg_setup() {
- CONFIG_CHECK="~!NF_CONNTRACK_SIP"
- local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
- have reported that this module dropped critical SIP packets in their deployments. You
- may want to disable it if you see such problems."
- check_extra_config
-}
-
-src_prepare() {
- base_src_prepare
- AT_M4DIR=autoconf eautoreconf
-}
-
-src_configure() {
- econf \
- --libdir="/usr/$(get_libdir)" \
- --localstatedir="/var" \
- --with-gsm=internal \
- --with-popt \
- --with-z \
- $(use_with alsa asound) \
- $(use_with caps cap) \
- $(use_with curl) \
- $(use_with dahdi pri) \
- $(use_with dahdi tonezone) \
- $(use_with dahdi) \
- $(use_with freetds tds) \
- $(use_with iconv) \
- $(use_with jabber iksemel) \
- $(use_with lua) \
- $(use_with misdn isdnnet) \
- $(use_with misdn suppserv) \
- $(use_with misdn) \
- $(use_with newt) \
- $(use_with oss) \
- $(use_with postgres) \
- $(use_with radius) \
- $(use_with snmp netsnmp) \
- $(use_with span spandsp) \
- $(use_with speex) \
- $(use_with speex speexdsp) \
- $(use_with sqlite sqlite3) \
- $(use_with ssl crypto) \
- $(use_with ssl) \
- $(use_with vorbis ogg) \
- $(use_with vorbis) || die "econf failed"
-}
-
-src_compile() {
- ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
-}
-
-src_install() {
- # setup directory structure
- #
- mkdir -p "${D}"usr/$(get_libdir)/pkgconfig
-
- emake DESTDIR="${D}" install || die "emake install failed"
-
- if use samples; then
- emake DESTDIR="${D}" samples || die "emake samples failed"
- for conffile in "${D}"etc/asterisk/*.*
- do
- chown asterisk:asterisk $conffile
- chmod 0660 $conffile
- done
- einfo "Sample files have been installed"
- else
- einfo "Skipping installation of sample files..."
- rm -f "${D}"var/lib/asterisk/mohmp3/*
- rm -f "${D}"var/lib/asterisk/sounds/demo-*
- rm -f "${D}"var/lib/asterisk/agi-bin/*
- rm -f "${D}"etc/asterisk/*
- fi
- rm -rf "${D}"var/spool/asterisk/voicemail/default
-
- # keep directories
- diropts -m 0770 -o asterisk -g asterisk
- keepdir /etc/asterisk
- keepdir /var/lib/asterisk
- keepdir /var/run/asterisk
- keepdir /var/spool/asterisk
- keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
- diropts -m 0750 -o asterisk -g asterisk
- keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
-
- newinitd "${FILESDIR}"/1.6.2/asterisk.initd asterisk
- newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk
-
- # some people like to keep the sources around for custom patching
- # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there
- if use keepsrc
- then
- dodir /usr/src
-
- ebegin "Copying sources into /usr/src"
- cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources"
- eend $?
-
- ebegin "Cleaning source tree"
- emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources"
- eend $?
-
- einfo "Clean sources are available in "${ROOT}"usr/src/${PF}"
- fi
-
- # install the upgrade documentation
- #
- dodoc README UPGRADE* BUGS CREDITS
-
- # install snmp mib files
- #
- if use snmp
- then
- insinto /usr/share/snmp/mibs/
- doins doc/digium-mib.txt doc/asterisk-mib.txt
- fi
-
- # install SIP scripts; bug #300832
- #
- dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
- dodoc "${FILESDIR}/1.6.2/find_call_sip_trace.sh"
- dodoc "${FILESDIR}/1.6.2/find_call_ids.sh"
- dodoc "${FILESDIR}/1.6.2/call_data.txt"
-}
-
-pkg_preinst() {
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
-}
-
-pkg_postinst() {
- #
- # Announcements, warnings, reminders...
- #
- einfo "Asterisk has been installed"
- echo
- elog "If you want to know more about asterisk, visit these sites:"
- elog "http://www.asteriskdocs.org/"
- elog "http://www.voip-info.org/wiki-Asterisk"
- echo
- elog "http://www.automated.it/guidetoasterisk.htm"
- echo
- elog "Gentoo VoIP IRC Channel:"
- elog "#gentoo-voip @ irc.freenode.net"
- echo
- echo
- elog "1.6.1 -> 1.6.2 changes that you may care about:"
- elog "canreinvite -> directmedia (sip.conf)"
- elog "extensive T.38 (fax) changes"
- elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt"
- elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2"
-}
-
-pkg_config() {
- einfo "Do you want to reset file permissions and ownerships (y/N)?"
-
- read tmp
- tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
-
- if [[ "$tmp" = "y" ]] ||\
- [[ "$tmp" = "yes" ]]
- then
- einfo "Resetting permissions to defaults..."
-
- for x in spool run lib log; do
- chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
- chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
- done
-
- chown -R root:asterisk "${ROOT}"etc/asterisk
- chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
-
- einfo "done"
- else
- einfo "skipping"
- fi
-}
diff --git a/net-misc/asterisk/asterisk-1.6.2.9.ebuild b/net-misc/asterisk/asterisk-1.6.2.9.ebuild
deleted file mode 100644
index e331a234e823..000000000000
--- a/net-misc/asterisk/asterisk-1.6.2.9.ebuild
+++ /dev/null
@@ -1,326 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.9.ebuild,v 1.2 2010/06/30 20:42:53 jlec Exp $
-
-EAPI=3
-inherit autotools base eutils linux-info multilib
-
-MY_P="${PN}-${PV/_/-}"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap lua keepsrc misdn newt +samples oss postgres radius snmp span speex ssl sqlite static vorbis"
-
-RDEPEND="sys-libs/ncurses
- dev-libs/popt
- sys-libs/zlib
- alsa? ( media-libs/alsa-lib )
- caps? ( sys-libs/libcap )
- curl? ( net-misc/curl )
- dahdi? ( >=net-libs/libpri-1.4.7
- net-misc/dahdi-tools )
- freetds? ( dev-db/freetds )
- iconv? ( virtual/libiconv )
- jabber? ( dev-libs/iksemel )
- ldap? ( net-nds/openldap )
- lua? ( dev-lang/lua )
- misdn? ( net-dialup/misdnuser )
- newt? ( dev-libs/newt )
- postgres? ( dev-db/postgresql-base )
- radius? ( net-dialup/radiusclient-ng )
- snmp? ( net-analyzer/net-snmp )
- span? ( media-libs/spandsp )
- speex? ( media-libs/speex )
- sqlite? ( dev-db/sqlite )
- ssl? ( dev-libs/openssl )
- vorbis? ( media-libs/libvorbis )"
-
-DEPEND="${RDEPEND}
- !<net-misc/asterisk-addons-1.6
- !net-misc/asterisk-chan_unistim
- !net-misc/zaptel"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/1.6.2/${P}-gsm-pic.patch"
- "${FILESDIR}/1.6.2/${PN}-1.6.2.8-pri-missing-keyword.patch"
- "${FILESDIR}/1.6.2/${PN}-1.6.2.8-inband-indications.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1-uclibc.patch"
- "${FILESDIR}/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch"
- "${FILESDIR}/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch"
-)
-
-get_available_modules() {
- local modules mod x
-
- # build list of available modules...
- for x in app cdr codec format func pbx res; do
-
- for mod in $(find "${S}" -type f -name "${x}_*.c*" -print)
- do
- modules="${modules} $(basename ${mod/%.c*})"
- done
- done
-
- echo "${modules}"
-}
-
-pkg_setup() {
- if [[ -n "${ASTERISK_MODULES}" ]] ; then
- ewarn "You are overriding ASTERISK_MODULES. We will assume you know what you are doing. There is no support for this option, try without if you see breakage."
- fi
- CONFIG_CHECK="~!NF_CONNTRACK_SIP"
- local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
- have reported that this module dropped critical SIP packets in their deployments. You
- may want to disable it if you see such problems."
- check_extra_config
-
- # parse modules list
- if [[ -n "${ASTERISK_MODULES}" ]]; then
- local x modules="$(get_available_modules)"
-
- einfo "Custom list of modules specified, checking..."
-
- use debug && {
- einfo "Available modules: ${modules}"
- einfo " Selected modules: ${ASTERISK_MODULES}"
- }
-
- for x in ${ASTERISK_MODULES}; do
- if [[ "${x}" = "-*" ]]; then
- MODULES_LIST=""
- else
- if has ${x} ${modules}
- then
- MODULES_LIST="${MODULES_LIST} ${x}"
- else
- eerror "Unknown module: ${x}"
- fi
- fi
- done
-
- export MODULES_LIST
- fi
-}
-
-src_prepare() {
- base_src_prepare
- AT_M4DIR=autoconf eautoreconf
-}
-
-src_configure() {
- econf \
- --libdir="/usr/$(get_libdir)" \
- --localstatedir="/var" \
- --with-gsm=internal \
- --with-popt \
- --with-z \
- $(use_with alsa asound) \
- $(use_with caps cap) \
- $(use_with curl) \
- $(use_with dahdi pri) \
- $(use_with dahdi tonezone) \
- $(use_with dahdi) \
- $(use_with freetds tds) \
- $(use_with iconv) \
- $(use_with jabber iksemel) \
- $(use_with lua) \
- $(use_with misdn isdnnet) \
- $(use_with misdn suppserv) \
- $(use_with misdn) \
- $(use_with newt) \
- $(use_with oss) \
- $(use_with postgres) \
- $(use_with radius) \
- $(use_with snmp netsnmp) \
- $(use_with span spandsp) \
- $(use_with speex) \
- $(use_with speex speexdsp) \
- $(use_with sqlite sqlite3) \
- $(use_with ssl crypto) \
- $(use_with ssl) \
- $(use_with vorbis ogg) \
- $(use_with vorbis) || die "econf failed"
-
- #
- # custom module filter
- # run menuselect to evaluate the list of modules
- # and rewrite the list afterwards
- #
- if [[ -n "${MODULES_LIST}" ]]
- then
- local mod category tmp_list failed_list
-
- ###
- # run menuselect
-
- emake menuselect.makeopts || die "emake menuselect.makeopts failed"
-
- ###
- # get list of modules with failed dependencies
-
- failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)"
-
- ###
- # traverse our list of modules
-
- for category in app cdr codec format func pbx res; do
- tmp_list=""
-
- # search list of modules for matching ones first...
- for mod in ${MODULES_LIST}; do
- # module is from current category?
- if [[ "${mod/%_*}" = "${category}" ]]
- then
- # check menuselect thinks the dependencies are met
- if has ${mod} ${failed_list}
- then
- eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!"
- else
- tmp_list="${tmp_list} ${mod}"
- fi
- fi
- done
-
- use debug && echo "${category} tmp: ${tmp_list}"
-
- # replace the module list for $category with our custom one
- if [[ -n "${tmp_list}" ]]
- then
- category="$(echo ${category} | tr '[:lower:]' '[:upper:]')"
- sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \
- menuselect.makeopts || die "failed to set list of ${category} applications"
- fi
- done
- fi
-}
-
-src_compile() {
- ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
-}
-
-src_install() {
- # setup directory structure
- #
- mkdir -p "${D}"usr/$(get_libdir)/pkgconfig
-
- emake DESTDIR="${D}" install || die "emake install failed"
-
- if use samples; then
- emake DESTDIR="${D}" samples || die "emake samples failed"
- for conffile in "${D}"etc/asterisk/*.*
- do
- chown asterisk:asterisk $conffile
- chmod 0660 $conffile
- done
- einfo "Sample files have been installed"
- else
- einfo "Skipping installation of sample files..."
- rm -f "${D}"var/lib/asterisk/mohmp3/*
- rm -f "${D}"var/lib/asterisk/sounds/demo-*
- rm -f "${D}"var/lib/asterisk/agi-bin/*
- rm -f "${D}"etc/asterisk/*
- fi
- rm -rf "${D}"var/spool/asterisk/voicemail/default
-
- # keep directories
- diropts -m 0770 -o asterisk -g asterisk
- keepdir /etc/asterisk
- keepdir /var/lib/asterisk
- keepdir /var/run/asterisk
- keepdir /var/spool/asterisk
- keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
- diropts -m 0750 -o asterisk -g asterisk
- keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
-
- newinitd "${FILESDIR}"/1.6.1/asterisk.initd3 asterisk
- newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk
-
- # some people like to keep the sources around for custom patching
- # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there
- if use keepsrc
- then
- dodir /usr/src
-
- ebegin "Copying sources into /usr/src"
- cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources"
- eend $?
-
- ebegin "Cleaning source tree"
- emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources"
- eend $?
-
- einfo "Clean sources are available in "${ROOT}"usr/src/${PF}"
- fi
-
- # install the upgrade documentation
- #
- dodoc README UPGRADE* BUGS CREDITS
-
- # install snmp mib files
- #
- if use snmp
- then
- insinto /usr/share/snmp/mibs/
- doins doc/digium-mib.txt doc/asterisk-mib.txt
- fi
-}
-
-pkg_preinst() {
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
-}
-
-pkg_postinst() {
- #
- # Announcements, warnings, reminders...
- #
- einfo "Asterisk has been installed"
- echo
- elog "If you want to know more about asterisk, visit these sites:"
- elog "http://www.asteriskdocs.org/"
- elog "http://www.voip-info.org/wiki-Asterisk"
- echo
- elog "http://www.automated.it/guidetoasterisk.htm"
- echo
- elog "Gentoo VoIP IRC Channel:"
- elog "#gentoo-voip @ irc.freenode.net"
- echo
- echo
- elog "1.6.1 -> 1.6.2 changes that you may care about:"
- elog "canreinvite -> directmedia (sip.conf)"
- elog "extensive T.38 (fax) changes"
- elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt"
- elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2"
-}
-
-pkg_config() {
- einfo "Do you want to reset file permissions and ownerships (y/N)?"
-
- read tmp
- tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
-
- if [[ "$tmp" = "y" ]] ||\
- [[ "$tmp" = "yes" ]]
- then
- einfo "Resetting permissions to defaults..."
-
- for x in spool run lib log; do
- chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
- chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
- done
-
- chown -R root:asterisk "${ROOT}"etc/asterisk
- chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
-
- einfo "done"
- else
- einfo "skipping"
- fi
-}
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-gsm-pic.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-gsm-pic.patch
deleted file mode 100644
index 1acca70b3a47..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-gsm-pic.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- codecs/gsm/Makefile.org 2008-03-29 11:33:09.000000000 +0100
-+++ codecs/gsm/Makefile 2008-03-29 11:44:40.000000000 +0100
-@@ -37,23 +37,6 @@
- ######### ppro's, etc, as well as the AMD K6 and K7. The compile will
- ######### probably require gcc.
-
--ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
--ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips))
--ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
--OPTIMIZE+=-march=$(PROC)
--endif
--endif
--endif
--
--#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)
--OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3
--endif
--
- PG =
- #PG = -g -pg
- ######### Profiling flags. If you don't know what that means, leave it blank.
-@@ -208,12 +191,10 @@
- # XXX Keep a space after each findstring argument
- # XXX should merge with GSM_OBJECTS
- ifeq ($(OSARCH),linux-gnu)
--ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 ))
--ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel mips ))
-+ifneq ($(K6OPT),)
- GSM_SOURCES+= $(SRC)/k6opt.s
- endif
- endif
--endif
-
- TOAST_SOURCES = $(SRC)/toast.c \
- $(SRC)/toast_lin.c \
-@@ -260,12 +241,10 @@
- $(SRC)/table.o
-
- ifeq ($(OSARCH),linux-gnu)
--ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
--ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel mips ))
-+ifneq ($(K6OPT),)
- GSM_OBJECTS+= $(SRC)/k6opt.o
- endif
- endif
--endif
-
- TOAST_OBJECTS = $(SRC)/toast.o \
- $(SRC)/toast_lin.o \
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-imap-kerberos.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-imap-kerberos.patch
deleted file mode 100644
index 74fc91b9dd22..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-imap-kerberos.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -uNr asterisk-1.6.0.6.ORIG/configure.ac asterisk-1.6.0.6/configure.ac
---- asterisk-1.6.0.6.ORIG/configure.ac 2009-03-10 23:00:03.000000000 +0000
-+++ asterisk-1.6.0.6/configure.ac 2009-03-10 22:58:59.000000000 +0000
-@@ -720,8 +720,11 @@
- fi
- imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
- imap_include="-I${IMAP_TK_DIR}/c-client"
-- CPPFLAGS="${CPPFLAGS} ${imap_include}"
-- LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
-+ CPPFLAGS="${CPPFLAGS} -I/usr/include/imap"
-+ LIBS="${LIBS} /usr/lib/c-client.a -lssl -lpam"
-+ if test -f /usr/bin/krb5-config; then
-+ LIBS="${LIBS} "`/usr/bin/krb5-config --libs krb5 gssapi kadm-client kadm-server`
-+ fi
- AC_LINK_IFELSE(
- AC_LANG_PROGRAM(
- [#include "c-client.h"
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-var_rundir.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-var_rundir.patch
deleted file mode 100644
index 367dc7163f54..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1-var_rundir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- asterisk-1.4.0/Makefile.orig 2006-12-24 03:07:19.000000000 +0000
-+++ asterisk-1.4.0/Makefile 2006-12-24 03:07:57.000000000 +0000
-@@ -109,7 +109,7 @@
- ASTSBINDIR=$(sbindir)
- ASTSPOOLDIR=$(localstatedir)/spool/asterisk
- ASTLOGDIR=$(localstatedir)/log/asterisk
-- ASTVARRUNDIR=$(localstatedir)/run
-+ ASTVARRUNDIR=$(localstatedir)/run/asterisk
- ASTMANDIR=$(mandir)
- ifeq ($(OSARCH),FreeBSD)
- ASTVARLIBDIR=$(prefix)/share/asterisk
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch
deleted file mode 100644
index 633240e069e1..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- ./asterisk-1.6.1.1.orig/channels/chan_sip.c 2009-04-20 19:08:26.000000000 +0200
-+++ ./asterisk-1.6.1.1/channels/chan_sip.c 2009-06-30 17:00:46.713621713 +0200
-@@ -9969,6 +9969,7 @@
- char tmp[80];
- char addr[80];
- struct sip_pvt *p;
-+ struct sip_peer *peer;
- int res;
- char *fromdomain;
-
-@@ -9982,8 +9983,12 @@
-
- if (r->dnsmgr == NULL) {
- char transport[MAXHOSTNAMELEN];
-+ peer = find_peer(r->hostname, NULL, TRUE, FINDPEERS, FALSE);
- snprintf(transport, sizeof(transport), "_sip._%s", get_transport(r->transport)); /* have to use static get_transport function */
-- ast_dnsmgr_lookup(r->hostname, &r->us, &r->dnsmgr, global_srvlookup ? transport : NULL);
-+ ast_dnsmgr_lookup(peer ? peer->tohost : r->hostname, &r->us, &r->dnsmgr, global_srvlookup ? transport : NULL);
-+ if (peer) {
-+ unref_peer(peer, "removing peer ref for dnsmgr_lookup");
-+ }
- }
-
- if (r->call) { /* We have a registration */
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.12-longer-sip-cid.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.12-longer-sip-cid.patch
deleted file mode 100644
index b9fa43de4484..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.12-longer-sip-cid.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- aaa/asterisk-1.6.1.10/channels/chan_sip.c 2009-11-13 16:57:13.000000000 +0100
-+++ bbb/asterisk-1.6.1.10/channels/chan_sip.c 2009-12-17 11:03:22.000000000 +0100
-@@ -15250,9 +15250,9 @@
- */
-
- #define FORMAT4 "%-15.15s %-10.10s %-15.15s %-15.15s %-13.13s %-15.15s %-10.10s %-6.6d\n"
--#define FORMAT3 "%-15.15s %-10.10s %-15.15s %-15.15s %-13.13s %-15.15s %-10.10s %-6.6s\n"
--#define FORMAT2 "%-15.15s %-10.10s %-15.15s %-15.15s %-7.7s %-15.15s %-6.6s\n"
--#define FORMAT "%-15.15s %-10.10s %-15.15s %-15.15s %-3.3s %-3.3s %-15.15s %-10.10s\n"
-+#define FORMAT3 "%-15.15s %-15.15s %-15.15s %-15.15s %-13.13s %-15.15s %-10.10s %-6.6s\n"
-+#define FORMAT2 "%-15.15s %-15.15s %-15.15s %-15.15s %-7.7s %-15.15s %-6.6s\n"
-+#define FORMAT "%-15.15s %-15.15s %-15.15s %-15.15s %-3.3s %-3.3s %-15.15s %-10.10s\n"
-
- /*! \brief callback for show channel|subscription */
- static int show_channels_cb(void *__cur, void *__arg, int flags)
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.12-parallel-make-v2.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.12-parallel-make-v2.patch
deleted file mode 100644
index 603b88c1cbef..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.12-parallel-make-v2.patch
+++ /dev/null
@@ -1,201 +0,0 @@
-diff -uNr asterisk-1.6.1.12.ORIG/channels/Makefile asterisk-1.6.1.12/channels/Makefile
---- asterisk-1.6.1.12.ORIG/channels/Makefile 2009-12-19 18:18:32.727000128 +0000
-+++ asterisk-1.6.1.12/channels/Makefile 2009-12-19 18:18:42.016000126 +0000
-@@ -99,7 +99,7 @@
- chan_usbradio.so: LIBS+=-lusb -lasound
-
- h323/Makefile.ast:
-- $(CMD_PREFIX) $(MAKE) -C h323 Makefile.ast
-+ $(CMD_PREFIX) +$(MAKE) -C h323 Makefile.ast
-
- h323/libchanh323.a: h323/Makefile.ast
-- $(CMD_PREFIX) $(MAKE) -C h323 libchanh323.a
-+ $(CMD_PREFIX) +$(MAKE) -C h323 libchanh323.a
-diff -uNr asterisk-1.6.1.12.ORIG/codecs/gsm/Makefile asterisk-1.6.1.12/codecs/gsm/Makefile
---- asterisk-1.6.1.12.ORIG/codecs/gsm/Makefile 2009-12-19 18:18:32.706000128 +0000
-+++ asterisk-1.6.1.12/codecs/gsm/Makefile 2009-12-19 18:23:17.010000126 +0000
-@@ -359,12 +359,12 @@
-
- gsminstall:
- -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
-- $(MAKE) $(GSM_INSTALL_TARGETS) ; \
-+ +$(MAKE) $(GSM_INSTALL_TARGETS) ; \
- fi
-
- toastinstall:
- -if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then \
-- $(MAKE) $(TOAST_INSTALL_TARGETS); \
-+ +$(MAKE) $(TOAST_INSTALL_TARGETS); \
- fi
-
- gsmuninstall:
-diff -uNr asterisk-1.6.1.12.ORIG/codecs/Makefile asterisk-1.6.1.12/codecs/Makefile
---- asterisk-1.6.1.12.ORIG/codecs/Makefile 2009-12-19 18:18:32.705000127 +0000
-+++ asterisk-1.6.1.12/codecs/Makefile 2009-12-19 18:18:42.016000126 +0000
-@@ -30,22 +30,22 @@
- endif
-
- clean::
-- $(MAKE) -C gsm clean
-- $(MAKE) -C lpc10 clean
-- $(MAKE) -C ilbc clean
-+ +$(MAKE) -C gsm clean
-+ +$(MAKE) -C lpc10 clean
-+ +$(MAKE) -C ilbc clean
- rm -f g722/*.[oa]
-
- gsm/lib/libgsm.a:
- @mkdir -p gsm/lib
-- @$(MAKE) -C gsm lib/libgsm.a
-+ @+$(MAKE) -C gsm lib/libgsm.a
-
- $(LIBLPC10):
-- @$(MAKE) -C lpc10 all
-+ @+$(MAKE) -C lpc10 all
-
- $(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
-
- $(LIBILBC):
-- @$(MAKE) -C ilbc all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
-+ @+$(MAKE) -C ilbc all _ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations -Wshadow,$(_ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)"
-
- $(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)
-
-diff -uNr asterisk-1.6.1.12.ORIG/main/Makefile asterisk-1.6.1.12/main/Makefile
---- asterisk-1.6.1.12.ORIG/main/Makefile 2009-12-19 18:18:32.695000126 +0000
-+++ asterisk-1.6.1.12/main/Makefile 2009-12-19 18:18:42.016000126 +0000
-@@ -174,7 +174,7 @@
- clean::
- rm -f asterisk
- rm -f db1-ast/.*.d
-- @if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
-- @$(MAKE) -C db1-ast clean
-- @$(MAKE) -C stdtime clean
-+ @if [ -f editline/Makefile ]; then +$(MAKE) -C editline distclean ; fi
-+ @+$(MAKE) -C db1-ast clean
-+ @+$(MAKE) -C stdtime clean
- rm -f libresample/src/*.o
-diff -uNr asterisk-1.6.1.12.ORIG/Makefile asterisk-1.6.1.12/Makefile
---- asterisk-1.6.1.12.ORIG/Makefile 2009-12-19 18:18:32.688000127 +0000
-+++ asterisk-1.6.1.12/Makefile 2009-12-19 18:27:50.464000127 +0000
-@@ -449,14 +449,14 @@
- rm -f include/asterisk/build.h
- rm -f main/version.c
- rm -f include/asterisk/version.h
-- @$(MAKE) -C menuselect clean
-+ @+$(MAKE) -C menuselect clean
- cp -f .cleancount .lastclean
-
- dist-clean: distclean
-
- distclean: $(SUBDIRS_DIST_CLEAN) _clean
-- @$(MAKE) -C menuselect dist-clean
-- @$(MAKE) -C sounds dist-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
-@@ -488,7 +488,7 @@
- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \
- done
- mkdir -p $(DESTDIR)$(AGI_DIR)
-- $(MAKE) -C sounds install
-+ +$(MAKE) -C sounds install
-
- update:
- @if [ -d .svn ]; then \
-@@ -555,7 +555,7 @@
- fi
-
- $(SUBDIRS_INSTALL):
-- @DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
-+ @+DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
-
- NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
- OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
-@@ -610,7 +610,7 @@
- @echo " + **Note** This requires that you have +"
- @echo " + doxygen installed on your local system +"
- @echo " +-------------------------------------------+"
-- @$(MAKE) -s oldmodcheck
-+ @+$(MAKE) -s oldmodcheck
-
- upgrade: bininstall
-
-@@ -794,14 +794,14 @@
- fi
-
- sounds:
-- $(MAKE) -C sounds all
-+ +$(MAKE) -C sounds all
-
- # If the cleancount has been changed, force a make clean.
- # .cleancount is the global clean count, and .lastclean is the
- # last clean count we had
-
- cleantest:
-- @cmp -s .cleancount .lastclean || $(MAKE) clean
-+ @cmp -s .cleancount .lastclean || +$(MAKE) clean
-
- $(SUBDIRS_UNINSTALL):
- @$(SUBMAKE) -C $(@:-uninstall=) uninstall
-@@ -817,7 +817,7 @@
- rm -f $(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8
- rm -f $(DESTDIR)$(ASTMANDIR)/man8/autosupport.8
- rm -f $(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8
-- $(MAKE) -C sounds uninstall
-+ +$(MAKE) -C sounds uninstall
-
- uninstall: _uninstall
- @echo " +--------- Asterisk Uninstall Complete -----+"
-@@ -851,11 +851,11 @@
-
- menuselect: menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect
- @if [ -x menuselect/nmenuselect ]; then \
-- $(MAKE) nmenuselect; \
-+ +$(MAKE) nmenuselect; \
- elif [ -x menuselect/cmenuselect ]; then \
-- $(MAKE) cmenuselect; \
-+ +$(MAKE) cmenuselect; \
- elif [ -x menuselect/gmenuselect ]; then \
-- $(MAKE) gmenuselect; \
-+ +$(MAKE) gmenuselect; \
- else \
- echo "No menuselect user interface found. Install ncurses,"; \
- echo "newt or GTK libraries to build one and re-rerun"; \
-@@ -906,7 +906,7 @@
-
- pdf: asterisk.pdf
- asterisk.pdf:
-- $(MAKE) -C doc/tex asterisk.pdf
-+ +$(MAKE) -C doc/tex asterisk.pdf
-
- .PHONY: menuselect
- .PHONY: main
-diff -uNr asterisk-1.6.1.12.ORIG/menuselect/Makefile asterisk-1.6.1.12/menuselect/Makefile
---- asterisk-1.6.1.12.ORIG/menuselect/Makefile 2009-12-19 18:18:32.708000126 +0000
-+++ asterisk-1.6.1.12/menuselect/Makefile 2009-12-19 18:18:42.017000127 +0000
-@@ -97,7 +97,7 @@
-
- mxml/libmxml.a:
- @if test ! -f mxml/Makefile ; then cd mxml && ./configure ; fi
-- @$(MAKE) -C mxml libmxml.a
-+ @+$(MAKE) -C mxml libmxml.a
-
- test: menuselect
- (cd test; ../$< menuselect.makeopts)
-@@ -113,11 +113,11 @@
-
- clean:
- rm -f menuselect cmenuselect gmenuselect nmenuselect $(OBJS) $(M_OBJS) $(C_OBJS) $(G_OBJS) $(N_OBJS)
-- @if test -f mxml/Makefile ; then $(MAKE) -C mxml clean ; fi
-+ @if test -f mxml/Makefile ; then +$(MAKE) -C mxml clean ; fi
-
- dist-clean: distclean
-
- distclean: clean
-- @if test -f mxml/Makefile ; then $(MAKE) -C mxml distclean ; fi
-+ @if test -f mxml/Makefile ; then +$(MAKE) -C mxml distclean ; fi
- rm -f autoconfig.h config.status config.log makeopts
- rm -rf autom4te.cache
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.14-graceful-restart-segfault.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.14-graceful-restart-segfault.patch
deleted file mode 100644
index 00e08e53f212..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.14-graceful-restart-segfault.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -uNr asterisk-1.6.1.14.ORIG/main/event.c asterisk-1.6.1.14/main/event.c
---- asterisk-1.6.1.14.ORIG/main/event.c 2010-02-10 22:37:28.868432167 +0000
-+++ asterisk-1.6.1.14/main/event.c 2010-02-10 22:38:31.532132064 +0000
-@@ -841,6 +841,11 @@
- struct ast_event_iterator iterator;
- int res = 0;
-
-+ /* Event has no IEs allocated */
-+ if (event->event_len < sizeof(*event) + sizeof(ie_type)) {
-+ return NULL;
-+ }
-+
- for (ast_event_iterator_init(&iterator, event); !res; res = ast_event_iterator_next(&iterator)) {
- if (ast_event_iterator_get_ie_type(&iterator) == ie_type)
- return ast_event_iterator_get_ie_raw(&iterator);
-diff -uNr asterisk-1.6.1.14.ORIG/main/loader.c asterisk-1.6.1.14/main/loader.c
---- asterisk-1.6.1.14.ORIG/main/loader.c 2010-02-10 22:37:28.863390515 +0000
-+++ asterisk-1.6.1.14/main/loader.c 2010-02-10 22:38:31.531140265 +0000
-@@ -443,26 +443,39 @@
- void ast_module_shutdown(void)
- {
- struct ast_module *mod;
-- AST_LIST_HEAD_NOLOCK_STATIC(local_module_list, ast_module);
--
-- /* We have to call the unload() callbacks in reverse order that the modules
-- * exist in the module list so it is the reverse order of how they were
-- * loaded. */
-+ int somethingchanged = 1, final = 0;
-
- AST_LIST_LOCK(&module_list);
-- while ((mod = AST_LIST_REMOVE_HEAD(&module_list, entry)))
-- AST_LIST_INSERT_HEAD(&local_module_list, mod, entry);
-- AST_LIST_UNLOCK(&module_list);
-
-- while ((mod = AST_LIST_REMOVE_HEAD(&local_module_list, entry))) {
-- if (mod->info->unload)
-- mod->info->unload();
-- /* Since this should only be called when shutting down "gracefully",
-- * all channels should be down before we get to this point, meaning
-- * there will be no module users left. */
-- AST_LIST_HEAD_DESTROY(&mod->users);
-- free(mod);
-- }
-+ /*!\note Some resources, like timers, are started up dynamically, and thus
-+ * may be still in use, even if all channels are dead. We must therefore
-+ * check the usecount before asking modules to unload. */
-+ do {
-+ if (!somethingchanged) {
-+ /*!\note If we go through the entire list without changing
-+ * anything, ignore the usecounts and unload, then exit. */
-+ final = 1;
-+ }
-+
-+ /* Reset flag before traversing the list */
-+ somethingchanged = 0;
-+
-+ AST_LIST_TRAVERSE_SAFE_BEGIN(&module_list, mod, entry) {
-+ if (!final && mod->usecount) {
-+ continue;
-+ }
-+ AST_LIST_REMOVE_CURRENT(entry);
-+ if (mod->info->unload) {
-+ mod->info->unload();
-+ }
-+ AST_LIST_HEAD_DESTROY(&mod->users);
-+ free(mod);
-+ somethingchanged = 1;
-+ }
-+ AST_LIST_TRAVERSE_SAFE_END;
-+ } while (somethingchanged && !final);
-+
-+ AST_LIST_UNLOCK(&module_list);
- }
-
- int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode force)
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.14-parallel-make.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.14-parallel-make.patch
deleted file mode 100644
index 9f4ba2465210..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.14-parallel-make.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -uNr asterisk-1.6.1.14.ORIG/Makefile asterisk-1.6.1.14/Makefile
---- asterisk-1.6.1.14.ORIG/Makefile 2010-02-10 22:33:29.357131986 +0000
-+++ asterisk-1.6.1.14/Makefile 2010-02-10 22:34:26.505462558 +0000
-@@ -556,7 +556,7 @@
- fi
-
- $(SUBDIRS_INSTALL):
-- @DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
-+ +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
-
- NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
- OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
-@@ -805,7 +805,7 @@
- @cmp -s .cleancount .lastclean || $(MAKE) clean
-
- $(SUBDIRS_UNINSTALL):
-- @$(SUBMAKE) -C $(@:-uninstall=) uninstall
-+ +@$(SUBMAKE) -C $(@:-uninstall=) uninstall
-
- _uninstall: $(SUBDIRS_UNINSTALL)
- rm -f $(DESTDIR)$(MODULES_DIR)/*
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.19-gsm-pic.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.19-gsm-pic.patch
deleted file mode 100644
index a7e6648154af..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.19-gsm-pic.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff -uNr asterisk-1.6.1.19.ORIG//codecs/gsm/Makefile asterisk-1.6.1.19/codecs/gsm/Makefile
---- asterisk-1.6.1.19.ORIG//codecs/gsm/Makefile 2010-05-13 16:16:44.000000000 +0100
-+++ asterisk-1.6.1.19/codecs/gsm/Makefile 2010-05-13 16:18:01.000000000 +0100
-@@ -37,28 +37,6 @@
- ######### ppro's, etc, as well as the AMD K6 and K7. The compile will
- ######### probably require gcc.
-
--ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
--ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips))
--ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
--ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
--# Wow... Snow Leopard is BROKEN!
--OPTIMIZE+=-mtune=native
--else
--OPTIMIZE+=-march=$(PROC)
--endif
--endif
--endif
--endif
--
--#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)
--OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3
--endif
--
- PG =
- #PG = -g -pg
- ######### Profiling flags. If you don't know what that means, leave it blank.
-@@ -213,12 +191,10 @@
- # XXX Keep a space after each findstring argument
- # XXX should merge with GSM_OBJECTS
- ifeq ($(OSARCH),linux-gnu)
--ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 ))
--ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel mips ))
-+ifneq ($(K6OPT),)
- GSM_SOURCES+= $(SRC)/k6opt.s
- endif
- endif
--endif
-
- TOAST_SOURCES = $(SRC)/toast.c \
- $(SRC)/toast_lin.c \
-@@ -265,12 +241,10 @@
- $(SRC)/table.o
-
- ifeq ($(OSARCH),linux-gnu)
--ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
--ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel mips ))
-+ifneq ($(K6OPT),)
- GSM_OBJECTS+= $(SRC)/k6opt.o
- endif
- endif
--endif
-
- TOAST_OBJECTS = $(SRC)/toast.o \
- $(SRC)/toast_lin.o \
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.20-inband-progress.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.20-inband-progress.patch
deleted file mode 100644
index 1dad8ca6faea..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.20-inband-progress.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -uNr asterisk-1.6.1.20.ORIG//main/channel.c asterisk-1.6.1.20/main/channel.c
---- asterisk-1.6.1.20.ORIG//main/channel.c 2010-06-07 12:13:50.000000000 +0100
-+++ asterisk-1.6.1.20/main/channel.c 2010-06-07 12:14:25.000000000 +0100
-@@ -1987,6 +1987,8 @@
- chan->generator->release(chan, chan->generatordata);
- chan->generatordata = NULL;
- }
-+
-+ ast_prod(chan);
- if (gen->alloc && !(chan->generatordata = gen->alloc(chan, params))) {
- res = -1;
- }
-@@ -1996,8 +1998,6 @@
- }
- ast_channel_unlock(chan);
-
-- ast_prod(chan);
--
- return res;
- }
-
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-bt-line-test.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-bt-line-test.patch
deleted file mode 100644
index dc62aff6d657..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-bt-line-test.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -uNr asterisk-1.6.1.6.ORIG/channels/chan_dahdi.c asterisk-1.6.1.6/channels/chan_dahdi.c
---- asterisk-1.6.1.6.ORIG/channels/chan_dahdi.c 2009-10-26 12:57:27.000000000 +0000
-+++ asterisk-1.6.1.6/channels/chan_dahdi.c 2009-10-26 12:59:26.000000000 +0000
-@@ -7287,6 +7287,7 @@
- }
- if (i & DAHDI_IOMUX_SIGEVENT) {
- res = dahdi_get_event(p->subs[idx].dfd);
-+ if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0;
- ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-
- if (p->cid_signalling == CID_SIG_V23_JP) {
-@@ -7389,6 +7390,7 @@
- if (i & DAHDI_IOMUX_SIGEVENT) {
- res = dahdi_get_event(p->subs[idx].dfd);
- ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-+ if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0;
- res = 0;
- /* Let us detect distinctive ring */
-
-@@ -7540,6 +7542,7 @@
- if (i & DAHDI_IOMUX_SIGEVENT) {
- res = dahdi_get_event(p->subs[idx].dfd);
- ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-+ if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0;
- /* If we get a PR event, they hung up while processing calerid */
- if ( res == DAHDI_EVENT_POLARITY && p->hanguponpolarityswitch && p->polarity == POLARITY_REV) {
- ast_log(LOG_DEBUG, "Hanging up due to polarity reversal on channel %d while detecting callerid\n", p->channel);
-@@ -7609,6 +7612,7 @@
- if (i & DAHDI_IOMUX_SIGEVENT) {
- res = dahdi_get_event(p->subs[idx].dfd);
- ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-+ if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0;
- res = 0;
- /* Let us detect callerid when the telco uses distinctive ring */
-
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-lua-includes.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-lua-includes.patch
deleted file mode 100644
index e7760068a7db..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-lua-includes.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -uNr asterisk-1.6.1.6.ORIG/pbx/pbx_lua.c asterisk-1.6.1.6/pbx/pbx_lua.c
---- asterisk-1.6.1.6.ORIG/pbx/pbx_lua.c 2009-09-04 12:13:44.000000000 +0100
-+++ asterisk-1.6.1.6/pbx/pbx_lua.c 2009-09-04 12:14:05.000000000 +0100
-@@ -42,9 +42,9 @@
- #include "asterisk/paths.h"
- #include "asterisk/hashtab.h"
-
--#include <lua5.1/lua.h>
--#include <lua5.1/lauxlib.h>
--#include <lua5.1/lualib.h>
-+#include <lua.h>
-+#include <lauxlib.h>
-+#include <lualib.h>
-
- static char *config = "extensions.lua";
- static char *registrar = "pbx_lua";
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-transfer-segfault.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-transfer-segfault.patch
deleted file mode 100644
index 0a0985b03cf9..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-transfer-segfault.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: asterisk-1.6.1.0~dfsg_devel/channels/chan_sip.c
-===================================================================
---- asterisk-1.6.1.0~dfsg_devel.orig/channels/chan_sip.c 2009-10-14 12:03:08.000000000 +0200
-+++ asterisk-1.6.1.0~dfsg_devel/channels/chan_sip.c 2009-10-14 12:03:11.000000000 +0200
-@@ -5333,15 +5333,12 @@
- * to lock the bridge. This may get hairy...
- */
- while (bridge && ast_channel_trylock(bridge)) {
-- struct ast_channel *chan = p->owner;
- sip_pvt_unlock(p);
- do {
-- /* Use chan since p->owner could go NULL on us
-- * while p is unlocked
-- */
-- CHANNEL_DEADLOCK_AVOIDANCE(chan);
-+ /* Use oldowner since p->owner is already NULL */
-+ CHANNEL_DEADLOCK_AVOIDANCE(oldowner);
- } while (sip_pvt_trylock(p));
-- bridge = p->owner ? ast_bridged_channel(p->owner) : NULL;
-+ bridge = ast_bridged_channel(oldowner);
- }
-
- if (p->rtp)
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.8-session_expiry.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.8-session_expiry.patch
deleted file mode 100644
index fcfe9551a0c9..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.8-session_expiry.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -uNr asterisk-1.6.1.8.ORIG/channels/chan_sip.c asterisk-1.6.1.8/channels/chan_sip.c
---- asterisk-1.6.1.8.ORIG/channels/chan_sip.c 2009-10-28 12:30:58.000000000 +0000
-+++ asterisk-1.6.1.8/channels/chan_sip.c 2009-10-28 12:31:24.000000000 +0000
-@@ -18627,7 +18627,7 @@
- st_interval = uac_max_se;
- }
- } else {
-- st_interval = uac_min_se;
-+ st_interval = global_max_se;
- }
- break;
-
diff --git a/net-misc/asterisk/files/1.6.1/asterisk.initd b/net-misc/asterisk/files/1.6.1/asterisk.initd
deleted file mode 100644
index dc6a14e365f1..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk.initd
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.6.1/asterisk.initd,v 1.1 2009/10/22 14:47:55 chainsaw Exp $
-
-opts="${opts} forcestop reload"
-
-depend() {
- need net
- use nscd dns dahdi mysql postgresql slapd capi
-}
-
-is_running() {
- if [ -z "$(pidof asterisk)" ]; then
- return 1
- else
- PID="$(cat /var/run/asterisk/asterisk.pid)"
- for x in $(pidof asterisk); do
- if [ "${x}" = "${PID}" ]; then
- return 0
- fi
- done
- fi
-
- return 1
-}
-
-asterisk_run_loop() {
- local OPTS ARGS MSG NICE=""
- local result=0 signal=0
-
- # default options
- OPTS="-f" # don't fork / detach breaks wrapper script...
-
- # filter (redundant) arguments
- ARGS="$(echo "${@}" | sed -e "s:-c\|-f::g")"
-
- # mangle yes/no options
- ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')"
-
- if [ -n "${ASTERISK_CORE_SIZE}" ] &&
- [ "${ASTERISK_CORE_SIZE}" != "0" ]; then
- ulimit -c ${ASTERISK_CORE_SIZE}
-
- if [ -n "${ASTERISK_CORE_DIR}" ] && \
- [ ! -d "${ASTERISK_CORE_DIR}" ]
- then
- mkdir -m750 -p "${ASTERISK_CORE_DIR}"
-
- if [ -n "${ASTERISK_USER}" ]; then
- chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}"
- fi
- fi
- ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}"
-
- cd "${ASTERISK_CORE_DIR}"
- echo " Core dump size : ${ASTERISK_CORE_SIZE}"
- echo " Core dump location : ${ASTERISK_CORE_DIR}"
- fi
-
- if [ -n "${ASTERISK_MAX_FD}" ]; then
- ulimit -n ${ASTERISK_MAX_FD}
- echo " Max open filedescriptors : ${ASTERISK_MAX_FD}"
- fi
-
- if [ -n "${ASTERISK_NICE}" ]; then
- echo " Nice level : ${ASTERISK_NICE}"
- NICE="nice -n ${ASTERISK_NICE} --"
- fi
-
- if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then
- if [ -x /usr/sbin/sendmail ]; then
- echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}"
- else
- echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!"
- unset ASTERISK_NOTIFY_EMAIL
- fi
- fi
-
- if [ -n "${ASTERISK_TTY}" ]; then
- for x in ${ASTERISK_TTY} \
- /dev/tty${ASTERISK_TTY} \
- /dev/vc/${ASTERISK_TTY}
- do
- if [ -c "${x}" ]; then
- TTY="${x}"
- fi
- done
- [ -n "${TTY}" ] && \
- echo " Messages are sent to : ${TTY}"
- fi
-
- if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then
- echo " Starting Asterisk console : ${ASTERISK_CONSOLE}"
- OPTS="${OPTS} -c"
- fi
-
- OPTS="${OPTS} ${ARGS}"
-
- while :; do
-
- if [ -n "${TTY}" ]; then
- /usr/bin/stty -F ${TTY} sane
- ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY}
- result=$?
- else
- ${NICE} /usr/sbin/asterisk ${OPTS} &>/dev/null
- result=$?
- fi
-
- if [ $result -eq 0 ]; then
- echo "Asterisk terminated normally"
- break
- else
- if [ $result -gt 128 ]; then
- signal=$((result - 128))
- MSG="Asterisk terminated with Signal: $signal"
-
- CORE_TARGET="core-$(date "+%Y%m%d-%h%M%s")"
-
- local CORE_DUMPED=0
- if [ -f "${ASTERISK_CORE_DIR}/core" ]; then
- mv "${ASTERISK_CORE_DIR}/core" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then
- mv "${ASTERISK_CORE_DIR}/core.${PID}" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- fi
-
- [ $CORE_DUMPED -eq 1 ] && \
- MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- else
- MSG="Asterisk terminated with return code: $result"
- fi
-
- # kill left-over tasks
- for X in ${ASTERISK_CLEANUP_ON_CRASH}; do
- kill -9 $(pidof ${X});
- done
- fi
-
- [ -n "${TTY}" ] \
- && echo "${MSG}" >${TTY} \
- || echo "${MSG}"
-
-
- if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \
- [ -x /usr/sbin/sendmail ]; then
- echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\
- /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}"
- fi
- sleep 5
- echo "Restarting Asterisk..."
- done
- return 0
-}
-
-start() {
- local OPTS USER GROUP PID
- local tmp x
-
- if [ -n "${ASTERISK_NICE}" ]; then
- if [ ${ASTERISK_NICE} -ge -20 ] && \
- [ ${ASTERISK_NICE} -le 19 ]; then
- OPTS="--nicelevel ${ASTERISK_NICE}"
- else
- eerror "Nice value must be between -20 and 19"
- return 1
- fi
- fi
-
- if [ -n "${ASTERISK_USER}" ]; then
- USER=$(echo $ASTERISK_USER | sed 's/:.*//')
- GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }')
- if [ -n "${USER}" ]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}"
- fi
- if [ -n "${GROUP}" ]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}"
- GROUP=":${GROUP}" # make it look nice...
- fi
- ebegin "Starting asterisk PBX (as ${USER}${GROUP})"
- else
- ebegin "Starting asterisk PBX (as root)"
- fi
-
- if [ "$(echo ${ASTERISK_WRAPPER} | tr '[:upper:]' '[:lower:]')" != "yes" ]; then
- start-stop-daemon --start --exec /usr/sbin/asterisk \
- ${OPTS} -- ${ASTERISK_OPTS}
- result=$?
- else
- asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null &
- result=$?
- fi
-
- if [ $result -eq 0 ]; then
- # 2 seconds should be enough for asterisk to start
- sleep 2
- is_running
- result=$?
- fi
-
- eend $result
-}
-
-forcestop() {
- ebegin "Stopping asterisk PBX"
- start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid
- eend $?
-}
-
-stop() {
- if ! is_running; then
- eerror "Asterisk is not running!"
- return 0
- fi
-
- ebegin "Stopping asterisk PBX gracefully"
- /usr/sbin/asterisk -r -x "core stop gracefully" &>/dev/null
- # Now we have to wait until asterisk has _really_ stopped.
- sleep 1
- if is_running; then
- einfon "Waiting for asterisk to shutdown ."
- local cnt=0
- while is_running; do
- cnt=`expr $cnt + 1`
- if [ $cnt -gt 60 ] ; then
- # Waited 120 seconds now. Fail.
- echo
- eend 1 "Failed."
- return
- fi
- sleep 2
- echo -n "."
- done
- echo
- fi
- eend 0
-}
-
-reload() {
- if is_running; then
- ebegin "Forcing asterisk to reload configuration"
- /usr/sbin/asterisk -r -x "reload" &>/dev/null
- eend $?
- else
- eerror "Asterisk is not running!"
- fi
-}
diff --git a/net-misc/asterisk/files/1.6.1/asterisk.initd2 b/net-misc/asterisk/files/1.6.1/asterisk.initd2
deleted file mode 100644
index 85ccb8ed0f36..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk.initd2
+++ /dev/null
@@ -1,261 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.6.1/asterisk.initd2,v 1.1 2009/12/19 18:59:58 chainsaw Exp $
-
-opts="${opts} forcestop reload"
-
-depend() {
- need net
- use nscd dns dahdi mysql postgresql slapd capi
-}
-
-is_running() {
- if [ -z "$(pidof asterisk)" ]; then
- return 1
- else
- PID="$(cat /var/run/asterisk/asterisk.pid)"
- for x in $(pidof asterisk); do
- if [ "${x}" = "${PID}" ]; then
- return 0
- fi
- done
- fi
-
- return 1
-}
-
-asterisk_run_loop() {
- local OPTS ARGS MSG NICE=""
- local result=0 signal=0
-
- # default options
- OPTS="-f" # don't fork / detach breaks wrapper script...
-
- # filter (redundant) arguments
- ARGS="$(echo "${@}" | sed -e "s:-c\|-f::g")"
-
- # mangle yes/no options
- ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')"
-
- if [ -n "${ASTERISK_CORE_SIZE}" ] &&
- [ "${ASTERISK_CORE_SIZE}" != "0" ]; then
- ulimit -c ${ASTERISK_CORE_SIZE}
-
- if [ -n "${ASTERISK_CORE_DIR}" ] && \
- [ ! -d "${ASTERISK_CORE_DIR}" ]
- then
- mkdir -m750 -p "${ASTERISK_CORE_DIR}"
-
- if [ -n "${ASTERISK_USER}" ]; then
- chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}"
- fi
- fi
- ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}"
-
- cd "${ASTERISK_CORE_DIR}"
- echo " Core dump size : ${ASTERISK_CORE_SIZE}"
- echo " Core dump location : ${ASTERISK_CORE_DIR}"
- fi
-
- if [ -n "${ASTERISK_MAX_FD}" ]; then
- ulimit -n ${ASTERISK_MAX_FD}
- echo " Max open filedescriptors : ${ASTERISK_MAX_FD}"
- fi
-
- if [ -n "${ASTERISK_NICE}" ]; then
- echo " Nice level : ${ASTERISK_NICE}"
- NICE="nice -n ${ASTERISK_NICE} --"
- fi
-
- if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then
- if [ -x /usr/sbin/sendmail ]; then
- echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}"
- else
- echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!"
- unset ASTERISK_NOTIFY_EMAIL
- fi
- fi
-
- if [ -n "${ASTERISK_TTY}" ]; then
- for x in ${ASTERISK_TTY} \
- /dev/tty${ASTERISK_TTY} \
- /dev/vc/${ASTERISK_TTY}
- do
- if [ -c "${x}" ]; then
- TTY="${x}"
- fi
- done
- [ -n "${TTY}" ] && \
- echo " Messages are sent to : ${TTY}"
- fi
-
- if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then
- echo " Starting Asterisk console : ${ASTERISK_CONSOLE}"
- OPTS="${OPTS} -c"
- fi
-
- OPTS="${OPTS} ${ARGS}"
-
- while :; do
-
- if [ -n "${TTY}" ]; then
- /usr/bin/stty -F ${TTY} sane
- ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY}
- result=$?
- else
- ${NICE} /usr/sbin/asterisk ${OPTS} &>/dev/null
- result=$?
- fi
-
- if [ $result -eq 0 ]; then
- echo "Asterisk terminated normally"
- break
- else
- if [ $result -gt 128 ]; then
- signal=$((result - 128))
- MSG="Asterisk terminated with Signal: $signal"
-
- CORE_TARGET="core-$(date "+%Y%m%d-%h%M%s")"
-
- local CORE_DUMPED=0
- if [ -f "${ASTERISK_CORE_DIR}/core" ]; then
- mv "${ASTERISK_CORE_DIR}/core" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then
- mv "${ASTERISK_CORE_DIR}/core.${PID}" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- fi
-
- [ $CORE_DUMPED -eq 1 ] && \
- MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- else
- MSG="Asterisk terminated with return code: $result"
- fi
-
- # kill left-over tasks
- for X in ${ASTERISK_CLEANUP_ON_CRASH}; do
- kill -9 $(pidof ${X});
- done
- fi
-
- [ -n "${TTY}" ] \
- && echo "${MSG}" >${TTY} \
- || echo "${MSG}"
-
-
- if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \
- [ -x /usr/sbin/sendmail ]; then
- echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\
- /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}"
- fi
- sleep 5
- echo "Restarting Asterisk..."
- done
- return 0
-}
-
-start() {
- local OPTS USER GROUP PID
- local tmp x
-
- if [ -n "${ASTERISK_NICE}" ]; then
- if [ ${ASTERISK_NICE} -ge -20 ] && \
- [ ${ASTERISK_NICE} -le 19 ]; then
- OPTS="--nicelevel ${ASTERISK_NICE}"
- else
- eerror "Nice value must be between -20 and 19"
- return 1
- fi
- fi
-
- if [ -n "${ASTERISK_USER}" ]; then
- USER=$(echo $ASTERISK_USER | sed 's/:.*//')
- GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }')
- if [ -n "${USER}" ]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}"
- fi
- if [ -n "${GROUP}" ]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}"
- GROUP=":${GROUP}" # make it look nice...
- fi
- for element in $(find /var/{log,run}/asterisk); do
- if [ $(stat -c %U $element) != ${USER} ]; then
- ewarn "${USER} is not the owner of $element, fixing."
- chown -R ${USER} /var/{log,run}/asterisk
- chmod -R u+r /var/{log,run}/asterisk
- chmod u+x /var/{log,run}/asterisk
- fi;
- done;
- ebegin "Starting asterisk PBX (as ${USER}${GROUP})"
- else
- ebegin "Starting asterisk PBX (as root)"
- fi
-
- if [ "$(echo ${ASTERISK_WRAPPER} | tr '[:upper:]' '[:lower:]')" != "yes" ]; then
- start-stop-daemon --start --exec /usr/sbin/asterisk \
- ${OPTS} -- ${ASTERISK_OPTS}
- result=$?
- else
- asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null &
- result=$?
- fi
-
- if [ $result -eq 0 ]; then
- # 2 seconds should be enough for asterisk to start
- sleep 2
- is_running
- result=$?
- fi
-
- eend $result
-}
-
-forcestop() {
- ebegin "Stopping asterisk PBX"
- start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid
- eend $?
-}
-
-stop() {
- if ! is_running; then
- eerror "Asterisk is not running!"
- return 0
- fi
-
- ebegin "Stopping asterisk PBX gracefully"
- /usr/sbin/asterisk -r -x "core stop gracefully" &>/dev/null
- # Now we have to wait until asterisk has _really_ stopped.
- sleep 1
- if is_running; then
- einfon "Waiting for asterisk to shutdown ."
- local cnt=0
- while is_running; do
- cnt=`expr $cnt + 1`
- if [ $cnt -gt 60 ] ; then
- # Waited 120 seconds now. Fail.
- echo
- eend 1 "Failed."
- return
- fi
- sleep 2
- echo -n "."
- done
- echo
- fi
- eend 0
-}
-
-reload() {
- if is_running; then
- ebegin "Forcing asterisk to reload configuration"
- /usr/sbin/asterisk -r -x "reload" &>/dev/null
- eend $?
- else
- eerror "Asterisk is not running!"
- fi
-}
diff --git a/net-misc/asterisk/files/1.6.1/asterisk.initd3 b/net-misc/asterisk/files/1.6.1/asterisk.initd3
deleted file mode 100644
index cc9e6dc1e052..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk.initd3
+++ /dev/null
@@ -1,269 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.6.1/asterisk.initd3,v 1.1 2010/02/02 22:48:09 chainsaw Exp $
-
-opts="${opts} forcestop reload"
-
-depend() {
- need net
- use nscd dns dahdi mysql postgresql slapd capi
-}
-
-is_running() {
- if [ -z "$(pidof asterisk)" ]; then
- return 1
- else
- PID="$(cat /var/run/asterisk/asterisk.pid)"
- for x in $(pidof asterisk); do
- if [ "${x}" = "${PID}" ]; then
- return 0
- fi
- done
- fi
-
- return 1
-}
-
-asterisk_run_loop() {
- local OPTS ARGS MSG NICE=""
- local result=0 signal=0
-
- # default options
- OPTS="-f" # don't fork / detach breaks wrapper script...
-
- # filter (redundant) arguments
- ARGS="$(echo "${@}" | sed -e "s:-c\|-f::g")"
-
- # mangle yes/no options
- ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')"
-
- if [ -n "${ASTERISK_CORE_SIZE}" ] &&
- [ "${ASTERISK_CORE_SIZE}" != "0" ]; then
- ulimit -c ${ASTERISK_CORE_SIZE}
-
- if [ -n "${ASTERISK_CORE_DIR}" ] && \
- [ ! -d "${ASTERISK_CORE_DIR}" ]
- then
- mkdir -m750 -p "${ASTERISK_CORE_DIR}"
-
- if [ -n "${ASTERISK_USER}" ]; then
- chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}"
- fi
- fi
- ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}"
-
- cd "${ASTERISK_CORE_DIR}"
- echo " Core dump size : ${ASTERISK_CORE_SIZE}"
- echo " Core dump location : ${ASTERISK_CORE_DIR}"
- fi
-
- if [ -n "${ASTERISK_MAX_FD}" ]; then
- ulimit -n ${ASTERISK_MAX_FD}
- echo " Max open filedescriptors : ${ASTERISK_MAX_FD}"
- fi
-
- if [ -n "${ASTERISK_NICE}" ]; then
- echo " Nice level : ${ASTERISK_NICE}"
- NICE="nice -n ${ASTERISK_NICE} --"
- fi
-
- if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then
- if [ -x /usr/sbin/sendmail ]; then
- echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}"
- else
- echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!"
- unset ASTERISK_NOTIFY_EMAIL
- fi
- fi
-
- if [ -n "${ASTERISK_TTY}" ]; then
- for x in ${ASTERISK_TTY} \
- /dev/tty${ASTERISK_TTY} \
- /dev/vc/${ASTERISK_TTY}
- do
- if [ -c "${x}" ]; then
- TTY="${x}"
- fi
- done
- [ -n "${TTY}" ] && \
- echo " Messages are sent to : ${TTY}"
- fi
-
- if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then
- echo " Starting Asterisk console : ${ASTERISK_CONSOLE}"
- OPTS="${OPTS} -c"
- fi
-
- OPTS="${OPTS} ${ARGS}"
-
- trap "rm /var/run/asterisk/wrapper_loop.pid" EXIT
- cut -f4 -d' ' < /proc/self/stat > /var/run/asterisk/wrapper_loop.pid
-
- while :; do
- if [ -n "${TTY}" ]; then
- /usr/bin/stty -F ${TTY} sane
- ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY}
- result=$?
- else
- ${NICE} /usr/sbin/asterisk ${OPTS} &>/dev/null
- result=$?
- fi
-
- if [ $result -eq 0 ]; then
- logger -t asterisk_wrapper "Asterisk terminated normally"
- break
- else
- if [ $result -gt 128 ]; then
- signal=$((result - 128))
- MSG="Asterisk terminated with Signal: $signal"
-
- CORE_TARGET="core-$(date "+%Y%m%d-%h%M%s")"
-
- local CORE_DUMPED=0
- if [ -f "${ASTERISK_CORE_DIR}/core" ]; then
- mv "${ASTERISK_CORE_DIR}/core" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then
- mv "${ASTERISK_CORE_DIR}/core.${PID}" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- fi
-
- [ $CORE_DUMPED -eq 1 ] && \
- MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- else
- MSG="Asterisk terminated with return code: $result"
- fi
-
- # kill left-over tasks
- for X in ${ASTERISK_CLEANUP_ON_CRASH}; do
- kill -9 $(pidof ${X});
- done
- fi
-
- [ -n "${TTY}" ] \
- && echo "${MSG}" >${TTY} \
- || logger -t asterisk_wrapper "${MSG}"
-
-
- if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \
- [ -x /usr/sbin/sendmail ]; then
- echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\
- /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}"
- fi
- sleep 5
- logger -t asterisk_wrapper "Restarting Asterisk..."
- done
- return 0
-}
-
-start() {
- local OPTS USER GROUP PID
- local tmp x
-
- if [ -n "${ASTERISK_NICE}" ]; then
- if [ ${ASTERISK_NICE} -ge -20 ] && \
- [ ${ASTERISK_NICE} -le 19 ]; then
- OPTS="--nicelevel ${ASTERISK_NICE}"
- else
- eerror "Nice value must be between -20 and 19"
- return 1
- fi
- fi
-
- if [ -n "${ASTERISK_USER}" ]; then
- USER=$(echo $ASTERISK_USER | sed 's/:.*//')
- GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }')
- if [ -n "${USER}" ]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}"
- fi
- if [ -n "${GROUP}" ]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}"
- GROUP=":${GROUP}" # make it look nice...
- fi
- for element in $(find /var/{log,run}/asterisk); do
- if [ $(stat -c %U $element) != ${USER} ]; then
- ewarn "${USER} is not the owner of $element, fixing."
- chown -R ${USER} /var/{log,run}/asterisk
- chmod -R u+r /var/{log,run}/asterisk
- chmod u+x /var/{log,run}/asterisk
- fi;
- done;
- ebegin "Starting asterisk PBX (as ${USER}${GROUP})"
- else
- ebegin "Starting asterisk PBX (as root)"
- fi
-
- if [ "$(echo ${ASTERISK_WRAPPER} | tr '[:upper:]' '[:lower:]')" != "yes" ]; then
- start-stop-daemon --start --exec /usr/sbin/asterisk \
- ${OPTS} -- ${ASTERISK_OPTS}
- result=$?
- else
- asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null &
- result=$?
- fi
-
- if [ $result -eq 0 ]; then
- # 2 seconds should be enough for asterisk to start
- sleep 2
- is_running
- result=$?
- fi
-
- eend $result
-}
-
-forcestop() {
- ebegin "Stopping asterisk PBX"
- start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid
- eend $?
-}
-
-stop() {
- if ! is_running; then
- eerror "Asterisk is not running!"
- return 0
- fi
-
- if [ -r /var/run/asterisk/wrapper_loop.pid ]; then
- ebegin "Killing wrapper script"
- kill $(</var/run/asterisk/wrapper_loop.pid)
- eend $?
- fi
-
- ebegin "Stopping asterisk PBX gracefully"
- /usr/sbin/asterisk -r -x "core stop gracefully" &>/dev/null
- # Now we have to wait until asterisk has _really_ stopped.
- sleep 1
- if is_running; then
- einfon "Waiting for asterisk to shutdown ."
- local cnt=0
- while is_running; do
- cnt=`expr $cnt + 1`
- if [ $cnt -gt 60 ] ; then
- # Waited 120 seconds now. Fail.
- echo
- eend 1 "Failed."
- return
- fi
- sleep 2
- echo -n "."
- done
- echo
- fi
- eend 0
-}
-
-reload() {
- if is_running; then
- ebegin "Forcing asterisk to reload configuration"
- /usr/sbin/asterisk -r -x "reload" &>/dev/null
- eend $?
- else
- eerror "Asterisk is not running!"
- fi
-}
diff --git a/net-misc/asterisk/files/1.6.1/asterisk.rc6 b/net-misc/asterisk/files/1.6.1/asterisk.rc6
deleted file mode 100644
index 9a9375a86421..000000000000
--- a/net-misc/asterisk/files/1.6.1/asterisk.rc6
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.6.1/asterisk.rc6,v 1.1 2009/06/30 16:01:17 chainsaw Exp $
-
-opts="${opts} forcestop reload"
-
-depend() {
- need net
- use nscd dns zaptel mysql postgresql slapd capi
-}
-
-is_running() {
- if [ -z "$(pidof asterisk)" ]; then
- return 1
- else
- PID="$(cat /var/run/asterisk/asterisk.pid)"
- for x in $(pidof asterisk); do
- if [ "${x}" = "${PID}" ]; then
- return 0
- fi
- done
- fi
-
- return 1
-}
-
-asterisk_run_loop() {
- local OPTS ARGS MSG NICE=""
- local result=0 signal=0
-
- # default options
- OPTS="-f" # don't fork / detach breaks wrapper script...
-
- # filter (redundant) arguments
- ARGS="$(echo "${@}" | sed -e "s:-c\|-f::g")"
-
- # mangle yes/no options
- ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')"
-
- if [ -n "${ASTERISK_CORE_SIZE}" ] &&
- [ "${ASTERISK_CORE_SIZE}" != "0" ]; then
- ulimit -c ${ASTERISK_CORE_SIZE}
-
- if [ -n "${ASTERISK_CORE_DIR}" ] && \
- [ ! -d "${ASTERISK_CORE_DIR}" ]
- then
- mkdir -m750 -p "${ASTERISK_CORE_DIR}"
-
- if [ -n "${ASTERISK_USER}" ]; then
- chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}"
- fi
- fi
- ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}"
-
- cd "${ASTERISK_CORE_DIR}"
- echo " Core dump size : ${ASTERISK_CORE_SIZE}"
- echo " Core dump location : ${ASTERISK_CORE_DIR}"
- fi
-
- if [ -n "${ASTERISK_MAX_FD}" ]; then
- ulimit -n ${ASTERISK_MAX_FD}
- echo " Max open filedescriptors : ${ASTERISK_MAX_FD}"
- fi
-
- if [ -n "${ASTERISK_NICE}" ]; then
- echo " Nice level : ${ASTERISK_NICE}"
- NICE="nice -n ${ASTERISK_NICE} --"
- fi
-
- if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then
- if [ -x /usr/sbin/sendmail ]; then
- echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}"
- else
- echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!"
- unset ASTERISK_NOTIFY_EMAIL
- fi
- fi
-
- if [ -n "${ASTERISK_TTY}" ]; then
- for x in ${ASTERISK_TTY} \
- /dev/tty${ASTERISK_TTY} \
- /dev/vc/${ASTERISK_TTY}
- do
- if [ -c "${x}" ]; then
- TTY="${x}"
- fi
- done
- [ -n "${TTY}" ] && \
- echo " Messages are sent to : ${TTY}"
- fi
-
- if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then
- echo " Starting Asterisk console : ${ASTERISK_CONSOLE}"
- OPTS="${OPTS} -c"
- fi
-
- OPTS="${OPTS} ${ARGS}"
-
- while :; do
-
- if [ -n "${TTY}" ]; then
- /usr/bin/stty -F ${TTY} sane
- ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY}
- result=$?
- else
- ${NICE} /usr/sbin/asterisk ${OPTS} &>/dev/null
- result=$?
- fi
-
- if [ $result -eq 0 ]; then
- echo "Asterisk terminated normally"
- break
- else
- if [ $result -gt 128 ]; then
- signal=$((result - 128))
- MSG="Asterisk terminated with Signal: $signal"
-
- CORE_TARGET="core-$(date "+%Y%m%d-%h%M%s")"
-
- local CORE_DUMPED=0
- if [ -f "${ASTERISK_CORE_DIR}/core" ]; then
- mv "${ASTERISK_CORE_DIR}/core" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then
- mv "${ASTERISK_CORE_DIR}/core.${PID}" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- fi
-
- [ $CORE_DUMPED -eq 1 ] && \
- MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- else
- MSG="Asterisk terminated with return code: $result"
- fi
-
- # kill left-over tasks
- for X in ${ASTERISK_CLEANUP_ON_CRASH}; do
- kill -9 $(pidof ${X});
- done
- fi
-
- [ -n "${TTY}" ] \
- && echo "${MSG}" >${TTY} \
- || echo "${MSG}"
-
-
- if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \
- [ -x /usr/sbin/sendmail ]; then
- echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\
- /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}"
- fi
- sleep 5
- echo "Restarting Asterisk..."
- done
- return 0
-}
-
-start() {
- local OPTS USER GROUP PID
- local tmp x
-
- if [ -n "${ASTERISK_NICE}" ]; then
- if [ ${ASTERISK_NICE} -ge -20 ] && \
- [ ${ASTERISK_NICE} -le 19 ]; then
- OPTS="--nicelevel ${ASTERISK_NICE}"
- else
- eerror "Nice value must be between -20 and 19"
- return 1
- fi
- fi
-
- if [ -n "${ASTERISK_USER}" ]; then
- USER=$(echo $ASTERISK_USER | sed 's/:.*//')
- GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }')
- if [ -n "${USER}" ]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}"
- fi
- if [ -n "${GROUP}" ]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}"
- GROUP=":${GROUP}" # make it look nice...
- fi
- ebegin "Starting asterisk PBX (as ${USER}${GROUP})"
- else
- ebegin "Starting asterisk PBX (as root)"
- fi
-
- if [ "$(echo ${ASTERISK_WRAPPER} | tr '[:upper:]' '[:lower:]')" != "yes" ]; then
- start-stop-daemon --start --exec /usr/sbin/asterisk \
- ${OPTS} -- ${ASTERISK_OPTS}
- result=$?
- else
- asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null &
- result=$?
- fi
-
- if [ $result -eq 0 ]; then
- # 2 seconds should be enough for asterisk to start
- sleep 2
- is_running
- result=$?
- fi
-
- eend $result
-}
-
-forcestop() {
- ebegin "Stopping asterisk PBX"
- start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid
- eend $?
-}
-
-stop() {
- if ! is_running; then
- eerror "Asterisk is not running!"
- return 0
- fi
-
- ebegin "Stopping asterisk PBX gracefully"
- /usr/sbin/asterisk -r -x "core stop gracefully" &>/dev/null
- # Now we have to wait until asterisk has _really_ stopped.
- sleep 1
- if is_running; then
- einfon "Waiting for asterisk to shutdown ."
- local cnt=0
- while is_running; do
- cnt=`expr $cnt + 1`
- if [ $cnt -gt 60 ] ; then
- # Waited 120 seconds now. Fail.
- echo
- eend 1 "Failed."
- return
- fi
- sleep 2
- echo -n "."
- done
- echo
- fi
- eend 0
-}
-
-reload() {
- if is_running; then
- ebegin "Forcing asterisk to reload configuration"
- /usr/sbin/asterisk -r -x "reload" &>/dev/null
- eend $?
- else
- eerror "Asterisk is not running!"
- fi
-}
diff --git a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.0-bt-line-test.patch b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.0-bt-line-test.patch
deleted file mode 100644
index 2b38e3ed891a..000000000000
--- a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.0-bt-line-test.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -uNr asterisk-1.6.2.0.ORIG/channels/chan_dahdi.c asterisk-1.6.2.0/channels/chan_dahdi.c
---- asterisk-1.6.2.0.ORIG/channels/chan_dahdi.c 2010-01-04 13:57:12.000000000 +0000
-+++ asterisk-1.6.2.0/channels/chan_dahdi.c 2010-01-04 14:08:54.000000000 +0000
-@@ -8419,6 +8419,7 @@
- }
- if (i & DAHDI_IOMUX_SIGEVENT) {
- res = dahdi_get_event(p->subs[idx].dfd);
-+ if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0;
- ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-
- if (p->cid_signalling == CID_SIG_V23_JP) {
-@@ -8521,6 +8522,7 @@
- if (i & DAHDI_IOMUX_SIGEVENT) {
- res = dahdi_get_event(p->subs[idx].dfd);
- ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-+ if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0;
- res = 0;
- /* Let us detect distinctive ring */
-
-@@ -8670,6 +8672,7 @@
- if (i & DAHDI_IOMUX_SIGEVENT) {
- res = dahdi_get_event(p->subs[idx].dfd);
- ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-+ if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0;
- /* If we get a PR event, they hung up while processing calerid */
- if ( res == DAHDI_EVENT_POLARITY && p->hanguponpolarityswitch && p->polarity == POLARITY_REV) {
- ast_log(LOG_DEBUG, "Hanging up due to polarity reversal on channel %d while detecting callerid\n", p->channel);
-@@ -8739,6 +8742,7 @@
- if (i & DAHDI_IOMUX_SIGEVENT) {
- res = dahdi_get_event(p->subs[idx].dfd);
- ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-+ if (res == DAHDI_EVENT_NOALARM) p->inalarm = 0;
- res = 0;
- /* Let us detect callerid when the telco uses distinctive ring */
-
diff --git a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.1-parallel-make.patch b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.1-parallel-make.patch
deleted file mode 100644
index 2d216e8bdf0a..000000000000
--- a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.1-parallel-make.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-diff -uNr asterisk-1.6.2.0/Makefile asterisk-1.6.2.0-r1/Makefile
---- asterisk-1.6.2.0/Makefile 2010-01-16 18:55:43.738059027 +0100
-+++ asterisk-1.6.2.0-r1/Makefile 2010-01-16 19:32:06.898555681 +0100
-@@ -589,7 +589,7 @@
- fi
-
- $(SUBDIRS_INSTALL):
-- @DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
-+ @+DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
-
- NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
- OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
-@@ -848,7 +848,7 @@
- # last clean count we had
-
- cleantest:
-- @cmp -s .cleancount .lastclean || $(MAKE) clean
-+ @+cmp -s .cleancount .lastclean || $(MAKE) clean
-
- $(SUBDIRS_UNINSTALL):
- @$(SUBMAKE) -C $(@:-uninstall=) uninstall
-@@ -897,7 +897,7 @@
- nmenuconfig: nmenuselect
-
- menuselect: menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect
-- @if [ -x menuselect/nmenuselect ]; then \
-+ @+if [ -x menuselect/nmenuselect ]; then \
- $(MAKE) nmenuselect; \
- elif [ -x menuselect/cmenuselect ]; then \
- $(MAKE) cmenuselect; \
-diff -uNr asterisk-1.6.2.0/channels/Makefile asterisk-1.6.2.0-r1/channels/Makefile
---- asterisk-1.6.2.0/channels/Makefile 2010-01-16 18:55:43.733055737 +0100
-+++ asterisk-1.6.2.0-r1/channels/Makefile 2010-01-16 18:57:51.589055800 +0100
-@@ -100,7 +100,7 @@
- chan_usbradio.so: _ASTCFLAGS+=-DNDEBUG
-
- h323/Makefile.ast:
-- $(CMD_PREFIX) $(MAKE) -C h323 Makefile.ast
-+ +$(CMD_PREFIX) $(MAKE) -C h323 Makefile.ast
-
- h323/libchanh323.a: h323/Makefile.ast
-- $(CMD_PREFIX) $(MAKE) -C h323 libchanh323.a
-+ +$(CMD_PREFIX) $(MAKE) -C h323 libchanh323.a
-diff -uNr asterisk-1.6.2.0/codecs/gsm/Makefile asterisk-1.6.2.0-r1/codecs/gsm/Makefile
---- asterisk-1.6.2.0/codecs/gsm/Makefile 2010-01-16 18:55:43.733055737 +0100
-+++ asterisk-1.6.2.0-r1/codecs/gsm/Makefile 2010-01-16 18:58:31.557055848 +0100
-@@ -358,12 +358,12 @@
- # Installation
-
- gsminstall:
-- -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
-+ -+if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
- $(MAKE) $(GSM_INSTALL_TARGETS) ; \
- fi
-
- toastinstall:
-- -if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then \
-+ -+if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then \
- $(MAKE) $(TOAST_INSTALL_TARGETS); \
- fi
-
-diff -uNr asterisk-1.6.2.0/main/Makefile asterisk-1.6.2.0-r1/main/Makefile
---- asterisk-1.6.2.0/main/Makefile 2010-01-16 18:55:43.738059027 +0100
-+++ asterisk-1.6.2.0-r1/main/Makefile 2010-01-16 19:26:43.334555789 +0100
-@@ -177,7 +177,7 @@
- clean::
- rm -f asterisk
- rm -f db1-ast/.*.d
-- @if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
-+ @+if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
- @$(MAKE) -C db1-ast clean
- @$(MAKE) -C stdtime clean
- rm -f libresample/src/*.o
-diff -uNr asterisk-1.6.2.0/menuselect/Makefile asterisk-1.6.2.0-r1/menuselect/Makefile
---- asterisk-1.6.2.0/menuselect/Makefile 2010-01-16 18:55:43.738059027 +0100
-+++ asterisk-1.6.2.0-r1/menuselect/Makefile 2010-01-16 19:03:34.381055693 +0100
-@@ -96,7 +96,7 @@
- $(CC) -o $@ $^ $(M_LIBS)
-
- mxml/libmxml.a:
-- @if test ! -f mxml/Makefile ; then cd mxml && ./configure ; fi
-+ @+if test ! -f mxml/Makefile ; then cd mxml && ./configure ; fi
- @$(MAKE) -C mxml libmxml.a
-
- test: menuselect
-@@ -113,11 +113,11 @@
-
- clean:
- rm -f menuselect cmenuselect gmenuselect nmenuselect $(OBJS) $(M_OBJS) $(C_OBJS) $(G_OBJS) $(N_OBJS)
-- @if test -f mxml/Makefile ; then $(MAKE) -C mxml clean ; fi
-+ @+if test -f mxml/Makefile ; then $(MAKE) -C mxml clean ; fi
-
- dist-clean: distclean
-
- distclean: clean
-- @if test -f mxml/Makefile ; then $(MAKE) -C mxml distclean ; fi
-+ @+if test -f mxml/Makefile ; then $(MAKE) -C mxml distclean ; fi
- rm -f autoconfig.h config.status config.log makeopts
- rm -rf autom4te.cache
diff --git a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.2-graceful-restart-segfault.patch b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.2-graceful-restart-segfault.patch
deleted file mode 100644
index 2962cc6a023f..000000000000
--- a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.2-graceful-restart-segfault.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -uNr asterisk-1.6.2.2.ORIG/main/event.c asterisk-1.6.2.2/main/event.c
---- asterisk-1.6.2.2.ORIG/main/event.c 2010-02-10 21:05:55.278139356 +0000
-+++ asterisk-1.6.2.2/main/event.c 2010-02-10 21:06:58.008198202 +0000
-@@ -841,6 +841,11 @@
- struct ast_event_iterator iterator;
- int res = 0;
-
-+ /* Event has no IEs allocated */
-+ if (event->event_len < sizeof(*event) + sizeof(ie_type)) {
-+ return NULL;
-+ }
-+
- for (ast_event_iterator_init(&iterator, event); !res; res = ast_event_iterator_next(&iterator)) {
- if (ast_event_iterator_get_ie_type(&iterator) == ie_type)
- return ast_event_iterator_get_ie_raw(&iterator);
-diff -uNr asterisk-1.6.2.2.ORIG/main/loader.c asterisk-1.6.2.2/main/loader.c
---- asterisk-1.6.2.2.ORIG/main/loader.c 2010-02-10 21:05:55.273223462 +0000
-+++ asterisk-1.6.2.2/main/loader.c 2010-02-10 21:06:58.006203410 +0000
-@@ -444,26 +444,39 @@
- void ast_module_shutdown(void)
- {
- struct ast_module *mod;
-- AST_LIST_HEAD_NOLOCK_STATIC(local_module_list, ast_module);
--
-- /* We have to call the unload() callbacks in reverse order that the modules
-- * exist in the module list so it is the reverse order of how they were
-- * loaded. */
-+ int somethingchanged = 1, final = 0;
-
- AST_LIST_LOCK(&module_list);
-- while ((mod = AST_LIST_REMOVE_HEAD(&module_list, entry)))
-- AST_LIST_INSERT_HEAD(&local_module_list, mod, entry);
-- AST_LIST_UNLOCK(&module_list);
-
-- while ((mod = AST_LIST_REMOVE_HEAD(&local_module_list, entry))) {
-- if (mod->info->unload)
-- mod->info->unload();
-- /* Since this should only be called when shutting down "gracefully",
-- * all channels should be down before we get to this point, meaning
-- * there will be no module users left. */
-- AST_LIST_HEAD_DESTROY(&mod->users);
-- free(mod);
-- }
-+ /*!\note Some resources, like timers, are started up dynamically, and thus
-+ * may be still in use, even if all channels are dead. We must therefore
-+ * check the usecount before asking modules to unload. */
-+ do {
-+ if (!somethingchanged) {
-+ /*!\note If we go through the entire list without changing
-+ * anything, ignore the usecounts and unload, then exit. */
-+ final = 1;
-+ }
-+
-+ /* Reset flag before traversing the list */
-+ somethingchanged = 0;
-+
-+ AST_LIST_TRAVERSE_SAFE_BEGIN(&module_list, mod, entry) {
-+ if (!final && mod->usecount) {
-+ continue;
-+ }
-+ AST_LIST_REMOVE_CURRENT(entry);
-+ if (mod->info->unload) {
-+ mod->info->unload();
-+ }
-+ AST_LIST_HEAD_DESTROY(&mod->users);
-+ free(mod);
-+ somethingchanged = 1;
-+ }
-+ AST_LIST_TRAVERSE_SAFE_END;
-+ } while (somethingchanged && !final);
-+
-+ AST_LIST_UNLOCK(&module_list);
- }
-
- int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode force)
diff --git a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.2-parallel-make.patch b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.2-parallel-make.patch
deleted file mode 100644
index 122dc1d2f78f..000000000000
--- a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.2-parallel-make.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -uNr asterisk-1.6.2.1.ORIG/Makefile asterisk-1.6.2.1/Makefile
---- asterisk-1.6.2.1.ORIG/Makefile 2010-01-19 17:06:47.000000000 +0000
-+++ asterisk-1.6.2.1/Makefile 2010-01-19 17:08:15.000000000 +0000
-@@ -590,7 +590,7 @@
- fi
-
- $(SUBDIRS_INSTALL):
-- @DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
-+ +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
-
- NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
- OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
-@@ -852,7 +852,7 @@
- @cmp -s .cleancount .lastclean || $(MAKE) clean
-
- $(SUBDIRS_UNINSTALL):
-- @$(SUBMAKE) -C $(@:-uninstall=) uninstall
-+ +@$(SUBMAKE) -C $(@:-uninstall=) uninstall
-
- _uninstall: $(SUBDIRS_UNINSTALL)
- rm -f $(DESTDIR)$(MODULES_DIR)/*
diff --git a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.7-gsm-pic.patch b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.7-gsm-pic.patch
deleted file mode 100644
index 20613d443b42..000000000000
--- a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.7-gsm-pic.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff -uNr asterisk-1.6.2.7.ORIG/codecs/gsm/Makefile asterisk-1.6.2.7/codecs/gsm/Makefile
---- asterisk-1.6.2.7.ORIG/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100
-+++ asterisk-1.6.2.7/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100
-@@ -37,28 +37,6 @@
- ######### ppro's, etc, as well as the AMD K6 and K7. The compile will
- ######### probably require gcc.
-
--ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
--ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips))
--ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
--ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
--# Wow... Snow Leopard is BROKEN!
--OPTIMIZE+=-mtune=native
--else
--OPTIMIZE+=-march=$(PROC)
--endif
--endif
--endif
--endif
--
--#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)
--OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3
--endif
--
- PG =
- #PG = -g -pg
- ######### Profiling flags. If you don't know what that means, leave it blank.
-@@ -213,12 +191,10 @@
- # XXX Keep a space after each findstring argument
- # XXX should merge with GSM_OBJECTS
- ifeq ($(OSARCH),linux-gnu)
--ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 ))
--ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel mips ))
-+ifneq ($(K6OPT),)
- GSM_SOURCES+= $(SRC)/k6opt.s
- endif
- endif
--endif
-
- TOAST_SOURCES = $(SRC)/toast.c \
- $(SRC)/toast_lin.c \
-@@ -265,12 +241,10 @@
- $(SRC)/table.o
-
- ifeq ($(OSARCH),linux-gnu)
--ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
--ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel mips ))
-+ifneq ($(K6OPT),)
- GSM_OBJECTS+= $(SRC)/k6opt.o
- endif
- endif
--endif
-
- TOAST_OBJECTS = $(SRC)/toast.o \
- $(SRC)/toast_lin.o \
diff --git a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.7-pri-missing-keyword.patch b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.7-pri-missing-keyword.patch
deleted file mode 100644
index d3775d6c69fe..000000000000
--- a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.7-pri-missing-keyword.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -uNr asterisk-1.6.2.6.ORIG/include/asterisk/autoconfig.h.in asterisk-1.6.2.6/include/asterisk/autoconfig.h.in
---- asterisk-1.6.2.6.ORIG/include/asterisk/autoconfig.h.in 2009-09-29 09:53:36.000000000 +0200
-+++ asterisk-1.6.2.6/include/asterisk/autoconfig.h.in 2009-09-29 2009-09-29 09:53:36.000000000 +0200
-@@ -616,6 +616,8 @@
- /* Define to 1 if you have the ISDN PRI library. */
- #undef HAVE_PRI
-
-+#undef HAVE_PRI_PROG_W_CAUSE
-+
- /* Define to 1 if you have the ISDN PRI set_inbanddisconnect library. */
- #undef HAVE_PRI_INBANDDISCONNECT
-
diff --git a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.8-gsm-pic.patch b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.8-gsm-pic.patch
deleted file mode 100644
index bef9ed71bf1e..000000000000
--- a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.8-gsm-pic.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff -uNr asterisk-1.6.2.8.ORIG/codecs/gsm/Makefile asterisk-1.6.2.8/codecs/gsm/Makefile
---- asterisk-1.6.2.8.ORIG/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100
-+++ asterisk-1.6.2.8/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100
-@@ -37,28 +37,6 @@
- ######### ppro's, etc, as well as the AMD K6 and K7. The compile will
- ######### probably require gcc.
-
--ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
--ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips))
--ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
--ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
--# Wow... Snow Leopard is BROKEN!
--OPTIMIZE+=-mtune=native
--else
--OPTIMIZE+=-march=$(PROC)
--endif
--endif
--endif
--endif
--
--#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)
--OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3
--endif
--
- PG =
- #PG = -g -pg
- ######### Profiling flags. If you don't know what that means, leave it blank.
-@@ -213,12 +191,10 @@
- # XXX Keep a space after each findstring argument
- # XXX should merge with GSM_OBJECTS
- ifeq ($(OSARCH),linux-gnu)
--ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 ))
--ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel mips ))
-+ifneq ($(K6OPT),)
- GSM_SOURCES+= $(SRC)/k6opt.s
- endif
- endif
--endif
-
- TOAST_SOURCES = $(SRC)/toast.c \
- $(SRC)/toast_lin.c \
-@@ -265,12 +241,10 @@
- $(SRC)/table.o
-
- ifeq ($(OSARCH),linux-gnu)
--ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
--ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel mips ))
-+ifneq ($(K6OPT),)
- GSM_OBJECTS+= $(SRC)/k6opt.o
- endif
- endif
--endif
-
- TOAST_OBJECTS = $(SRC)/toast.o \
- $(SRC)/toast_lin.o \