--- asterisk-1.4.19.ebuild 2008-04-15 15:33:58.000000000 +0200 +++ asterisk-1.4.19.ebuild 2008-04-15 15:27:41.000000000 +0200 @@ -13,7 +13,7 @@ SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="alsa +caps curl debug freetds h323 imap jabber kde keepsrc misdn mmx mysql newt nosamples odbc oss pic postgres qt3 radius snmp speex ssl sqlite static vorbis zaptel" +IUSE="alsa +caps curl debug freetds h323 ilbc imap jabber kde keepsrc misdn mmx mysql newt nosamples odbc oss pic postgres qt3 radius snmp speex ssl sqlite static vorbis zaptel" RDEPEND="virtual/libc sys-libs/ncurses @@ -27,6 +27,7 @@ newt? ( dev-libs/newt ) h323? ( dev-libs/pwlib net-libs/openh323 ) + ilbc? ( dev-libs/ilbc-rfc3951 ) imap? ( virtual/imap-c-client ) odbc? ( dev-db/unixODBC ) snmp? ( net-analyzer/net-snmp ) @@ -135,6 +136,25 @@ if [[ -n "${ASTERISK_MODULES}" ]] ; then ewarn "_insert random warning message here_" fi + + if use ilbc ; then + ewarn " Asterisk iLBC Codec Warning" + ewarn "" + ewarn "Asterisk does not distribute the iLBC codec source code anymore." + ewarn "dev-libs/ilbc-rfc3951 will be used instead." + ewarn "On some systems dev-libs/ilbc-rfc3951 should be compiled with -fPIC" + ewarn "otherwise Asterisk may fail to start when it loads codec_ilbc." + ewarn "" + ewarn " Asterisk iLBC Codec Warning" + echo + waitaftermsg=1 + fi + + if [[ $waitaftermsg -eq 1 ]]; then + einfo "Press Ctrl+C to abort" + echo + ebeep 10 + fi } src_unpack() { @@ -183,6 +203,9 @@ # epatch "${FILESDIR}"/1.4/${PN}-1.4.19-configure-gentoo.diff + # patch the ilbc makefile to avoid building ilbc lib since it's already provided by dev-libs/ilbc-rfc3951 + use ilbc && epatch "${FILESDIR}"/1.4/${P}-ilbc.diff + # add custom device state function (func_devstate) # http://asterisk.org/node/48360 # http://svncommunity.digium.com/svn/russell/func_devstate-1.4/README.txt @@ -305,6 +328,12 @@ done fi + # dirty fix to remove codec_ilbc from menuselect.makeopts + if use ilbc ; then + emake menuselect.makeopts || die "ilbc: emake menuselect.makeopts failed" + sed -i -e "s:codec_ilbc::" menuselect.makeopts || die "ilbc: sed failed" + fi + # # fasten your seatbelts (and start praying) #