From 8d368db304b27738e1036fe1b81e54da6befbcd1 Mon Sep 17 00:00:00 2001 From: Gustavo Felisberto Date: Wed, 14 Mar 2007 15:25:31 +0000 Subject: [PATCH] add another uclibc patch --- net-misc/asterisk-addons/ChangeLog | 10 +- net-misc/asterisk-addons/Manifest | 21 +- .../asterisk-addons-1.2.5-r1.ebuild | 180 ++++++++++++++++++ .../files/asterisk-addons-1.2.4-uclibc.diff | 30 +++ 4 files changed, 230 insertions(+), 11 deletions(-) create mode 100644 net-misc/asterisk-addons/asterisk-addons-1.2.5-r1.ebuild create mode 100644 net-misc/asterisk-addons/files/asterisk-addons-1.2.4-uclibc.diff diff --git a/net-misc/asterisk-addons/ChangeLog b/net-misc/asterisk-addons/ChangeLog index 4277fc9776ff..c5c4773e60d8 100644 --- a/net-misc/asterisk-addons/ChangeLog +++ b/net-misc/asterisk-addons/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/asterisk-addons # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-addons/ChangeLog,v 1.10 2007/01/17 18:55:23 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-addons/ChangeLog,v 1.11 2007/03/14 15:25:31 humpback Exp $ + +*asterisk-addons-1.2.5-r1 (14 Mar 2007) + + 14 Mar 2007; Gustavo Felisberto ; + +files/asterisk-addons-1.2.4-uclibc.diff, + +asterisk-addons-1.2.5-r1.ebuild: + Added another patch needed to build with uclibc. Credit goes to jaervosz in + bug #170235. *asterisk-addons-1.2.5 (17 Jan 2007) diff --git a/net-misc/asterisk-addons/Manifest b/net-misc/asterisk-addons/Manifest index 0898658a1127..6202eb11001a 100644 --- a/net-misc/asterisk-addons/Manifest +++ b/net-misc/asterisk-addons/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX asterisk-addons-1.2.0-gentoo-base.diff 1852 RMD160 cf757a2a7e566f814ad288cfb8006381bcc1d1af SHA1 5a0c5537afddab7f4dd5b53ce44d227fbf813c68 SHA256 79fb6cfc9dc6c7f53a6c9ea263b5126d39478890289ca4279a0756c03b69ab25 MD5 d9614f6289a7b8edda8045241187e138 files/asterisk-addons-1.2.0-gentoo-base.diff 1852 RMD160 cf757a2a7e566f814ad288cfb8006381bcc1d1af files/asterisk-addons-1.2.0-gentoo-base.diff 1852 @@ -21,6 +18,10 @@ AUX asterisk-addons-1.2.3-gentoo-ooh323c.diff 1465 RMD160 b584cb11b208e6a384bdef MD5 45850e45e0acd7e352d4773f1914ee87 files/asterisk-addons-1.2.3-gentoo-ooh323c.diff 1465 RMD160 b584cb11b208e6a384bdefa47219d0425ded3357 files/asterisk-addons-1.2.3-gentoo-ooh323c.diff 1465 SHA256 2d661f6d051326d9cdb48bb02c08f27de6c0c001cfffae0afeaf5ca5672e2a47 files/asterisk-addons-1.2.3-gentoo-ooh323c.diff 1465 +AUX asterisk-addons-1.2.4-uclibc.diff 886 RMD160 2018dbe61d12279359dc98cea428feaa8f69b58b SHA1 fb7f54a8a8e51064bf1b50bfe4f0efbc46d5f557 SHA256 b8c0be41e6058e863cb89152319be9defd38b8b8975f64e43303f0efc968524e +MD5 4f34354dec5d4b12190cb77879011bce files/asterisk-addons-1.2.4-uclibc.diff 886 +RMD160 2018dbe61d12279359dc98cea428feaa8f69b58b files/asterisk-addons-1.2.4-uclibc.diff 886 +SHA256 b8c0be41e6058e863cb89152319be9defd38b8b8975f64e43303f0efc968524e files/asterisk-addons-1.2.4-uclibc.diff 886 AUX sqlite-3.2.1-data-corruption.patch 6529 RMD160 06f79a07f5dfb12967ebc233544b0807ac8114af SHA1 73203e5145119b9ad070596271793ea36e0bd651 SHA256 7b42e48387045ab466a0d7f936099de0d1597b0cf593fb28705a46c1b6e76b81 MD5 46cefa8dc3aa8a97c973f54cd08f0ace files/sqlite-3.2.1-data-corruption.patch 6529 RMD160 06f79a07f5dfb12967ebc233544b0807ac8114af files/sqlite-3.2.1-data-corruption.patch 6529 @@ -32,6 +33,10 @@ EBUILD asterisk-addons-1.2.4.ebuild 4359 RMD160 bab61ed5678a36e4b91338da82a97bfb MD5 cf78ce66165cde6f9ad6c5eb3a4dcbef asterisk-addons-1.2.4.ebuild 4359 RMD160 bab61ed5678a36e4b91338da82a97bfba87f5640 asterisk-addons-1.2.4.ebuild 4359 SHA256 b186f32491f8f97d7fb557b677177e50c07a3ff1c64380eb9de72866fe42ac27 asterisk-addons-1.2.4.ebuild 4359 +EBUILD asterisk-addons-1.2.5-r1.ebuild 4413 RMD160 1c340d5061de614d1914e21c7b8820026f4cfeaf SHA1 1da14f5080094cb4b156864d9bd02d95415b9410 SHA256 4b1736cd7235dde78b8e7b54f7f3f32a4d4aa61f2755edea8c8b094086210d58 +MD5 6bfadd7f7d6e31ecc0285bec90458906 asterisk-addons-1.2.5-r1.ebuild 4413 +RMD160 1c340d5061de614d1914e21c7b8820026f4cfeaf asterisk-addons-1.2.5-r1.ebuild 4413 +SHA256 4b1736cd7235dde78b8e7b54f7f3f32a4d4aa61f2755edea8c8b094086210d58 asterisk-addons-1.2.5-r1.ebuild 4413 EBUILD asterisk-addons-1.2.5.ebuild 4361 RMD160 ef44ca1ec94166bbfecdf61bcad9ad11ae7ccf1b SHA1 a3713bb052afb4754fd9674dab98ff8fbf197a84 SHA256 7647f11a3511105f1af418efe7f17df96b46b63e1ce2dab65c2e6ee57ec9a9f1 MD5 db312fe2f4e84f81b01f856d4977887a asterisk-addons-1.2.5.ebuild 4361 RMD160 ef44ca1ec94166bbfecdf61bcad9ad11ae7ccf1b asterisk-addons-1.2.5.ebuild 4361 @@ -50,10 +55,6 @@ SHA256 feaa2746b646c2360505300a19941e2fb5b2c47b6743e3fc5c4afdffd7b2b465 files/di MD5 a1c2b7069cecd74d5541bc89c1378f4a files/digest-asterisk-addons-1.2.5 506 RMD160 094d6f93972c76edf847c09efd5fa628141b44b4 files/digest-asterisk-addons-1.2.5 506 SHA256 1de401169e2b01e625750da3f6ccd7614fd5ae3205bd3b0946977da51cff40cb files/digest-asterisk-addons-1.2.5 506 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6-ecc01.6 (GNU/Linux) - -iD8DBQFFrnEkKRy60XGEcJIRAs5nAJsGuR1r9r1yWLNlTlToIs40ViMG+wCgoN8v -RDUcoBtOvGNlk+IO3DbIfDg= -=n9Jm ------END PGP SIGNATURE----- +MD5 a1c2b7069cecd74d5541bc89c1378f4a files/digest-asterisk-addons-1.2.5-r1 506 +RMD160 094d6f93972c76edf847c09efd5fa628141b44b4 files/digest-asterisk-addons-1.2.5-r1 506 +SHA256 1de401169e2b01e625750da3f6ccd7614fd5ae3205bd3b0946977da51cff40cb files/digest-asterisk-addons-1.2.5-r1 506 diff --git a/net-misc/asterisk-addons/asterisk-addons-1.2.5-r1.ebuild b/net-misc/asterisk-addons/asterisk-addons-1.2.5-r1.ebuild new file mode 100644 index 000000000000..2dc31236bb4a --- /dev/null +++ b/net-misc/asterisk-addons/asterisk-addons-1.2.5-r1.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-addons/asterisk-addons-1.2.5-r1.ebuild,v 1.1 2007/03/14 15:25:31 humpback Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +inherit eutils flag-o-matic autotools + +IUSE="elibc_uclibc mysql sqlite h323" +SQLITE_PV="3.2.1" + +MY_P="${P/_/-}" + +DESCRIPTION="Additional Plugins for Asterisk" +HOMEPAGE="http://www.asterisk.org/" +SRC_URI="http://ftp.digium.com/pub/asterisk/${MY_P}.tar.gz + sqlite? ( http://www.sqlite.org/sqlite-${SQLITE_PV}.tar.gz )" + +S=${WORKDIR}/${MY_P} + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~sparc ~x86" + +DEPEND=">=net-misc/asterisk-1.2.0 + mysql? ( virtual/mysql )" + +pkg_setup() { + local n dosleep=0 + einfo "Running pre-flight checks..." + + if use h323 && built_with_use net-misc/asterisk h323; then + echo + ewarn "h323: Emerging ${PN} with the h323 flag enabled will overwrite asterisk's chan_h323.so!" + ewarn "h323: Be sure to upgrade ${ROOT}etc/asterisk/h323.conf afterwards!" + dosleep=1 + fi + + if use sqlite && built_with_use net-misc/asterisk sqlite; then + echo + ewarn "sqlite: Emerging ${PN} with the sqlite flag enabled will overwrite asterisk's res_sqlite.so!" + ewarn "sqlite: Be sure to upgrade ${ROOT}etc/asterisk/res_sqlite.conf afterwards!" + dosleep=1 + fi + + echo + if [[ $dosleep -gt 0 ]]; then + ebeep + n=10 + while [[ $n -gt 0 ]]; do + echo -en " Waiting $n seconds...\r" + sleep 1 + (( n-- )) + done + fi +} + +src_unpack() { + unpack ${A} + cd ${S} + + # + # gentoo patchset + # + epatch ${FILESDIR}/${PN}-1.2.0-gentoo-base.diff + epatch ${FILESDIR}/${PN}-1.2.0-gentoo-res_sqlite3.diff + epatch ${FILESDIR}/${PN}-1.2.2-gentoo-format_mp3.diff + epatch ${FILESDIR}/${PN}-1.2.3-gentoo-ooh323c.diff + + # patch from jaervosz for uclibc + if use elibc_uclibc; then + epatch ${FILESDIR}/${PN}-1.2.2-uclibc.diff + epatch ${FILESDIR}/${PN}-1.2.4-uclibc.diff + fi + # patch sqlite + if use sqlite; then + cd ${WORKDIR}/sqlite-${SQLITE_PV} + + epatch ${FILESDIR}/sqlite-${SQLITE_PV}-data-corruption.patch + epunt_cxx + fi + + # rebuild ooh323c configure + if use h323; then + cd ${S}/asterisk-ooh323c + eautoreconf + fi +} + +src_compile() { + append-flags -fPIC + + emake -j1 OPTIMIZE="${CFLAGS}" || die "Make failed" + + if use sqlite; then + cd ${WORKDIR}/sqlite-${SQLITE_PV} + econf --enable-threadsafe || die "" + emake || die "" + + cd ${S} + emake -j1 -C res_sqlite3 \ + SQLITEDIR=${WORKDIR}/sqlite-${SQLITE_PV} || die "Make res_sqlite failed" + fi + + if use h323; then + cd ${S}/asterisk-ooh323c + econf || die "econf failed" + emake || die "emake failed" + fi +} + +src_install() { + make DESTDIR=${D} install || die "Make install failed" + + if use sqlite; then + make -C res_sqlite3 \ + DESTDIR=${D} install || die "Make install res_sqlite3 failed" + fi + + if use h323; then + make -C asterisk-ooh323c \ + DESTDIR=${D} install || die "Make instal ooh323c failed" + fi + + # install standard docs... + dodoc README + dodoc doc/cdr_mysql.txt + + insinto /usr/share/doc/${PF} + doins configs/*.sample + + if use sqlite; then + cd ${S}/res_sqlite3 + docinto res_sqlite3 + dodoc README + insinto /usr/share/doc/${PF}/res_sqlite3 + doins res_sqlite.conf dialplan.sql + keepdir /var/lib/asterisk/sqlite + fi + + if use h323; then + cd ${S}/asterisk-ooh323c + docinto chan_ooh323c + dodoc AUTHORS INSTALL NEWS README COPYING ChangeLog + dodoc h323.conf.sample extensions.conf.sample + + insinto /etc/asterisk + newins h323.conf.sample h323.conf + fi + + cd ${S} + + if use mysql; then + insinto /etc/asterisk + newins configs/cdr_mysql.conf.sample cdr_mysql.conf + newins configs/res_mysql.conf.sample res_mysql.conf + fi + + einfo "Fixing permissions" + chown -R root:asterisk ${D}etc/asterisk + chmod -R u=rwX,g=rX,o= ${D}etc/asterisk + +# chown -R asterisk:asterisk ${D}var/lib/asterisk +# chmod -R u=rwX,g=rX,o= ${D}var/lib/asterisk +} + +pkg_postinst() { + # + # Announcements, warnings, reminders... + # + einfo "********* Some notes from the asterisk-addons-1.2.5 readme: **********" + echo + ewarn "\"Using res_config_mysql at the same time as res_config_odbc can create" + ewarn "system instability on some systems. Please load only one or the other.\"" + echo + ewarn "\"format_mp3 can cause Asterisk to crash on certain mp3 files (notably" + ewarn "8k files made with lame) due to bugs in mpglib. If you must use this" + ewarn "module, use it only with mp3's you know will work with it.\"" +} diff --git a/net-misc/asterisk-addons/files/asterisk-addons-1.2.4-uclibc.diff b/net-misc/asterisk-addons/files/asterisk-addons-1.2.4-uclibc.diff new file mode 100644 index 000000000000..253b9af492db --- /dev/null +++ b/net-misc/asterisk-addons/files/asterisk-addons-1.2.4-uclibc.diff @@ -0,0 +1,30 @@ +--- res_config_mysql.c.orig 2006-09-15 22:18:48.000000000 +0200 ++++ res_config_mysql.c 2006-09-15 22:20:23.000000000 +0200 +@@ -35,24 +35,23 @@ + * Ex: =, !=, LIKE, NOT LIKE, RLIKE, etc... + * + * v1.2 - (11-DD-04) - Added reload. Updated load and unload. + * Code beautification (doc/CODING-GUIDELINES) + */ + ++#include ++#include ++#include + #include + #include + #include + #include + #include + #include + #include + #include +-#include +-#include +-#include +-#include + #include + #include + #include + + static char *res_config_mysql_desc = "MySQL RealTime Configuration Driver"; + -- 2.26.2