# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools eutils DESCRIPTION="Portable Multiplatform Class Libraries used by several VoIP applications" HOMEPAGE="http://www.ekiga.org" SRC_URI="http://www.ekiga.org/admin/downloads/latest/sources/sources/${P}.tar.gz" LICENSE="MPL-1.0" SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" IUSE="alsa debug doc ieee1394 ipv6 ldap minimal noaudio novideo oss sasl sdl ssl v4l v4l2 xml" RDEPEND="alsa? ( media-libs/alsa-lib ) ieee1394? ( media-libs/libdv sys-libs/libavc1394 sys-libs/libraw1394 =net-nds/openldap-2.3.35 ) sasl? ( dev-libs/cyrus-sasl ) sdl? ( media-libs/libsdl ) ssl? ( dev-libs/openssl ) xml? ( dev-libs/expat )" DEPEND="${RDEPEND} >=sys-devel/bison-1.28 >=sys-devel/flex-2.5.4a >=sys-apps/sed-4 !dev-libs/pwlib" src_unpack() { unpack ${A} cd "${S}" # filter out -O3, -Os and -mcpu embedded compiler flags sed -i \ -e "s:-mcpu=\$(CPUTYPE)::" \ -e "s:-O3 -DNDEBUG:-DNDEBUG:" \ -e "s:-Os::" \ make/unix.mak # don't break make install if there are no plugins to install epatch "${FILESDIR}"/${P}-instplugins.diff # use sdl-config to query required libraries #epatch "${FILESDIR}"/pwlib-1.9.3-sdl-configure.patch # this patch fixes bugs: #145424 and #140358 epatch "${FILESDIR}"/${P}-asm.patch } src_compile() { local myconf="" local makeopts="" use noaudio && myconf="${myconf} --disable-audio" use novideo && myconf="${myconf} --disable-video" econf \ --enable-plugins \ $(use_enable v4l2) \ $(use_enable v4l) \ $(use_enable ieee1394 dc) \ $(use_enable ieee1394 avc) \ $(use_enable oss) \ $(use_enable ipv6) \ $(use_enable minimal minsize) \ $(use_enable sdl) \ $(use_enable ssl openssl) \ $(use_enable debug exceptions) \ $(use_enable debug memcheck) \ $(use_enable ldap openldap) \ $(use_enable sasl) \ $(use_enable xml expat) \ ${myconf} \ || die "configure failed" if use debug; then makeopts="${makeopts} DEBUG=1 debug" fi emake ${makeopts} || die "make failed" } src_install() { local makeopts makeopts="PREFIX=/usr DESTDIR=\"${D}\"" if use debug; then mymakeconf="${mymakeconf} DEBUG=1" fi # makefile doesn't create ${D}/usr/bin make ${mymakeconf} install || die "install failed" # copy version.h insinto /usr/share/${PN} doins version.h || die "version.h installation failed" # installing documentation if use doc; then dohtml -r html/* || die "documentation installation failed" fi dodoc ReadMe.txt ReadMe_QOS.txt History.txt || die "documentation installation failed" }