# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="IAX2 softphone" SRC_URI="mirrors://gentoo/${P}.tar.bz2 ilbc? ( http://www.ietf.org/rfc/rfc3951.txt http://www.ilbcfreeware.org/documentation/extract-cfile.awk )" HOMEPAGE="http://iaxclient.sourceforge.net/iaxcomm/index.html" LICENSE="GPL-2.1" SLOT="0" KEYWORDS="~x86" IUSE="alsa ilbc" DEPEND=">=x11-libs/wxGTK-2.6.1 ilbc? ( sys-apps/gawk ) " S="${WORKDIR}/iaxclient" pkg_setup() { if ! built_with_use x11-libs/wxGTK unicode; then echo eerror "iaxcomm requires wxGTK to be built with unicode" eerror "support. To install iaxcomm-cvs on your system," eerror "first recompile x11-libs/wxGTK with the \"unicode\"" eerror "USE flag enabled, then try to install iaxcomm-cvs" die "unicode support not enabled in \"x11-libs/wxGTK\"" fi } src_unpack(){ unpack ${A} if use alsa ; then sed -i 's/AUDIO_ALSA=0/AUDIO_ALSA=1/' ${S}/lib/Makefile fi if use ilbc ; then einfo "extracting iLBC from rfc3951" mkdir ${S}/lib/iLBC cd ${S}/lib/iLBC awk -f ${DISTDIR}/extract-cfile.awk ${DISTDIR}/rfc3951.txt >/dev/null sed -i 's/CODEC_ILBC=0/CODEC_ILBC=1/' ${S}/lib/Makefile fi # workaround for #91307 explicitly use wxGtk-2.6 sed -i 's/wx-config/wx-config-2.6/' ${S}/simpleclient/iaxcomm/Makefile } src_compile(){ cd ${S}/lib make shared cd ${S}/simpleclient/iaxcomm make } src_install(){ cd ${S}/simpleclient/iaxcomm dodir /usr/share/applications /usr/share/pixmaps insinto /usr/share/applications doins ${FILESDIR}/iaxcomm.desktop insinto /usr/share/pixmaps doins ${FILESDIR}/iaxcomm.png exeinto /usr/bin doexe iaxcomm iaxcomm.htb dodoc README }