1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-p2p/amule/amule-2.2.6.ebuild,v 1.1 2009/09/18 14:59:45 patrick Exp $
7 inherit eutils flag-o-matic wxwidgets
10 S="${WORKDIR}"/${MY_P}
12 DESCRIPTION="aMule, the all-platform eMule p2p client"
13 HOMEPAGE="http://www.amule.org/"
14 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
18 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
19 IUSE="daemon debug geoip gtk nls remote stats unicode upnp"
21 DEPEND="=x11-libs/wxGTK-2.8*
22 =dev-libs/crypto++-5.5*
24 stats? ( >=media-libs/gd-2.0.26[jpeg] )
25 geoip? ( dev-libs/geoip )
26 upnp? ( >=net-libs/libupnp-1.6.6 )
27 remote? ( >=media-libs/libpng-1.2.0
28 unicode? ( >=media-libs/gd-2.0.26 ) )"
31 if ! use gtk && ! use remote && ! use daemon; then
33 eerror "You have to specify at least one of gtk, remote or daemon"
34 eerror "USE flag to build amule."
36 die "Invalid USE flag set"
39 if use stats && ! use gtk; then
40 einfo "Note: You would need both the gtk and stats USE flags"
41 einfo "to compile aMule Statistics GUI."
42 einfo "I will now compile console versions only."
47 if use daemon || use remote; then
49 enewuser p2p -1 -1 /home/p2p p2p
59 einfo "wxGTK with gtk support will be used"
60 need-wxwidgets unicode
62 einfo "wxGTK without X support will be used"
67 use stats && myconf="${myconf}
70 use remote && myconf="${myconf}
80 epatch "${FILEDIR}/${PN}-2.2.6-remove-download-limit.patch"
83 --with-wx-config=${WX_CONFIG} \
84 --with-wxbase-config=${WX_CONFIG} \
87 $(use_enable !debug optimize) \
88 $(use_enable daemon amule-daemon) \
91 $(use_enable remote webserver) \
92 $(use_enable stats cas) \
93 $(use_enable stats alcc) \
98 emake DESTDIR="${D}" install || die
101 newconfd "${FILESDIR}"/amuled.confd amuled
102 newinitd "${FILESDIR}"/amuled.initd amuled
105 newconfd "${FILESDIR}"/amuleweb.confd amuleweb
106 newinitd "${FILESDIR}"/amuleweb.initd amuleweb