new gcc snapshot
[dottout.git] / net-im / emesene / files / net-p2p / amuleadu / amuleadu-3.14_pre20071204.ebuild
blob592b426a95b979b3ba9c64d69caf875841582067
1 # Copyright 1999-2007 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.0_pre20070422.ebuild,v 1.1 2007/04/22 11:48:32 armin76 Exp $
5 inherit autotools eutils flag-o-matic wxwidgets
7 MY_PV=${PV/3.14_pre/}
8 MY_P=${PN/amuleadu/aMule}-CVS-${MY_PV}
9 S="${WORKDIR}/amule-cvs"
11 DESCRIPTION="aMule AdunanzA, IL software p2p per la comunita' fastweb"
12 HOMEPAGE="http://www.adunanza.net/"
13 SRC_URI="http://www.hirnriss.net/files/cvs/${MY_P}.tar.bz2
14 http://2.255.96.133/patchAdunanza_${MY_PV}.gz"
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
19 IUSE="amuled debug gtk nls remote stats unicode geoip optimize upnp ed2k"
21 DEPEND="!net-p2p/amule
22 =x11-libs/wxGTK-2.8*
23 >=sys-libs/zlib-1.2.1
24 stats? ( >=media-libs/gd-2.0.26 )
25 geoip? ( dev-libs/geoip )
26 upnp? ( >=net-libs/libupnp-1.4.6 )
27 remote? ( >=media-libs/libpng-1.2.0
28 unicode? ( >=media-libs/gd-2.0.26 ) )"
30 pkg_setup() {
31 ewarn ""
32 ewarn "Questo ebuild e' basato su CVS snapshot e sul relativo port"
33 ewarn "sperimentale della patch adunanza. Pertanto e' doppiamente "
34 ewarn "instabile e non vi e' garanzia di corretto funzionamento "
35 ewarn ""
37 if ! use gtk && ! use remote && ! use amuled; then
38 eerror ""
39 eerror "You have to specify at least one of gtk, remote or amuled"
40 eerror "USE flag to build amule."
41 eerror ""
42 die "Invalid USE flag set"
45 if use stats && ! use gtk; then
46 einfo "Note: You would need both the gtk and stats USE flags"
47 einfo "to compile aMule Statistics GUI."
48 einfo "I will now compile console versions only."
51 if use stats && ! built_with_use media-libs/gd jpeg; then
52 die "media-libs/gd should be compiled with the jpeg use flag when you have the stats use flag set"
56 src_unpack() {
57 unpack ${A}
58 cd "${S}"
59 patch -p1 -N -i ../patchAdunanza_${MY_PV} 2>&1 >/dev/null
60 elog "patch AdunanzA applicata"
61 AT_M4DIR="m4" eautoreconf
62 elibtoolize
65 pkg_preinst() {
66 if use amuled || use remote; then
67 enewgroup p2p
68 enewuser p2p -1 -1 /home/p2p p2p
72 src_compile() {
73 local myconf=""
75 WX_GTK_VER="2.8"
77 if use gtk; then
78 einfo "wxGTK with gtk support will be used"
79 need-wxwidgets unicode
80 else
81 einfo "wxGTK without X support will be used"
82 need-wxwidgets base
85 if use gtk ; then
86 use stats && myconf="${myconf}
87 --enable-wxcas
88 --enable-alc"
89 use remote && myconf="${myconf}
90 --enable-amule-gui"
91 else
92 myconf="
93 --disable-monolithic
94 --disable-amule-gui
95 --disable-wxcas
96 --disable-alc"
99 econf \
100 --with-wx-config=${WX_CONFIG} \
101 --with-wxbase-config=${WX_CONFIG} \
102 --enable-amulecmd \
103 $(use_enable debug) \
104 $(use_enable !debug optimize) \
105 $(use_enable amuled amule-daemon) \
106 $(use_enable geoip) \
107 $(use_enable nls) \
108 $(use_enable remote webserver) \
109 $(use_enable stats cas) \
110 $(use_enable stats alcc) \
111 $(use_enable ed2k) \
112 ${myconf} || die
114 # we filter ssp until bug #74457 is closed to build on hardened
115 filter-flags -fstack-protector -fstack-protector-all
117 emake -j1 || die
120 src_install() {
121 make DESTDIR=${D} install || die
123 if use amuled; then
124 newconfd ${FILESDIR}/amuled.confd amuled
125 newinitd ${FILESDIR}/amuled.initd amuled
128 if use remote; then
129 newconfd ${FILESDIR}/amuleweb.confd amuleweb
130 newinitd ${FILESDIR}/amuleweb.initd amuleweb
134 pkg_postinst() {
135 ewarn "Per maggiori informazioni sullo sviluppo del porting della patch"
136 ewarn "AdunanzA alla cvs di aMule e per segnalare eventuali problemi"
137 ewarn "potete consultare il forum della comunita':"
138 ewarn "http://forum.adunanza.net/forumdisplay.php?f=25"