diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2009-03-10 23:33:28 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2009-03-10 23:33:28 +0000 |
commit | 605195de6a1722afdbf8acfbd3140cd3becb35d5 (patch) | |
tree | 545fad8b8bc28135de6e4725b22ffc465d46025f /net-misc | |
parent | Update cmake-utils.eclass new targest, etc. see mail to dev for moar. (diff) | |
download | historical-605195de6a1722afdbf8acfbd3140cd3becb35d5.tar.gz historical-605195de6a1722afdbf8acfbd3140cd3becb35d5.tar.bz2 historical-605195de6a1722afdbf8acfbd3140cd3becb35d5.zip |
Version bump, with a warm thank you to all VoIP overlay contributors, including but not limited to Rambaldi & Volkmar. This is 1.6.0.6 from upstream including the post-release upstream fixes for Digium bugs #14480, #14516, #14620 & #14626. Also thanks to Digium developer Qwell for SVN revision 180946 containing autoconf fixes. Closes bug #215593 by Natanael Copa.
Package-Manager: portage-2.1.6.7/cvs/Linux x86_64
Diffstat (limited to 'net-misc')
16 files changed, 1298 insertions, 7 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog index f92b558b5021..c95c51467705 100644 --- a/net-misc/asterisk/ChangeLog +++ b/net-misc/asterisk/ChangeLog @@ -1,6 +1,27 @@ # ChangeLog for net-misc/asterisk # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.182 2009/02/25 23:17:19 rajiv Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.183 2009/03/10 23:33:28 chainsaw Exp $ + +*asterisk-1.6.0.6 (10 Mar 2009) + + 10 Mar 2009; <chainsaw@gentoo.org> + +files/1.6.0/asterisk-1.6.0.6-autoconf-263.patch, + +files/1.6.0/asterisk-1.6.0.6-dahdiras.patch, + +files/1.6.0/asterisk-1.6.0.6-imap-kerberos.patch, + +files/1.6.0/asterisk-1.6.0.6-parallelmake.patch, + +files/1.6.0/asterisk-1.6.0-gsm-pic.patch, +files/1.6.0/asterisk.confd, + +files/1.6.0/asterisk-1.6.0.6-sip-use-specified-port.patch, + +files/1.6.0/asterisk-1.6.0-uclibc.patch, + +files/1.6.0/asterisk-1.6.0-var_rundir.patch, +files/1.6.0/asterisk.rc6, + +files/1.6.0/asterisk-1.6.0.6-socket-details.patch, + +files/1.6.0/asterisk-1.6.0.6-spandsp-api-change.patch, metadata.xml, + +asterisk-1.6.0.6.ebuild: + Version bump, with a warm thank you to all VoIP overlay contributors, + including but not limited to Rambaldi & Volkmar. This is 1.6.0.6 from + upstream including the post-release upstream fixes for Digium bugs #14480, + #14516, #14620 & #14626. Also thanks to Digium developer Qwell for SVN + revision 180946 containing autoconf fixes. Closes bug #215593 by Natanael + Copa. 25 Feb 2009; Rajiv Aaron Manglani <rajiv@gentoo.org> -files/1.2.0/asterisk-1.2.0_beta-ukcid.patch, diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest index b3aa091232ae..6240066b6749 100644 --- a/net-misc/asterisk/Manifest +++ b/net-misc/asterisk/Manifest @@ -1,13 +1,37 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX 1.0.0/asterisk-1.0.5-uclibc-dns.diff 304 RMD160 6d58a0fdad04f5105c1b8f8bb3e2058b4f97f12f SHA1 5f7819a1e5f5b8f035146d5506bab83f4ecb6ae0 SHA256 e4de36e528b7d1a7941689d530d93f1ffd41a2f863a856e612e3637f78ea4890 AUX 1.2.0/asterisk-1.2.1-uclibc-getloadavg.diff 317 RMD160 f598d94a52cec83fefdafdce0694049c657e09e0 SHA1 fc0f4d990e386d39d43bac073f353421063186c9 SHA256 61daa70727418dbaf232fc5d1eaddd20a8505b943b8fb724a1b63170edfe88cc AUX 1.2.0/asterisk-1.2.21.1-h323-dumb-makefile.diff 1098 RMD160 c39cee5a6f420e6e63e30ac5e83aa9b78c1b12c8 SHA1 93087ecdcde11bd983d25acaac3723450abbc111 SHA256 86d0c8cd754754916c45d77d9c745d1688b3b7b54181ecb1d42a1934bdea7deb AUX 1.2.0/asterisk-updater 3127 RMD160 41ea584081c3e565205e59771e24a8715d7e2042 SHA1 1c11d9ce286972b6f98c15a16cbb7f1c943414eb SHA256 93e6862361a320c7f7f30525b4209366190dd2bc21eedbd3654ffb4b991af5fd AUX 1.2.0/asterisk.confd 2200 RMD160 f26ac9b18e8c1db86c54839d9b4a816cfe45c61f SHA1 2baee139893fd9c413d140db843831da1917f05f SHA256 b94a59f36a46362622acd2ccc811e1e9dd0abf928104285c7098d7c17a324379 AUX 1.2.0/asterisk.rc6 5891 RMD160 d14da5d703cdd9bedf9986e0e49a93d8031876ee SHA1 3e28003ecd2d0659266644bffe463fd25efddbcc SHA256 d2bbd0e335f7f2f399780778501df3fd2026ba27dfe48db3ab282430fb215531 +AUX 1.6.0/asterisk-1.6.0-gsm-pic.patch 1990 RMD160 6e17a76a70938f8d371b7e6efe44d70d2b622cd3 SHA1 c5a3c2ae1af31e60a45a6069c00f432dcafaf1a7 SHA256 c0b774b95f785fb35e1cbc44945fc4debeeb3e338ec49501a7ac64a87307e4df +AUX 1.6.0/asterisk-1.6.0-uclibc.patch 373 RMD160 08f18dd2af3736497995ebcbea84939ae4c4cc98 SHA1 b10884d4b9123800f62b4aabac5a93b1a110e3da SHA256 b6fe54def0ab3f90058c2ed7bd288dd21c96aaf88b9028f12d223fb31d7e41c5 +AUX 1.6.0/asterisk-1.6.0-var_rundir.patch 441 RMD160 55869a82a01be38e80da9a31faac6d2d03f0fc58 SHA1 5bf2a8ed9778623f611330fcc4ea75c50f642680 SHA256 f75156feb6a6e421fc83e2d518b4b9204e4ae11e802440576a54de226ffd8064 +AUX 1.6.0/asterisk-1.6.0.6-autoconf-263.patch 2705 RMD160 24ccb54c07b427ffe565b148de4b15b6f3dfcb48 SHA1 f1a948cb69df672ca86784359000627d7e66075e SHA256 3a597e842d566442f00ad70ee3b8871ac623e3b15760ad89cb5810202d856c83 +AUX 1.6.0/asterisk-1.6.0.6-dahdiras.patch 547 RMD160 16c7d69dbdf3d77f586d95644f720eb2ad151999 SHA1 8bcb90785d6e3d06ee45e462e5743bbb5d23f93b SHA256 5df7e262d9b000a1095819b4dce3c7ebda5b8ace70d716b0e383aa8b204ae9f6 +AUX 1.6.0/asterisk-1.6.0.6-imap-kerberos.patch 747 RMD160 eacde011d0037b2214819954e620d4904f851bdc SHA1 694058c71a566d0cf8c2ecfc2c28b6991c4697f0 SHA256 d61f31a8a0460a4c102c7c4dd14fcee5cae87dc7cdd68b6e50f42d05f927f580 +AUX 1.6.0/asterisk-1.6.0.6-parallelmake.patch 4952 RMD160 d57a16f8c9c783acf83c1ce2e436e73d4dd23166 SHA1 60f09e30f837ddaa9bafde69863fb707b33474d8 SHA256 1d80039098c5f9746ac35ca31f3bf7697cc7e5505428e1457fbe922fd6a1a75f +AUX 1.6.0/asterisk-1.6.0.6-sip-use-specified-port.patch 391 RMD160 191be72373a53ac32932d09bb78486d8634d0a9c SHA1 b483a88251f464464e9f54382cfda759b6c6c760 SHA256 cb1d7a923ce6d719e44cc75c9ba91f6975f872da731fc701bd000c628d604f65 +AUX 1.6.0/asterisk-1.6.0.6-socket-details.patch 2636 RMD160 73414fda459b0dba8e01bc22e03887db8edc8d70 SHA1 ab9c6bed2782da9d8b3a29f56483749b990ecdb4 SHA256 30f70998221b452a1a2d05b17641d9d3632de451b37019fa68783509015232cd +AUX 1.6.0/asterisk-1.6.0.6-spandsp-api-change.patch 1630 RMD160 3c297783f35251bb94f74d37e8471ad53056504d SHA1 def21b3058e65123964a14139eeb14e6be82b6b3 SHA256 0191f62b9995878749cd54dd91b3404d16a9ced1a5444991ea21e6f78c459c77 +AUX 1.6.0/asterisk.confd 2204 RMD160 31bceebfa535e97cb2634e313678cc42186d4750 SHA1 748c623cea238cd9b322672d5ebcfe214a4f0463 SHA256 daec84c58e0ef6cbd71a6fc62cb83129b1bcffdfdd619ebbd62a642f0cd1eee7 +AUX 1.6.0/asterisk.rc6 5891 RMD160 55a2cd4c5d2e069c4cabb5e8864870467608197c SHA1 d8d2e39ed2aa658a008103dc9655255a78e5796c SHA256 d8dbe6d0d0cc8a17c641a02e248c77107d298684fe3bdbfd87324bbe26e35979 DIST asterisk-1.2.27-bristuff-0.3.0-PRE-1y-l.diff.bz2 97805 RMD160 825b89d1735e1901236d2a3abe621805050a9980 SHA1 2a9ba3ef98f403e25703110ac320c93d95fa9f00 SHA256 24967634e4a72c58ff6098f1b710e95f452cd16834f99be8bfcab220bb510e91 DIST asterisk-1.2.27-patches-1.0.tar.bz2 6653 RMD160 18f1d7fc4497466050ed4f517ff5732eb448ff2e SHA1 2aecd3e91cde38dbb0fd591e8a49db221f44b94e SHA256 a4da0570fca2df3c508f072be62722879956fe8c454027fbb8dafb7a6095384c DIST asterisk-1.2.27.tar.gz 10645295 RMD160 5a6fedd420ee36c8f7d174352c3f09db9bc34a42 SHA1 e20659e4d637d740fd45e18d363189ffff431bf4 SHA256 2407996df3487060b9db1a4ca73f405b633a802ba9c1454f7f3ccaaa856971e6 +DIST asterisk-1.6.0.6.tar.gz 13415949 RMD160 1e1ad871b442f6f053c2fae6e2981de8f46e9ecb SHA1 8869dc4301de67bdabe529d84a1f98219a0500d2 SHA256 d2c940515d3c1ff2dcfcaa002767d99403796573abdd4baeac5d405a0ccbfd5b DIST bristuff-0.3.0-PRE-1y-l.tar.gz 300381 RMD160 808862df63edf85997753e1e857cc907c54f2b60 SHA1 cc5c050e68bfa48df5a86299819deefecfeaf67e SHA256 d083b6529e34c3192e91f34b68c542106ebaa5e3046d816061709297061d3576 EBUILD asterisk-1.2.27.ebuild 11498 RMD160 845ecc7fe8c35fe302247e74deea9d970ffcd232 SHA1 eed1e2234857bbae63dbd4039a303409512cf73c SHA256 ebb5f6ca7993d9a67191587b5bfa4103075cd6bd2afcf0adb258d7ff6709034a -MISC ChangeLog 36504 RMD160 35bd5ab8422a6e0d98825db482a1913b336a843e SHA1 0b164f3d1c4a4ba53675c93aeb620fff0b1c63ba SHA256 2718271813324d97b103c4dd68308d11025eeca4627ecdaf243b6b294c2c658e -MISC metadata.xml 792 RMD160 6a33ef53cce508d3ce4eca32d656b4a5f10211af SHA1 a35c85007f58b691b27422bc036051370bf1ef01 SHA256 a6e8a8c4d44cf59ce5551a0fb83989916fe871c596aad2b143588de0045a3c35 +EBUILD asterisk-1.6.0.6.ebuild 12798 RMD160 84207506db0cdf4a3fc6b6249cb3b7b1e538ff89 SHA1 6615912f182797e6a3fe89b31f924a56f53b1c70 SHA256 dedc459f7e69c754b7a34b99ea5c7674f674e9a9f865506af361a39df545c27a +MISC ChangeLog 37570 RMD160 188340dddd63ae531e752475f50709d77e0b52ff SHA1 938fee796b09f3c4505a727ceb8197d00768065e SHA256 011d021766f11f5546083417b3391a85d60e9107953ea8c1dba877f6b9b53afb +MISC metadata.xml 1248 RMD160 3dc4417124d1cbc49566798212a75464aa0eaa78 SHA1 bef2f778e9f63e295eeec8127d5e0bd5353efd61 SHA256 25bab15816cd5b3e69899b26a059c8f5abb098692dc16fd78280bf225cc245a3 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.10 (GNU/Linux) + +iEYEARECAAYFAkm2+GoACgkQp5vW4rUFj5pQLwCfc0ckLaZbkfVf02OSHJgREs1T +bLsAoIGDzJyJTXypV51pgv9DpRgdGmIA +=cMqs +-----END PGP SIGNATURE----- diff --git a/net-misc/asterisk/asterisk-1.6.0.6.ebuild b/net-misc/asterisk/asterisk-1.6.0.6.ebuild new file mode 100644 index 000000000000..d81b0949af76 --- /dev/null +++ b/net-misc/asterisk/asterisk-1.6.0.6.ebuild @@ -0,0 +1,482 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.0.6.ebuild,v 1.1 2009/03/10 23:33:28 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/asterisk/releases/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="alsa +caps curl dahdi debug freetds h323 iconv imap jabber ldap keepsrc misdn newt nosamples odbc oss postgres radius snmp span speex ssl sqlite static vorbis" + +RDEPEND="virtual/libc + 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 ) + h323? ( dev-libs/pwlib + net-libs/openh323 ) + iconv? ( virtual/libiconv ) + imap? ( virtual/imap-c-client ) + 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" + +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_ast10update || is_ast12update || is_ast14update ; then + ewarn " Asterisk UPGRADE Warning" + ewarn "" + ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 after the installation!" + ewarn "" + ewarn " Asterisk UPGRADE Warning" + 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 + + # imap requires ssl if imap-c-client was built with ssl, + # conversely if ssl and imap are both on then imap-c-client needs ssl + if use imap; then + if use ssl && ! built_with_use virtual/imap-c-client ssl; then + eerror + eerror "IMAP with SSL requested, but your IMAP C-Client libraries" + eerror "are built without SSL!" + eerror + die "Please recompile the IMAP C-Client libraries with SSL support enabled" + elif ! use ssl && built_with_use virtual/imap-c-client ssl; then + eerror + eerror "IMAP without SSL requested, but your IMAP C-Client" + eerror "libraries are built with SSL!" + eerror + die "Please recompile the IMAP C-Client libraries without SSL support enabled" + fi + fi + + 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}" + + # + # comment about h323 issues + # + if use h323 ; then + ewarn "h323 useflag: It is known that the h323 module doesn't compile + the \"normal\" way: For a workaround, asterisk will be built two times + without cleaning the build dir." + fi + + # + # put pid file(s) into /var/run/asterisk + # + epatch "${FILESDIR}"/1.6.0/${PN}-1.6.0-var_rundir.patch || die "patch failed" + + # + # fix gsm codec cflags (e.g. i586 core epias) and disable + # assembler optimizations + # + epatch "${FILESDIR}"/1.6.0/${PN}-1.6.0-gsm-pic.patch || die "patch failed" + + # + # add missing LIBS for uclibc + # + epatch "${FILESDIR}"/1.6.0/${PN}-1.6.0-uclibc.patch || die "patch failed" + + # + # do not ignore TCP transport setting for SIP, remove for 1.6.0.7 as it is upstream + # http://bugs.digium.com/view.php?id=14480 + # + epatch "${FILESDIR}"/1.6.0/${P}-socket-details.patch || die "patch failed" + + # + # allow dahdiras application to actually build, remove for 1.6.0.7 as it is upstream + # http://bugs.digium.com/view.php?id=14516 + # + epatch "${FILESDIR}"/1.6.0/${P}-dahdiras.patch || die "patch failed" + + # + # allow fax application to build against new spandsp, remove for 1.6.0.7 as it is upstream + # http://bugs.digium.com/view.php?id=14620 + # + epatch "${FILESDIR}"/1.6.0/${P}-spandsp-api-change.patch || die "patch failed" + + # + # do not ignore TCP port setting for SIP, remove for 1.6.0.7 as it is upstream + # http://bugs.digium.com/view.php?id=14626 + # + epatch "${FILESDIR}"/1.6.0/${P}-sip-use-specified-port.patch || die "patch failed" + + # + # try to tame the custom build system a little so make likes it better + # patch credit: Diego E. 'Flameeyes' Pettenò <flameeyes@entoo.org> + # + epatch "${FILESDIR}"/1.6.0/${P}-parallelmake.patch || die "patch failed" + + # + # the build system didn't handle >= autoconf-2.62 before + # from upstream SVN commit rev 180946 by qwell + # + epatch "${FILESDIR}"/1.6.0/${P}-autoconf-263.patch || die "patch failed" + + # + # link UW-IMAP with Kerberos5 if necessary + # + epatch "${FILESDIR}"/1.6.0/${P}-imap-kerberos.patch || die "patch failed" + + 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 h323 h323 "/usr/share/openh323") \ + $(use_with h323 pwlib "/usr/share/pwlib") \ + $(use_with iconv) \ + $(use_with imap) \ + $(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 + + # + # fasten your seatbelts (and start praying) + # + if use h323 ; then + # emake one time to get h323 to make.... yea not "clean" but works + emake + fi + + 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* + + # keep directories + keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} + keepdir /var/log/asterisk/{cdr-csv,cdr-custom} + + newinitd "${FILESDIR}"/1.6.0/asterisk.rc6 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() { + ebegin "Fixing up permissions" + chown -R asterisk:asterisk "${ROOT}"var/log/asterisk + chmod -R u=rwX,g=rX,o= "${ROOT}"var/log/asterisk + + for x in lib run spool; do + chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk + chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk + done + + chown asterisk:asterisk "${ROOT}"etc/asterisk/ + chown asterisk:asterisk "${ROOT}"etc/asterisk/*.adsi + chown asterisk:asterisk "${ROOT}"etc/asterisk/extensions.ael + chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/ + chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/*.adsi + chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/extensions.ael + eend $? + + # + # 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/files/1.6.0/asterisk-1.6.0-gsm-pic.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0-gsm-pic.patch new file mode 100644 index 000000000000..1acca70b3a47 --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0-gsm-pic.patch @@ -0,0 +1,54 @@ +--- 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.0/asterisk-1.6.0-uclibc.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0-uclibc.patch new file mode 100644 index 000000000000..36b49e60b19e --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0-uclibc.patch @@ -0,0 +1,13 @@ +--- Makefile.old 2008-03-22 11:51:39.000000000 +0100 ++++ Makefile 2008-03-22 11:51:49.000000000 +0100 +@@ -259,6 +259,10 @@ + ASTCFLAGS+=-pthread + endif + ++ifeq ($(OSARCH),linux-uclibc) ++ AST_LIBS+=-lpthread -ldl ++endif ++ + ifeq ($(OSARCH),SunOS) + ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 + endif diff --git a/net-misc/asterisk/files/1.6.0/asterisk-1.6.0-var_rundir.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0-var_rundir.patch new file mode 100644 index 000000000000..367dc7163f54 --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0-var_rundir.patch @@ -0,0 +1,11 @@ +--- 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.0/asterisk-1.6.0.6-autoconf-263.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-autoconf-263.patch new file mode 100644 index 000000000000..7e91cb12b1d4 --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-autoconf-263.patch @@ -0,0 +1,56 @@ +diff -uNr asterisk-1.6.0.6.ORIG/autoconf/ast_check_gnu_make.m4 asterisk-1.6.0.6/autoconf/ast_check_gnu_make.m4 +--- asterisk-1.6.0.6.ORIG/autoconf/ast_check_gnu_make.m4 2009-03-10 22:45:49.000000000 +0000 ++++ asterisk-1.6.0.6/autoconf/ast_check_gnu_make.m4 2009-03-10 22:43:07.000000000 +0000 +@@ -1,20 +1,20 @@ +-AC_DEFUN([AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE, +- GNU_MAKE='Not Found' ; +- GNU_MAKE_VERSION_MAJOR=0 ; +- GNU_MAKE_VERSION_MINOR=0 ; ++AC_DEFUN([AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK([for GNU make], [ac_cv_GNU_MAKE], ++ ac_cv_GNU_MAKE='Not Found' ; ++ ac_cv_GNU_MAKE_VERSION_MAJOR=0 ; ++ ac_cv_GNU_MAKE_VERSION_MINOR=0 ; + for a in make gmake gnumake ; do + if test -z "$a" ; then continue ; fi ; + if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then +- GNU_MAKE=$a ; +- GNU_MAKE_VERSION_MAJOR=`$GNU_MAKE --version | grep "GNU Make" | cut -f3 -d' ' | cut -f1 -d'.'` +- GNU_MAKE_VERSION_MINOR=`$GNU_MAKE --version | grep "GNU Make" | cut -f2 -d'.' | cut -c1-2` ++ ac_cv_GNU_MAKE=$a ; ++ ac_cv_GNU_MAKE_VERSION_MAJOR=`$ac_cv_GNU_MAKE --version | grep "GNU Make" | cut -f3 -d' ' | cut -f1 -d'.'` ++ ac_cv_GNU_MAKE_VERSION_MINOR=`$ac_cv_GNU_MAKE --version | grep "GNU Make" | cut -f2 -d'.' | cut -c1-2` + break; + fi + done ; + ) ; +-if test "x$GNU_MAKE" = "xNot Found" ; then ++if test "x$ac_cv_GNU_MAKE" = "xNot Found" ; then + AC_MSG_ERROR( *** Please install GNU make. It is required to build Asterisk!) + exit 1 + fi +-AC_SUBST([GNU_MAKE]) ++AC_SUBST([GNU_MAKE], [$ac_cv_GNU_MAKE]) + ]) +diff -uNr asterisk-1.6.0.6.ORIG/autoconf/ast_prog_sed.m4 asterisk-1.6.0.6/autoconf/ast_prog_sed.m4 +--- asterisk-1.6.0.6.ORIG/autoconf/ast_prog_sed.m4 2009-03-10 22:45:49.000000000 +0000 ++++ asterisk-1.6.0.6/autoconf/ast_prog_sed.m4 2009-03-10 22:44:17.000000000 +0000 +@@ -12,7 +12,7 @@ + done + echo "$ac_script" | sed 99q >conftest.sed + $as_unset ac_script || ac_script= +- _AC_PATH_PROG_FEATURE_CHECK(SED, [sed gsed], ++ ifdef([_AC_PATH_PROGS_FEATURE_CHECK], [_AC_PATH_PROGS_FEATURE_CHECK], [_AC_PATH_PROG_FEATURE_CHECK])(SED, [sed gsed], + [_AC_FEATURE_CHECK_LENGTH([ac_path_SED], [ac_cv_path_SED], + ["$ac_path_SED" -f conftest.sed])])]) + SED="$ac_cv_path_SED" +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 22:45:52.000000000 +0000 ++++ asterisk-1.6.0.6/configure.ac 2009-03-10 22:43:07.000000000 +0000 +@@ -23,7 +23,6 @@ + AC_COPYRIGHT("Asterisk") + AC_REVISION($Revision: 1.1 $) + +-AC_GNU_SOURCE + AC_USE_SYSTEM_EXTENSIONS # note- does not work on FreeBSD + + case "${host_os}" in diff --git a/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-dahdiras.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-dahdiras.patch new file mode 100644 index 000000000000..74f35394909c --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-dahdiras.patch @@ -0,0 +1,19 @@ +diff -uNr asterisk-1.6.0.6.ORIG/apps/app_dahdiras.c asterisk-1.6.0.6/apps/app_dahdiras.c +--- asterisk-1.6.0.6.ORIG/apps/app_dahdiras.c 2009-03-03 15:20:24.000000000 +0000 ++++ asterisk-1.6.0.6/apps/app_dahdiras.c 2009-02-24 18:05:03.000000000 +0000 +@@ -42,13 +42,13 @@ + #include <signal.h> + #endif /* __linux__ */ + ++#include <dahdi/user.h> ++ + #include <fcntl.h> + #ifdef HAVE_CAP + #include <sys/capability.h> + #endif /* HAVE_CAP */ + +-#include <dahdi/user.h> +- + #include "asterisk/lock.h" + #include "asterisk/file.h" + #include "asterisk/channel.h" diff --git a/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-imap-kerberos.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-imap-kerberos.patch new file mode 100644 index 000000000000..74fc91b9dd22 --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-imap-kerberos.patch @@ -0,0 +1,17 @@ +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.0/asterisk-1.6.0.6-parallelmake.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-parallelmake.patch new file mode 100644 index 000000000000..761fb1fcdc2c --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-parallelmake.patch @@ -0,0 +1,113 @@ +Index: asterisk-1.6.0.6/Makefile +=================================================================== +--- asterisk-1.6.0.6.orig/Makefile ++++ asterisk-1.6.0.6/Makefile +@@ -369,15 +369,15 @@ $(MOD_SUBDIRS_EMBED_LIBS): + @echo "EMBED_LIBS+="`$(SILENTMAKE) -C $(@:-embed-libs=) SUBDIR=$(@:-embed-libs=) __embed_libs` >> makeopts.embed_rules + + $(MOD_SUBDIRS_MENUSELECT_TREE): +- @$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) moduleinfo +- @$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) makeopts ++ +@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) moduleinfo ++ +@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) makeopts + + makeopts.embed_rules: menuselect.makeopts + @echo "Generating embedded module rules ..." + @rm -f $@ +- @$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDSCRIPT) +- @$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDFLAGS) +- @$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LIBS) ++ +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDSCRIPT) ++ +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDFLAGS) ++ +@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LIBS) + + $(SUBDIRS): main/version.c include/asterisk/version.h include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules + +@@ -400,10 +400,10 @@ res: main + endif + + $(MOD_SUBDIRS): +- @ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all ++ +@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all + + $(OTHER_SUBDIRS): +- @ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all ++ +@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all + + defaults.h: makeopts + @build_tools/make_defaults_h > $@.tmp +@@ -431,10 +431,10 @@ include/asterisk/build.h: + @rm -f $@.tmp + + $(SUBDIRS_CLEAN): +- @$(SUBMAKE) -C $(@:-clean=) clean ++ +@$(SUBMAKE) -C $(@:-clean=) clean + + $(SUBDIRS_DIST_CLEAN): +- @$(SUBMAKE) -C $(@:-dist-clean=) dist-clean ++ +@$(SUBMAKE) -C $(@:-dist-clean=) dist-clean + + clean: $(SUBDIRS_CLEAN) _clean + +@@ -547,7 +547,7 @@ bininstall: _all installdirs $(SUBDIRS_I + 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))) +@@ -796,7 +796,7 @@ cleantest: + @cmp -s .cleancount .lastclean || $(MAKE) clean + + $(SUBDIRS_UNINSTALL): +- @$(SUBMAKE) -C $(@:-uninstall=) uninstall ++ +@$(SUBMAKE) -C $(@:-uninstall=) uninstall + + _uninstall: $(SUBDIRS_UNINSTALL) + rm -f $(DESTDIR)$(MODULES_DIR)/* +@@ -842,7 +842,7 @@ gmenuconfig: gmenuselect + 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; \ +@@ -867,27 +867,27 @@ nmenuselect: menuselect/nmenuselect menu + MAKE_MENUSELECT=CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent" + + menuselect/menuselect: menuselect/makeopts +- $(MAKE_MENUSELECT) menuselect ++ +$(MAKE_MENUSELECT) menuselect + + menuselect/cmenuselect: menuselect/makeopts +- $(MAKE_MENUSELECT) cmenuselect ++ +$(MAKE_MENUSELECT) cmenuselect + + menuselect/gmenuselect: menuselect/makeopts +- $(MAKE_MENUSELECT) gmenuselect ++ +$(MAKE_MENUSELECT) gmenuselect + + menuselect/nmenuselect: menuselect/makeopts +- $(MAKE_MENUSELECT) nmenuselect ++ +$(MAKE_MENUSELECT) nmenuselect + + menuselect/makeopts: makeopts +- $(MAKE_MENUSELECT) makeopts ++ +$(MAKE_MENUSELECT) makeopts + + menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml configure + @echo "Generating input for menuselect ..." + @echo "<?xml version=\"1.0\"?>" > $@ + @echo >> $@ + @echo "<menu name=\"Asterisk Module and Build Option Selection\">" >> $@ +- @for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SILENTMAKE) -C $${dir} SUBDIR=$${dir} moduleinfo >> $@; done +- @for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SILENTMAKE) -C $${dir} SUBDIR=$${dir} makeopts >> $@; done ++ +@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SILENTMAKE) -C $${dir} SUBDIR=$${dir} moduleinfo >> $@; done ++ +@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SILENTMAKE) -C $${dir} SUBDIR=$${dir} makeopts >> $@; done + @cat build_tools/cflags.xml >> $@ + @if [ "${AST_DEVMODE}" = "yes" ]; then \ + cat build_tools/cflags-devmode.xml >> $@; \ diff --git a/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-sip-use-specified-port.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-sip-use-specified-port.patch new file mode 100644 index 000000000000..bd55fe00656d --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-sip-use-specified-port.patch @@ -0,0 +1,14 @@ +--- branches/1.6.0/channels/chan_sip.c 2009/03/09 20:14:05 180718 ++++ branches/1.6.0/channels/chan_sip.c 2009/03/10 13:32:58 180799 +@@ -4175,6 +4175,11 @@ + } + res = create_addr_from_peer(dialog, peer); + unref_peer(peer); ++ if (!ast_strlen_zero(port)) { ++ if ((portno = atoi(port))) { ++ dialog->sa.sin_port = dialog->recv.sin_port = htons(portno); ++ } ++ } + return res; + } + diff --git a/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-socket-details.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-socket-details.patch new file mode 100644 index 000000000000..edbd6bf81f05 --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-socket-details.patch @@ -0,0 +1,69 @@ +--- branches/1.6.0/channels/chan_sip.c 2009/03/02 23:15:51 179473 ++++ branches/1.6.0/channels/chan_sip.c 2009/03/09 20:14:05 180718 +@@ -2020,7 +2020,7 @@ + static const struct sockaddr_in *sip_real_dst(const struct sip_pvt *p); + static void build_via(struct sip_pvt *p); + static int create_addr_from_peer(struct sip_pvt *r, struct sip_peer *peer); +-static int create_addr(struct sip_pvt *dialog, const char *opeer); ++static int create_addr(struct sip_pvt *dialog, const char *opeer, int newdialog); + static char *generate_random_string(char *buf, size_t size); + static void build_callid_pvt(struct sip_pvt *pvt); + static void build_callid_registry(struct sip_registry *reg, struct in_addr ourip, const char *fromdomain); +@@ -4149,7 +4149,7 @@ + /*! \brief create address structure from peer name + * Or, if peer not found, find it in the global DNS + * returns TRUE (-1) on failure, FALSE on success */ +-static int create_addr(struct sip_pvt *dialog, const char *opeer) ++static int create_addr(struct sip_pvt *dialog, const char *opeer, int newdialog) + { + struct hostent *hp; + struct ast_hostent ahp; +@@ -4169,7 +4169,11 @@ + peer = find_peer(peername, NULL, 1, 0); + + if (peer) { +- int res = create_addr_from_peer(dialog, peer); ++ int res; ++ if (newdialog) { ++ dialog->socket.type = 0; ++ } ++ res = create_addr_from_peer(dialog, peer); + unref_peer(peer); + return res; + } +@@ -9549,7 +9553,7 @@ + p->outboundproxy = obproxy_get(p, NULL); + + /* Find address to hostname */ +- if (create_addr(p, r->hostname)) { ++ if (create_addr(p, r->hostname, 0)) { + /* we have what we hope is a temporary network error, + * probably DNS. We need to reschedule a registration try */ + sip_destroy(p); +@@ -14236,7 +14240,7 @@ + return CLI_FAILURE; + } + +- if (create_addr(p, a->argv[i])) { ++ if (create_addr(p, a->argv[i], 0)) { + /* Maybe they're not registered, etc. */ + sip_destroy(p); + ast_cli(a->fd, "Could not create address for '%s'\n", a->argv[i]); +@@ -16941,7 +16945,7 @@ + if ((peerorhost = strchr(uri, ':'))) { + *peerorhost++ = '\0'; + } +- create_addr(p, peerorhost); ++ create_addr(p, peerorhost, 0); + ast_string_field_set(p, theirtag, NULL); + for (pkt = p->packets; pkt; pkt = pkt->next) { + if (pkt->seqno == p->icseq && pkt->method == SIP_INVITE) { +@@ -20072,7 +20076,7 @@ + ext = extension (user part of URI) + dnid = destination of the call (applies to the To: header) + */ +- if (create_addr(p, host)) { ++ if (create_addr(p, host, 1)) { + *cause = AST_CAUSE_UNREGISTERED; + ast_debug(3, "Cant create SIP call - target device not registered\n"); + sip_destroy(p); diff --git a/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-spandsp-api-change.patch b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-spandsp-api-change.patch new file mode 100644 index 000000000000..8f05aab56a9b --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk-1.6.0.6-spandsp-api-change.patch @@ -0,0 +1,42 @@ +--- branches/1.6.0/apps/app_fax.c 2009/02/20 21:41:54 177762 ++++ branches/1.6.0/apps/app_fax.c 2009/02/20 21:56:39 177763 +@@ -161,6 +161,7 @@ + char buf[20]; + fax_session *s = (fax_session *) user_data; + t30_stats_t stat; ++ int pages_transferred; + + ast_debug(1, "Fax phase E handler. result=%d\n", result); + +@@ -186,7 +187,12 @@ + pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "SUCCESS"); + pbx_builtin_setvar_helper(s->chan, "FAXERROR", NULL); + pbx_builtin_setvar_helper(s->chan, "REMOTESTATIONID", far_ident); +- snprintf(buf, sizeof(buf), "%d", stat.pages_transferred); ++#if SPANDSP_RELEASE_DATE >= 20090220 ++ pages_transferred = (s->direction) ? stat.pages_tx : stat.pages_rx; ++#else ++ pages_transferred = stat.pages_transferred; ++#endif ++ snprintf(buf, sizeof(buf), "%d", pages_transferred); + pbx_builtin_setvar_helper(s->chan, "FAXPAGES", buf); + snprintf(buf, sizeof(buf), "%d", stat.y_resolution); + pbx_builtin_setvar_helper(s->chan, "FAXRESOLUTION", buf); +@@ -195,7 +201,7 @@ + + ast_debug(1, "Fax transmitted successfully.\n"); + ast_debug(1, " Remote station ID: %s\n", far_ident); +- ast_debug(1, " Pages transferred: %d\n", stat.pages_transferred); ++ ast_debug(1, " Pages transferred: %d\n", pages_transferred); + ast_debug(1, " Image resolution: %d x %d\n", stat.x_resolution, stat.y_resolution); + ast_debug(1, " Transfer Rate: %d\n", stat.bit_rate); + +@@ -215,7 +221,7 @@ + S_OR(s->chan->cid.cid_num, ""), + far_ident, + local_ident, +- stat.pages_transferred, ++ pages_transferred, + stat.y_resolution, + stat.bit_rate, + s->file_name); diff --git a/net-misc/asterisk/files/1.6.0/asterisk.confd b/net-misc/asterisk/files/1.6.0/asterisk.confd new file mode 100644 index 000000000000..576c32218d4e --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk.confd @@ -0,0 +1,98 @@ +# 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.0/asterisk.confd,v 1.1 2009/03/10 23:33:27 chainsaw Exp $ + +# +# Additional options for asterisk +# +# see "asterisk -h" for a list of options +# +ASTERISK_OPTS="" + +# +# User and group to run asterisk as +# +# Value: double-colon separated list of user and group, or empty to run as root: +# +# +# "asterisk:asterisk" to run as user "asterisk" and group "asterisk" +# +# "asterisk" to run as user "asterisk" and all groups that user "asterisk" is a member of +# +# ":asterisk" to run as user "root" and group "asterisk" +# +# "" to run as user "root" and group "root" +# +ASTERISK_USER="asterisk" + +# +# Nicelevel +# +# Set the priority of the asterisk process +# +# Value: (highest) -20..19 (lowest) +# +#ASTERISK_NICE="19" + +# +# Wrapper script +# +# Value: yes or no/empty +# +ASTERISK_WRAPPER="no" + +############# Wrapper script settings ############# + +# +# Send crash notifications emails to this address +# (needs a working mail service and /usr/sbin/sendmail to do so (e.g. ssmtp)) +# +# Value: Email address or empty to disable +# +#ASTERISK_NOTIFY_EMAIL="root" + +# +# Send asterisk's output to this terminal +# +# Value: Full path to device node or a number +# +#ASTERISK_TTY="/dev/tty9" + +# +# Start an asterisk console on the terminal specified by ASTERISK_TTY +# +# Warning! Use only for debugging, this is a potential security issue! +# +# Value: yes or no/empty +# +ASTERISK_CONSOLE="no" + +# +# Maximum size of core files. +# +# Value: Size in bytes, unlimited for no limit or empty to disable. +# +#ASTERISK_CORE_SIZE="unlimited" + +# +# ASTERISK_CORE_DIR +# +# Value: Directory (will be created if non-existant), default is /tmp +# +ASTERISK_CORE_DIR="/var/lib/asterisk/coredump" + +# +# Max number of filedescriptors +# +# Value: Number of descriptors +# +#ASTERISK_MAX_FD="1024" + +# +# Kill these tasks after asterisk crashed (ASTERISK_WRAPPER=yes only!) +# +# Warning! This will kill _ALL_ tasks with the specified names! +# +# Value: Space separated list of names in double quotes (e.g. "mpg123 mad") +# +#ASTERISK_CLEANUP_ON_CRASH="mpg123 asterisk-mpg123 mad" diff --git a/net-misc/asterisk/files/1.6.0/asterisk.rc6 b/net-misc/asterisk/files/1.6.0/asterisk.rc6 new file mode 100644 index 000000000000..e807706af506 --- /dev/null +++ b/net-misc/asterisk/files/1.6.0/asterisk.rc6 @@ -0,0 +1,253 @@ +#!/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.0/asterisk.rc6,v 1.1 2009/03/10 23:33:27 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 "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/metadata.xml b/net-misc/asterisk/metadata.xml index 7ba0d74d8d96..0ee428399413 100644 --- a/net-misc/asterisk/metadata.xml +++ b/net-misc/asterisk/metadata.xml @@ -3,16 +3,21 @@ <pkgmetadata> <herd>voip</herd> <maintainer> - <email>rajiv@gentoo.org</email> - <name>Rajiv Aaron Manglani</name> + <email>chainsaw@gentoo.org</email> + <name>Tony Vroon</name> </maintainer> <use> - <flag name="pri">Enables pri support</flag> - <flag name="zaptel">Enables zaptel support</flag> + <flag name="pri">Enables pri support</flag> + <flag name="zaptel">Enables deprecated zaptel support (use dahdi if available)</flag> <flag name="bri">Enable ISDN BRI support (bristuff)</flag> <flag name="h323">Build the H.323 channel driver bundled with Asterisk</flag> <flag name="lowmem">Build Asterisk for environments with low amounts of memory (embedded devices)</flag> <flag name="nosamples">Don't install sample sound and configuration files</flag> <flag name="osp">Enable support for the Open Settlement Protocol</flag> + <flag name="keepsrc">Install sources into /usr/src for custom patching</flag> + <flag name="misdn">Build with mISDN (chan_misdn) support for BRI ISDN cards</flag> + <flag name="newt">Include additional tools that require redhats windowing toolkit</flag> + <flag name="dahdi">Support Digium compatible hardware (formerly known as Zaptel).</flag> + <flag name="span">Enable support for the spandsp codec</flag> </use> </pkgmetadata> |