Removing vulnerable ebuilds for CVE-2010-1224 / AST-2010-003 (Remote host access...
authorTony Vroon <chainsaw@gentoo.org>
Tue, 6 Apr 2010 08:14:37 +0000 (08:14 +0000)
committerTony Vroon <chainsaw@gentoo.org>
Tue, 6 Apr 2010 08:14:37 +0000 (08:14 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

net-misc/asterisk/ChangeLog
net-misc/asterisk/Manifest
net-misc/asterisk/asterisk-1.6.1.17.ebuild [deleted file]
net-misc/asterisk/asterisk-1.6.2.5.ebuild [deleted file]

index e57735c4e5d7d90501676944fa3b2deeaee897ec..86f486635929f398878ceb3f727a4b0827d41e49 100644 (file)
@@ -1,6 +1,12 @@
 # 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.253 2010/03/16 12:05:23 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.254 2010/04/06 08:14:37 chainsaw Exp $
+
+  06 Apr 2010; <chainsaw@gentoo.org> -asterisk-1.6.1.17.ebuild,
+  -asterisk-1.6.2.5.ebuild:
+  Removing vulnerable ebuilds for CVE-2010-1224 / AST-2010-003 (Remote host
+  access control bypass) as requested by Stefan "Craig" Behte
+  <craig@gentoo.org> in security bug #313341.
 
 *asterisk-1.6.1.18 (16 Mar 2010)
 
index e690af002db6dde9eb9a3ccb85d15931aeeb4a35..5ab42781e9b429eb55e8411012e08726a45fe9a7 100644 (file)
@@ -37,23 +37,19 @@ DIST asterisk-1.2.27-patches-1.0.tar.bz2 6653 RMD160 18f1d7fc4497466050ed4f517ff
 DIST asterisk-1.2.36.tar.gz 29897926 RMD160 47b8c0e58c43cac6aa415482182aea15b1489ccc SHA1 b6f60404ba0ca802cfa5cd43685a36b467441c5c SHA256 69f48a0e49f3a37196b65f11e8babf5c28e33700903b9f304e984def6c35dbf0
 DIST asterisk-1.2.37.tar.gz 29899629 RMD160 1de7ff96d3b1fd8d89f3ef7b3bb9e35bedccfb33 SHA1 c9a3c4684e021f62b4d19f6e0c8fc11f64db19d6 SHA256 9f3ec67efe0e4d45434621cd358e8e7d64e1b05df04d66e2390c9420acd2aeaa
 DIST asterisk-1.2.40.tar.gz 29903514 RMD160 dc3da60756c82c98a055e49b068eb6760a01948e SHA1 4b4b794e858a3436bc35bdd2f4edf824c2885b68 SHA256 61dc745b12f6dc2998404e77747a964db56df8efae84a666c4ccddf016c9c06d
-DIST asterisk-1.6.1.17.tar.gz 23519546 RMD160 86c54a56b9d5c7565c9d3d54c0d6cd043e9decd3 SHA1 7af18a384f7832d8818e0548263681b3e839447f SHA256 44a597cc5e3b5d1455cc0f957ac9519990b71360621d9580386b8316c4712fcf
 DIST asterisk-1.6.1.18.tar.gz 23585542 RMD160 ca6647cce5a176526ba1cb9dcb0e1e227986b268 SHA1 99871bc2257185437c22b7f0e44a09c356ffe027 SHA256 f3dab39190c7c938099e8961eb9917d5cf15570180dc0e613e7bb2562a621e5b
-DIST asterisk-1.6.2.5.tar.gz 23186361 RMD160 b1eb6f20d965480f6895b92cde56d4eb25b8a65a SHA1 16fad82419469db2b059478e75bb0cb3c5d38892 SHA256 fbce90bcff67ab9d70931083e58642bf63164c9ed392b0b7fccf5c50d6e529be
 DIST asterisk-1.6.2.6.tar.gz 23265995 RMD160 35c724b968a00abdc5bbb07e63ec9004872cdef8 SHA1 93c25c30fbe2003955362d9ce173367ecc6e5b49 SHA256 2c724a53c40d12fc37100c1daa8312fd99eee26920907e3094c7c2b7d0e7eb61
 EBUILD asterisk-1.2.36.ebuild 10640 RMD160 de9118d48d7122200847783aec84e89724f33475 SHA1 8839099437bb0fa20ab7ba4c4aabeef33be353d5 SHA256 73421c18cf2aec1412ef1f86cb6a810765cf7c78fdb056b2e84224430368a1ca
 EBUILD asterisk-1.2.37.ebuild 10640 RMD160 82f1d14082b607402146bd8f7950ea32ee2558f3 SHA1 5718e0411fff8bc14c4c57562a9df281c33abdc5 SHA256 2f2290922b09f9b71b06cb73e99fc7916b4a994960375e0e48b6bb39fd802e0c
 EBUILD asterisk-1.2.40.ebuild 10647 RMD160 7b267ebc801d87ad4a1433454cf64b36227647b4 SHA1 949f14d1e7fce52b8a09af12aa5283aafe479450 SHA256 2d96cf3daddf083c3094780a97e6699869e7ad9fc8c82f1a4fb17cee520b96c6
-EBUILD asterisk-1.6.1.17.ebuild 11238 RMD160 4717b43691d51fda47c678e322b98b070f195511 SHA1 8904205ded4c2f85955a2156daf8b1c75262af77 SHA256 047a4b7efd2aeef3e4cdcd9c2eabbb5f079b0e8f739b3eb213257fa4cf723f20
 EBUILD asterisk-1.6.1.18.ebuild 10481 RMD160 67b58c7c3cef4861bb0e1b9664b77a35e28a9fb4 SHA1 12c06fec5595d4d14783ec47dce166c4a97d385f SHA256 80b633d3361a2cb00b3dd2849d15f41f8e9fd5c0c5ebaa579745ffff3ed9fb52
-EBUILD asterisk-1.6.2.5.ebuild 9968 RMD160 a7c595cc21212cc579ebbb6822ca20b6c24cc565 SHA1 90a2298221b7f508392fb5f06001c8f59fa3b9e1 SHA256 10efdebb3c610f2e149f9972e20c25ed755590a6befe26fecef5923f9fce498e
 EBUILD asterisk-1.6.2.6.ebuild 9213 RMD160 e2b7a225465c40aa6918c49ec70cbeace348c0cf SHA1 05779eb142f09aad35f246a3f5476ad06bf5d4fe SHA256 e7f7581cfc7fe4bd1093f2372e3689a96d7db1b82d6a9d0c44a769e4a1a62cdf
-MISC ChangeLog 56542 RMD160 c267a69b35edb3acddd88c7798f4b62c02b3f7fd SHA1 34965dc54de9cccff7801ca21d5e74367b8fd3d1 SHA256 678fdb56bee7d47b0a3a60840156df39dbf05487a35d518ec998664b92caa08b
+MISC ChangeLog 56819 RMD160 d185c3b53aaf2a7b5643fcaf529561009a2de9b1 SHA1 fb58b2a5e2ac698a811735bc3e4c11aa9648388c SHA256 ac21d33b872e4ee1843e859620fac53f1b9b6dd33f2f62d03954eba0d6c1da9b
 MISC metadata.xml 1103 RMD160 9be6c713684efa268e58cfc111fae4716e97f9dd SHA1 5af1f100c97f1bca1834867e06c3fb9111ed1fde SHA256 a83ca9d4cfd8da10b8dbb9583e1b6fa5fc0f30968a0681e4bc931673a00e1c99
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
-iEYEARECAAYFAkufdAgACgkQp5vW4rUFj5q+NwCeOcM0JctEo15JuRci82joqNDs
-AGkAn2mz4v/4X53j+y/wfrKke8n+/Z8B
-=WkBr
+iEYEARECAAYFAku67ewACgkQp5vW4rUFj5p/tQCgsNctnYFkts1ATgMesDD+HjGi
+F5YAn3C1L65Vk8lc7mv06zQeeiymxPFj
+=+FQP
 -----END PGP SIGNATURE-----
diff --git a/net-misc/asterisk/asterisk-1.6.1.17.ebuild b/net-misc/asterisk/asterisk-1.6.1.17.ebuild
deleted file mode 100644 (file)
index 5a54623..0000000
+++ /dev/null
@@ -1,432 +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.17.ebuild,v 1.1 2010/03/01 22:07:46 chainsaw 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? ( virtual/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"
-
-       #
-       # do not ignore alarm-cleared event while V23 caller ID detection is in progress
-       # otherwise automated British Telecom line test causes permanent red alarm
-       # https://issues.asterisk.org/view.php?id=14163
-       #
-       epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.6-bt-line-test.patch || die "patch failed"
-
-       #
-       # sprinkle some plus signs in strategic locations for maximum parallel make happiness
-       # https://issues.asterisk.org/view.php?id=16489
-       #
-       epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.14-parallel-make.patch || die "patch failed"
-
-       #
-       # do not segfault when asked to restart gracefully
-       # https://issues.asterisk.org/view.php?id=16062
-       # https://issues.asterisk.org/view.php?id=16470
-       #
-       epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.14-graceful-restart-segfault.patch
-
-       #
-       # 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.2.5.ebuild b/net-misc/asterisk/asterisk-1.6.2.5.ebuild
deleted file mode 100644 (file)
index d6d7aab..0000000
+++ /dev/null
@@ -1,370 +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.5.ebuild,v 1.1 2010/03/01 22:07:46 chainsaw 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? ( virtual/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"
-
-       #
-       # do not ignore alarm-cleared event while V23 caller ID detection is in progress
-       # otherwise automated British Telecom line test causes permanent red alarm
-       # https://issues.asterisk.org/view.php?id=14163
-       #
-       epatch "${FILESDIR}"/1.6.2/${PN}-1.6.2.0-bt-line-test.patch || die "patch failed"
-
-       #
-       # sprinkle some plus signs in strategic locations for maximum parallel make happiness
-       # https://issues.asterisk.org/view.php?id=16489
-       #
-       epatch "${FILESDIR}"/1.6.2/${PN}-1.6.2.2-parallel-make.patch || die "patch failed"
-
-       #
-       # do not segfault when asked to restart gracefully
-       # https://issues.asterisk.org/view.php?id=16062
-       # https://issues.asterisk.org/view.php?id=16470
-       #
-       epatch "${FILESDIR}"/1.6.2/${PN}-1.6.2.2-graceful-restart-segfault.patch
-
-       #
-       # 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
-}