# 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 #ebuild $PORTDIR_OVERLAY/net-p2p/amule-cvs/amule-cvs-1.ebuild digest inherit eutils flag-o-matic wxwidgets #S=${WORKDIR}/${PN} MY_P=${P/m/M} S=${WORKDIR}/${MY_P} # Always use todays snapshot by default #DATE=$(date +%Y%m%d) # Uncomment and edit this line to use a specific date # Format is #DATE=20050522 #ebuild $PORTDIR_OVERLAY/net-p2p/amule-cvs/amule-cvs-1.ebuild digest #ebuild /usr/local/portage/net-p2p/amule-cvs/amule-cvs-1.ebuild digest 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" #SRC_URI="http://download.berlios.de/${PN}/${MY_P}.tar.bz2" SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 ~amd64" IUSE="debug gtk2 wxgtk1 nls remote stats unicode amuled nosystray optimize remotegui" #RESTRICT="nostrip nomirror" RESTRICT="nomirror" DEPEND=" >=x11-libs/wxGTK-2.6.0 >=sys-libs/zlib-1.2.2 nls? ( sys-devel/gettext ) stats? ( >=media-libs/gd-2.0.32 ) remote? ( >=media-libs/libpng-1.2.8 ) !net-p2p/xmule" pkg_setup() { export WX_GTK_VER="2.6" if ! use gtk2 && ! use wxgtk1; then if use unicode; then need-wxwidgets base-unicode else need-wxwidgets base fi fi if ! use gtk2 && use wxgtk1; then if ! use unicode; then need-wxwidgets gtk else die "You cannot set amule with wxgtk1 and unicode support." fi fi if use gtk2; then if use unicode; then need-wxwidgets unicode else need-wxwidgets gtk2 fi fi if use remotegui; then if ! use wxgtk1 && ! use gtk2; then die "You cannot set amuleremotegui while wxgtk1 or gtk2 are not set in your USE flags." fi fi #Fix amuleweb progressbar bug if ! use stats && use remote && use unicode; then die "You cannot install the webserver while stats is not set in your USE flags." fi } src_compile() { if use amuled && use nosystray; then EXTRA_ECONF="--enable-amule-daemon --enable-amule-gui --disable-systray" elif use amuled && ! use nosystray; then EXTRA_ECONF="--enable-amule-daemon --enable-amule-gui" elif ! use amuled && use nosystray; then EXTRA_ECONF="--disable-systray" fi # if use nosystray; then # EXTRA_ECONF="--disable-systray" # 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} \ ${DEBUG} \ ${OPTIMIZE} \ `use_enable nls` \ `use_enable remote amulecmd` \ `use_enable remote webserver` \ `use_enable remotegui amulecmdgui` \ `use_enable remotegui webservergui` \ `use_enable stats cas` \ `use_enable stats wxcas` \ `use_enable stats alc` \ `use_enable stats alcc` \ || die # we filter ssp until bug #74457 is closed to build on hardened if has_hardened; then filter-flags -fstack-protector -fstack-protector-all fi emake -j1 || die } src_install() { make DESTDIR=${D} install || die if use amuled || use remote; then if ! id p2p >/dev/null; then enewgroup p2p enewuser p2p -1 /bin/false /home/p2p p2p fi fi if use amuled; then insinto /etc/conf.d; newins ${FILESDIR}/amuled.confd amuled exeinto /etc/init.d; newexe ${FILESDIR}/amuled.initd amuled fi if use remote; then insinto /etc/conf.d; newins ${FILESDIR}/amuleweb.confd amuleweb exeinto /etc/init.d; newexe ${FILESDIR}/amuleweb.initd amuleweb fi }