summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2010-06-25 15:14:09 +0000
committerTony Vroon <chainsaw@gentoo.org>2010-06-25 15:14:09 +0000
commitea16bd2f51516a303278a45a66e2f495d8b1a81a (patch)
tree481e2d0bbd8ad15098a427ab2d5c7a3ee5472d82 /net-misc
parentStable on amd64 wrt bug #325507 (diff)
downloadgentoo-2-ea16bd2f51516a303278a45a66e2f495d8b1a81a.tar.gz
gentoo-2-ea16bd2f51516a303278a45a66e2f495d8b1a81a.tar.bz2
gentoo-2-ea16bd2f51516a303278a45a66e2f495d8b1a81a.zip
New upstream version. A DTMF crasher has been fixed, several off-by-one errors have been addressed. Also the build system has seen some improvements. With thanks to Oliver Jacksch for a rebased patch, closes bug #324657. Research by Jaco Kroon closes bug #325231 by Kerin Millar. Cleaned up old ebuilds.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/asterisk/ChangeLog17
-rw-r--r--net-misc/asterisk/asterisk-1.6.1.18.ebuild412
-rw-r--r--net-misc/asterisk/asterisk-1.6.1.19.ebuild318
-rw-r--r--net-misc/asterisk/asterisk-1.6.1.20.ebuild4
-rw-r--r--net-misc/asterisk/asterisk-1.6.2.6.ebuild350
-rw-r--r--net-misc/asterisk/asterisk-1.6.2.8.ebuild4
-rw-r--r--net-misc/asterisk/asterisk-1.6.2.9.ebuild (renamed from net-misc/asterisk/asterisk-1.6.2.7.ebuild)21
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk-1.6.2.9-gsm-pic.patch64
8 files changed, 95 insertions, 1095 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index 8c9c2e07acd9..c03583896724 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,19 @@
-# ChangeLog for net-misc/asterisk
+\# 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.260 2010/06/17 20:56:41 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.261 2010/06/25 15:14:09 chainsaw Exp $
+
+*asterisk-1.6.2.9 (25 Jun 2010)
+
+ 25 Jun 2010; Tony Vroon <chainsaw@gentoo.org> -asterisk-1.6.1.18.ebuild,
+ -asterisk-1.6.1.19.ebuild, asterisk-1.6.1.20.ebuild,
+ -asterisk-1.6.2.6.ebuild, -asterisk-1.6.2.7.ebuild,
+ asterisk-1.6.2.8.ebuild, +asterisk-1.6.2.9.ebuild,
+ +files/1.6.2/asterisk-1.6.2.9-gsm-pic.patch:
+ New upstream version. A DTMF crasher has been fixed, several off-by-one
+ errors have been addressed. Also the build system has seen some
+ improvements. With thanks to Oliver Jacksch for a rebased patch, closes
+ bug #324657. Research by Jaco Kroon closes bug #325231 by Kerin Millar.
+ Cleaned up old ebuilds.
17 Jun 2010; Patrick Lauer <patrick@gentoo.org> asterisk-1.2.37.ebuild,
asterisk-1.2.40.ebuild, asterisk-1.6.1.18.ebuild,
diff --git a/net-misc/asterisk/asterisk-1.6.1.18.ebuild b/net-misc/asterisk/asterisk-1.6.1.18.ebuild
deleted file mode 100644
index 0ae811143b4c..000000000000
--- a/net-misc/asterisk/asterisk-1.6.1.18.ebuild
+++ /dev/null
@@ -1,412 +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.18.ebuild,v 1.2 2010/06/17 20:56:41 patrick Exp $
-
-EAPI=1
-inherit eutils autotools
-
-MY_P="${PN}-${PV/_/-}"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.digium.com/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 nosamples odbc 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 )
- odbc? ( dev-db/unixODBC )
- 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}"
-
-#
-# shortcuts
-#
-
-# update from asterisk-1.0.x
-is_ast10update() {
- return $(has_version "=net-misc/asterisk-1.0*")
-}
-
-# update from asterisk-1.2.x
-is_ast12update() {
- return $(has_version "=net-misc/asterisk-1.2*")
-}
-
-# update from asterisk 1.4.x
-is_ast14update() {
- return $(has_version "=net-misc/asterisk-1.4*")
-}
-
-# update in the asterisk-1.6.x line
-is_astupdate() {
- if ! is_ast10update && ! is_ast12update && !is_ast14update; then
- return $(has_version "<net-misc/asterisk-${PV}")
- fi
- return 0
-}
-
-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() {
- local checkfailed=0 waitaftermsg=0
-
- if is_ast12update ; then
- ewarn "Please note that the configuration style (particularly the dial plan) has changed significantly."
- ewarn "sip.conf: insecure=very -> insecure=port,invite"
- ewarn "asterisk.conf: please familiarise yourself with [compat]"
- ewarn "extensions.conf: use comma instead of pipe as a separator"
- ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 after the installation!"
- echo
- waitaftermsg=1
- fi
-
- if [[ $waitaftermsg -eq 1 ]]; then
- einfo "Press Ctrl+C to abort"
- echo
- ebeep 10
- fi
-
- #
- # Regular checks
- #
- einfo "Running some pre-flight checks..."
- echo
-
- 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
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- #
- # put pid file(s) into /var/run/asterisk
- #
- epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-var_rundir.patch || die "patch failed"
-
- #
- # fix gsm codec cflags (e.g. i586 core epias) and disable
- # assembler optimizations
- #
- epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-gsm-pic.patch || die "patch failed"
-
- #
- # add missing LIBS for uclibc
- #
- epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-uclibc.patch || die "patch failed"
-
- #
- # make sure FXO ports are usable immediately, without requiring an inbound call first
- # https://issues.asterisk.org/view.php?id=14577
- #
- epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch || die "patch failed"
-
- #
- # add special playback with fax detection
- # Code by NewMan telecom, patch scavenged
- # by Cory Coager
- # http://bugs.gentoo.org/show_bug.cgi?id=298328
- #
- epatch "${FILESDIR}"/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch
-
- AT_M4DIR=autoconf eautoreconf
-
- # 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_compile() {
- #
- # start with 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 odbc) \
- $(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
-
- ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
-}
-
-src_install() {
- # setup directory structure
- #
- mkdir -p "${D}"usr/lib/pkgconfig
-
- emake DESTDIR="${D}" install || die "emake install failed"
- emake DESTDIR="${D}" samples || die "emake samples failed"
-
- # remove installed sample files if nosamples flag is set
- if use nosamples; then
- 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/*
- else
- einfo "Sample files have been installed"
- fi
- rm -rf "${D}"var/spool/asterisk/voicemail/default
-
- # move sample configuration files to doc directory
- if is_ast10update || is_ast12update || is_ast14update; then
- einfo "Updating from old (pre-1.6) asterisk version, new configuration files have been installed"
- einfo "into "${ROOT}"etc/asterisk, use etc-update or dispatch-conf to update them"
- fi
-
- einfo "Configuration samples have been moved to: "${ROOT}"/usr/share/doc/${PF}/conf"
- insinto /usr/share/doc/${PF}/conf
- doins "${D}"etc/asterisk/*.conf*
-
- cd "${D}"
- for conffile in etc/asterisk/*.*
- do
- fowners asterisk:asterisk $conffile
- fperms 0660 $conffile
- done
- cd "${S}"
-
- # 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
- einfo "keepsrc useflag enabled, copying source..."
- dodir /usr/src
-
- cp -dPR "${S}" "${D}"/usr/src/${PF} || die "copying source tree failed"
-
- ebegin "running make clean..."
- emake -C "${D}"/usr/src/${PF} clean >/dev/null || die "make clean failed"
- eend $?
-
- einfo "Source files have been saved to "${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
-
- #
- # Warning about 1.x -> 1.6 changes...
- #
- if is_ast10update || is_ast12update || is_ast14update; then
- ewarn ""
- ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 before continuing"
- ewarn ""
- fi
-}
-
-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.1.19.ebuild b/net-misc/asterisk/asterisk-1.6.1.19.ebuild
deleted file mode 100644
index 017342f843cc..000000000000
--- a/net-misc/asterisk/asterisk-1.6.1.19.ebuild
+++ /dev/null
@@ -1,318 +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.19.ebuild,v 1.2 2010/06/17 20:56:41 patrick Exp $
-
-EAPI=3
-inherit autotools base eutils linux-info
-
-MY_P="${PN}-${PV/_/-}"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.digium.com/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/${P}-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.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/lib/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.1.20.ebuild b/net-misc/asterisk/asterisk-1.6.1.20.ebuild
index f11f40e146f2..0df1b85084ce 100644
--- a/net-misc/asterisk/asterisk-1.6.1.20.ebuild
+++ b/net-misc/asterisk/asterisk-1.6.1.20.ebuild
@@ -1,6 +1,6 @@
# 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.2 2010/06/17 20:56:41 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.1.20.ebuild,v 1.3 2010/06/25 15:14:09 chainsaw Exp $
EAPI=3
inherit autotools base eutils linux-info
@@ -9,7 +9,7 @@ MY_P="${PN}-${PV/_/-}"
DESCRIPTION="Asterisk: A Modular Open Source PBX System"
HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.digium.com/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
diff --git a/net-misc/asterisk/asterisk-1.6.2.6.ebuild b/net-misc/asterisk/asterisk-1.6.2.6.ebuild
deleted file mode 100644
index de5319b4d9ec..000000000000
--- a/net-misc/asterisk/asterisk-1.6.2.6.ebuild
+++ /dev/null
@@ -1,350 +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.6.ebuild,v 1.2 2010/06/17 20:56:41 patrick Exp $
-
-EAPI=1
-inherit eutils autotools linux-info
-
-MY_P="${PN}-${PV/_/-}"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.digium.com/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 nosamples 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}"
-
-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
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- #
- # fix gsm codec cflags (e.g. i586 core epias) and disable
- # assembler optimizations
- #
- epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-gsm-pic.patch || die "patch failed"
-
- #
- # add missing LIBS for uclibc
- #
- epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-uclibc.patch || die "patch failed"
-
- #
- # make sure FXO ports are usable immediately, without requiring an inbound call first
- # https://issues.asterisk.org/view.php?id=14577
- #
- epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch || die "patch failed"
-
- #
- # add special playback with fax detection
- # Code by NewMan telecom, patch scavenged
- # by Cory Coager
- # http://bugs.gentoo.org/show_bug.cgi?id=298328
- #
- epatch "${FILESDIR}"/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch
-
- AT_M4DIR=autoconf eautoreconf
-
- # 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_compile() {
- #
- # start with 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
-
- ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
-}
-
-src_install() {
- # setup directory structure
- #
- mkdir -p "${D}"usr/lib/pkgconfig
-
- emake DESTDIR="${D}" install || die "emake install failed"
- emake DESTDIR="${D}" samples || die "emake samples failed"
-
- # remove installed sample files if nosamples flag is set
- if use nosamples; then
- 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/*
- else
- einfo "Sample files have been installed"
- fi
- rm -rf "${D}"var/spool/asterisk/voicemail/default
-
- einfo "Configuration samples have been moved to: "${ROOT}"/usr/share/doc/${PF}/conf"
- insinto /usr/share/doc/${PF}/conf
- doins "${D}"etc/asterisk/*.conf*
-
- cd "${D}"
- for conffile in etc/asterisk/*.*
- do
- fowners asterisk:asterisk $conffile
- fperms 0660 $conffile
- done
- cd "${S}"
-
- # 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.8.ebuild b/net-misc/asterisk/asterisk-1.6.2.8.ebuild
index 9f2a837e6894..4e308cce0569 100644
--- a/net-misc/asterisk/asterisk-1.6.2.8.ebuild
+++ b/net-misc/asterisk/asterisk-1.6.2.8.ebuild
@@ -1,6 +1,6 @@
# 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.2 2010/06/17 20:56:41 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.8.ebuild,v 1.3 2010/06/25 15:14:09 chainsaw Exp $
EAPI=3
inherit autotools base eutils linux-info
@@ -9,7 +9,7 @@ MY_P="${PN}-${PV/_/-}"
DESCRIPTION="Asterisk: A Modular Open Source PBX System"
HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.digium.com/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
diff --git a/net-misc/asterisk/asterisk-1.6.2.7.ebuild b/net-misc/asterisk/asterisk-1.6.2.9.ebuild
index 3e2e8eca5705..c3f5c8706ea1 100644
--- a/net-misc/asterisk/asterisk-1.6.2.7.ebuild
+++ b/net-misc/asterisk/asterisk-1.6.2.9.ebuild
@@ -1,6 +1,6 @@
# 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.7.ebuild,v 1.2 2010/06/17 20:56:41 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.9.ebuild,v 1.1 2010/06/25 15:14:09 chainsaw Exp $
EAPI=3
inherit autotools base eutils linux-info
@@ -9,12 +9,12 @@ MY_P="${PN}-${PV/_/-}"
DESCRIPTION="Asterisk: A Modular Open Source PBX System"
HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://downloads.digium.com/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
+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"
+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
@@ -28,6 +28,7 @@ RDEPEND="sys-libs/ncurses
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 )
@@ -48,7 +49,8 @@ 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/${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"
@@ -74,9 +76,9 @@ pkg_setup() {
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."
+ 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
@@ -128,6 +130,7 @@ src_configure() {
$(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) \
@@ -213,8 +216,8 @@ src_install() {
emake DESTDIR="${D}" samples || die "emake samples failed"
for conffile in "${D}"etc/asterisk/*.*
do
- fowners asterisk:asterisk $conffile
- fperms 0660 $conffile
+ chown asterisk:asterisk $conffile
+ chmod 0660 $conffile
done
einfo "Sample files have been installed"
else
diff --git a/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.9-gsm-pic.patch b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.9-gsm-pic.patch
new file mode 100644
index 000000000000..df85382f0df0
--- /dev/null
+++ b/net-misc/asterisk/files/1.6.2/asterisk-1.6.2.9-gsm-pic.patch
@@ -0,0 +1,64 @@
+diff -uNr asterisk-1.6.2.9.ORIG/codecs/gsm/Makefile asterisk-1.6.2.9/codecs/gsm/Makefile
+--- asterisk-1.6.2.9.ORIG/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100
++++ asterisk-1.6.2.9/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100
+@@ -37,30 +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 (,$(strip $(findstring $(PROC) ,"x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips ")))
+- ifeq (,$(strip $(findstring $(shell uname -m) ,"ppc ppc64 alpha armv4l s390 ")))
+- OPTIMIZE+=-march=$(PROC)
+- endif
+- endif
+-else
+- ifneq (,$(findstring $(OSARCH),Darwin))
+- ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
+- # Snow Leopard reports i386, even though it's really x86_64
+- OPTIMIZE+=-mtune=native
+- 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.
+@@ -215,11 +191,9 @@
+ # 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 ))
+-GSM_SOURCES+= $(SRC)/k6opt.s
+-endif
+-endif
++ ifneq ($(K6OPT),)
++ GSM_SOURCES+= $(SRC)/k6opt.s
++ endif
+ endif
+
+ TOAST_SOURCES = $(SRC)/toast.c \
+@@ -267,11 +241,9 @@
+ $(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 ))
+-GSM_OBJECTS+= $(SRC)/k6opt.o
+-endif
+-endif
++ ifneq ($(K6OPT),)
++ GSM_OBJECTS+= $(SRC)/k6opt.o
++ endif
+ endif
+
+ TOAST_OBJECTS = $(SRC)/toast.o \