# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-im/gaim/gaim-0.59.4.ebuild,v 1.2 2002/10/12 08:11:04 blocke Exp $

IUSE="nas nls esd gnome arts gtk2 perl"

DESCRIPTION="GTK Instant Messenger client"
#SRC_URI="mirror://sourceforge/gaim/${P}.tar.bz2"
HOMEPAGE="http://gaim.sourceforge.net"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~ppc"

inherit cvs

ECVS_SERVER="cvs.gaim.sourceforge.net:/cvsroot/gaim"
ECVS_MODULE="gaim"
ECVS_TOP_DIR="${DISTDIR}/cvs-src/${PN}"
S=${WORKDIR}/${ECVS_MODULE}


DEPEND="=sys-libs/db-1*
	!net-im/gaim
	=x11-libs/gtk+-2.0*
	=dev-libs/glib-2.0*
	esd? ( >=media-sound/esound-0.2.22-r2 )
	nls? ( sys-devel/gettext )
	nas? ( >=media-libs/nas-1.4.1-r1 )
	arts? ( >=kde-base/arts-0.9.5 )
	perl? ( >=sys-devel/perl-5.6.1 )"

RDEPEND="${DEPEND}"

src_compile() {
	
	local myconf gnomeopts

	use esd  || myconf="--disable-esd"
	use perl || myconf="${myconf} --disable-perl"
	use nas && myconf="${myconf} --enable-nas" \
		|| myconf="${myconf} --disable-nas"

	if [ "` use arts`" ]; then
	    inherit kde-functions
	    set-kdedir 3
	    # $KDEDIR now points to arts location
	else
	    myconf="${myconf} --disable-artsc"
	fi

	use nls  || myconf="${myconf} --disable-nls"

	./autogen.sh ${myconf} || die
	emake || die

}

src_install () {

	make DESTDIR=${D} install || die
	dodoc ABOUT-NLS AUTHORS HACKING INSTALL NEWS README TODO
}
