summaryrefslogtreecommitdiff
blob: bab1be3a23a2d108fb0d1d9445ebe2f5ac16ba05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-voip/linphone/linphone-2.0.1-r1.ebuild,v 1.5 2008/01/22 04:44:42 vapier Exp $

# Note: video support in linphone relies on swscaler being disabled
#       in ffmpeg.  this is because the video code in linphone is old
#       and uses the old interface.  solution: fix linphone's video
#       code.  workaround: build ffmpeg w/out --enable-swscaler.

inherit eutils

DESCRIPTION="Voice Over IP phone (internet phone which uses SIP)"
HOMEPAGE="http://www.linphone.org/"
SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/stable/sources/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="1"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="alsa arts console doc gtk ilbc ipv6 video xv"
# XXX: Should "video" be split into ffmpeg/libsdl ?  They are two distinct
#      things: libsdl is just for video display while ffmpeg is just for
#      video capture ... but does anyone actually want a one-way linphone ?

RDEPEND="dev-libs/glib
	doc? ( app-doc/doxygen )
	dev-perl/XML-Parser
	net-dns/bind-tools
	>=net-libs/libosip-3.0.3
	>=net-libs/libeXosip-3.0.3
	>=net-libs/ortp-0.13.1-r1
	>=media-libs/speex-1.2_beta3
	>=media-sound/gsm-1.0.12-r1
	x86? ( xv? ( dev-lang/nasm ) )
	gtk? (
		>=x11-libs/gtk+-2
		gnome-base/libglade
	)
	alsa? ( media-libs/alsa-lib )
	arts? ( kde-base/arts )
	ilbc? ( dev-libs/ilbc-rfc3951 )
	video? (
		media-libs/libsdl
		media-video/ffmpeg
		>=media-libs/libtheora-1.0_alpha7
	)"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"
# use the bundled ortp until newer versions enter portage
#	portaudio? ( >=media-libs/portaudio-19_pre )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/linphone-1.6.0-call.patch
	epatch "${FILESDIR}"/linphone-2.0.1-mediastreamer-deps.patch
}

src_compile() {
	use doc || export ac_cv_path_DOXYGEN=false
	econf \
		--disable-strict \
		--libdir=/usr/$(get_libdir)/linphone \
		--libexecdir=/usr/$(get_libdir)/linphone/exec \
		$(use_enable console console_ui) \
		$(use_enable doc manual) \
		$(use_enable gtk gtk_ui) \
		$(use_with ilbc) \
		$(use_enable ipv6) \
		$(use_enable alsa) \
		$(use_enable arts artsc) \
		$(use_enable video) \
		--disable-portaudio \
		$(use_enable x86 truespeech) \
		--enable-external-ortp \
		|| die "Unable to configure"
		#$(use_enable portaudio)
	emake || die "Unable to make"
}

src_install () {
	emake DESTDIR="${D}" install || die "Failed to install"
	dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README README.arm TODO

	# don't install mediastreamer/ortp includes, docs and pkgconfig files
	# to avoid conflicts with net-libs/ortp
	rm -r "${D}"/usr/include/mediastreamer2 || die
	rm -r "${D}"/usr/$(get_libdir)/linphone/pkgconfig/mediastreamer.pc || die
#	use doc && ( rm -r "${D}"/usr/share/doc/ortp || die )
	mv "${D}"/usr/$(get_libdir)/{linphone/,}pkgconfig || die
}