new version, fixes for uclibc, webapp stuff removed, fix for chan_phone + older versi...
authorStefan Knoblich <stkn@gentoo.org>
Fri, 29 Oct 2004 23:27:32 +0000 (23:27 +0000)
committerStefan Knoblich <stkn@gentoo.org>
Fri, 29 Oct 2004 23:27:32 +0000 (23:27 +0000)
net-misc/asterisk/ChangeLog
net-misc/asterisk/Manifest
net-misc/asterisk/asterisk-1.0.1.ebuild [new file with mode: 0644]
net-misc/asterisk/files/1.0.0/asterisk-1.0.1-linux26.diff [new file with mode: 0644]
net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff [new file with mode: 0644]
net-misc/asterisk/files/digest-asterisk-1.0.1 [new file with mode: 0644]

index 9ca6925cbaba95ec545856a02df1ce24f53bbaf3..e517ddc188adcee6190e3e86dc76980093147c58 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for net-misc/asterisk
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.23 2004/09/24 00:01:57 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.24 2004/10/29 23:27:32 stkn Exp $
+
+*asterisk-1.0.1 (30 Oct 2004)
+
+  30 Oct 2004; <stkn@gentoo.org> +files/1.0.0/asterisk-1.0.1-linux26.diff,
+  +files/1.0.0/asterisk-uclibc-dns.diff, +asterisk-1.0.1.ebuild:
+  new version, pri and zaptel use-flags flipped (now default disabled), fixes:
+  #66557 (thx to REdOG <bugzilla@opelousas.org>), #66720 (webapp stuff
+  removed...), a workaround for #65195 (fixed for newer versions of linux?).
 
 *asterisk-1.0.0 (24 Sep 2004)
 
index f2e21d29c5042dbf7ff50ac1bd347b193cb07d42..aae27501bcd6c023421f42c81f833613fd070375 100644 (file)
@@ -1,18 +1,22 @@
-MD5 dc0f63e79c4419c62abc93e409e79297 ChangeLog 3711
+MD5 c3a2df72cd75cb6cdfd3639e8ee0587b ChangeLog 4110
 MD5 0c45ef020588bec1dd61d38c592c2abf asterisk-0.2.0.ebuild 819
 MD5 b30099389b78f5ea94e51c214e9d7cfb asterisk-0.5.0.ebuild 3607
 MD5 0d22495f0d78bdefddf5cb49ca7c0b97 asterisk-0.9.0.ebuild 3161
 MD5 44cf247f04cc83413fcb40ed59d0847a metadata.xml 248
 MD5 20d4a092a6a7a65a1bcb4cbc981cd1d1 asterisk-1.0.0.ebuild 3425
+MD5 b607fca660a52ad001d968ec51389f4a asterisk-1.0.1.ebuild 5640
 MD5 64cd5e3855adff2b38f2f442004a47b1 files/digest-asterisk-0.2.0 67
 MD5 96927166e5c299f77d298e7f6d1bbe40 files/digest-asterisk-0.5.0 138
 MD5 0243bdde80a5b8433cf93c306458dfd8 files/digest-asterisk-0.9.0 67
 MD5 1bb1cf45f134eeae6adcc7dc17b6b5db files/digest-asterisk-1.0.0 141
+MD5 b97c969a083704e6f8c8c9b07d56db3b files/digest-asterisk-1.0.1 213
 MD5 00c1dd84bc743af5abd72133444730da files/0.5.0/asterisk-0.5.0-Makefile-samples.patch 1917
 MD5 e92ef5376479d0ef176b27725b7a0fc6 files/0.5.0/asterisk-0.5.0-makefile-fix.diff 1994
 MD5 0e0d852e029eaca418ad526fac9c85dd files/0.5.0/asterisk.confd 290
 MD5 dca7d68e9c87487d5d19bdf6506d0e13 files/0.5.0/asterisk.rc6 455
 MD5 85e291d6eb70a24fdc82469ed53bfe54 files/1.0.0/asterisk.confd 283
 MD5 86b4d8f884079c798034a39256a24040 files/1.0.0/asterisk.rc6 503
+MD5 f0fe0308b464c71f83cf2483388c8058 files/1.0.0/asterisk-1.0.1-linux26.diff 474
+MD5 6a50db2ee46d4139128d0c4225ac071f files/1.0.0/asterisk-uclibc-dns.diff 433
 MD5 5b7ebf09c4c7988bd16cadaaad08d8f6 files/0.9.0/asterisk.confd 290
 MD5 5109a8a08fdf97bb040710d8d54bce41 files/0.9.0/asterisk.rc6 455
