summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Knoblich <stkn@gentoo.org>2005-03-27 22:53:10 +0000
committerStefan Knoblich <stkn@gentoo.org>2005-03-27 22:53:10 +0000
commit25edc82404828ce3564f2c1fd9cf998532b77b80 (patch)
treec622eff9212bac2387f754f80e81b7098e126cc0 /net-misc/asterisk
parentVersion bump and cleanup. (diff)
downloadhistorical-25edc82404828ce3564f2c1fd9cf998532b77b80.tar.gz
historical-25edc82404828ce3564f2c1fd9cf998532b77b80.tar.bz2
historical-25edc82404828ce3564f2c1fd9cf998532b77b80.zip
re-enabled res_perl support, see ChangeLog for more information
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r--net-misc/asterisk/ChangeLog7
-rw-r--r--net-misc/asterisk/Manifest4
-rw-r--r--net-misc/asterisk/asterisk-1.0.7.ebuild120
3 files changed, 76 insertions, 55 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index 3578329a3a3b..ab03e21ddcda 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,11 @@
# 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.42 2005/03/22 15:51:16 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.43 2005/03/27 22:53:10 stkn Exp $
+
+ 27 Mar 2005; Stefan Knoblich <stkn@gentoo.org> asterisk-1.0.7.ebuild:
+ Fixed and re-enabled res_perl support, perl modules are now installed into
+ /usr/lib/perl/..., applications and htdocs are in /var/lib/asterisk/perl.
+ Now everything is where it belongs.
22 Mar 2005; Stefan Knoblich <stkn@gentoo.org> files/0.9.0/asterisk.rc6,
files/1.0.0/asterisk.rc6:
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
index 3cea6e011cf2..3282944a94aa 100644
--- a/net-misc/asterisk/Manifest
+++ b/net-misc/asterisk/Manifest
@@ -1,4 +1,4 @@
-MD5 26141260532f626db0d4bdd12258a644 ChangeLog 7489
+MD5 826cd5967bbe700e13c61d2e586da539 ChangeLog 7753
MD5 b551ce4bb8eb4a03cb0e551c279ab02c asterisk-0.9.0.ebuild 3161
MD5 6201814863e121c6cae9a8209b0b9a27 asterisk-1.0.0.ebuild 3394
MD5 c870e11d5cfc72f46a1290e769a491cc asterisk-1.0.1.ebuild 5576
@@ -9,7 +9,7 @@ MD5 867bae5d74f56337feec21310c14ecca asterisk-1.0.5-r1.ebuild 7170
MD5 c7b911a01a3bd822055a9ec010dfbae1 asterisk-1.0.5.ebuild 6314
MD5 44cf247f04cc83413fcb40ed59d0847a metadata.xml 248
MD5 836a6bbe8f125659a9e0e8236d2f1684 asterisk-1.0.6.ebuild 8614
-MD5 6703036d09dc12665db2d8ffc7baece8 asterisk-1.0.7.ebuild 8731
+MD5 81cdd77e4cbc44d4b074a0eecf7b81d5 asterisk-1.0.7.ebuild 9341
MD5 d7a0d59fff2e991e7b091341893ec554 digest-asterisk-1.0.7 210
MD5 0243bdde80a5b8433cf93c306458dfd8 files/digest-asterisk-0.9.0 67
MD5 1bb1cf45f134eeae6adcc7dc17b6b5db files/digest-asterisk-1.0.0 141
diff --git a/net-misc/asterisk/asterisk-1.0.7.ebuild b/net-misc/asterisk/asterisk-1.0.7.ebuild
index 4c35ad5df1ce..bde75b5df7de 100644
--- a/net-misc/asterisk/asterisk-1.0.7.ebuild
+++ b/net-misc/asterisk/asterisk-1.0.7.ebuild
@@ -1,10 +1,10 @@
# 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.7.ebuild,v 1.1 2005/03/21 00:50:41 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.7.ebuild,v 1.2 2005/03/27 22:53:10 stkn Exp $
-IUSE="alsa doc gtk mmx mysql pri zaptel uclibc debug postgres vmdbmysql vmdbpostgres bri hardened speex"
+IUSE="alsa doc gtk mmx mysql pri zaptel uclibc debug postgres vmdbmysql vmdbpostgres bri hardened speex resperl"
-inherit eutils
+inherit eutils perl-module
ADDONS_VERSION="1.0.7"
BRI_VERSION="0.2.0-RC7k"
@@ -37,22 +37,21 @@ DEPEND="dev-libs/newt
zaptel? ( >=net-misc/zaptel-1.0.3 )
postgres? ( dev-db/postgresql )
vmdbmysql? ( dev-db/mysql )
- vmdbpostgres? ( dev-db/postgresql )"
-
-# resperl? ( dev-lang/perl
-# >=net-misc/zaptel-1.0.3 )
+ vmdbpostgres? ( dev-db/postgresql )
+ resperl? ( dev-lang/perl
+ >=net-misc/zaptel-1.0.3 )"
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
+ 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..
@@ -121,28 +120,26 @@ src_unpack() {
#
# 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"
-#
-# cd ${S_ADDONS}
-# # asterisk-1.0.6 changed two channel functions
-# epatch ${FILESDIR}/1.0.0/${P}-resperl.diff
-#
-# # fix perl path
-# sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
-# res_perl/Makefile \
-# ${S}/Makefile
-# sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
-# -e "s:\$(ASTLIBDIR)/modules/\(res_musiconhold.so\):\1:" \
-# -e "s:\(res_musiconhold.so \$(LDFLAGS)\):\1 -Wl,-rpath,/usr/lib/asterisk/modules/:" \
-# res_perl/Makefile
-#
-# cd ${S}
-# fi
+ if use resperl; then
+ einfo "Patching asterisk for embedded perl support..."
+ epatch ${S_ADDONS}/res_perl/astmake.diff
+
+ # create necessary .c file
+ /usr/bin/perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c"
+
+ cd ${S_ADDONS}
+
+ # fix perl path, source location and remove res_musiconhold
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
+ res_perl/Makefile \
+ ${S}/Makefile \
+ res_perl/INC/*.pm
+ sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
+ -e "s:\$(ASTLIBDIR)/modules/res_musiconhold.so::" \
+ res_perl/Makefile
+
+ cd ${S}
+ fi
#
# uclibc patch
@@ -205,7 +202,6 @@ src_unpack() {
einfo "Patching asterisk w/ BRI stuff"
# fix patch for new asterisk version...
- # remove this as soon as there's a new bristuff version!
sed -i -e "s:^\([+-]\)1.0.6:\1${PV}:" \
${WORKDIR}/bristuff-${BRI_VERSION}/patches/asterisk.patch
@@ -235,15 +231,10 @@ src_compile() {
cd ${S_ADDONS}
emake -j1 || die "Make 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 || die "Building embedded perl failed"
-# fi
+ if use resperl; then
+ cd ${S_ADDONS}/res_perl
+ emake -j1 || die "Building embedded perl failed"
+ fi
}
src_install() {
@@ -296,10 +287,35 @@ src_install() {
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
+ if use resperl; then
+ perlinfo
+
+ cd ${S_ADDONS}/res_perl
+ emake -j1 INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed"
+
+ # move AstApiBase.so to a proper place
+ dodir ${VENDOR_LIB}/auto/AstAPIBase
+ mv ${D}/etc/asterisk/perl/AstAPIBase.so ${D}${VENDOR_LIB}/auto/AstAPIBase
+
+ # move *.pm files to other location
+ dodir ${VENDOR_LIB}/AstAPI
+ dodir ${VENDOR_LIB}/AstAPIBase
+ for x in AstAPI.pm AstConfig.pm LoadFile.pm PerlSwitch.pm WebServer.pm; do
+ mv ${D}/etc/asterisk/perl/${x} ${D}${VENDOR_LIB}/AstAPI
+ dosed "s/^use[\t ]\+${x/.pm/};/use AstAPI::${x/.pm/};/" /etc/asterisk/perl/asterisk_init.pm
+ done
+ mv ${D}/etc/asterisk/perl/AstAPIBase.pm ${D}${VENDOR_LIB}/AstAPIBase
+ dosed "s/^use[\t ]\+AstAPI;/use AstAPI::AstAPI;/" /etc/asterisk/perl/asterisk_init.pm
+ dosed "s/^use[\t ]\+AstAPIBase;/use AstAPIBase::AstAPIBase;/" ${VENDOR_LIB}/AstAPI/AstAPI.pm
+
+ # move apps + htdocs to a proper place
+ dodir /var/lib/asterisk/perl
+ mv ${D}/etc/asterisk/perl/{apps,htdocs} ${D}/var/lib/asterisk/perl
+
+ # fix locations
+ sed -i -e "s:/etc/asterisk/perl:/var/lib/asterisk/perl:" \
+ ${D}${VENDOR_LIB}/AstAPI/LoadFile.pm ${D}${VENDOR_LIB}/AstAPI/WebServer.pm
+ fi
}
pkg_postinst() {