# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-p2p/amule/amule-2.0.0_rc7.ebuild,v 1.1 2004/10/20 03:06:13 squinky86 Exp $ inherit wxwidgets MY_P=${P/m/M} MY_P=${MY_P/_/} S=${WORKDIR}/${MY_P} DESCRIPTION="aMule, the all-platform eMule p2p client" HOMEPAGE="http://www.amule.org/" SRC_URI="http://download.berlios.de/${PN}/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug gtk gtk2 nls remote stats unicode gd daemon" DEPEND="=x11-libs/wxGTK-2.5* >=net-misc/curl-7.11.0 >=sys-libs/zlib-1.2.1 stats? ( >=media-libs/gd-2.0.26 ) gd? ( >=media-libs/gd-2.0.26 ) !net-p2p/xmule" pkg_setup() { WX_GTK_VER="2.5" if use gtk && ! use gtk2; then if use unicode; then die "You can't use unicode with GTK1" fi need-wxwidgets gtk || die "You need to install wxGTK with gtk support." elif use gtk && use gtk2; then if use unicode; then need-wxwidgets unicode || die "You need to install wxGTK with gtk2 and unicode support." else need-wxwidgets gtk2 || die "You need to install exGTK with gtk2 support." fi elif use gtk2 && ! use gtk; then die "gtk2 flag can be used only to use gtk2 if gtk support is already set." else if use unicode; then need-wxwidgets base-unicode || die "You need to install wxGTK with unicode support" else need-wxwidgets base || die "You need to install wxGTK" fi fi } src_compile() { # Enable guis only if building with gtk or gtk2 support if use gtk; then myconf="${myconf} $(use_enable remote webservergui) $(use_enable remote amulecmdgui) $(use_enable stats wxcas) $(use_enable stats alc)" else myconf="${myconf} --disable-webservergui --disable-amulecmdgui --disable-wxcas --disable-alc" fi econf \ --enable-optimise \ --with-wx-config=${WX_CONFIG} \ --with-wxbase-config=${WX_CONFIG} \ --disable-monolithic \ $(use_enable daemon amule-daemon) \ $(use_enable nls) \ $(use_enable remote amulecmd) $(use_enable remote webserver) \ $(use_enable stats cas) $(use_enable stats alcc) \ $(use_enable debug) \ ${myconf} || die emake -j1 || die } src_install() { make DESTDIR=${D} install || die }