diff --git a/net-misc/asterisk/asterisk-1.0.1.ebuild b/net-misc/asterisk/asterisk-1.0.1.ebuild
new file mode 100644 (file)
index 0000000..aa8aad5
--- /dev/null
@@ -0,0 +1,220 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.1.ebuild,v 1.1 2004/10/29 23:27:32 stkn Exp $
+
+IUSE="alsa doc gtk mmx mysql pri zaptel uclibc resperl"
+
+inherit eutils
+
+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-${PV}.tar.gz
+        ftp://ftp.asterisk.org/pub/telephony/asterisk/${PN}-sounds-${PV}.tar.gz"
+
+S=${WORKDIR}/${P}
+S_ADDONS=${WORKDIR}/${PN}-addons-${PV}
+S_SOUNDS=${WORKDIR}/${PN}-sounds-${PV}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+
+DEPEND="dev-libs/newt
+       media-sound/mpg123
+       doc? ( app-doc/doxygen )
+       gtk? ( =x11-libs/gtk+-1.2* )
+       pri? ( >=net-libs/libpri-0.4 )
+       alsa? ( media-libs/alsa-lib )
+       mysql? ( dev-db/mysql )
+       uclibc? ( sys-libs/uclibc )
+       zaptel? ( >=net-misc/zaptel-1.0.1
+                 >=net-libs/zapata-1.0.1 )
+       resperl? ( dev-lang/perl
+                  >=net-misc/zaptel-1.0.1
+                  >=net-libs/zapata-1.0.1 )"
+
+
+changes_message() {
+       ewarn "Important changes since 1.0.0:"
+       ewarn ""
+       ewarn "- Voicemail Webapp has been removed!"
+       ewarn "  (files are in /usr/share/doc/${PF}/cgi/ if you really need them)"
+       ewarn ""
+       ewarn "- Zaptel and PRI support are now disabled by default (see emerge -pv asterisk)"
+       ewarn ""
+       ewarn "- Support for embedded perl in the extensions file has been added"
+       ewarn "  (res_perl from asterisk-addons; \"resperl\" use-flag)"
+       ewarn ""
+       ewarn "- Should build with uclibc now (untested / experimental)"
+       ewarn ""
+}
+
+pkg_setup() {
+       changes_message
+       ebeep
+       epause 10
+
+       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
+}
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+
+       # set cflags & mmx optimization
+       sed -i -e "s:^\(OPTIMIZE=\).*:\1 ${CFLAGS}:" Makefile
+
+       if use mmx; then
+               einfo "enabling mmx optimization"
+               sed -i -e "s:^#\(K6OPT.*\):\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/asterisk-uclibc-dns.diff
+       fi
+
+       #
+       # other patches
+       #
+
+       # fix missing _user macro in linux/ixjuser.h with 2.6 headers 
+       epatch ${FILESDIR}/1.0.0/${P}-linux26.diff
+
+       #
+       # asterisk add-ons
+       #
+       cd ${S_ADDONS}
+
+       sed -i  -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile
+       sed -i  -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include \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
+
+       # 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
+               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/"
+       echo
+
+       changes_message
+}
diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.1-linux26.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.1-linux26.diff
new file mode 100644 (file)
index 0000000..c4314d8
--- /dev/null
@@ -0,0 +1,14 @@
+--- asterisk-1.0.1/channels/chan_phone.c.orig  2004-10-24 20:24:06.646210032 +0200
++++ asterisk-1.0.1/channels/chan_phone.c       2004-10-24 20:26:05.699111240 +0200
+@@ -33,6 +33,11 @@
+ #include <sys/ioctl.h>
+ #include <linux/telephony.h>
+ /* Still use some IXJ specific stuff */
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
++/* required to compile on 2.6 */
++#include <linux/compiler.h>
++#endif
+ #include <linux/ixjuser.h>
+ #include "DialTone.h"
+ 
diff --git a/net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff b/net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff
new file mode 100644 (file)
index 0000000..b66b542
--- /dev/null
@@ -0,0 +1,22 @@
+--- work/asterisk-1.0.0/dns.c2004-06-22 20:11:15.000000000 +0000
++++ dns.c2004-10-06 12:59:38.000000000 +0000
+@@ -150,15 +150,18 @@
+ }
+ return 0;
+ }
+-
++/*
+ #if defined(res_ninit)
+ #define HAS_RES_NINIT
+ #else
++*/
+ AST_MUTEX_DEFINE_STATIC(res_lock);
++/*
+ #if 0
+ #warning Warning, res_ninit is missing... Could have reentrancy issues
+ #endif
+ #endif
++*/
+ 
+ int ast_search_dns(void *context,
+    const char *dname, int class, int type,
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.1 b/net-misc/asterisk/files/digest-asterisk-1.0.1
new file mode 100644 (file)
index 0000000..50bf7a2
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 cb55b1a0be8ff6e94179db0cdc7e074d asterisk-1.0.1.tar.gz 9558497
+MD5 a171d013fd682334c2ee03f30cffab35 asterisk-addons-1.0.1.tar.gz 73164
+MD5 2b7180a182a9122e88c734392e51556e asterisk-sounds-1.0.1.tar.gz 1702221