dev-embedded/stlink: add
[sgilles-overlay.git] / net-voip / linphone / linphone-3.6.1-r1.ebuild
blob17af6e70172496c5d7880b84c819d6b11461c0ef
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
5 EAPI=5
7 inherit autotools eutils multilib pax-utils versionator
9 DESCRIPTION="Video softphone based on the SIP protocol"
10 HOMEPAGE="http://www.linphone.org/"
11 SRC_URI="mirror://nongnu/${PN}/$(get_version_component_range 1-2).x/sources/${P}.tar.gz
12 https://dev.gentoo.org/~hasufell/distfiles/${P}-exosip-4.patch"
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 # TODO: run-time test for ipv6: does it need mediastreamer[ipv6]?
18 IUSE="assistant doc gsm-nonstandard gtk ipv6 libnotify libressl ncurses nls sqlite ssl tools upnp video"
20 RDEPEND="
21 >=media-libs/mediastreamer-2.9.0[ipv6?,upnp?,video?]
22 >=net-libs/libeXosip-4.0.0
23 >=net-libs/libosip-4.0.0
24 >=net-libs/ortp-0.22.0
25 virtual/udev
26 gtk? (
27 dev-libs/glib:2
28 >=gnome-base/libglade-2.4.0:2.0
29 >=x11-libs/gtk+-2.4.0:2
30 assistant? ( >=net-libs/libsoup-2.26 )
31 libnotify? ( x11-libs/libnotify )
33 gsm-nonstandard? ( >=media-libs/mediastreamer-2.9.0[gsm] )
34 ncurses? (
35 sys-libs/readline:0
36 sys-libs/ncurses
38 sqlite? ( dev-db/sqlite:3 )
39 ssl? ( libressl? ( dev-libs/libressl ) !libressl? ( dev-libs/openssl:0 ) )
40 tools? ( dev-libs/libxml2 )
41 upnp? ( net-libs/libupnp )
42 video? ( >=media-libs/mediastreamer-2.9.0[v4l] )
44 DEPEND="${RDEPEND}
45 virtual/pkgconfig
46 doc? ( app-text/sgmltools-lite )
47 nls? ( dev-util/intltool )
50 IUSE_LINGUAS=" fr it de he ja es pl cs nl sr sv pt_BR hu ru zh_CN"
51 IUSE="${IUSE}${IUSE_LINGUAS// / linguas_}"
53 pkg_setup() {
54 if ! use gtk && ! use ncurses ; then
55 ewarn "gtk and ncurses are disabled."
56 ewarn "At least one of these use flags are needed to get a front-end."
57 ewarn "Only liblinphone is going to be installed."
60 strip-linguas ${IUSE_LINGUAS}
63 src_prepare() {
64 epatch "${FILESDIR}"/${P}-nls.patch \
65 "${DISTDIR}"/${P}-exosip-4.patch
67 # variable causes "command not found" warning and is not
68 # needed anyway
69 sed -i \
70 -e 's/$(ACLOCAL_MACOS_FLAGS)//' Makefile.am || die
72 # fix path to use lib64
73 sed -i \
74 -e "s:lib\(/liblinphone\):$(get_libdir)\1:" configure.ac \
75 || die "patching configure.ac failed"
77 # removing bundled libs dir prevent them to be reconf
78 rm -r mediastreamer2 oRTP || die
80 eautoreconf
83 src_configure() {
84 local myeconfargs=(
85 $(use_enable doc manual)
86 $(use_enable nls)
87 --disable-static
88 $(use_enable ncurses console_ui)
89 $(use_enable tools)
90 $(use_enable upnp)
91 $(use_enable gtk gtk_ui)
92 $(use_enable libnotify notify)
93 $(use_enable ipv6)
94 --disable-truespeech
95 $(use_enable gsm-nonstandard nonstandard-gsm)
96 $(use_enable ssl)
97 --disable-speex
98 # seems not used, TODO: ask in ml
99 $(use_enable video)
100 --disable-zrtp
101 $(usex gtk "$(use_enable assistant)" "--disable-assistant")
102 # we don't want -Werror
103 --disable-strict
104 # don't bundle libs
105 --enable-external-mediastreamer
106 $(use_enable sqlite msg-storage)
107 --enable-external-ortp
110 econf "${myeconfargs[@]}"
113 src_install() {
114 emake DESTDIR="${D}" pkgdocdir="/usr/share/doc/${PF}" install # 415161
115 dodoc AUTHORS BUGS ChangeLog NEWS README README.arm TODO
116 pax-mark m "${ED%/}/usr/bin/linphone"