| 1 |
mgorny |
1.5 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
pva |
1.1 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
jdhore |
1.6 |
# $Header: /var/cvsroot/gentoo-x86/net-voip/linphone/linphone-3.4.3-r1.ebuild,v 1.5 2012/04/24 10:37:55 mgorny Exp $
|
| 4 |
pva |
1.1 |
|
| 5 |
|
|
EAPI="4"
|
| 6 |
|
|
|
| 7 |
|
|
inherit eutils autotools multilib versionator pax-utils
|
| 8 |
|
|
|
| 9 |
|
|
DESCRIPTION="Video softphone based on the SIP protocol"
|
| 10 |
|
|
HOMEPAGE="http://www.linphone.org/"
|
| 11 |
mgorny |
1.5 |
SRC_URI="mirror://nongnu/${PN}/$(get_version_component_range 1-2).x/sources/${P}.tar.gz"
|
| 12 |
pva |
1.1 |
|
| 13 |
|
|
LICENSE="GPL-2"
|
| 14 |
|
|
SLOT="0"
|
| 15 |
grobian |
1.4 |
KEYWORDS="amd64 ~ppc x86 ~x86-macos"
|
| 16 |
pva |
1.1 |
# TODO: run-time test for ipv6: does it need mediastreamer[ipv6]?
|
| 17 |
|
|
IUSE="doc gtk ipv6 ncurses nls video"
|
| 18 |
|
|
|
| 19 |
|
|
RDEPEND=">=media-libs/mediastreamer-2.7.3[video?,ipv6?]
|
| 20 |
|
|
>=net-libs/libeXosip-3.0.2
|
| 21 |
|
|
>=net-libs/libosip-3.0.0
|
| 22 |
|
|
>=net-libs/ortp-0.16.3
|
| 23 |
|
|
gtk? ( dev-libs/glib:2
|
| 24 |
|
|
>=gnome-base/libglade-2.4.0:2.0
|
| 25 |
|
|
>=x11-libs/gtk+-2.4.0:2 )
|
| 26 |
|
|
ncurses? ( sys-libs/readline
|
| 27 |
|
|
sys-libs/ncurses )"
|
| 28 |
|
|
DEPEND="${RDEPEND}
|
| 29 |
jdhore |
1.6 |
virtual/pkgconfig
|
| 30 |
pva |
1.1 |
doc? ( app-text/sgmltools-lite )
|
| 31 |
|
|
nls? ( dev-util/intltool
|
| 32 |
|
|
sys-devel/gettext )"
|
| 33 |
|
|
|
| 34 |
|
|
IUSE_LINGUAS=" fr it de ja es pl cs nl sv pt_BR hu ru zh_CN"
|
| 35 |
|
|
IUSE="${IUSE} ${IUSE_LINGUAS// / linguas_}"
|
| 36 |
|
|
|
| 37 |
|
|
pkg_setup() {
|
| 38 |
|
|
if ! use gtk && ! use ncurses ; then
|
| 39 |
|
|
ewarn "gtk and ncurses are disabled."
|
| 40 |
|
|
ewarn "At least one of these use flags are needed to get a front-end."
|
| 41 |
|
|
ewarn "Only liblinphone is going to be installed."
|
| 42 |
|
|
fi
|
| 43 |
|
|
|
| 44 |
|
|
strip-linguas ${IUSE_LINGUAS}
|
| 45 |
|
|
}
|
| 46 |
|
|
|
| 47 |
|
|
src_prepare() {
|
| 48 |
|
|
epatch "${FILESDIR}"/${PN}-3.4.3-nls.patch
|
| 49 |
|
|
# remove speex check, avoid bug when mediastreamer[-speex]
|
| 50 |
|
|
sed -i -e '/SPEEX/d' configure.ac || die "patching configure.ac failed"
|
| 51 |
|
|
|
| 52 |
|
|
# fix path to use lib64
|
| 53 |
|
|
sed -i -e "s:lib\(/liblinphone\):$(get_libdir)\1:" configure.ac \
|
| 54 |
|
|
|| die "patching configure.ac failed"
|
| 55 |
|
|
|
| 56 |
|
|
# removing bundled libs dir prevent them to be reconf
|
| 57 |
|
|
rm -rf mediastreamer2 oRTP || die "should not die"
|
| 58 |
|
|
sed -i -e "s:oRTP::;s:mediastreamer2::" Makefile.am \
|
| 59 |
|
|
|| die "patching Makefile.am failed"
|
| 60 |
|
|
|
| 61 |
|
|
# make sure to use host libtool version
|
| 62 |
|
|
rm -f m4/libtool.m4 m4/lt*.m4 #282268
|
| 63 |
|
|
eautoreconf
|
| 64 |
|
|
}
|
| 65 |
|
|
|
| 66 |
|
|
src_configure() {
|
| 67 |
|
|
# strict: we don't want -Werror
|
| 68 |
|
|
# external-ortp,external-mediastreamer: prefer external libs
|
| 69 |
|
|
# truespeech: seems not used, TODO: ask in ml
|
| 70 |
|
|
# rsvp: breaking the build (not maintained anymore) --disable = --enable
|
| 71 |
|
|
# alsa, artsc and portaudio are used for bundled mediastreamer
|
| 72 |
|
|
econf \
|
| 73 |
|
|
--libdir="${EPREFIX}"/usr/$(get_libdir) \
|
| 74 |
|
|
--disable-strict \
|
| 75 |
|
|
--enable-external-ortp \
|
| 76 |
|
|
--enable-external-mediastreamer \
|
| 77 |
|
|
--disable-truespeech \
|
| 78 |
|
|
$(use_enable doc manual) \
|
| 79 |
|
|
$(use_enable gtk gtk_ui) \
|
| 80 |
|
|
$(use_enable ipv6) \
|
| 81 |
|
|
$(use_enable ncurses console_ui) \
|
| 82 |
|
|
$(use_enable nls) \
|
| 83 |
|
|
$(use_enable video)
|
| 84 |
|
|
}
|
| 85 |
|
|
|
| 86 |
|
|
src_install() {
|
| 87 |
|
|
emake DESTDIR="${D}" install
|
| 88 |
|
|
dodoc AUTHORS BUGS ChangeLog NEWS README README.arm TODO
|
| 89 |
|
|
pax-mark m "${ED}usr/bin/linphone"
|
| 90 |
|
|
}
|