summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Knoblich <stkn@gentoo.org>2005-02-14 20:57:39 +0000
committerStefan Knoblich <stkn@gentoo.org>2005-02-14 20:57:39 +0000
commitd8f71b84b56c4b6daa44b460b1714be38ad337d3 (patch)
tree29de0a682f38a09c2929acc36599c81af07eb6aa /net-misc/asterisk
parentSlotted. (diff)
downloadgentoo-2-d8f71b84b56c4b6daa44b460b1714be38ad337d3.tar.gz
gentoo-2-d8f71b84b56c4b6daa44b460b1714be38ad337d3.tar.bz2
gentoo-2-d8f71b84b56c4b6daa44b460b1714be38ad337d3.zip
Lots of changes, see changelog for details
(Portage version: 2.0.51-r15)
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r--net-misc/asterisk/ChangeLog17
-rw-r--r--net-misc/asterisk/asterisk-1.0.5-r1.ebuild257
-rw-r--r--net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff216
-rw-r--r--net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff23
-rw-r--r--net-misc/asterisk/files/1.0.0/asterisk-1.0.5-uclibc-dns.diff11
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.0.5-r13
6 files changed, 526 insertions, 1 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index 59400d3d9d5e..d464121ba074 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,21 @@
# ChangeLog for net-misc/asterisk
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.35 2005/01/31 19:19:36 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.36 2005/02/14 20:57:39 stkn Exp $
+
+*asterisk-1.0.5-r1 (14 Feb 2005)
+
+ 14 Feb 2005; Stefan Knoblich <stkn@gentoo.org>
+ +files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff,
+ +files/1.0.0/asterisk-1.0.5-speex.diff,
+ +files/1.0.0/asterisk-1.0.5-uclibc-dns.diff, +asterisk-1.0.5-r1.ebuild:
+ Fix detection problems w/ >=speex-1.1.0. Except for codec_gsm.so (needs some
+ more investigation), all plugins use -fPIC and are free from TEXT_RELocations.
+ Fixed uclibc patch (thanks to Ned Ludd <solar@gentoo.org>, closes #72984).
+ Added postgres use-flag and fixed postgres detection. Added use-flags and
+ sed-foo for voicemail database support (thx to Gustavo Zacarias
+ <gustavoz@gentoo.org> for pointing this out). Added experimental patch for
+ asterisk-config config script that should ease development / use of external
+ modules and extensions.
31 Jan 2005; Gustavo Zacarias <gustavoz@gentoo.org> asterisk-1.0.5.ebuild:
Keyworded ~sparc
diff --git a/net-misc/asterisk/asterisk-1.0.5-r1.ebuild b/net-misc/asterisk/asterisk-1.0.5-r1.ebuild
new file mode 100644
index 000000000000..4f0ba02ada34
--- /dev/null
+++ b/net-misc/asterisk/asterisk-1.0.5-r1.ebuild
@@ -0,0 +1,257 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.5-r1.ebuild,v 1.1 2005/02/14 20:57:39 stkn Exp $
+
+IUSE="alsa doc gtk mmx mysql pri zaptel uclibc resperl debug postgres vmdbmysql vmdbpostgres"
+
+inherit eutils
+
+ADDONS_VERSION="1.0.4"
+SOUNDS_VERSION="1.0.2"
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="ftp://ftp.asterisk.org/pub/telephony/asterisk/${P}.tar.gz
+ ftp://ftp.asterisk.org/pub/telephony/asterisk/${PN}-addons-${ADDONS_VERSION}.tar.gz
+ ftp://ftp.asterisk.org/pub/telephony/asterisk/${PN}-sounds-${SOUNDS_VERSION}.tar.gz"
+
+S=${WORKDIR}/${P}
+S_ADDONS=${WORKDIR}/${PN}-addons-${ADDONS_VERSION}
+S_SOUNDS=${WORKDIR}/${PN}-sounds-${SOUNDS_VERSION}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~sparc"
+
+DEPEND="dev-libs/newt
+ media-sound/mpg123
+ media-sound/sox
+ doc? ( app-doc/doxygen )
+ gtk? ( =x11-libs/gtk+-1.2* )
+ pri? ( >=net-libs/libpri-1.0.3 )
+ alsa? ( media-libs/alsa-lib )
+ mysql? ( dev-db/mysql )
+ uclibc? ( sys-libs/uclibc )
+ zaptel? ( >=net-misc/zaptel-1.0.3 )
+ resperl? ( dev-lang/perl
+ >=net-misc/zaptel-1.0.3 )
+ postgres? ( dev-db/postgresql )
+ vmdbmysql? ( dev-db/mysql )
+ vmdbpostgres? ( dev-db/postgresql )"
+
+
+pkg_setup() {
+ einfo "Running some pre-flight checks..."
+ if use resperl; then
+ # res_perl pre-flight check...
+ if ! $(perl -V | grep -q "usemultiplicity=define"); then
+ eerror "Embedded perl add-on needs Perl with built-in threads support"
+ eerror "(rebuild perl with ithreads use-flag enabled)"
+ die "Perl w/o threads support..."
+ fi
+ einfo "Perl with ithreads support found"
+ fi
+
+
+ # mysql and postgres voicemail support are mutually exclusive..
+ if use vmdbmysql && use vmdbpostgres; then
+ eerror "MySQL and PostgreSQL Voicemail support are mutually exclusive... choose one!"
+ die "Conflicting use-flags"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # set cflags & mmx optimization
+ sed -i -e "s:^\(OPTIMIZE+=\).*:\1 ${CFLAGS}:" \
+ -e "s:^\(CFLAGS+=\$(shell if \$(CC)\):#\1:" \
+ Makefile
+
+ # gsm codec still uses -fomit-frame-pointer, and other codecs have their
+ # own flags. We only change the arch.
+ sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" codecs/gsm/Makefile
+
+ if use mmx; then
+ einfo "enabling mmx optimization"
+ sed -i -e "s:^#\(K6OPT.*\):\1:" Makefile
+ sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" codecs/gsm/Makefile
+ fi
+
+ if ! use debug; then
+ einfo "disabling debugging"
+ sed -i -e "s:^\(DEBUG=\):#\1:" Makefile
+ fi
+
+ # change image path in voicemail cgi
+ sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
+
+ #
+ # embedded perl
+ #
+ if use resperl; then
+ einfo "Patching asterisk for embedded perl support..."
+ epatch ${S_ADDONS}/res_perl/astmake.diff
+
+ # create necessary .c file
+ perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c"
+
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
+ ${S_ADDONS}/res_perl/Makefile \
+ Makefile
+ sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
+ -e "s:\$(ASTLIBDIR)/modules/\(res_musiconhold.so\):${S}/res/\1:" \
+ ${S_ADDONS}/res_perl/Makefile
+ fi
+
+ #
+ # uclibc patch
+ #
+ if use uclibc; then
+ einfo "Patching asterisk for uclibc..."
+ epatch ${FILESDIR}/1.0.0/${P}-uclibc-dns.diff
+ fi
+
+ #
+ # other patches
+ #
+
+ # asterisk-config
+ epatch ${FILESDIR}/1.0.0/${P}-astcfg-0.0.2.diff
+
+ # fix include path for speex >= 1.1.0
+ epatch ${FILESDIR}/1.0.0/${P}-speex.diff
+
+ #
+ # database voicemail support
+ #
+ if use postgres; then
+ sed -i -e "s:^#\(APPS+=app_sql_postgres.so\):\1:" \
+ -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
+ -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
+ apps/Makefile
+ fi
+
+ if use vmdbpostgres; then
+ einfo "Enabling PostgreSQL voicemail support"
+ sed -i -e "s:^\(USE_POSTGRES_VM_INTERFACE\).*:\1=1:" \
+ -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
+ -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
+ apps/Makefile
+
+ # patch app_voicemail.c
+ sed -i -e "s:^#include <postgresql/libpq-fe\.h>:#include \"libpq-fe\.h\":" \
+ apps/app_voicemail.c
+
+ elif use vmdbmysql; then
+ einfo "Enabling MySQL voicemail support"
+ sed -i -e "s:^\(USE_MYSQL_VM_INTERFACE\).*:\1=1:" \
+ -e "s:^\(CFLAGS+=-DUSEMYSQLVM\):\1 -I${S_ADDONS}:" \
+ apps/Makefile
+ fi
+
+ #
+ # asterisk add-ons
+ #
+ cd ${S_ADDONS}
+ sed -i -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile
+ sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" \
+ -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include -fPIC \2:" \
+ format_mp3/Makefile
+}
+
+src_compile() {
+ # build asterisk first...
+ einfo "Building Asterisk..."
+ cd ${S}
+ emake -j1 || die "Make failed"
+
+ #
+ # add-ons
+ #
+ einfo "Building additional stuff..."
+ cd ${S_ADDONS}
+ emake -j1 || die "Make failed"
+
+ if use resperl; then
+ cd ${S_ADDONS}/res_perl
+ emake -j1 || die "Building embedded perl failed"
+ fi
+}
+
+src_install() {
+ emake -j1 DESTDIR=${D} install || die "Make install failed"
+ emake -j1 DESTDIR=${D} samples || die "Make install samples failed"
+
+ # install addmailbox and astgenkey
+ dosbin contrib/scripts/addmailbox
+ dosbin contrib/scripts/astgenkey
+
+ # documentation
+ use doc && \
+ emake -j1 DESTDIR=${D} progdocs
+
+# rem # install necessary files
+# dodir /etc/env.d
+# echo "LD_LIBRARY_PATH=\"/usr/lib/asterisk\"" > ${D}/etc/env.d/25asterisk
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/1.0.0/asterisk.rc6 asterisk
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/1.0.0/asterisk.confd asterisk
+
+ # don't delete these, even if they are empty
+ keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
+ keepdir /var/log/asterisk/cdr-csv
+
+ # install standard docs...
+ dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm SECURITY
+
+ docinto scripts
+ dodoc contrib/scripts/*
+ docinto firmware/iax
+ dodoc contrib/firmware/iax/*
+
+ insinto /usr/share/doc/${PF}/cgi
+ doins contrib/scripts/vmail.cgi
+ for i in "images/*.gif"; do
+ doins $i
+ done
+
+ #
+ # sounds + add-ons
+ #
+
+ # install additional sounds...
+ einfo "Installing additional sounds..."
+ cd ${S_SOUNDS}
+ emake -j1 DESTDIR=${D} install || die "Make install failed"
+
+ # install additional modules...
+ einfo "Installing additional modules..."
+ cd ${S_ADDONS}
+ emake -j1 INSTALL_PREFIX=${D} install || die "Make install failed"
+
+ if use resperl; then
+ cd ${S_ADDONS}/res_perl
+
+ # copy plugin because -rpath and stuff only works for lib*.* files and we don't want
+ # res_perl.so to look at the wrong places... (ugly but works)
+ cp ${S}/res/res_musiconhold.so . || die "Could not copy musiconhold plugin, needed by res_perl!"
+ emake -j1 INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed"
+ fi
+}
+
+pkg_postinst() {
+ einfo "Asterisk has been installed"
+ einfo ""
+ einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
+ einfo ""
+ einfo "If you want to know more about asterisk, visit these sites:"
+ einfo "http://www.automated.it/guidetoasterisk.htm"
+ einfo "http://asterisk.xvoip.com/"
+ einfo "http://www.voip-info.org/wiki-Asterisk"
+ einfo "http://ns1.jnetdns.de/jn/relaunch/asterisk/"
+}
diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff
new file mode 100644
index 000000000000..9d977a05fd7f
--- /dev/null
+++ b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff
@@ -0,0 +1,216 @@
+diff -Nau asterisk-1.0.2-orig/Makefile asterisk-1.0.2/Makefile
+--- asterisk-1.0.2-orig/Makefile 2004-10-03 20:37:37.000000000 +0200
++++ asterisk-1.0.2/Makefile 2004-11-21 23:09:08.969201360 +0100
+@@ -221,6 +221,7 @@
+
+ CC=gcc
+ INSTALL=install
++SED=sed
+
+ _all: all
+ @echo " +--------- Asterisk Build Complete ---------+"
+@@ -231,7 +232,7 @@
+ @echo " + $(MAKE) install +"
+ @echo " +-------------------------------------------+"
+
+-all: depend asterisk subdirs
++all: depend asterisk asterisk-config subdirs
+
+ editline/config.h:
+ cd editline && unset CFLAGS LIBS && ./configure ; \
+@@ -295,6 +296,20 @@
+ asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
+ $(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
+
++asterisk-config: asterisk-config.in
++ $(SED) \
++ -e "s:@SOLINK@:$(SOLINK):" -e "s:@VERSION@:$(ASTERISKVERSION):" \
++ -e "s:@ETCDIR@:$(ASTETCDIR):" -e "s:@LIBDIR@:$(ASTLIBDIR):" \
++ -e "s:@CFLAGS@:$(CFLAGS):" -e "s:@VARRUNDIR@:$(ASTVARRUNDIR):" \
++ -e "s:@LIBS@:$(LIBS):" -e "s:@VARLIBDIR@:$(ASTVARLIBDIR):" \
++ -e "s:@LOGDIR@:$(ASTLOGDIR):" -e "s:@SPOOLDIR@:$(ASTSPOOLDIR):" \
++ -e "s:@AGIDIR@:$(AGI_DIR):" -e "s:@MODDIR@:$(MODULES_DIR):" \
++ -e "s:@BINDIR@:$(ASTBINDIR):" -e "s:@SBINDIR@:$(ASTSBINDIR):" \
++ -e "s:@MANDIR@:$(ASTMANDIR):" \
++ -e "s:@INCDIR@:$(ASTHEADERDIR):" \
++ -e "s:@PREFIX@:$(INSTALL_PREFIX):" \
++ asterisk-config.in > $@
++
+ muted: muted.o
+ $(CC) -o muted muted.o
+
+@@ -303,7 +318,7 @@
+
+ clean:
+ for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
+- rm -f *.o *.so asterisk .depend
++ rm -f *.o *.so asterisk .depend asterisk-config
+ rm -f build.h
+ rm -f ast_expr.c
+ @if [ -e editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
+@@ -373,6 +388,7 @@
+ mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail
+ mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
+ install -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/
++ install -m 755 asterisk-config $(DESTDIR)$(ASTBINDIR)/
+ install -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
+ if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
+ install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\
+Common subdirectories: asterisk-1.0.2-orig/agi and asterisk-1.0.2/agi
+Common subdirectories: asterisk-1.0.2-orig/apps and asterisk-1.0.2/apps
+diff -Nau asterisk-1.0.2-orig/asterisk-config.in asterisk-1.0.2/asterisk-config.in
+--- asterisk-1.0.2-orig/asterisk-config.in 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.0.2/asterisk-config.in 2004-11-21 23:11:29.129893696 +0100
+@@ -0,0 +1,152 @@
++#!/bin/sh
++#
++# asterisk-config
++#
++# Copyright (C) 2004 Stefan Knoblich <stkn@gentoo.org>
++#
++
++# /*
++# Changes:
++#
++# 0.0.2 (stkn: 20041121)
++# Clean-ups, renamed some options (more configure alike)
++#
++# 0.0.1 (stkn: 20041114)
++# Yeah it's ugly as hell, but it does it's job
++# */
++
++##
++# These get replaced by sed...
++#
++
++SOLINK='@SOLINK@'
++CFLAGS='@CFLAGS@'
++LIBS='@LIBS@'
++
++AST_PREFIX=@PREFIX@
++AST_LIBDIR=@LIBDIR@
++AST_ETCDIR=@ETCDIR@
++AST_MODDIR=@MODDIR@
++AST_AGIDIR=@AGIDIR@
++AST_INCDIR=@INCDIR@
++AST_MANDIR=@MANDIR@
++AST_LOGDIR=@LOGDIR@
++AST_VARLIBDIR=@VARLIBDIR@
++AST_VARRUNDIR=@VARRUNDIR@
++AST_SPOOLDIR=@SPOOLDIR@
++AST_CONFPATH=@CFGPATH@
++AST_VERSION=@VERSION@
++
++##
++# Don't even think about touching anything below...
++#
++
++usage() {
++ echo "asterisk-config <options>"
++ echo ""
++ echo "* About asterisk (outputs first option only)"
++ echo ""
++ echo " --version | -v Asterisk version"
++ echo ""
++ echo "* Build time stuff"
++ echo ""
++ echo " --libs Libraries used by asterisk"
++ echo " --cflags Cflags used during building"
++ echo " --solink Option for linking modules"
++ echo ""
++ echo "* Paths"
++ echo ""
++ echo " --prefix Installation prefix"
++ echo " --bindir Location of user-accessible binaries"
++ echo " --sbindir Location of system binaries"
++ echo " --sysconfdir Directory for config files"
++ echo " --mandir Place for man-pages"
++ echo " --libdir Libraries are put there"
++ echo " --modulesdir Asterisk keeps it's modules here"
++ echo " --agidir AGI files belong there"
++ echo " --logdir The place for logfiles"
++ echo " --spooldir Asterisk's spool directory"
++ echo " --includesdir Include files"
++ echo ""
++}
++
++
++if [ $# -lt 1 ]; then
++ usage
++ exit 0
++fi
++
++#
++# single-use options
++#
++while [ $# -gt 0 ]; do
++ case $1 in
++ --help|-h)
++ usage
++ ;;
++ --version|-v)
++ echo ${AST_VERSION}
++ ;;
++ # paths
++ --prefix)
++ echo -n ${AST_PREFIX}
++ ;;
++ --sysconfdir)
++ echo -n ${AST_ETCDIR}
++ ;;
++ --libexecdir|--sbindir)
++ echo -n ${AST_SBINDIR}
++ ;;
++ --bindir)
++ echo -n ${AST_BINDIR}
++ ;;
++ --modulesdir)
++ echo -n ${AST_MODDIR}
++ ;;
++ --agidir)
++ echo -n ${AST_AGIDIR}
++ ;;
++ --mandir)
++ echo -n ${AST_MANDIR}
++ ;;
++ --logdir)
++ echo -n ${AST_LOGDIR}
++ ;;
++ --includedir)
++ echo -n ${AST_INCDIR}
++ ;;
++ --spooldir)
++ echo -n ${AST_SPOOLDIR}
++ ;;
++ --libdir)
++ echo -n ${AST_LIBDIR}
++ ;;
++ --varrundir)
++ echo -n ${AST_VARRUNDIR}
++ ;;
++ --varlibdir)
++ echo -n ${AST_VARLIBDIR}
++ ;;
++ # flags and stuff
++ --solink)
++ echo -n ${SOLINK}
++ ;;
++ --cflags)
++ echo -n ${CFLAGS}
++ # skip if asterisk includes are inside default include path
++ # (/usr/include/asterisk...)
++ if [ `dirname ${AST_INCDIR}` != "/usr/include" ]; then
++ echo -n " -I${AST_INCDIR}"
++ fi
++ ;;
++ --libs)
++ echo -n ${LIBS}
++ ;;
++ esac
++ shift
++done
++exit 0
++
++##
++# The End
++#
diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff
new file mode 100644
index 000000000000..7a9da8032690
--- /dev/null
+++ b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff
@@ -0,0 +1,23 @@
+--- asterisk-1.0.5/codecs/Makefile.orig 2005-02-10 09:59:42.303104992 +0100
++++ asterisk-1.0.5/codecs/Makefile 2005-02-10 10:00:49.988815200 +0100
+@@ -19,18 +19,16 @@
+ #MODG723=codec_g723_1.so codec_g723_1b.so
+ MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
+ MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
+-MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/include/speex.h ] || [ -f /usr/local/include/speex/speex.h ] && echo "codec_speex.so")
++MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/include/speex/speex.h ] && echo "codec_speex.so")
+ MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
+ CFLAGS+=-fPIC
+-CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
+-CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex")
++CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex")
+
+ LIBG723=g723.1/libg723.a
+ LIBG723B=g723.1b/libg723b.a
+ LIBGSM=gsm/lib/libgsm.a
+ LIBGSMT=gsm/lib/libgsm.a
+ LIBLPC10=lpc10/liblpc10.a
+-LIBSPEEX=$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/local/lib")
+ LIBSPEEX+=-lspeex -lm
+ LIBILBC=ilbc/libilbc.a
+
diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-uclibc-dns.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-uclibc-dns.diff
new file mode 100644
index 000000000000..61dc1261f70c
--- /dev/null
+++ b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-uclibc-dns.diff
@@ -0,0 +1,11 @@
+--- asterisk-1.0.5/dns.c.orig 2005-02-15 04:32:18.581297392 +0100
++++ asterisk-1.0.5/dns.c 2005-02-15 04:32:57.583368176 +0100
+@@ -151,7 +151,7 @@
+ return 0;
+ }
+
+-#if defined(res_ninit)
++#if (defined(res_ninit) && !defined(__UCLIBC__))
+ #define HAS_RES_NINIT
+ #else
+ AST_MUTEX_DEFINE_STATIC(res_lock);
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.5-r1 b/net-misc/asterisk/files/digest-asterisk-1.0.5-r1
new file mode 100644
index 000000000000..a62685085728
--- /dev/null
+++ b/net-misc/asterisk/files/digest-asterisk-1.0.5-r1
@@ -0,0 +1,3 @@
+MD5 efabd43ac70ada3bdc97a57027c670a3 asterisk-1.0.5.tar.gz 9586778
+MD5 22e51b14b4712ad9179a085f9738ec08 asterisk-addons-1.0.4.tar.gz 73516
+MD5 a406c0f2e1bba8b614cd5416601dbd03 asterisk-sounds-1.0.2.tar.gz 3170474