# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Based on the ebuild by 'mascanho' @ forums.gentoo.org inherit eutils wxwidgets S=${WORKDIR}/${PN} # Always use todays snapshot by default DATE=$(date +%Y%m%d) # Uncomment and edit this line to use a specific date # Format is #DATE=20050521 DESCRIPTION="aMule, the all-platform eMule p2p client" HOMEPAGE="http://www.amule.org/" SRC_URI="http://www.hirnriss.net/files/cvs/aMule-CVS-${DATE}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 ~amd64" IUSE="debug gtk2 nls remote stats unicode amuled nosystray optimize remote-gui" RESTRICT="nostrip nomirror" DEPEND=" gtk2? ( >=x11-libs/wxGTK-2.6.0 ) amuled? ( >=x11-libs/wxGTK-2.6.0 ) !gtk2? ( !amuled? ( >=x11-libs/wxGTK-2.6.0 ) ) >=net-misc/curl-7.11.0 >=sys-libs/zlib-1.2.1 stats? ( >=media-libs/gd-2.0.26 ) remote? ( >=media-libs/libpng-1.2.0 ) !net-p2p/amule !net-p2p/xmule" export WX_CONFIG=/usr/bin/wx-config #pkg_setup() { # if ! use gtk2 >& /dev/null ; then # need-wxwidgets gtk || die "gtk version of x11-libs/wxGTK not found" # elif use unicode >& /dev/null ; then # export WX_GTK_VER="2.6" # need-wxwidgets unicode || die "You need to emerge unicoded wxGTK with USE='gtk2 unicode'" # else # export WX_GTK_VER="2.6" # need-wxwidgets gtk2 || die "You need to emerge wxGTK with USE='gtk2'" # fi #} src_compile() { AMULED="" if use amuled >& /dev/null ; then AMULED="--enable-amule-daemon --enable-amule-gui" fi SYSTRAY="" if use nosystray >& /dev/null ; then SYSTRAY="--disable-systray" fi if use optimize >& /dev/null ; then OPTIMIZE="--enable-optimize" else OPTIMIZE="--disable-optimize" fi DEBUG="" if use debug >& /dev/null ; then DEBUG="--enable-debug" fi REMOTE_GUI="" if use remote-gui >& /dev/null ;then REMOTE_GUI="`use_enable remote amulecmdgui` \ `use_enable remote webservergui`" fi econf ${AMULED} ${SYSTRAY} \ ${DEBUG} \ ${OPTIMIZE} \ --with-wx-config=${WX_CONFIG} \ --with-wxbase-config=${WX_CONFIG} \ `use_enable nls` \ `use_enable remote amulecmd` \ `use_enable remote webserver` \ ${REMOTE_GUI} \ `use_enable stats cas` \ `use_enable stats wxcas` \ `use_enable stats alc` \ `use_enable stats alcc` \ || die emake -j1 || die } src_install() { make DESTDIR=${D} install || die }