1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils flag-o-matic wxwidgets user
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 ppc ppc64 ~sparc x86"
19 IUSE="daemon debug geoip nls remote stats unicode upnp +X"
21 DEPEND=">=dev-libs/crypto++-5
23 stats? ( >=media-libs/gd-2.0.26[jpeg] )
24 geoip? ( dev-libs/geoip )
25 upnp? ( >=net-libs/libupnp-1.6.6 )
26 remote? ( >=media-libs/libpng-1.2.0
27 unicode? ( >=media-libs/gd-2.0.26 ) )
28 X? ( >=x11-libs/wxGTK-2.8.12:2.8[X] )
29 !X? ( >=x11-libs/wxGTK-2.8.12:2.8 )
34 if use stats && ! use X; then
35 einfo "Note: You would need both the X and stats USE flags"
36 einfo "to compile aMule Statistics GUI."
37 einfo "I will now compile console versions only."
42 if use daemon || use remote; then
44 enewuser p2p -1 -1 /home/p2p p2p
49 epatch "${FILESDIR}"/${PN}-2.2.6-fallocate.diff
51 epatch "${FILESDIR}"/${PN}-2.3.1-gcc47.patch
60 einfo "wxGTK with X support will be used"
61 need-wxwidgets unicode
63 einfo "wxGTK without X support will be used"
64 need-wxwidgets base-unicode
68 use stats && myconf="${myconf}
71 use remote && myconf="${myconf}
82 --with-wx-config=${WX_CONFIG} \
85 $(use_enable !debug optimize) \
86 $(use_enable daemon amule-daemon) \
89 $(use_enable remote webserver) \
90 $(use_enable stats cas) \
91 $(use_enable stats alcc) \
97 emake DESTDIR="${D}" install || die
100 newconfd "${FILESDIR}"/amuled.confd amuled
101 newinitd "${FILESDIR}"/amuled.initd amuled
104 newconfd "${FILESDIR}"/amuleweb.confd amuleweb
105 newinitd "${FILESDIR}"/amuleweb.initd amuleweb