# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit qt3 eutils DESCRIPTION="A SIP user agent for Linux, with which you can initiate VoIP connections over the Internet." HOMEPAGE="http://sourceforge.net/projects/kphone" SRC_URI="mirror://sourceforge/kphone/${P/-/_}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~sparc ~x86" IUSE="alsa debug srtp" S=${WORKDIR}/${PN} DEPEND="=x11-libs/qt-3* dev-libs/openssl alsa? ( media-libs/alsa-lib ) srtp? ( >=net-libs/libsrtp-1.4.0 )" src_unpack() { unpack "${A}" cd "${S}" # - re-arrange conditioals in Makefile, only link against srtp if # it has been enabled at configure time # - add $(DESTDIR) handling to several makefiles and fix kphoneringing Makefile.in # to use locations defined by configure # - remove srtp include path and prepare to use configure result for AR in the future (AR=@AR@) epatch "${FILESDIR}"/kphoneSI-1.0.2.1-Makefile.in.diff # fix #include of srtp.h, octet_t -> unsigned char epatch "${FILESDIR}"/kphoneSI_1.0-SRTPWrapper.h.diff # use srtp-1.4 compatible wrapper, change include in dspoutrtp.h (should be changed) # and fix library name in srtp-1.4 Makefile.in (should be changed too) epatch "${FILESDIR}"/kphoneSI-1.0.2.1-srtp-1.4.diff # preserve custom cflags passed to configure (parts taken from kphoneSI CVS) epatch "${FILESDIR}"/kphoneSI-1.0.2.1-use-custom-cflags.patch } src_compile() { econf \ $(use_enable alsa) \ $(use_enable debug) \ $(use_enable srtp) \ || die "econf failed" emake all || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc CHANGES README make_desktop_entry "kpsi" KPhoneSI "/usr/share/KPhoneSI/icons/large-phone.png" "Telephony;Qt" }